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 : 3.12.76.168


Current Path : /proc/thread-self/root/var/www/misc/public_html/live100/src/
Upload File :
Current File : //proc/thread-self/root/var/www/misc/public_html/live100/src/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->FCOLLCODE=trim($this->aobj_context->mobj_data["college_code"]);
				$this->FCOLLNAME=trim($this->aobj_context->mobj_data["college_name"]);
				$this->FCOLLPLACE=trim($this->aobj_context->mobj_data["college_place"]);
				$this->FPRINCIPAL=trim($this->aobj_context->mobj_data["principal_name"]);
				$this->FPHONE=trim($this->aobj_context->mobj_data["coll_phone_no"]);
				$this->FEMAIL=trim($this->aobj_context->mobj_data["coll_e_mail"]);
				$this->FFAX=trim($this->aobj_context->mobj_data["coll_fax_mail"]);
				$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 college set
					FCOLLNAME='{$this->FCOLLNAME}',
					FTOWN='{$this->FCOLLPLACE}',
					FPRINCIPALNAME='{$this->FPRINCIPAL}',
					FPHONE='{$this->FPHONE}',
					FEMAIL='{$this->FEMAIL}',
					FFAX='{$this->FFAX}',
					FMOBILE='{$this->FMOBILESMS1}',
					FALTMOBILE='{$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,FCOLLNAME,FTOWN,
											FPRINCIPALNAME,
											FPHONE,
											FEMAIL,
											FFAX,
											FMOBILE,
											FALTMOBILE,
											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();
}  

function saveCollegeInfoPopup($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	
	$fcollegecode=trim($aobj_context->mobj_data["fcollegecode"]);
	$fcollegename=trim($aobj_context->mobj_data["fcollegename"]);
	$fplace=trim($aobj_context->mobj_data["fplace"]);
	$fprincipalname=trim($aobj_context->mobj_data["fprincipalname"]);
	$fphoneNumb=trim($aobj_context->mobj_data["flandlinenumb"]);
	$fcollemail=trim($aobj_context->mobj_data["fcollemail"]);
	$ffaxnumb=trim($aobj_context->mobj_data["ffaxnumb"]);
	$fmobnumb=trim($aobj_context->mobj_data["fmobnumb"]);
	$faltmobnumb=trim($aobj_context->mobj_data["faltmobnumb"]);
	$coll_addr1=trim($aobj_context->mobj_data["coll_addr1"]);
	$coll_addr2=trim($aobj_context->mobj_data["coll_addr2"]);
	$coll_addr3=trim($aobj_context->mobj_data["coll_addr3"]);
	$coll_addr4=trim($aobj_context->mobj_data["coll_addr4"]);
 
	$update ="UPDATE  college set 
	FPRINCIPALNAME ='{$fprincipalname}',FPHONE ='{$fphoneNumb}',FMOBILE ='{$fmobnumb}',FFAX ='{$ffaxnumb}',
	FALTMOBILE ='{$faltmobnumb}',FCOLLADD1='{$coll_addr1}', FCOLLADD2 ='{$coll_addr2}', FCOLLADD3 ='{$coll_addr3}', 
	FCOLLADD4 ='{$coll_addr4}',FEMAIL ='{$fcollemail}',FUPDATED ='T' where FCOLLCODE ='{$fcollegecode}'";

	$lobj_update_data = $aobj_context->mobj_db->Execute($update);		

	if($lobj_update_data)
	{
		echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_update_data,0,"Success");
	}
	else
	{
		echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_update_data,-1,"error");
	} 
}
?>