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.116.89.70


Current Path : /proc/thread-self/root/proc/thread-self/root/var/www/oasis/src/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/var/www/oasis/src/messagetext.php

<?php
	function SaveMessageTxet($aobj_context)
	{
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		$messagetext1 = trim($aobj_context->mobj_data["messagetext"]);
		//var_dump($messagetext1);
		$messagetext = str_replace("'",'"',$messagetext1);
		
		$fmodule = trim($aobj_context->mobj_data["fmodule"]);
		$fdate = trim($aobj_context->mobj_data["fdate"]);
		$tdate = trim($aobj_context->mobj_data["tdate"]);

		$insert = "update message_board set message = '{$messagetext}', display_from = date_format(str_to_date('{$fdate}','%d/%m/%Y'),'%Y-%m-%d'),
					display_to = date_format(str_to_date('{$tdate}','%d/%m/%Y'),'%Y-%m-%d')
					where college_code = '{$fmodule}'";
		//var_dump($insert);
		$results = $aobj_context->mobj_db->Execute($insert);

		if($results)
		{
			$rdata = "Updated Successfully.";
			print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
			return;
		}
		else
		{
			$rdata = "No Updation";
			print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));  
			return;			
		}

	}

	function displayMessage($aobj_context)
	{
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

		$fmodule = trim($aobj_context->mobj_data["fmodule"]);
		

		$query = "select message,date_format(display_from,'%d/%d/%Y') as display_from,
		date_format(display_to,'%d/%d/%Y') as display_to 
		from message_board where college_code = '{$fmodule}'";

		$results = $aobj_context->mobj_db->GetRow($query);

		if($results)
		{
			print_r($aobj_context->mobj_output->ToJSONEnvelope($results,0,"success"));
			return;
		}
		else
		{
			$rdata = "Please try after some time";
			print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));  
			return;			
		}

	}
?>