default.asp

来自「人事OA管理系统」· ASP 代码 · 共 132 行

ASP
132
字号
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/opendb.asp"-->
<%
'登录
username=request("username")
password=request("password")
if username<>"" and password<>"" then
'打开数据库查找是否有此用户
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where username=" & sqlstr(username) & " and password=" & sqlstr(password) & " and forbid='no'"
rs.open sql,conn,1
'如果有此用户就进入系统
if not rs.eof and not rs.bof then

response.cookies("oabusyname")=rs("name")
response.cookies("oabusyusername")=rs("username")
response.cookies("oabusyuserdept")=rs("userdept")
response.cookies("oabusyuserlevel")=rs("userlevel")

response.cookies("cook_allow_see_all_workrep")=rs("allow_see_all_workrep")
response.cookies("cook_allow_see_dept_workrep")=rs("allow_see_dept_workrep")

response.cookies("cook_allow_control_dept_user")=rs("allow_control_dept_user")
response.cookies("cook_allow_control_all_user")=rs("allow_control_all_user")

response.cookies("cook_allow_send_note")=rs("allow_send_note")
response.cookies("cook_allow_control_note")=rs("allow_control_note")

response.cookies("cook_allow_control_file")=rs("allow_control_file")

response.cookies("cook_allow_control_level")=rs("allow_control_level")



response.redirect "gensystem.asp"
end if
end if
%>
<html>
<head>
<title>电子政务系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="9pp.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" topmargin="5">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="56%">&nbsp;</td>
    <td width="44%" valign="bottom"> 
      <div align="center"><img src="image/h-menu.gif" width="320" height="64" usemap="#Map" border="0"> 
        
      </div>
    </td>
  </tr>
  <tr>
    <td width="56%" align="center"> 
      <p><b><br>
        </b></p>
      <p align="left">请使用下面用户名和密码登录系统进行试用.<br>
        <br>
        <br>
      </p>
      <table width="90%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000">
        <tr> 
          <td> 
            <table border="0"  cellspacing="1" cellpadding="0" width="100%" class="unnamed1">
              <tr bgcolor="#FF9900"> 
                <td align=center height="15"><font color="#000000">部 门</font></td>
                <td align=center height="15"><font color="#000000">职 位</font></td>
                <td align=center height="15"><font color="#000000">用户名</font></td>
                <td align=center height="15"><font color="#000000">密 码:</font></td>
              </tr>
<%
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where forbid='no' and userlevel<>'总管'"
rs.open sql,conn,1
while not rs.eof and not rs.bof
%>
<tr bgcolor="#FFFFFF"> 
<td align=center><%=rs("userdept")%></td>
<td align=center><%=rs("userlevel")%></td>
<td align=center><%=rs("username")%></td>
<td align=center><%=rs("password")%></td>
</tr>
<%
rs.movenext
wend
%>

            </table>
          </td>
        </tr>
      </table>
      <font color=red class="unnamed1">*为了方便大家试用,也为了系统安全,故没有给出超级用户的密码</font><br>
      <br>
    </td>
    <td width="44%" valign="top"> 
      <div align="center">
        <p><br>
          <img src="image/login.gif" width="308" height="30"></p>
        
        <table width="350" border="0" cellspacing="0" cellpadding="0" height="233" background="image/b.jpg">
          <tr>
            <td align="center" height="251">&nbsp; 
              <form method=post action="default.asp">
                <table border=0 cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="35">用户名: 
                      <input type=text name=username size=10>
</td>
</tr>
<tr>
                    <td height="35">密<font color="#FFFFFF">--</font>码: 
                      <input type=password name=password size=10>
</td>
</tr>
</table>
                <br>
<input type=submit name=submit value="登录">
</form></td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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