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

📄 softadd_2.asp

📁 电子书下载系统 后台管理:admin/index.asp 超级用户:admin 密码:admin 请在db/usre.asp,admin/usres更新数据库地址,防止他人下载。 建议把.
💻 ASP
字号:
<!--#include file="users.asp" -->
<!--#include file="jl.asp" -->
<!--#include file="../inc/const.asp"-->
<%
'--------将日期转化成文件名--------
function MakedownName(foolcat)
  dim fname
  fname = now()
  fname = replace(fname,"-","")
  fname = replace(fname," ","") 
  fname = replace(fname,":","")
  fname = replace(fname,"PM","")
  fname = replace(fname,"AM","")
  fname = replace(fname,"上午","")
  fname = replace(fname,"下午","")
  fname = int(fname) + int((10-1+1)*Rnd + 1)
  if Instr(foolcat,"zip") >0 Then
     MakedownName=fname & ".zip"
  elseif Instr(foolcat,"rar") >0 Then
     MakedownName=fname & ".rar"
  elseif Instr(foolcat,"exe") >0 Then
     MakedownName=fname & ".exe"
  end if
end function

%> 

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>添 加 下 载 程 序</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from Nclass order by Nclassid asc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("Nclassid"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</SCRIPT>
<SCRIPT language="javascript">
<!--
function CheckForm()
{
	document.myform.txtcontent.value=document.myform.doc_html.value;
	return true
}
//-->
</SCRIPT>
<body bgcolor=#0066FF>
<%
	Set obj = Server.CreateObject("LyfUpload.UploadFile")
    	obj.maxsize=10000000
    	obj.extname="zip,rar,exe"
	varfname1=MakedownName(obj.filetype("file1"))
	ss=obj.SaveFile("file1",""&downdir&"", false,varfname1)
	aa1=obj.FileSize
	if ss= "3" or aa = "3" then
   		Response.Write ("文件名重复!")
	elseif ss= "0" or aa = "0" then
   		Response.Write ("文件尺寸过大!")
	elseif ss = "1" or aa = "1" then
 		Response.Write ("文件不是zip/rar文件!")
	elseif ss = "" then
 		Response.Write ("文件上传失败!")
	else
		Response.Write "选择的文件已经上载到服务器!<br>" 
		Response.Write("文件名1:" & varfname1) & "<br>" 
		Response.Write("<br>文件大小:" & aa1) & "<br>"  
	end if
%>
<form method="POST" name="myform"  action="adminsave.asp?action=add">
  <table width="602" border="0" align="center" cellspacing="1" bgcolor="#000000" cellpadding="1">
    <tbody> 
    <tr align="center" bgcolor="#999999"> 
      <td colspan="4" height="25"><b><font color="#FFFFFF">添 加 下 载 程 序</font></b></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td align="right" width="80" nowrap height="30"><b><font color="#FF0000">软件类型</font>:</b></td>
      <td width="208" height="30"> 
        <%
        sql = "select * from class"
        rs.open sql,conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
        <select name="select" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" size="1">
          <option selected value>==请选类型==</option>
          <% 
        do while not rs.eof
%>
          <option value="<%=trim(rs("classid"))%>"><%=trim(rs("class"))%></option>
          <%
        rs.movenext
        loop
	end if
        rs.close
        set rs = nothing
        conn.Close
        set conn = nothing
%>
        </select>
      </td>
      <td align="right" width="83" height="30"><b>选择分类:</b></td>
      <td width="227" height="30"> 
        <select name="select">
          <option selected value>==请选分类==</option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td align="right" width="80" nowrap height="30">软件名称:<br>
      </td>
      <td width="208" height="30"> 
        <input type="text" name="name" size="33" maxlength="100">
      </td>
      <td align="right" width="83" height="30">文件大小:</td>
      <td width="227" height="30"> 
        <input type="text" name="size2" size="20" maxlength="100" value="<%=aa1%>Byte">
        <a href="../admin_uploadfile.asp" target="_blank">上传 </a></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td align="right" width="80" nowrap height="30">授权方式:</td>
      <td width="208" height="30"> 
        <select name="mode" size="1">
          <option value="共享软件">共享软件</option>
          <option value="免费软件" selected>免费软件</option>
          <option value="破解软件">破解软件</option>
        </select>
      </td>
      <td align="right" width="83" height="30">应用平台:</td>
      <td width="227" height="30"> 
        <select name="roof" size="1">
          <option value="Win9x/WinNT/Win2000/WinXP/WinME" selected>Win9x/WinNT/Win2000/WinXP/WinME</option>
          <option value="Win9x/WinNT/Win2000/WinME">Win9x/WinNT/Win2000/WinME</option>
          <option value="Win9x/WinNT/Win2000">Win9x/WinNT/Win2000</option>
          <option value="Win9x/WinNT">Win9x/WinNT</option>
          <option value="Win9x/WinME">Win9x/WinME</option>
          <option value="ASP环境">ASP环境</option>
          <option value="PHP环境">PHP环境</option>
          <option value="CGI环境">CGI环境</option>
          <option value="JSP环境">JSP环境</option>
          <option value="Linux环境">Linux环境</option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td align="right" width="80" nowrap height="30">推荐程度:</td>
      <td width="208" height="30"> 
        <select size=1 name=commend>
          <option value="0stars.gif">0 颗星</option>
          <option value="1stars.gif">1 颗星</option>
          <option value="2stars.gif">2 颗星</option>
          <option value="3stars.gif">3 颗星</option>
          <option value="4stars.gif">4 颗星</option>
          <option value="5stars.gif" selected>5 颗星</option>
        </select>
      </td>
      <td align="right" width="83" height="30">开发商主页:</td>
      <td width="227" height="30"> 
        <input type="text" name="homepage" value="http://www.gy16.com">
      </td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td align="right" width="80" nowrap height="30">推荐:</td>
      <td width="208" height="30"> 
        <input type="checkbox" name="tj" value="on">
      </td>
      <td align="right" width="83" height="30">精品:</td>
      <td width="227" height="30"> 
        <input type="checkbox" name="hot2" value="on">
      </td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td align="right" width="80" nowrap height="30">图片地址:</td>
      <td colspan="3" height="30"> 
        <input type="text" name="pic" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td align="right" width="80" nowrap height="30">程序简介:</td>
      <td colspan="3" height="30"> <font color="#FF0000"> 
        <textarea rows="6"  name="show" cols="82" class="smallarea"></textarea>
        </font> </td>
    </tr>
    <tr bgcolor="#00CCFF"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载地址1:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="down1" size="82" class="smallinput" maxlength="100" value="<%=downdir1%><%=varfname1%>">
      </td>
    </tr>
    <tr bgcolor="#00CCFF"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载1说明:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="txt1" size="82" class="smallinput" maxlength="100" value="本地下载1">
      </td>
    </tr>
    <tr bgcolor="#00CC99"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载地址2:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="down2" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#00CC99"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载2说明:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="txt2" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#CC9999"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载地址3:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="down3" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#CC9999"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载3说明:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="txt3" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#FFCC00"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载地址4:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="down4" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#FFCC00"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载4说明:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="txt4" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#009999"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载地址5:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="down5" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    <tr bgcolor="#009999"> 
      <td align="right" width="80" nowrap height="30"> 
        <div align="center">下载5说明:</div>
      </td>
      <td colspan="3" height="30"> 
        <input type="text" name="txt5" size="82" class="smallinput" maxlength="100">
      </td>
    </tr>
    </tbody> 
  </table>
  <div align="center"><center><p><input type="submit" value=" 添 加 "
  name="cmdok" class="buttonface">&nbsp; <input type="reset" value=" 清 除 "
  name="cmdcancel" class="buttonface"></p>
  </center></div>
		
</form>
</body>
</html>

⌨️ 快捷键说明

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