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

<?php


   $m->where("branch_id", $_SESSION['branch']);
   $sms_service = $m->get("edu_branch_config");

   $branch=$_SESSION['branch'];
   $date=date('Y-m-d');

   $sql = "SELECT std.cell_no FROM  eduportal_attendance_detail as at, edu_student_details as std  WHERE std.branch_id='$branch' and at.message_status='0' and at.date='$date' and at.attendance='P' and std.student_id=at.student_id";
 // print_r($sql);



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

$numbers="";

foreach($secondLevel as $numb){

 

	if($numb['cell_no']!=NULL && is_numeric($numb['cell_no'])  && strlen($numb['cell_no'])==11){
	
		$numbers.=$numb['cell_no'].",";
	}
	
}
	


	$temp=array_unique(explode(",", $numbers));


	$numbers=implode(",",$temp);

	echo rtrim($numbers, ",");
	
  ?>
