<?php 
include("confic.php");
include("SQL.php");
$name=$_GET['id'];
$rs=mysql_query("SELECT * FROM `".$ad."user` WHERE `username` LIKE '{$name}'"); 
$rw=mysql_fetch_assoc($rs);
if($rw['dpsk']!=1){
die("<script language=javascript>  
alert( \"对不起，找不到相关的店铺,或者是你还没有开店。\"  );
location.href = \"./username/index.php\"
</script>");
}
$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><?=$rw['dpname']?></title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style714 {
	font-size: xx-large;
	font-weight: bold;
	color: #00007B;
}
-->
</style>
</head>
<script language=javascript>
    function CopyUrl()
			{
				var clipBoardContent=''; 
				clipBoardContent+='我的手机靓号专卖店,请多多捧场: ';
				clipBoardContent+=location.href; 
				window.clipboardData.setData("Text",clipBoardContent);
				alert("店铺网址已复制,可以粘贴到QQ或Msn上发送给好友!");
			}	
    </script>
    <script>
function showLoginDiv(x,y){
var mydiv = document.getElementById("logindiv");
		mydiv.style.display='block';
		if(x!=undefined)
			mydiv.style.left=document.body.scrollLeft+x;
		else
			mydiv.style.left=document.body.scrollLeft+event.x-60;
		if(y!=undefined)
			mydiv.style.top=document.body.scrollTop+y;
		else
			mydiv.style.top=document.body.scrollTop+event.y+5;
	}
	</script>
<body>

<div align="center">
  <table width="970" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
      <td width="970" height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="970" height="25" align="right" valign="middle" bgcolor="#FEF1FE" class="style70"><span style="cursor: hand; color: #993300;" onclick="javascript:CopyUrl();">复制本站地址推荐给网友</span><span style="cursor: hand; color: #993300;" onclick="javascript:window.external.addFavorite(location.href,document.title)">
                                                    收藏本店</span>　　
                                                <span style="cursor: hand; color: #993300;" onclick="javascript:window.external.addFavorite('http://www.songyuanhaoma.com','手机靓号网')">
                                                    收藏极品靓号网</span>&nbsp;&nbsp;&nbsp;</td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="50" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="970" height="50" align="left" valign="middle"><span class="style714"><?=$rw['dpname']?></span></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="30" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="970" height="30" align="left" valign="middle" bgcolor="#398A00">&nbsp;&nbsp;&nbsp;&nbsp;<span class="style112"><a href="index.php" target="_self" class="style112">首页</a> &nbsp;| &nbsp;<a href="soreey.php" target="_blank" class="style112">各地靓号</a> | <a href="register.php" target="_blank" class="style112">我要卖号</a> | <a href="buy_view.php" target="_blank" class="style112">我要买号</a> | <a href="news.php?id=资费标准" target="_blank" class="style112">卡类资费</a> | <a href="news.php?id=移动优惠" target="_blank" class="style112">移动优惠</a> </span></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="26" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
          <!--DWLayoutTable-->
		            <tr>
            <td width="970" height="5"></td>
          </tr>
		            <tr>
		              <td height="21" align="center" valign="bottom" class="style612"><form name="soform" method="post" action="result.php">
                靓号搜索:
                  <select name="select">
                    <option value="所有号码">所有号码</option>
                    <?php include("confic.php"); $daok=mysql_query("SELECT * FROM `".$ad."daokang` ORDER BY `cid` ASC LIMIT 0 , 10"); 
while ($dao=mysql_fetch_assoc($daok)){ echo "<option value='{$dao['name']}'>{$dao['name']}</option><br>"; }?>
                  </select>&nbsp;
                &nbsp;<input name="keyboard" type="text" class="style612" id="keyboard" size="35">
              &nbsp;<input name="Submit" type="submit" class="style612" value="搜索">
                                              </form></td>
          </tr>
            </table></td>
    </tr>
    <tr>
      <td height="7"></td>
    </tr>
    <tr>
      <td height="456" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="230" rowspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <!--DWLayoutTable-->
                <tr>
                  <td width="230" height="165" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
                      <!--DWLayoutTable-->
                      <tr>
                        <td height="25" colspan="2" align="left" valign="middle" bgcolor="#398A00" class="style112">&nbsp;&nbsp;卖家信息</td>
                      </tr>
                      <tr>
                        <td width="70" height="20" align="center" valign="middle" class="style102">会员名称:</td>
                      <td width="160" align="left" valign="top" class="style70"><?=$rw['username']?></td>
                      </tr>
                      <tr>
                        <td height="20" align="center" valign="middle" class="style102">真实姓名:</td>
                      <td align="left" valign="top" class="style70"><?=$rw['xname']?></td>
                      </tr>
                      <tr>
                        <td height="20" align="center" valign="middle" class="style102">开店时间:</td>
                      <td align="left" valign="top" class="style70"><?=$rw['time']?></td>
                      </tr>
                      <tr>
                        <td height="20" align="center" valign="middle" class="style102">手机号码:</td>
                      <td align="left" valign="top" class="style70"><?=$rw['shouji']?></td>
                      </tr>
                      <tr>
                        <td height="20" align="center" valign="middle" class="style102">QQ/MSN</td>
                      <td align="left" valign="top" class="style70"><?=$rw['qq']?></td>
                      </tr>
                      <tr>
                        <td height="20" align="center" valign="middle" class="style102">所在地区:</td>
                      <td align="left" valign="top" class="style70"><?=$rw['shengfen']?>·<?=$rw['chengshi']?></td>
                      </tr>
                      <tr>
                        <td height="20" align="center" valign="middle" class="style102">号码数量:</td>
                      <td align="left" valign="top" class="style70"><?=$num?></td>
                      </tr>
                                                                        </table></td>
                </tr>
                <tr>
                  <td height="6"></td>
                </tr>
                <tr>
                  <td height="105" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
                      <!--DWLayoutTable-->
                      <tr>
                        <td width="230" height="25" align="left" valign="middle" bgcolor="#398A00" class="style112">&nbsp;&nbsp;店铺公告</td>
                      </tr>
                      <tr>
                        <td height="80" align="left" valign="top" class="style70"><marquee direction="up" scrollamount="1" scrolldelay="60" onmouseover="this.stop()" onmouseout="this.start()" height="80px" width="225"> &nbsp;<?=$rw['dpgonggao']?></marquee></td>
                      </tr>
                                    </table></td>
                </tr>
                <tr>
                  <td height="6"></td>
                </tr>
                <tr>
                  <td height="105" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
                      <!--DWLayoutTable-->
                      <tr>
                        <td width="230" height="25" align="left" valign="middle" bgcolor="#398A00" class="style112">&nbsp;&nbsp;店铺介绍</td>
                      </tr>
                      <tr>
                        <td height="80" align="left" valign="top" class="style70">&nbsp;<?=$rw['dpjieshao']?></td>
                      </tr>
                                    </table></td>
                </tr>
                <tr>
                  <td height="6"></td>
                </tr>
                <tr>
                  <td height="55" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"  class="tb312">
                      <!--DWLayoutTable-->
                      <tr>
                        <td width="230" height="25" align="left" valign="middle" bgcolor="#398A00" class="style112">&nbsp;&nbsp;工具箱</td>
                      </tr>
                      <tr>
                        <td height="30" align="center" valign="middle" class="style312"><iframe src="my.html" width="225" height="125px" frameborder="0" scrolling="no"></iframe></td>
                      </tr>
                                    </table></td>
                </tr>
            </table></td>
            <td width="8" height="111">&nbsp;</td>
            <td width="732" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
                <!--DWLayoutTable-->
                <tr>
                  <td width="732" height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr>
                        <td width="732" height="25" align="left" valign="middle" bgcolor="#398A00" class="style212">&nbsp;&nbsp;当前位置: <a href="index.php" target="_blank" class="style212">网站首页</a> - 本店靓号</td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="64" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#398A00">
                      <!--DWLayoutTable-->
                      <tr align="center" valign="middle" class="style70">
                        <td width="161" height="27">手机号码</td>
                        <td width="92">内含花费</td>
                        <td width="85">卡类</td>
                        <td width="104">所属地区</td>
                        <td width="78">价格</td>
                        <td width="119">发布时间</td>
                        <td width="77">详细</td>
                      </tr><?php include("confic.php");
$name=$_GET['id'];
$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 align="center" valign="middle">
                        <td height="31" class="style712"><?=$rwg['haoma']?></td>
                        <td class="style160">￥<?=$rwg['huafei']?></td>
                        <td class="style612"><?=$rwg['kalei']?></td>
                        <td class="style612"><?=$rwg['shengfen']?>·<?=$rwg['chengshi']?></td>
                        <td class="style160">￥<?=$rwg['jiege']?></td>
                        <td class="style612"><?=$rwg['time']?></td>
                        <td class="style612"><a href="view.php?id=<?=$rwg['id']?>" target="_blank">详细</a></td>
                      </tr><?php }?>
                      <tr>
                        <td height="4"></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                      </tr>
                                                                                                                              </table></td>
                </tr>
                <tr>
                  <td height="12" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr>
                        <td width="732" height="12" align="center" valign="middle" class="style70"><form action="" method="post" name="form1" class="style1"><?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>
  </table>
</div>
</body>
<?php include("top3.php");?>
</html>
