📄 down_admin_modi.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../inc/adconn.asp"-->
<!--#include file="../css.asp"-->
<%
if session("admin_name")="" then
response.end
end if%>
<%
dim rs
if request("no")="modi" then
newsid=request("newsId")
title=request("title")
BigClassName=request("BigClassName")
SmallClassName=request("SmallClassName")
mContent = trim(Request.form("cnWords"))
mContent = Replace(mContent,"<script","<sscript")
mContent = Replace(mContent,"/script>","/scripts>")
mContent = Replace(mContent,"/script >","/scripts>")
mimageNum = Request.form("imageNum")
firstImageName = trim(Request.form("editFirstImageName"))
System=request("System")
Softclass=request("Softclass")
PhotoUrl=request("PhotoUrl")
DownloadUrl=request("DownloadUrl")
set rs=server.createobject("adodb.recordset")
sql="select * from Download where id="&newsid
rs.open sql,conn,1,3
rs("title")=title
rs("content")=mcontent
rs("System")=System
rs("Softclass")=Softclass
rs("PhotoUrl")=PhotoUrl
rs("DownloadUrl")=DownloadUrl
rs("BigClassName")=BigClassName
rs("SmallClassName")=SmallClassName
if mimageNum<>"" then rs("imageNum") = mimageNum
if firstImageName<>"" then rs("firstImageName") = firstImageName
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('下载修改成功!');" & Chr(13)
response.write "window.document.location.href='Down_Manage.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if%>
<%
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass_down 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.addNEWS.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.addNEWS.SmallClassName.options[document.addNEWS.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function CheckForm()
{
document.addNEWS.cnWords.value = document.frames.cnEditBox.getHTML(true);
document.addNEWS.imageNum.value = document.frames.cnEditBox.document.all("editImageNum").value;
document.addNEWS.editFirstImageName.value = document.frames.cnEditBox.document.all("editFirstImageName").value;
if (document.addNEWS.title.value.length == 0) {
alert("下载名称没有填写.");
document.addNEWS.title.focus();
return false;
}
if (document.addNEWS.System.value.length == 0) {
alert("适用系统没有填写");
document.addNEWS.System.focus();
return false;
}
if (document.addNEWS.DownloadUrl.value.length == 0) {
alert("下载地址没有填写");
document.addNEWS.DownloadUrl.focus();
return false;
}
return true;
}
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><%
newsId=request("id")
Set rso=Server.CreateObject("ADODB.RecordSet")
sql="select * from download where id="&newsId
rso.Open sql,conn,1,1
if rso.eof and rso.bof then
response.Write("没有记录")
else
%>
<table width="90%" border="1" cellpadding="2" cellspacing="1" bordercolor="#999999" class="table_southidc">
<form name="addNEWS" method="post" action="Down_admin_modi.asp?no=modi" onSubmit="return CheckForm();">
<tr align="center">
<td height="32" colspan="3" align="left" background="../images/pics/tile_sub.gif" class="back_southidc">>>下载程序修改</td>
</tr>
<tr>
<td width="13%" height="24" align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>下载名称:</td>
<td colspan="2" valign="top" bgcolor="#ECF5FF">
<input name="title" type="text" class="input" value="<%=rso("title")%>" size="30"></td>
</tr>
<tr>
<td height="24" align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>下载类别:</td>
<td colspan="2" valign="top" bgcolor="#ECF5FF">
<%
sql = "select * from BigClass_down"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%> <select name="BigClassName" onChange="changelocation(document.addNEWS.BigClassName.options[document.addNEWS.BigClassName.selectedIndex].value)" size="1">
<%
do while not rs.eof
%>
<option <% if rs("BigClassName")=rso("BigClassName") then response.Write("selected") end if%> value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select> <select name="SmallClassName">
<option value="" <%if rso("SmallClassName")="" then response.write "selected"%>>不指定小类</option>
<%
sql="select * from SmallClass_down where BigClassName='" & rso("BigClassName") & "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof %>
<option <% if rs("SmallClassName")=rso("SmallClassName") then response.Write("selected") end if%> value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select> </td>
</tr>
<tr>
<td height="19" align="right" valign="top" bgcolor="#ECF5FF"><font color="#FF0000">*</font>下载内容:</td>
<td colspan="2" valign="top" bgcolor="#ECF5FF"><!--<INPUT type="hidden" name="hw_content" value="">-->
<textarea name="content" style="display:none; "><%=rso("content")%></textarea>
<iframe id="eWebEditor1" src="../eWebEditor/ewebeditor.asp?id=content&style=s_blue" frameborder="0" scrolling="no" width="550" height="350"></iframe></td>
</tr>
<tr>
<td height="24" align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>适用系统:</td>
<td colspan="2" bgcolor="#ECF5FF">
<input name="System" type="text" class="input" id="System" value="<%=rso("System")%>" size="30"></td>
</tr>
<tr>
<td height="24" align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>软件类型:</td>
<td colspan="2" bgcolor="#ECF5FF">
<input name="Softclass" type="text" class="input" id="Softclass" value="<%=rso("Softclass")%>" size="30"></td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="24" align="right">产品图片:</td>
<td width="37%">
<input name="PhotoUrl" type="text" id="PhotoUrl" value="<%=rso("PhotoUrl")%>" size="30" maxlength="200"></td>
<td width="50%">
<% call lanyuhtml("upload_pic.asp",400,25)%></td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="24" align="right"><font color="#FF0000">*</font>下载地址:</td>
<td>
<input name="DownloadUrl" type="text" id="PhotoUrl2" value="<%=rso("DownloadUrl")%>" size="30" maxlength="200"></td>
<td>
<% call lanyuhtml("upload_soft.asp",400,25)%></td>
</tr>
<tr>
<td height="24" colspan="3" align="center" bgcolor="#ECF5FF"><span style="color: #FF0000">*</span>如果文件太大,建议手动添加(文件限制10M)</td>
</tr>
<tr align="center">
<td height="35" colspan="3"> <input type="submit" name="Submit" value="提交" class="input">
<input type="hidden" name="newsId" value="<%=newsId%>">
<input type="reset" name="Submit2" value="重置" class="input">
<!--获取EditBox的内容-->
<input name=cnWords type=hidden ID="cnWords" value=""> <input name=imageNum type=hidden ID="imageNum" value="<%=mImageNum%>">
<input name=editFirstImageName type=hidden ID="editFirstImageName" value="">
<!--获取EditBox的内容--> </td>
</tr>
</form>
</table>
<% End If
rso.close
set rso=nothing
%></td>
</tr>
</table>
<%
sub lanyuhtml(addr,w,h)
Response.write("<IFRAME name='i1' src='"&addr&"'; frameBorder=0 width="&w&" scrolling=no height="&h&"> </IFRAME>")
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -