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

📄 softpost.asp

📁 这是一套基于WEB的网站管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="config.asp"-->
<!--#include file="check.asp"-->
<!--#include file="head.inc"-->
<%
Call InnerLocation("发布软件")

If CInt(GroupSetting(11)) = 0 Then
	ErrMsg = ErrMsg + "<li>对不起!您没有发布软件的权限,如需要该权限请联系管理员。</li>"
	Founderr = True
End If
Dim Rs,SQL,i,SoftID
ChannelID=2
Dim Action:Action = LCase(Request("action"))
Select Case Trim(Action)
	Case "save"
		Call SaveNewSoft
	Case "view"
		Call SoftView
	Case Else
		Call showmain
End Select
If Founderr = True Then
	Call Returnerr(ErrMsg)
End If

Sub showmain()
	If Founderr = True Then Exit Sub
	Dim Channel_Setting
	Channel_Setting = Split(Newasp.Channel_Setting, "|||")
%>
<script language=JavaScript>
var _maxCount = '<%=CLng(GroupSetting(17))%>';
function ToRunsystem(addTitle) {
	var revisedTitle;
	var currentTitle;
	currentTitle = document.myform.RunSystem.value;
	revisedTitle = currentTitle+addTitle;
	document.myform.RunSystem.value=revisedTitle;
	document.myform.RunSystem.focus();
	return; 
}
function doSubmit(){
	if (document.myform.SoftName.value==""){
		alert("软件名称不能为空!");
		return false;
	}
	if (document.myform.DownAddress.value==""){
		alert("最起码要填写一个下载地址吧!");
		return false;
	}
	if (document.myform.SiteName.value==""){
		alert("下载名称不能为空!");
		return false;
	}
	if (document.myform.ClassID.value==""){
		alert("该一级分类已经有下属分类,请选择其下属分类!");
		return false;
	}
	if (document.myform.ClassID.value=="0"){
		alert("该分类是外部连接,不能添加内容!");
		return false;
	}
	if (document.myform.RunSystem.value==""){
		alert("软件运行环境不能为空!");
		return false;
	}
	if (document.myform.SoftType.value==""){
		alert("软件类型不能为空!");
		return false;
	}
	if (document.myform.SoftSize.value==""){
		alert("软件大小还没有填写!");
		return false;
	}
	<%If CInt(GroupSetting(2)) = 1 Then%>
	if (document.myform.codestr.value==""){
		alert("请填写验证码!");
		return false;
	}
	<%End If%>
	myform.content1.value = getHTML(); 
	MessageLength = Composition.document.body.innerHTML.length;
	if(MessageLength < 2){
		alert("软件简介不能小于2个字符!");
		return false;
	}
	if(MessageLength > _maxCount){
		alert("软件简介不能超过"+_maxCount+"个字符!");
		return false;
	}
	document.myform.Submit1.disabled = true;
	document.myform.submit();
}
</script>
<div onkeydown=CtrlEnter()>
<table  border="0" align="center" cellpadding="3" cellspacing="1" class="UserTableBorder">
        <tr>
          <th colspan="4">&gt;&gt;发布软件&lt;&lt;</th>
        </tr>
	<form method=Post name="myform" action="softpost.asp">
	<input type="Hidden" name="action" value="save">
	<input type=hidden name=ChannelID value="<%=ChannelID%>">
        <tr>
          <td width="15%" align="right" nowrap class="UserTableRow2"><strong>所属分类</strong></td>
          <td width="85%" class="UserTableRow1">
<%
	Dim sClassSelect
	Response.Write "<select name=""ClassID"" id=""ClassID"">"
	sClassSelect = Newasp.LoadSelectClass(ChannelID)
	Response.Write sClassSelect
	Response.Write "</select>"
%>
	  </td>
        </tr>
        <tr>
          <td align="right" class="UserTableRow2"><strong>软件名称</strong></td>
          <td class="UserTableRow1"><input name="SoftName" type="text" id="SoftName" size="45" value=""> 
          <font color=red>*</font> <strong>软件版本</strong><input name="SoftVer" type="text" id="SoftVer" size="20" value=""></td>
	  </tr>
        <tr>
          <td align="right" class="UserTableRow2"><strong>相关软件</strong></td>
          <td class="UserTableRow1"><input name="Related" type="text" id="Related" size="60" value=""> <font color=red>*</font></td>
        </tr>
        <tr>
          <td align="right" class="UserTableRow2"><strong>运行环境</strong></td>
          <td class="UserTableRow1"><input name="RunSystem" type="text" size="60" value="<%=Channel_Setting(1)%>"><br>
