<?php
session_start();
?>
<?php
include ('dbf.php');
include_once ('number_func.php');
if($_GET['qc2'])
{
$ozvename=$_GET['q22'];
$val1=$_SESSION[val];
$txt1=$_SESSION[txt];
if($ozvename)
{
$query="SELECT * FROM $_SESSION[tblna] WHERE  ($txt1 like'%$ozvename%') ";
$result=mysql_query($query)or die(mysql_error());

?>
<select  id="<?php echo $_SESSION[inp]; ?>" lang="<?php echo $_SESSION[idinp]; ?>"   onblur="trans1(this.lang,this.value);" class='drop'>
<option value="">انتخاب فرمایید</option>
<?php while($row=mysql_fetch_array($result)) { ?>
<option value=<?=$row[$val1]?>><?=$row[$txt1]?></option>
<?php }
echo"</select>";
}
}
if($_GET['qc3'])
{
  echo $_GET['qc3'];

  //echo"<img src='images/Search1[1].gif'  width='17' height='17' lang=$_SESSION[inp]  onclick='ajaxcode(this.lang,\"custom\",\"id\",\"name\",\"كد مشتري:\")'>";
}
if($_GET['qc4'])
{
  $txt1=$_SESSION[txt];
	 $q=mysql_query("select * from $_SESSION[tblna] where $_SESSION[val]='{$_GET[qc4]}' ");
	  $n=mysql_fetch_array($q);
     echo '&nbsp<span class="blacktext">'.$n[$txt1].'</span>';
}
if($_GET['qshow'])
{
  //echo $_GET['qshow'];
  if($_GET['tbl']=='driver')
  {
     $f1=mysql_query("select  * from driver  where  code='{$_GET[qshow]}'  ");
     $rv1=mysql_fetch_array($f1);
     if($_SESSION[typ]=='up')
     {
       $f2=mysql_query("select  * from amaliat  where  id='{$_SESSION[pe]}'  ");
       $rv2=mysql_fetch_array($f2);
	 }
 if(($_SESSION[mainpage]=='amaliat.php') && (($_SESSION[typ]=='ins') || (($_SESSION[typ]=='up') && ($rv2[drivid]!=$_GET[qshow])) ) )
     {
      if($rv1[kind]=='1')
        $t='1';
      else
        $t='0';
     }
     else
        $t='1';

     echo '<span style="color:red">'.$rv1[name].'  '.$rv1[car_name].'</span>#'.$t;
  }
  elseif($_GET['tbl']=='costom_pas')
  {
    $q=mysql_query("select * from $_GET[tbl] where $_GET[fild]='{$_GET[qshow]}' ");
    $rv1=mysql_fetch_array($q);
    $tel='';
	if($rv1[tell]!='')
     $tel.=$rv1[tell];
    if($rv1[tell1]!='')
     $tel.='-'.$rv1[tell1];
    if($rv1[tell2]!='')
     $tel.='-'.$rv1[tell2];
    echo '<span style="color:red">'.$rv1[name].'  '.$tel.'  '.$rv1[adress].'</span>#1';
  }
  elseif($_GET['tbl']=='nerkh')
  {
    $q=mysql_query("select * from $_GET[tbl] where $_GET[fild]='{$_GET[qshow]}' ");
    $rv1=mysql_fetch_array($q);
    if(mysql_num_rows($q)=='1')
      $t='1';
    else
      $t='0';
    echo '<span style="color:red">'.$rv1[maghsad].'</span>#'.$t;
  }


}

?>







