📄 web_company_register.asp
字号:
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<!--#include file="Web_Session.asp" -->
<%
Dim Action,Comid,PageNo
Dim TypeId,TypeName,News
'//检测是否跨站
Call Check_url()
'//检测管理员是否有权限操作该页面
If Instr(1,Session("Web_Power"),"118") <= 0 Then
Call CloseDB()
Response.write "对不起!您没有访问该页面的权限..."
Response.End()
End If
Action = Replace_text(request("action"))
Select Case Action
Case "edit"
Call Edit_Submit() '//跳转到编辑函数
End Select
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../CSS/css.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript">
function checkAccount(username)
{
var re, r;
re = /\S/;
r = username.match(re);
if (!r)
{
alert("请输入用户名!");
return false;
}
else
{
window.open("../Company/AccountCheck.asp?action=cusername&value="+username,"")
}
}
function checkmailbox(username)
{
var re, r;
re = /\S/;
r = username.match(re);
if (!r)
{
alert("请邮箱地址!");
return false;
}
else
{
window.open("../Company/AccountCheck.asp?action=cmailbox&value="+username,"")
}
}
function is_zw(str)
{
exp=/[0-9a-zA-Z_]/g;
if(str.search(exp) != -1)
{
return false;
}
return true;
}
function is_number(str)
{
exp=/[^0-9()-]/g;
if(str.search(exp) != -1)
{
return false;
}
return true;
}
function check_reg(){
if (document.reg.username.value==""){
alert("用户名不能为空!请继续注册...");
document.reg.username.focus();
return false;
}
if (document.reg.username.value.length<4 || document.reg.username.value.length>20){
alert("用户名必须是4-20位的字符!请继续注册...");
document.reg.username.focus();
return false;
}
if (is_zw(document.reg.username.value)){
alert("用户名不能是中文文字!请继续注册...");
document.reg.username.focus();
return false;
}
if (document.reg.password.value==""){
alert("密码不能是空值!请继续注册...");
document.reg.password.focus();
return false;
}
if (document.reg.password.value.length<6 ){
alert("密码不能低于6位的符号!请继续注册...");
document.reg.password.focus();
return false;
}
if (document.reg.password2.value==""){
alert("确认密码不能是空值!请继续注册...");
document.reg.password2.focus();
return false;
}
if (document.reg.password2.value!=document.reg.password.value){
alert("确认密码与密码不相同!请继续注册...");
document.reg.password2.focus();
return false;
}
if (document.reg.question.value==""){
alert("用于找回密码的提示问题不能为空!请继续注册...");
document.reg.question.focus();
return false;
}
if (document.reg.answer.value==""){
alert("用于找回密码的问题答案不能为空!请继续注册...");
document.reg.answer.focus();
return false;
}
if (document.reg.mailbox.value==""){
alert("用户的邮箱必须输入!请继续注册...");
document.reg.mailbox.focus();
return false;
}
if(document.reg.mailbox.value.indexOf("@")==-1 || document.reg.mailbox.value.indexOf(".")==-1){
alert("用户的邮箱格式不正确!请继续注册...");
document.reg.mailbox.focus();
return false;
}
if (document.reg.companyname.value==""){
alert("企业名称不能是空值!请继续注册...");
document.reg.companyname.focus();
return false;
}
if (document.reg.set_year.value==""){
alert("企业成立时间不能是空值!请继续注册...");
document.reg.set_year.focus();
return false;
}
if (document.reg.set_year.value.match(/\D/)){
alert("企业成立年份必须是数字!请继续注册...");
document.reg.set_year.focus();
return false;
}
if (document.reg.reg_currency.value==""){
alert("企业注册资金不能是空值!请继续注册...");
document.reg.reg_currency.focus();
return false;
}
if (document.reg.reg_currency.value.match(/\D/)){
alert("企业注册资金必须是数字!请继续注册...");
document.reg.reg_currency.focus();
return false;
}
if (document.reg.company_memo.value==""){
alert("企业简介不能是空值!请继续注册...");
document.reg.company_memo.focus();
return false;
}
if (document.reg.contactperson.value==""){
alert("联系人不能是空值!请继续注册...");
document.reg.contactperson.focus();
return false;
}
if (document.reg.phone.value==""){
alert("联系电话不能是空值!请继续注册...");
document.reg.phone.focus();
return false;
}
if (!is_number(document.reg.phone.value)){
alert("联系电话只能是数字0-9和-!请继续注册...");
document.reg.phone.focus();
return false;
}
if (!is_number(document.reg.companyfax.value)){
alert("传真只能是数字0-9和-!请继续注册...");
document.reg.companyfax.focus();
return false;
}
if (document.reg.email.value==""){
alert("邮箱必须输入!请继续注册...");
document.reg.email.focus();
return false;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -