<?php
include("../config/database.php");
$conct  = new connectionCreat();
$conct->connectToDB();
$conct->selectDB();
$sqlOrder  = mysql_query("SELECT * FROM `tbl_attend_type` where `status`=1 order by `sort_order`");
$count     = mysql_num_rows($sqlOrder);
if($count > 0)
{	
    $attendanceList = array();	
    while($data = mysql_fetch_array($sqlOrder))
    {	
		$attendanceList[]    = array('id'=>$data['id'], 'name'=>$data['details']);
	}
    $arr  = array("status"=>true, "attendanceList"=>$attendanceList);	
}
else
{
    $arr = array("status"=>false, 'msg'=>"Attendance List Not Found.");
}
echo json_encode($arr);		    	
mysql_close();
?>