downedit.asp

来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 312 行 · 第 1/2 页

ASP
312
字号
<%@ LANGUAGE = VBScript %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>下载编辑</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="Admin_htmlconfig.asp"-->
<BODY>
<script language="javascript">
<!--
// 参数说明
// s_Type : 文件类型,可用值为"image","flash","media","file"
// s_Link : 文件上传后,用于接收上传文件路径文件名的表单名
// s_Thumbnail : 文件上传后,用于接收上传图片时所产生的缩略图文件的路径文件名的表单名,当未生成缩略图时,返回空值,原图用s_Link参数接收,此参数专用于缩略图
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
	//以下style=coolblue,值可以依据实际需要修改为您的样式名,通过此样式的后台设置来达到控制允许上传文件类型及文件大小
	var arr = showModalDialog("../Editor/Dialog/i_upload.htm?style=coolblue&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");
}
//-->
</script>

<%
Dim quanxian
quanxian=trim(Request.ServerVariables(name))

if Instr(session("AdminPurview"),"|16,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限!</font></div>")
  response.end
end if
dim Result
Result=request.QueryString("Result")
dim ID,DownName,ViewFlag,SortNameCH,SortID,SortPath
dim FileSize,FileUrl,CommendFlag,GroupID,GroupIdName,Exclusive,Content,SeoKeywordsCH,SeoKeywordsEN,SeoDescriptionCH,SeoDescriptionEN
ID=request.QueryString("ID")
call DownEdit()
%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <th>下载检索及分类查看:添加,修改,删除,生成下载信息</th>
  </tr>
  <tr>
    <td height="24" align="center" nowrap="nowrap"  class="forumrow"><a href="DownEdit.asp?Result=Add" onclick='changeAdminFlag(&quot;添加下载信息&quot;)'>添加下载信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="DownList.asp" onclick='changeAdminFlag(&quot;产品列表&quot;)'>查看所有下载信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="DownSort.asp?Action=Add&amp;ParentID=0" onclick='changeAdminFlag(&quot;添加下载类别&quot;)'>添加下载类别</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmldownsort.asp" onclick='changeAdminFlag(&quot;生成下载分类页面&quot;)'>生成下载分类页面</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmldown.asp" onclick='changeAdminFlag(&quot;生成下载详细页面&quot;)'>生成下载详细页面</a></td>
  </tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <form name="editForm" method="post" action="DownEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
    <tr>
      <th height="22" colspan="2">【<%If Result = "Add" then%>添加<%ElseIf Result = "Modify" then%>修改<%End If%>下载】</th>
    </tr>
    <tr>
      <td width="20%" align="right" class="forumRow">中文标题:</td>
      <td width="80%" class="forumRowHighlight"><input name="DownNameCH" type="text" id="DownNameCH" style="width: 280" value="<%=DownNameCH%>" maxlength="100">
        是否显示:
        <input name="ViewFlagCH" type="checkbox" value="1" checked <%if ViewFlagCH then response.write ("checked")%>>
        <font color="red">*</font>
        <input type="button" name="btn" value="复制标题" title="复制标题到中文:MetaDescription、MetaKeywords" onClick="CopyWebTitleCH(document.editForm.DownNameCH.value);"></td>
    </tr>
	<tr>
        <td width="20%" align="right" class="forumRow">英文标题:</td>
      <td width="80%" class="forumRowHighlight"><input name="DownNameEn" type="text" id="DownNameEn" style="WIDTH: 280;" value="<%=DownNameEn%>" maxlength="100">&nbsp;是否显示:
          <input name="ViewFlagEn" type="checkbox" value="1" style='HEIGHT: 13px;WIDTH: 13px;' <%if ViewFlagEn then response.write ("checked")%>>
          <input type="button" name="btn2" value="复制标题" title="复制标题到英文:MetaDescription、MetaKeywords" onClick="CopyWebTitleEN(document.editForm.DownNameEN.value);"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文MetaKeywords:</td>
      <td class="forumRowHighlight"><input name="SeoKeywordsCH" type="text" id="SeoKeywordsCH" style="width: 500" value="<%=SeoKeywordsCH%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文MetaDescription:</td>
      <td class="forumRowHighlight"><input name="SeoDescriptionCH" type="text" id="SeoDescriptionCH" style="width: 500" value="<%=SeoDescriptionCH%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">英文MetaKeywords:</td>
      <td class="forumRowHighlight"><input name="SeoKeywordsEN" type="text" id="SeoKeywordsEN" style="width: 500" value="<%=SeoKeywordsEN%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">英文MetaDescription:</td>
      <td class="forumRowHighlight"><input name="SeoDescriptionEN" type="text" id="SeoDescriptionEN" style="width: 500" value="<%=SeoDescriptionEN%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">下载类别:</td>
      <td class="forumRowHighlight"><input name="SortID" type="text" id="SortID" style="width: 18; background-color:#fffff0" value="<%=SortID%>" readonly> <input name="SortPath" type="text" id="SortPath" style="width: 70; background-color:#fffff0" value="<%=SortPath%>" readonly> <input name="SortNameCH" type="text" id="SortNameCH" value="<%=SortNameCH%>" style="width: 180; background-color:#fffff0" readonly> <a href="javaScript:OpenScript('SelectSort.asp?Result=Download',500,500,'')">选择类别</a> <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">阅读权限:</td>
      <td class="forumRowHighlight"><select name="GroupID">
          <% call SelectGroup() %>
        </select>
        <input name="Exclusive" type="radio" value="&gt;=" <%if Exclusive="" or Exclusive=">=" then response.write ("checked")%>>
        隶属
        <input type="radio" <%if Exclusive="=" then response.write ("checked")%> name="Exclusive" value="=">
        专属(隶属:权限值≥可查看,专属:权限值=可查看)</td>
    </tr>
      <tr>
        <td align="right" class="forumRow">状  态:</td>
        <td class="forumRowHighlight"><input name="CommendFlag" type="checkbox" style="HEIGHT: 13px;WIDTH: 13px;" value="1" <%if CommendFlag then response.write ("checked")%>>
          &nbsp;推荐</td>
      </tr>    <tr>
      <td align="right" class="forumRow">下载地址:</td>
      <td class="forumRowHighlight"><input name="FileUrl" type="text" id="FileUrl" style="width: 280" value="<%=FileUrl%>" maxlength="100"> <input type="button" value="上传软件" onClick="showUploadDialog('file', 'editForm.FileUrl', '')"><font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">文件大小:</td>
      <td class="forumRowHighlight"><input name="FileSize" type="text" id="FileSize" style="width: 280" value="<%=FileSize%>" maxlength="100"> <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文说明:</td>
      <td class="forumRowHighlight"><textarea name="ContentCH" id="ContentCH" style="display:none"><%=Server.HTMLEncode((ContentCH))%></textarea>
	  <iframe ID="eWebEditor1" src="../Editor/ewebeditor.htm?id=ContentCH&style=coolblue" frameborder="0" scrolling="no" width="550" height="350"></iframe></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">英文说明:</td>
      <td class="forumRowHighlight"><textarea name="ContentEN" id="ContentEN" style="display:none"><%=Server.HTMLEncode((ContentEN))%></textarea>
	  <iframe ID="eWebEditor1" src="../Editor/ewebeditor.htm?id=ContentEN&style=coolblue" frameborder="0" scrolling="no" width="550" height="350"></iframe></td>
    </tr>    <tr>
      <td align="right" class="forumRow"></td>
      <td class="forumRowHighlight"><input name="submitSaveEdit" type="submit" id="submitSaveEdit" value="保存"> <input type="button" value="返回上一页" onClick="history.back(-1)"></td>
    </tr>
  </form>
</table>
</BODY>
</HTML>
<%
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 request.Form("ViewFlagEn")=1 then
      if len(trim(request.Form("DownNameEn")))<1 then
      response.write ("<script language=javascript> alert('您已经选择了""英文""显示,因此英文名称必填!');history.back(-1);</script>")
      response.end
      end if
    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"))
      rs("DownNameEn")=trim(Request.Form("DownNameEn"))
	  if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
	  else
        rs("ViewFlagCh")=0
	  end if
	  if Request.Form("ViewFlagEn")=1 then

⌨️ 快捷键说明

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