⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_software00.asp

📁 多用户管理分权限发布、管理软件信息;  自由选择系统默认为静态HTML或动态ASP;  无限制添加下载服务器
💻 ASP
📖 第 1 页 / 共 4 页
字号:
		Response.Write "onblur=""if (value ==''){value='"
		Response.Write Newasp.Setting(2)
		Response.Write "'}"" onmouseover=this.focus() onfocus=this.select() onclick=""if(this.value=='"
		Response.Write Newasp.Setting(2)
		Response.Write "')this.value=''"" value="""
		Response.Write Newasp.Setting(2)
		Response.Write """"
	End If
	Response.Write ">"
	Response.Write " 年份: <input name=""Homepage"" type=""text"" size=""30"" "
	If isEdit Then
		Response.Write "value="""
		Response.Write Rs("Homepage")
		Response.Write """"
	Else
		Response.Write "onblur=""if (value ==''){value='"
		Response.Write Newasp.Setting(1)
		Response.Write "'}"" onmouseover=this.focus() onfocus=this.select() onclick=""if(this.value=='"
		Response.Write Newasp.Setting(1)
		Response.Write "')this.value=''"" value="""
		Response.Write Newasp.Setting(1)
		Response.Write """"
	End If
	Response.Write ">"
	Response.Write "</td>"
	Response.Write " </tr>"
	Response.Write "<TR height=""22"">"
	Response.Write Chr(9) & "<TD colspan=4 align=center class=forumHeaderBackgroundAlternate><B>"
	If CInt(Newasp.Setting(19)) = 1 Then
		Response.Write "HTML编辑器 (不支持UBB代码)"
	Else
		Response.Write "您现在使用的编辑器不支持HTML语法,如果需要HTML语法支持,请在基本设置开启HTML编辑器。"
	End If
	Response.Write " </B></fort></td>"
	Response.Write "</TR>"
	Response.Write "<TR height=""22"">"
	Response.Write Chr(9) & "<TD colspan=4 class=forumRow>"
	If CInt(Newasp.Setting(19)) = 1 Then
		NC_HtmlEdit.Init_HtmlEdit
	Else
		Response.Write Chr(9) & "<textarea name=content1 style=""width:100%;"" rows=12>"
		If isEdit Then
			Response.Write SoftBody
		End If
		Response.Write "</textarea>"
	End If
	Response.Write "</TD>"
	Response.Write "</TR>"
	Response.Write " <tr height=""22"">"
	Response.Write " <td align=""right"" noWrap class=""forumRowHighlight"">是否推荐置顶:</td>"
	Response.Write " <td class=""forumRow""> <input name=""isCommend"" type=""radio"" value=""0"" "
	If isEdit Then
		If CInt(Rs("isCommend")) = 0 Then
			Response.Write "checked"
		End If
	Else
		Response.Write "checked"
	End If
	Response.Write ">"
	Response.Write " 不推荐 <input type=""radio"" name=""isCommend"" value=""1"" "
	If isEdit Then
		If CInt(Rs("isCommend")) = 1 Then
			Response.Write "checked"
		End If
	End If
	Response.Write ">"
	Response.Write " 推荐 <input name=""isTop"" type=""radio"" value=""0"" "
	If isEdit Then
		If CInt(Rs("isTop")) = 0 Then
			Response.Write "checked"
		End If
	Else
		Response.Write "checked"
	End If
	Response.Write ">"
	Response.Write " 不置顶 <input type=""radio"" name=""isTop"" value=""1"" "
	If isEdit Then
		If CInt(Rs("isTop")) = 1 Then
			Response.Write "checked"
		End If
	End If
	Response.Write ">"
	Response.Write " 置顶 </td>"
	Response.Write " </tr>"
	Response.Write " <tr height=""22"">"
	Response.Write " <td align=""right"" class=""forumRowHighlight"">会员电影设置:</td>"
	Response.Write " <td class=""forumRow""> <select name=""isMember"" size=""1"">"
	Set Rs1 = Newasp.Execute("select * from NC_UserGroup order by groupid")
	Do While Not Rs1.EOF
		Response.Write "<option value="""
		Response.Write Rs1("Grades")
		Response.Write """ "
		If isEdit Then
			If Trim(Rs("isMember")) = "" & Rs1("Grades") & "" Then
				Response.Write "selected"
			End If
		End If
		Response.Write ">"
		Response.Write Rs1("GroupName")
		Response.Write "</option>"
		Rs1.movenext
	Loop
	Rs1.Close
	Set Rs1 = Nothing
	Response.Write " </select>&nbsp;&nbsp;"
	Response.Write "下载软件所需的点数:<input name=""MoneyNum"" type=""text"" size=""6"" value="""
	If isEdit Then
		Response.Write Rs("MoneyNum")
	Else
		Response.Write "0"
	End If
	Response.Write """>&nbsp;&nbsp;"
	If isEdit Then
		Response.Write "<input name=""updateTime"" type=""checkbox"" value=""yes"">更新时间"
	End If
	If CInt(Newasp.Setting(5)) = 0 Then Response.Write "<input type=checkbox name='isCreateHtml' value='yes' checked> 同时生成(HTML)"
	Response.Write "</td>"
	Response.Write " </tr>"
	If isEdit Then
		Response.Write " <tr height=""22"">"
		Response.Write " <td colspan=""4"" class=""forumRow"">"
		SQL = "select * from NC_softsite where SoftID=" & Request("SoftID")
		SiteRs.Open SQL, Conn, 1, 1
		If SiteRs.EOF And SiteRs.bof Then
			Response.Write "目前还没有添加任何下载连接!"
		Else
			totalPut = SiteRs.recordcount
			i = 1
			Do While Not SiteRs.EOF
				Response.Write "<input type=""text"" name=""stRsiteName" & i & """ value=""" & SiteRs("SiteName") & """ size=12>&nbsp;"
				SelDownServer SiteRs("serverid"), "server" & i
				Response.Write "&nbsp;URL:<input type=""text"" name=""strDownSite" & i & """ size=35 value=""" & SiteRs("DownSite") & """> "
				Response.Write "[<a href=""admin_software.asp?action=delsite&id=" & SiteRs("id") & "&SoftID=" & Request("SoftID") & """ onclick=""{if(confirm('您确定要删除该连接吗?')){this.document.myform.submit();return true;}return false;}"">删 除</a>]<BR>"
				Response.Write "<input name=""ID" & i & """ type=""hidden"" value=""" & SiteRs("ID") & """>"
				i = i + 1
				SiteRs.movenext
			Loop
		End If
		SiteRs.Close
		Response.Write "<input name=""totalPut"" type=""hidden"" id=""totalPut"" value=""" & totalPut & """>"
		Response.Write " </td></tr>"
	End If
	Response.Write " <tr height=""22"">"
	Response.Write " <td colspan=""2"" class=""forumRow"">"
	Response.Write " <script language=""javascript"">" & vbCrLf
	Response.Write Chr(9) & " function setid()" & vbCrLf
	Response.Write Chr(9) & " {" & vbCrLf
	Response.Write Chr(9) & " str='';" & vbCrLf
	Response.Write Chr(9) & " if(!window.myform.no.value)" & vbCrLf
	Response.Write Chr(9) & " window.myform.no.value=1;" & vbCrLf
	Response.Write " " & Chr(9) & " for(i=1;i<=window.myform.no.value;i++)" & vbCrLf
	Response.Write Chr(9) & " str+=''+'<input type=""text"" name=""SiteName'+i+'"" value=""下载地址'+i+'"" size=12>&nbsp;URL:<input type=""text"" name=""DownSite'+i+'"" size=40 value="""">&nbsp;"
	i = "'+i+'"
	SelDownServer 0, "serverid" & i
	Response.Write "<BR>';" & vbCrLf
	Response.Write Chr(9) & " window.upid.innerHTML=str+' <font color=red>* 如果选择了下载服务器,请根据相应的下载地址输入软件名称,前面请不要添加“/”。</font>';" & vbCrLf
	Response.Write Chr(9) & " }" & vbCrLf
	Response.Write Chr(9) & " </script>设置添加地址的数量:&nbsp;<input type=""text"" name=""no"" value=""1"" size=2>&nbsp;&nbsp;<input type=""button"" name=""Button"" class=button onclick=""setid();"" value=""添加下载地址数"">"
	Response.Write " <font color=red>* 如果没有选择下载服务器请输入完整的下载路径</font> "
	Response.Write " </td>"
	Response.Write " </tr>"
	Response.Write " <tr height=""22"">"
	Response.Write " <td colspan=""2"" id=""upid"" class=""forumRow""> </td>"
	Response.Write " </tr>"
	Response.Write " <tr>"
	Response.Write " <td colspan=2 class=""forumRow""><iframe name=""ad"" frameborder=0 width=""100%"" height=42 scrolling=no src=upfile.asp?type=file></iframe> </td></tr>"
	Response.Write " <tr>"
	Response.Write " <td height=""22"" align=""right"" class=""forumRowHighlight"">&nbsp;</td>"
	Response.Write " <td align=""center"" class=""forumRow"">"
	Response.Write " <input type=button class=button value=""查看内容长度"" name=Button onclick=""checklength(document.myform);"">&nbsp;&nbsp;"
	Response.Write " <input type=reset name=Submit2 class=button value=""清 除"" onclick=""ClearReset()"">&nbsp;&nbsp;"
	Response.Write " <input type=Submit class=button value=""提 交"" name=Submit>&nbsp;&nbsp;"
	Response.Write " </td>"
	Response.Write " </tr>"
	Response.Write "</form>"
	Response.Write "</table>"
	Response.Write "</div>"
	If CInt(Newasp.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
		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 Len(Request.Form("RunSystem")) = 0 Then
		Founderr = True
		ErrMsg = ErrMsg + "<li>运行环境不能为空!</li>"
		Exit Sub
	End If
	If Len(Request.Form("SoftSize")) = 0 Then
		Founderr = True
		ErrMsg = ErrMsg + "<li>大小不能为空!</li>"
		Exit Sub
	End If
	If CInt(Newasp.Setting(19)) = 1 Then
		TxtContent = Request.Form("content1")
	Else
		TxtContent = Newasp.HTMLEncodes(Request.Form("content1"))
	End If
End Sub


Private Sub saveAdd()
	Call checksave
	If Founderr = False Then
		SQL = "select * from NC_SoftInfo where (softid is null)"
		Rs.Open SQL, Conn, 1, 3
		Rs.addnew
		Rs("softname") = Request.Form("softname")
		Rs("SoftVer") = 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") = Request.Form("RunSystem")
		'Rs("impower") = Request.Form("impower")
		Rs("zhuyan") = Request.Form("zhuyan")
		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") = Session(Newasp.CacheName & "AdminName")
		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") = Newasp.NowTime
		Rs("SoftTime") = Newasp.NowTime
		Rs("isUpdate") = 1
		Rs("isLock") = 0
		Rs.Update
		Rs.Close
		Rs.Open "select top 1 softid from NC_SoftInfo 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)
		Newasp.Execute SQL
		SQL = "update NC_softSort set SoftNum=SoftNum+1,isUpdate=1 where depth=0 and rootid=" & strSortid(0)
		Newasp.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 & "")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -