📄 publish.asp
字号:
Response.Write " <input name=""usermail"" type=hidden value="""& Rs3("usermail") &""">"
Response.Write " <input name=""userid"" type=hidden value="""& Rs3("userid") &""">"
Response.Write " <input name=""MaterialClass"" type=hidden value="""& Rs3("MaterialClassCode") &""">"
Response.Write " <input name=""MaterialClassCode"" type=hidden value="""& Rs5("Description") &"-"& Rs6("Description") &""">"
Response.Write " <input name=""address"" type=hidden value="""& Rs3("address") &""">"
Response.Write " <input name=""postcode"" type=hidden value="""& Rs3("postcode") &""">"
Response.Write " </td>"
Response.Write " <td align=""center"" class=""forumRow"">"
Response.Write " <input type=button class=button value=""查看内容长度"" name=Button onclick=""checklength(document.myform);""> "
Response.Write " <input type=reset name=Submit2 class=button value=""清 除"" onclick=""ClearReset()""> "
Response.Write " <input type=Submit class=button value=""提 交"" name=Submit> "
Response.Write " </td>"
Response.Write " </tr>"
Response.Write "</form>"
Response.Write "</table>"
Response.Write "</div>"
If CInt(DownsysClass.Setting(19)) = 0 Then
Response.Write "<Script language=javascript>" & vbCrLf
Response.Write "<!--//" & vbCrLf
Response.Write "document.myform.content1.value = ubbcode(document.myform.content1.value);" & vbCrLf
Response.Write "function ubbcode(temp) {" & vbCrLf
Response.Write "temp = temp.replace(/<br>/ig,""\n"");" & vbCrLf
Response.Write "temp = temp.replace(/<p>/ig,""\n"");" & vbCrLf
Response.Write "temp = temp.replace(/<\/p>/ig,""\n"");" & vbCrLf
Response.Write "return (temp);" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "function ClearReset()" & vbCrLf
Response.Write "{" & vbCrLf
Response.Write " document.myform.content1.value = '';" & vbCrLf
Response.Write " focus();" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "function checklength(theform)" & vbCrLf
Response.Write "{" & vbCrLf
Response.Write " alert(""您的内容目前有 ""+theform.content1.value.length+"" 字节。"");" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "//-->" & vbCrLf
Response.Write "</Script>" & vbCrLf
End If
Set NC_HtmlEdit = Nothing
If isEdit Then
Rs.Close
Rs3.Close
Rs4.Close
Rs5.Close
Rs6.Close
Set Rs = Nothing
End If
End Sub
Private Sub checksave()
If Len(Request.Form("softname")) = 0 Then
Founderr = True
ErrMsg = ErrMsg + "<li>信息主题不能为空!</li>"
Exit Sub
End If
If Len(Request.Form("sortid")) = 0 Then
Founderr = True
ErrMsg = ErrMsg + "<li>信息分类不能为空!</li>"
Exit Sub
Else
strSortid = Split(Trim(Request.Form("sortid")), ",")
End If
If Len(Request.Form("content1")) = 0 Then
Founderr = True
ErrMsg = ErrMsg + "<li>信息简介不能为空!</li>"
Exit Sub
End If
If CInt(DownsysClass.Setting(19)) = 1 Then
TxtContent = Request.Form("content1")
Else
TxtContent = DownsysClass.HTMLEncodes(Request.Form("content1"))
End If
End Sub
Private Sub saveAdd()
Call checksave
If Founderr = False Then
SQL = "select * from NC_SoftPublish where (softid is null)"
Rs.Open SQL, Conn, 1, 3
Rs.addnew
Rs("softname") = DownsysClass.ChkFormStr(Request.Form("softname"))
Rs("SoftVer") = DownsysClass.ChkFormStr(Request.Form("SoftVer"))
Rs("rootid") = strSortid(0)
Rs("sortid") = strSortid(1)
Rs("SortName") = strSortid(2)
Rs("content") = TxtContent
Rs("Language") = Request.Form("Language")
Rs("SoftType") = Request.Form("SoftType")
Rs("isCommend") = Request.Form("isCommend")
Rs("RunSystem") = DownsysClass.ChkFormStr(Request.Form("RunSystem"))
Rs("impower") = Request.Form("impower")
If Trim(Request.Form("SizeUnit")) = "MB" Then
Rs("SoftSize") = CLng(Request.Form("SoftSize") * 1024)
Else
Rs("SoftSize") = CLng(Request.Form("SoftSize"))
End If
Rs("RunSystem") = Request.Form("RunSystem")
Rs("Grades") = Request.Form("Grades")
Rs("Decode") = Request.Form("Decode")
Rs("isMember") = Request.Form("isMember")
Rs("Homepage") = Request.Form("Homepage")
Rs("Contact") = Request.Form("Contact")
Rs("PreviewImg") = Request.Form("PreviewImg")
Rs("Softimg") = Request.Form("Softimg")
Rs("Errcode") = 0
Rs("username") = DownsysClass.memberName
If Len(Request.Form("MoneyNum")) = 0 Then
Rs("MoneyNum") = 0
Else
Rs("MoneyNum") = Request.Form("MoneyNum")
End If
Rs("isTop") = Request.Form("isTop")
Rs("DayHits") = 0
Rs("WeekHits") = 0
Rs("MonthHits") = 0
Rs("Hits") = 0
Rs("HitsTime") = DownsysClass.NowTime
Rs("SoftTime") = DownsysClass.NowTime
Rs("isUpdate") = 1
Rs("isLock") = 0
Rs("truename") = Request.Form("truename")
Rs("Grade") = Request.Form("Grade")
Rs("JobTitle") = Request.Form("JobTitle")
Rs("Company") = Request.Form("Company")
Rs("PhoneCountry") = Request.Form("PhoneCountry")
Rs("PhoneArea") = Request.Form("PhoneArea")
Rs("usertel") = Request.Form("usertel")
Rs("FaxCountry") = Request.Form("FaxCountry")
Rs("FaxArea") = Request.Form("FaxArea")
Rs("FaxNumber") = Request.Form("FaxNumber")
Rs("MobileNo") =Request.Form("MobileNo")
Rs("usermail") = Request.Form("usermail")
Rs("userID") = Request.Form("userID")
Rs("MaterialClassCode") = Request.Form("MaterialClassCode")
Rs("MaterialClass") = Request.Form("MaterialClass")
Rs("address") = Request.Form("address")
Rs("postcode") = Request.Form("postcode")
If Trim(Request.Form("updateTime")) = "yes" Then
Rs("SoftTime") = DownsysClass.NowTime
End If
Rs.Update
Rs.Close
Rs.Open "select top 1 softid from NC_SoftPublish order by softid desc", Conn, 1, 1
pubSoftID = Rs("softid")
Rs.Close
SQL = "update NC_softSort set SoftNum=SoftNum+1,isUpdate=1 where depth<>0 and sortid=" & strSortid(1)
DownsysClass.Execute SQL
SQL = "update NC_softSort set SoftNum=SoftNum+1,isUpdate=1 where depth=0 and rootid=" & strSortid(0)
DownsysClass.Execute SQL
'//////添加下载连接地址//////
If Request.Form("no") <> "" And pubSoftID <> "" Then
For i = 1 To Request("no")
If Request("DownSite" & i & "") <> "" Then
SQL = "select * from NC_SoftSite where (ID is null)"
SiteRs.Open SQL, Conn, 1, 3
SiteRs.addnew
SiteRs("SiteName") = Request.Form("SiteName" & i & "")
SiteRs("DownSite") = Request.Form("DownSite" & i & "")
SiteRs("sortid") = strSortid(1)
SiteRs("SoftID") = pubSoftID
SiteRs("serverid") = Request.Form("serverid" & i & "")
SiteRs.Update
SiteRs.Close
End If
Next
Set SiteRs = Nothing
End If
Set Rs = Nothing
'//////生成HTML//////
If Request.form("isCreateHtml")="yes" then
Dim DownloadClass
Set DownloadClass = New Create_SoftInfo_Cls
DownloadClass.CreateSoftInfo(pubSoftID)
Set DownloadClass = Nothing
End If
NC_Admin.Succeed_Msg ("<li>添加" & Request.Form("softname") & "成功!</li>")
Response.Write "<meta http-equiv=""refresh"" content=""2;url='" & Request.ServerVariables("HTTP_REFERER") & "'"">" & vbCrLf
End If
End Sub
Private Sub savemodify()
Call checksave
Dim ChangedStr
If CInt(DownsysClass.Setting(44)) = 1 Then
ChangedStr = DownsysClass.mainset(43)
ChangedStr = Replace(ChangedStr, "{$Now}", Now())
ChangedStr = "[br][align=right]" & ChangedStr & "[/align]"
End If
If Founderr = False Then
SQL = "select * from NC_SoftPublish where softid=" & Request("softid")
Rs.Open SQL, Conn, 1, 3
Rs("softname") = DownsysClass.ChkFormStr(Request.Form("softname"))
Rs("SoftVer") = DownsysClass.ChkFormStr(Request.Form("SoftVer"))
Rs("rootid") = strSortid(0)
Rs("sortid") = strSortid(1)
Rs("SortName") = strSortid(2)
Rs("content") = TxtContent & ChangedStr
Rs("Language") = Request.Form("Language")
Rs("SoftType") = Request.Form("SoftType")
Rs("isCommend") = Request.Form("isCommend")
Rs("RunSystem") = DownsysClass.ChkFormStr(Request.Form("RunSystem"))
Rs("impower") = Request.Form("impower")
If Trim(Request.Form("SizeUnit")) = "MB" Then
Rs("SoftSize") = CLng(Request.Form("SoftSize") * 1024)
Else
Rs("SoftSize") = CLng(Request.Form("SoftSize"))
End If
Rs("Grades") = Request.Form("Grades")
Rs("Decode") = Request.Form("Decode")
Rs("isMember") = Request.Form("isMember")
Rs("Homepage") = Request.Form("Homepage")
Rs("Contact") = Request.Form("Contact")
Rs("PreviewImg") = Request.Form("PreviewImg")
Rs("Softimg") = Request.Form("Softimg")
Rs("MoneyNum") = Request.Form("MoneyNum")
Rs("isTop") = Request.Form("isTop")
Rs("isUpdate") = 1
Rs("isLock") = 0
Rs("truename") = Request.Form("truename")
Rs("Grade") = Request.Form("Grade")
Rs("JobTitle") = Request.Form("JobTitle")
Rs("Company") = Request.Form("Company")
Rs("PhoneCountry") = Request.Form("PhoneCountry")
Rs("PhoneArea") = Request.Form("PhoneArea")
Rs("usertel") = Request.Form("usertel")
Rs("FaxCountry") = Request.Form("FaxCountry")
Rs("FaxArea") = Request.Form("FaxArea")
Rs("FaxNumber") = Request.Form("FaxNumber")
Rs("MobileNo") =Request.Form("MobileNo")
Rs("usermail") = Request.Form("usermail")
Rs("MaterialClassCode") = Request.Form("MaterialClassCode")
Rs("userID") = Request.Form("userID")
Rs("MaterialClass") = Request.Form("MaterialClass")
Rs("address") = Request.Form("address")
Rs("postcode") = Request.Form("postcode")
Rs("Errcode") = 0
If Trim(Request.Form("updateTime")) = "yes" Then
Rs("SoftTime") = DownsysClass.NowTime
End If
Rs.Update
pubSoftID = Rs("softid")
Rs.Close
SQL = "update NC_softSort set isUpdate=1 where depth<>0 and sortid=" & strSortid(1)
DownsysClass.Execute SQL
SQL = "update NC_softSort set isUpdate=1 where depth=0 and rootid=" & strSortid(0)
DownsysClass.Execute SQL
'//////修改信息连接//////
If Request.Form("totalPut") <> "" And Request.Form("SoftID") <> "" Then
For i = 1 To Request.Form("totalPut")
If Request("StrDownSite" & i & "") <> "" Then
SQL = "select * from NC_softsite where ID=" & Request("ID" & i & "")
SiteRs.Open SQL, Conn, 1, 3
SiteRs("SiteName") = Request.Form("StRsiteName" & i & "")
SiteRs("DownSite") = Request.Form("StrDownSite" & i & "")
SiteRs("sortid") = strSortid(1)
SiteRs("serverid") = Request.Form("server" & i & "")
SiteRs.Update
SiteRs.Close
End If
Next
End If
'//////添加信息连接地址//////
If Request.Form("no") <> "" And Request.Form("SoftID") <> "" Then
For i = 1 To Request("no")
If Request("DownSite" & i & "") <> "" Then
SQL = "select * from NC_softsite where (ID is null)"
SiteRs.Open SQL, Conn, 1, 3
SiteRs.addnew
SiteRs("SiteName") = Request.Form("SiteName" & i & "")
SiteRs("DownSite") = Request.Form("DownSite" & i & "")
SiteRs("softid") = Request.Form("softid")
SiteRs("sortid") = strSortid(1)
SiteRs("serverid") = Request.Form("serverid" & i & "")
SiteRs.Update
SiteRs.Close
End If
Next
End If
'//////生成HTML//////
If Request.form("isCreateHtml")="yes" then
Dim DownloadClass
Set DownloadClass = New Create_SoftInfo_Cls
DownloadClass.CreateSoftInfo(pubSoftID)
Set DownloadClass = Nothing
End If
NC_Admin.Succeed_Msg ("<li>修改" & Request.Form("softname") & "成功!</li>")
Set Rs = Nothing
Response.Write "<meta http-equiv=""refresh"" content=""2;url='publish.asp'"">" & vbCrLf
End If
End Sub
Private Sub batdel()
Dim DownloadClass, DelSoftHtml, j
DownsysClass.Execute ("delete from NC_SoftPublish where softid in (" & selSoftid & ")")
DownsysClass.Execute ("delete from NC_SoftSite where softid in (" & selSoftid & ")")
DownsysClass.Execute ("delete from NC_SoftEssay where softid in (" & selSoftid & ")")
If CInt(DownsysClass.Setting(5)) = 0 Then
DelSoftHtml=split(selSoftid, ", ")
Set DownloadClass = New Create_SoftInfo_Cls
For j = 0 To Ubound(DelSoftHtml)
DownloadClass.DelSoftInfo(DelSoftHtml(j))
Next
Set DownloadClass = Nothing
End If
'Response.Write ("批量删除操作成功!")
Response.redirect (Request.ServerVariables("HTTP_REFERER"))
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -