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

📄 publish.asp

📁 动感系统XP Access版,服务器需要安装Jmail 组件 配置SendMessages.asp 最后部分的参数
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/CHAR.asp" -->
<!-- #include file="inc/function.asp" -->
<!-- #include file="Create_Soft_View_inc.asp" -->
<% strHeader=replace(strHeader,"</HEAD>","</HEAD>"&Copyright&"")
strTitle=System_info(0)&" → 软件发布"
strHeader=replace(strHeader,"$Title$",""&strTitle&"")
Response.Write(replace(strHeader,"../","./")) %>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{

if (myform.SoftName.value == "")
	{
		alert("软件名称不能为空!");
		myform.SoftName.focus();
		return (false);
	}

	if (myform.catalogid.value == "")
	{
		alert("软件所属分类不能为空!");
		myform.catalogid.focus();
		return (false);
	}

	if (myform.System.value == "")
	{
		alert("软件运行环境不能为空!");
		myform.System.focus();
                return (false);
	}
	if (myform.SoftSize.value == "")
	{
		alert("软件大小不能为空!");
		myform.SoftSize.focus();
                return (false);
	}
	
	if (checktext(myform.SoftSize.value))
	{
		alert("软件大小要求输入数字即可 !");
	myform.SoftSize.select();
    myform.SoftSize.focus();
	myform.SoftSize.value="";
		return (false);
	}
	
	if (myform.Rank.value == "")
	{
		alert("软件等级不能为空!");
		myform.Rank.focus();
                return (false);
	}
	if (myform.LicenceType.value == "")
	{
		alert("软件授权类型不能为空!");
		myform.LicenceType.focus();
                return (false);
	}
	
	if (myform.SoftType.value == "")
	{
		alert("软件类型不能为空!");
		myform.SoftType.focus();
                return (false);
	}
	if (myform.Language.value == "")
	{
		alert("软件语言不能为空!");
		myform.Language.focus();
                return (false);
	}	

	if (myform.content.value == "")
	{
		alert("软件简介内容不能为空!");
		myform.content.focus();
                return (false);
	}

}

function checktext(text)
{
	allValid = false;
		
	var checkOK = "0123456789.";

	for (i = 0;  i < text.length;  i++)
	{
		ch = text.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
  		allValid = true;
			break;
		}
	}
return allValid;
}
//-->
</script>
<SCRIPT language=javaScript src="inc/ubbcode.js" type=text/javascript></SCRIPT>
<BODY leftMargin=0 topMargin=0 onkeydown='if(event.keyCode==13 && event.ctrlKey)myform.submit()'>
<table width="770" border="0" align="center" cellspacing="1" bgcolor="#CCCCCC">
  <tr bgcolor="#FFFFFF"> 
    <td width="22%" align="center" valign="top" class="tdbgleft"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr> 
          <td align="center" bgcolor="#F5F5F5"><strong><font color="#FF0000">软件发布协议</font></strong></td>
        </tr>
        <tr>
          <td>   软件作者在此发布软件,就表明授权该作品给于[动感网络下载站]网络传播权。软件作者必须保障所提供的软件中不含有可能损害他人利益的附加程序(如病毒、木马等)。[动感网络下载站]保证对作者所提供的软件作品不做任何改动,保持“原样”提供;但[动感网络下载站]不保证本站提供的下载资源的准确性、安全性和完整性,也不提供任何有关软件安装、使用方面的服务;同时[动感网络下载站]也不承担用户因使用这些下载软件对自己和他人造成任何形式的损失或伤害。<br>
              <font color="#FF0000">如果同意上述协议请点击“提交”按钮</font> </td>
        </tr>
      </table>
    </td> 
    <td valign="top"  class="b1"> 
<%
  set rs=server.createobject("adodb.recordset")
  Set fso = Server.CreateObject("Scripting.FileSystemObject")
  select case request("action")
  case "add"
       call SaveAdd()
  case "modify"  
       call SaveModify()
  case "edit" 
       isEdit=True
       call chkUser(isEdit)
  case else
       isEdit=False
	   call chkUser(isEdit) 
  end select   
  Set fso=nothing
  set rs=nothing
  
sub chkUser(isEdit)
	if isEdit=True then
		if isnull(cUserName) or cUserName="" then
			msgtitle="软件作品入库操作"
			msginfo="<li>操作错误,你没有登录系统!<li><a href=""User.Asp"" >点此登录系统</a></li>" 
			call Sysmsg(msgtitle,msginfo)
		elseif not chkMaster(cUserName) then
			msgtitle="软件作品入库操作"
			msginfo="<li>操作错误,你不是系统管理员,没有权限进行此项操作!</li>" 
			call Sysmsg(msgtitle,msginfo) 
		else
			call myform(isEdit)
		end if
	elseif isEdit=False then
		call myform(isEdit)
	end if
end sub
      
