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

📄 admin_down.asp

📁 本程序采用花香内核
💻 ASP
📖 第 1 页 / 共 4 页
字号:
if request("of")<>"" then
		Set rsclass = Server.CreateObject("ADODB.Recordset")
		sqlclass="SELECT * FROM d_class where class_id="&request("of")
		rsclass.OPEN sqlclass,Conn,1,1
		rs("soft_classid")=rsclass("class_id")
		rs("soft_classname")=rsclass("class_name")
		rs("soft_catid")=rsclass("cat_id")
		set rscat = Server.CreateObject("ADODB.Recordset")
		sqlcat="select cat_name from d_cat where cat_id="&rsclass("cat_id")
		rscat.open sqlcat,conn,1,1
		rs("soft_catname")=rscat("cat_name")
		rscat.close
		rsclass.close
		set rscat=nothing
		set rsclass=nothing
else
		founderr=true
Response.Write("<script language=javascript>alert('你必须选择所属分类,或者非法操作!');history.back(1);</script>")
end if
if demo="" then
  rs("soft_demo")=""
else
  rs("soft_demo")=demo
end if
if home="" then
  rs("soft_home")=""
else
  rs("soft_home")=home
end if
if showpic="" then
  rs("soft_showpic")=""
else
  rs("soft_showpic")=showpic
end if
if desc="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写文件简介!');history.back(1);</script>")
else
  rs("soft_desc")=desc
end if
if url1="" and url2="" and url3="" and url4="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写下载地址!');history.back(1);</script>")
end if
if url1="" then
  rs("soft_url1")=""
else
  rs("soft_url1")=url1
end if
if url2="" then
  rs("soft_url2")=""
else
  rs("soft_url2")=url2
end if
if url3="" then
  rs("soft_url3")=""
else
  rs("soft_url3")=url3
end if
if url4="" then
  rs("soft_url4")=""
else
  rs("soft_url4")=url4
end if
if cint(points)<>"" then
  rs("points")=cint(points)
end if
  rs("Grade")=cint(uGrade)
  rs("tjuser")=tjuser
if founderr then
  call diserror()
  response.end
else
  rs.update
  rs.close
  set rs=nothing
  sql="update allcount set softcount = softcount + 1"
  conn.execute(sql)
  
  response.redirect "admin_down.asp?action=list"
end if
end if

'edit
if request.Form("action")="editsoft" then
if request.Form("id")="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
else
  if not isInteger(request.form("id")) then
    founderr=true
Response.Write("<script language=javascript>alert('非法的软件id参数。');history.back(1);</script>")
  end if
end if
if founderr then
  call diserror()
  response.End
end if
sql="select * from soft where soft_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
soft_name=trim(replace(request.form("name"),"'",""))
soft_size=trim(replace(request.form("size"),"'",""))
soft_mode=trim(replace(request.form("mode"),"'",""))
roof=trim(replace(request.form("roof"),"'",""))
commend=cint(request.form("commend"))
demo=trim(replace(request.form("demo"),"'",""))
home=trim(replace(request.form("home"),"'",""))
showpic=trim(replace(request.form("showpic"),"'",""))
desc=trim(replace(request.form("desc"),"'",""))
downisbest=request.form("isbest")
downistop=request.form("istop")
url1=trim(replace(request.form("url1"),"'",""))
url2=trim(replace(request.form("url2"),"'",""))
url3=trim(replace(request.form("url3"),"'",""))
url4=trim(replace(request.form("url4"),"'",""))
uGrade=request.form("Grade")
points=request.form("points")
tjuser=request.form("tjuser")
if soft_name="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写文件名称!');history.back(1);</script>")
else
  rs("soft_name")=soft_name
end if
if soft_size="" then
  rs("soft_size")="未知"
else
  rs("soft_size")=soft_size
end if
if soft_mode="" then
  rs("soft_mode")=""
else
  rs("soft_mode")=soft_mode
end if
if roof="" then
  rs("soft_roof")=""
else
  rs("soft_roof")=roof
end if
if commend<1 then
  founderr=true
Response.Write("<script language=javascript>alert('你必须选择文件推荐程度!');history.back(1);</script>")
else
  rs("soft_commend")=commend
