<?php
$_GET['id']*=1;
//===========================================
if($_GET['delid']*1>0)
{
	$db->query("delete  from  ".BUYQPRO." where id='$_GET[delid]' and buy_id='$_GET[id]'");
}

$sql="select  a.*,b.user ,b.email,b.tel,b.name,b.userid
	from  ".BUYQPRO." a left join ".ALLUSER." b 
	on b.userid=a.seller_id where a.buy_id='$_GET[id]'";
//-----------------
include_once("$config[webroot]/includes/page_utf_class.php");
$pages = new Page();
$pages->listRows=10;
if (!$pages->__get('totalRows')){
	$db->query($sql);
	$pages->totalRows =$db->num_rows();
}
$sql.= "  limit ".$pages->firstRow.",10";
//-----------------
$pages=$pages->prompt();
$db->query($sql);
$re=$db->getRows();
foreach($re as $key=>$v)
{
	$re[$key]['con']=unserialize($v['con']);
}

//============================================

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo lang_show('quotation_list');?> <?php echo $config['company'];?>- Powered by B2Bbuilder</title>
<meta name="description" content="<?php echo $config['description'];?>" />
<meta name="keywords" content="<?php echo $config['keyword'];?>" />
<script src="<?php echo $config['weburl'];?>/script/jquery-1.4.4.min.js" type=text/javascript></script>
<script type="text/javascript" src="<?php echo $config['weburl'];?>/script/artdialog/artDialog.source.js?skin=default"></script>
<script type="text/javascript" src="<?php echo $config['weburl'];?>/script/artdialog/plugins/iframeTools.source.js"></script>
<link href="<?php echo $config['weburl'];?>/templates/default/page.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#E9E9E9">
    <tr height="22">
      <th ><?php echo lang_show('quote_content');?></th>
      <th  width="50"><?php echo lang_show('operation');?></th>
    </tr>
    <?php foreach($re as $list){?>
    <tr class="showmsg">
      <td bgcolor="#FFFFFF" class="user">
	  <table align="center" width="100%">
	  	<tr>
			<td height="30" colspan="5" bgcolor="#F7F7F7">
				<?php echo lang_show('quote_p');?><span><a target="_blank" href="../shop.php?uid=<?php echo $list['userid'];?>"><?php echo $list['name'];?></a></span>　
				<?php echo lang_show('tell');?><span><?php echo $list['tel'];?> <?php echo $list['mobile'];?></span>  
				<?php echo lang_show('e_mail');?><span><?php echo $list['email'];?></span>
			</td>
	  	</tr>
          <tr>
            <th align="left" width="200"><?php echo lang_show('buy_pro');?></th>
            <th align="left" width="100"><?php echo lang_show('purchase_num');?></th>
            <th align="left" width="50"><?php echo lang_show('p_unit');?></th>
            <th align="left" width="100"><?php echo lang_show('target_price');?></th>
            <th align="left" width="100"><?php echo lang_show('member_quote');?></th>
          </tr>
          <?php foreach($list['con'] as $list1){?>
          <tr>
            <td style="border-top:dashed 1px #CCCCCC"><?php echo $list1[0];?></td>
            <td style="border-top:dashed 1px #CCCCCC"><?php echo $list1[1];?></td>
            <td style="border-top:dashed 1px #CCCCCC"><?php echo $list1[2];?></td>
            <td style="border-top:dashed 1px #CCCCCC"><?php echo $list1[3];?></td>
            <td style="border-top:dashed 1px #CCCCCC"><?php echo $list1[4];?></td>
          </tr>
          <?php } ?>
        </table>
	  </td>
      <td align="center" bgcolor="#FFFFFF"><a href="<?php echo $config['weburl'];?>/?m=buy&s=admin_qprice&delid=<?php echo $list['id'];?>&id=<?php echo $_GET['id'];?>"><?php echo lang_show('del');?></a> </td>
    </tr>
    <?php }?>
  </table>
  <div class="page"><?php echo $pages;?></div>
</body>
</html>
<?php die; ?>