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


Current Path : /proc/thread-self/root/var/www/html/gach/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/gach/src/getsearchcondition.php

<?php
// used in grid display conditions
function getsearchcondition($cond,$val)
{
	switch($cond)
		{
		case 'eq':
		$cond="="; 
		$value="'".$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		case 'ne':
		$cond="!="; 
		$value="'".$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		case 'lt':
		$cond="<"; 
		$value="'".$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		case 'le':
		$cond="<="; 
		$value="'".$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		case 'gt':
		$cond=">"; 
		$value="'".$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		case 'ge':
		$cond=">="; 
		$value="'".$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		case 'cn':
		$cond="like '%"; 
		$value=$val."%'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		
		case 'bw':
		$cond="like '"; 
		$value=trim($val)."%'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		
		case 'ew':
		$cond="like '%"; 
		$value=$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
	}
}
?>