📄 newcompany.asp
字号:
<!--#include file="../conndb.asp"-->
<!--#include file="isAdmin.asp"-->
<html>
<head>
<title>新建企业信息</title>
<link rel="stylesheet" href="../style.css">
<Script Language="JavaScript">
// 域校验
function CheckFlds(){
var p1,p2;
p1 = document.form1.pwd.value;
p2 = document.form1.pwd2.value;
if (document.form1.username.value==""){
alert("请输入用户名!");
form1.username.focus;
return false;
}
if (p1==""){
alert("请输入密码!");
form1.pwd.focus;
return false;
}
if (p2==""){
alert("请输入确认密码!");
form1.pwd2.focus;
return false;
}
if (!p1==p2){
alert("两次输入的密码必须相同!");
form1.pwd.focus;
return false;
}
if (p1.length<6){
alert("输入的密码必须度大于5!");
form1.pwd.focus;
return false;
}
if (document.form1.company.value==""){
alert("请输入公司名称!");
form1.company.focus;
return false;
}
return true;
}
</Script>
</head>
<body>
<%
Dim Uname,Company,pwd,iflag
iflag = 0
Company = ""
pwd = ""
'读取参数uid,添加数据时为空
Uname = Request.QueryString("uid")
Set rs = Server.CreateObject("ADODB.RecordSet")
'如果不为空,则表示修改记录,此时读取企业数据
If Uname <> "" Then
sql = "Select * From Company Where CName='"&Uname&"'"
rs.Open sql,Conn,1,3
pwd = rs("Pwd")
iflag = 1
Company = rs("Company")
End If
%>
<form name="form1" method="POST" action="CompSave.asp" onsubmit="return CheckFlds()">
<p><center><font color=red size=3><b>新建企业用户</b></font></center></p>
<table border="1" cellspacing="0" width="100%" bordercolor="#64B9E1" bordercolorlight="#64B9E1" bordercolordark="#FFFFFF">
<tr>
<td width="20%" bgcolor="#CEE7FF">用户名</td>
<td width="80%">
<%If iflag=0 Then%>
<input type="text" name="username" size="10">
<%Else%> <%=Uname%> <input type="hidden" name="username" value="<%=Uname%>">
<%End If%>
</td>
</tr>
<tr>
<td bgcolor="#CEE7FF">密码</td>
<td><input type="password" name="pwd" size="10" value="<%=pwd%>"></td>
</tr>
<tr>
<td bgcolor="#CEE7FF">确认密码</td>
<td><input type="password" name="pwd2" size="10" value="<%=pwd%>"></td>
</tr>
<tr>
<td bgcolor="#CEE7FF">公司名称</td>
<td><input type="text" name="company" size="50" value="<%=Company%>"></td>
</tr>
</table>
<p align="center"><input type="submit" value=" 提 交 " name="B1">
<input type="reset" value=" 重 写 " name="B2"></p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -