?? main.asp
字號:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/md5.asp"-->
<!-- #include file="inc/pubfun_a.inc" -->
<%
If Session("LoginOk")<>true or Session("LoginID")="" then
dim LoginName, Pwd
LoginName = crequest("LoginName")
Pwd = crequest("Pwd")
if LoginName="" and Pwd="" then
'session name
LoginName = session("LoginName")
Pwd = session("pwd")
end if
dim Success
Success = false
dim Rs
Set Rs= server.createobject ("adodb.recordset")
Rs.open "select * from tbioaUser where LoginName='"& LoginName &"'", oConn, 1, 3
if not Rs.eof then
if Rs("department") = 0 then
ErrorMessage = "該用戶帳號為分配部門!(請與部門負責人聯系)"
Success = false
elseif Rs("roleid") = "" then
ErrorMessage = "該人已離職!(請與人事部門聯系)"
Success = false
elseif md5(Pwd) <> Rs("pwd") then
ErrorMessage="用戶名或密碼錯誤,請重新輸入。"
Success = false
else
Session("LoginName") = LoginName
Session("pwd") = md5(Pwd)
Session("LoginID") = trim(Rs("ID"))
Session("RealName") = trim(Rs("Name"))
if GetTableValue("tbioaDepartment","pmod","id",Rs("Department")) then
Session("DepID") = 1
else
Session("DepID") = trim(Rs("Department"))
end if
Session("LoginOK")=true
Rs("OnlineMod")=1
Rs.Update()
Success = true '登陸成功
end if
else
ErrorMessage = "沒有該用戶!"
end if
Rs.close
set Rs=nothing
%>
<%
if not Success then
if ErrorMessage="" then ErrorMessage="用戶名或密碼錯誤,請重新輸入。"
response.redirect("Default.asp?errormessage="& Server.URLencode(ErrorMessage))
response.end
oConn.close
else
Response.Redirect("main.asp")
end if
end if
%>
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link rel="stylesheet" href="css/index.css" type=text/css>
<title><%=Corp%></title>
<script language="JavaScript">
<!--
<%
'--------------------------------------------取離線設置記錄
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from tbioaOutline where UserID="&Session("LoginID")
rs.open sql,oConn,3,2
if rs.EOF then
rs.AddNew
rs("UserID")=Session("LoginID")
rs.Update
rs.close
rs.open sql,oConn,1,1
end if
'------------------------------------------------
if rs("alertmod")="1" then
%>alertmod=1;<%
else
%>alertmod=0;<%
end if
rs.close
set rs=nothing
%>
function beforeunload() {
if (alertmod==1){
showModalDialog("OutLine/OutLine_Alert.html", "", "dialogWidth:26.4em; dialogHeight:255px; center: Yes; scroll:No; resizable: No; status: No; help: No;");
}
return "離開頁面后,您將退出OA系統。"
}
function unload(){
window.open('Unload.asp?userid=<%=Session("LoginID")%>','','top=1000,width=0,height=0');
}
-->
</script>
<%
'---------------------
'增加簽到數據
dim rskq,srq,rsxxr,xxdate
set rskq=server.CreateObject("adodb.recordset")
set rsxxr=server.CreateObject("adodb.recordset")
xxdate=year(now())&"-"&month(now())&"-"&day(now())
set rsxxr=oConn.execute("select * from kq_xxrb where xxr='" & xxdate &"'")
if rsxxr.EOF then
srq=formatdatetime_activenew(now,"yyyy-mm-dd")
rskq.Open "Select * from kq_kqb where kqrq='" & srq & "' and YGBH=" & Session("LoginID"),oConn,3,2
if rskq.EOF then
if Instr(Request.ServerVariables("REMOTE_ADDR"),"172.27.229")>0 or Instr(Request.ServerVariables("REMOTE_ADDR"),"127.0.0.1")>0 then
if timevalue(time) > timevalue(timevalue("6:00")) then
rskq.AddNew
rskq("ygbh")=Session("LoginID")
rskq("kqrq")=srq
rskq("qdsj")=formatdatetime_activenew(now,"hh:nn:ss")
rskq("qtsj")=""
rskq.Update
else
response.write "<script language=""vbscript"">msgbox ""『各位職工』請注意:"" & vbcrlf & vbcrlf & "" ★ 只有在6:00以后才能【簽到】 !"" & vbcrlf & vbcrlf & "" ★ 本次簽到無效?。?!""</script>"
end if
else
response.write "<script language=""vbscript"">msgbox ""『您好』:"" & vbcrlf & vbcrlf & "" ★ 歡迎使用卓耀網絡辦公系統 ?。?!""</script>"
end if
end if
rskq.close
end if
rsxxr.Close
set rsxxr=nothing
set rskq = nothing
'---------------------
%>
</head>
</head>
<frameset rows="123,0,*,20" framespacing="0" frameborder="no" bordercolor="#E4E4E4" onbeforeunload="javascript:return beforeunload()" onunload="javascript:unload()">
<frame name="Top" scrolling="no" framespacing="0" frameBorder=no noresize src="html/top.asp" target="Main">
<frame name="hidframe" src="UntitledFrame-1" name="left" noresize>
<frame name="Main" noresize framespacing="0" frameBorder="no" src="office/OfficeMain.asp">
<frame name="bottom" scrolling="no" frameBorder=no noresize src="html/bottom.asp" target="_self">
<noframes>
<body>
<p>此網頁使用了框架,但您的瀏覽器不支持框架。</p>
</body>
</noframes>
</frameset>
</html>
<!-- #include file="inc/conn_close.asp" --> <font face="宋體" size=2>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -