system: Linux mars.sprixweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
cmd: 

Direktori : /home/pfhr/public_html/classes/Model/
Upload File :
Current File : /home/pfhr/public_html/classes/Model/MStitching.php

<?PHP
class Model_MStitching
{		function showStudents()	{		$pagesize=10;		if(isset($_GET['size']))		{			$pagesize=$_GET['size'];		}						if(isset($_GET['page']))		{		    			$start = trim($_GET['page']-1) *  $pagesize;			$end =  $pagesize;		}			else 		{			$start = 0;			$end =  $pagesize;		}			$total=0;		$query_string = split('&size',$_SERVER['QUERY_STRING']);				$obj=new Bin_Query();		$sql="select * from student_table ";		$obj->executeQuery($sql);		$total = ceil($obj->totrows/ $pagesize);		if($obj->totrows<=$pagesize)		{			$sql1="select * from student_table order by student_icard ASC LIMIT $start,$end";			$obj2=new Bin_Query();			$obj2->executeQuery($sql1);		return Display_DStitching::showStudents($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);		}				else		{				$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');								$this->data['paging'] = $tmp->output;				$this->data['prev'] =$tmp->prev;				$this->data['next'] = $tmp->next;					 $sql1 = "select * from student_table order by student_icard ASC LIMIT $start,$end";				 $obj2 = new Bin_Query();				$obj2->executeQuery($sql1);								return Display_DStitching::showStudents($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);		}	}					function showTeachers()	{		$pagesize=10;		if(isset($_GET['size']))		{			$pagesize=$_GET['size'];		}						if(isset($_GET['page']))		{		    			$start = trim($_GET['page']-1) *  $pagesize;			$end =  $pagesize;		}			else 		{			$start = 0;			$end =  $pagesize;		}			$total=0;		$query_string = split('&size',$_SERVER['QUERY_STRING']);				$obj=new Bin_Query();		$sql="select * from teacher_table ";		$obj->executeQuery($sql);		$total = ceil($obj->totrows/ $pagesize);		if($obj->totrows<=$pagesize)		{			$sql1="select * from teacher_table order by teacher_icard ASC LIMIT $start,$end";			$obj2=new Bin_Query();			$obj2->executeQuery($sql1);		return Display_DStitching::showTeachers($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);		}				else		{				$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');								$this->data['paging'] = $tmp->output;				$this->data['prev'] =$tmp->prev;				$this->data['next'] = $tmp->next;					 $sql1 = "select * from teacher_table order by teacher_icard ASC LIMIT $start,$end";				 $obj2 = new Bin_Query();				$obj2->executeQuery($sql1);								return Display_DStitching::showTeachers($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);		}	}			function showOfficers()	{		$pagesize=10;		if(isset($_GET['size']))		{			$pagesize=$_GET['size'];		}						if(isset($_GET['page']))		{		    			$start = trim($_GET['page']-1) *  $pagesize;			$end =  $pagesize;		}			else 		{			$start = 0;			$end =  $pagesize;		}			$total=0;		$query_string = split('&size',$_SERVER['QUERY_STRING']);				$obj=new Bin_Query();		$sql="select * from officer_table ";		$obj->executeQuery($sql);		$total = ceil($obj->totrows/ $pagesize);		if($obj->totrows<=$pagesize)		{			$sql1="select * from officer_table order by officer_icard ASC LIMIT $start,$end";			$obj2=new Bin_Query();			$obj2->executeQuery($sql1);		return Display_DStitching::showOfficers($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);		}				else		{				$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');								$this->data['paging'] = $tmp->output;				$this->data['prev'] =$tmp->prev;				$this->data['next'] = $tmp->next;					 $sql1 = "select * from officer_table order by officer_icard ASC LIMIT $start,$end";				 $obj2 = new Bin_Query();				$obj2->executeQuery($sql1);								return Display_DStitching::showOfficers($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);		}	}						
}
?>