<?php session_start();
include("confic.php");
$date=date("Y-m-d");
$ip=$_SERVER['REMOTE_ADDR'];
$username=$_POST['username'];
$rs=mysql_query("SELECT * FROM `".$ad."user` WHERE `username` LIKE '{$username}'");
$rw=mysql_fetch_assoc($rs);
if($_POST['username']){
if($rw['username']==$_POST['username']){
die("<script language=javascript>  
alert( \"对不起,用户名已存在,你不能注册!\");
location.href = \"register.php\"
</script>");
}
mysql_query("INSERT INTO `".$ad."user` (
`id` ,
`cid` ,
`yuedu` ,
`tuijian` ,
`username` ,
`password` ,
`xname` ,
`shouji` ,
`email` ,
`qq` ,
`shengfen` ,
`chengshi` ,
`dizhi` ,
`zhiye` ,
`web` ,
`denglu` ,
`ip` ,
`dpname` ,
`dpgonggao` ,
`dpjieshao` ,
`dpweb` ,
`dpsk` ,
`mip` ,`time` )VALUES (NULL , '1','1','','{$_POST['username']}', MD5( '{$_POST['password']}' ) , '{$_POST['xname']}', '{$_POST['shouji']}', '{$_POST['email']}', '{$_POST['qq']}', '{$_POST['shengfen']}', '{$_POST['chengshi']}', '{$_POST['dizhi']}', '{$_POST['zhiye']}', '', '', '{$ip}', '', '', '', '', '2', '', '{$date}');");
echo "<script language=javascript>  
alert( \"恭喜你，会员注册成功\");
location.href = \"index.php\"
</script>";
mysql_close($connet);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>会员注册</title>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<style type="text/css">
<!--
.style263 {font-size: 14}
.style463 {color: #000000}
-->
</style>
<script src="css/reg.js"></script>
<script src="css/name.js"></script>
</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 height="55" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
              <!--DWLayoutTable-->
              <tr>
                <td width="165" height="25" align="left" valign="middle" bgcolor="#398A00"><span class="style112">推荐靓号专卖店</span></td>
                <td width="65" align="center" valign="middle" bgcolor="#398A00"><a href="#" target="_blank" class="style212">>>更多</a></td>
              </tr><?php include("confic.php"); $rgg=mysql_query("SELECT * FROM `".$ad."user` WHERE `tuijian` LIKE '推荐' ORDER BY `id` DESC LIMIT 0 , 10"); 
while ($rwg=mysql_fetch_assoc($rgg)){ ?>
              <tr>
                <td height="25" colspan="2" align="left" valign="middle" bgcolor="#DEFFD6" class="style312">&nbsp;<a href="sview.php?id=<?=$rwg['username']?>" target="_blank" class="style312"><?=$rwg['dpname']?></a> </td>
              </tr><?php } mysql_close($connet);?>
              <!--DWLayoutTable-->
     </table></td>
        </tr>
        <tr>
          <td height="5"></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="400">&nbsp;</td>
    <td width="734" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb312">
        <!--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><a href="#" class="style512">首页</a><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">&nbsp;</td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="332" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
			  <form name="form2" method="post" action="" onSubmit="return CheckLoginForma();">
              <tr class="style512">
                <td width="182" height="25" align="right" valign="middle" class="style263">用户帐号:</td>
                <td width="228" align="left" valign="middle" class="style102"><input name="username" type="text" class="style4" id="username" size="32"></td>
                <td width="322" align="left" valign="middle" class="style102">帐号不能使用中文注册,只能是数字、英文或下划线.</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">用户密码:</td>
                <td align="left" valign="middle" class="style102"><input name="password" type="text" id="password" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">确定密码:</td>
                <td align="left" valign="middle" class="style102"><input name="password1" type="text" id="password1" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">用户姓名:</td>
                <td align="left" valign="middle" class="style102"><input name="xname" type="text" id="xname" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">手机号码:</td>
                <td align="left" valign="middle" class="style102"><input name="shouji" type="text" id="shouji" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">邮箱:</td>
                <td align="left" valign="middle" class="style102"><input name="email" type="text" id="email" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">QQ/MSN</td>
                <td align="left" valign="middle" class="style102"><input name="qq" type="text" id="qq" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">所在省份:</td>
                <td align="left" valign="middle" class="style102"><input name="shengfen" type="text" id="shengfen" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">所在城市:</td>
                <td align="left" valign="middle" class="style102"><input name="chengshi" type="text" id="chengshi" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">职业:</td>
                <td align="left" valign="middle" class="style102"><input name="zhiye" type="text" id="zhiye" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr class="style512">
                <td height="25" align="right" valign="middle" class="style263">地址:</td>
                <td align="left" valign="middle" class="style102"><input name="dizhi" type="text" id="dizhi" size="32"></td>
                <td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr>
                <td height="25" colspan="2" align="center" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr>
              <tr>
                <td height="32" colspan="2" align="center" valign="middle"><input type="submit" name="Submit" value="确定注册" class="style263">&nbsp;&nbsp;
                  <input type="reset" name="Submit2" value="重新填写" class="style263"></td>
                <td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
              </tr> 
              </form>
          </table></td>
        </tr>
        <tr>
          <td height="28">&nbsp;</td>
        </tr>
                            </table></td>
  </tr>
</table>
</body><?php include("top3.php");?>
</html>
