📄 msg_add.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<!--#INCLUDE FILE="../data/conn.asp"-->
<!--#INCLUDE FILE="loginoff.asp"-->
<wml>
<head>
<meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
<meta http-equiv="Expires" content="0" forua="true"/>
<meta http-equiv="Pragma" content="no-cache" forua="true"/>
<meta http-equiv="Content-Type" content="text/vnd.wap.wml; charset=utf-8"/>
</head>
<%
dim msgtitle,msgbody,msgtime,action
msgtitle=untowide(request("msgtitle"))
msgbody=UBBcode(request("msgbody"))
action=request("action")
if action<>"new" or action="" then
response.write "<card id='card1' title='添加失败'><p>"
response.write "你提交的资料有误,请注意检查 :标题及内容不得为空。"
response.write "<br/><anchor><prev/>返回重写</anchor><br/><a href='"&mywaphome&" '>" & mywapname & "</a><br/>" & mywaphost & "</p></card></wml>"
response.end
End if
if ((Session("IsSametitle")=msgtitle and Session("IsSamebody")=msgbody) and ((Session("IsSametitle")<>"" or Session("IsSamebody")<>""))) or action="" then
response.write "<card id='card1' title='添加失败'><p>添加公告不成功,你己经提交过了相同主题和内容的公告了,勿须重复提交。<br/>"
response.write "<br/><a href='"&mywaphome&"'>" & mywapname & "</a><br/>" & mywaphost & "</p></card></wml>"
response.end
End if
if msgbody="" and msgtitle="" then
%>
<card title="添加新公告"><p>
公告标题:
<br/><input type="text" title="输入标题" name="msgtitle" maxlength="45"/>
<br/>公告内容:
<br/><input type="text" title="输入内容" name="msgbody" maxlength="800"/>
<br/><anchor title="确定">[确定提交]
<go method="post" href="msg_add.asp">
<postfield name="msgtitle" value="$(msgtitle)"/>
<postfield name="msgbody" value="$(msgbody)"/>
<postfield name="action" value="new"/>
</go>
</anchor>
<%
Response.write "<br/>-------<br/>"
Response.write "<a href=""../message.asp"">[公告列表]</a><br/><a href='site_manage.asp'>[管理中心]</a><br/><a href='"&mywaphome&"'>["&mywapname&"]</a><br/><a href='loginexit.asp'>[安全退出]</a><br/>"& mywaphost&"<br/>" & mywapcatchword
response.end
end if
'以下正式提交
sql="insert into message (IsViewMsg,msgtitle,msgbody) values("
sql=sql & true & ","
sql=sql & sqlstr(msgtitle) & ","
sql=sql & sqlstr(msgbody) &")"
conn.execute sql
conn.close
set conn=nothing
Session("IsSametitle")=msgtitle
Session("IsSamebody")=msgbody
Session.Timeout=1200
response.write "<card id='card1' title='发布成功'><p>"
response.write "你已经成功发布了一条新公告。"
Response.write "<br/>-------<br/><a href=""../message.asp"">[公告列表]</a><br/><a href=""msg_add.asp?action=new"">[返回再写]</a><br/><a href='site_manage.asp'>[管理中心]</a><br/><a href='/index.asp'>["&mywapname&"]</a><br/><a href='loginexit.asp'>[安全退出]</a><br/>"& mywaphost&"<br/>" & mywapcatchword
response.end
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -