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/admin/classes/Controller/
Upload File :
Current File : /home/pfhr/public_html/admin/classes/Controller/CStudents.php

<?PHP
class Controller_CStudents
{
	var $output=array();
	
	function ShowMembers()
	{	
		include_once('classes/Lib/HandleErrors.php');
		$members=$_POST['txticard'];
		if($members=='')
		{
		header('Location:?do=students');	
		$_SESSION['emessage']='Please  Enter Valid ID Card No';
		}
		else
		{
			$obj=new Bin_Query();
			$select="select * from student_table where student_icard= $members ";
			if($obj->executeQuery($select))
			{
				if($obj->totrows >= 1)
					{
						header('Location:?do=students&action=edit&id='.$members.'');	
					}
					else
					{
						$_SESSION['emessage']="ID Card Not Available";
						header('Location:?do=students');
					}
			}
			else
			{
				$_SESSION['emessage']="ID Card Not Available";
				header('Location:?do=students');
			}
		}
	}
	
	
	function showStudents()
	{ 
		include_once('classes/Controller/CHeader.php');
		include_once('classes/Controller/CFooter.php');
		include_once('classes/Model/MStudents.php');
		include_once('classes/Display/DStudents.php');
		$output['header']=Controller_CHeader::showHeader();
		$output['user']=Model_MStudents::showStudents();
		Bin_Template::createTemplate('students.html',$output);
		$output['footer']=Controller_CFooter::showFooter();
		unset($_SESSION['message']);
		$_SESSION['message']='';
		unset($_SESSION['error_message']);
		$_SESSION['error_message']='';
	}

	
	function showAdd()
	{
		include_once('classes/Controller/CHeader.php');
		include_once('classes/Controller/CFooter.php');
		include_once('classes/Model/MStudents.php');
		include_once('classes/Display/DStudents.php');
		include_once('classes/Lib/Paging.php');
		include_once('classes/Lib/HandleErrors.php');
		$output['errmsg'] = $Err->messages;
		$output['errval'] = $Err->values;
		$output['styles'] = $Err->style;
		$output['header']=Controller_CHeader::showHeader();
		Bin_Template::createTemplate('students_add.html',$output);
		$output['footer']=Controller_CFooter::showFooter();
		unset($_SESSION['message']);
		unset($_SESSION['error_message']);
		unset($_SESSION['errmsg']);
	}
	
	
	
	
	
	function insert()
	{	
		include_once('classes/Controller/CHeader.php');
		include_once('classes/Controller/CFooter.php');
		include_once('classes/Model/MStudents.php');
		include_once('classes/Display/DStudents.php');
		include_once('classes/Lib/ThumbImage.php');
		
		//include_once('classes/Lib/ValidateInputs.php');
		//new Lib_ValidateInputs('adduser');
		
		$output['insert']=Model_MStudents::insert();
	}
	
	function showEdit()
	{
		include_once('classes/Controller/CHeader.php');
		include_once('classes/Controller/CFooter.php');
		include_once('classes/Model/MStudents.php');
		include_once('classes/Display/DStudents.php');
		include_once('classes/Lib/ThumbImage.php');
		include_once('classes/Lib/HandleErrors.php');
		$output['errmsg'] = $Err->messages;
		$output['errval'] = $Err->values;
		$output['styles'] = $Err->style;
		$output['header']=Controller_CHeader::showHeader();
		
		$values=Model_MStudents::showEditDetail();

		$output['txtname']=$values['student_name'];
		$output['txtof']=$values['student_of'];
		$output['txtfname']=$values['student_fname'];
		$output['txtusername']=$values['student_icard'];
		$output['txtaddress']=$values['student_address'];
		$output['txtphone']=$values['student_phone'];
		$output['txtdesignation']=$values['student_designation'];
		$output['txtco']=$values['student_co'];		
		$output['txtblood']=$values['student_blood'];
		$output['txtdob']=$values['student_dob'];
		$output['txtdoj']=$values['student_doj'];
		$output['txtdue']=$values['student_due'];
		$output['image2']=$values['student_image'];
		$image=$values['student_image'];
		if($image==''){$output['image']='../uploads/members/no_user_img.jpg';}
		else{$output['image']=$values['student_image'];}
		$output['usr']=$values['student_icard'];
		Bin_Template::createTemplate('students_edit.html',$output);
		$output['footer']=Controller_CFooter::showFooter();
		unset($_SESSION['message']);
		unset($_SESSION['error_message']);
		
	}
	
	
	function update()
	{
		include_once('classes/Controller/CHeader.php');
		include_once('classes/Controller/CFooter.php');
		include_once('classes/Model/MStudents.php');
		include_once('classes/Display/DStudents.php');
		include_once('classes/Lib/ThumbImage.php');
		
		//include_once('classes/Lib/ValidateInputs.php');
		//new Lib_ValidateInputs('edituser');
			
		$values=Model_MStudents::updateUser();
		
		//header('Location:?do=students&action=edit&id='.$_POST['user_id']);		
	
	}


} 

?>