end if
rs("isbest")=cint(downisbest)
rs("istop")=cint(downistop)
if request("of")<>"" then
		Set rsclass = Server.CreateObject("ADODB.Recordset")
		sqlclass="SELECT * FROM d_class where class_id="&request("of")
		rsclass.OPEN sqlclass,Conn,1,1
		rs("soft_classid")=rsclass("class_id")
		rs("soft_classname")=rsclass("class_name")
		rs("soft_catid")=rsclass("cat_id")
		set rscat = Server.CreateObject("ADODB.Recordset")
		sqlcat="select cat_name from d_cat where cat_id="&rsclass("cat_id")
		rscat.open sqlcat,conn,1,1
		rs("soft_catname")=rscat("cat_name")
		rscat.close
		rsclass.close
		set rscat=nothing
		set rsclass=nothing
else
		founderr=true
Response.Write("<script language=javascript>alert('你必须选择所属分类,或者非法操作!');history.back(1);</script>")
end if
if demo="" then
  rs("soft_demo")=""
else
  rs("soft_demo")=demo
end if
if home="" then
  rs("soft_home")=""
else
  rs("soft_home")=home
end if
if showpic="" then
  rs("soft_showpic")=""
else
  rs("soft_showpic")=showpic
end if
if desc="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写文件简介!');history.back(1);</script>")
else
  rs("soft_desc")=desc
end if
if url1="" and url2="" and url3="" and url4="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须填写下载地址!');history.back(1);</script>")
end if
if url1="" then
   rs("soft_url1")=""
else
  rs("soft_url1")=url1
end if
if url2="" then
  rs("soft_url2")=""
else
  rs("soft_url2")=url2
end if
if url3="" then
  rs("soft_url3")=""
else
  rs("soft_url3")=url3
end if
if url4="" then
  rs("soft_url4")=""
else
  rs("soft_url4")=url4
end if
  rs("Grade")=cint(uGrade)
  rs("points")=cint(points)
  rs("tjuser")=tjuser
if cint(downisbest)=1 then
sql="UPDATE [user] SET points = points + 30 where username='"&tjuser&"'"
conn.execute (sql)
end if
if cint(downistop)=1 then
sql="UPDATE [user] SET points = points + 50 where username='"&tjuser&"'"
conn.execute (sql)
end if
if founderr then
  call diserror()
  response.end
else
  rs.update
  rs.close
  set rs=nothing
  response.redirect "admin_down.asp?action=list"
end if
end if

'delete
if request.Form("action")="delsoft" then
if request.Form("id")="" then
  founderr=true
Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
else
  if not isInteger(request.form("id")) then
    founderr=true
Response.Write("<script language=javascript>alert('非法的文件id参数。');history.back(1);</script>")
  end if
end if
if founderr then
  call diserror()
  response.End
end if
sql="select * from soft where soft_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
  rs.delete
  rs.close
  set rs=nothing
  sql="update allcount set softcount = softcount - 1"
  conn.execute(sql)
  
  response.redirect "admin_down.asp?action=list"
end if
end if
sql="select * from d_cat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if request.QueryString("action")="newsoft" then%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
              <form name="form1" method="post" action="admin_down.asp?action=list">
			  <tr class=lanyuss> 
                <td colspan="2">新增软件</td>
              </tr>
              <tr  class=lanyuds> 
                <td width="16%">软件名称</td>
                <td width="84%">
                    <input type="text" name="name" size="40" class="textarea"> 添加人:<input type="text" name="tjuser" size="10" value="admin">
                  </td>
              </tr>
              <tr class=lanyuds> 
                <td>软件大小</td>
                <td><input type="text" name="size" size="20" class="textarea"></td>
              </tr>
              <tr class=lanyuds> 
                <td>授权方式</td>
                <td>
                    <select name="mode">
		     <option value="免费软件" selected>免费软件</option>
                      <option value="共享软件">共享软件</option>
                      <option value="汉化软件">汉化软件</option>
                      <option value="破解软件">破解软件</option>
                    </select>
                  </td>
              </tr>
              <tr class=lanyuds> 
                <td>应用平台</td>
                <td>
                    <select name="roof">
		     <option value="Win9x/Me">Win9x/Me</option>
		     <option value="IIS环境" selected>IIS环境</option>
                      <option value="WinNT/2000/XP">WinNT/2000/XP</option>
                      <option value="Win9x/Me/NT/2000/XP">Win9x/Me/NT/2000/XP</option>
                    </select>
                  </td>
              </tr>
              <tr class=lanyuds> 

⌨️ 快捷键说明

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