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

📄 post_edit_ok.asp

📁 好用的贴吧源代码
💻 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        ‖
'├========================================┤

action = ReplaceBadWord(Request.QueryString("action"))
Select Case action
	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>&nbsp;&nbsp;&nbsp;<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"))
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
title=HtmlDeal(request.Form("title"))
body=HtmlDeal(request.Form("body"))
img=HtmlDeal(request.Form("img"))
if img="" then
   img="0"
End If
postid=ReplaceBadWord(request.QueryString("postid"))
set rs= server.createobject("adodb.recordset")
 sql= "update [retitle] set [title]='"&title&"',[body]='"& body &"',[img]='"& img &"' where [id]="& postid
 rs.Open sql,conn,3
 if Edit_date="1" then
 set rs= server.createobject("adodb.recordset")
 sql= "select [postid] from [edit] where [postid]="& postid &" and [pors]='posts'"
 rs.Open sql,conn,1,1'/*检查是否以前被编辑*/
 uptime=now()
 if rs.eof then'/*如果没有被编辑*/
    set rs1= server.createobject("adodb.recordset")
        sql1= "insert into [edit]([pors],[postid],[body],[uptime]) values ('posts','"&post&"','<font class=""index_titlesize_2"">[此贴于"&uptime&"曾被&nbsp;"&session("uesrname")&"&nbsp;编辑]</font>','"&uptime&"')"
        rs1.Open sql1,conn,3'/*新加一条*/
  Else
    set rs1= server.createobject("adodb.recordset")
    sql1= "update [edit] set [body]='<font class=""index_titlesize_2"">[此贴于"& uptime &"曾被&nbsp;"& session("uesrname") &"&nbsp;编辑]</font>',[uptime]='"& uptime &"' where [postid]="& post &" and [pors]='posts'"
    rs1.Open sql1,conn,3'/*如果存在在原来基础编辑*/
 end if
 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""><br/><br/>帖子编辑成功&nbsp;<a href="&url&" class='size'>返回贴吧</a><br/><br/> <a href=""Index.Asp"" class='size'>返回首页</a>&nbsp;&nbsp;&nbsp;</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
%>
<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">&nbsp;&nbsp;<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%">
    <tr>
      <td valign="top">
	  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	    <tr><td height="50"></td></tr></table>
	    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" height="70"><tr><td valign="top">
	    <%=table%>
	     </td></tr></table>
	  </td>
    </tr>
</table>
<!--#include file="Bottom.Asp"-->
</body>
</html>
<%
if Edit_date="1" then
rs1.close
set rs=nothing
end if
End Sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================          
'‖编辑函数
'‖过程名:editpost
'‖参数:  
'============================================
sub editpost()
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>&nbsp;&nbsp;&nbsp;<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"))
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
title=HtmlDeal(request.Form("title"))
body=HtmlDeal(request.Form("body"))
img=HtmlDeal(request.Form("img"))
if img="" then
   img="0"
End If
postid=ReplaceBadWord(request.QueryString("postid"))
set rs= server.createobject("adodb.recordset")
 sql= "update [title] set [title]='"& title &"',[body]='"& body &"',[img]='"& img &"' where [id]="& postid
 rs.Open sql,conn,3
 if Edit_date="1" then
 set rs= server.createobject("adodb.recordset")
 sql= "select [postid] from [edit] where [postid]="& postid &" and [pors]='post'"
 rs.Open sql,conn,1,1'/*检查是否以前被编辑*/
 uptime=now()
 if rs.eof then'/*如果没有被编辑*/
    set rs1= server.createobject("adodb.recordset")
        sql1= "insert into [edit]([pors],[postid],[body],[uptime]) values ('post','"& post &"','<font class=""index_titlesize_2"">[此贴于"&uptime&"曾被&nbsp;"& session("uesrname") &"&nbsp;编辑]</font>','"& uptime &"') "
        rs1.Open sql1,conn,3'/*新加一条*/
  Else
    set rs1= server.createobject("adodb.recordset")
    sql1= "update [edit] set [body]='<font class=""index_titlesize_2"">[此贴于"& uptime &"曾被&nbsp;"& session("uesrname") &"&nbsp;编辑]</font>',[uptime]='"& uptime &"' where [postid]="& post &" and [pors]='post'"
    rs1.Open sql1,conn,3'/*如果存在在原来基础编辑*/
 end if
 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""><br/><br/>帖子编辑成功&nbsp;<a href="&url&" class='size'>返回贴吧</a><br/><br/> <a href=""Index.Asp"" class='size'>返回首页</a>&nbsp;&nbsp;&nbsp;</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
%>
<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">&nbsp;&nbsp;<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%">
    <tr>
      <td valign="top">
	  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	    <tr><td height="50"></td></tr></table>
	    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" height="70"><tr><td valign="top">
	    <%=table%>
	     </td></tr></table>
	  </td>
    </tr>
</table>
<!--#include file="Bottom.Asp"-->
</body>
</html>
<%
if Edit_date="1" then
rs1.close
set rs=nothing
end if
End Sub
%>

⌨️ 快捷键说明

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