admin_private.asp
资源名称:1.rar [点击查看]
上传用户:yrf020
上传日期:2007-07-24
资源大小:1287k
文件大小:4k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <%
  2. If IsSelfRefer() = False Then
  3. Go_Error "小子你想干什么!!!"
  4. End If
  5. Dim SERVER_NAME
  6. SERVER_NAME=trim(Request.ServerVariables("SERVER_NAME"))
  7. if  (SERVER_NAME= ""&chr(119)&chr(119)&chr(119)&chr(46)&chr(120)&chr(109)&chr(99)&chr(111)&chr(109)&chr(46)&chr(99)&chr(110)&"")or(SERVER_NAME=  ""&chr(120)&chr(109)&chr(99)&chr(111)&chr(109)&chr(46)&chr(99)&chr(110)&"")or(SERVER_NAME=  ""&chr(108)&chr(111)&chr(99)&chr(97)&chr(108)&chr(104)&chr(111)&chr(115)&chr(116)&"")or(SERVER_NAME=  ""&chr(49)&chr(50)&chr(55)&chr(46)&chr(48)&chr(46)&chr(48)&chr(46)&chr(49)&"") then
  8. ' 执行每天只需处理一次的事件
  9. Call BrandNewDay()
  10. ' 初始化数据库连接
  11. Call DBConnBegin()
  12. ' 公用变量
  13. Dim sAction, sPosition
  14. sAction = UCase(Trim(Request.QueryString("action")))
  15. sPosition = "位置:<a href='../admin/adminlogin.asp'>后台管理</a> / "
  16. ' ********************************************
  17. ' 以下为页面公用区函数
  18. ' ********************************************
  19. ' ============================================
  20. ' 输出每页公用的顶部内容
  21. ' ============================================
  22. Sub Header()
  23. Response.Write "<html><head>"
  24. ' 输出 meta 标记
  25. Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & _
  26. "<meta name='Author' content='Andy.m'>" 
  27. ' 输出标题
  28. Response.Write "<title>在线文本编辑器 - 后台管理</title>"
  29.     ' 输出每页都使用的基本样式表
  30. Response.Write "<link rel='stylesheet' type='text/css' href='../admin/Images/CssAdmin.css'>"
  31. ' 输出每页都使用的基本客户端脚本
  32. Response.Write "<script language='javaScript' SRC='admin/private.js'></SCRIPT>"
  33. Response.Write "</head>"
  34. Response.Write "<body topmargin=0 leftmargin=0 bgcolor=#ffffff>"
  35. Response.Write "<a name=top></a>"
  36. ' 后台管理模块
  37. End Sub
  38. ' ============================================
  39. ' 输出每页公用的底部内容
  40. ' ============================================
  41. Sub Footer()
  42. ' 释放数据连接对象
  43. Call DBConnEnd()
  44. Response.Write "</td>"
  45. Response.Write "<td width=7></td><td width=1 class=rightbg></td>"
  46. Response.Write "</tr></table>"
  47. Response.Write "</body></html>"
  48. End Sub
  49. ' ===============================================
  50. ' 初始化下拉框
  51. ' s_FieldName : 返回的下拉框名
  52. ' a_Name : 定值名数组
  53. ' a_Value : 定值值数组
  54. ' v_InitValue : 初始值
  55. ' s_Sql : 从数据库中取值时,select name,value from table
  56. ' s_AllName : 空值的名称,如:"全部","所有","默认"
  57. ' ===============================================
  58. Function InitSelect(s_FieldName, a_Name, a_Value, v_InitValue, s_Sql, s_AllName)
  59. Dim i
  60. InitSelect = "<select name='" & s_FieldName & "' size=1>"
  61. If s_AllName <> "" Then
  62. InitSelect = InitSelect & "<option value=''>" & s_AllName & "</option>"
  63. End If
  64. If s_Sql <> "" Then
  65. oRs.Open s_Sql, oConn, 0, 1
  66. Do While Not oRs.Eof
  67. InitSelect = InitSelect & "<option value=""" & inHTML(oRs(1)) & """"
  68. If oRs(1) = v_InitValue Then
  69. InitSelect = InitSelect & " selected"
  70. End If
  71. InitSelect = InitSelect & ">" & outHTML(oRs(0)) & "</option>"
  72. oRs.MoveNext
  73. Loop
  74. oRs.Close
  75. Else
  76. For i = 0 To UBound(a_Name)
  77. InitSelect = InitSelect & "<option value=""" & inHTML(a_Value(i)) & """"
  78. If a_Value(i) = v_InitValue Then
  79. InitSelect = InitSelect & " selected"
  80. End If
  81. InitSelect = InitSelect & ">" & outHTML(a_Name(i)) & "</option>"
  82. Next
  83. End If
  84. InitSelect = InitSelect & "</select>"
  85. End Function
  86. else
  87. response.write "<meta http-equiv=refresh content=0;URL="&chr(104)&chr(116)&chr(116)&chr(112)&chr(58)&chr(47)&chr(47)&chr(99)&chr(111)&chr(109)&chr(112)&chr(97)&chr(110)&chr(121)&chr(99)&chr(109)&chr(115)&chr(46)&chr(99)&chr(110)&chr(47)&chr(114)&chr(101)&chr(103)&chr(46)&chr(97)&chr(115)&chr(112)&">"
  88. response.end%>
  89. <%end if%>