<?php
include_once("inc/conn.php");
include_once("inc/function.php");
login_check();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>开宝箱-游戏中心-<?=$web_name;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<?=$web_keywords;?>" />
<meta name="description" content="<?=$web_description;?>" />
<META http-equiv=X-UA-Compatible content=IE=EmulateIE7>
<LINK href="style/default.css" type=text/css rel=stylesheet>
</head>
<?php include_once("top.php");?>
<script language="javascript">
qiehuan(2);
document.getElementById("qh_con2").getElementsByTagName('li')[8].className="current";
</script>
<DIV class="wrapper">
	<DIV class="page_content">
		<DIV class="webgame-info-title">
		  <UL>
			<LI><A href="box.php">开宝箱首页</A> </LI>
			<LI class="current"><A href="boxinsert.php">我的开宝箱记录</A></LI>
			<LI><A href="bbs/index.php">玩家交流</A></LI>
		  </UL>
		</DIV>
		<DIV class="webgame-info">
			<DIV class="webgame-info-tabs">
			  <table width="940" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#A05B16">
                  <tr>
                    <td width="200" height="28" align="center" background="images/game-kbx-bj.jpg" bgcolor="#FAE0A4" class="font-red2">开箱时间</td>
                    <td width="200" align="center" background="images/game-kbx-bj.jpg" bgcolor="#FAE0A4" class="font-red2">宝箱</td>
                    <td width="200" align="center" background="images/game-kbx-bj.jpg" bgcolor="#FAE0A4" class="font-red2">扣除经验值</td>
                    <td align="center" background="images/game-kbx-bj.jpg" bgcolor="#FAE0A4" class="font-red2">获得奖品</td>
                  </tr>
                  <?
			  	$boxtype=array("1"=>"黄金宝箱","2"=>"白银宝箱","3"=>"青铜宝箱");
			 	$intpage = 30;
				if (isset($_GET['page'])){
					$rsnum = (intval($_GET['page']) -1)*$intpage;
				}else{
					$rsnum = 0;
				}
				$sql="select * from {$web_dbtop}gamebox_log where uid=".intval($_COOKIE["usersid"])." Order by id desc";
				$query=$query=$db->query($sql);
				if($db->fetch_array($query))
					$intnum=$db->num_rows($query);
				$query=$query=$db->query($sql." limit $rsnum,$intpage");
					while($rs=$db->fetch_array($query)){
			  ?>
                  <tr>
                    <td height="32" align="center" bgcolor="#FFFFFF"><?=$rs["time"]?></td>
                    <td align="center" bgcolor="#FFFFFF"><?=$boxtype[$rs["boxtype"]]?></td>
                    <td align="center" bgcolor="#FFFFFF"><?=$rs["kjy"]?>
                      经验值</td>
                    <td align="center" bgcolor="#FFFFFF"><?=$rs["hjpp"]?>
                      <?=$web_moneyname?></td>
                  </tr>
                  <?
			  }
			  ?>
                </table>
				<table width="940" border="0" align="center" cellpadding="2" cellspacing="4">
                  <tr>
                    <td align="center"><?php
		  include_once("inc/page_class.php");
		  $page=new page(array('total'=>$intnum,'perpage'=>$intpage));
		  echo $page->show(5,"","");?></td>
                  </tr>
                </table>
			</DIV>
		  <DIV class=cl></DIV>
		</DIV>
		<DIV class="area960-b h5px"></DIV>
	<!--Flink End-->
	<div class="blank10"></div>
	<!--Footer Start-->
<?php include_once("footer.php");?>
</DIV>