📄 default.asp
字号:
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/opendb.asp"-->
<!--#include file="kq/conn.asp"-->
<%
'检查考勤数据库是否存在
sub checkkqdatabase()
set fileobject=server.createobject("Scripting.FileSystemObject")
if not fileobject.FileExists(server.mappath("/")&"/kq/"&cstr(year(date()))&".mdb") then
file1=server.mappath("/")&"\kq\backup\new.mdb"
file2=server.mappath("/")&"\kq\"&cstr(year(date()))&".mdb"
fileobject.copyfile file1,file2
end if
set fileobject=nothing
end sub'登录
call checkkqdatabase
username=request.form("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("oabusyuserid")=cstr(rs("ID"))
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.cookies("allow_check_resource_requirement")=rs("allow_check_resource_requirement")
conn.close
set conn=nothing
response.redirect "gensystem.asp"
response.end
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">
<script language="JavaScript">
<!--
window.open('qqprg/lostuser.asp','lostwin','location=no,height=10, width=10, top=600, left=10,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="780">
<tr>
<td><img src="images/spacer.gif" width="780" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
</tr>
<tr>
<td><img name="indexa_r1_c1" width="780" height="330" border="0" src="images/indexa_r1_c1.jpg"></td>
<td><img src="images/spacer.gif" width="1" height="330" border="0"></td>
</tr>
<tr>
<td><form method=post action="default.asp">
<table border=0 cellpadding="0" cellspacing="0" align="center">
<tr>
<td height="35">
<p style="margin-left: 0">用户名:
<input type=text name=username size=10>
</td>
<td height="35">
<p align="left">密 码:
<input type=password name=password size=10>
</p>
</td>
</tr>
</table><p align="center" style="margin-top: 0">
<input type=submit name=submit value="登录">
<input type=reset name=submit2 value="取消">
</p>
</td>
<td><img src="images/spacer.gif" width="1" height="84" border="0"></td>
</tr>
</table>
</form>
<table>
<tr>
<td><img name="indexa_r3_c1" src="images/indexa_r3_c1.jpg" width="780" height="84" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="84" border="0"></td>
</tr>
</center>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -