计算机应用 | 古代文学 | 市场营销 | 生命科学 | 交通物流 | 财务管理 | 历史学 | 毕业 | 哲学 | 政治 | 财税 | 经济 | 金融 | 审计 | 法学 | 护理学 | 国际经济与贸易
计算机软件 | 新闻传播 | 电子商务 | 土木工程 | 临床医学 | 旅游管理 | 建筑学 | 文学 | 化学 | 数学 | 物理 | 地理 | 理工 | 生命 | 文化 | 企业管理 | 电子信息工程
计算机网络 | 语言文学 | 信息安全 | 工程力学 | 工商管理 | 经济管理 | 计算机 | 机电 | 材料 | 医学 | 药学 | 会计 | 硕士 | 法律 | MBA
现当代文学 | 英美文学 | 通讯工程 | 网络工程 | 行政管理 | 公共管理 | 自动化 | 艺术 | 音乐 | 舞蹈 | 美术 | 本科 | 教育 | 英语 |

ASP窗帘网站平台(一)毕业论文网(3)

2013-06-25 01:21
导读:rd,user_type From users" strSql=strSql " Where user_name='" Request.Form("user_name") "' And password='" Request.Form("password") "'" Set rs=db.Execute(strSql) If not rs.eof and not rs.bof Then '如果有
rd,user_type From users"
strSql=strSql & " Where user_name='" & Request.Form("user_name") & "' And password='" & Request.Form("password") & "'"
Set rs=db.Execute(strSql)
If not rs.eof and not rs.bof Then
 '如果有记录,表示有该用户,则将用户名和用户类型保存到Session中
 Session("user_name")=rs("user_name")
 session("user_type")=rs("user_type")
 Session("password")=rs("password")
 '如果是普通用户,重定向到首页;如果是管理员,重定向到管理员页面
 If Session("user_type")="A" Then
  Response.Redirect "houtai.asp"
 ELse
  Response.Redirect "houtai2.asp"
 End If
Else
 '如果没有记录,表示没有该用户,请给出提示信息
 Response.Write "对不起,用户名或密码有误,请<a href='admin.asp'>返回</a>重新登录"
End If
%>
后台界面

图12超级管理员后台界面(houtai.asp)

图13普通管理员后台界面(houtai.asp)

图13普通用户管理员后台界面(user.asp)

附录源码:
超级管理员后台界面(houtai.asp)
<" CODEPAGE="936"%>
<!--#include file="Connections/coon.asp" -->
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) (转载自http://zw.NSEaC.com科教作文网)
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "3") Then

  MM_editConnection = MM_coon_STRING
  MM_editTable = "xinwen"
  MM_editRedirectUrl = "yjxw.asp"
  MM_fieldsStr  = "1|value|2|value"
  MM_columnsStr = "biaoti|',none,''|meirong|',none,''"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
 
  ' set the form values
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
  End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Spli

上一篇:asp毕业生信息管理系统源码+论文+开题+文献+外文 下一篇:没有了