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

📄 createframe.asp

📁 职位管理 用户管理 登陆管理 工作管理 信息管理
💻 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 + -