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

📄 down_admin_add.asp

📁 伟业科技企业自动建站程序
💻 ASP
字号:
<%@language=vbscript codepage=936 %>
<!--#include file="Admin.asp"-->
<!--#include file="Conndb.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass_down order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    

function CheckForm()
{
  if (editor.EditMode.checked==true)
	  document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
  else
	  document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML; 

  if (document.myform.Title.value=="")
  {
    alert("下载标题不能为空!");
	document.myform.Title.focus();
	return false;
  }
  if (document.myform.Product_Id.value=="")
  {
    alert("下载编号不能为空!");
	document.myform.Key.focus();
	return false;
  }
  if (document.myform.Key.value=="")
  {
    alert("下载地址不能为空!");
	document.myform.Key.focus();
	return false;
  }
  if (document.myform.Content.value=="")
  {
    alert("描述内容不能为空!");
	editor.HtmlEdit.focus();
	return false;
  }
  return true;  
}
function loadForm()
{
  editor.HtmlEdit.document.body.innerHTML=document.myform.Content.value;
  return true
}
</script>
<!-- #include file="Inc/Head.asp" -->
<body onLoad="javascipt:setTimeout('loadForm()',1000);">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="150" align="center" valign="top"> <table width="150" height="100%" border="0" cellpadding="0" cellspacing="0" class="HeaderTdStyle">
        <tr> 
          <td align="center" valign="top"><table width="100%" height="24" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td align="center">功能菜单</td>
              </tr>
            </table>
            <table width="100%" height="90%" border="0" cellpadding="0" cellspacing="0" class="MenuBg">
              <tr> 
                <td align="center" valign="top"><br> <table width="90%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="16%"><img src="../Img/Left_1.gif" width="28" height="11"></td>
                      <td width="84%" height="20"><font color="#FFFF00">系统管理</font></td>
                    </tr>
                  </table>
                  <table width="90%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="34%" height="20" align="right"><img src="../Img/Left_1_1.gif" width="29" height="16"></td>
                      <td width="66%" valign="bottom"><a href="Down_admin_add.asp">添加下载程序</a><a href="Manage_Admin.asp"></a></td>
                    </tr>
                  </table>
                  <table width="90%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="34%" height="20" align="right"><img src="../Img/Left_1_1.gif" width="29" height="16"></td>
                      <td width="66%" valign="bottom"><a href="Down_Manage.asp">管理下载程序</a><a href="Manage_backup.asp"></a></td>
                    </tr>
                  </table>
                  <table width="90%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="34%" height="20" align="right"><img src="../Img/Left_1_1.gif" width="29" height="16"></td>
                      <td width="66%" valign="bottom"><a href="Down_ClassManage.asp">下载程序类别</a></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
    <td width="862" align="center" valign="top">
	<br>
      <br>
      <b>添 加 软 件</b><br>
      <br>
      <br>
<form method="POST" name="myform" onSubmit="return CheckForm();" action="Down_Save.asp?action=add" target="_self">
        <table width="620" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
          <tr> 
            <td height="20" align="center" class="title">&nbsp;</td>
          </tr>
          <tr align="center"> 
            <td class="tdbg"> <table width="100%" border="0" cellpadding="0" cellspacing="2">
                <tr> 
                  <td width="150" height="22" align="right" bgcolor="#C0C0C0">所属类别:</td>
                  <td bgcolor="#E3E3E3"> 
                    <%
        sql = "select * from BigClass_down"
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%>
                    <select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
                      <option selected value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
                      <%
			dim selclass
		    selclass=rs("BigClassName")
        	rs.movenext
		    do while not rs.eof
			%>
                      <option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
                      <%
		        rs.movenext
    	    loop
		end if
        rs.close
			%>
                    </select> <select name="SmallClassName">
                      <option value="" selected>不指定小类</option>
                      <%
			sql="select * from SmallClass_down where BigClassName='" & selclass & "'"
			rs.open sql,conn,1,1
			if not(rs.eof and rs.bof) then
			%>
                      <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
                      <% rs.movenext
				do while not rs.eof%>
                      <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
                      <%
			    	rs.movenext
				loop
			end if
	        rs.close
			%>
                      <%
			ranNum=int(9*rnd)+10
			iddata=month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
			%>
                    </select> </td>
                </tr>
                <tr> 
                  <td width="150" height="22" align="right" bgcolor="#C0C0C0">软件编号:</td>
                  <td bgcolor="#E3E3E3"> <input name="Product_Id" type="text"
           id="Product_Id2" value="<%=iddata%>" size="10" maxlength="10"> <font color="#FF0000">*软件编号不可以相同,如你不能确定会重复,请勿改动他!</font></td>
                </tr>
                <tr> 
                  <td width="150" height="22" align="right" bgcolor="#C0C0C0">软件名称:</td>
                  <td bgcolor="#E3E3E3"> <input name="Title" type="text"
           id="Title2" size="50" maxlength="80"> <font color="#FF0000">*</font></td>
                </tr>
                <tr> 
                  <td width="150" height="22" align="right" bgcolor="#C0C0C0">软件地址:</td>
                  <td bgcolor="#E3E3E3"> <input name="Key" type="text" id="Key2" size="50" maxlength="80"> <font color="#FF0000">*</font><br>
                    </td>
                </tr>
                <tr> 
                  <td width="150" height="22" align="right" valign="middle" bgcolor="#C0C0C0">软件说明:</td>
                  <td bgcolor="#E3E3E3"> </td>
                </tr>
                <tr bgcolor="#E3E3E3"> 
                  <td colspan="2" align="right" valign="middle"> <div align="left"> 
                      <textarea name="Content" style="display:none"></textarea>
                      <iframe ID="editor" src="../editor.asp" frameborder=1 scrolling=no width="620" height="405"></iframe>
                    </div></td>
                </tr>
                <tr> 
                  <td align="right" bgcolor="#C0C0C0">图片地址: 
                    <input name="IncludePic" type="hidden" id="IncludePic" value="yes"></td>
                  <td height="96" bgcolor="#E3E3E3"> <input name="DefaultPicUrl" type="text" id="DefaultPicUrl" value="img/nopic.jpg" size="40" maxlength="120"> 
                    <br>
                    展示图片,直接从上传图片中选择: 
                    <select name="DefaultPicList" id="select" onChange="DefaultPicUrl.value=this.value;">
                      <option selected>不指定首页图片</option>
                    </select>
                    <input name="UploadFiles" type="hidden" id="UploadFiles2">  
                  </td>
                </tr>
                <tr> 
                  <td width="150" height="22" align="right" bgcolor="#C0C0C0">已通过审核:</td>
                  <td bgcolor="#E3E3E3"> <input name="Passed" type="checkbox" id="Passed2" value="yes" checked>
                    是<font color="#0000FF">(如果选中的话将直接发布)</font></td>
                </tr>
                <tr> 
                  <td width="150" height="22" align="right" bgcolor="#C0C0C0">录入时间:</td>
                  <td bgcolor="#E3E3E3"> <input name="UpdateTime" type="text" id="UpdateTime2" value="<%=now()%>" maxlength="50">
                    当前时间为:<%=now()%> 注意不要改变格式。</td>
                </tr>
              </table></td>
          </tr>
        </table>
        <div align="center"><p> 
        <input name="Add" type="submit"  id="Add" value=" 添 加 " onClick="document.myform.action='Down_Save.asp?action=add';document.myform.target='_self';">
        &nbsp; 
      </p></div>
</form>
   </td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->

⌨️ 快捷键说明

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