?? fill_reg.asp
字號(hào):
<%@ Language=VBScript %>
<%
username=Session("username")
if username="" then
Response.Redirect "syspages\error_InvalidRequest.htm"
end if
'再次檢驗(yàn)是否有此用戶名
ON ERROR RESUME NEXT
strSql="SELECT * FROM yonghu WHERE yonghu='"+username+"'"
Set con=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.RecordSet")
con.Open Application("DBCon_ConnectionString")
Set rs=con.Execute(strSql)
if not rs.EOF then'有
Response.Redirect "member_reg.asp?username="+username
end if
con.Close
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function form_reg_onsubmit() {
var form=document.form_reg;
return(check(form));
}
function check(form)
{
if (form.password.value.length<1)
{
alert("請(qǐng)您輸入密碼!");
form.password.focus();
return (false);
}
if (form.re_password.value.length<1)
{
alert("請(qǐng)您輸入確認(rèn)密碼!");
form.re_password.focus();
return (false);
}
if (form.re_password.value!=form.password.value)
{
alert("兩次輸入的密碼不一樣!");
form.password.focus()
return (false);
}
if(form.danwei.value.length<=0)
{
window.alert("請(qǐng)輸入單位名稱!");
form.danwei.focus();
return false;
}
if(form.guojia.value.length<=0)
{
window.alert("請(qǐng)輸入國(guó)家名稱!");
form.guojia.focus();
return false;
}
if(form.chengshi.value.length<=0)
{
window.alert("請(qǐng)輸入城市名稱!");
form.chengshi.focus();
return false;
}
if(form.dizhi.value.length<=0)
{
window.alert("請(qǐng)輸入地址!");
form.dizhi.focus();
return false;
}
if(form.youbian.value.length<=0)
{
window.alert("請(qǐng)輸入郵編!");
form.youbian.focus();
return false;
}
if(!check_ecode(form.youbian))
{
return false;
}
if(form.lianxiren.value.length<=0)
{
window.alert("請(qǐng)輸入聯(lián)系人!");
form.lianxiren.focus();
return false;
}
if(form.dianhua.value.length<=0)
{
window.alert("請(qǐng)輸入電話!");
form.dianhua.focus();
return false;
}
if(!JudgePhone(form.dianhua.value))
{
window.alert("請(qǐng)輸入合法電話!");
form.dianhua.focus();
return false;
}
if(form.e_mail.value.length>18)
{
window.alert("請(qǐng)輸入E_mail!");
form.e_mail.focus();
return false;
}
if(!check_mail(form.e_mail.value) && form.e_mail.value.length>0)
{
alert("您的電子郵件需要輸入完整的地址.");
form.e_mail.focus();
return(false);
}
if(form.zhuye.value.length>0)
{
if(!check_zhuye(form.zhuye.value))
{
alert("請(qǐng)輸入完整的主頁(yè)地址.");
form.zhuye.focus();
return false;
}
return (true);
}
}
function check_ecode(code)
{
if (code.value!="")
{
if (check_int(code.value))
{
if (code.value.length>6)
{
alert("郵政編碼必須小于等于6位!");
code.focus();
return(false);
}
return true;
}
else
{
alert("郵政編碼必須為數(shù)字!");
code.focus();
return(false);
}
}
return false;
}
function check_zhuye(page)
{
var checkOK = ".";
var valid=false;
var num=0;
if(page.charAt(page.length-1)==checkOK)
return false;
for(i=0;i<page.length;i++)
{
ch=page.charAt(i);
if(ch==checkOK) num++;
}
if(num>1) return true;
return false;
}
function check_mail(myint)
{
var checkOK = "@";
var checkStr = myint;
var allValid = true;
var decPoints = 0;
var allNum = "";
if(checkStr.charAt(0)=='@') return(false);
if(checkStr.charAt(checkStr.length-1)=='@')
return(false);
if(checkStr.charAt(checkStr.length-1)=='.')
return(false);
a_valid=0; a_count=0;
d_valid=0;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
if (ch == '@') {a_valid=1; a_count++; }
if (ch == '.') {d_valid=1; }
}
if(a_count>1) return(false);
if(a_valid==1 && d_valid==1) return(true); else return(false);
}
function check_int(myint)
{
var checkOK = "0123456789-";
var checkStr = myint;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
return (false);
}
return (true);
}
//判斷電話號(hào)碼有效性
function JudgePhone(strPass)
{
var array,intTmp,strTmp,i;
var re1=/0/gi;
strPass=strPass.replace(re1,"1");
array=strPass.split("-");
for (i=0;i<array.length;i++)
{
intTmp=parseFloat(array[i]);
strTmp=intTmp.toString();
if (strTmp.length!=array[i].length)
return false;
}
return true;
}
//--></script>
<link rel="stylesheet" href="../html/3508.css">
<style type="text/css">
<!--
.type1 { font-size: 12px; color: #000000; background-color: #FFFFE8}
-->
</style>
</HEAD>
<BODY background="../images/bg1.gif">
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center" height="40">
<tr>
<td width="217" height="39" align="center" valign="bottom"><img src="../images/smallmark.gif" width="120" height="25"></td>
<td width="523" valign="bottom" height="39"><a href="../default.asp">本站首頁(yè)</a>
>> 會(huì)員注冊(cè)</td>
</tr>
<tr>
<td colspan="2" height="1" bgcolor="006600"></td>
</tr>
</table>
<form name=form_reg method="post" action="add_member.asp" LANGUAGE=javascript onsubmit="return form_reg_onsubmit()">
<p align="center">請(qǐng)?zhí)顚懹脩舻南嚓P(guān)資料,帶"*"號(hào)的必須填寫</p>
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="13%">*口 令: </td>
<td width="87%">
<input id=password name=password type=password class="type1" size="12">
</td>
</tr>
<tr>
<td width="13%">*確認(rèn)口令:</td>
<td width="87%">
<input id=password2 name=re_password
type=password class="type1" size="12">
</td>
</tr>
<tr>
<td width="13%">*單位名稱:</td>
<td width="87%">
<input id=danwei name=danwei class="type1" size="60">
</td>
</tr>
<tr>
<td width="13%">*國(guó) 家:</td>
<td width="87%">
<input id=guojia name=guojia class="type1" size="12" value="中國(guó)">
</td>
</tr>
<tr>
<td width="13%">*城 市:</td>
<td width="87%">
<input id=chengshi
name=chengshi class="type1" size="12" value="<% if session("city")<>"all" then%><%=session("city")%><%end if%>">
</td>
</tr>
<tr>
<td width="13%">*地 址:</td>
<td width="87%">
<input id=dizhi name=dizhi class="type1" size="60">
</td>
</tr>
<tr>
<td width="13%">*郵 編:</td>
<td width="87%">
<input
id=youbian name=youbian class="type1" size="12">
</td>
</tr>
<tr>
<td width="13%">*聯(lián) 系 人:</td>
<td width="87%">
<input id=lianxiren name=lianxiren class="type1" size="12">
</td>
</tr>
<tr>
<td width="13%" height="30">*電 話:</td>
<td width="87%" height="30">
<input id=dianhua name=dianhua class="type1">
</td>
</tr>
<tr>
<td width="13%"> E-mail:</td>
<td width="87%">
<input id=e_mail name=e_mail class="type1" size="40">
</td>
</tr>
<tr>
<td width="13%"> 主 頁(yè):</td>
<td width="87%">
<input id=zhuye name=zhuye class="type1" size="40">
</td>
</tr>
<tr align="center">
<td colspan="2" height="80">
<input id=reset1 name=reset1 type=reset value=重填 class="type1"> <input id=submit1 name=submit1 type=submit value=確定 class="type1">
</td>
</tr>
</table>
</form>
<!-- #include file="../include/end.htm" -->
</BODY>
</HTML>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -