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

📄 admin_down.asp

📁 为中小型企业与欲创业的个人提供一个合适的企业型网站
💻 ASP
📖 第 1 页 / 共 2 页
字号:

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"),"'",""))
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"),"'",""))
ReadGrade=cint(request.form("ReadGrade"))
rs("ReadGrade")=ReadGrade

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
rs("isbest")=cint(downisbest)
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 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" style="border-collapse: collapse">
              <form name="form1" method="post" action="admin_down.asp?action=list">
			  <tr> 
                <td colspan="2">新增软件</td>
              </tr>
              <tr> 
                <td width="16%">软件名称</td>
                <td width="84%">
                    <input type="text" name="name" size="40" class="textarea">
                  </td>
              </tr>
              <tr> 
                <td>软件大小</td>
                <td><input type="text" name="size" size="20" class="textarea"></td>
              </tr>
              <tr> 
                <td>程序简介</td>
                <td>
                    <textarea name="desc" cols="65" rows="10" class="textarea">无任何简介</textarea>
                  </td>
              </tr>
              <tr> 
                <td>本地下载</td>
                <td>
                    <input type="text" name="url1" size="60" class="textarea">
                  </td>
              </tr>
             <tr> 
              <td> 上传软件: </td>
              <td align="left" height="25"><iframe frameborder=0 width=290 height=25 scrolling=no src="upload.asp?action=down"></iframe></td>
            </tr>
              <tr> 
                <td>阅读等级</td>
                <td>
                    <select name="ReadGrade" id="ReadGrade">
                      <option value="0" selected>游客可读</option>
                      <option value="1">普通用户</option>
                      <option value="2">VIP 用户</option>
                    </select>
                </td>
              </tr>
              <tr> 
                <td colspan="2" align="center" height="30">
<input type="checkbox" name="isbest" value="1" style="display:none">



<input type="submit" name="Submit" value="确定新增" class="button">
                    <input type="reset" name="Reset" value="清空重填" class="button">
<input type="button" value="返回"  onClick="location.href='admin_down.asp?action=list'" class="button"></td>
              </tr>
			  <input type="hidden" name="action" value="newsoft">
			  <input type="hidden" name="MM_insert" value="true">
			  </form>
            </table>
			<%end if
			if request.QueryString("action")="editsoft" then
			if request.querystring("id")="" then
Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
Response.Write("<script language=javascript>alert('非法的软件ID参数!');history.back(1);</script>")
	response.end
  end if
end if
sql="select * from soft where soft_id="&cint(request.querystring("id"))
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" style="border-collapse: collapse">
              <form name="form1" method="post" action="admin_down.asp?action=list">
                <tr> 
                  <td colspan="2">编辑软件</td>
                </tr>
                <tr> 
                  <td width="16%">软件名称</td>
                  <td width="84%"> <input type="text" name="name" size="40" class="textarea" value="<%=rs2("soft_name")%>"> 
                  </td>
                </tr>
                <tr> 
                  <td>软件大小</td>
                  <td> <input type="text" name="size" size="20" class="textarea" value="<%=rs2("soft_size")%>"> 
                  </td>
                </tr>
                <tr> 
                  <td>程序简介</td>
                  <td> <textarea name="desc" cols="65" rows="10" class="textarea" id="desc"><%=rs2("soft_desc")%></textarea> 
                  </td>
                </tr>
                <tr> 
                  <td>本地下载</td>
                  <td> <input type="text" name="url1" size="60" class="textarea" value="<%=rs2("soft_url1")%>"> 
                  </td>
                </tr>
             <tr> 
              <td> 上传软件: </td>
              <td align="left" height="25"><iframe frameborder=0 width=290 height=25 scrolling=no src="upload.asp?action=down"></iframe></td>
            </tr>
                <tr> 
                  <td>阅读权限</td>
                  <td>
                  
           <select name="ReadGrade" id="ReadGrade">
              <option value="0" <% if  rs2("ReadGrade")=0  then%>selected<%end  if%>>游客可读</option>
              <option value="1" <% if  rs2("ReadGrade")=1  then%>selected<%end  if%>>普通用户</option>
              <option value="2" <% if  rs2("ReadGrade")=2  then%>selected<%end  if%>>VIP 用户</option>
          </select>                  
                  </td>
                </tr>
                <tr> 
                  <td colspan="2" align="center" height="30"> 
<input type="checkbox" name="isbest" value="1" id="isbest" <%if rs2("isbest")=1 then response.write "checked" end if%>  style="display:none">
                    <input name="Submit" type="submit" class="button" id="Submit" value="确定修改"> 
<input type="button" value="返回"  onClick="location.href='admin_down.asp?action=list'" class="button"></td>
                </tr>
				<input type="hidden" name="id" value="<%=request.QueryString("id")%>">
                <input type="hidden" name="action" value="editsoft">
                <input type="hidden" name="MM_insert" value="true">
              </form>
            </table>
			<%end if
			if request.QueryString("action")="delsoft" then
			if request.querystring("id")="" then
Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
Response.Write("<script language=javascript>alert('非法的软件ID参数!');history.back(1);</script>")
	response.end
  end if
end if
sql="select * from soft where soft_id="&cint(request.querystring("id"))
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
			%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" style="border-collapse: collapse">
              <form name="form1" method="post" action="admin_down.asp?action=list">
                <tr> 
                  <td colspan="2" class="diaryhead">删除软件</td>
                </tr>
                <tr> 
                  <td width="16%">软件名称</td>
                  <td width="84%"><%=rs2("soft_name")%>
                  </td>
                </tr>
                <tr> 
                  <td>软件大小</td>
                  <td><%=rs2("soft_size")%>
                  </td>
                </tr>
                <tr> 
                  <td>程序简介</td>
                  <td><%=ubb2html(formatStr(autourl(rs2("soft_desc"))), true, true)%>
                  </td>
                </tr>
                <tr> 
                  <td>本地下载</td>
                  <td><%=rs2("soft_url1")%> 
                  </td>
                </tr>
                <tr> 
                  <td colspan="2" align="center" height="30"> 
                    <input name="Submit" type="submit" class="button" id="Submit" value="确定删除">
<input type="button" value="返回"  onClick="location.href='admin_down.asp?action=list'" class="button"> </td>
                </tr>
                <input type="hidden" name="id" value="<%=request.QueryString("id")%>">
                <input type="hidden" name="action" value="delsoft">
                <input type="hidden" name="MM_insert" value="true">
              </form>
            </table>
<%
end if
rs.close
set rs=nothing

%>

⌨️ 快捷键说明

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