<?php 
include '../comm/conn.php';
include '../comm/checkpostandget.php';
include 'check.php';
include '../comm/config.php';

$page = !($_GET['page'])?'1':intval($_GET['page']);
$page2=($page-1)*10;
$num1=10;

$link = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$link) {
	die('数据库链接出错: ' . mysql_error());
	exit;
}
else
{
	mysql_query("set names gbk");
	
	$sql="select * from tixian where ddusername='".$username."'";
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	$num = mysql_num_rows($rs);	
	
	$sql="select * from tixian where ddusername='".$username."'  order by id desc limit $page2,$num1";
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	//$num = mysql_num_rows($rs);	
	//echo $sql;
	
}
?><!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=gb2312" />
<title>提现管理 - <?php echo $usercenter;?> - <?php echo $webtitle;?></title>
<link href="../images/style1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
.STYLE2 {
	color: #555555;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
.STYLE3 {color: #FF3300}
-->
</style>
</head>

<body topmargin="0" leftmargin="0">
<?php
include("../comm/header.php");
?>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="282" valign="top"><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2">
          <table cellspacing="0" width="100%" height="248" style="border:1px  solid #DCEAF7;">
            <tr>
              <td width="83%" height="30" align="left" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;&nbsp;<img src="../images/arrow.gif" width="16" height="22" align="absmiddle" /> 提现管理 [ <a href="tixian.php"><span class="bigtext STYLE3">我要提现</span></a> ] </strong></td>
              <td width="17%" height="30" align="right" bgcolor="E9F2FB" class="bigtext">共有 <b><?php echo $num;?></b> 条提现记录&nbsp;&nbsp;</td>
            </tr>
            <tr>
              <td height="216" colspan="2" valign="top"><table width="100%" style="border:1px  solid #64A4E2;" cellpadding="0">
			  <tr><td width="248" height=30 align=left bgcolor="#CEFC8F" class="bigtext">&nbsp;<strong>提现时间</strong></td>
			  <td width="187" bgcolor="#CEFC8F" class="bigtext"><strong>&nbsp;提现金额</strong></td>			  
			  <td width="300" bgcolor="#CEFC8F" class="bigtext"><strong>&nbsp;支付宝帐号</strong></td>
			  <td width="221" bgcolor="#CEFC8F" class="bigtext"><strong>&nbsp;提现状态</strong></td>
			  </tr>
    <?php
	while ($row = mysql_fetch_array($rs)){
	 $st="<font color=#ff3300>提现中</font>";
	 if($row[txstate]==0)
	 	{ $st= "<font color=#0066CC>提现中</font>";}
	 else if($row[txstate]==1)
	 	{$st= "<font color=#009900>提现成功</font>";}
	 else
	 {$st= "<font color=#ff3300>提现失败</font>";}
		echo "<tr><td height=30 align=left class=bigtext bgcolor=#F5F5F5>&nbsp;".$row[addtime]."</td><td class=bigtext bgcolor=#F5F5F5>&nbsp;".$row[txje]." 元</td><td class=bigtext bgcolor=#F5F5F5>&nbsp;".$row[zfb]."</td><td class=bigtext bgcolor=#F5F5F5>&nbsp;".$st."</td></tr>";
	}
	?>
                <tr>
                  <td height="30" colspan="4"><div id="pages"><?php  
require_once("../comm/pages.php");    
  $page_size=10;    
  $nums=$num;     
  $sub_pages=10;   
  $pageCurrent=$_GET["page"];     
     
  $subPages=new SubPages($page_size,$nums,$pageCurrent,$sub_pages,"tixianlist.php?page=",2);
?></div></td>
                </tr>
              </table>              </td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
<?php
include("../comm/footer.php");
?>
</body>
</html>
<?php mysql_close($link);?>