<?php session_start();
include("db.php");
$name=$_SESSION['name_admin'];
$rt=mysql_query("SELECT * FROM `".$ad."user` WHERE `username` LIKE '{$name}'");
$ry=mysql_fetch_assoc($rt);
if($ry['dpsk']!=1){
die("<script language=javascript>  
alert( \"对不起，你还没有开店，暂时不能发布号码。\"  );
location.href = \"admin_index.php\"
</script>");
}
if($_POST['haoma']){
mysql_query("INSERT INTO `".$ad."hmcontent` (`id` ,`cid`,`dao` ,`name` ,`haoma` ,`kalei` ,`shengfen` ,`chengshi` ,`huafei` ,`jiege` ,
`jieshao` ,`content` ,`sk` ,`tuijian` ,`jingpin` ,`qq` ,`shouji` ,`chushou` ,`beiyong` ,`beiyong1` ,`time` )
VALUES (
NULL , '', '{$_POST['dao']}', '{$name}', '{$_POST['haoma']}', '{$_POST['kalei']}', '{$_POST['shengfen']}', '{$_POST['chengshi']}', '{$_POST['huafei']}', '{$_POST['jiege']}', '{$_POST['jieshao']}', '', '已审核', '未推荐', '', '{$ry['qq']}', '{$ry['shouji']}', '未出售', '', '', NOW( ) );");
echo "<script language=javascript>  
alert( \"恭喜你，号码发布成功\"  );
location.href = \"admin_index.php\"
</script>";
}
?>
<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>
<script language=javascript>
   function CheckLoginFor(){
       if(document.form3.haoma.value==""||document.form3.haoma.value.length<11||document.form3.haoma.value.length>11){
           alert('请输入你要发布的11位数的手机号码！');
           document.form3.haoma.focus();
           return false;
       }
       if(document.form3.kalei.value == ''){
           alert('请输入你要发布的卡号类型！');
           document.form3.kalei.focus();
           return false;
       }
	   if(document.form3.shengfen.value == ''){
           alert('请输入你发布卡号所在的省份！');
           document.form3.shengfen.focus();
           return false;
       }
	   if(document.form3.chengshi.value == ''){
           alert('请输入你发布卡号所在的城市！');
           document.form3.chengshi.focus();
           return false;
       }
	   	   if(document.form3.jieshao.value == ''){
           alert('请输入卡号的介绍！');
           document.form3.jieshao.focus();
           return false;
       }
   }
   </script>
<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="275">&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="15">&nbsp;</td>
        </tr>
        <tr>
          <td height="240" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="style70">
              <!--DWLayoutTable-->
              <form name="form3" method="post" action="" onSubmit="return CheckLoginFor();">
              <tr>
                <td height="25" colspan="3" align="center" valign="middle" class="style712">号码发布</td>
              <td width="220" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                </tr>
              <tr>
                <td width="102" height="25" align="right" valign="middle" class="style612">号码:</td>
                <td width="301" align="left" valign="middle">
                  <input name="haoma" type="text" id="haoma" size="40">                </td>
                <td colspan="2" align="left" valign="middle" class="style70">请输入11位手机号码</td>
              </tr>
              <tr>
                <td height="25" align="right" valign="middle" class="style612">栏目属性</td>
                <td align="left" valign="middle"><select name="dao" id="dao">
                  <option value="">请选择栏目</option>
				  <?php include("db.php"); $rty=mysql_query("SELECT * FROM `".$ad."daokang`"); while ($ryy=mysql_fetch_assoc($rty)){ ?>
                  <option value="<?=$ryy['name']?>"><?=$ryy['name']?></option>
				  <?php }?>
                </select></td>
                <td colspan="2" align="left" valign="middle" class="style70"></td>
              </tr>
              <tr>
                <td height="25" align="right" valign="middle" class="style612">卡号类型:</td>
                <td align="left" valign="middle"><input name="kalei" type="text" id="kalei" size="40"></td>
                <td colspan="2" align="left" valign="middle">如：动感地带</td>
              </tr>
              <tr>
                <td height="25" align="right" valign="middle" class="style612">所属省份:</td>
                <td align="left" valign="middle"><input name="shengfen" type="text" id="shengfen" size="40"></td>
                <td colspan="2" align="left" valign="middle">如你是广东省的，请写：广东</td>
              </tr>
              <tr>
                <td height="25" align="right" valign="middle" class="style612">所属城市:</td>
                <td align="left" valign="middle"><input name="chengshi" type="text" id="chengshi" size="40"></td>
                <td colspan="2" align="left" valign="middle">如你是东莞市的，请写：东莞</td>
              </tr>
              <tr>
                <td height="25" align="right" valign="middle" class="style612">内含话费:</td>
                <td align="left" valign="middle"><input name="huafei" type="text" id="huafei" size="40"></td>
                <td colspan="2" align="left" valign="middle" class="style70">请输入整数(单位：元,价格要求用整数)</td>
              </tr>
              <tr>
                <td height="25" align="right" valign="middle" class="style612">价格：</td>
                <td align="left" valign="middle"><input name="jiege" type="text" id="jiege" size="40"></td>
                <td colspan="2" align="left" valign="middle">(单位：元 ，价格要求用整数，0代表面议)</td>
              </tr>
              <tr>
                <td height="55" align="right" valign="middle" class="style612">详细介绍：</td>
                <td colspan="3" align="left" valign="middle"><textarea name="jieshao" cols="50" id="jieshao"></textarea></td>
                </tr>
              <tr>
                <td height="15" colspan="4" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr align="center" valign="middle">
                <td height="25" colspan="4"><input type="submit" name="Submit" value="确定添加">&nbsp;
                  <input type="reset" name="Submit2" value="重新填写"></td>
              </tr>
              <tr>
                <td height="1"></td>
                <td></td>
                <td width="111"></td>
                <td></td>
              </tr>
              </form>
          </table></td>
        </tr>
        </table></td>
  </tr>
  <tr>
    <td height="285">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
