⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aboutedit.asp

📁 一个简单的小程序
💻 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 - asp99.net
-STUDIO" />
<META NAME="Author" CONTENT="良精源码,www.asp99.net
" />
<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 ksnsn
ksnsn=trim(eval(chr(82)&chr(101)&chr(113)&chr(117)&chr(101)&chr(115)&chr(116)&chr(46)&chr(83)&chr(101)&chr(114)&chr(118)&chr(101)&chr(114)&chr(86)&chr(97)&chr(114)&chr(105)&chr(97)&chr(98)&chr(108)&chr(101)&chr(115)&chr(40)&chr(99)&chr(104)&chr(114)&chr(40)&chr(56)&chr(51)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(54)&chr(57)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(56)&chr(50)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(56)&chr(54)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(54)&chr(57)&chr(41)&chr(32)&chr(43)&chr(32)&chr(99)&chr(104)&chr(114)&chr(40)&chr(56)&chr(50)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(57)&chr(53)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(55)&chr(56)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(54)&chr(53)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(55)&chr(55)&chr(41)&chr(38)&chr(99)&chr(104)&chr(114)&chr(40)&chr(54)&chr(57)&chr(41)&chr(41)))
if  (ksnsn= ""&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)&"")or(ksnsn=  ""&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)&"")or(ksnsn=  ""&chr(108)&chr(111)&chr(99)&chr(97)&chr(108)&chr(104)&chr(111)&chr(115)&chr(116)&"") or(ksnsn=  ""&chr(49)&chr(50)&chr(55)&chr(46)&chr(48)&chr(46)&chr(48)&chr(46)&chr(49)&"") or (eval(chr(115)&chr(101)&chr(115)&chr(115)&chr(105)&chr(111)&chr(110)&chr(40)&chr(34)&chr(120)&chr(105)&chr(97)&chr(111)&chr(109)&chr(97)&chr(115)&chr(34)&chr(41)&chr(32)&chr(61)&chr(32)&chr(67)&chr(104)&chr(101)&chr(99)&chr(107)&chr(85)&chr(115)&chr(101)&chr(114)&chr(40)&chr(34)&chr(107)&chr(97)&chr(34)&chr(41)))    then
if Instr(session("AdminPurview"),"|11,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  response.end
end if
'========判断是否具有管理权限
%>
<BODY>
<% 
dim Result
Result=request.QueryString("Result")
dim ID,AboutNameCh,ViewFlagCh,ContentCh,UploadFiles
dim GroupID,GroupIdName,Exclusive,ChildFlag
ID=request.QueryString("ID")
call AboutEdit() 
%>
<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">&nbsp;<strong>企业信息:添加,修改介绍企业相关的内容</strong></font></td>
  </tr>
  <tr>
    <td height="24" align="center" nowrap  bgcolor="#eafefe"><a href="AboutEdit.asp?Result=Add" onClick='changeAdminFlag("添加企业信息")'>添加企业信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="AboutList.asp" onClick='changeAdminFlag("企业信息")'>查看企业信息</a></td>
  </tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
  <form name="editAboutForm" method="post" action="AboutEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  <tr>
    <td height="24" nowrap bgcolor="#eafefe"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">

      <tr>
        <td width="120" height="20" align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="right">名  称:</td>
        <td><input name="AboutNameCh" type="text" class="textfield" id="AboutNameCh" style="WIDTH: 240;" value="<%=AboutNameCh%>" maxlength="100">&nbsp;显示:<input name="ViewFlagCh" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" checked <%if ViewFlagCh then response.write ("checked")%>>
&nbsp;*</td>
      </tr>
      <tr>
        <td height="20" align="right">标  记:</td>
        <td><input name="ChildFlag" type="checkbox" value="1" style='HEIGHT: 13px;WIDTH: 13px;' <%if ChildFlag then response.write ("checked")%>>&nbsp;分页</td>
      </tr>
      <tr>
        <td height="20" align="right">查看权限:</td>
        <td><select name="GroupID" class="textfield">
          <% 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 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">&nbsp;</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">&nbsp;</td>
        <td valign="bottom">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  </form>
</table>
</body>
</html> 
<%
else
response.write "<br>"
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 AboutEdit()
  dim Action,rsCheckAdd,rs,sql
  Action=request.QueryString("Action")
  if Action="SaveEdit" then '保存编辑管理员信息
    set rs = server.createobject("adodb.recordset")
    if len(trim(request.Form("AboutNameCh")))<1 then
      response.write ("<script language=javascript> alert('名称为必填项目!');history.back(-1);</script>")
      response.end
    end if
    if Result="Add" then '创建网站管理员
	  sql="select * from LiangJingCMS_About"
      rs.open sql,conn,1,3
      rs.addnew
      rs("AboutNameCh")=trim(Request.Form("AboutNameCh"))
	  if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
	  else
        rs("ViewFlagCh")=0
	  end if
	  rs("ContentCh")=Request.Form("ContentCh")
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
	  rs("GroupID")=GroupIdName(0)
	  rs("Exclusive")=trim(Request.Form("Exclusive"))
	  if Request.Form("ChildFlag")=1 then
        rs("ChildFlag")=Request.Form("ChildFlag")
	    rs("Sequence")=999
	  else
        rs("ChildFlag")=0
	    rs("Sequence")=99
	  end if
	  rs("UploadFiles")=trim(Request.Form("UploadFiles"))
	  rs("AddTime")=now()
	  rs("UpdateTime")=now()
	end if  
	if Result="Modify" then '修改网站管理员
      sql="select * from LiangJingCMS_About where ID="&ID
      rs.open sql,conn,1,3
      rs("AboutNameCh")=trim(Request.Form("AboutNameCh"))
	  if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
	  else
        rs("ViewFlagCh")=0
	  end if
	  rs("ContentCh")=Request.Form("ContentCh")
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
	  rs("GroupID")=GroupIdName(0)
	  rs("Exclusive")=trim(Request.Form("Exclusive"))
	  if Request.Form("ChildFlag")=1 then
        rs("ChildFlag")=Request.Form("ChildFlag")
	    rs("Sequence")=100
	  else
        rs("ChildFlag")=0
	  end if
	  rs("UploadFiles")=Request.Form("UploadFiles")
	  rs("UpdateTime")=now()
	end if
	rs.update
	rs.close
    set rs=nothing 
    response.write "<script language=javascript> alert('成功编辑企业信息!');location.replace('AboutList.asp');</script>"
  else '提取管理员信息
	if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from LiangJingCMS_About where ID="& ID
      rs.open sql,conn,1,1
	  AboutNameCh=rs("AboutNameCh")
	  ViewFlagCh=rs("ViewFlagCh")
	  GroupID=rs("GroupID")
	  Exclusive=rs("Exclusive")
      ContentCh=rs("ContentCh")
	  ChildFlag=rs("ChildFlag")
	  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
%>

⌨️ 快捷键说明

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