<?php
require_once("../check.php");
require_once("../../config.php");

$m="10";//每页显示的记录数
isset($_GET['page'])?$page=$_GET['page']:$page="1";//当前页数
$numsql = "select * from dunling_guzhuzhichu_log where username='$username' order by datetime desc";
$numery = mysql_query($numsql,$config);
$zongjilushu = mysql_num_rows($numery);//总记录数
$zy = (int)(($zongjilushu-1)/$m)+1;//总页数
$one = (int)($page-1)*$m;//当前页的首条记录
$articlesql = "select * from dunling_guzhuzhichu_log where username='$username' order by datetime desc limit $one,$m";
$articleery = mysql_query($articlesql,$config);
?>
<!DOCTYPE HTML>
<html>
<head>
<title>雇主支出明细</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="../js/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="../style/template.css" />
</head>
<body>
<div id="table">
<div class="W200"><strong>任务编号</strong></div>
<div class="W200"><strong>支出类型</strong></div>
<div class="W200"><strong>支出金额</strong></div>
<div class="W200"><strong>支出时间</strong></div>
</div>
<?php
ini_set("date.timezone","PRC");
while($list = mysql_fetch_array($articleery)){
$danhao = $list['danhao'];
$lx = $list['lx'];
$jinbi = $list['danjia'];
$datetime = date("Y-m-d H:i:s | D",$list['datetime']);
?>
<div id="table">
<div class="W200"><?php echo $danhao;?></div>
<div class="W200"><?php echo $lx;?></div>
<div class="W200"><?php echo $jinbi;?>(金币)</div>
<div class="W200"><?php echo $datetime;?></div>
</div>
<?php
}
?>
<?php require_once("page.php");?>
</body>
</html>