📄 download_edit.asp
字号:
<!--#include file="bsconfig.asp"-->
<!--#include file="Inc/articleCHAR.INC"-->
<!--#include file="Inc/Function.asp"-->
<%
%>
<%
dim DownID,rsDown,FoundErr,ErrMsg
DownID=trim(request("DownID"))
FoundErr=False
if DownID="" then
response.Redirect("Download.asp")
end if
sql="select * from Download where DownID=" & DownID & ""
Set rsDown= Server.CreateObject("ADODB.Recordset")
rsDown.open sql,conn,1,1
if FoundErr=True then
call WriteErrMsg()
else
%>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from DownSmallClass order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function CheckForm()
{
if (document.myform.Title.value=="")
{
alert("标题名称不能为空!");
document.myform.Title.focus();
return false;
}
if (document.myform.FileSize.value == "")
{
alert("软件大小不能为空!");
document.myform.FileSize.focus();
return false;
}
if (document.myform.DownloadUrl.value=="")
{
alert("下载连接不能为空!");
document.myform.DownloadUrl.focus();
return false;
}
if (document.myform.Content.value=="")
{
alert("下载内容不能为空!");
document.myform.Content.focus();
return false;
}
return true;
}
</script>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="610" align="center" class="a2">
<tr>
<td class="a1" height="25" align="center"><strong>修 改 下 载</strong></td>
</tr>
<tr class="a4">
<td align="center">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="Download_Save.asp?action=Modify">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr align="center">
<td class="tdbg">
<table width="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="100" height="22" align="right" bgcolor="#C0C0C0">所属栏目:</td>
<td width="500" bgcolor="#E3E3E3">
<%
if session("purview")=3 or session("purview")=4 then
response.write rsDown("BigClassName") & "<input name='BigClassName'type='hidden'value='" & rsDown("BigClassName") & "'>>>"
else
sql = "select * from DownBigClass"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%>
<select name="BigClassName"
onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<%
do while not rs.eof
%>
<option <% if rs("BigClassName")=rsDown("BigClassName") then response.Write("selected") end if%>
value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<%
end if
if session("purview")=4 then
response.write rsDown("SmallClassName") & "<input name='SmallClassName'type='hidden'value='" & rsDown("SmallClassName") & "'>"
else
%>
<select name="SmallClassName">
<option value="" <%if rsDown("SmallClassName")="" then response.write "selected"%>>不指定小类</option>
<%
sql="select * from DownSmallClass where BigClassName='" & rsDown("BigClassName") & "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
%>
<option <% if rs("SmallClassName")=rsDown("SmallClassName") then response.Write("selected") end if%>
value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<%
end if
%>
</td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">标题名称:</td>
<td bgcolor="#E3E3E3"> <input type="text" name="Title" id="Title" value="<%=trim(rsDown("Title"))%>" size="50" maxlength="80">
<font color="#FF0000">!</font></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">文件大小:</td>
<td bgcolor="#E3E3E3"> <input type="text" name="FileSize" id="FileSize" value="<%=trim(rsDown("FileSize"))%>" size="50" maxlength="80">
<FONT color=#ff0000>!</FONT> </td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">软件语言:</td>
<td bgcolor="#E3E3E3"> <input type="text" name="Language" id="Language" value="<%=trim(rsDown("Language"))%>" size="50" maxlength="80">
<font color="#FF0000">!</font></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">授权类型:</td>
<td bgcolor="#E3E3E3"> <input type="text" name="LicenceType" id="LicenceType" value="<%=trim(rsDown("LicenceType"))%>" size="50" maxlength="80">
<font color="#FF0000">!</font></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">运行环境:</td>
<td bgcolor="#E3E3E3"> <input type="text" name="System" id="System" value="<%=trim(rsDown("System"))%>" size="50" maxlength="80">
<font color="#FF0000">!</font></td>
</tr>
<tr>
<td width="100" height="25" align="right" bgcolor="#C0C0C0">图片地址:</td>
<td width="500" bgcolor="#E3E3E3">
<input type="text" name="PhotoUrl" id="PhotoUrl" value="<%=trim(rsDown("PhotoUrl"))%>" size="50" maxlength="120">
</td>
</tr>
<tr>
<td width="100" align="right" bgcolor="#C0C0C0">图片上传:</td>
<td width="500" height="30" bgcolor="#E3E3E3"><div align="center"
><iframe name="ad" frameborder=0 width=100% height=30 scrolling=no src="../WebEdit/Upload_SoftPic.asp"></iframe></div></td>
</tr>
<tr>
<td height="50" align="right" valign="middle" bgcolor="#C0C0C0">UBB代码:</td>
<td bgcolor="#E3E3E3">
<script src=Inc/eshopcode.js></script>
<!--#include file=Inc/Ubb.inc -->
</td>
</tr>
<tr bgcolor="#E3E3E3">
<td height="25" align="right" bgcolor="#C0C0C0">软件简介:</td>
<td align="right" valign="middle"> <div align="left">
<textarea name="Content" cols="66" rows="12">
<%if rsDown("html")=false then
Content=replace(rsDown("Content"),"<br>",chr(13))
Contentt=replace(Content," "," ")
else
Content=rsDown("Content")
end if
response.write Content%></textarea>
</div></td>
</tr>
<tr>
<td width="100" align="right" bgcolor="#C0C0C0">下载地址一</td>
<td width="500" height="25" bgcolor="#E3E3E3">
<input type="text" name="DownloadUrl" id="DownloadUrl" value="<%=trim(rsDown("DownloadUrl"))%>" size="50" maxlength="120">
<font color="#FF0000">!</font></td>
</tr>
<tr>
<td width="100" align="right" bgcolor="#C0C0C0">下载地址二</td>
<td width="500" height="25" bgcolor="#E3E3E3">
<input type="text" name="DownloadUrl2" id="DownloadUrl2" value="<%=trim(rsDown("DownloadUrl2"))%>" size="50" maxlength="120">
</td>
</tr>
<tr>
<td width="100" align="right" bgcolor="#C0C0C0">下载上传:</td>
<td width="500" height="30" bgcolor="#E3E3E3"><div align="center"
><iframe name="ad" frameborder=0 width=100% height=30 scrolling=no src="../WebEdit/Upload_Soft.asp"></iframe></div></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">已通过审核:</td>
<td bgcolor="#E3E3E3">
<input type="checkbox" name="Passed" id="Passed" value="yes" <% if rsDown("Passed")=true then response.Write("checked") end if%>>
<font color="#0000FF">(如果选中的话将直接发布)</font></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">下载推荐:</td>
<td bgcolor="#E3E3E3">
<input type="checkbox" name="Elite" id="Elite" value="yes" <% if rsDown("Elite")=true then response.Write("checked") end if%>>
<font color="#0000FF">(是否设为推荐)</font></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#C0C0C0">加入时间:</td>
<td bgcolor="#E3E3E3">
<input type="text" name="UpDateTime" id="UpDateTime" value="<%=trim(rsDown("UpDateTime"))%>" maxlength="50">
当前时间为:<%=now()%> 注意不要改变格式。</td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center"><p>
<input name="DownID" type="hidden" id="DownID" value="<%=rsDown("DownID")%>">
<input name="Save" type="submit" id="Save" value="保存修改结果" style="cursor: hand;background-color: #cccccc;">
<input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='Download.asp'" style="cursor: hand;background-color: #cccccc;">
</p></div>
</form>
</td>
</tr>
</table>
<BR>
<%
end if
rsDown.close
set rsDown=nothing
call CloseConn()
%>
<%htmlend%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -