📄 user_soft_code.asp
字号:
Loop
End If
rsSoftList.Close
Set rsSoftList = Nothing
Response.Write "</table>"
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"
Response.Write " <tr>"
Response.Write " <td width='200' height='30'><input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form)' value='checkbox'>选中本页显示的所有" & ChannelShortName & "</td><td>"
Response.Write "<input name='submit1' type='submit' value='删除选定的" & ChannelShortName & "' onClick=""document.myform.Action.value='Del'"" >"
Response.Write "<input name='Action' type='hidden' id='Action' value=''>"
Response.Write "<input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
Response.Write " </td></tr>"
Response.Write "</table>"
Response.Write "</td>"
Response.Write "</form></tr></table>"
If totalPut > 0 Then
Response.Write ShowPage(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, ChannelItemUnit & ChannelShortName & "", True)
End If
Response.Write "<br>"
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0' class='border'>"
Response.Write " <tr class='tdbg'>"
Response.Write " <td width='80' align='right'><strong>" & ChannelShortName & "搜索:</strong></td>"
Response.Write " <td>"
Response.Write "<table border='0' cellpadding='0' cellspacing='0'>"
Response.Write "<form method='Get' name='SearchForm' action='" & FileName & "'>"
Response.Write "<tr><td height='28' align='center'>"
Response.Write "<select name='Field' size='1'>"
Response.Write "<option value='SoftName' selected>" & ChannelShortName & "名称</option>"
Response.Write "<option value='SoftIntro'>" & ChannelShortName & "简介</option>"
Response.Write "<option value='Author'>" & ChannelShortName & "作者</option>"
Response.Write "</select>"
Response.Write "<select name='ClassID'><option value=''>所有栏目</option>" & User_GetClass_Option(1, 0) & "</select>"
Response.Write "<input type='text' name='keyword' size='20' value='关键字' maxlength='50' onFocus='this.select();'>"
Response.Write "<input type='submit' name='Submit' value='搜索'>"
Response.Write "<input name='ManageType' type='hidden' id='ManageType' value='" & ManageType & "'>"
Response.Write "<input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
Response.Write "</td></tr></form></table>"
Response.Write " </td></tr>"
Response.Write "</table>"
Response.Write "<br><b>说明:</b><br> " & ChannelShortName & "属性中的各项含义:<font color=blue>顶</font>----固顶" & ChannelShortName & ",<font color=red>热</font>----热门" & ChannelShortName & ",<font color=green>荐</font>----推荐" & ChannelShortName & "<br><br>"
End Sub
Function GetStrNoItem(iClassID, iStatus)
Dim strNoItem
strNoItem = ""
If ClassID > 0 Then
strNoItem = strNoItem & "此栏目及其子栏目中没有任何"
Else
strNoItem = strNoItem & "没有任何"
End If
Select Case Status
Case -2
strNoItem = strNoItem & "未被采用的" & ChannelShortName
Case -1
strNoItem = strNoItem & "草稿"
Case 0
strNoItem = strNoItem & "<font color=blue>待审核</font>的" & ChannelShortName & "!"
Case 3
strNoItem = strNoItem & "<font color=green>已审核</font>的" & ChannelShortName & "!"
Case Else
strNoItem = strNoItem & "" & ChannelShortName & "!"
End Select
GetStrNoItem = strNoItem
End Function
Function GetLinkTips(SoftName, SoftVersion, Author, UpdateTime, Hits, Keyword, Stars, InfoPoint)
Dim strLinkTips
strLinkTips = ""
strLinkTips = strLinkTips & "名 称:" & SoftName & vbCrLf
strLinkTips = strLinkTips & "版 本:" & SoftVersion & vbCrLf
strLinkTips = strLinkTips & "作 者:" & Author & vbCrLf
strLinkTips = strLinkTips & "更新时间:" & UpdateTime & vbCrLf
strLinkTips = strLinkTips & "下载次数:" & Hits & vbCrLf
strLinkTips = strLinkTips & "关 键 字:" & Mid(Keyword, 2, Len(Keyword) - 2) & vbCrLf
strLinkTips = strLinkTips & "推荐等级:"
If Stars = 0 Then
strLinkTips = strLinkTips & "无"
Else
strLinkTips = strLinkTips & String(Stars, "★")
End If
strLinkTips = strLinkTips & vbCrLf
strLinkTips = strLinkTips & "下载点数:" & InfoPoint
GetLinkTips = strLinkTips
End Function
Function GetInfoStatus(iStatus)
Dim strInfoStatus
Select Case iStatus
Case -2
strInfoStatus = "<font color=gray>退稿</font>"
Case -1
strInfoStatus = "<font color=gray>草稿</font>"
Case 0
strInfoStatus = "<font color=red>待审核</font>"
Case 1
strInfoStatus = "<font color=red>一审通过</font>"
Case 2
strInfoStatus = "<font color=red>二审通过</font>"
Case 3
strInfoStatus = "<font color=black>终审通过</font>"
End Select
GetInfoStatus = strInfoStatus
End Function
Function GetInfoProperty(OnTop, Hits, Elite)
Dim strInfoProperty
strInfoProperty = ""
If OnTop = True Then
strInfoProperty = strInfoProperty & "<font color=blue>顶</font>"
Else
strInfoProperty = strInfoProperty & " "
End If
strInfoProperty = strInfoProperty & " "
If Hits >= HitsOfHot Then
strInfoProperty = strInfoProperty & "<font color=red>热</font>"
Else
strInfoProperty = strInfoProperty & " "
End If
strInfoProperty = strInfoProperty & " "
If Elite = True Then
strInfoProperty = strInfoProperty & "<font color=green>荐</font>"
Else
strInfoProperty = strInfoProperty & " "
End If
GetInfoProperty = strInfoProperty
End Function
Sub ShowJS_Soft()
Response.Write "<script language = 'JavaScript'>" & vbCrLf
Response.Write "function AddUrl(){" & vbCrLf
Response.Write " var thisurl='" & XmlText("Soft", "DownloadUrlTip", "下载地址") & "'+(document.myform.DownloadUrl.length+1)+'|http://'; " & vbCrLf
Response.Write " var url=prompt('请输入下载地址名称和链接,中间用“|”隔开:',thisurl);" & vbCrLf
Response.Write " if(url!=null&&url!=''){document.myform.DownloadUrl.options[document.myform.DownloadUrl.length]=new Option(url,url);}" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "function ModifyUrl(){" & vbCrLf
Response.Write " if(document.myform.DownloadUrl.length==0) return false;" & vbCrLf
Response.Write " var thisurl=document.myform.DownloadUrl.value; " & vbCrLf
Response.Write " if (thisurl=='') {alert('请先选择一个下载地址,再点修改按钮!');return false;}" & vbCrLf
Response.Write " var url=prompt('请输入下载地址名称和链接,中间用“|”隔开:',thisurl);" & vbCrLf
Response.Write " if(url!=thisurl&&url!=null&&url!=''){document.myform.DownloadUrl.options[document.myform.DownloadUrl.selectedIndex]=new Option(url,url);}" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "function DelUrl(){" & vbCrLf
Response.Write " if(document.myform.DownloadUrl.length==0) return false;" & vbCrLf
Response.Write " var thisurl=document.myform.DownloadUrl.value; " & vbCrLf
Response.Write " if (thisurl=='') {alert('请先选择一个下载地址,再点删除按钮!');return false;}" & vbCrLf
Response.Write " document.myform.DownloadUrl.options[document.myform.DownloadUrl.selectedIndex]=null;" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "function CheckForm()" & vbCrLf
Response.Write "{" & vbCrLf
Response.Write " if (document.myform.ClassID.value==''){" & vbCrLf
Response.Write " alert('" & ChannelShortName & "所属栏目不能指定为外部栏目!');" & vbCrLf
Response.Write " document.myform.ClassID.focus();" & vbCrLf
Response.Write " return false;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " if (document.myform.ClassID.value=='0'){" & vbCrLf
Response.Write " alert('指定的栏目不允许添加" & ChannelShortName & "!只允许在其子栏目中添加" & ChannelShortName & "。');" & vbCrLf
Response.Write " document.myform.ClassID.focus();" & vbCrLf
Response.Write " return false;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " if (document.myform.ClassID.value=='-1'){" & vbCrLf
Response.Write " alert('您没有在此栏目发表" & ChannelShortName & "的权限,请选择其他栏目!');" & vbCrLf
Response.Write " document.myform.ClassID.focus();" & vbCrLf
Response.Write " return false;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " if (document.myform.SoftName.value==''){" & vbCrLf
Response.Write " alert('" & ChannelShortName & "名称不能为空!');" & vbCrLf
Response.Write " document.myform.SoftName.focus();" & vbCrLf
Response.Write " return false;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " if (document.myform.Keyword.value==''){" & vbCrLf
Response.Write " alert('关键字不能为空!');" & vbCrLf
Response.Write " document.myform.Keyword.focus();" & vbCrLf
Response.Write " return false;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " document.myform.SoftIntro.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
Response.Write " if (document.myform.SoftIntro.value==''){" & vbCrLf
Response.Write " alert('" & ChannelShortName & "简介不能为空!');" & vbCrLf
Response.Write " editor.HtmlEdit.focus();" & vbCrLf
Response.Write " return false;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " if(document.myform.DownloadUrl.length==0){" & vbCrLf
Response.Write " alert('" & ChannelShortName & "下载地址不能为空!');" & vbCrLf
Response.Write " document.myform.DownloadUrl.focus();" & vbCrLf
Response.Write " return false;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " document.myform.DownloadUrls.value=''" & vbCrLf
Response.Write " for(var i=0;i<document.myform.DownloadUrl.length;i++){" & vbCrLf
Response.Write " if (document.myform.DownloadUrls.value=='') document.myform.DownloadUrls.value=document.myform.DownloadUrl.options[i].value;" & vbCrLf
Response.Write " else document.myform.DownloadUrls.value+='$$$'+document.myform.DownloadUrl.options[i].value;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "</script>" & vbCrLf
End Sub
Sub Add()
If FoundInArr(arrClass_Input, ChannelDir & "none", ",") = True Then
FoundErr = True
ErrMsg = ErrMsg & "<br><li>对不起!您没有在" & ChannelName & "添加" & ChannelShortName & "的权限!</li><br><br>"
Exit Sub
End If
Dim trs
If MaxPerDay > 0 Then
Set trs = Conn.Execute("select count(SoftID) from PE_Soft where Inputer='" & UserName & "' and Deleted=" & PE_False & " and DateDiff(" & PE_DatePart_D & "," & PE_Now & ",UpdateTime)=0")
If trs(0) >= MaxPerDay Then
FoundErr = True
ErrMsg = ErrMsg & "<li>您今天发表的" & ChannelShortName & "已经达到了上限!</li>"
End If
Set trs = Nothing
If FoundErr = True Then Exit Sub
End If
Call ShowJS_Soft
Response.Write "<form method='POST' name='myform' onSubmit='return CheckForm();' action='User_Soft.asp' target='_self'>"
Response.Write " <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr class='title'>"
Response.Write " <td height='22' align='center' colspan='2'><b>添加" & ChannelShortName & "</td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'>"
Response.Write " <td width='120' align='right' class='tdbg5'><strong>所属栏目:</strong></td>"
Response.Write " <td>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -