<?php 
include("admin.php");
$rst=mysql_query("SELECT * FROM `".$ad."sjadmin` WHERE `name` LIKE '{$_SESSION['name']}'");
$rwt=mysql_fetch_assoc($rst);
if($_POST['pay']){
header("location:lanad_show.php?page={$_POST['pay']}");
}
?>
<html>
<head>
<title>欢迎光临手机靓号发布管理系统-管理面版</title>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type">
<meta name="description" content="欢迎光临手机靓号发布管理系统">
<meta name="keywords" content="欢迎光临手机靓号发布管理系统">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style12 { font-size: 12px;color: #FF0000; }
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="30" background="images/Mypic_top15.gif"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><img src="images/Mypic_top14.gif" width="14" height="14" align="absmiddle"> 
            欢迎光临手机靓号发布管理系统</td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellspacing="4" cellpadding="0">
        <tr> 
          <td> <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9FD74E">
              <tr> 
                <td height="26" background="images/Mypic_top12.gif"> <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td><img src="images/Mypic_top13.gif" width="18" height="9" align="absmiddle"> 
                        查看推荐店铺</td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="4" cellpadding="0">
                    <tr> 
                      <td>
                      <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#EBEBEB" class="tableoutline">
                        <!--DWLayoutTable-->
                          <tr class="tbhead" align=center> 
                            <td width="60" height="24" background="images/Mypic_top12.gif">编号</td>
							<td width="160" height="24" background="images/Mypic_top12.gif">店铺名称</td>
                            <td width="86" valign="top" background="images/Mypic_top12.gif">会员名称</td>
							<td width="70" valign="top" background="images/Mypic_top12.gif">是否推荐</td>
                            <td width="70" valign="top" nowrap background="images/Mypic_top12.gif">是否审核</td>
							<td width="70" valign="top" nowrap background="images/Mypic_top12.gif">开店时间</td>
                            <td width="160" nowrap background="images/Mypic_top12.gif">编辑</td>
                          </tr><?php 
include("admin.php");
$pagesize=20;
$url=$_SERVER["REQUEST_URI"];
$url=parse_url($url);
$url=$url[path];
$numq=mysql_query("SELECT * FROM `".$ad."user` WHERE `tuijian` LIKE '推荐' 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?page=1>首页</a> <a href=$url?page=".($pageval-1).">上一页</a> <a href=$url?page=".($pageval+1).">下一页</a> <a href=$url?page=".($allpage).">末页</a> ";
}
$sql="SELECT * FROM `".$ad."user` WHERE `tuijian` LIKE '推荐' ORDER BY `id` DESC  LIMIT $page $pagesize";
$rs=mysql_query($sql);
while($rw=mysql_fetch_assoc($rs)){ ?>
<tr bgcolor='#FFFFFF' class=firstalt> 
                            <td height='24' align=left><?=$rw['id']?></td>
                            <td align='center' valign='top'><a href='../sview.php?id=<?=$rw['username']?>' target='_blank'><?=$rw['dpname']?></a></td>
							<td align='center' valign='top'><?=$rw['username']?></td>
                            <td align='center' valign='top' nowrap><?=$rw['tuijian']?></td>
							 <td align='center' valign='top' nowrap><?php if($rw['dpsk']==1){ echo "已审核";} if($rw['dpsk']==2){ echo "未申请";} if($rw['dpsk']==3){ echo "等待审核";}?></td>
							<td align='center' valign='top' nowrap><?=$rw['time']?></td>
                            <td align='center' nowrap><a href='dianpu_edit.php?id=<?=$rw['id']?>'><img 

src='images/Mypic_top17.gif' width='80' height='20' border='0' 

align='absmiddle'></a> <a href='dianpu_del.php?id=<?=$rw['id']?>' onClick=\"return confirm('你确定要删除 <?=$rw['dpname']?> 吗?')\" ><img src='images/Mypic_top18.gif' width='80' height='20' border='0' align='absmiddle'></td></a>
                          </tr><?php }?>
</table> <form action="" method="post" name="pay"> <?php 
if($_GET['page']!=0) {
if($_GET['page']<$allpage) {
echo "共有<span class='style12'>{$num}</span>条记录 每页{$pagesize}条记录 当前<span class='style12'>{$pageval}</span>/{$allpage}页 <a href=$url?page=1>首页</a> <a href=$url?page=".($pageval-1).">上一页</a> <a href=$url?page=".($pageval+1).">下一页</a> <a href=$url?page=".($allpage).">末页</a> ";
}
else
echo "共有<span class='style12'>{$num}</span>条记录 每页{$pagesize}条记录 当前<span class='style12'>{$pageval}</span>/{$allpage}页 <a href=$url?page=1>首页</a> <a href=$url?page=".($pageval-1).">上一页</a> 下一页 <a href=$url?page=".($allpage).">末页</a> ";
}
else 
echo "共有<span class='style12'>{$num}</span>条记录 每页{$pagesize}条记录 当前<span class='style12'>{$pageval}</span>/{$allpage}页 <a href=$url?page=1>首页</a> 上一页 <a href=$url?page=".($pageval+1).">下一页</a> <a href=$url?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>
</table>
<br>
<center>Powered by: <a href="http://www.126php.com" target="_blank">www.126php.com</a> 程序开发:*!!杨公子 联系QQ:61709225</center>
</body>
</html>