<%
	Dim RunSystem
	RunSystem = Split(Channel_Setting(0), "|")
	For i = 0 To UBound(RunSystem)
		Response.Write "<a href='javascript:ToRunsystem(""" & Trim(RunSystem(i)) & """)'><u>" & Trim(RunSystem(i)) & "</u></a>  "
		If i = 10 Then Response.Write "<br>"
	Next
%>
          </td>
        </tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>软件类型</strong></td>
          <td class="UserTableRow1">
<%
	Dim SoftType
	SoftType = Split(Channel_Setting(2), ",")
	For i = 0 To UBound(SoftType)
		Response.Write "<input type=""radio"" name=""SoftType"" value=""" & Trim(SoftType(i)) & """ "
		If i = 0 Then Response.Write " checked"
		Response.Write ">" & Trim(SoftType(i)) & " "
		If i = 6 Then Response.Write "<br>"
	Next
%>
	  </td>
        </tr>
        <tr>
          <td align="right" class="UserTableRow2"><strong>预览图片</strong></td>
          <td class="UserTableRow1"><input name="SoftImage" id="ImageUrl" type="text" size="60" value=""></td>
        </tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>上传图片</strong></td>
          <td class="UserTableRow1"><iframe name="image" frameborder=0 width='100%' height=55 scrolling=no src=upload.asp?ChannelID=2></iframe></td>
        </tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>软件大小</strong></td>
          <td class="UserTableRow1">
	<input type="text" name="SoftSize" size="14" onkeyup="if(isNaN(this.value))this.value=''" value=''> <input name="SizeUnit" type="radio" value="KB" checked> KB <input type="radio" name="SizeUnit" value="MB"> MB <font color="#FF0000">!</font>
	<strong>解压密码</strong>
	<input type="text" name="Decode" size="15" maxlength="100" value=''> <font color="#808080">没有请留空</font>
          </td>
	</tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>软件性质</strong></td>
          <td class="UserTableRow1">
<%
	Response.Write " <select name=""impower"">"
	Dim ImpowerStr
	ImpowerStr = Split(Channel_Setting(3), ",")
	For i = 0 To UBound(ImpowerStr)
		Response.Write " <option value=""" & ImpowerStr(i) & """>" & ImpowerStr(i) & "</option>"
	Next
	Response.Write " </select>&nbsp;&nbsp;"
	Response.Write " <select name=""Languages"">"
	Response.Write " "
	Dim LanguagesStr
	LanguagesStr = Split(Channel_Setting(4), ",")
	For i = 0 To UBound(LanguagesStr)
		Response.Write " <option value=""" & LanguagesStr(i) & """>" & LanguagesStr(i) & "</option>"
	Next
	Response.Write " </select>&nbsp;&nbsp;"
%>
		<select name="star">
		<option value=5>★★★★★</option>
          	<option value=4>★★★★</option>
          	<option value=3 selected>★★★</option>
		<option value=2>★★</option>
		<option value=1>★</option>
          </select>&nbsp;&nbsp;
	  <strong><font color=blue>注册软件的价格</font></strong>
	  <input name="SoftPrice" type="text" size="10" onkeyup="if(isNaN(this.value))this.value=''" value="0"> 元
	  </td>
	</tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>联系方式</strong></td>
          <td class="UserTableRow1">
		<input name="Contact" type="text" size="33"> 
		<strong>程序主页</strong>
		<input name="Homepage" type="text" size="30">
	  </td>
	</tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>软件作者</strong></td>
          <td class="UserTableRow1">
		<input name="Author" type="text" size="33">
		<strong>注册网址</strong>
		<input name="Regsite" type="text" size="30">
	  </td>
        <tr>
          <td align="right" class="UserTableRow2"><strong>软件简介</strong></td>
          <td class="UserTableRow1"><textarea name='content1' id='content1' style='display:none'></textarea>
		<script Language=Javascript src="../editor/editor1.js"></script></td>
        </tr>
	        </tr>
<%
	If CInt(GroupSetting(2)) = 1 Then
%>
	<tr>
		<td class=UserTableRow2 align="right"><strong>验证码</strong></td>
		<td class=UserTableRow1><input type="text" name="codestr" maxlength="4" size="4">&nbsp;<img src="../inc/getcode.asp"></td>
	</tr>
<%
	End If
%>
	<tr>
          <td align="right" class="UserTableRow2"><strong>禁止评论</strong></td>
          <td class="UserTableRow1"><input name="ForbidEssay" type="checkbox" id="ForbidEssay" value="1">&nbsp;&nbsp;&nbsp;&nbsp;
	  <strong>立即发布</strong>
	  <input name="isAccept" type="checkbox" id="isAccept" value="1" disabled> 是(<font color=blue>如果选中的话将直接发布,否则审核后才能发布。</font>)</td>
        </tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>下载地址</strong></td>
          <td class="UserTableRow1"><input name="SiteName" type="text" size="15" value="下载地址1">
	  <input name="DownAddress" type="text" id="filePath" size="60" value=""> <font color=red>*</font></td>
        </tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>下载地址</strong></td>
          <td class="UserTableRow1"><input name="SiteName" type="text" size="15" value="下载地址2">
	  <input name="DownAddress" type="text" size="60" value=""></td>
        </tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>下载地址</strong></td>
          <td class="UserTableRow1"><input name="SiteName" type="text" size="15" value="下载地址3">
	  <input name="DownAddress" type="text" size="60" value=""></td>
        </tr>
	<tr>
          <td align="right" class="UserTableRow2"><strong>文件上传</strong></td>
          <td class="UserTableRow1"><iframe name="file1" frameborder=0 width='100%' height=45 scrolling=no src=upfile.asp?ChannelID=<%=ChannelID%>></iframe></td>
        </tr>
        <tr align="center">
          <td colspan="4" class="UserTableRow2">
	  <input type="button" name="Submit4" onclick="javascript:history.go(-1)" value="返回上一页" class=Button>
	  <input type="button" name="Submit1" value="现在发布" class=Button onclick="doSubmit();"></td>
        </tr></form>
      </table></div>
<%
End Sub

Function FormatDownAddress(ByVal str)
	If Trim(str) = ""  Or Trim(str) = "|||" Then
		FormatDownAddress = ""
		Exit Function
	End If
	Dim strDownAddress,sDownAddress,sDownSiteName
	Dim n,AddressNum,strAddress,strDownName,strTemp
	On Error Resume Next

⌨️ 快捷键说明

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