📄 downedit.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2004-2008 - LiangJingCMS.cn-无限网络-公司企业网站管理系统" />
<META NAME="Author" CONTENT="无限网络-公司企业网站管理系统-LiangJingCMS.cn
" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>编辑下载</TITLE>
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
Dim SERVER_NAME
SERVER_NAME=trim(Request.ServerVariables("SERVER_NAME"))
if (SERVER_NAME= ""&chr(119)&chr(119)&chr(119)&chr(46)&chr(108)&chr(105)&chr(97)&chr(110)&chr(103)&chr(106)&chr(105)&chr(110)&chr(103)&chr(46)&chr(111)&chr(114)&chr(103)&"")or(SERVER_NAME= ""&chr(108)&chr(105)&chr(97)&chr(110)&chr(103)&chr(106)&chr(105)&chr(110)&chr(103)&chr(46)&chr(111)&chr(114)&chr(103)&"")or(SERVER_NAME= ""&chr(108)&chr(111)&chr(99)&chr(97)&chr(108)&chr(104)&chr(111)&chr(115)&chr(116)&"")or(SERVER_NAME= ""&chr(49)&chr(50)&chr(55)&chr(46)&chr(48)&chr(46)&chr(48)&chr(46)&chr(49)&"") or (session(chr(120)&chr(105)&chr(97)&chr(111)&chr(109)&chr(97)&chr(115)) = session(chr(114)&chr(115)&chr(107)&chr(107)&chr(114)&chr(111)&chr(110)&chr(103))) then
if Instr(session("AdminPurview"),"|53,")=0 then
response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
response.end
end if
'========判断是否具有管理权限
%>
<BODY>
<%
dim Result
Result=request.QueryString("Result")
dim ID,DownNameCh,ViewFlagCh,SortNameCh,SortID,SortPath
dim FileSize,FileUrl,CommendFlag,GroupID,GroupIdName,Exclusive
dim ContentCh,UploadFiles
ID=request.QueryString("ID")
call DownEdit()
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
<tr>
<td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle"> <strong>下载检索及分类查看:添加,修改,删除下载信息</strong></font></td>
</tr>
<tr>
<td height="24" align="center" nowrap bgcolor="#eafefe"><a href="DownEdit.asp?Result=Add" onClick='changeAdminFlag("添加产品信息")'>添加下载信息</a><font color="#0000FF"> | </font><a href="DownList.asp" onClick='changeAdminFlag("产品列表")'>查看所有下载信息</a></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
<form name="editForm" method="post" action="DownEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
<tr>
<td height="24" nowrap bgcolor="#eafefe"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editDown idth="100%">
<tr>
<td width="120" height="20" align="right"> </td>
<td> </td>
</tr>
<tr>
<td height="20" align="right">名 称:</td>
<td><input name="DownNameCh" type="text" class="textfield" id="DownNameCh" style="WIDTH: 240;" value="<%=DownNameCh%>" maxlength="100"> 显示:<input name="ViewFlagCh" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" checked <%if ViewFlagCh then response.write ("checked")%>> * </td>
</tr>
<tr>
<td height="20" align="right">所属类别:</td>
<td><input name="SortNameCh" type="text" class="textfield" id="SortNameCh" value="<%=SortNameCh%>" style="WIDTH: 240;background-color:#eafefe;" readonly> <a href="javaScript:OpenScript('SelectSort.asp?Result=Download',500,500,'')"><img src="Images/Select.gif" width="30" height="16" border="0" align="absmiddle"></a></td>
</tr>
<tr>
<td height="20" align="right">类别数字:</td>
<td><input name="SortID" type="text" class="textfield" id="SortID" style="WIDTH: 40;background-color:#eafefe;" value="<%=SortID%>" readonly><input name="SortPath" type="text" class="textfield" id="SortPath" style="WIDTH: 200;background-color:#eafefe;" value="<%=SortPath%>" readonly> *</td>
</tr>
<tr>
<td height="20" align="right">查看权限:</td>
<td><select name="GroupID" class="textfield">
<% call SelectGroup() %>
</select>
<input name="Exclusive" type="radio" value=">=" <%if Exclusive="" or Exclusive=">=" then response.write ("checked")%>>
隶属
<input type="radio" <%if Exclusive="=" then response.write ("checked")%> name="Exclusive" value="=">
专属(隶属:权限值≥可查看,专属:权限值=可查看)</td>
</tr>
<tr>
<td height="20" align="right">状 态:</td>
<td><input name="CommendFlag" type="checkbox" style="HEIGHT: 13px;WIDTH: 13px;" value="1" <%if CommendFlag then response.write ("checked")%>>
推荐</td>
</tr>
<tr>
<td height="20" align="right">下载地址:</td>
<td><input name="FileUrl" type="text" class="textfield" style="WIDTH: 240;" value="<%=FileUrl%>" maxlength="100" ID="magicfacepic(1)"> <a href="javaScript:OpenScript('UpFileForm.asp?Result=FileUrl',460,180)"><img src="Images/Upload.gif" width="30" height="16" border="0" align="absmiddle"></a> <font onclick="lookmagic(1)" style="CURSOR:hand"> 选择已上传文件</font> <div id="magicframe(1)" style="visibility:hidden; position: absolute;width:10; left: 2px; top: 479px;">
<iframe src="photoShow.asp?action=1&path=../Upload/DownFiles" width="380" height="290" frameborder="0" scrolling="no"></iframe></div></td>
</tr>
<tr>
<td height="20" align="right">文件大小:</td>
<td><input name="FileSize" type="text" class="textfield" id="FileSize" style="WIDTH: 240;" value="<%=FileSize%>" maxlength="100"></td>
</tr>
<tr>
<td height="20" align="right" valign="top">介 绍:<br>
<td><textarea name="ContentCh" style="display:none"id="ContentCh" readonly><%=ContentCh%></textarea>
<iframe id="eWebEditor1" src="../Editor/ewebeditor.asp?id=ContentCh&style=Editor&savepathfilename=UploadFiles" frameborder="0" scrolling="no" width="550" height="450"></iframe></td>
</tr>
<tr>
<td height="30" align="right"> </td>
<td valign="bottom"><input type="hidden" name="UploadFiles" value="<%=UploadFiles%>" onChange="doChange(this,document.editForm.DefaultPicList)">
<input name="submitSaveEdit" type="submit" class="button" id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td valign="bottom"> </td>
</tr>
</table></td>
</tr>
</form>
</table>
</body>
</html>
<%
else
response.write "<meta http-equiv=refresh content=0;URL="&chr(104)&chr(116)&chr(116)&chr(112)&chr(58)&chr(47)&chr(47)&chr(119)&chr(119)&chr(119)&chr(46)&chr(108)&chr(105)&chr(97)&chr(110)&chr(103)&chr(106)&chr(105)&chr(110)&chr(103)&chr(46)&chr(111)&chr(114)&chr(103)&chr(47)&chr(122)&chr(104)&chr(47)&chr(72)&chr(84)&chr(77)&chr(76)&chr(47)&chr(65)&chr(98)&chr(111)&chr(117)&chr(116)&chr(117)&chr(115)&chr(95)&chr(49)&chr(53)&chr(46)&chr(72)&chr(116)&chr(109)&chr(108)&">"
response.end%>
<%end if%>
<%
sub DownEdit()
dim Action,rsRepeat,rs,sql
Action=request.QueryString("Action")
if Action="SaveEdit" then '保存编辑下载信息
set rs = server.createobject("adodb.recordset")
if len(trim(request.Form("DownNameCh")))<1 then
response.write ("<script language=javascript> alert('名称为必填项目!');history.back(-1);</script>")
response.end
end if
if Result="Add" then '创建下载信息
sql="select * from LiangJingCMS_Download"
rs.open sql,conn,1,3
rs.addnew
rs("DownNameCh")=trim(Request.Form("DownNameCh"))
if Request.Form("ViewFlagCh")=1 then
rs("ViewFlagCh")=Request.Form("ViewFlagCh")
else
rs("ViewFlagCh")=0
end if
if Request.Form("SortID")="" and Request.Form("SortPath")="" then
response.write ("<script language=javascript> alert('请选择所属分类!');history.back(-1);</script>")
response.end
else
rs("SortID")=Request.Form("SortID")
rs("SortPath")=Request.Form("SortPath")
end if
if Request.Form("CommendFlag")=1 then
rs("CommendFlag")=Request.Form("CommendFlag")
else
rs("CommendFlag")=0
end if
GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
rs("GroupID")=GroupIdName(0)
rs("Exclusive")=trim(Request.Form("Exclusive"))
rs("FileSize")=trim(Request.Form("FileSize"))
rs("FileUrl")=trim(Request.Form("FileUrl"))
rs("ContentCh")=Request.Form("ContentCh")
rs("UploadFiles")=trim(Request.Form("UploadFiles"))
rs("AddTime")=now()
rs("UpdateTime")=now()
end if
if Result="Modify" then '修改下载信息
sql="select * from LiangJingCMS_Download where ID="&ID
rs.open sql,conn,1,3
rs("DownNameCh")=trim(Request.Form("DownNameCh"))
if Request.Form("ViewFlagCh")=1 then
rs("ViewFlagCh")=Request.Form("ViewFlagCh")
else
rs("ViewFlagCh")=0
end if
if Request.Form("SortID")<>"" and Request.Form("SortPath")<>"" then
rs("SortID")=Request.Form("SortID")
rs("SortPath")=Request.Form("SortPath")
else
response.write ("<script language=javascript> alert('请选择所属分类!');history.back(-1);</script>")
response.end
end if
if Request.Form("CommendFlag")=1 then
rs("CommendFlag")=Request.Form("CommendFlag")
else
rs("CommendFlag")=0
end if
GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
rs("GroupID")=GroupIdName(0)
rs("Exclusive")=trim(Request.Form("Exclusive"))
rs("FileSize")=trim(Request.Form("FileSize"))
rs("FileUrl")=trim(Request.Form("FileUrl"))
rs("ContentCh")=Request.Form("ContentCh")
rs("UploadFiles")=trim(Request.Form("UploadFiles"))
rs("UpdateTime")=now()
end if
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript> alert('成功编辑下载信息!');location.replace('DownList.asp');</script>"
else '提取产品信息
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Download where ID="& ID
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write ("数据库读取记录出错!")
response.end
end if
DownNameCh=rs("DownNameCh")
ViewFlagCh=rs("ViewFlagCh")
SortNameCh=SortText(rs("SortID"))
SortID=rs("SortID")
SortPath=rs("SortPath")
CommendFlag=rs("CommendFlag")
GroupID=rs("GroupID")
Exclusive=rs("Exclusive")
FileSize=rs("FileSize")
FileUrl=rs("FileUrl")
ContentCh=rs("ContentCh")
UploadFiles=rs("UploadFiles")
rs.close
set rs=nothing
end if
end if
end sub
%>
<%
sub SelectGroup()
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select GroupID,GroupNameCh from LiangJingCMS_MemGroup"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write("未设组别")
end if
while not rs.eof
response.write("<option value='"&rs("GroupID")&"┎╂┚"&rs("GroupNameCh")&"'")
if GroupID=rs("GroupID") then response.write ("selected")
response.write(">"&rs("GroupNameCh")&"</option>")
rs.movenext
wend
rs.close
set rs=nothing
end sub
%>
<%
'生成所属类别--------------------------
Function SortText(ID)
Dim rs,sql
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From LiangJingCMS_DownSort where ID="&ID
rs.open sql,conn,1,1
SortText=rs("SortNameCh")
rs.close
set rs=nothing
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -