📄 manager
字号:
MyIO.Echo "<td colspan=""2"" align=""center"">"
MyIO.Echo " <input name=""btnPost"" type=""button"" value=""确定添加"" class=""btn"" onclick=""Form.submit(this)"" />"
MyIO.Echo " <input type=""reset"" value=""表单重置"" class=""btn"" />"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</form>"
End If
Case "3"
MyIO.Echo "<form id=""frmMain"" action=""admin_manager.asp?Handle=Password&Option=3"" method=""post"" target=""console"">"
MyIO.Echo "<table width=""100%"" border=""1"" cellpadding=""2"" cellspacing=""0"" align=""center"" style=""border-collapse:collapse"" bordercolor=""#000000"">"
MyIO.Echo "<tr>"
MyIO.Echo "<td colspan=""2"" class=""winT0""><b>修改密码</b>" & MUST_INPUT_HINT & "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td width=""10%"">旧密码</td>"
MyIO.Echo "<td width=""90%""><input type=""password"" name=""OldPwd"" class=""txt"" />" & MUST_INPUT & "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td width=""10%"">新密码</td>"
MyIO.Echo "<td width=""90%""><input type=""password"" name=""NewPwd"" class=""txt"" />" & MUST_INPUT & " 严格区分大小写</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td width=""10%"">确认密码</td>"
MyIO.Echo "<td width=""90%""><input type=""password"" name=""NewCfm"" class=""txt"" />" & MUST_INPUT & " 再输入一次新密码,以便确认</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td colspan=""2"" align=""center"">"
MyIO.Echo " <input name=""btnPost"" type=""button"" value=""确定修改"" class=""btn"" onclick=""Form.submit(this)"" />"
MyIO.Echo " <input type=""reset"" value=""重设表单"" class=""btn"" />"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</form>"
Case Else
MyIO.Echo "未知选项"
End Select
End Sub
Private Sub doGetModify()
Dim objCmd
Dim objPower
Dim lngId
lngId = atol(MyIO.QueryString("SeqId"))
Set objCmd = MyKernel.Command(T_ADMIN)
objCmd.CommandType = "SELECT"
If MyPower.Status = 0 Then
strSQL = "SeqId=$(SeqId) AND FOLLOW=$(Follow)"
strSQL = Replace(strSQL, "$(Follow)", MyAdmin("SeqId"))
Else
strSQL = "SeqId=$(SeqId)"
End If
strSQL = Replace(strSQL, "$(SeqId)", lngId)
objCmd.Where = strSQL
If Not ValidAdmin() Then
ExportClose "您没有超级管理员的权限"
ElseIf lngId <= 0 Then
ExportClose "请先选择您要编辑的管理员"
ElseIf Not objCmd.Exec Then
ExportClose "找不到您要编辑的管理员或者您没有编辑该管理员的权限"
ElseIf objCmd("SeqId") = MyAdmin("SeqId") Then
ExportClose "不能编辑自身"
Else
Set objPower = vbsre.mocom.WAPmo.Power.newInstance()
objPower.fromString objCmd("Power")
If objPower.Status = 1 Then
ExportClose "不能修改超级管理员的属性"
Else
MyIO.Echo "<html>"
MyIO.Echo "<head>"
MyIO.Echo "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />"
MyIO.Echo "<meta http-equiv=""Cache-Control"" content=""no-cache, max-age=0"" />"
MyIO.Echo "<title>编辑管理员</title>"
MyIO.Echo "<link rel=""stylesheet"" href=""images/xw.css"" />"
MyIO.Echo "<script language=""javascript"" src=""jspp/jspp.js""></script>"
MyIO.Echo "<script language=""javascript"">"
MyIO.Echo "jspp.using(""mocom.WAPmo.Kernel"");"
MyIO.Echo "function chkAllX(obj)"
MyIO.Echo "{"
MyIO.Echo "var frm = obj.form;"
MyIO.Echo "var ptr = frm.getElementsByTagName(""INPUT"");"
MyIO.Echo "for (var i = 0; i < ptr.length; i++)"
MyIO.Echo "{"
MyIO.Echo "if (ptr[i].type == ""checkbox"" && ptr[i].name != ""Grant"")"
MyIO.Echo "{"
MyIO.Echo "ptr[i].checked = obj.checked;"
MyIO.Echo "ptr[i].disabled = obj.checked;"
MyIO.Echo "}"
MyIO.Echo "}"
MyIO.Echo "}"
MyIO.Echo "window.onload = function()"
MyIO.Echo "{"
MyIO.Echo "window.focus();"
MyIO.Echo "};"
MyIO.Echo "</script>"
MyIO.Echo "</head>"
MyIO.Echo "<body class=""system2"">"
MyIO.Echo "<form id=""frmMain"" action=""admin_manager.asp?Handle=Modify&SeqId=" & objCmd("SeqId") & """ method=""post"" onsubmit=""return(false)"" target=""console"">"
MyIO.Echo " <table width=""100%"" border=""1"" align=""center"" cellpadding=""2"" cellspacing=""0"" bordercolor=""#000000"" style=""border-collapse:collapse"">"
MyIO.Echo "<tr>"
MyIO.Echo "<td colspan=""2"" class=""winT0""><b>编辑管理员[" & objCmd("Name") & "]</b>" & MUST_INPUT_HINT & "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>管理员密码</td>"
MyIO.Echo "<td><input type=""password"" name=""Passwd"" size=""20"" class=""txt"" /> 严格区分大小写</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>管理员密码确认</td>"
MyIO.Echo "<td><input type=""password"" name=""CfmPwd"" size=""20"" class=""txt"" /> 再输入一遍,以便确认</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>所属管理员组</td>"
MyIO.Echo "<td>"
MyIO.Echo "<select name=""GroupId"" class=""sel"">"
MyIO.Echo "<option value=""0"">选择分组</option>"
If MyPower.Status = 1 Then
Set rs = MyKernel.DB.Exec2("SELECT * FROM " & T_ADMIN_GROUP)
Else
Set rs = MyKernel.DB.Exec2("SELECT * FROM " & T_ADMIN_TEAM & " WHERE GROUPID=" & MyAdmin("GroupId"))
End If
Do While Not rs.EOF
MyIO.Echo "<option value=""" & rs("SeqId") & """" & setSelected(objCmd("GroupId") = atol(rs("SeqId"))) & ">" & rs("Name") & "</option>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
MyIO.Echo "</select> " & MUST_INPUT
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td colspan=""2"" align=""center"">"
MyIO.Echo " <input name=""btnPost"" type=""button"" value=""保存编辑"" class=""btn"" onclick=""Form.submit(this)"" />"
MyIO.Echo " <input type=""reset"" value=""表单重置"" class=""btn"" />"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</form>"
MyIO.Echo "<iframe id=""console"" name=""console"" frameborder=""0"" scrolling=""no"" width=""100%"" height=""30""></iframe>"
MyIO.Echo "</body>"
MyIO.Echo "</html>"
End If
Set objPower = Nothing
End If
Set objCmd = Nothing
End Sub
Private Sub GetSpace(ByVal strPath, ByRef lngFolder, ByRef lngFile)
Dim objParent
Dim objFolder
Set objParent = fso.GetFolder(strPath)
lngFolder = lngFolder + objParent.SubFolders.Count
lngFile = lngFile + objParent.Files.Count
For Each objFolder In objParent.SubFolders
GetSpace objFolder.Path, lngFolder, lngFile
Next
End Sub
Private Sub doGetSpace()
If MyPower("ViewSpace") = 0 Then
ExportClose "您没有查看空间状况的权限"
Else
Dim lngFolder
Dim lngFile
Dim dblSize
lngFolder = 0
lngFile = 0
dblSize = GetFolderSize(GetMapPath("."))
GetSpace GetMapPath("."), lngFolder, lngFile
dblSize = FormatNumber(dblSize / MBYTE, 1)
MyIO.Echo "<html>"
MyIO.Echo "<head>"
MyIO.Echo "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />"
MyIO.Echo "<meta http-equiv=""Cache-Control"" content=""no-cache, max-age=0"" />"
MyIO.Echo "<title>空间状况</title>"
MyIO.Echo "<link rel=""stylesheet"" href=""images/xw.css"" />"
MyIO.Echo "<script language=""javascript"" src=""jspp/jspp.js""></script>"
MyIO.Echo "<script language=""javascript"">"
MyIO.Echo "jspp.using(""mocom.WAPmo.Kernel"");"
MyIO.Echo "function CompactDB(obj){"
MyIO.Echo "MessageBox.show(MSG_CONFIRM, ""您确定要压缩数据库么?<br/>压缩数据库期间不能在后台做任何操作"");"
MyIO.Echo "MessageBox.doAccept(function(){"
MyIO.Echo "Form.submit(obj);"
MyIO.Echo "}, true);"
MyIO.Echo "}"
MyIO.Echo "</script>"
MyIO.Echo "</head>"
MyIO.Echo "<body class=""system2"">"
MyIO.Echo "<form id=""frmMain"" action=""admin_manager.asp"" method=""get"">"
MyIO.Echo "<input type=""hidden"" name=""Handle"" value=""Compact"" />"
MyIO.Echo "<table width=""100%"" border=""1"" cellpadding=""2"" cellspacing=""0"" bordercolor=""#000000"" style=""border-collapse:collapse"">"
MyIO.Echo "<tr>"
MyIO.Echo "<td colspan=""2"" class=""winT0""><b>空间状况</b></td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td width=""20%"">文件夹数</td>"
MyIO.Echo "<td width=""80%"">" & lngFolder & "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>文件数</td>"
MyIO.Echo "<td>" & lngFile & "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>占用空间</td>"
MyIO.Echo "<td>" & dblSize & " MB</td>"
MyIO.Echo "</tr>"
If WM_DataType = adAccess Then
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>压缩数据库</td>"
MyIO.Echo "<td><input type=""text"" name=""Path"" class=""txt"" value=""" & MDB_PATH & """ /> 数据库相对路径</td>"
MyIO.Echo "</tr>"
End If
MyIO.Echo "<tr class=""winT2"">"
MyIO.Echo "<td colspan=""2"">"
If WM_DataType = adAccess Then
MyIO.Echo " <input type=""button"" value=""压缩数据库"" class=""btn"" onclick=""CompactDB(this)"" />"
End If
MyIO.Echo " <input type=""button"" value=""关闭窗口"" class=""btn"" onclick=""window.close()"" />"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</form>"
MyIO.Echo "</body>"
MyIO.Echo "</html>"
End If
End Sub
Private Sub doGetCompact()
MyKernel.Config("Protect") = 1
Dim strPath
Dim strOldPath
Dim strNewPath
Dim blnRedirect
strPath = MyIO.QueryString("Path")
strOldPath = GetMapPath(strPath)
strNewPath = strOldPath & ".tmp"
blnRedirect = False
blnError = True
If strPath = "" Then
strError = "请输入数据库路径"
ElseIf Not fso.FileExists(strOldPath) Then
strError = "找不到指定的数据库文件!"
ElseIf Session("Compact") = "YES" Then
blnError = False
strError = "数据库压缩完毕!<br/>压缩前大小:" & FormatNumber(GetFileSize(strOldPath) / MBYTE, 2, , vbTrue) & "MB"
On Error Resume Next
Dim objJEG
Dim strPro
Set objJEG = Server.CreateObject("JRO.JetEngine")
strPro = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
objJEG.CompactDatabase strPro & strOldPath, strPro & strNewPath
Set objJEG = Nothing
If Err.Number Then
strError = "压缩数据库失败:" & Err.Description
Else
fso.MoveFile strNewPath, strOldPath
strError = strError & "<br/>压缩后大小:" & FormatNumber(GetFileSize(strOldPath) / MBYTE, 2, , vbTrue) & "MB"
End If
Session.Abandon
Else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -