Stock List
'".date("Y-m-d" ,strtotime("-30 day"))."') OR show_uae = '1') "; if($_REQUEST['carmaker']) $nSQL .= " AND carmaker = '".$_REQUEST['carmaker']."'" ; if($_REQUEST['carname']) $nSQL .= " AND carname = '".$_REQUEST['carname']."'" ; if($_REQUEST['nensikiy1']) $nSQL .= " AND nensikiy = '".$_REQUEST['nensikiy1']."'" ; if($_REQUEST['cartype']) $nSQL .= " AND bodytype IN (".$_REQUEST['cartype'].")"; if($_REQUEST['price'] == 1) $nSQL .= " AND estsale > 1000 AND estsale <= 1000000" ; elseif($_REQUEST['price'] == 2) $nSQL .= " AND estsale > 1000000 AND estsale <= 1500000" ; elseif($_REQUEST['price'] == 3) $nSQL .= " AND estsale > 1500000 AND estsale <= 2000000" ; elseif($_REQUEST['price'] == 4) $nSQL .= " AND estsale > 3000000 AND estsale <= 3000000" ; elseif($_REQUEST['price'] == 5) $nSQL .= " AND estsale > 3000000 AND estsale <= 5000000" ; elseif($_REQUEST['price'] == 6) $nSQL .= " AND estsale > 5000000 " ; if(count($_REQUEST['sel_rec'])) $nSQL .= " AND carid IN (".implode(",",$_REQUEST['sel_rec']).")"; if($sort1 == 'price') $sort1 = " coalesce(estsale , 0 ) "; if($sort1 == 'status') $sort1 = " ivshipdate, coalesce(estsale , 0 ) "; if($sort2 == 'price') $sort2 = " coalesce(estsale , 0 ) "; if($sort2 == 'status') $sort2 = " ivshipdate, coalesce(estsale , 0 ) "; $nSQL .= " ORDER by $sort1 , $sort2 " ; $result = pg_query($db,$nSQL) or die(pg_last_error()); $icc = 0; while ( $line = pg_fetch_array($result, null, PGSQL_ASSOC)) { if($line['acsolddate']) $status = "Sold"; elseif($line['ivarrivedate'] < date("Y-m-d")) $status = "In Stock"; elseif($line['ivshipdate'] && $line['ivshipdate'] < date("Y-m-d")) $status = "On Board"; else $status = "Ready For Shipment"; $direct = CryptMsg($line['rno'] . ":-1" ,"2ulf1q@r"); $url = $line[carmaker]."-".$line[carname]."_".$line[color]."-Color_". $SHORT_MONTH[$line['nensikim']]."-".$line[nensikiy]."_".$fuellist[$line[carfuel]]."_".$line[carcc]."CC_Points-".$line[hyouka]; if($listview == '2' || $listview == '3') { echo ""; if($listview == '2') { echo ""; } echo ""; echo ""; echo ""; echo "\n"; } else { echo '
'; echo '
'. $line[carmaker] .'
'.$line[carname] ."" . '
'; echo '
'; //$SHORT_MONTH[$line['nensikim']] echo "".showPreview($line[carid],$line['manualphoto'])."
"; echo '
'.$line[katasiki].( $show_chassis?"-".$line['chassis']:"") ."
".$line[nensikiy] ." ".$line['transmission'] . " " .$line[carcc]."-". $line[carfuel] . "
 " ; print "".$status . " "; if($status == "On Board" && $line['ivshipname']) echo "".date("M d Y" ,strtotime($line['ivarrivedate'])) .""; //if($line[estsale]) // echo " PKR ".number_format($line[estsale])." "; //elseif($line[pkr_price]) // echo " PKR ".number_format($line[pkr_price])." "; if($line[acsolddate]) print "
"; echo '
Make Offer'; echo "
"; echo '
'; echo '
'; } $icc++; } if($listview == '2' || $listview == '3') { ?>
Picture Stock No Vehicle Details Price
"; echo "".showPreview($line[carid],$line['manualphoto']).""; echo " ".$line['place1']."-".$line['rno']." ". "" . substr($line[carmaker],0,10)." , ".substr($line[carname],0,14).", ".substr($line[katasiki],0,10).( $show_chassis?"-".$line['chassis']:"").", ".$line[nensikiy]."-". $SHORT_MONTH[$line['nensikim']]."
"; echo "".substr($line[color],0,10).", ".substr($line[carmodel],0,12).", ".$line['transmission'] .", ".$line[carcc].", ".$line[carfuel] . "
"; if($status == "On Board" && $line['ivshipname']) echo "" . $line['ivshipname'].", ". date("M d Y" ,strtotime($line['ivshipdate'])) .", ".date("M d Y" ,strtotime($line['ivarrivedate'])); echo "
"; // if($line[estsale]) // echo " PKR ".number_format($line[estsale])." "; //elseif($line[pkr_price]) // echo " PKR ".number_format($line[pkr_price])." "; echo "
".$status .""; echo "