📄 post_edit.asp
字号:
<!--#include file="Inc/Config.Asp"-->
<!--#include file="Conn.Asp"-->
<!--#include file="Inc/md5.Asp"-->
<!--#include file="Inc/Index_Inc.Asp"-->
<!--#include file="Inc/pwwd.Asp"-->
<!--#include file="Inc/UserPs.Asp"-->
<%
'├========================================┤
'‖ www.fywen.com ‖
'‖ ╔━═━═━═━═━═━╗ ‖
'‖ ┃ 枫叶在线版权所有 ┃ ‖
'‖ ╚━═━═━═━═━═━╝ ‖
'‖ 论坛:www.fywen.com/bbs ‖
'├========================================┤
Menu = ReplaceBadWord(Request.QueryString("menu"))
Select Case Menu
Case "editposts"
Call editposts()
Case "editpost"
Call editpost()
End Select
'----------------------------------------------------------
'===========================================
' ╔━═━═━═━═━═━╗
' ┃ 枫叶在线版权所有 ┃
' ╚━═━═━═━Fywen ━╝
'============================================
'‖编辑恢复函数
'‖过程名:editposts
'‖参数:
'============================================
sub editposts()
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
table="<table width=""66%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""table_5""><tr><td height=""20"" class=""Fywen_Err""><strong><font color=""#FFFFFF"">信息提示</font></strong></td></tr><tr><td height=""55""><br/><br/>你提交的路径有误,禁止从站点外部提交数据<br/><br/> <a href=""Index.Asp"" class='size'>返回首页</a> <a href=""Login.Asp"" class=""size"">登陆贴吧</a></td></tr><tr><td height=""34""></td></tr><tr><td height=""1"" class=""Fywen_Err""></td></tr><tr><td height=""227""></td></tr></table>"
else
Post = ReplaceBadWord(Request.QueryString("postid"))
username = session("uesrname")
password = session("userpwd")
If Rform(Request.QueryString("searchname")) <> "" Then
searchname = Request.QueryString("searchname")
If Rform(Request.QueryString("postpage")) <> "" Then
postpage = ReplaceBadWord(Request.QueryString("postpage"))
Url= Rform(Request.QueryString("post_url"))&"&Postpage="&postpage&"&searchname="&searchname
Else
Url= Rform(Request.QueryString("post_url"))&"&searchname="&searchname
End If
Else
Url= Rform(Request.QueryString("post_url"))
End If
If username = "" or password ="" Then
table="<table width=""66%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""table_5""><tr><td height=""20"" class=""Fywen_Err""><strong><font color=""#FFFFFF"">信息提示</font></strong></td></tr><tr><td height=""55""><br/><br/>用户登陆超时或已经退出,请重新登陆<Meta http-equiv='Refresh' Content='2; Url=Login.Asp'>[<font color=""#0099FF"">三秒钟后将自动跳转到登陆页面</font>]<br/><br/> <a href='javascript:window.history.back();' class='size'>点击返回</a> <a href=""Login.Asp"" class=""size"">登陆贴吧</a></td></tr><tr><td height=""34""></td></tr><tr><td height=""1"" class=""Fywen_Err""></td></tr><tr><td height=""227""></td></tr></table>"
else
Set rs= server.createobject("adodb.recordset")
Sql="select [postadmin],[adminuser] from [user] where [username]='"&Username&"' And [userpwd]='"&password&"'"
Rs.Open Sql,Conn
If rs.eof Then
table="<table width=""66%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""table_5""><tr><td height=""20"" class=""Fywen_Err""><strong><font color=""#FFFFFF"">信息提示</font></strong></td></tr><tr><td height=""55""><br/><br/>请不要非法尝试<Meta http-equiv='Refresh' Content='2; Url=Login.Asp'>[<font color=""#0099FF"">三秒钟后将自动跳转到登陆页面</font>]<br/><br/> <a href='javascript:window.history.back();' class='size'>点击返回</a> <a href=""Login.Asp"" class=""size"">登陆贴吧</a></td></tr><tr><td height=""34""></td></tr><tr><td height=""1"" class=""Fywen_Err""></td></tr><tr><td height=""227""></td></tr></table>"
Else
Set Rs1= server.createobject("adodb.recordset")
sql1="select [posts] from [retitle] where [id]="&post
Rs1.Open Sql1,Conn
If Rs1("posts") = Rs("postadmin") Or Rs("adminuser")="1" Then
Set Rs2= server.createobject("adodb.recordset")
Sql2="select [title],[body],[img] from [retitle] where id="&post
Rs2.Open Sql2,Conn,1,1
if rs2("img")="0" then
img=""
else
img=rs2("img")
end if
table="<table width=""66%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""table_5""><tr><td height=""20"" class=""Fywen_Err""><strong><font color=""#FFFFFF"">编辑帖子</font></strong></td></tr><tr><td height=""55"">"
table=table&"<br/><br/><br/><table width='95%' border='0' cellspacing='1' cellpadding='3' align='center' ><form action=""Post_Edit_Ok.asp?postid="&post&"&action=EditPosts&post_url="&url&""" method='post'><tr>"
table=table&"<td valign='top' nowap>标 题:</td><td width='90%'><input type='text' name='Title' value='"&rs2("title")&"' class='Posts_input'/></td></tr><tr > <td valign='top' nowap>内 容:</td><td width='90%'>"
table=table&"<textarea name='Body' rows='8' class='Post_input'>"&HtmlText(rs2("body"))&"</textarea></td></tr><tr><td valign='top' nowrap nowap>图片链接:</td><td width='90%'> <input type='text' name='Img' value='"&img&"' class='Posts_input' >"
table=table&" [ <a href='post_img.asp' target='_blank' class='size'>如何贴图</a> ] </td></tr>"
table=table&"<tr> <td valign='top'></td><td width='93%'> <input type='submit' name='Submit3' value='编辑贴子' class='button_1'> <input type='reset' name='Submit3' value='重新填写' class='button_1'></td></tr><tr align='left'> <td valign='top' colspan='2'></td></tr></form></table>"
table=table&"</td></tr><tr><td height=""34""></td></tr><tr><td height=""1"" class=""Fywen_Err""></td></tr><tr><td height=""100""></td></tr></table>"
rs1.close
set rs1=nothing
rs2.close
set rs2=nothing
Else
Set Rs1= server.createobject("adodb.recordset")
Sql1="select [username] from [retitle] where id="&post
Rs1.Open Sql1,Conn,1,1
Set Rs2= server.createobject("adodb.recordset")
Sql2="select [title],[body],[img] from [retitle] where id="&post
Rs2.Open Sql2,Conn,1,1
if rs2("img")="0" then
img=""
else
img=rs2("img")
end if
if rs1("username")=session("uesrname") and User_edit="1" then
table="<table width=""66%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""table_5""><tr><td height=""20"" class=""Fywen_Err""><strong><font color=""#FFFFFF"">编辑帖子</font></strong></td></tr><tr><td height=""55"">"
table=table&"<br/><br/><br/><table width='95%' border='0' cellspacing='1' cellpadding='3' align='center' ><form action=""Post_Edit_Ok.asp?postid="&post&"&action=EditPosts&post_url="&url&""" method='post'><tr>"
table=table&"<td valign='top' nowap>标 题:</td><td width='90%'><input type='text' name='Title' value='"&rs2("title")&"' class='Posts_input'/></td></tr><tr > <td valign='top' nowap>内 容:</td><td width='90%'>"
table=table&"<textarea name='Body' rows='8' class='Post_input'>"&HtmlText(rs2("body"))&"</textarea></td></tr><tr><td valign='top' nowrap nowap>图片链接:</td><td width='90%'> <input type='text' name='Img' value='"&img&"' class='Posts_input' >"
table=table&" [ <a href='post_img.asp' target='_blank' class='size'>如何贴图</a> ] </td></tr>"
table=table&"<tr> <td valign='top'></td><td width='93%'> <input type='submit' name='Submit3' value='编辑贴子' class='button_1'> <input type='reset' name='Submit3' value='重新填写' class='button_1'></td></tr><tr align='left'> <td valign='top' colspan='2'></td></tr></form></table>"
table=table&"</td></tr><tr><td height=""34""></td></tr><tr><td height=""1"" class=""Fywen_Err""></td></tr><tr><td height=""100""></td></tr></table>"
Else
table="<table width=""66%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""table_5""><tr><td height=""20"" class=""Fywen_Err""><strong><font color=""#FFFFFF"">信息提示</font></strong></td></tr><tr><td height=""55""><br/><br/>请不要非法尝试,请确定有该权限<br/><br/> <a href='javascript:window.history.back();' class='size'>点击返回</a> </td></tr><tr><td height=""34""></td></tr><tr><td height=""1"" class=""Fywen_Err""></td></tr><tr><td height=""227""></td></tr></table>"
end if
end if
end if
end if
end if
%>
<html >
<head>
<link rel="Shortcut Icon" href="favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<META NAME="keywords" CONTENT="<%=keywords%>">
<META NAME="description" CONTENT="<%=description%>">
<META NAME="robots" CONTENT="all">
<title><%=fywenname%> - 信息提示<%call serach()%></title>
<link href="skin/<%=skin%>/fywen.css" rel="stylesheet" type="text/css"></head>
<!--#include file="Fywen_Top.Asp"-->
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_5">
<tr>
<td height="28" class="Fywen_Bj"> <a href="index.asp" class="size"><%=fywenname%></a> -> <font class='index_titlesize'>信息提示</font></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" height="75%">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -