<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>
<?php

  /* $session123=$_SESSION['current_session'];
    $branch123=$_SESSION['branch'];

    $sql = "SELECT student_id, first_name, last_name, class_id, section_id, session_id, ref_no, candidate_roll_no, family_code, cell_no FROM  edu_student_details  WHERE branch_id='$branch123' and status='0' and session_id='$session123' ";

    
         // print_r($WorkAssignListVal)

    if(isset($_COOKIE['getstudent_data1'])) {

    // Storing code
      
    $WorkAssignList = json_decode($_COOKIE['getstudent_data1'], true);

      } else { 

      $WorkAssignList = $m->query($sql);
      //setcookie('getstudent_data1', json_encode($WorkAssignList), time()+3600);
    

      }


echo '<pre>';
print_r($WorkAssignList);
echo '</pre>';*/


if($_GET['action']="users"){
    
    $sql = "SELECT Distinct(u.cell_no),b.Branch_Name from edu_user_config as u, edu_branch_config as b where b.branch_id=u.branch_id and b.city_id='94' group by u.cell_no";

    $students_data = $m->query($sql);

    echo "Estimated Users Records: ".count($students_data)."<br><br>";

    foreach($students_data as $record){

      echo $record['cell_no']."<br/>";
    }
  
  }


if($_GET['action']="students"){
    
    $sql = "SELECT Distinct(u.cell_no) from edu_student_details as u, edu_branch_config as b where b.branch_id=u.branch_id and b.city_id='94' group by u.cell_no";

    $students_data = $m->query($sql);

    echo "Estimated Students Records: ".count($students_data)."<br><br>";

    foreach($students_data as $record){

      echo $record['cell_no']."<br/>";
    }
  
  }


  
  ?>