📄 -
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0042)http://coderhome.net/code/index.php?id=103 -->
<HTML xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>留言本 - 只能删除自己的留言 - PHP源码 - 代码之家</TITLE>
<META http-equiv=content-type content="text/html; charset=UTF-8">
<META http-equiv=Content-Script-Type content=text/javascript>
<META content="找造精品代码共享平台,.NET JAVA PHP C# C++ AJAX源码" name=description>
<META content="代码共享,.NET JAVA PHP C# C++ AJAX源码PHP" name=keywords>
<META content="MSHTML 6.00.2900.5726" name=GENERATOR><LINK media=all
href="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/style.css" type=text/css
rel=stylesheet><LINK title=RSS href="index.php?mode=rss"
type=application/rss+xml rel=alternate><LINK href="./" rel=top><LINK
href="index.php?mode=search" rel=search><LINK
href="templates/default/images/favicon.ico" rel="shortcut icon">
<SCRIPT src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/javascripts.js"
type=text/javascript></SCRIPT>
</HEAD>
<BODY
onload="preload_images(new Array('templates/default/images/link_hover.png'))">
<DIV id=top>
<DIV class=left>
<P class=home><A href="http://coderhome.net/">PHP开源项目网</A></P>
<H1><A title=首页 href="http://coderhome.net/code/index.php">代码之家</A></H1></DIV>
<DIV class=right>
<P class=usermenu><A title=登录
href="http://coderhome.net/code/index.php?mode=login">登录</A> | <A title=注册
href="http://coderhome.net/code/index.php?mode=register">注册</A></P>
<FORM title=搜索 action=index.php method=get>
<DIV class=search><INPUT type=hidden value=search name=mode><LABEL
for=search_top>搜索:</LABEL> <INPUT class=searchfield id=search_top size=25
name=search><!-- <input type="image" src="templates/default/images/submit.png" alt="[»]" />--></DIV></FORM></DIV></DIV>
<DIV id=topnav>
<DIV class=left><A class=stronglink title=首页
href="http://coderhome.net/code/index.php?mode=index">返回首页</A> <A
style="COLOR: #ff0000" href="http://coderhome.net/book/php/"
target=_blank>PHP代码教程轻轻松松学PHP</A></DIV>
<DIV class=right></DIV></DIV>
<DIV id=content>
<DIV class=posting>
<H1>留言本 - 只能删除自己的留言 <SPAN class=category>(PHP)</SPAN></H1>
<P class=author>by <B>dzjzmj</B>, Monday, May 26, 2008, 23:25
<SCRIPT type=text/JavaScript>
alimama_pid="mm_10074524_161730_2181766";
alimama_titlecolor="0000FF";
alimama_descolor ="000000";
alimama_bgcolor="FFFFFF";
alimama_bordercolor="E6E6E6";
alimama_linkcolor="008000";
alimama_bottomcolor="FFFFFF";
alimama_anglesize="0";
alimama_bgpic="0";
alimama_icon="0";
alimama_sizecode="11";
alimama_width=760;
alimama_height=90;
alimama_type=2;
</SCRIPT>
<SCRIPT src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/inf.js" type=text/javascript>
</SCRIPT>
</P><LINK href="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/SyntaxHighlighter.css"
type=text/css rel=stylesheet></LINK><TEXTAREA class=php name=code><?php
session_start();
require('common.php');
// 查询出留言信息
$q = mysql_query('select * from gb_content where id='.intval($_GET['id']));
$rs = mysql_fetch_array($q);
if ($rs['user_id']!=intval($_SESSION['user_id'])) {// 判断user_id是否相同
echo '该信息你不能删除,只能删除自己发布的';
exit;
}
mysql_query('delete from gb_content where id='.intval($_GET['id']));//删除语句
echo '已删除!<a href="index.php">查看留言</a>';
?></TEXTAREA>
<SCRIPT language=javascript
src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/shCore.js"></SCRIPT>
<SCRIPT language=javascript
src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/shBrushPhp.js"></SCRIPT>
<SCRIPT language=javascript>
dp.SyntaxHighlighter.ClipboardSwf = 'js/Scripts/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
</SCRIPT>
<P>将数据中user_id与session中值对比</P>
<P class=tags>Tags: <A
href="http://coderhome.net/code/index.php?mode=search&search=PHP&method=tags">PHP</A> 我来评分:
<A
href="javascript:simple_ajax_request(null,'id=103&action=p&lv=1');alert('评分已提交')">高手</A>
<A
href="javascript:simple_ajax_request(null,'id=103&action=p&lv=2');alert('评分已提交')">一般</A>
<A
href="javascript:simple_ajax_request(null,'id=103&action=p&lv=3');alert('评分已提交')">菜鸟</A>
</P></DIV>
<DIV class=postingbottom>
<DIV class=postinganswer><A class=stronglink title="Reply to this message"
href="http://coderhome.net/code/index.php?mode=posting&id=103&back=entry">回复</A></DIV>
<DIV class=postingedit> </DIV></DIV>
<SCRIPT type=text/JavaScript>
alimama_pid="mm_10074524_161730_2222187";
alimama_titlecolor="0000FF";
alimama_descolor ="000000";
alimama_bgcolor="FFFFFF";
alimama_bordercolor="E6E6E6";
alimama_linkcolor="008000";
alimama_bottomcolor="FFFFFF";
alimama_anglesize="0";
alimama_bgpic="0";
alimama_icon="0";
alimama_sizecode="15";
alimama_width=950;
alimama_height=90;
alimama_type=2;
</SCRIPT>
<SCRIPT src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/inf.js" type=text/javascript>
</SCRIPT>
<HR class=entryline>
<DIV class=complete-thread>
<P class=left><B>Complete thread:</B></P>
<P class=right> <IMG height=9 alt=""
src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/rss_link.png" width=13><A
title="RSS Feed of this thread"
href="http://coderhome.net/code/index.php?mode=rss&thread=103">RSS Feed of
thread</A></P></DIV>
<UL class=complete-thread>
<LI><SPAN class=actthread>留言本 - 只能删除自己的留言</SPAN> - <B>dzjzmj</B>, 2008-05-26,
23:25 <A title="Open whole thread"
href="http://coderhome.net/code/index.php?mode=thread&id=103"><IMG
title="Open whole thread" height=11 alt=[*]
src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/complete_thread.png" width=11></A>
<A href="http://coderhome.net/code/index.php?mode=index&category=1"><SPAN
class=category>(PHP)</SPAN></A></LI></UL>
<SCRIPT type=text/javascript>
/* <![CDATA[ */
document.write('<div id="ajax-preview" ondblclick="hide_element(\'ajax-preview\')">');
document.write('<div id="ajax-preview-top"> </div>');
document.write('<a id="ajax-preview-close" href="#" onclick="hide_element(\'ajax-preview\'); return false"><img src="templates/default/images/close.png" alt="[x]" title="close" width="14" height="14" /></a>');
document.write('<div id="ajax-preview-body">');
document.write('<div id="ajax-preview-handle">');
document.write('<div id="ajax-preview-throbber"><img src="templates/default/images/throbber.gif" alt="" width="16" height="16" /></div>');
document.write('<div id="ajax-preview-content"></div>');
document.write('</div></div></div>');
//new Draggable('ajax-preview',{handle:'ajax-preview-handle'});
/* ]]> */
</SCRIPT>
</DIV>
<DIV id=bottom>
<DIV class=left>158 Postings in 133 Threads, 290 registered users</DIV>
<DIV class=right><A title="RSS Feed of all new postings"
href="http://coderhome.net/code/index.php?mode=rss"><IMG height=9 alt=""
src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/rss_link.png" width=13>RSS
Postings</A> <A title="RSS Feed of thread starting postings only"
href="http://coderhome.net/code/index.php?mode=rss&items=thread_starts"><IMG
height=9 alt="" src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/rss_link.png"
width=13>RSS Threads</A> | <A title="E-mail to the forum administrator"
href="http://coderhome.net/code/index.php?mode=contact">Contact</A></DIV></DIV>
<DIV id=pbmlf><A href="http://coderhome.net/">powered by coderhome.net</A> <!-- *** Vdoing Code *** -->
<SCRIPT src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/28875.js" type=text/javascript
charset=UTF-8></SCRIPT>
<NOSCRIPT><A title="Vdoing StatsX No.28875" href="http://www.vdoing.com/"><IMG
src="留言本 - 只能删除自己的留言 - PHP源码 - 代码之家.files/x01.gif" border=0></A></NOSCRIPT> <!-- *** End of Vdoing Code *** -->
<SCRIPT type=text/javascript>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</SCRIPT>
<SCRIPT type=text/javascript>
try {
var pageTracker = _gat._getTracker("UA-1334907-4");
pageTracker._trackPageview();
} catch(err) {}</SCRIPT>
</DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -