<?php
if($_SESSION[id]!="")
{
$valu=split(",",$_SESSION[prm]);
 if(($valu['0']=='') && ($valu['1']!=''))
   $id=$valu['1'];
 elseif(($valu['0']!='')&&($valu['1']=='')  )
   $id=$valu['0'];
 elseif(($valu['0']!='')&&($valu['1']!='')  )
   $id=$valu['1'];
$q=mysql_query("select * from `amanat` where id_ozv='{$id}' ");
$qr=mysql_fetch_array($q);
include_once('search.class.php');
$search = new search;
$_SESSION[tbl]='amanat';
$_SESSION[mainpage]='listmemberpage.php';
$_SESSION[key]='id';
$_SESSION[width]='90%';
$_SESSION[wher]=" and id_ozv='{$id}' ";
$_SESSION[fieldsu]= array("شماره عضویت" => "id_ozv","نام عضو" => "lname_ozv","شماره ثبت کتاب" => "id_b","نام کتاب" => "name_b",
"تاریخ رفت" => "date_out","تاریخ برگشت" => "date_in",);
$_SESSION[arf]=array("شماره عضویت","نام عضو","شماره ثبت کتاب","نام کتاب","تاریخ رفت","تاریخ برگشت");
$_SESSION[arv]=array("id_ozv","lname_ozv","id_b","name_b","date_out","date_in");
$_SESSION[head]=$qr[lname_ozv].' '.$qr[fname_ozv].' مشاهده اطلاعات ';
echo $search->grid($_SESSION[width],$_SESSION[bordercolor],$_SESSION[head],$_SESSION[selpage],$_SESSION[tbl],$_SESSION[fieldshow],$_SESSION[key],$_SESSION[tbl2],$_SESSION[backheader],$row,$_SESSION[bgcolor],$_SESSION[bgcolor1],$_SESSION[fieldsu]);
}
else
include('index.php');
?>
