<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>爱得太迟</title>
		<link>http://www.lusisi.com/</link>
		<description>如果奇迹没有出现,那么就努力去创造一个...</description>
		<copyright>Copyright (C) 2004 Security Angel Team [S4T] All Rights Reserved.</copyright>
		<generator>SaBlog-X Version 1.6 Build 20080806</generator>
		<lastBuildDate>Fri, 10 Sep 2010 08:34:48 +0000</lastBuildDate>
		<ttl>30</ttl>
		<item>
			<guid>http://www.lusisi.com/?action=show&amp;id=57</guid>
			<title>附1之CSS和附2之SQL</title>
			<author>爱得</author>
			<description><![CDATA[<p>删除......</p>
<p>此留言本程序为整合,用于学习之用途,其它不限.<br />
附1：css.css<br />
&lt;!--<br />
body {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font-family: Arial, Helvetica, sans-serif;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font-size:12px;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color:#666666;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background:#fff;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text-align:center;<br />
}<br />
* {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; margin:0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; padding:0;<br />
}<br />
a {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color:#1E7ACE;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text-decoration:none;&nbsp;&nbsp;&nbsp;&nbsp; <br />
}<br />
a:hover {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color:#000;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text-decoration:underline;<br />
}<br />
h3 {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font-size:14px;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font-weight:bold;<br />
}</p><br /><br /><a href="http://www.lusisi.com/?action=show&amp;id=57" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.lusisi.com/?action=show&amp;id=57</link>
			<category domain="http://www.lusisi.com/?cid=5">PHP相关</category>
			<pubDate>2009-02-21 17:48</pubDate>
		</item>
		<item>
			<guid>http://www.lusisi.com/?action=show&amp;id=56</guid>
			<title>留言本小教程－整合之五</title>
			<author>爱得</author>
			<description><![CDATA[<p>删除......</p>
<p>此留言本程序为整合,用于学习之用途,其它不限.</p>
<p>第八节：anyone.php</p>
<p>这里我只做了info也就是留言内容中的内容可修改，你可以自己修改成全部可改。</p>
<p>&lt;?<br />
&nbsp;session_start();<br />
?&gt;<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>&quot;&gt;<br />
&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt; <br />
&lt;head&gt; <br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot;&gt; <br />
&lt;title&gt;爱得留言本&lt;/title&gt;<br />
&lt;link rel=&quot;stylesheet&quot; href=&quot;css.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;<br />
&lt;/head&gt; <br />
&lt;body&gt;<br />
&lt;div id=&quot;formwrapper&quot;&gt;<br />
&lt;h3&gt;修改留言&lt;/h3&gt;<br />
&nbsp;&lt;?<br />
&nbsp;if($_SESSION['admin']==&quot;OK&quot;)<br />
&nbsp;{<br />
&nbsp; require('config.php');<br />
&nbsp; $conn=mysql_connect($host,$user,$password);<br />
&nbsp; mysql_select_db($db);<br />
&nbsp; mysql_query(&quot;set names GB2312&quot;);<br />
&nbsp; $exec=&quot;select * from gbook where id=&quot;.$_GET['id'];<br />
&nbsp; $result=mysql_query($exec);<br />
&nbsp; $rs=mysql_fetch_object($result);<br />
&nbsp; $name=$rs-&gt;name;<br />
&nbsp; $email=$rs-&gt;email;<br />
&nbsp; $home=$rs-&gt;home;<br />
&nbsp; $title=$rs-&gt;title;<br />
&nbsp; $info=$rs-&gt;info;<br />
&nbsp; $id=$rs-&gt;id;<br />
&nbsp;?&gt;</p><br /><br /><a href="http://www.lusisi.com/?action=show&amp;id=56" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.lusisi.com/?action=show&amp;id=56</link>
			<category domain="http://www.lusisi.com/?cid=5">PHP相关</category>
			<pubDate>2009-02-21 17:47</pubDate>
		</item>
		<item>
			<guid>http://www.lusisi.com/?action=show&amp;id=55</guid>
			<title>留言本小教程－整合之四</title>
			<author>爱得</author>
			<description><![CDATA[<p>删除......</p>
<p>此留言本程序为整合,用于学习之用途,其它不限.</p>
<p>第六节：check.php</p>
<p>判断用户名和密码的正确性。<br />
&lt;? <br />
&nbsp; require('config.php');<br />
&nbsp; session_start();<br />
&nbsp; $admin_name=$_POST['admin_name'];<br />
&nbsp; $admin_password=$_POST['password'];<br />
&nbsp; $conn=mysql_connect($host,$user,$password);<br />
&nbsp; mysql_select_db($db);<br />
&nbsp; mysql_query(&quot;set names GB2312&quot;);<br />
&nbsp; $exec=&quot;select password from users where admin_name='$admin_name'&quot;;<br />
&nbsp; $result=mysql_query($exec);<br />
&nbsp; $num=mysql_num_rows($result);<br />
&nbsp;&nbsp; if (<a href="mailto:$rs=@mysql_fetch_object($result">$rs=@mysql_fetch_object($result</a>))<br />
&nbsp;&nbsp;&nbsp; { if ($rs-&gt;password==$admin_password)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {$_SESSION['admin']=&quot;OK&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; header(&quot;location:admin_index.php&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else echo&quot;密码不正确,请&lt;a href='login.php'&gt;返回&lt;/a&gt;&quot;;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp; else echo&quot;用户名不正确,请&lt;a href='login.php'&gt;返回&lt;/a&gt;&quot;;<br />
&nbsp;&nbsp; mysql_close();<br />
?&gt;</p><br /><br /><a href="http://www.lusisi.com/?action=show&amp;id=55" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.lusisi.com/?action=show&amp;id=55</link>
			<category domain="http://www.lusisi.com/?cid=5">PHP相关</category>
			<pubDate>2009-02-21 17:47</pubDate>
		</item>
		<item>
			<guid>http://www.lusisi.com/?action=show&amp;id=54</guid>
			<title>留言本小教程－整合之三</title>
			<author>爱得</author>
			<description><![CDATA[<p>删除......</p>
<p>此留言本程序为整合,用于学习之用途,其它不限.</p>
<p>第四节：update.php</p>
<p>根据用户在index.php提交的内容存到表gbook中，</p>
<p>&lt;?php<br />
function getip() { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $IP=getenv('REMOTE_ADDR'); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $IP_ = getenv('HTTP_X_FORWARDED_FOR'); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (($IP_ != &quot;&quot;) &amp;&amp; ($IP_ != &quot;unknown&quot;)) $IP=$IP_; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $IP; <br />
}<br />
&nbsp; require('config.php');<br />
&nbsp; $name=$_POST['post_name']; //把获得的内容放到$name中<br />
&nbsp; $email=$_POST['post_email'];<br />
&nbsp; $home=$_POST['post_home'];<br />
&nbsp; $ip=getip();<br />
&nbsp; $title=$_POST['post_title'];<br />
&nbsp; $info=$_POST['post_info'];<br />
&nbsp; $time=date('Y-m-d H:i:s');<br />
&nbsp; $conn=mysql_connect($host,$user,$password); //连接sql服务器<br />
&nbsp;&nbsp; mysql_query(&quot;set names GB2312&quot;);&nbsp; <br />
&nbsp;&nbsp; mysql_select_db($db); //连接数据库<br />
&nbsp;&nbsp; $exec=&quot;insert into gbook (name,email,home,ip,title,info,time)values('$name','$email','$home','$ip','$title','$info','$time')&quot;; <br />
&nbsp;&nbsp; $result=mysql_query($exec);//插入留言内容到表gbook中的相应地方。<br />
&nbsp;&nbsp; mysql_close();<br />
&nbsp;&nbsp; header(&quot;location:index.php&quot;); //完成后返回到index.php<br />
?&gt;</p><br /><br /><a href="http://www.lusisi.com/?action=show&amp;id=54" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.lusisi.com/?action=show&amp;id=54</link>
			<category domain="http://www.lusisi.com/?cid=5">PHP相关</category>
			<pubDate>2009-02-21 17:46</pubDate>
		</item>
		<item>
			<guid>http://www.lusisi.com/?action=show&amp;id=53</guid>
			<title>留言本小教程－整合之二</title>
			<author>爱得</author>
			<description><![CDATA[<p>删除......</p>
<p>此留言本程序为整合,用于学习之用途,其它不限.</p>
<p>第三节：取＝读 index.php</p>
<p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>&quot;&gt;<br />
&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;<br />
&lt;title&gt;爱得留言本&lt;/title&gt;<br />
&lt;link rel=&quot;stylesheet&quot; href=&quot;css.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
function check_message(){<br />
if(window.document.leave.post_name.value==&quot;&quot;){<br />
alert(&quot;请填写用户名.&quot;);<br />
document.leave.post_name.focus();<br />
return false;}<br />
if(document.leave.post_title.value==&quot;&quot;){<br />
alert(&quot;请填写留言标题.&quot;);<br />
document.leave.post_title.focus();<br />
return false;}<br />
if(document.leave.post_info.value==&quot;&quot;){<br />
alert(&quot;请填写留言内容.&quot;);<br />
document.leave.post_info.focus();<br />
return false;}<br />
return true;<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&quot;formwrapper&quot;&gt;<br />
&lt;h3&gt;&lt;a class=&quot;del&quot; href=&quot;login.php&quot;&gt;管理&lt;/a&gt;用户留言内容&lt;/h3&gt;</p><br /><br /><a href="http://www.lusisi.com/?action=show&amp;id=53" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.lusisi.com/?action=show&amp;id=53</link>
			<category domain="http://www.lusisi.com/?cid=5">PHP相关</category>
			<pubDate>2009-02-21 17:45</pubDate>
		</item>
		<item>
			<guid>http://www.lusisi.com/?action=show&amp;id=52</guid>
			<title>留言本小教程－整合之一</title>
			<author>爱得</author>
			<description><![CDATA[<p>删除......</p>
<p>此留言本程序为整合,用于学习之用途,其它不限.</p>
<p>规划：<br />
这个就是最后做成的样子，先看下数据如何安排：</p>
<p>首先要有一个表放留言内容的，于是创建表gbook ，然后在这个表里设定 name、email、home、title、info、和 id 分别存取各内容。</p>
<p>这个要有管理功能，所以再创建一个表users 里面只有id、admin_name、password。</p>
<p>第一节：config.php</p>
<p>&lt;?php<br />
$host =&quot;localhost&quot;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //MYSQL数据库地址，通常为IP地址或者网址，请问一下你的空间提供商<br />
$db =&quot;data&quot;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //所使用MYSQL数据库名称<br />
$user =&quot;root&quot;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //MYSQL数据库登陆账号<br />
$password =&quot; &quot;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //MYSQL数据库登陆密码<br />
?&gt;<br />
按提示填好，这个文件应该不难。</p><br /><br /><a href="http://www.lusisi.com/?action=show&amp;id=52" target="_blank">阅读全文</a><br /><br />]]></description>
			<link>http://www.lusisi.com/?action=show&amp;id=52</link>
			<category domain="http://www.lusisi.com/?cid=5">PHP相关</category>
			<pubDate>2009-02-21 17:42</pubDate>
		</item>
	</channel>
</rss>
