www.gusucode.com > 仿51.com的php源码 1.1 > User/Reg1.php
<?php session_start();?> <?php include("../include/dbclass.php"); require_once "../authpage/convertEncoding.php"; //MD5加密 require_once "../share.php"; //IP地址 require_once "../ip/ip.class.php"; $IPConver=new IP; ?> <?php if ($_GET["action"]=="regUserInfo") { $User_Account=$_POST["User_Account"]; if ($User_Account=="") { echo("<script>alert('用户名不能为空');history.back();</script>"); exit(); } $User_Password=$_POST["User_Password"]; if($User_Password=="") { echo("<script>alert('密码不能为空');history.back();</script>"); exit(); } //用正规则 $userpass_valid = "[^[:punct:][:space:][:blank:]]$"; if(!eregi($userpass_valid, $User_Account) || !ereg($userpass_valid,$User_Password)) { echo("<script>alert('您的用户名或密码包含不合法字符');history.back();</script>"); exit(); } //md5加密 //$Md5_Password=md5_5($User_Password); // $Md5_Password=$User_Password; $T=date("Y-m-d h:i:s",strftime(time())); $User_Sex=$_POST["User_Sex"]; if($User_Sex=="") { echo("<script>alert('你还没有选择性别呢');history.back();</script>"); exit(); } $User_Shen=$_POST["User_Shen"]; if($User_Shen==""||$User_Shen=="0") { echo("<script>alert('你还没有选择省份呢');history.back();</script>"); exit(); } $User_Email=$_POST["User_Email"]; $number=gb2utf8($_POST["number"]); //判断验证码开始 if ($number !=$_SESSION['validatecode']) { echo("<script>alert('验证码错误!');</script>"); echo("<script> var getimagecode = parent.document.getElementById('yzm'); getimagecode.src='../authpage/validatecode.php?';</script>"); exit(); } else { $db=new DbConn(); $sqlck="select User_Account from userdata where User_Account='$User_Account'"; $query_id=$db->query($sqlck); $num=$db->num_rows($query_id); if ($num==0) { $sql="insert into userdata (User_Account,User_Password,User_Sex,User_Shen,User_Email,RegTime) values ('$User_Account','$Md5_Password','$User_Sex','$User_Shen','$User_Email','$T')"; $db->Execute($sql); //建立文件夹 $sql_add_friend="insert into myfriend(myfriendname,User_Account) values ('qbx2','$User_Account')"; $db->Execute($sql_add_friend); mkdir("upfile/" . $User_Account, 0777); //初化日记 $sql1="insert into diarygroup (User_Account,GroupName) values ('$User_Account','我的日记')"; $sql2="insert into diarygroup (User_Account,GroupName) values ('$User_Account','我的文章')"; $sql3="insert into diarygroup (User_Account,GroupName) values ('$User_Account','网络文摘')"; $db->Execute($sql1); $db->Execute($sql2); $db->Execute($sql3); //初化通讯录 $sql4="insert into addrgroup (User_Account,GroupName) values ('$User_Account','朋友')"; $sql5="insert into addrgroup (User_Account,GroupName) values ('$User_Account','同事')"; $sql6="insert into addrgroup (User_Account,GroupName) values ('$User_Account','同学')"; $db->Execute($sql4); $db->Execute($sql5); $db->Execute($sql6); //初化网址收藏 $sql7="insert into favgroup (User_Account,GroupName) values ('$User_Account','音乐')"; $sql8="insert into favgroup (User_Account,GroupName) values ('$User_Account','游戏')"; $sql9="insert into favgroup (User_Account,GroupName) values ('$User_Account','论坛')"; $db->Execute($sql7); $db->Execute($sql8); $db->Execute($sql9); ////初化音乐 $sql10="insert into MusicGroup (User_Account,GroupName) values ('$User_Account','我的音乐')"; $db->Execute($sql10); $sql11="insert into PhotoGroup (User_Account,GroupName) values ('$User_Account','我的照片')"; $sql12="insert into PhotoGroup (User_Account,GroupName) values ('$User_Account','朋友的照片')"; $db->Execute($sql11); $db->Execute($sql12); //化图库 //风景卡通明星 $sql13="insert into ImageGroup (User_Account,GroupName) values ('$User_Account','风景')"; $sql14="insert into ImageGroup (User_Account,GroupName) values ('$User_Account','卡通')"; $sql15="insert into ImageGroup (User_Account,GroupName) values ('$User_Account','明星')"; $db->Execute($sql13); $db->Execute($sql14); $db->Execute($sql15); echo("<script>alert('注册成功!请用 $User_Account 登陆!');window.parent.location.href='/';</script>"); exit(); } else { echo("<script>alert('这个用户名已存在!');history.back();</script>"); exit(); }//判断用户这个用户名 }//判断验证码 } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>烦恼驿站用户注册</title> <style type="text/css">a:link{color:#2265b2;text-decoration:none}a:visited{color:#2265b2;text-decoration:none}a:hover{color:#2265b2;text-decoration:underline}body{font-size:12px;line-height:20px;margin:0;text-align:center}img{border:0}.input{border:1px solid #a4bcd5;width:100px;height:16px;margin:0 0 3px 0}#main{width:774px;margin:0 auto;text-align:left}#logo{position:absolute;top:24px;width:140px;margin-left:25px}#nav1{position:absolute;top:28px;background-image:url(../images//bg_nav1.gif);background-repeat:no-repeat;width:260px;height:18px;padding:3px 0 0 42px;color:#72A4D7;margin-left:483px;word-spacing:1px}#nav1 a{color:#72A4D7;font-weight:bold}#nav2{position:absolute;top:72px;height:23px;margin-left:160px;font-size:14px}#nav2 ul{list-style-type:none;margin:0;padding:0}#nav2 ul li{float:left;margin-left:1px;height:23px;display:block}#nav2 ul li a{background-repeat:no-repeat;color:#fff;display:block}#nav2 ul li a:hover{padding-bottom:7px;text-decoration:none}#link1 a, #link2 a, #link3 a, #link4 a{background-image:url(../images//mh2.gif);padding:2px 5px 0 10px;width:32px}#link1 a:hover, #link2 a:hover, #link3 a:hover, #link4 a:hover{background-image:url(../images//mh1.gif)}#link5 a{background-image:url(../images//ma2.gif);padding:2px 5px 0 8px;width:44px}#link8 a{background-image:url(../images//ma2.gif);padding:2px 5px 0 11px;width:41px}#link8 a:hover, #link5 a:hover{background-image:url(../images//ma1.gif)}#link6 a{background-image:url(../images//mc2.gif);padding:2px 5px 0 27px;width:68px}#link6 a:hover{background-image:url(../images//mc1.gif)}#link7 a{background-image:url(../images//bg_nav2_5a.gif);padding:2px 5px 0 11px;width:73px}#link7 a:hover{background-image:url(../images//bg_nav2_5b.gif)}#link9 a{background-image:url(../images//bg_nav2_6a.gif);padding:2px 5px 0 10px;width:87px}#link9 a:hover{background-image:url(../images//bg_nav2_6b.gif)}#link6 a, #link7 a, #link8 a{font-size:12px;}#ht{position:relative;top:95px;background-color:#367dc6;width:774px;height:23px}#reg{position:absolute;top:120px;width:774px;}#foot{width:774px;margin-top:10px;border-top:8px solid #367dc6;text-align:center;color:#2265b2;padding:20px 0}#foot img{margin:10px 0}.btn{font-size:12px;BORDER:1px solid #002D96;PADDING:2px 2px 0;FONT-SIZE:12px;FILTER:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#9DBCEA);CURSOR:hand;COLOR:black;;background-color:#BFEFFF} #link2 a{background-image:url(../images/me2.gif);padding:2px 0px 0 15px;width:73px} #link2 a:hover{background-image:url(../images/me1.gif)} </style> </style> <style type="text/css"> <!-- body{margin:0px;font-family:Arial;background-color:#FFFFFF;}td{font-size:14px;} .xl { border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #BEBEBE; } .red { color: #F72A25; } .lan { color: #3F74AA; } .b { font-weight: bold; } .f12b td { font-size: 12px; font-weight: bold; } .bd { font-size: 14px; color: #3F74AA; height: 15px; } .bd2 { font-size: 12px; color: #3F74AA; } .lv { color: #339900; font-size: 14px; } .h12 { font-size: 12px; font-weight: normal; color: #909090; } .reg a { font-size: 12px; color: #000000; } #ht{position:relative;top:95px;background-color:#367dc6;width:774px;height:23px}#reg{position:absolute;top:120px;width:774px;} img { border: 0px; } .j{margin-top:5px;} .n { border: 1px solid #C4C5BF; } .dl {font-weight:bold;color:#606060;} a:hover{ color: #FF0000; } .f12 { font-size: 12px; width: 140px; } .ol {font-weight:bold;color:#FFFFFF;} .rs {font-weight:bold;color:#FFE400;} .ds { background-color: #EDF2F7; } #bottom{width:773px;height:70px;border-top:3px solid #3377bb;clear:both;text-align:center;}#baidu{width:437px;height:39px;margin-top:13px;line-height:24px;font-size:14px;}#baidu img{position:relative;top:3px} --> </style> </head> <body onload="document.all('User_Account').focus()" > <script language="JScript"> //用于用户注册的JS脚本 //判断输入是否为空 function checkit(i,n) { if(form2[i].value==""){ alert("【"+n+"】没有填写!"); form2[i].focus(); return false; } else return true } //判断是否有选择 function checkSelect(i,n) { if(form2[i].selectedIndex==0) { alert("【"+n+"】没有选择!"); form2[i].focus(); return false } else return true } function check() { var pattern=/^[a-zA-Z][a-zA-Z0-9_]{1,14}[a-zA-Z0-9]$/i; //if(/[^a-zA-Z0-9]/g.test(document.all("User_Account").value) || /[^a-zA-Z]/g.test(document.all("User_Account").value.substr(0,1))) if(!pattern.test(document.all("User_Account").value)) { alert("用户名只能用数字、英文或下划线,并且必须为英文字母开头,下划线不能在结尾!"); document.all("User_Account").focus(); return false; } //判断长度 if(document.all("User_Account").value.length<3) { alert("用户名不能少于3位!"); document.all("User_Account").focus(); return false; } if(document.all("User_Password").value == '') { alert("密码不能为空"); document.all("User_Password").focus(); return false; } if(document.all("User_Password").value.length<6) { alert("密码不能少于6位!"); document.all("User_Password").focus(); return false; } if(document.all("User_Password").value!=document.all("User_RePassword").value){ alert("密码两次输入不同!"); document.all("User_RePassword").focus(); return false; } //判断省份是否有选择 if(!checkSelect("User_Shen","省份")) return if(reg_sex == '') { alert("您是帅哥还是美女呢?请选择性别!"); return false; } if(form2.User_Email.value != '' && !ismail(form2.User_Email.value)) { alert("您的电子邮箱写错了,请修改"); return false; } document.all("form2").submit(); } // JavaScript Document // AJAX 共用库 // Made by Mayer function getObject(id) { if(document.getElementById) { return document.getElementById(id); } else if(document.all) { return document.all[id]; } else if(document.layers) { return document.layers[id]; } } function xmlhttp() { var A=null; try { A=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { A=new ActiveXObject("Microsoft.XMLHTTP"); } catch(oc) { if (typeof XMLHttpRequest != "undefined" ); { A=new XMLHttpRequest(); } } } return A; } function set_bgcolor(row_name) { getObject('row_user').bgColor = ''; getObject('row_pass').bgColor = ''; getObject('row_pass_confirm').bgColor = ''; getObject('row_sex').bgColor = ''; getObject('row_mail').bgColor = ''; getObject('row_area').bgColor = ''; //getObject('row_yzm').bgColor = ''; getObject(row_name).bgColor = '#EDF2F7'; } function input_username() { //getObject('row_user').bgColor='#EDF2F7'; //getObject('row_pass').bgColor=''; //getObject('row_pass_confirm').bgColor=''; getObject('username_explain').innerHTML = '(3-16位字母、数字或下划线构成,并且必须以字母开头,下划线不能在结尾)'; getObject('username_explain').className = 'h12'; } function check_pass() { if(form2.User_Password.value.length < 6) { getObject('pass_explain').style.color = "red"; getObject('pass_explain').innerHTML = '<img src="images/x.gif" width="15" height="15" align="absmiddle" /> 密码至少6位以上'; } else { getObject('pass_explain').style.color = "green"; getObject('pass_explain').innerHTML = "√"; } //check_pass_confirm(); } function check_pass_confirm() { if(form2.User_RePassword.value != form2.User_Password.value) { getObject('pass_confirm_explain').innerHTML = '<img src="images/x.gif" width="15" height="15" align="absmiddle" /> 密码不一致'; getObject('pass_confirm_explain').style.color = "red"; } else if(form2.User_RePassword.value.length > 0) { getObject('pass_confirm_explain').style.color = "green"; getObject('pass_confirm_explain').innerHTML = "√"; } } function use_recommend_name(name) { form2.User_Account.value = name; reg_name = name; getObject('username_explain').innerHTML = '√' getObject('username_explain').className = 'lv'; } function request_valid_user() { var request_url = "UserCheck.php?user="+reg_name; try { oXmlHttp.open("GET", request_url, true); oXmlHttp.send(); oXmlHttp.onreadystatechange = function() { if (oXmlHttp.readyState == 4 && oXmlHttp.status == 200) { tmp = oXmlHttp.responseText.split('|'); if(tmp[0] == 'false') { getObject('username_explain').innerHTML = '√' getObject('username_explain').className = 'lv'; } else if(tmp[0] == 'true') { getObject('username_explain').innerHTML = '<img src="images/x.gif" width="15" height="15" align="absmiddle" /> <span class="red"> <em>'+reg_name+'</em> 已经有人用了,请重新输入'; getObject('username_explain').className = 'red'; if(tmp.length == 2) { available_user = tmp[1].split(','); getObject('user_text_1').innerHTML = available_user[0]; getObject('user_text_2').innerHTML = available_user[1]; getObject('user_text_3').innerHTML = available_user[2]; getObject('recommend_user').style.display = ''; timeout = 0; } } } } } catch (e) { // do nothing } } function check_username(code_url) { if(reg_name != form2.User_Account.value) { getObject('username_explain').className = 'red'; getObject('recommend_user').style.display = 'none'; //if(/[^a-zA-Z0-9]/g.test(document.all("User_Account").value) || /[^a-zA-Z]/g.test(document.all("User_Account").value.substr(0,1))) var pattern=/^[a-zA-Z][a-zA-Z0-9_]{1,14}[a-zA-Z0-9]$/i; if(!pattern.test(document.all("User_Account").value)) { reg_name = form2.User_Account.value; getObject('username_explain').innerHTML = '<img src="images/x.gif" width="15" height="15" align="absmiddle" /> <span class="red">只能用数字、英文或下划线,并且必须为英文字母开头,下划线不能在结尾!'; } else if(document.all("User_Account").value.length<3) { reg_name = form2.User_Account.value; getObject('username_explain').innerHTML = '<img src="images/x.gif" width="15" height="15" align="absmiddle" /> <span class="red">用户名不能少于3位!'; } else { getObject('username_explain').innerHTML = '正在检查...'; getObject('username_explain').className = 'bd2'; reg_name = form2.User_Account.value; timeout = 1; request_valid_user(); setTimeout("stop_check_username()",15000); } } else { getObject('username_explain').className = 'h12'; } //getObject('row_user').bgColor=''; //getObject('row_pass').bgColor='#EDF2F7'; //getObject('row_pass_confirm').bgColor='#EDF2F7'; } function stop_check_username() { if(timeout == 1) { getObject('username_explain').innerHTML = ''; } } function ismail(mail) { return(new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(mail)); } function check_mail() { if(form2.User_Email.value != '' && !ismail(form2.User_Email.value)) { getObject('mail_explain').innerHTML = '<img src="images/x.gif" width="15" height="15" align="absmiddle" /> 您的电子邮箱写错了,请修改'; getObject('mail_explain').className = 'red'; } else { getObject('mail_explain').innerHTML = '(如果您有邮箱,请认真填写.它将用于密码保护)'; getObject('mail_explain').className = 'h12'; } } var reg_name=''; var reg_sex=''; var oXmlHttp = xmlhttp(); var timeout; var tdate = new Date(); </script> <div id="main"> <div id="logo"><img src="../images/logo.gif" width="124" height="65"></div> <div id="nav1"> <a href="http://www.wu-liao.com">网站首页</a> <!-- | <a href="http://my.51.com/User/Online.php">在线列表</a> | <a href="http://bbs.51.com/gourl.php?refer=/index.html" target="_blank">论坛</a> --> </div> <div id="nav2"> <ul> <li id="link9"><a href="Main.php">用户管理中心</a></li> <li id="link2"><a href="../Diary/DiaryList.php">日记文集</a></li> <li id="link1"><a href="../Photo/PhotoList.php">相册</a></li> <li id="link3"><a href="../Image/ImageList.php">图库</a></li> <li id="link5"><a href="../Music/MusicList.php"> 音乐 </a></li> <li id="link6"><a href="../Memo/MemoList.php">秘密记事本</a></li> <li id="link7"><a href="../Fav/FavList.php">网址收藏夹</a></li> <li id="link8"><a href="../Addr/AddrList.php">通讯录</a></li> </ul> </div> <div id="ht"></div> <div id=reg> <table width="764" border="0" align="center" cellpadding="0" cellspacing="0" class="j"> <tr> <td width="764" valign="bottom"><table width="774" height="350" border="0" cellspacing="0" class="n"> <tr> <td valign="top"><table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <form name="form2" action="?action=regUserInfo" method="post" target="tempframe"> <tr> <td height="38" class="xl b">当前位置: <a href="/" style="color:blue;">烦恼驿站</a> >> 用户注册</td> </tr> <tr> <td height="211" class="xl"><table width="100%" border="0" cellpadding="5" cellspacing="0" class="f12b"> <tr id="row_user" bgcolor="#EDF2F7"> <td width="19%" height="24" align="right">用户名:</td> <td width="81%"><input name="User_Account" type="text" class="bd" id="User_Account" onfocus = "set_bgcolor('row_user');" onblur="check_username();" onclick="input_username();" onkeydown="input_username();" size="13" maxlength="16" /> <span class="h12" id="username_explain"></span> </td> </tr> <tr> <td align="right"></td> <td> <style> #recommend {} #recommend_user ul{list-style: none; margin:0; padding:0; display:block;} #recommend_user li{ padding-top: 5px; font-weight:normal} #recommend_user span{ } </style> <div style="display:none;" id="recommend_user"> <span class="lan">您也可以使用我们为您推荐的用户名:</span> <ul > <li> <input name="radioname" type="radio" onclick="use_recommend_name(getObject('user_text_1').innerHTML);" /> <span id="user_text_1"></span> </li> <li> <input name="radioname" type="radio" onclick="use_recommend_name(getObject('user_text_2').innerHTML);" /> <span id="user_text_2"></span> </li> <li> <input name="radioname" type="radio" onclick="use_recommend_name(getObject('user_text_3').innerHTML);" /> <span id="user_text_3"></span> </li> </ul> </div> </td> </tr> <tr id="row_pass" > <td height="24" align="right">密码:</td> <td><input name="User_Password" type="password" class="bd" id="User_Password" size="13" onfocus = "set_bgcolor('row_pass');" /> <span class="h12" id="pass_explain"></span></td> </tr> <tr id="row_pass_confirm" > <td height="24" align="right">再次输入密码:</td> <td><input name="User_RePassword" type="password" class="bd" id="User_RePassword" size="13" onblur="check_pass_confirm();" onfocus = "set_bgcolor('row_pass_confirm'); check_pass();" /> <span class="h12" id="pass_confirm_explain"></span></td> </tr> <tr id="row_sex"> <td height="24" align="right">性别:</td> <td> <input name="User_Sex" type="radio" value="先生" onclick="getObject('sex_explain').className='red'; reg_sex='先生'; set_bgcolor('row_sex');" /> <span class="h12"><img src="images/man.gif" width="14" height="14" align="absmiddle" /></span> 男性 <input type="radio" name="User_Sex" value="女士" onclick="getObject('sex_explain').className='red';reg_sex='女士'; set_bgcolor('row_sex');" /> <img src="images/woman.gif" width="14" height="14" align="absmiddle" /> 女性 <span class="lan" id="sex_explain">(一旦选择,不可更改)</span> </td> </tr> <tr id="row_area"> <td height="24" align="right">所在地区:</td> <td><select name="User_Shen" onfocus = "set_bgcolor('row_area');" > <option value="0">请选择</option> <option value="安徽" <?php if(strstr($IPConver->Convert($ip),安徽)){ echo "selected";}?>>安徽</option> <option value="北京" <?php if(strstr($IPConver->Convert($ip),北京)){ echo "selected";}?> >北京</option> <option value="重庆" <?php if(strstr($IPConver->Convert($ip),重庆)){ echo "selected";}?> >重庆</option> <option value="福建" <?php if(strstr($IPConver->Convert($ip),福建)){ echo "selected";}?> >福建</option> <option value="甘肃" <?php if(strstr($IPConver->Convert($ip),甘肃)){ echo "selected";}?> >甘肃</option> <option value="广东" <?php if(strstr($IPConver->Convert($ip),广东)){ echo "selected";}?> >广东</option> <option value="广西" <?php if(strstr($IPConver->Convert($ip),广西)){ echo "selected";}?> >广西</option> <option value="贵州" <?php if(strstr($IPConver->Convert($ip),贵州)){ echo "selected";}?> >贵州</option> <option value="海南" <?php if(strstr($IPConver->Convert($ip),海南)){ echo "selected";}?> >海南</option> <option value="河北" <?php if(strstr($IPConver->Convert($ip),河北)){ echo "selected";}?> >河北</option> <option value="黑龙江" <?php if(strstr($IPConver->Convert($ip),黑龙江)){ echo "selected";}?> >黑龙江</option> <option value="河南" <?php if(strstr($IPConver->Convert($ip),河南)){ echo "selected";}?> >河南</option> <option value="湖北" <?php if(strstr($IPConver->Convert($ip),湖北)){ echo "selected";}?> >湖北</option> <option value="湖南" <?php if(strstr($IPConver->Convert($ip),湖南)){ echo "selected";}?> >湖南</option> <option value="内蒙古" <?php if(strstr($IPConver->Convert($ip),内蒙古)){ echo "selected";}?> >内蒙古</option> <option value="江苏" <?php if(strstr($IPConver->Convert($ip),江苏)){ echo "selected";}?> >江苏</option> <option value="江西" <?php if(strstr($IPConver->Convert($ip),江西)){ echo "selected";}?> >江西</option> <option value="吉林" <?php if(strstr($IPConver->Convert($ip),吉林)){ echo "selected";}?> >吉林</option> <option value="辽宁" <?php if(strstr($IPConver->Convert($ip),辽宁)){ echo "selected";}?> >辽宁</option> <option value="宁夏" <?php if(strstr($IPConver->Convert($ip),宁夏)){ echo "selected";}?> >宁夏</option> <option value="青海" <?php if(strstr($IPConver->Convert($ip),青海)){ echo "selected";}?> >青海</option> <option value="山西" <?php if(strstr($IPConver->Convert($ip),山西)){ echo "selected";}?> >山西</option> <option value="陕西" <?php if(strstr($IPConver->Convert($ip),陕西)){ echo "selected";}?> >陕西</option> <option value="山东" <?php if(strstr($IPConver->Convert($ip),山东)){ echo "selected";}?> >山东</option> <option value="上海" <?php if(strstr($IPConver->Convert($ip),上海)){ echo "selected";}?> >上海</option> <option value="四川" <?php if(strstr($IPConver->Convert($ip),四川)){ echo "selected";}?> >四川</option> <option value="天津" <?php if(strstr($IPConver->Convert($ip),天津)){ echo "selected";}?> >天津</option> <option value="西藏" <?php if(strstr($IPConver->Convert($ip),西藏)){ echo "selected";}?> >西藏</option> <option value="新疆" <?php if(strstr($IPConver->Convert($ip),新疆)){ echo "selected";}?> >新疆</option> <option value="云南" <?php if(strstr($IPConver->Convert($ip),云南)){ echo "selected";}?> >云南</option> <option value="浙江" <?php if(strstr($IPConver->Convert($ip),浙江)){ echo "selected";}?> >浙江</option> <option value="香港" <?php if(strstr($IPConver->Convert($ip),香港)){ echo "selected";}?> >香港</option> <option value="澳门" <?php if(strstr($IPConver->Convert($ip),澳门)){ echo "selected";}?> >澳门</option> <option value="台湾" <?php if(strstr($IPConver->Convert($ip),台湾)){ echo "selected";}?> >台湾</option> <option value="其他">其它</option> </select></td> </tr> <tr id="row_mail"> <td height="24" align="right">电子邮箱:</td> <td><input name="User_Email" type="text" class="bd" id="User_Email" size="13" onblur="check_mail();" onfocus = "set_bgcolor('row_mail');" /> <span class="h12" id="mail_explain">(如果您有邮箱,请认真填写.它将用于密码保护)</span></td> </tr> <tr id="row_yzm"> <td height="24" align="right">验证码:</td> <td valign="bottom"><div><input id="number" name="number" type="text" size="4" maxlength="4" onfocus = "set_bgcolor('row_yzm');" style="float:left; height:20px; font-size:16px; width:80px; letter-spacing:2px;" /> <img style="float:left; margin-left:10px;border:0px solid #000;" src="../authpage/validatecode.php" align="bottom" id='yzm' /> </div> <div style="height:25px; padding-top:10px; padding-left:10px;"><a href='#no' onclick="getObject('yzm').src='../authpage/validatecode.php?'+tdate.getTime();" style="color:black;">看不清楚,换张图片!</a></div></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="reg"> <tr> <td width="19%" height="50"> </td> <td width="81%"><input name="checkbox" type="checkbox" value="checkbox" checked="checked" /> <a href="/reg.html" target="_blank">我已经阅读并同意注册协议</a></td> </tr> <tr> <td height="43"> </td> <td><input type="button" onclick="if(form2.checkbox.checked){check();} else {alert('您必须同意使用协议才能注册');}" name="Submit" value=" 提交注册 " /></td> </tr> </table></td> </tr> </form> </table></td> </tr> </table></td> </tr> </table> <div id="bottom"> <div id="baidu" style="color:#a0a0a0;"><?php require("../foot.php"); ?></div> </div> <iframe style="display:none" name="tempframe"></iframe> </div> </div> </body> </html>