sub SaveModify()
   if not isnull(Request.Form("update_SoftID")) and Request.Form("update_SoftID")<>"" then 
	  sql="select * from SoftDown_SoftInfo where SoftID="&Request.Form("update_SoftID")
	  rs.open sql,conn,1,3
   else
	  sql="select * from SoftDown_SoftInfo where (SoftID is null)"
	  rs.open sql,conn,1,3
  	  rs.addnew
	  rs("SoftTime")=Now()
   end if
	rs("SoftName")=checkstr(request.form("SoftName"))
	rs("SoftVer")=checkstr(request.form("SoftVer"))
	splCatalogID=split(trim(request.form("catalogid")),",")
	rs("RootID")=splCatalogID(0)
	rs("CatalogID")=splCatalogID(1)
	rs("CatalogName")=splCatalogID(2)
	rs("Content")=request.form("content")
	rs("Images")=checkstr(trim(request.form("Images")))
	rs("SoftViewImg")=checkstr(Trim(Request.Form("SoftViewImg")))
	rs("SoftFrom")=checkstr(trim(request.form("SoftFrom")))
	rs("Email")=checkstr(trim(request.form("Email")))
	rs("RegURL")=checkstr(trim(request.form("RegURL")))
	rs("LicenceType")=trim(request.form("LicenceType"))
	if Trim(Request.Form("SizeUnit"))="MB" then
		rs("SoftSize")=trim(request.form("SoftSize"))*1024
	else
		rs("SoftSize")=trim(request.form("SoftSize"))
	end if
	rs("Language")=Trim(Request.Form("Language"))
	rs("System")=trim(request.form("System"))
	rs("Rank")=trim(request.form("Rank"))
	rs("SoftType")=trim(request.form("SoftType"))
	if Request.Form("isCommend")=1 then rs("isCommend")=1 else rs("isCommend")=0 end if
	if Request.Form("isTop")=1 then rs("isTop")=1 else rs("isTop")=0 end if
	rs.update
	pubSoftID=rs("SoftID")
	rs.close
	   
	if Request.Form("address")<>"" then
		splLinkName=split(Request.Form("LinkName"),",")
		splAddress=split(Request.Form("Address"),",")
		splTypeID=split(Request.Form("TypeID"),",")
		splSpecial=split(Request.Form("Special"),",")
		splUserClass=split(Request.Form("UserClass"),",")
		for iii = 0 to ubound(splAddress)
		if not (splAddress(iii)="" or splAddress(iii)=" ") then
			sql="select * from SoftDown_SoftLink where (ID is null)"
			rs.open sql,conn,1,3
			rs.addnew
			rs("LinkName")=Trim(splLinkName(iii))
			rs("Address")=Trim(splAddress(iii))
			rs("SoftID")=pubSoftID
			rs("Hits")=0
			rs("DateTime")=Now()
			rs("TypeID")=Trim(splTypeID(iii))
			rs("Special")=Trim(splSpecial(iii))
			rs("UserClass")=Trim(splUserClass(iii))
			rs.update
			rs.close
		end if
		next
	end if
	   
	sql="select ID,Header,Footer,SoftView_htm from SoftDown_Template where isActive=true"
	isTemplate=false
	rs.open sql,conn,1,1 
	if not(rs.eof and rs.bof) then
		HtmlTemplate=rs("Header")&rs("SoftView_htm")&rs("Footer")
		isTemplate=true
	end if
	rs.close
	if isTemplate then msginfo=Create_SoftView(pubSoftID,HtmlTemplate)	
	
	sql="update SoftDown_Catalog set isUpdate=1 where CatalogId=" & splCatalogID(1)
	conn.execute sql
	sql="update SoftDown_Catalog set isUpdate=1 where CatalogId=" & splCatalogID(0)
	conn.execute sql
	'入库
	sql="update SoftDown_updata set isActive=true where SoftID=" & Trim(Request.Form("SoftID"))
	conn.execute sql
	
	if not isnull(Request.Form("update_SoftID")) and Request.Form("update_SoftID")<>"" then  
		sql="update SoftDown_Catalog set isUpdate=1,softNum=softNum+1 where CatalogId=" & splCatalogID(1)
		conn.execute sql
		sql="update SoftDown_Catalog set isUpdate=1,softNum=softNum+1 where CatalogId=" & splCatalogID(0)
		conn.execute sql
	end if
	
	msgtitle="软件作品入库操作"
	msginfo=msginfo&"<li><a href=""Admin_SoftInfo.asp"">接着继续添加新软件</a></li>"
	msginfo=msginfo&"<li><a href=""Admin_SoftInfo.asp?CatalogID="&splCatalogID(1)&""">继续在分类:"&splCatalogID(2)&"中添加新软件</a></li>"
	call Sysmsg(msgtitle,msginfo) 
end sub 
	
sub SaveAdd()
	sql="select * from SoftDown_updata where (SoftID is null)"
	rs.open sql,conn,1,3
	rs.addnew
	rs("SoftName")=checkstr(request.form("SoftName"))
	rs("SoftVer")=checkstr(request.form("SoftVer"))
	splCatalogID=split(trim(request.form("catalogid")),",")
	rs("RootID")=splCatalogID(0)
	rs("CatalogID")=splCatalogID(1)

⌨️ 快捷键说明

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