?? createframe.asp
字號:
<%if Request.ServerVariables("http_method")="POST" then
set conn=server.CreateObject("adodb.connection")
conn.ConnectionString="DSN=findjob"
conn.Open "DSN=findjob"
if Request.Form("radio")="個人" then
'處理個人登錄請求
session("onlinetype")="user"
session("useronline")=Request.Form("uid")
if Request.Form("submit")="新建" then
'新建個人用戶帳號
strsql="select user from userinfo where user='" & Request.Form("uid") & "'"
set sqlresult=conn.Execute(strsql)
if sqlresult.bof and sqlresult.eof then
'該帳號還沒有被使用,創建該帳號
strsql="insert into userinfo (user,userpsw) values ('" & Request.Form("uid") & "','" & Request.Form("psw") & "')"
conn.Execute(strsql)
session("username")=""
else
'該帳號已經被使用,返回登錄頁面重新新建用戶帳號
Response.Redirect "logon.asp?message=該帳號已被使用,請選擇其他帳號"
end if
set sqlresult=nothing
else
'已有帳號的用戶進入系統
strsql="select username from userinfo where user='" & Request.Form("uid") & "' and userpsw='" & Request.Form("psw") & "'"
session("useronline")=Request.Form("uid")
set sqlresult=conn.Execute(strsql)
if sqlresult.bof and sqlresult.eof then
'帳號和口令不對,返回登錄頁面
Response.Redirect "logon.asp?message=帳號和口令不對,請重新輸入"
else
'session變量username不為空,表示使用該帳號的用戶已經登記了個人的資料
session("username")=sqlresult("username")
end if
end if
else
'以下為處理登錄公司/單位的請求
session("onlinetype")="com"
session("comonline")=Request.Form("uid")
if Request.Form("submit")="新建" then
'新建公司/單位用戶帳號
strsql="select comid from cominfo where comid='" & Request.Form("uid") & "'"
set sqlresult=conn.Execute(strsql)
if sqlresult.bof and sqlresult.eof then
'該帳號還沒有被使用,創建該帳號
strsql="insert into cominfo (comid,compsw) values ('" & Request.Form("uid") & "','" & Request.Form("psw") & "')"
conn.Execute(strsql)
session("comname")=""
else
'該帳號已經被使用,返回登錄頁面重新新建用戶帳號
Response.Redirect "logon.asp?message=該帳號已被使用,請選擇其他帳號"
end if
else
'已有帳號的公司用戶進入系統
strsql="select comname from cominfo where comid='" & Request.Form("uid") & "' and compsw='" & Request.Form("psw") & "'"
session("comonline")=Request.Form("uid")
set sqlresult=conn.Execute(strsql)
if sqlresult.bof and sqlresult.eof then
'帳號和口令不對,返回登錄頁面
Response.Redirect "logon.asp?message=帳號和口令不對,請重新輸入"
else
'session變量username不為空,表示使用該帳號的用戶已經登記了個人的資料
session("comname")=sqlresult("comname")
end if
end if
end if
conn.Close
set conn=nothing
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset frameborder="yes" border="1" framespacing="0" rows="22%,*">
<frame name="HeadFrame" scrolling="NO" src="head.htm">
<frameset cols="140,505*" frameborder="yes" border="1" framespacing="0">
<frame name="leftFrame" scrolling="NO" src="leftframe.asp">
<frame name="mainFrame" src="mainframe.asp?message=歡迎進入本系統">
</frameset>
</frameset>
<noframes><body bgcolor="#FFFFFF">
</body></noframes>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -