<?
	include("connect.php");
	include("security.php");
	
	if($_POST["ok"]!="")
	{   
		$aid= $_REQUEST["aid"];
		$qryw = "update auc_show   set is_audit=1 where id=".$aid;
		mysql_query($qryw) or die(mysql_error());
		
   header("location: message.php?msg=84");
			exit;		
	}
	elseif($_POST["refues"]!=""){
		$aid= $_REQUEST["aid"];
		$qryw = "update auc_show   set is_audit=2 where id=".$aid;
		mysql_query($qryw) or die(mysql_error());
		header("location: message.php?msg=85");
			exit;
	}
    $asid  = $_REQUEST["aid"];
	$qrysel = "select *,aus.id as aid  from auc_show aus left join auction a on aus.bid_id=a.auctionID  left join products p on a.productID=p.productID left join registration r on r.id=aus.member_id  where aus.id=$asid";
	$ressel = mysql_query($qrysel);
	//$total = mysql_num_rows($ressel);
	$obj = mysql_fetch_object($ressel);
?>

<!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>
<title>审核晒单，获得奖励</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$lng_characset;?>" />

<link rel="stylesheet" href="main.css" type="text/css">
</head>
<body bgcolor="#ffffff" style="padding-left:10px">


<TABLE cellSpacing=10 cellPadding=0  border=0 width="650">
		<TR>
			<TD class="H1">审核晒单</TD>
		</TR>
		<TR>
			<TD background="images/vdots.gif"><IMG height=1 
			  src="images/spacer.gif" width=1 border=0></TD>
		</TR>
	<? if($msg){ ?>
		<tr>
			<td bgcolor="#F1F0EF" style='color:#FF0000;' align="center"><?=$msg?></td>
		</tr>
	<? } ?>
<tr><td>
<!-- changeble part starts -->
<form name="f1"  enctype="multipart/form-data"  action="" method="post">
<TABLE cellSpacing=2 cellPadding=1 width="650" border=0>
   <TBODY>
     <TR> 
        <TD class=th-d colSpan=3>项目详情</TD>
     </TR>
     <TR> 
       <TD width="182" align=right><IMG height=5 src="images/spacer.gif" width=1 border=0></TD>
       <TD width="458"> </TD>
     </TR>
   	<tr>
					<td  class="td1">项目：</td>
					<td><?=stripslashes($obj->name);?></td>
				</tr>
				<tr>
					<td class="td1">成交价格：</td>
					<td><?=$obj->auc_final_price;?></td>
				</tr>
				<tr>
					<td  class="td1">市场价：</td>
					<td><?=$obj->price;?></td>
				</tr>
				<tr>
					<td class="td1">折扣：</td>
					<td><?=($obj->price-$obj->auc_final_price)/$obj->price;?></td>
				</tr>
				<tr>
					<td class="td1">结束时间：</td>
					<td><?=date("Y-m-d H:i:s",$obj->auc_final_end_date);?></td>
				</tr>
<TR> 
        <TD class=th-d colSpan=3>申请内容</TD>
     </TR>

				<tr>
					<td >申请人 :</td>
					<td  align=left> <?=stripslashes($obj->username);?></td>
				</tr>
				<tr>
					<td >标题 :</td>
					<td  align=left> <?=stripslashes($obj->title);?></td>
				</tr>
				<tr>
					<td >内容 :</td>
					<td align=left><?=stripslashes($obj->detail);?></td>
				</tr>
				<tr>
					<td >图片 :</td>
					<td align=left></td>
				</tr>
<?
     $qry = "select *  from show_photo where show_id=".$obj->aid;
	// echo $qry;
	$res = mysql_query($qry);
	$total1 = mysql_num_rows($res);
	 for($i=0;$i<$total1;$i++)
			  {
				  $row = mysql_fetch_object($res);
?>
          <tr>
					<td ></td>
					<td align=left><img src="../<?=$row->detail_img;?>" /></td>
				</tr>
	<? }?>
	 
	<tr>
	 <td>&nbsp;</td><td>&nbsp;</td>
	</tr>
	<TR> 
     <TD align=right>&nbsp;</TD>
     <TD>
	 <INPUT type="hidden" value="<?=$obj->aid;?>" name="aid">
	 <INPUT type="submit" value="通过" name="ok" class="bttn">
	 <INPUT type="submit" value="拒绝" name="refues" class="bttn">
	 </TD>
    </TR>
   </TBODY>
  </TABLE>
</form></td></tr></TABLE>

	
		</form>

	
</div>




</body>
</html>
