0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.191.37.129


Current Path : /var/www/html/ssc/src18042016/
Upload File :
Current File : //var/www/html/ssc/src18042016/college.php

<?php
class college
{
    
		function __construct($aobj_context)
		{
		session_start();
		$this->aobj_context=$aobj_context;
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		$this->college_code = $_SESSION['collcode'];			  
		}
		 
		function SaveCollegeInfoData()
		{
				
				$u_id = $_SESSION['user_id'];
				$log_name = $_SESSION['usr'];	
 
				$this->internal_code=trim($this->aobj_context->mobj_data["internal_code"]);
				
				$this->FCOLLCODE=trim($this->aobj_context->mobj_data["college_code"]);
				$this->FPRINCIPAL=trim($this->aobj_context->mobj_data["principal_name"]);
				$this->FPHONEP=trim($this->aobj_context->mobj_data["p_phone_no"]);
				$this->FEMAILP=trim($this->aobj_context->mobj_data["p_email"]);
				$this->FFAXP=trim($this->aobj_context->mobj_data["p_fax_mail"]);
				$this->FVICEPRIN =trim($this->aobj_context->mobj_data["v_p_name"]);
				$this->FPHONEV=trim($this->aobj_context->mobj_data["v_p_phone"]);
				$this->FEMAILV=trim($this->aobj_context->mobj_data["v_p_email"]);
				$this->FFAXV=trim($this->aobj_context->mobj_data["v_p_fax"]);
				$this->FMOBILESMS1=trim($this->aobj_context->mobj_data["mobile_1"]);
				$this->FMOBILESMS2=trim($this->aobj_context->mobj_data["mobile_2"]);
				$this->FCOLLADD1=trim($this->aobj_context->mobj_data["addr1"]);
				$this->FCOLLADD2=trim($this->aobj_context->mobj_data["addr2"]);
				$this->FCOLLADD3=trim($this->aobj_context->mobj_data["addr3"]);
				$this->FCOLLADD4=trim($this->aobj_context->mobj_data["addr4"]);
				 
					$update="update collage
					set FCOLLCODE='{$college_code}',
					FPRINCIPAL='{$this->FPRINCIPAL}',
					FPHONEP='{$this->FPHONEP}',
					FEMAILP='{$this->FEMAILP}',
					FFAXP='{$this->FFAXP}',
					FVICEPRIN='{$this->FVICEPRIN}',
					FPHONEV='{$this->FPHONEV}',
					FEMAILV='{$this->FEMAILV}',
					FFAXV='{$this->FFAXV}',
					FMOBILESMS1='{$this->FMOBILESMS1}',
					FMOBILESMS2='{$this->FMOBILESMS2}',
					FCOLLADD1='{$this->FCOLLADD1}',
					FCOLLADD2='{$this->FCOLLADD2}',
					FCOLLADD3='{$this->FCOLLADD3}',
					FCOLLADD4='{$this->FCOLLADD4}'
					where FCOLLCODE='{$this->college_code}'
					";
				 
					$lobj_update_info = $this->aobj_context->mobj_db->Execute($update); 
					 
					if($lobj_update_info)
					{
					$arr='updated Successfully';
					echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"Success");
					}
					else
					{
					$arr='Failed to update';
					echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
					}
				 
		  
			 
		}
		 
		function AssignExistingCollegeData()
		{
			 	 
								$get_data="select 
											FCOLLCODE,
											FPRINCIPAL,
											FPHONEP,
											FEMAILP,
											FFAXP,
											FVICEPRIN,
											FPHONEV,
											FEMAILV,
											FFAXV,
											FMOBILESMS1,
											FMOBILESMS2,
											FCOLLADD1,
											FCOLLADD2,
											FCOLLADD3,
											FCOLLADD4'
											from college
											where FCOLLCODE='{$this->college_code}'";	
											
				$lobj_get_data = $this->aobj_context->mobj_db->GetRow($get_data);
 		
				echo $this->aobj_context->mobj_output->ToJSONEnvelope($lobj_get_data,0,"Success");
					return;		
			 
		}
		 
 }
 
function SaveCollegeInfoData($aobj_context)
{
    $class_obj=new college($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->SaveCollegeInfoData();
}function AssignExistingCollegeData($aobj_context)
{
    $class_obj=new college($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->AssignExistingCollegeData();
}  

?>