admin_addaffiche.asp
来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 124 行
ASP
124 行
<%@ 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="../Include/Version.asp" -->
<!--#include file="CheckAdmin.asp"-->
<script language=javascript>
function ConfirmDel()
{
if(confirm("确定要删除此记录吗?"))
return true;
else
return false;
}
</script>
<%
if Request.QueryString("no")="yes" then
id= Trim(Request("id"))
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "DELETE FROM LiangJingCMS_affiche Where id="&id,Conn,2,3,1
Set Rs= Nothing
Response.Redirect "Admin_AddAffiche.asp"
end if
if Request.QueryString("mark")="southidc" then
If request.form("title")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入标题,请返回检查!!"");history.go(-1);</script>")
response.end
end if
If request.form("content")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入公吿内容,请返回检查!!"");history.go(-1);</script>")
response.end
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select top 1 * from LiangJingCMS_affiche"
rs.open sql,conn,1,3
rs.addnew
if request.form("html")="on" then
rs("content")=request.form("content")
else
rs("content")=htmlencode2(request.form("content"))
end if
rs("title")=request.form("title")
rs("time")=date()
rs.update
rs.close
response.redirect "Admin_AddAffiche.asp"
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from LiangJingCMS_affiche"
rs.open sql,conn,1,1
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"> <br> <strong><br>
</strong>
<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="Admin_AddAffiche.asp" onclick='changeAdminFlag("添加管理员")'>管理网站公告</a><font color="#0000FF"> | </font><a href="Admin_editAffiche.asp?id=45" onclick='changeAdminFlag("网站管理员")'>修改中文公告</a><font color="#0000FF"> | </font><a href="Admin_editAffiche.asp?id=48" onclick='changeAdminFlag("修改管理员密码")'>修改英文公告</a></td>
</tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
<form name="editForm" method="post" action="AdminEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
<tr>
<th width="100%" height="22">【管理网站公告】</th>
</tr>
<tr <%if ID=1 then response.write ("style=display:none")%>>
<td align="right" class="forumRow"><div align="center">
<table width="100%" border="0" cellspacing="2" cellpadding="3">
<tr bgcolor="#ECF5FF">
<td width="51%" height="25" bgcolor="#ECF5FF"><div align="center">公告标题</div>
<div align="center"></div></td>
<td width="19%"><div align="center">加入时间</div></td>
<td width="13%"><div align="center">操作</div></td>
<td width="17%"><div align="center">类型</div></td>
</tr>
<% do while not Rs.eof %>
<tr bgcolor="#CCFFFF">
<td height="22" bgcolor="#EAFEFE"><div align="center"> <%=rs("Title")%></div>
<div align="center"></div></td>
<td bgcolor="#EAFEFE"><div align="center"><%= FormatDateTime(rs("time"),2) %></div></td>
<td bgcolor="#EAFEFE"><div align="center"><a href="Admin_editAffiche.asp?id=<%=Rs("id")%>">修改</a></div></td>
<td bgcolor="#EAFEFE"><div align="center">
<%if rs("id")=45 then%>
中文公告
<%else%>
英文公告
<%end if%>
</div></td>
</tr>
<%Rs.MoveNext
loop
%>
</table>
</div></td>
</tr>
</form>
</table>
<br>
<br> </td>
</tr>
</table>
<%
Set Rs = Nothing
Set Conn = Nothing
rs.close
Conn.close
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?