📄 aboutedit.asp
字号:
<%@ 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>
<%
Dim quanxian
quanxian=trim(Request.ServerVariables(name))
if Instr(session("AdminPurview"),"|10,")=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,AboutNameCH,ViewFlagCH,ContentCH,AboutNameEN,ViewFlagEN,ContentEN
dim GroupID,GroupIdName,Exclusive,ChildFlag
ID=request.QueryString("ID")
call AboutEdit()
%>
<br>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6" class="tableborder">
<tr>
<th height="24" nowrap="nowrap">企业信息:添加,修改介绍企业相关的内容</th>
</tr>
<tr>
<td height="24" align="center" nowrap="nowrap" class="forumrow"><a href="AboutEdit.asp?Result=Add" onclick='changeAdminFlag("添加企业信息")'>添加企业信息</a><font color="#0000FF"> | </font><a href="AboutList.asp" onclick='changeAdminFlag("企业信息")'>查看企业信息</a><font color="#0000FF"> | </font><a href="Admin_htmlinfo.asp" onclick='changeAdminFlag("生成企业信息列表")'>生成企业信息列表</a></td>
</tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
<form name="editAboutForm" method="post" action="AboutEdit.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="AboutNameCH" type="text" id="AboutNameCH" style="width: 280" value="<%=AboutNameCH%>" maxlength="100">
是否显示:<input name="ViewFlagCH" type="checkbox" value="1" checked="checked" <%if ViewFlagCH then response.write ("checked")%>></td>
</tr>
<tr>
<td width="20%" align="right" class="forumRow">英文标题:</td>
<td width="80%" class="forumRowHighlight"><input name="AboutNameEN" type="text" id="AboutNameEN" style="width: 280" value="<%=AboutNameEN%>" maxlength="100">
是否显示:<input name="ViewFlagEN" type="checkbox" value="1" <%if ViewFlagEN then response.write ("checked")%>></td>
</tr>
<tr>
<td width="20%" align="right" class="forumRow"><span class="forumRowHighlight">是否分页:</span></td>
<td width="80%" class="forumRowHighlight"><input name="ChildFlag2" type="checkbox" value="1" <%if ChildFlag then response.write ("checked")%>>
<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=">=" <%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"><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 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 request.Form("ViewFlagEn")=1 then
if len(trim(request.Form("AboutNameEn")))<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_About"
rs.open sql,conn,1,3
rs.addnew
rs("AboutNameCh")=trim(Request.Form("AboutNameCh"))
rs("AboutNameEn")=trim(Request.Form("AboutNameEn"))
if Request.Form("ViewFlagCh")=1 then
rs("ViewFlagCh")=Request.Form("ViewFlagCh")
else
rs("ViewFlagCh")=0
end if
if Request.Form("ViewFlagEn")=1 then
rs("ViewFlagEn")=Request.Form("ViewFlagEn")
else
rs("ViewFlagEn")=0
end if
rs("ContentCh")=Request.Form("ContentCh")
rs("ContentEn")=Request.Form("ContentEn")
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("AddTime")=now()
rs("UpdateTime")=now()
rs.update
rs.close
set rs=Nothing
set rs=server.createobject("adodb.recordset")
sql="select top 1 ID from LiangJingCMS_About order by ID desc"
rs.open sql,conn,1,1
ID=rs("ID")
rs.close
set rs=Nothing
if ISHTML = 1 then
call htmll("/CH/","/CH/",""&AboutNameDiy&""&Separated&""&ID&"."&HTMLName&"","About.asp","ID=",ID,"","")
call htmll("/EN/","/EN/",""&AboutNameDiy&""&Separated&""&ID&"."&HTMLName&"","About.asp","ID=",ID,"","")
End If
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"))
rs("AboutNameEn")=trim(Request.Form("AboutNameEn"))
if Request.Form("ViewFlagCh")=1 then
rs("ViewFlagCh")=Request.Form("ViewFlagCh")
else
rs("ViewFlagCh")=0
end if
if Request.Form("ViewFlagEn")=1 then
rs("ViewFlagEn")=Request.Form("ViewFlagEn")
else
rs("ViewFlagEn")=0
end if
rs("ContentCh")=Request.Form("ContentCh")
rs("ContentEn")=Request.Form("ContentEn")
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("UpdateTime")=now()
rs.update
rs.close
set rs=Nothing
if ISHTML = 1 then
call htmll("/CH/","/CH/",""&AboutNameDiy&""&Separated&""&ID&"."&HTMLName&"","About.asp","ID=",ID,"","")
call htmll("/EN/","/EN/",""&AboutNameDiy&""&Separated&""&ID&"."&HTMLName&"","About.asp","ID=",ID,"","")
End If
end if
if ISHTML = 1 then
response.write "<script language='javascript'>alert('设置成功,相关静态页面已更新!');location.replace('AboutList.asp');</script>"
Else
response.write "<script language='javascript'>alert('设置成功!');location.replace('AboutList.asp');</script>"
End If
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")
AboutNameEn=rs("AboutNameEn")
ViewFlagCh=rs("ViewFlagCh")
ViewFlagEn=rs("ViewFlagEn")
GroupID=rs("GroupID")
Exclusive=rs("Exclusive")
ContentCh=rs("ContentCh")
ContentEn=rs("ContentEn")
ChildFlag=rs("ChildFlag")
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 + -