<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($brcode)<=0)
{
 print "<script> alert('Invalid Login') </script>";
 return;
}
include("../opendb.php");

$service=$_GET['key'];

$re=mysqli_query($db,"select * from scert where brcode='$brcode' and model like '$service%' order by model asc limit 10");

$json="";
while($row=mysqli_fetch_array($re))
{
   
	 $json.= '{"service":"'.$row[0].'","servamt":"'.addslashes($row[1]).'","servdesc":"'.addslashes($row[5]).'","supqty":"'.addslashes($row[6]).'","mrgnprc":"'.addslashes($row['7']).'","custstt":"'.addslashes($row[8]).'","shipin":"'.addslashes($row['15']).'","shidist":"'.addslashes($row['18']).'","vehconf":"'.addslashes($row['27']).'","grswgt":"'.addslashes($row['16']).'","noseat":"'.addslashes($row['8']).'","fronttyr":"'.addslashes($row['9']).'","reartyr":"'.addslashes($row['10']).'","vehcat":"'.addslashes($row['1']).'","fraxle":"'.addslashes($row['11']).'","reaxle":"'.addslashes($row['12']).'","anyaxle":"'.addslashes($row['13']).'","tanaxle":"'.addslashes($row['14']).'","bdtyp":"'.addslashes($row['17']).'","mkrnm":"'.addslashes($row['2']).'","cylind":"'.addslashes($row['7']).'","unweight":"'.addslashes($row['28']).'"},';
}
echo '['.trim($json,',').']';
?>