📄 matter.asp
字号:
<%
Class ImplMocomWAPmoManagerMatter
Private blnError
Private strError
Private rs
Private strSQL
Private objPage
Private Sub Class_Initialize()
blnError = True
strError = "无错误"
End Sub
Private Sub Class_Terminate()
End Sub
Public Sub main()
If MyIO.Env("REQUEST_METHOD") = "POST" Then
Call doPost
Else
Call doGet
End If
End Sub
Private Sub doGet()
Select Case LCase(MyIO.QueryString("Handle"))
Case "list"
Call doGetList
Case "modify"
Call doGetModify
Case "option"
Call doGetOption
Case Else
Call doGetMain
End Select
End Sub
Private Sub doPost()
Select Case LCase(MyIO.QueryString("Handle"))
Case "add"
Call doPostAdd
Case "change"
Call doPostChange
Case "remove"
Call doPostRemove
Case "modify"
Call doPostModify
Case "make"
Call doPostMake
Case "cache"
Call doPostCache
Case Else
MyIO.Echo "未知请求"
End Select
End Sub
Private Sub doGetMain()
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.Option = " & atoi(MyIO.QueryString("Option")) & ";"
MyIO.Echo "jspp.SeqId = " & atol(MyIO.QueryString("SeqId")) & ";"
MyIO.Echo "jspp.Allow = """ & MyKernel.Config("AllowVideo") & "|" & MyKernel.Config("AllowSoft") & """;"
MyIO.Echo "jspp.Share = " & atoi(MyKernel.Config("StapleGroup")) & ";"
MyIO.Echo "jspp.GroupId = " & MyAdmin("GroupId") & ";"
MyIO.Echo "jspp.TeamId = " & MyAdmin("TeamId") & ";"
MyIO.Echo "jspp.AdminId = " & MyAdmin("SeqId") & ";"
MyIO.Echo "jspp.Power = " & MyPower.Status & ";"
MyIO.Echo "</script>"
MyIO.Echo "<script language=""javascript"" src=""images/wm_matter.js""></script>"
MyIO.Echo "</head>"
MyIO.Echo "<body style=""padding:5;margin:0;overflow:auto;border:0"">"
MyIO.Echo "<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"" style=""border:1px solid #000000"">"
MyIO.Echo "<tr>"
MyIO.Echo "<td align=""right"" bgcolor=""#A2ADC4"" style=""border-bottom:1px solid #000000;padding-right:1px;padding-top:1px"" height=""24""><img src=""images/xw_cls0.gif"" border=""0"" align=""absMiddle"" onMouseOver=""this.src='images/xw_cls1.gif'"" onMouseOut=""this.src='images/xw_cls0.gif'"" onMouseDown=""this.src='images/xw_cls2.gif'"" onMouseUp=""this.src='images/xw_cls1.gif'"" /></td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr>"
MyIO.Echo "<td>"
MyIO.Echo "<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
MyIO.Echo "<tr>"
MyIO.Echo "<td height=""24"" style=""background-image:url(images/xw_back4.gif)""> </td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr>"
MyIO.Echo "<td>"
MyIO.Echo "<table width=""98%"" border=""0"" cellpadding=""0"" cellspacing=""0"" align=""center"">"
MyIO.Echo "<tr>"
MyIO.Echo "<td id=""_OPTION"" class=""f12""></td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "<iframe id=""console"" name=""console"" frameborder=""0"" scrolling=""no"" width=""100%"" height=""30""></iframe>"
MyIO.Echo "</body>"
MyIO.Echo "</html>"
End Sub
Private Sub doGetOption()
Select Case MyIO.QueryString("Option")
Case "0"
MyIO.Echo "<form id=""frmMain"" onsubmit=""return(false)"">"
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"">"
MyIO.Echo " <b>所有素材</b>"
MyIO.Echo " <select name=""Category"" class=""sel"" onchange=""jspp.Matter.category=this.value;jspp.Matter.doPage(0)"">"
MyIO.Echo "<option value=""0"">所有类型</option>"
MyIO.Echo "<option value=""" & wmTypeImage & """>图片素材</option>"
MyIO.Echo "<option value=""" & wmTypeRing & """>铃声素材</option>"
MyIO.Echo "<option value=""" & wmTypeVideo & """>视频素材</option>"
MyIO.Echo "<option value=""" & wmTypeSoft & """>软件素材</option>"
MyIO.Echo "</select>"
MyIO.Echo " <a href=""javascript:void(0)"" class=""a1"" onclick=""jspp.Matter.doPage(jspp.Matter.page)"">刷新素材列表</a>"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td colspan=""2"" id=""_list_""></td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td colspan=""2"">"
MyIO.Echo " <label style=""padding:4px 2px 0px 2px""><b>状态</b></label>"
MyIO.Echo " <img src=""images/xw_stat0.gif"" border=""0"" align=""absBottom"" /> 正常的素材"
MyIO.Echo " <img src=""images/xw_stat1.gif"" border=""0"" align=""absBottom"" /> 隐藏的素材<br/>"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</form>"
Case "1"
MyIO.Echo "<form id=""frmMain"" action=""admin_matter.asp?Handle=Add&Option=1"" method=""post"" enctype=""multipart/form-data"" target=""console"">"
MyIO.Echo "<input type=""hidden"" name=""Attributes"" />"
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></td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td width=""10%"">导入栏目</td>"
MyIO.Echo "<td width=""90%"">"
MyIO.Echo "<select name=""Staple"" class=""sel"" style=""width:200px"" onchange=""jspp.SeqId = this.value"">"
MyIO.Echo "<option value=""0"">选择您要导入的栏目</option>"
MyIO.Echo "</select>" & IIf(MyPower.Status = 100, "带有*字符的是属于您的栏目<br/>", "")
MyIO.Echo "导入素材的同时,可以把素材导入到栏目里,程序会自动在您指定的栏目中生成一系列内容,标题为素材的文件名,内容为空,默认提供下载。如果文件是txt文本文件,那么只有指定导入的栏目,才会把文本文件的内容导入到栏目下,否则不与处理,并且,请勿在下载配置里添加txt扩展名"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>素材来源</td>"
MyIO.Echo "<td>"
MyIO.Echo "<table width=""100%"" border=""1"" cellpadding=""2"" cellspacing=""0"" align=""center"" style=""border-collapse:collapse"" bordercolor=""#000000"">"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td width=""150""><input type=""radio"" name=""Attach"" value=""0"" onclick=""chkAttach(this)"" checked=""true"" /> 服务器文件(推荐)</td>"
MyIO.Echo "<td>"
MyIO.Echo "服务器文件请用FTP软件上传至站点的images/temp目录下,每次不要上传太多文件,推荐100个文件,每个文件大小在100KB以内。<br/>"
MyIO.Echo "<font color=""#0000FF"">注意事项:</font>"
MyIO.Echo "<li>JAR、JAD、预览图片混合导入,JAR、JAD、预览图片文件必须同名,例如:qq.jar、qq.jad、qq.gif</li>"
MyIO.Echo "<li>视频或软件类素材与预览图片混合导入,素材名与预览图片必须同名,例如:aaa.3gp、aaa.gif</li>"
MyIO.Echo "<li>"
MyIO.Echo "将几个相关素材导入成一条内容,步骤如下:<br/>"
MyIO.Echo "1、选择需要导入的栏目<br/>"
MyIO.Echo "2、在站点的images/temp目录下建立内容文件夹,文件夹名即为内容标题名称<br/>"
MyIO.Echo "3、将相关的几个素材放在内容文件夹下,素材备注用txt文档"
MyIO.Echo "</li>"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td><input type=""radio"" name=""Attach"" value=""1"" onclick=""chkAttach(this)"" /> 本地文件(最多10个)</td>"
MyIO.Echo "<td>"
MyIO.Echo "<input id=""Attach1"" type=""button"" value=""新增文件"" class=""btn"" onclick=""addAttach(this)"" disabled=""true"" /><br/>"
MyIO.Echo "本地文件:<input type=""file"" id=""Attach10"" name=""Attach10"" class=""txt"" style=""width:300px"" disabled=""true"" onchange=""chkAttachX(this, 0)"" /><br/>"
MyIO.Echo "JAD 文件:<input type=""file"" id=""JAD10"" name=""JAD10"" class=""txt"" style=""width:300px"" disabled=""true"" /><br/>"
MyIO.Echo "预览图片:<input type=""file"" id=""PRE10"" name=""PRE10"" class=""txt"" style=""width:300px"" disabled=""true"" /><br/>"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td><input type=""radio"" name=""Attach"" value=""2"" onclick=""chkAttach(this)"" /> 远程文件</td>"
MyIO.Echo "<td><textarea id=""Attach2"" name=""Attach2"" class=""area"" style=""width:350px;height:100px"" disabled=""true""></textarea><br/>采用HTTP标准格式,如:http://www.wapmo.cn/images/logo.gif,一行一个文件</td>"
MyIO.Echo "</tr>"
MyIO.Echo "</table>"
MyIO.Echo "</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>扩展名</td>"
MyIO.Echo "<td><input type=""checkbox"" name=""Keep"" value=""1"" /> 保留文件扩展名</td>"
MyIO.Echo "</tr>"
MyIO.Echo "<tr class=""winT1"">"
MyIO.Echo "<td>附件位置</td>"
MyIO.Echo "<td>"
MyIO.Echo "<select name=""Place"" class=""sel"">"
MyIO.Echo "<option value=""" & wmImgOverTitle & """>标题之上</option>"
MyIO.Echo "<option value=""" & wmImgUnderTitle & """>标题之下</option>"
MyIO.Echo "<option value=""" & wmImgUnderContent & """ selected=""true"">内容之下</option>"
MyIO.Echo "</select>"
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=""MatterSubmit(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 doGetList()
Dim i
Dim strKey
Dim strSort, intSort, intStat
Dim intCate
Dim xmlNode
Dim strPath
strKey = MyIO.QueryString("Keyword")
strSort = MyIO.QueryString("Sort")
If strSort = "" Then strSort = "SeqId"
intSort = atoi(MyIO.QueryString("SortType"))
intCate = atoi(MyIO.QueryString("Category"))
intStat = atoi(MyIO.QueryString("Stat"))
Set objPage = vbsre.mocom.WAPmo.Page.newInstance()
objPage.ID = atol(MyIO.QueryString("Page"))
objPage.Size = 20
If CBool(strSort = "Hit" Or strSort = "Download") And WM_DataType = adSQLServer Then
objPage.dataType = adAccess
Else
objPage.dataType = WM_DataType
End If
objPage.Index = "SeqId"
objPage.Table = T_MATTER
objPage.Where = "1=1"
If strKey <> "" Then
objPage.Where = objPage.Where & " AND (Title LIKE '%" & SafeString(strKey) & "%' OR Content LIKE '%" & SafeString(strKey) & "%')"
End If
If intCate <> 100 Then
objPage.Where = objPage.Where & " AND Category=" & intCate
End If
If intStat <> 100 Then
objPage.Where = objPage.Where & " AND Hidden=" & intStat
End If
If MyPower.Status <> 1 And MyKernel.Config("MatterGroup") = "1" Then
If MyPower.Status = 0 Then
objPage.Where = objPage.Where & " AND GroupId=" & MyAdmin("GroupId")
Else
objPage.Where = objPage.Where & " AND TeamId=" & MyAdmin("TeamId")
End If
End If
objPage.Where = Replace(objPage.Where, "1=1 AND ", "")
objPage.Where = Replace(objPage.Where, "1=1", "")
objPage.Count = GetPageCount(objPage)
objPage.Sort = SafeString(strSort & IIf(intSort = 1, " DESC", " ASC"))
objPage.SortType = intSort
objPage.Build "matters", "matter"
MyIO.Echo "<table width=""100%"" border=""1"" cellpadding=""2"" cellspacing=""0"" align=""center"" style=""border-collapse:collapse;word-break:break-all;word-wrap:break-word;"" bordercolor=""#000000"">"
MyIO.Echo "<tr>"
MyIO.Echo "<td width=""6%"" class=""winT0""><b>选择</b></td>"
MyIO.Echo "<td width=""6%"" class=""winT0""><b>类型</b></td>"
MyIO.Echo "<td width=""24%"" class=""winT0"" style=""cursor:pointer"" onclick=""jspp.Matter.doSort(0)""><font color=""#800040""><b>素材名称</b></font>"
If strSort = "SeqId" Then
MyIO.Echo "<img src=""images/xw_select" & intSort & ".gif"" border=""0"" align=""absBottom"" />"
End If
MyIO.Echo "</td>"
MyIO.Echo "<td width=""8%"" class=""winT0""><b>所属用户</b></td>"
MyIO.Echo "<td width=""6%"" class=""winT0""><b>格式</b></td>"
MyIO.Echo "<td width=""8%"" class=""winT0""><b>尺寸</b></td>"
MyIO.Echo "<td width=""10%"" class=""winT0""><b>大小</b></td>"
MyIO.Echo "<td width=""8%"" class=""winT0"" style=""cursor:pointer"" onclick=""jspp.Matter.doSort(1)""><font color=""#800040""><b>点击</b></font>"
If strSort = "Hit" Then
MyIO.Echo "<img src=""images/xw_select" & intSort & ".gif"" border=""0"" align=""absBottom"" />"
End If
MyIO.Echo "</td>"
MyIO.Echo "<td width=""8%"" class=""winT0"" style=""cursor:pointer"" onclick=""jspp.Matter.doSort(2)""><font color=""#800040""><b>下载</b></font>"
If strSort = "Download" Then
MyIO.Echo "<img src=""images/xw_select" & intSort & ".gif"" border=""0"" align=""absBottom"" />"
End If
MyIO.Echo "</td>"
MyIO.Echo "<td width=""8%"" class=""winT0"">"
SetMatterStat intStat
MyIO.Echo "</td>"
MyIO.Echo "<td width=""8%"" class=""winT0""><b>管理</b></td>"
MyIO.Echo "</tr>"
If objPage.Rows.hasChildNodes Then
i = 0
For Each xmlNode In objPage.Rows.childNodes
strPath = GetMatterFile(XMLAttr(xmlNode, "category"), XMLAttr(xmlNode, "intime"), XMLAttr(xmlNode, "mark"), XMLAttr(xmlNode, "ext"), "")
MyIO.Echo "<tr class=""winT4"" style=""cursor:default"" onmouseover=""this.style.backgroundColor='#F0F0F0'"" onmouseout=""this.style.backgroundColor=''"">"
MyIO.Echo "<td align=""center""><input type=""checkbox"" id=""SeqId"" name=""SeqId"" value=""" & XMLAttr(xmlNode, "seqid") & """ /></td>"
MyIO.Echo "<td align=""center"">" & GetMatterNameX(XMLAttr(xmlNode, "category")) & "</td>"
MyIO.Echo "<td title=""" & GetMatterTitle(xmlNode) & """><a href=""" & strPath & """ class=""a1"" target=""_blank"">"
Select Case atoi(XMLAttr(xmlNode, "category"))
Case wmTypeImage
MyIO.Echo "<img src=""" & strPath & """ border=""0"" align=""absBottom"""
If atoi(XMLAttr(xmlNode, "width")) > 150 Then
MyIO.Echo " width=""150"""
End If
MyIO.Echo " /><br/>"
Case wmTypeVideo, wmTypeSoft
If XMLAttr(xmlNode, "preview") <> "" Then
strPath = GetMatterFile(XMLAttr(xmlNode, "category"), XMLAttr(xmlNode, "intime"), XMLAttr(xmlNode, "mark"), XMLAttr(xmlNode, "preview"), "")
MyIO.Echo "<img src=""" & strPath & """ border=""0"" align=""absBottom"" width=""150"" /><br/>"
End If
End Select
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -