📄 newsoft_body.asp
字号:
<%sub Newsoft_body()
sql="select * from d_cat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<HTML><HEAD><TITLE>管理中心</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="inc/adminstyle.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey))>
<%if request.QueryString("action")="newsoft" then%>
<table cellpadding="2" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">
<form name="form1" method="post" action="New_soft.asp">
<tr class="a1">
<td colspan="2">新增软件</td>
</tr>
<tr class="a4">
<td width="16%">软件名称</td>
<td width="84%">
<input type="text" name="name" size="40">
</td>
</tr>
<tr class="a3">
<td width="16%">软件大小</td>
<td width="84%">
<input type="text" name="size" size="20">
</td>
</tr>
<tr class="a4">
<td width="16%">授权方式</td>
<td width="84%">
<input type="text" name="mode" value="免费软件">
</td>
</tr>
<tr class="a3">
<td width="16%">应用平台</td>
<td width="84%">
<input type="text" name="roof" value="WIN98,WIN2000,WIN XP">
</td>
</tr>
<tr class="a4">
<td width="16%">推荐程度</td>
<td width="84%">
<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="a3">
<td width="16%">所属分类</td>
<td width="84%">
<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="a4">
<td width="16%">演示地址</td>
<td width="84%">
<input type="text" name="demo" size="60">
</td>
</tr>
<tr class="a3">
<td width="16%">主页地址</td>
<td width="84%">
<input type="text" name="home" size="60" value="<%=weburl%>">
</td>
</tr>
<tr class="a4">
<td width="16%">图片地址</td>
<td width="84%">
<input type="text" name="showpic" size="60" value="">
</td>
</tr>
<tr class="a3">
<td width="16%">程序简介</td>
<td width="84%">
<textarea name="desc" cols="65" rows="10">暂无</textarea>
</td>
</tr>
<tr class="a4">
<td width="16%">下载地址1</td>
<td width="84%">
<input type="text" name="url1" size="60">
</td>
</tr>
<tr class="a3">
<td width="16%">下载地址2</td>
<td width="84%">
<input type="text" name="url2" size="60">
</td>
</tr>
<tr class="a4">
<td width="16%">下载地址3</td>
<td width="84%">
<input type="text" name="url3" size="60">
</td>
</tr>
<tr class="a3">
<td width="16%">下载地址4</td>
<td width="84%">
<input type="text" name="url4" size="60">
</td>
</tr>
<tr class="a4">
<td colspan="2" align="center" height="30">
<input type="submit" name="Submit" value="确定新增">
<input type="reset" name="Reset" value="清空重填">
[<a href="admin_soft.asp">返回</a>] </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
errmsg=errmsg+"<br>"+"<li>请指定操作的对象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的软件ID参数!"
call diserror()
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 cellpadding="2" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">
<form name="form1" method="post" action="New_soft.asp">
<tr class="a1">
<td colspan="2">编辑软件</td>
</tr>
<tr class="a4">
<td width="16%">软件名称</td>
<td width="84%"> <input type="text" name="name" size="40" value="<%=rs2("soft_name")%>">
</td>
</tr>
<tr class="a3">
<td width="16%">软件大小</td>
<td width="84%"> <input type="text" name="size" size="20" value="<%=rs2("soft_size")%>">
</td>
</tr>
<tr class="a4">
<td width="16%">授权方式</td>
<td width="84%"> <input type="text" name="mode" value="<%=rs2("soft_mode")%>">
</td>
</tr>
<tr class="a3">
<td width="16%">应用平台</td>
<td width="84%"> <input type="text" name="roof" value="<%=rs2("soft_roof")%>">
</td>
</tr>
<tr class="a4">
<td width="16%">推荐程度</td>
<td width="84%"> <select name="commend" id="commend">
<option value="5" <%if rs2("soft_commend")=5 then response.write "selected" end if%>>5stars</option>
<option value="4" <%if rs2("soft_commend")=4 then response.write "selected" end if%>>4stars</option>
<option value="3" <%if rs2("soft_commend")=3 then response.write "selected" end if%>>3stars</option>
<option value="2" <%if rs2("soft_commend")=2 then response.write "selected" end if%>>2stars</option>
<option value="1" <%if rs2("soft_commend")=1 then response.write "selected" end if%>>1stars</option>
<option value="0" <%if rs2("soft_commend")=0 then response.write "selected" end if%>>0stars</option>
</select> </td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -