Current Path : /home/c247essa/public_html/

Linux c22487.sgvps.net 3.12.18-clouder0 #1 SMP Tue Oct 9 18:14:47 EEST 2018 x86_64

Upload File :
Current File : /home/c247essa/public_html/checkorder_no2.php
<?php
include 'backend.php';
foreach($_GET as $key => $value) {
	$get[$key] = filter($value);
}
$the_order_id = mysql_real_escape_string($get['orderNo']);

if(isset($get['cmd']) && $get['cmd'] == 'check') {

if(empty($the_order_id) && strlen($the_order_id) <=6) {
echo "Enter at least 6 digits";
exit();
}
$availability = mysql_query("select * from orders where order_no='$the_order_id' AND assigned_to='$_SESSION[id]' AND status <>'Av'") or die(mysql_error());

$rows_availability = mysql_fetch_array($availability);
$total = mysql_num_rows($availability);

$availability2 = mysql_query("select * from orders where order_no='$the_order_id' AND status = 'Av' AND assigned_to='0'") or die(mysql_error());

$rows_availability2 = mysql_fetch_array($availability2);
$total2 = mysql_num_rows($availability2);

if ($total > 0 ){			 
$the_status= $rows_availability['status'] ;
						
			 if($the_status=='Edt')
			 {
			 $o_status='Editing';
			 }
			 if($the_status=='Paid')
			 {
			 $o_status='Paid';
			 }
			 if($the_status=='Cf')
			 {
			 $o_status='Confirmed';
			 }
			 if($the_status=='Rv')
			 {
			 $o_status='Revision';
			 }
			 if($the_status=='Fd')
			 {
			 $o_status='Completed';
			 }
			 if($the_status=='Rmv')
			 {
			 $o_status='Removed';
			 }
			 if($the_status=='Apv')
			 {
			 $o_status='Approved';
			 }
			 if($the_status=='Ds')
			 {
			 $o_status='Dispute';
			 }
			 if($the_status=='Rj')
			 {
			 $o_status='Rejected';
			 }
			 if($the_status=='UnAp')
			 {
			 $o_status='Un-Approved';
			 }
			 if($the_status=='Cr')
			 {
			 $o_status='Assigned but Unconfirmed';
			 }
		
	echo "This order is assigned to you and is in ".$o_status. " list";
	} 
	if ($total2 > 0 ){
	echo " This order is in Available list";
	}
	/*
	if ($total < 0  && $total2 < 0){
	echo " This order is not Available.";
	} */
	exit();
	
}
?>