<?php session_start();
include("db.php");
$name=$_SESSION['name_admin'];
$pagesize=15;
$url=$_SERVER["REQUEST_URI"];
$url=parse_url($url);
$url=$url[path];
$numq=mysql_query("SELECT * FROM `".$ad."hmcontent` WHERE `name` LIKE '{$name}' ORDER BY `id` DESC");
$num = mysql_num_rows($numq);
if($_GET[page]){
$pageval=$_GET[page];
$page=($pageval-1)*$pagesize;
$page.=',';
}
if($num > $pagesize){
 if($pageval<=1)$pageval=1;
 $allpage = @ceil($num / $pagesize);//总页数
$dao="<a href=$url?id={$name}&page=1>首页</a> <a href=$url?page=".($pageval-1).">上一页</a> <a href=$url?page=".($pageval+1).">下一页</a> <a href=$url?page=".($allpage).">末页</a> ";
}
if($_POST['pay']){
header("location:{$url}?id={$name}&page={$_POST['pay']}");
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>控制面版</title>
<link rel="stylesheet" type="text/css" href="../css/css.css" />
</head>
<?php include("top1.php");?>
<body>
<table width="970" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="226" rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="226" height="143" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="226" height="23" valign="top" bgcolor="#398A00"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
			   <tr>
                <td height="20" align="center" valign="middle" bgcolor="#E4FEE0" class="style70">欢迎<span class="style160"><?=$_SESSION['name_admin']?></span>进入管理后台</td>
              </tr>
              <tr>
                <td height="22" align="center" valign="middle" bgcolor="#E4FEE0" class="style70"><a href="admin_add.php" target="_blank">发布号码</a> | <a href="admin_index.php" target="_self">管理号码</a></td>
              </tr>
              <tr>
                <td height="20" align="center" valign="middle" bgcolor="#E4FEE0" class="style70"><a href="../sview.php?id=<?=$_SESSION['name_admin']?>" target="_blank">我的店铺</a> | <a href="admin_sview.php" target="_self">店铺设置</a></td>
              </tr>
              <tr>
                <td height="20" align="center" valign="middle" bgcolor="#E4FEE0" class="style70"><a href="admin_nane.php" target="_self">修改资料</a> | <a href="admin_password.php" target="_self">更改密码</a></td>
              </tr>
              <tr>
                <td height="20" align="center" valign="middle" bgcolor="#E4FEE0" class="style70"> <a href="../out.php" target="_self">退出登陆</a></td>
              </tr>
              <tr>
                <td height="18" align="center" valign="middle" bgcolor="#E4FEE0" class="style70"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="7"></td>
        </tr>
        <tr>
          <td height="90" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="226" height="90" valign="top"><a href="#" target="_blank"><img src="../ad/ad1.gif" width="226" height="90" border="0"></a></td>
              </tr>
                    </table></td>
        </tr>
        <tr>
          <td height="5"></td>
        </tr>
        <tr>
          <td height="245" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
              <!--DWLayoutTable-->
              <tr>
                <td height="25" colspan="3" align="left" valign="middle" bgcolor="#398A00" class="style112">&nbsp;移动业务</td>
                <td width="70" align="center" valign="middle" bgcolor="#398A00"><a href="#" target="_blank" class="style212">>>更多</a></td>
              </tr>
              <tr>
                <td width="72" height="55" align="center" valign="middle"><img src="../image/feige.jpg" width="43" height="43"></td>
                <td width="77" align="center" valign="middle"><img src="../image/tv.gif" width="43" height="43"></td>
                <td colspan="2" align="center" valign="middle"><img src="../image/pay.gif" width="43" height="43"></td>
              </tr>
              <tr>
                <td height="20" align="center" valign="middle" class="style102"><a href="http://www.gd.chinamobile.com/whatsnew/newrelease/communicate/fetion.shtml" target="_blank" class="style102">飞信业务</a></span></td>
                <td align="center" valign="middle" class="style102"><a href="http://www.gd.chinamobile.com/gz/operation/personal/01_3997.shtml" target="_blank" class="style102">手机电视</a></td>
                <td colspan="2" align="center" valign="middle" class="style102"><a href="http://www.gd.chinamobile.com/gz/operation/personal/01_5930.shtml" target="_blank" class="style102">手机支付</a></td>
              </tr>
              <tr>
                <td height="55" align="center" valign="middle"><img src="../image/chaogu.jpg" width="43" height="43"></td>
                <td align="center" valign="middle"><img src="../image/yinyue.jpg" width="43" height="43"></td>
                <td colspan="2" align="center" valign="middle"><img src="../image/baozhi.jpg" width="43" height="43"></td>
              </tr>
              <tr>
                <td height="20" align="center" valign="middle"><a href="http://www.gd.chinamobile.com/whatsnew/newrelease/business/ydzq.shtml" target="_blank" class="style102">手机炒股</a></td>
                <td align="center" valign="middle"><a href="http://www.gd.chinamobile.com/gotone/operation/130/02_384.shtml" target="_blank" class="style102">无线音乐</a></td>
                <td colspan="2" align="center" valign="middle"><a href="http://www.gd.chinamobile.com/whatsnew/newrelease/info/mpaper.shtml" target="_blank" class="style102">中国手机报</a></td>
              </tr>
              <tr>
                <td height="50" align="center" valign="middle"><img src="../image/g.gif" width="43" height="43"></td>
              <td align="center" valign="middle"><img src="../image/qxt.gif" width="43" height="43"></td>
              <td colspan="2" align="center" valign="middle"><a href="#" target="_blank"><img src="../image/gmcc_logo.gif" width="43" height="43" border="0"></a></td>
              </tr>
              <tr>
                <td height="20" align="center" valign="middle"><a href="http://www.gd.chinamobile.com/gz/operation/group/solution/list/recommendation/03_299.shtml" target="_blank" class="style102">集群网</a></td>
                <td align="center" valign="middle"><a href="http://www.gd.chinamobile.com/gz/operation/group/solution/list/recommendation/03_162.shtml" target="_blank" class="style102">企信通</a></td>
                <td colspan="2" align="center" valign="middle"><a href="http://www.chinamobile.com/" target="_blank" class="style102">网上营业厅</a></td>
              </tr>
              <tr>
                <td height="1"></td>
                <td></td>
                <td width="7"></td>
                <td></td>
              </tr>
                                                            </table></td>
        </tr>
        <tr>
          <td height="10"></td>
        </tr>
        <tr>
          <td height="50" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
              <!--DWLayoutTable-->
              <tr>
                <td width="226" height="25" align="left" valign="middle" bgcolor="#398A00" class="style112">&nbsp;实用工具箱</td>
              </tr>
              <tr>
                <td height="25" align="center" valign="middle"><iframe src="../my.html" width="100%" height="122px" frameborder="0" scrolling="no"></iframe></td>
              </tr>
                    </table></td>
        </tr>
        <tr>
          <td height="5"></td>
        </tr>
    </table></td>
    <td width="10" height="124">&nbsp;</td>
    <td width="734" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="734" height="20" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="734" height="20" align="left" valign="middle" bgcolor="#398A00" class="style312">&nbsp; <span class="style230">当前位置：</span><span class="style230">号码管理</span> <span class="style230">全部号码</span></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="20" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="734" height="20" align="left" valign="middle" bgcolor="#C9FB93" class="style70">&nbsp;&nbsp;<a href="admin_index.php" target="_self" class="style70">全部号码</a> <a href="admin_tuijian.php" target="_self" class="style70">推荐号码</a> </td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="84" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="734" height="51" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <!--DWLayoutTable-->
                    <tr>
                      <td width="734" height="50" align="left" valign="middle" class="style70"><table width="100%" height="51"  border="0">
                        <tr class="style70">
                          <td width="41" height="18"><div align="center">编号</div></td>
                          <td width="133"><div align="center">号码</div></td>
                          <td width="93"><div align="center">卡类</div></td>
                          <td width="99"><div align="center">所属地区</div></td>
                          <td width="36"><div align="center">话费</div></td>
                          <td width="36"><div align="center">价格</div></td>
                          <td width="47"><div align="center">推荐</div></td>
                          <td width="47"><div align="center">审核</div></td>
                          <td width="47"><div align="center">售出</div></td>
                          <td width="70"><div align="center">添加时间</div></td>
                          <td width="41"><div align="center">修&nbsp;改</div></td>
                        </tr><?php include("db.php");
$rgg=mysql_query("SELECT * FROM `".$ad."hmcontent` WHERE `name` LIKE '{$name}' ORDER BY `id` DESC LIMIT $page $pagesize"); 
while ($rwg=mysql_fetch_assoc($rgg)){ ?>
                        <tr bgcolor="#EFEFE7">
                          <td class="style312"><div align="center"><?=$rwg['id']?></div></td>
                          <td><div align="center" class="style712"><?=$rwg['haoma']?></div></td>
                          <td class="style312"><div align="center"><?=$rwg['kalei']?></div></td>
                          <td class="style312"><div align="center"><?=$rwg['shengfen']?><?=$rwg['chengshi']?></div></td>
                          <td class="style312"><div align="center">￥<?=$rwg['huafei']?></div></td>
                          <td class="style312"><div align="center">￥<?=$rwg['jiege']?></div></td>
                          <td class="style312"><div align="center"><?=$rwg['tuijian']?></div></td>
                          <td class="style312"><div align="center"><?=$rwg['sk']?></div></td>
                          <td class="style312"><div align="center"><?=$rwg['chushou']?></div></td>
                          <td class="style312"><div align="center"><?=$rwg['time']?></div></td>
                          <td class="style312"><div align="center"><a href="admin_edit.php?id=<?=$rwg['id']?>" target="_self">修改</a></div></td>
                        </tr><?php }?>
                      </table></td>
                    </tr>
                                </table></td>
              </tr>
              <tr>
                <td height="8"></td>
              </tr>
              <tr>
                <td height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <!--DWLayoutTable-->
                    <tr><form name="form1" method="post" action="">
                      <td width="734" height="25" align="center" valign="middle" class="style70"><?php 
if($_GET['page']!=0) {
if($_GET['page']<$allpage) {
echo "共有<span class='style160'>{$num}</span>条记录 每页{$pagesize}条记录 当前<span class='style160'>{$pageval}</span>/{$allpage}页 <a href=$url?id={$name}&page=1>首页</a> <a href=$url?id={$name}&page=".($pageval-1).">上一页</a> <a href=$url?id={$name}&page=".($pageval+1).">下一页</a> <a href=$url?id=杨公子&page=".($allpage).">末页</a> ";
}
else
echo "共有<span class='style160'>{$num}</span>条记录 每页{$pagesize}条记录 当前<span class='style160'>{$pageval}</span>/{$allpage}页 <a href=$url?id={$name}&page=1>首页</a> <a href=$url?id={$name}&page=".($pageval-1).">上一页</a> 下一页 <a href=$url?id={$name}&page=".($allpage).">末页</a> ";
}
else 
echo "共有<span class='style160'>{$num}</span>条记录 每页{$pagesize}条记录 当前<span class='style160'>{$pageval}</span>/{$allpage}页 <a href=$url?id={$name}&page=1>首页</a> 上一页 <a href=$url?id={$name}&page=".($pageval+1).">下一页</a> <a href=$url?id={$name}&page=".($allpage).">末页</a> ";
?>
转到<input name="pay" type="text" id="pay" size="3">页
<input name="Submit" type="submit" class="style1" value="跳转">   
          </form></td>
                    </tr>
                </table></td>
              </tr>
                              </table></td>
        </tr>
                                                        </table></td>
  </tr>
  <tr>
    <td height="436">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body><?php include("top3.php");?>
</html>
