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


Current Path : /var/www/misc/public_html/oums_old/phpscript/
Upload File :
Current File : /var/www/misc/public_html/oums_old/phpscript/sys_mainphp.php

<?php
	$resp_mesg="";
	$resp_stat="F";
	$resp_file="";
	
	@$load_data=$_POST["load_data"];
	if($load_data=="mail_data")
	{		
		if (filter_var($mail_code, FILTER_VALIDATE_EMAIL)) 
		{
			$resp_stat="T";
		}	
		echo json_encode(array("mesg"=>$resp_mesg, "stat"=>$resp_stat));		
	}	

	function get_time_diff($time1, $time2)
	{
		$time1 = strtotime("1/1/1980 $time1");
		$time2 = strtotime("1/1/1980 $time2");
		
		if ($time2 < $time1) 
		{
			$time2 += 86400;
		}

		return date("H:i", strtotime("1980-01-01 00:00:00") + ($time2 - $time1));

	}  
	
	function get_dept_name($dept_code)
	{
		$dept_name="";
		include("sys_connect.php");
		$mysql="select * from masdept where fdeptcode='$dept_code'";
		$myres=mysqli_query($mycon,$mysql);
		while($row = mysqli_fetch_assoc($myres))
		{
			$dept_name=$row['fdeptname'];
		}
		if($dept_code=='%')
		{
			$dept_name="ALL";		
		}
		return $dept_name;
	}
	
	function get_empl_name($empl_code)
	{
		$empl_name="";
		include("sys_connect.php");
		$mysql="select * from masempl where femplcode='$empl_code'";
		$myres=mysqli_query($mycon,$mysql);
		while($row = mysqli_fetch_assoc($myres))
		{
			$empl_name=$row['femplname'];
		}
		if($empl_code=='%')
		{
			$empl_name="ALL";		
		}
		return $empl_name;
	}
	
	function get_desn_name($desn_code)
	{
		$desn_name="";
		include("sys_connect.php");
		$mysql="select * from masdesn where fdesncode='$desn_code'";
		$myres=mysqli_query($mycon,$mysql);
		while($row = mysqli_fetch_assoc($myres))
		{
			$desn_name=$row['fdesnname'];
		}
		if($desn_code=='%')
		{
			$desn_name="ALL";		
		}
		return $desn_name;
	}
	
	function get_bank_name($bank_code)
	{
		$desn_name="";
		include("sys_connect.php");
		$mysql="select * from masbank where fbankcode='$bank_code'";
		$myres=mysqli_query($mycon,$mysql);
		while($row = mysqli_fetch_assoc($myres))
		{
			$bank_name=$row['fbankname'];
		}
		if($bank_code=='%')
		{
			$bank_name="ALL";		
		}
		return $bank_name;
	}
	
	if($load_data=="page_data")
	{
		$file_name=$_POST['file_name'];
		include("sys_connect.php");
		$mysql="select * from sys_menu where flinkpath='$file_name'";		
		$myres=mysqli_query($mycon,$mysql);
		while($row = mysqli_fetch_assoc($myres))
		{
			$page_titl=$row['fmenuname'];
			$grid_rows=$row['fgridrows'];
			
			$page_link="";
			if($row['flinkaddn']=='T'){$page_link.="<input type='button' id='btn_addn' class='btn_input' onClick='addn_data();' Value='Add'> ";}
			if($row['flinkedit']=='T'){$page_link.="<input type='button' id='btn_edit' class='btn_input' onClick='edit_data();' Value='Edit'> ";}
			if($row['flinkdele']=='T'){$page_link.="<input type='button' id='btn_dele' class='btn_input' onClick='dele_data();' Value='Delete'> ";}
			if($row['flinksave']=='T'){$page_link.="<input type='button' id='btn_save' class='btn_input' onClick='save_data();' Value='Save'> ";}
			if($row['flinkview']=='T'){$page_link.="<input type='button' id='btn_view' class='btn_input' onClick='view_data();' Value='View'> ";}
			if($row['flinkcncl']=='T'){$page_link.="<input type='button' id='btn_cncl' class='btn_input' onClick='cncl_data();' Value='Cancel'> ";}
			if($row['flinkclrs']=='T'){$page_link.="<input type='button' id='btn_clrs' class='btn_input' onClick='clrs_data();' Value='Clear'> ";}
		}	
		echo json_encode(array("mesg"=>$resp_mesg, "stat"=>$resp_stat, "file"=>$resp_file,"titl"=>$page_titl,"rows"=>$grid_rows,"lnks"=>$page_link));		
	}
?>