<?
	include("connect.php");
	include_once("admin.config.inc.php");
	include("security.php");
	include("config_setting.php");
	$type1 = "1";
	$type3 = "3";
	include("pagepermission.php");

$PRODUCTSPERPAGE = 15; 

if(!$_GET['pgno'])
{
	$PageNo = 1;
}
else
{
	$PageNo = $_GET['pgno'];
}

$StartRow =   $PRODUCTSPERPAGE * ($PageNo-1);

$query = "select * from auc_show aus left join auction a on aus.bid_id=a.auctionID left join  products p on a.productID=p.productID where aus.is_audit=0 order by id desc";

	$result=mysql_query($query) or die (mysql_error());
	$totalrows=mysql_num_rows($result);
	$totalpages=ceil($totalrows/$PRODUCTSPERPAGE);
	$query .= " LIMIT $StartRow,$PRODUCTSPERPAGE";
	$result =mysql_query($query);
	$total = mysql_num_rows($result);
	
?>
<!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=<?=$lng_characset;?>" />
<title></title>
<link rel="stylesheet" href="main.css" type="text/css">
</head>

<body bgcolor="#ffffff" style="padding-left:10px">
<table width="100%" cellPadding="0" cellSpacing="10">
  <!--DWLayoutTable-->
  <TR> 
    <TD class="H1">成功晒单</TD>
  </TR>
  <TR>
    <TD background="images/vdots.gif"><IMG height=1 src="images/spacer.gif" width=1 ></TD>  </TR>
  <TR>
    <TD><!--content-->
	    <TABLE cellSpacing="2" cellPadding="2" width="100%" >
    	 <TBODY>
           
		  <tr>
		  	<td colspan="2">&nbsp;</td>
		  </tr>
		 
	    </TBODY>
	   </TABLE>
<?
	if($total<=0)
	{
?>
	<table width="70%" border="0" cellspacing="1" cellpadding="1" align="center" bgcolor="#000000">
      <tr> 
        <td> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
           <tr> 
             <td class=th-a> 
              <div align="center">没有晒单</div>
             </td>
           </tr>
         </table>
        </td>
      </tr>
    </table>
<?
	}
	else
	{
?>
	<table cellpadding="0" cellspacing="0" width="100%" border="0">
	  <tr>
		<td>
		<form id="form2" name="form2" action="" method="post">  
          <table width="100%"  cellSpacing="0" class="t-a" border="1">
           <tbody>
		    <TR class="th-a"> 
			  <td width="6%">序号</td>
			  <td width="6%">拍卖号</td>
  			  <td width="22%">商品名称</td>
			  <td width="15%">最终价格</td>
			  <td width="15%">获得拍币</td>
			  <td width="11%">获胜者</td>
			   <td width="11%">操作</td>


		    </TR>
			<?
			  for($i=0;$i<$total;$i++)
			  {

				 if($PageNo>1)
				 {
					$srno = ($PageNo-1)*$PRODUCTSPERPAGE+$i+1;
				 }
				 else
				 {
					$srno = $i+1;
				 }

				$row = mysql_fetch_object($result);
				$id=$row->auctionID;
				$pname=stripslashes($row->name);
				$winner = $row->username;
				$cellColor = "";
				$cellColor = ConfigcellColor($i);
				?>
		  	<tr class="<?=$cellColor?>">
			  <td align="center"><?=$srno;?></td>	
			  <td align="center"><?=$id;?></td>
			  <td align="center"><?=$pname?></td>
			  <td align="center"><?=$row->auc_final_price?></td>
			  <td align="center"><?=$row->money?></td>
			  <td align="center"><?=$winner==""?"&nbsp":$winner;?></td>
			  <td align="center"><a href='auditshow.php?aid=<?=$row->id?>'>详情</a></td>
			  
			</tr>
			 <?
			 }
			 ?>
			</tbody>
		</table>
	</form>
</td>
</tr>
</table>
<?
}
?>
	  <?php
		if($PageNo>1)
		{
                  $PrevPageNo = $PageNo-1;

	    ?>
	  <A class="paging" href="manageauction.php?order=<? echo $order ?>&pgno=<?php echo $PrevPageNo; ?>&aucstatus=<?=$ast;?>">&lt; 上一页</A>
	  <?
	   }
	  ?> &nbsp;&nbsp;&nbsp;
	  <?php
        if($PageNo<$totalpages)
        {
         $NextPageNo = 	$PageNo + 1;
      ?>
	  <A class="paging" href="manageauction.php?order=<? echo $order ?>&pgno=<?php echo $NextPageNo;?>&aucstatus=<?=$ast;?>">下一页 &gt;</A>
	  <?
       }
      ?>
</TD>
</TR>
</table>
</body>
</html>
