⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 用户添加.htm

📁 校园网综合信息管理系统!实现校园管理的基本功能.
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>用户添加</title>
</head>

<body background="B01.jpg">

<h2 align="center"><font color="#0000ff">用户管理</font> 

</h2>
<div align="center">
<OBJECT classid=ClsID:BD96C556-65A3-11D0-983A-00C04FC29E33 height=2 id=RDS1 
style="HEIGHT: 2px; WIDTH: 8px" width=8><PARAM NAME="ExecuteOptions" VALUE="2"><PARAM NAME="FetchOptions" VALUE="3"><PARAM NAME="SortDirection" VALUE="-1"><PARAM NAME="InternetTimeout" VALUE="300000"></OBJECT>


<table border="0" cellpadding="0" cellspacing="0" width="367" bgcolor="#008080">
  <tr>
    <td width="355" valign="center"> <p><strong><font face="楷体_GB2312" size="4">用 户 名:</font></strong> 
    <input name="USERNAME" style="FONT-FAMILY: 宋体; FONT-SIZE: 17px" 
            ></p>
    <p><strong><font face="楷体_GB2312" size="4">用户口令:</font></strong> <input
    type="password" name="USERPASS" style="FONT-FAMILY: 宋体; FONT-SIZE: 17px" 
           ></p>
    <p><strong><font face="楷体_GB2312" size="4">确认口令:</font></strong> <input
    type="password" name="ENTERPASS" style="FONT-FAMILY: 宋体; FONT-SIZE: 17px" 
           ></p>
    <p><font face="楷体_GB2312" size="4"><strong>描&nbsp;&nbsp;&nbsp; 
            述:</strong></font> <input
    name="memo" style="FONT-FAMILY: 宋体; FONT-SIZE: 17px" 
            ></p>
    <p align="center"><input type="submit" value="添加用户" name="insert"
    onclick="insert_click()" style="FONT-FAMILY: 宋体; FONT-SIZE: 15px">&nbsp;&nbsp;&nbsp;&nbsp; 
    <input type="reset" value="复  原" name="CANCLE"
    style="FONT-FAMILY: 宋体; FONT-SIZE: 15px"></p></td>
  </tr>
</table>
</div>
<script language="vbscript">
  sub insert_click()
    
    rds1.Server = "http://<%=request.servervariables("server_name")%>"
    
    rds1.Connect = "database=school;uid=sa;pwd=;dsn=school"
    
    if len(rtrim(USERNAME.value))=0 or trim(USERNAME.value)="" then
       
        msgbox "用户名不能为空,请输入用户名!",,"提示窗口"
        exit sub
        
    END IF
    
    rds1.SQL="SELECT * FROM USERSET WHERE 用户名='"&trim(USERNAME.value)&"'"    
        
    rds1.ExecuteOptions = 1
    
    rds1.Refresh 
    
    if rds1.Recordset.recordcount>0 then
    
      msgbox "用户名已存在,请重新输入用户名!",,"提示窗口"
      exit sub
    end if 
    
    IF TRIM(USERPASS.value)<>TRIM(ENTERPASS.value) THEN
    
      msgbox "密码输入错误,请重新输入!",,"提示窗口"
      exit sub
    end if 
    
    
    
    rds1.SQL="INSERT INTO USERSET(用户名,用户口令,描述) VALUES('"&TRIM(LEFT(USERNAME.VALUE,8))&"','"&TRIM(LEFT(USERPASS.VALUE,8))&"','"&TRIM(LEFT(memo.VALUE,10))&"')"
   
    rds1.ExecuteOptions = 1
    
    rds1.Refresh
    
    IF rds1.Recordset.recordcount>0 THEN
    
       MSGBOX  "添加用户成功!",,"提示窗口"
       
     END IF  
    
  end sub
 


</script>


</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -