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

📄 admin_down.asp

📁 本系统(共享国际学校管理系统)具有的主要功能: 1、导航内容:学校概况、校内新闻、学校内务、德育工作、 教育科研、教师之窗、学生园地、学校党建、 校园相册、校内论坛(导航内容后台生成,可随
💻 ASP
📖 第 1 页 / 共 4 页
字号:
  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 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")
url1=trim(replace(request.form("url1"),"'",""))
url2=trim(replace(request.form("url2"),"'",""))
url3=trim(replace(request.form("url3"),"'",""))
url4=trim(replace(request.form("url4"),"'",""))

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)
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 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">
                  </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> 
                <td>推荐程度</td>
                <td>
                    <select name="commend">
		     <option value="5">5stars</option>
                      <option value="4">4stars</option>
                      <option value="3" selected>3stars</option>
                      <option value="2">2stars</option>
                      <option value="1">1stars</option>
                      <option value="0">0stars</option>
                    </select>
                  </td>
              </tr>
              <tr class=lanyuds> 
                <td>所属分类</td>
                <td>
                    <select name="of">
                      <%
dim catname,classname,catid,classid
Set rs = Server.CreateObject("ADODB.Recordset")
sql="SELECT * FROM d_cat"
rs.OPEN sql,Conn,1,1
if not (rs.eof and rs.bof) then
rs.movefirst
do while not rs.eof
sql="select * from d_class where cat_id="&rs("cat_id")
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.OPEN sql,Conn,1,1
if not (rs2.eof and rs2.bof) then
do while not rs2.eof
catid=rs("cat_id")
classid=rs2("class_id")
catname=rs("cat_name")
classname=rs2("class_name")
%>
                      <option value='<%=rs2("class_id")%>'><%=rs2("class_name")%>(<%=rs("cat_name")%>)</option>
<%
rs2.movenext
loop
end if
rs.movenext
rs2.close
set rs2=nothing
loop
end if
%>
                    </select>
                  </td>
              </tr>
              <tr class=lanyuds> 
                <td>演示地址</td>
                <td>
                    <input type="text" name="demo" size="60" class="textarea">
                  </td>
              </tr>
              <tr class=lanyuds> 
                <td>主页地址</td>
                <td>
                    <input type="text" name="home" size="60" class="textarea" value="">
                  </td>
              </tr>
              <tr class=lanyuds> 
                <td>图片地址</td>
                <td>
                    <input type="text" name="showpic" size="60" class="textarea" value="">
                  </td>
              </tr>
             <tr class=lanyuds> 
              <td> 上传图片: </td>
              <td align="left" height="25"><iframe frameborder=0 width=290 height=25 scrolling=no src="upload.asp?action=downpic"></iframe></td>
            </tr>
              <tr class=lanyuds> 

⌨️ 快捷键说明

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