﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>PHP博客-思想之地-随笔分类-PHP技术收集</title><link>http://www.phpweblog.net/be-evil/category/219.html</link><description>思想之地,php,ajax,asp,web技术,开源</description><language>zh-cn</language><lastBuildDate>Tue, 14 Aug 2007 14:12:34 GMT</lastBuildDate><pubDate>Tue, 14 Aug 2007 14:12:34 GMT</pubDate><ttl>60</ttl><item><title>[转]PHP模拟实现url rewrite</title><link>http://www.phpweblog.net/be-evil/archive/2007/08/02/1651.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Thu, 02 Aug 2007 02:39:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/08/02/1651.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1651.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/08/02/1651.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1651.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1651.html</trackback:ping><description><![CDATA[
		<p>
				<font face="Courier New">我的博客使用的是虚拟主机,也想实现url优化,但是我没有服务器权限,怎么办?<br />很简单,我们可以从$_SERVER[”REQUEST_URI”]和$_SERVER['PATH_INFO']来下手:<br /><br />原网站访问地址是 http://www.phpweblog.net/test.php?a=1&amp;b=2&amp;c=3<br />使用了 mode_rewrite 函数后,就可以用 <a href="/test.php/a/1/b/2/c/3">http://www.phpweblog.net/<font color="#000000">test.php/</font>a/1/b/2/c/3</a>来访问了,而且程序基本不用修改.<br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Courier New">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> mod_rewrite(){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #0000ff">isset</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">PATH_INFO</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">])){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #800080">$url</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">PATH_INFO</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">1</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #800080">$url</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">explode</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">/</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$url</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">foreach</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$url</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">as</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$key</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=&gt;</span>
						<span style="COLOR: #800080">$value</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$key</span>
						<span style="COLOR: #000000">%</span>
						<span style="COLOR: #000000">2</span>
						<span style="COLOR: #000000">!=</span>
						<span style="COLOR: #000000">1</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$value</span>
						<span style="COLOR: #000000">!=</span>
						<span style="COLOR: #000000">''</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #800080">$_GET</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #800080">$value</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #800080">$url</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #800080">$key</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000">1</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">];<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #800080">$querystring</span>
						<span style="COLOR: #000000">[]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #800080">$value</span>
						<span style="COLOR: #000000">.</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">.</span>
						<span style="COLOR: #800080">$url</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #800080">$key</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000">1</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">];<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">QUERY_STRING</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">implode</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$querystring</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">PHP_SELF</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">PHP_SELF</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">strpos</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">PHP_SELF</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">.php</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000">4</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">REQUEST_URI</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">PHP_SELF</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">.</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">?</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">.</span>
						<span style="COLOR: #800080">$_SERVER</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">QUERY_STRING</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">];<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />mod_rewrite();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />http</span>
						<span style="COLOR: #000000">:</span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">www.phpweblog.net/test.php/a/1/b/2/c/3</span>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Courier New">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">echo</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">&lt;pre&gt;</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
						<span style="COLOR: #0000ff">echo</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">GET数组如下：&lt;br /&gt;</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
						<span style="COLOR: #008080">print_r</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$_GET</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
						<span style="COLOR: #0000ff">Array</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />(<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    [a] </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #000000">=&gt;</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">1</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    [b] </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #000000">=&gt;</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">2</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    [c] </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #000000">=&gt;</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">3</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></font>
				</span>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1651.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-08-02 10:39 <a href="http://www.phpweblog.net/be-evil/archive/2007/08/02/1651.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP通过参数来生成MYSQL语句类</title><link>http://www.phpweblog.net/be-evil/archive/2007/06/11/1375.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 11 Jun 2007 03:44:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/06/11/1375.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1375.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/06/11/1375.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1375.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1375.html</trackback:ping><description><![CDATA[
		<font face="Verdana" size="4">这个类可以通过具有参数的数组来构建MySQL查询语句。<br />这个类可以通过指定的表和字段参数创建SELECT ,INSERT , UPDATE 和 DELETE 语句。<br />这个类可以创建SQL语句的WHERE条件，像LIKE的查询语句，使用LEFT JOIN和ORDER 语句。<br />例子:<br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Verdana">
						<font size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">php<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #008000">*******************************************************************<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />Example file<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />This example shows how to use the MyLibSQLGen class<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />The example is based on the following MySQL table:<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />CREATE TABLE customer (<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  id int(10) unsigned NOT NULL auto_increment,<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  name varchar(60) NOT NULL default '',<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  address varchar(60) NOT NULL default '',<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  city varchar(60) NOT NULL default '',<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  PRIMARY KEY  (cust_id)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />) TYPE=MyISAM;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />*******************************************************************</span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #0000ff">require_once</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">class_mylib_SQLGen-1.0.php</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">name</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">address</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">city</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Fadjar</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Resultmang Raya Street</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Jakarta</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">customer</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;b&gt;Result Generate Insert&lt;/b&gt;&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">new</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> MyLibSQLGen();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">clear_all_assign(); </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">to refresh all property but it no need when first time execute</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setFields(</span>
								<span style="COLOR: #800080">$fields</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setValues(</span>
								<span style="COLOR: #800080">$values</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setTables(</span>
								<span style="COLOR: #800080">$tables</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getInsertSQL()){</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error;</span>
								<span style="COLOR: #0000ff">exit</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result;</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;b&gt;Result Generate Update&lt;/b&gt;&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">name</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">address</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">city</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Fadjar</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Resultmang Raya Street</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Jakarta</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">customer</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$id</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">condition</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id='$id'</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">connection</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">""</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">clear_all_assign();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setFields(</span>
								<span style="COLOR: #800080">$fields</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setValues(</span>
								<span style="COLOR: #800080">$values</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setTables(</span>
								<span style="COLOR: #800080">$tables</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setConditions(</span>
								<span style="COLOR: #800080">$conditions</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getUpdateSQL()){</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error;</span>
								<span style="COLOR: #0000ff">exit</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result; </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;b&gt;Result Generate Delete&lt;/b&gt;&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">customer</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">condition</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id='1'</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">connection</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">OR</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">condition</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id='2'</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">connection</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">OR</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">condition</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id='4'</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">connection</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">""</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">clear_all_assign();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setTables(</span>
								<span style="COLOR: #800080">$tables</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setConditions(</span>
								<span style="COLOR: #800080">$conditions</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getDeleteSQL()){</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error;</span>
								<span style="COLOR: #0000ff">exit</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result; </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;b&gt;Result Generate List&lt;/b&gt;&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">name</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">address</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">city</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">customer</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$id</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">condition</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id='$id'</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">connection</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">""</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">clear_all_assign();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setFields(</span>
								<span style="COLOR: #800080">$fields</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setTables(</span>
								<span style="COLOR: #800080">$tables</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setConditions(</span>
								<span style="COLOR: #800080">$conditions</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getQuerySQL()){</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error;</span>
								<span style="COLOR: #0000ff">exit</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result; </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;b&gt;Result Generate List with search on all fields&lt;/b&gt;&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">name</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">address</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">city</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">customer</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$id</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$search</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Fadjar Nurswanto</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">clear_all_assign();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setFields(</span>
								<span style="COLOR: #800080">$fields</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setTables(</span>
								<span style="COLOR: #800080">$tables</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setSearch(</span>
								<span style="COLOR: #800080">$search</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getQuerySQL()){</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error;</span>
								<span style="COLOR: #0000ff">exit</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result; </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;b&gt;Result Generate List with search on some fields&lt;/b&gt;&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">id</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">name</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">address</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">city</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">customer</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$id</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$search</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">(<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">name</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Fadjar Nurswanto</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">address</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Tomang Raya</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        );<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">clear_all_assign();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setFields(</span>
								<span style="COLOR: #800080">$fields</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setTables(</span>
								<span style="COLOR: #800080">$tables</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">setSearch(</span>
								<span style="COLOR: #800080">$search</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getQuerySQL()){</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error;</span>
								<span style="COLOR: #0000ff">exit</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$object</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result; </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #000000">?&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
		</div>
		<br />
		<font face="Verdana" size="4">类代码:<br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Verdana">
						<font size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">php<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />Created By        : Fadjar Nurswanto &lt;fajr_n@rindudendam.net&gt;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />DATE            : 2006-08-02<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />PRODUCTNAME        : class MyLibSQLGen<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />PRODUCTVERSION    : 1.0.0<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />DESCRIPTION        : class yang berfungsi untuk menggenerate SQL<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />DENPENCIES        :<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></font>
				</span>
				<span style="COLOR: #008000">
						<font face="Verdana" size="4">*/</font>
				</span>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<span style="COLOR: #0000ff">
						<font face="Verdana" size="4">class</font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> MyLibSQLGen<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Result</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Conditions</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Condition</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$LeftJoin</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Search</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Sort</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">ASC</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Order</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Error</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> MyLibSQLGen(){}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> BuildCondition()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">BuildCondition</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getConditions();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgDone(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$conditions</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nVariable conditions not Array</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Condition</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">condition</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$conditions</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">connection</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> BuildLeftJoin()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">BuildLeftJoin</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getLeftJoin()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty LeftJoin was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$LeftJoinVars</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getLeftJoin();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">false</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$LeftJoinVars</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$LeftJoinVar</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            @</span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> LEFT JOIN </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$LeftJoinVar</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">table</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">];<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$LeftJoinVar</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">on</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">] </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                @</span>
								<span style="COLOR: #800080">$condvar</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">condition</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">connection</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> ON (</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$condvar</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">unset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$condvar</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ResultLeftJoin</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$hasil</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> BuildOrder()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">BuildOrder</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getOrder()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Order was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getFields()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Fields was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getFields();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Orders</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getOrder();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">ereg</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$Orders</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$Orders</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">explode</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$Order</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Orders</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$Orders</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Orders</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Orders</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Order</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">is_numeric</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Order</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Order not Numeric</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Order</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Fields)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nMax value of property Sort is </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Fields);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            @</span>
								<span style="COLOR: #800080">$xorder</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$Order</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ResultOrder</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> ORDER BY </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$xorder</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> BuildSearch()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">BuildSearch</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getSearch()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Search was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getFields()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Fields was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getFields();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$xvalue</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getSearch();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$xvalue</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$field</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$xvalue</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$field</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">])<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    </span>
								<span style="COLOR: #800080">$Values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">explode</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$xvalue</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$field</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">]);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Values</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Value</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        @</span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$field</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> LIKE '%</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$Value</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">%' OR </span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$hasil</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        @</span>
								<span style="COLOR: #800080">$hasil_final</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">4</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">) AND </span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
								<span style="COLOR: #0000ff">unset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$hasil</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$hasil_final</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$field</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #800080">$Values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">explode</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$xvalue</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Values</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Value</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    @</span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$field</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> LIKE '%</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$Value</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">%' OR </span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ResultSearch</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$hasil</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">4</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> clear_all_assign()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ResultSearch</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ResultLeftJoin</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Conditions</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Condition</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">LeftJoin</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">Array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #008080">Sort</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">ASC</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Order</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Search</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">fieldSQL</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">valueSQL</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">partSQL</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> CombineFieldValue(</span>
								<span style="COLOR: #800080">$manual</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">false</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">CombineFieldsPostVar</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getFields();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getValues();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$fields</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nVariable fields not Array</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$values</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nVariable values not Array</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">!=</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$values</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nCount of fields and values not match</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">fieldSQL</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">] </span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">pwd</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">] </span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">password</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">] </span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">pwd</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">valueSQL</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">password('</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">'),</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">partSQL</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=password('</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">'),</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_numeric</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">]))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">valueSQL</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">partSQL</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    @</font>
				</span>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">valueSQL</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">',</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">partSQL</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$fields</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">='</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$values</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">',</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">fieldSQL</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">fieldSQL</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">valueSQL</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">valueSQL</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">partSQL</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">partSQL</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> getDeleteSQL()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">getDeleteSQL</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getTables();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Tables</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nTable was empty</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            @</span>
								<span style="COLOR: #800080">$Table</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Table</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Table</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">DELETE FROM </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$Table</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getConditions())<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">BuildCondition()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> WHERE </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getCondition();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$sql</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> getInsertSQL()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">getInsertSQL</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getValues()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Values was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getFields()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Fields was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getTables()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Tables was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">CombineFieldValue()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getTables();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">INSERT INTO </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">fieldSQL</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">) VALUES (</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">valueSQL</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$sql</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> getUpdateSQL()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">getUpdateSQL</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getValues()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Values was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getFields()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Fields was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getTables()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Tables was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">CombineFieldValue()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">BuildCondition()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getTables();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">UPDATE </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> SET </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">partSQL</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> WHERE </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getCondition();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$sql</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000"> getQuerySQL()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">getQuerySQL</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$className</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getFields()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Fields was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">getTables()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">$className::$funct \nProperty Tables was empty</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getFields();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getTables();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Fields</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Field</span>
								<span style="COLOR: #000000">){@</span>
								<span style="COLOR: #800080">$sql_raw</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$Field</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">foreach</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$Tables</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">as</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$Table</span>
								<span style="COLOR: #000000">){@</span>
								<span style="COLOR: #800080">$sql_table</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$Table</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">SELECT </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$sql_raw</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> FROM </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$sql_table</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,-</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getLeftJoin())<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">BuildLeftJoins()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">ResultLeftJoin;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getConditions())<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">BuildCondition()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> WHERE (</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Condition</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getSearch())<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">BuildSearch()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">ResultSearch)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">eregi</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">WHERE</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> AND </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">ResultSearch;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> WHERE </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">ResultSearch;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getOrder())<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">BuildOrder()){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">dbgFailed(</span>
								<span style="COLOR: #800080">$funct</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">ResultOrder;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getSort())<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">ResultOrder)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Result</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">getSort();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getCondition(){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">Condition;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getConditions(){</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Conditions) </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Conditions)){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">Conditions;}}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getFields(){</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Fields) </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Fields)){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">Fields;}}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getLeftJoin(){</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">LeftJoin) </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">LeftJoin)){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">LeftJoin;}}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getOrder(){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">Order;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getSearch(){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">Search;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getSort(){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #008080">Sort</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getTables(){</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Tables) </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Tables)){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">Tables;}}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> getValues(){</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Values) </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(@</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Values)){</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> @</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">Values;}}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setCondition(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Condition</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setConditions(</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Conditions</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">::setConditions \nParameter input not array</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setFields(</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Fields</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">::setFields \nParameter input not array</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setLeftJoin(</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">LeftJoin</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">::setFields \nParameter input not array</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setOrder(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Order</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setSearch(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Search</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setSort(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #008080">Sort</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setTables(</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Tables</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">::setTables \nParameter input not array</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> setValues(</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$input</span>
								<span style="COLOR: #000000">)){</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Values</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$input</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">{</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Error</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">get_class</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">::setValues \nParameter input not array</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #0000ff">return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="4">
								<span style="COLOR: #000000">;}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #000000">?&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="4">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1375.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-06-11 11:44 <a href="http://www.phpweblog.net/be-evil/archive/2007/06/11/1375.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]不错的PHP分页类</title><link>http://www.phpweblog.net/be-evil/archive/2007/05/31/1288.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Thu, 31 May 2007 03:26:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/05/31/1288.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1288.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/05/31/1288.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1288.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1288.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Verdana">
						<font size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<span style="COLOR: #008000">
						<font face="Verdana" size="3">/*</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * filename: ext_page.class.php<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @package:phpbean<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @author :feifengxlq&lt;feifengxlq#gmail.com&gt;&lt;[url=http://www.phpobject.net/]http://www.phpobject.net/[/url]&gt;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @copyright :Copyright 2006 feifengxlq<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @license:version 2.0<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @create:2006-5-31<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @modify:2006-6-1<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @modify:feifengxlq 2006-11-4<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * description:超强分页类，四种分页模式，默认采用类似baidu,google的分页风格。<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * 2.0增加功能：支持自定义风格，自定义样式，同时支持PHP4和PHP5,<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * to see detail,please visit [url=http://www.phpobject.net/blog/read.php]http://www.phpobject.net/blog/read.php[/url]?<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * example:<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * 模式四种分页模式：<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   require_once('../libs/classes/page.class.php');<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   $page=new page(array('total'=&gt;1000,'perpage'=&gt;20));<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   echo 'mode:1&lt;br&gt;'.$page-&gt;show();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   echo '&lt;hr&gt;mode:2&lt;br&gt;'.$page-&gt;show(2);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   echo '&lt;hr&gt;mode:3&lt;br&gt;'.$page-&gt;show(3);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   echo '&lt;hr&gt;mode:4&lt;br&gt;'.$page-&gt;show(4);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   开启AJAX：<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   $ajaxpage=new page(array('total'=&gt;1000,'perpage'=&gt;20,'ajax'=&gt;'ajax_page','page_name'=&gt;'test'));<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   echo 'mode:1&lt;br&gt;'.$ajaxpage-&gt;show();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   采用继承自定义分页显示模式：<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   demo:http://www.phpobject.net/blog<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<span style="COLOR: #0000ff">
						<font face="Verdana" size="3">class</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> page <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * config ,public<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page_name</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">PB_page</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">page标签，用来控制url页。比如说xxx.php?PB_page=2中的PB_page</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$next_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">下一页</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pre_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">上一页</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$first_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">First</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">首页</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$last_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">Last</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">尾页</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pre_bar</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;&lt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">上一分页条</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$next_bar</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&gt;&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">下一分页条</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$format_left</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$format_right</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$is_ajax</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">false</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">是否支持AJAX分页模式 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * private<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pagebarnum</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">10</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">控制记录条的个数。</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$totalpage</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">总页数</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$ajax_action_name</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">AJAX动作名</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$nowindex</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">当前页</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">""</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">url地址头</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$offset</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * constructor构造函数<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param array $array['total'],$array['perpage'],$array['nowindex'],$array['url'],$array['ajax']<img src="http://www.phpweblog.net/images/dot.gif" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> page(</span>
								<span style="COLOR: #800080">$array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">array_key_exists</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">total</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">error(</span>
								<span style="COLOR: #ff00ff">__FUNCTION__</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">need a param of total</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">intval</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">total</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">]);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">array_key_exists</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">perpage</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #008080">intval</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">perpage</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">])</span>
								<span style="COLOR: #000000">:</span>
								<span style="COLOR: #000000">10</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$nowindex</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">array_key_exists</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #008080">intval</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">])</span>
								<span style="COLOR: #000000">:</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">array_key_exists</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">:</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$array</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">10</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$nowindex</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">((</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">is_int</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">error(</span>
								<span style="COLOR: #ff00ff">__FUNCTION__</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000"> is not a positive integer!</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">((</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">is_int</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">error(</span>
								<span style="COLOR: #ff00ff">__FUNCTION__</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000"> is not a positive integer!</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]))</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">set(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]);</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">设置pagename</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">  </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_set_nowindex(</span>
								<span style="COLOR: #800080">$nowindex</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">设置当前页</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">  </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_set_url(</span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">设置链接地址</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">  </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">totalpage</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">ceil</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">/</span>
								<span style="COLOR: #800080">$perpage</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">offset</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">*</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">perpage;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">ajax</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]))</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">open_ajax(</span>
								<span style="COLOR: #800080">$array</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">ajax</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]);</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">打开AJAX模式</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 设定类中指定变量名的值，如果改变量不属于这个类，将throw一个exception<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param string $var<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param string $value<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> set(</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$value</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">in_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #008080">get_object_vars</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)))<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$value</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">error(</span>
								<span style="COLOR: #ff00ff">__FUNCTION__</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000"> does not belong to PB_Page!</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 打开倒AJAX模式<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param string $action 默认ajax触发的动作。<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> open_ajax(</span>
								<span style="COLOR: #800080">$action</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">is_ajax</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">true</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ajax_action_name</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$action</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 获取显示"下一页"的代码<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param string $style<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> next_page(</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">totalpage){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_link(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_url(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$style</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;span class="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/span&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 获取显示“上一页”的代码<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param string $style<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> pre_page(</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_link(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_url(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$style</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;span class="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/span&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 获取显示“首页”的代码<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> first_page(</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;span class="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">first_page</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/span&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_link(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_url(</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">first_page</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$style</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 获取显示“尾页”的代码<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> last_page(</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">totalpage){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;span class="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">last_page</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/span&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_link(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_url(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">totalpage)</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">last_page</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$style</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> nowbar(</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$nowindex_style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$plus</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">ceil</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pagebarnum</span>
								<span style="COLOR: #000000">/</span>
								<span style="COLOR: #000000">2</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pagebarnum</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #800080">$plus</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">totalpage)</span>
								<span style="COLOR: #800080">$plus</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pagebarnum</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">totalpage</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">nowindex);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$begin</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #800080">$plus</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$begin</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$begin</span>
								<span style="COLOR: #000000">&gt;=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #800080">$begin</span>
								<span style="COLOR: #000000">:</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$begin</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #800080">$begin</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pagebarnum;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">totalpage){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">!=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">nowindex)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_text(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_link(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_url(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$style</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">));<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">_get_text(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;span class="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$nowindex_style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/span&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">break</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">\n</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">unset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$begin</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 获取显示跳转按钮的代码<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<span style="COLOR: #0000ff">
						<font face="Verdana" size="3">function</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> select()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;select name="PB_Page_Select" &gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">totalpage;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">nowindex){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;option value="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">" selected&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/option&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;option value="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/option&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">unset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$return</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/select&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$return</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 获取mysql 语句中limit需要的值<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<span style="COLOR: #0000ff">
						<font face="Verdana" size="3">function</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> offset()<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">offset;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 控制分页显示风格（你可以增加相应的风格）<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param int $mode<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> show(</span>
								<span style="COLOR: #800080">$mode</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">switch</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$mode</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">case</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">:</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">下一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">上一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowbar()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">第</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">select()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">break</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">case</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">:</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">下一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">上一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">first_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">首页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">last_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">尾页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">first_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">[第</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">页]</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">last_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">第</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">select()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">break</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">case</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">3</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">:</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">下一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">上一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">first_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">首页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">last_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">尾页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">first_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">last_page();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">break</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">case</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">4</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">:</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">下一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">上一页</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowbar()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">next_page();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">break</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">case</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">5</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">:</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_bar()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">pre_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowbar()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">next_page()</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">next_bar();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">break</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #008000">/*</span>
								<span style="COLOR: #008000">----------------private function (私有方法)-----------------------------------------------------------</span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<span style="COLOR: #008000">
						<font face="Verdana" size="3">/*</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 设置url头地址<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param: String $url<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return boolean<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> _set_url(</span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">""</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$url</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">手动设置</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">   </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">((</span>
								<span style="COLOR: #008080">stristr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">:</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">自动获取</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">   </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$_SERVER</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">QUERY_STRING</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">])){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />       </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">不存在QUERY_STRING时</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$_SERVER</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">REQUEST_URI</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<font face="Verdana" size="3">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />       </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">//<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">stristr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$_SERVER</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">QUERY_STRING</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">地址存在页面参数</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">     </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">str_replace</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">''</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$_SERVER</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">REQUEST_URI</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">]);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #800080">$last</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url[</span>
								<span style="COLOR: #008080">strlen</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url)</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">];<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$last</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #800080">$last</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />         </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />         </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<font face="Verdana" size="3">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">//<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #000000">     </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$_SERVER</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">REQUEST_URI</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">end if    </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">   }</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">end if</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">  }</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">end if</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 设置当前页面<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> _set_nowindex(</span>
								<span style="COLOR: #800080">$nowindex</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$nowindex</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">系统获取</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">   <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$_GET</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">page_name])){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">intval</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$_GET</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">page_name]);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">手动设置</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">   </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">nowindex</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #008080">intval</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$nowindex</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 为指定的页面返回地址值<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param int $pageno<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string $url<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> _get_url(</span>
								<span style="COLOR: #800080">$pageno</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">url</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$pageno</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * 获取分页显示文字，比如说默认情况下_get_text('&lt;a href=""&gt;1&lt;/a&gt;')将返回[&lt;a href=""&gt;1&lt;/a&gt;]<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  *<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @param String $str<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  * @return string $url<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000"> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> _get_text(</span>
								<span style="COLOR: #800080">$str</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">format_left</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">format_right;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   * 获取链接地址<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> _get_link(</span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$text</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">''</span>
								<span style="COLOR: #000000">:</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">class="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">is_ajax){<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果是使用AJAX模式</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">   </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;a </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000"> href="javascript:</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$this</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ajax_action_name</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">(\</span>
								<span style="COLOR: #000000">''</span>
								<span style="COLOR: #000000">.$url.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">\</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">)"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$text</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/a&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">{<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;a </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$style</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000"> href="</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$url</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">"&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$text</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/a&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">/*</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">*<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   * 出错处理方式<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
								<span style="COLOR: #008000">*/</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> error(</span>
								<span style="COLOR: #800080">$function</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$errormsg</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> {<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
								<span style="COLOR: #0000ff">die</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">Error in file &lt;b&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #ff00ff">__FILE__</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/b&gt; ,Function &lt;b&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$function</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">()&lt;/b&gt; :</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$errormsg</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #000000">?&gt;</span>
								<span style="COLOR: #000000"> </span>
						</font>
				</font>
		</div>
		<br />
		<br />
		<font face="Verdana">演示用法<br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Verdana">
						<font size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Verdana" size="3">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #0000ff">require_once</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">../libs/classes/page.class.php</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> page(</span>
								<span style="COLOR: #0000ff">array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">total</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">1000</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">perpage</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">20</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">));<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">mode:1&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">show();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;hr&gt;mode:2&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">show(</span>
								<span style="COLOR: #000000">2</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;hr&gt;mode:3&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">show(</span>
								<span style="COLOR: #000000">3</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;hr&gt;mode:4&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">show(</span>
								<span style="COLOR: #000000">4</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;hr&gt;开始AJAX模式:</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #800080">$ajaxpage</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> page(</span>
								<span style="COLOR: #0000ff">array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">total</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">1000</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">perpage</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">20</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">ajax</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">ajax_page</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">page_name</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">=&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">test</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">));<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">mode:1&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$ajaxpage</span>
								<span style="COLOR: #000000">-&gt;</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">show();<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="COLOR: #000000">?&gt;</span>
								<span style="COLOR: #000000"> </span>
						</font>
				</font>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1288.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-05-31 11:26 <a href="http://www.phpweblog.net/be-evil/archive/2007/05/31/1288.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP5中的this,self和parent关键字详解</title><link>http://www.phpweblog.net/be-evil/archive/2007/05/10/1190.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Thu, 10 May 2007 03:03:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/05/10/1190.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1190.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/05/10/1190.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1190.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1190.html</trackback:ping><description><![CDATA[
		<table width="100%">
				<tbody>
						<tr>
								<td align="right">
										<font face="Courier New" color="#000000" size="2">
										</font>
								</td>
						</tr>
				</tbody>
		</table>
		<font face="Courier New" color="#000000" size="2">PHP5是一具备了大部分面向对象语言的特性的语言,比PHP4有了很多的面向对象的特性,但是有部分概念也比较绕人,所以今天拿出来说说,说的不好,请高手见谅. (阅读本文，需要了解PHP5的面向对象的知识) </font>
		<p>
				<font face="Courier New" color="#000000" size="2">首先我们来理解三个关键字: this,self,parent,从字面上比较好理解,是指这,自己,父亲,呵呵,比较好玩了,我们先建立几个概念,这三个关键字分别是用在什么地方呢?我们初步解释一下,this是指向当前对象的指针(我们姑且用C里面的指针来看吧),self是指向当前类的指针,parent是指向父类的指针。</font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2">这么说还不能很了解，那我们就根据实际的例子结合来讲讲。<br /><br /></font>
				<font face="Courier New">
						<font color="#000000">
								<font size="2">
										<strong>(1) this<br /></strong>&lt;?php</font>
						</font>
				</font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2">class UserName<br />{ <br />    //定义属性    <br />     private $name;<br /> <br />     //定义构造函数<br />    function __construct( $name )<br />     {<br />          $this-&gt;name = $name; //这里已经使用了this指针<br />     }<br /> <br />     //析构函数<br />     function __destruct(){}</font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2">     //打印用户名成员函数<br />     function printName()<br />     {<br />          print( $this-&gt;name ); //又使用了this指针<br />     }<br /> }</font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2"> //实例化对象<br /> $nameObject = new UserName( "heiyeluren" );</font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2"> //执行打印<br /> $nameObject-&gt;printName(); //输出: heiyeluren<br /> <br /> //第二次实例化对象<br />  $nameObject2 = new UserName( "PHP5" );<br /> <br /> //执行打印<br /> $nameObject2-&gt;printName(); //输出：PHP5<br />?&gt;<br /><br />我们看，上面的类分别在11行和20行使用了this指针，那么当时this是指向谁呢？其实this是在实例化的时候来确定指向谁，比如第一次实例化对象的时候(25行)，那么当时this就是指向$nameObject对象，那么执行18行的打印的时候就把print( $this-&gt;&lt;name )变成了print( $nameObject-&gt;name )，那么当然就输出了"heiyeluren"。第二个实例的时候，print( $this-&gt;name )变成了print( $nameObject2-&gt;name )，于是就输出了"PHP5"。所以说，this就是指向当前对象实例的指针，不指向任何其他对象或类。<br /><br /><br /><br /></font>
		</p>
		<p>
				<strong>
						<font face="Courier New" color="#000000" size="2">(2)self</font>
				</strong>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2">首先我们要明确一点，self是指向类本身，也就是self是不指向任何已经实例化的对象，一般self使用来指向类中的静态变量。<br /> &lt;?php<br /><br />     class Counter<br />     {<br />         //定义属性，包括一个静态变量<br />         private static $firstCount = 0;<br />         private $lastCount;<br />        //构造函数<br />         function __construct()<br />         {<br />              $this-&gt;lastCount = ++selft::$firstCount; //使用self来调用静态变量,使用self调用必须使用::(域运算符号)<br />         }<br />         //打印最次数值<br />        function printLastCount()<br />         {<br />              print( $this-&gt;lastCount );<br />         } <br />    }<br /><br /> //实例化对象<br />$countObject = new Counter();<br />$countObject-&gt;printLastCount(); //输出 1<br />?&gt;<br /></font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2">我们这里只要注意两个地方，第6行和第12行。我们在第二行定义了一个静态变量$firstCount，并且初始值为0，那么在12行的时候调用了这个值得，使用的是self来调用，并且中间使用"::"来连接，就是我们所谓的域运算符，那么这时候我们调用的就是类自己定义的静态变量$frestCount，我们的静态变量与下面对象的实例无关，它只是跟类有关，那么我调用类本身的的，那么我们就无法使用this来引用，可以使用self来引用，因为self是指向类本身，与任何对象实例无关。换句话说，假如我们的类里面静态的成员，我们也必须使用self来调用。</font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2">
						<strong>(3)parent</strong>
				</font>
		</p>
		<p>
				<font face="Courier New" color="#000000" size="2">我们知道parent是指向父类的指针，一般我们使用parent来调用父类的构造函数。</font>
		</p>
		<div class="code">
				<p>
						<font face="Courier New" color="#000000" size="2">&lt;?php<br />//基类<br />class Animal<br />{<br />    //基类的属性<br />     public $name; //名字<br />    //基类的构造函数<br />    public function __construct( $name )<br />     {<br />         $this-&gt;name = $name;<br />     }<br />}<br /> //派生类<br /> class Person extends Animal //Person类继承了Animal类<br /> {<br />    public $personSex; //性别<br />    public $personAge; //年龄<br />     //继承类的构造函数<br />     function __construct( $personSex, $personAge )<br />    {<br />          parent::__construct( "heiyeluren" ); //使用parent调用了父类的构造函数<br />          $this-&gt;personSex = $personSex;<br />         $this-&gt;personAge = $personAge;<br />    }<br />     function printPerson()<br />     {<br />          print( $this-&gt;name. " is " .$this-&gt;personSex. ",this year " .$this-&gt;personAge );<br />      }<br /> }<br /> //实例化Person对象<br /> $personObject = new Person( "male", "21");<br /><br /> //执行打印<br /> $personObject-&gt;printPerson(); //输出：heiyeluren is male,this year 21<br /><br /> ?&gt;</font>
				</p>
		</div>
		<p>
				<br />
				<font face="Courier New" color="#000000" size="2">我们注意这么几个细节：成员属性都是public的，特别是父类的，是为了供继承类通过this来访问。我们注意关键的地方，第25行：parent::__construct( "heiyeluren" ),这时候我们就使用parent来调用父类的构造函数进行对父类的初始化，因为父类的成员都是public的，于是我们就能够在继承类中直接使用this来调用。</font>
		</p>
		<p>
				<font face="Courier New">
						<br />
						<br />
						<br />
						<br />
						<br />
						<font color="#000000" size="2">
						</font>
				</font> </p>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1190.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-05-10 11:03 <a href="http://www.phpweblog.net/be-evil/archive/2007/05/10/1190.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]OOP的PHP长啥样</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/30/1171.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 30 Apr 2007 01:24:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/30/1171.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1171.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/30/1171.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1171.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1171.html</trackback:ping><description><![CDATA[
		<font face="Courier New" size="2">
				<strong>
						<font color="#0000ff">本文转自ChinaUnix<br />原文地址:http://bbs.chinaunix.net/viewthread.php?tid=224412&amp;extra=&amp;page=1<br />作者:shukebeita</font>
				</strong>
				<br />
				<br />
				<br />
				<br />
				<br />长话短说，立刻开始吧。我这里会用到一个简单的例子，只有一个半的功能。一个是向浏览器发送一句"Hello, I can say OOP in PHP world!"，另外半个功能是从数据库中进行一个查询然后输出到浏览器，说它是半个功能是因为只是作为一个例子讲讲没有实际的数据库操作。<br /><br />首先从我的第一个文件index.php 开始介绍吧。我的index.php文件是这样的：<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code0" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br />include_once ('config.php');<br />include_once ('class.Application.php');<br />$app = &amp; new Application();<br />$app-&gt;;run();<br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">这个就是全部了，虽然只有4行，但是如果用OOP的方式写这个应该就够了吧。<br />有一点经验的哥们会发现这里只用到了一个Application 对象，那么一定很想知道这个对象究竟长什么样呢？我们继续看看class.Application.php 这个文件的内部。从以上的代码中我们知道她应该至少包含两个方法<br />Application()<br />和<br />run()<br />所以大体上应该长成这样<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code1" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br /><br />class Application<br />{<br />        function Application()<br />        {<br /><br />        }<br /><br />        function run()<br />        {<br /><br />        }<br />}<br /><br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">现在就算知道Application 是什么样，它好像也没有办法完成我们预先设定的功能呀？ 所以还要介绍一下如何运行这个程序，在我的结构中所有的页面都是通过index.php和一个action参数进行访问的例如第一个功能应该这样访问index.php?action=HelloPage，而第二个功能则是通过index.php?action=DatabasePage进行访问。这样的结构大家也许并不陌生吧。所以index.php 页面应当知道传进来的 action 参数是什么，也就是说Application对象应当知道 这个action 参数是什么。所以我们需要给Application增加一个方法 getAction()来获得action参数。既然知道action,知道了要做什么，那么方法 run()也就有知道如何去run了。 <br /><br />同时我还可以把(完成功能的)每一个页面作为一个对象来看待，所以我应该至少还需要两个类<br />class HelloPage 和<br />class DatabasePage<br />由于这两个对象最终都是向浏览器发送页面所以把他们共同的部分提出来作为他们的父类 <br />class Page<br />以下是三个类文件的内容<br /><br />class.Page.php<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code2" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br /><br />class Page<br />{<br />        function Page()<br />        {<br />        <br />        }<br /><br />        function show()<br />        {<br />                //不能直接调用这个方法一定要在子类中去具体实现。<br />                die('You can not use this funciton directly from Page class');<br />        }<br />}<br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">其中这个show方法应该是所有页面对象都具有的方法，只是在实现上有所不同。<br /><br />class.HelloPage.php<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code3" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br />require_once ("class.Page.php");<br /><br />class HelloPage extends Page<br />{<br />        function HelloPage()<br />        {<br />                parent::Page();<br />        }<br /><br />        function show()<br />        {<br />                echo "Hello, I can say OOP in PHP world!"; <br />        }<br />}<br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">class.DatabasePage.php<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code4" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br />require_once ("class.Page.php");<br /><br />class DatabasePage extends Page<br />{<br />        function DatabasePage()<br />        {<br />                parent::Page();<br />        }<br /><br />        function show()<br />        {<br />                //做一些数据库操作然后将结果显示出来。<br />        }<br />}<br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">同时我们还遵守这样的一条规则：action的值和调用的页面类的名称保持一致，例如当action=HelloPage的时候程序就知道需要初始化一个HelloPage的对象，有了这样的规则和以上的几个文件我们就可以将 Application 类改进成这样。<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code5" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br /><br />class Application<br />{<br />        function Application()<br />        {<br /><br />        }<br /><br />        function getAction()<br />        {<br /><br />        }<br /><br />        function run()<br />        {<br />                $pageClass = $this-&gt;;getAction();<br />                include_once ("class.".$pageClass.".php");<br />                $page = &amp; new $pageClass();<br />                $page-&gt;;show();<br />        }<br />}<br /><br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">为什么getAction()空着？因为它太简单了，你自己可以轻松地把它写出来呀。<br /><br />看到这里，如果你还不太明白，不用急，可以停下来重新再看一遍。<br /><br />如果全明白了，我们就继续前进。我们还有半个任务没有完成，所以我们需要改进我们的Application和页面类，让它完成数据库操作功能。<br />进行数据库操作之前首先应当得到一个正确的数据库连接，如果让每个需要数据库连接的页面类去做这样的工作实在是一件非常费时费力的工作，不容易维护管理而且也破坏了oop的设计初衷，进行数据库操作的页面类例如 DatabasePage 只应当完成它份内工作即获得数据。 仔细看看我们的设计不难发现建立数据库连接的工作交给 Application 来做最合适不过了， 所以给Application 增加一个新的成员 $db 并且在初始化的时候将建立的数据库连接赋值给它。<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code6" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br />require_once ("class.Database.php");<br /><br />class Application<br />{<br />        var $db;//数据库对象<br /><br />        function Application()<br />        {<br />                $this-&gt;;db = &amp; new Database(DB_HOST,DB_NAME,DB_LOGIN,DB_PASS);//$db 现在是一个数据库对象了<br />        }<br /><br />        function getAction()<br />        {<br />                return $_GET['action']; //简单的实现 getAction;<br />        }<br /><br />        funciton &amp; getDatabase()<br />        {<br />                return $this-&gt;;db;<br />        }<br /><br />        function run()<br />        {<br />                $pageClass = $this-&gt;;getAction();<br />                include_once ("class.".$pageClass.".php");<br />                $page = &amp; new $pageClass($this); //这里是唯一做了手脚的地方，将这个Application对象传给页面对象。<br />                $page-&gt;;show();<br />        }<br />}<br /><br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">你现在不用太关心这个 Database对象从何而来如何实现，知道它是一个含有数据库连接的对象就可以了，如果用过phplib, ADODB,或者Pear库的就很容易理解。<br />这个语句：<br />$this-&gt;;db = &amp; new Database(DB_HOST,DB_NAME,DB_LOGIN,DB_PASS);<br />就是建立一个数据库连接而已。<br /><br />至于DB_HOST,DB_NAME,DB_LOGIN,DB_PASS 这些都是常量我们在config.php中已经预先设定。<br /><br />由于数据库操作页面 DatabasePage 需要进行数据库连接所以它也需要一个变量 $db 来保存数据库对象，所以我们需要把DatabasePage改进成这样：<br /><br />class.DatabasePage.php<br /><br /></font>
		<div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em">
				<div style="FLOAT: left">
						<font face="Courier New" size="2">CODE:</font>
				</div>
		</div>
		<div class="altbg2" id="code7" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid; FONT-FAMILY: fixedsys">
				<font face="Courier New" size="2">&lt;?php<br />require_once ("class.Page.php");<br /><br />class DatabasePage extends Page<br />{<br />        var $db;<br /><br />        function DatabasePage(&amp;$app)//将Application对象作为参数接受。<br />        {<br />                parent::Page();<br />                $this-&gt;;db = $app-&gt;;getDatabase();//获得 Application 中的数据库对象。<br />        }<br /><br />        function show()<br />        {<br />                $sql = 'SELECT * FROM sale_orders';//简单的一个 SQL 例子。<br />                $results = $this-&gt;;db-&gt;;query($sql);//query 是 Database对象的一个公共的方法，通过它向数据库提交SQL查询。<br />                ...;//做一些操作把得到的结果显示出来。<br />        }<br />}<br />?&gt;;</font>
		</div>
		<font face="Courier New" size="2">好了，一个半的功能算是完成了，PHP对于OOP支持得也很漂亮吧，结构清晰，维护方便，至于效率嘛，我可没看出来有什么损失，如果你有兴趣可以自己测试一下。用这样的框架可以轻松应对各种需求的变化：增加各种权限控制，分离数据库层，商业逻辑，和表象层，增加远程调用接口统统不成问题，只是这里实在写不完这么多的东西。真不知道谁还会有理由说PHP 中OOP 很烂呢？<br /><br />另外，需要提醒大家的是传递对象和赋值的时候要使用 &amp; 符号这样可以保证每次引用的是同一个对象。<br /></font>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1171.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-30 09:24 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/30/1171.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转载]几道入门PHP笔试题</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/24/1156.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Tue, 24 Apr 2007 09:37:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/24/1156.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1156.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/24/1156.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1156.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1156.html</trackback:ping><description><![CDATA[
		<strong>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
						<a href="http://blog.csdn.net/heiyeshuwu" target="_blank">本文转自: heiyeluren的开源世界</a>
						<br />
						<br />
						<br />一、基础题</font>
		</strong>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">1. 写出如下程序的输出结果<br /></font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #000000">&lt;?</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$str1</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">null</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$str2</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">false</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 4</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$str1</span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #800080">$str2</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">相等</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">不相等</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 5</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$str3</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">''</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$str4</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 8</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$str3</span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #800080">$str4</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">相等</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">不相等</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 9</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$str5</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$str6</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">0</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$str5</span>
												<span style="COLOR: #000000">===</span>
												<span style="COLOR: #800080">$str6</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">相等</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">不相等</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">?&gt;</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">14</font>
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">15</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">2. 写出如下程序的输出结果<br /></font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font> </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #000000">&lt;?</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a1</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">null</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a2</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">false</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 4</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a3</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a4</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">''</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a5</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">0</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a6</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">null</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 8</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a7</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">();<br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$a8</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #0000ff">array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">());<br /></span>
												<span style="COLOR: #008080">10</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a1</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a2</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a3</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">14</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a4</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">15</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a5</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">16</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a6</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">17</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a7</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">18</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">empty</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$a8</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">?</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">true</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">:</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">false</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">19</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">?&gt;</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080">20</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font> </p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">3. 写出如下程序的输出结果<br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080">1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #000000">&lt;?</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080">2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$test</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">aaaaaa</span>
												<span style="COLOR: #000000">'</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$abc</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">&amp;</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$test</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">4</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">unset</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$test</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">5</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$abc</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">?&gt;</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">8</font>
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">4. 写出如下程序的输出结果<br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #000000">&lt;?</span>
												<span style="COLOR: #800080">$count</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">5</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000"> get_count(){<br /></span>
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">static</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$count</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 4</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$count</span>
												<span style="COLOR: #000000">++</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 5</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
												<span style="COLOR: #008080"> 6</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$count</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 8</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">++</span>
												<span style="COLOR: #800080">$count</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000"> get_count();<br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000"> get_count();<br /></span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">?&gt;</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">12</font>
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">5. 写出如下程序的输出结果<br /><br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #000000">&lt;?</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$GLOBALS</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">var1</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">5</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$var2</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 4</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000"> get_value(){<br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">global</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$var2</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #800080">$var1</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$var2</span>
												<span style="COLOR: #000000">++</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 8</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
												<span style="COLOR: #008080"> 9</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />get_value();<br /></span>
												<span style="COLOR: #008080">10</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$var1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$var2</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">?&gt;</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">14</font>
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">15</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">6. 写出如下程序的输出结果<br /></font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #000000">&lt;?</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
												<span style="COLOR: #000000"> get_arr(</span>
												<span style="COLOR: #800080">$arr</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){<br /></span>
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">unset</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$arr</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]);<br /></span>
												<span style="COLOR: #008080"> 4</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$arr1</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #800080">$arr2</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080"> 7</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080"> 8</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />get_arr(</span>
												<span style="COLOR: #000000">&amp;</span>
												<span style="COLOR: #800080">$arr1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />get_arr(</span>
												<span style="COLOR: #800080">$arr2</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">10</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">count</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$arr1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">echo</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">count</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$arr2</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">?&gt;</span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">14</font>
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">15</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">7. 使用五种以上方式获取一个文件的扩展名</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">要求：dir/upload.image.jpg，找出 .jpg 或者 jpg ，<br />必须使用PHP自带的处理函数进行处理，方法不能明显重复，可以封装成函数，比如 get_ext1($file_name), get_ext2($file_name)</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font> </p>
		<p>
				<strong>
						<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">二、算法题</font>
				</strong>
		</p>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">1. 使用PHP描述冒泡排序和快速排序算法，对象可以是一个数组<br /><br />2. 使用PHP描述顺序查找和二分查找（也叫做折半查找）算法，顺序查找必须考虑效率，对象可以是一个有序数组</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">3. 写一个二维数组排序算法函数，能够具有通用性，可以调用php内置函数</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font> </p>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">【附答案】（以下答案不一定是最好的，只是一个简单的参考）</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">一、基础题</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">1. 相等 相等 不相等<br />2. true true true true true false true false<br />3. aaaaaa<br />4. 5 0 1<br />5. 5 2<br />6. 1 2<br />7. 使用五种以上方式获取一个文件的扩展名</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">function get_ext1($file_name){<br /> return strrchr($file_name, '.');<br />}<br />function get_ext2($file_name){<br /> return substr($file_name, strrpos($file_name, '.'));<br />}<br />function get_ext3($file_name){<br /> return array_pop(explode('.', $file_name));<br />}<br />function get_ext4($file_name){<br /> $p = pathinfo($file_name);<br /> return $p['extension'];<br />}<br />function get_ext5($file_name){<br /> return strrev(substr(strrev($file_name), 0, strpos(strrev($file_name), '.')));<br />}</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font> </p>
		<p>
				<strong>
						<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">二、算法题</font>
				</strong>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">1. 使用PHP描述冒泡排序和快速排序算法，对象可以是一个数组</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">冒泡排序（数组排序） </span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
												<span style="COLOR: #000000"> bubble_sort(</span>
												<span style="COLOR: #800080">$array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">) <br /></span>
												<span style="COLOR: #008080"> 3</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
												<span style="COLOR: #008080"> 4</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #800080">$count</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">count</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">); <br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$count</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">&lt;=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">0</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">false</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">; <br /></span>
												<span style="COLOR: #008080"> 6</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">for</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000">0</span>
												<span style="COLOR: #000000">; </span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #800080">$count</span>
												<span style="COLOR: #000000">; </span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">++</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){ <br /></span>
												<span style="COLOR: #008080"> 8</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
												<span style="COLOR: #0000ff">for</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #800080">$count</span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">; </span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">&gt;</span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">; </span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">--</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){ <br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #000000">1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]){ <br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
												<span style="COLOR: #800080">$tmp</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$j</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]; <br /></span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #000000">1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]; <br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$j</span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$tmp</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">; <br /></span>
												<span style="COLOR: #008080">13</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        } <br /></span>
												<span style="COLOR: #008080">14</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                } <br /></span>
												<span style="COLOR: #008080">15</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        } <br /></span>
												<span style="COLOR: #008080">16</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">; <br /></span>
												<span style="COLOR: #008080">17</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
												<span style="COLOR: #008080">18</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">19</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">快速排序（数组排序） </span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080">20</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
												<span style="COLOR: #000000"> quick_sort(</span>
												<span style="COLOR: #800080">$array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">) { <br /></span>
												<span style="COLOR: #008080">21</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #008080">count</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #000000">&lt;=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">) </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">; <br /></span>
												<span style="COLOR: #008080">22</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">23</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]; <br /></span>
												<span style="COLOR: #008080">24</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #800080">$left_arr</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">(); <br /></span>
												<span style="COLOR: #008080">25</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #800080">$right_arr</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">(); <br /></span>
												<span style="COLOR: #008080">26</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">27</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">for</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">; </span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #008080">count</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">); </span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">++</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){ <br /></span>
												<span style="COLOR: #008080">28</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">&lt;=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$key</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">) <br /></span>
												<span style="COLOR: #008080">29</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
												<span style="COLOR: #800080">$left_arr</span>
												<span style="COLOR: #000000">[] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$i</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]; <br /></span>
												<span style="COLOR: #008080">30</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
												<span style="COLOR: #0000ff">else</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000"> <br /></span>
												<span style="COLOR: #008080">31</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
												<span style="COLOR: #800080">$right_arr</span>
												<span style="COLOR: #000000">[] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$i</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]; <br /></span>
												<span style="COLOR: #008080">32</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        } <br /></span>
												<span style="COLOR: #008080">33</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">34</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #800080">$left_arr</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> quick_sort(</span>
												<span style="COLOR: #800080">$left_arr</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">); <br /></span>
												<span style="COLOR: #008080">35</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #800080">$right_arr</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> quick_sort(</span>
												<span style="COLOR: #800080">$right_arr</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">); <br /></span>
												<span style="COLOR: #008080">36</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">37</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">array_merge</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$left_arr</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000">)</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$right_arr</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">); <br /></span>
												<span style="COLOR: #008080">38</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
												<span style="COLOR: #008080">39</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">40</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">2. 使用PHP描述顺序查找和二分查找（也叫做折半查找）算法，顺序查找必须考虑效率，对象可以是一个有序数组</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">
				</font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">二分查找（数组里查找某个元素） </span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
												<span style="COLOR: #000000"> bin_sch(</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$low</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$high</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$k</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){  <br /></span>
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$low</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">&lt;=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$high</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){  <br /></span>
												<span style="COLOR: #008080"> 4</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #800080">$mid</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">intval</span>
												<span style="COLOR: #000000">((</span>
												<span style="COLOR: #800080">$low</span>
												<span style="COLOR: #000000">+</span>
												<span style="COLOR: #800080">$high</span>
												<span style="COLOR: #000000">)</span>
												<span style="COLOR: #000000">/</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);  <br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$mid</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$k</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){  <br /></span>
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$mid</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;  <br /></span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }</span>
												<span style="COLOR: #0000ff">elseif</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$k</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$mid</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">]){  <br /></span>
												<span style="COLOR: #008080"> 8</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> bin_sch(</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$low</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$mid</span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$k</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);  <br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }</span>
												<span style="COLOR: #0000ff">else</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">{  <br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> bin_sch(</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$mid</span>
												<span style="COLOR: #000000">+</span>
												<span style="COLOR: #000000">1</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$high</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$k</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);  <br /></span>
												<span style="COLOR: #008080">11</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }  <br /></span>
												<span style="COLOR: #008080">12</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }  <br /></span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #000000">1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;  <br /></span>
												<span style="COLOR: #008080">14</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}  <br /></span>
												<span style="COLOR: #008080">15</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">16</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">顺序查找（数组里查找某个元素） </span>
										</font>
								</font>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080">17</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
												<span style="COLOR: #000000"> seq_sch(</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$n</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$k</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){  <br /></span>
												<span style="COLOR: #008080">18</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$n</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$k</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;  <br /></span>
												<span style="COLOR: #008080">19</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #0000ff">for</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000">0</span>
												<span style="COLOR: #000000">; </span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #800080">$n</span>
												<span style="COLOR: #000000">; </span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">++</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){  <br /></span>
												<span style="COLOR: #008080">20</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">]</span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #800080">$k</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){  <br /></span>
												<span style="COLOR: #008080">21</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">break</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;  <br /></span>
												<span style="COLOR: #008080">22</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }  <br /></span>
												<span style="COLOR: #008080">23</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }  <br /></span>
												<span style="COLOR: #008080">24</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #800080">$i</span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #800080">$n</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){  <br /></span>
												<span style="COLOR: #008080">25</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$i</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;  <br /></span>
												<span style="COLOR: #008080">26</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }</span>
												<span style="COLOR: #0000ff">else</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">{  <br /></span>
												<span style="COLOR: #008080">27</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #000000">1</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;  <br /></span>
												<span style="COLOR: #008080">28</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }  <br /></span>
												<span style="COLOR: #008080">29</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}  <br /></span>
												<span style="COLOR: #008080">30</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">31</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
		<p>
				<br />
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">3. 写一个二维数组排序算法函数，能够具有通用性，可以调用php内置函数</font>
		</p>
		<p>
				<font style="BACKGROUND-COLOR: #f5f5dc" face="Courier New" color="#000000" size="2">//二维数组排序， $arr是数据，$keys是排序的健值，$order是排序规则，1是升序，0是降序<br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #0000ff">function</span>
												<span style="COLOR: #000000"> array_sort(</span>
												<span style="COLOR: #800080">$arr</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$keys</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$order</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">) {<br /></span>
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> (</span>
												<span style="COLOR: #000000">!</span>
												<span style="COLOR: #008080">is_array</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$arr</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">)) {<br /></span>
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">false</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080"> 4</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #800080">$keysvalue</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">();<br /></span>
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">foreach</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$arr</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">as</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=&gt;</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$val</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">) {<br /></span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #800080">$keysvalue</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$val</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$keys</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">];<br /></span>
												<span style="COLOR: #008080"> 8</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$order</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">0</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">){<br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #008080">asort</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$keysvalue</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }</span>
												<span style="COLOR: #0000ff">else</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000"> {<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #008080">arsort</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$keysvalue</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">13</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /></span>
												<span style="COLOR: #008080">14</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #008080">reset</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$keysvalue</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">15</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">foreach</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$keysvalue</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">as</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=&gt;</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$vals</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">) {<br /></span>
												<span style="COLOR: #008080">16</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #800080">$keysort</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$key</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">17</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /></span>
												<span style="COLOR: #008080">18</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #800080">$new_array</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">();<br /></span>
												<span style="COLOR: #008080">19</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">foreach</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$keysort</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">as</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=&gt;</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$val</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">) {<br /></span>
												<span style="COLOR: #008080">20</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #800080">$new_array</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$key</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$arr</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #800080">$val</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">];<br /></span>
												<span style="COLOR: #008080">21</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> }<br /></span>
												<span style="COLOR: #008080">22</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$new_array</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">23</span>
										</font>
								</font>
						</font>
				</font>
				<font color="#000000">
						<font size="2">
								<font face="Courier New">
										<font style="BACKGROUND-COLOR: #f5f5dc">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
												<span style="COLOR: #008080">24</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
										</font>
								</font>
						</font>
				</font>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1156.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-24 17:37 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/24/1156.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP实现JSP,ASP中类似Application对象的全局变量</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/17/1123.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 16 Apr 2007 17:26:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/17/1123.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1123.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/17/1123.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1123.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1123.html</trackback:ping><description><![CDATA[
		<font face="Courier New">
				<font size="2">PHP如何实现ASP,JSP中的全局变量呢,Application对象,其实原理很简单,把你需要的变量值写到一个文本中或者数据库中即可,需要的时候调用该文件或者读取数据库即可得到相关值,下面我们来看看具体的实现方法....</font>
				<br />
		</font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Courier New">
						<span style="COLOR: #008080"> 1</span>
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #000000">&lt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">?php <br /></span>
						<span style="COLOR: #008080"> 2</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">/**</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080"> 3</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">*</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> 功能：实现像JSP,ASP里Application那样的全局变量 <br /></span>
						<span style="COLOR: #008080"> 4</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000"> author: <a href="http://www.itzg.net">www.itzg.net</a></span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080"> 5</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000"> version: </span>
						<span style="COLOR: #000000">1.0</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080"> 6</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">*</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> 版权：如许转载请保留版权声明 <br /></span>
						<span style="COLOR: #008080"> 7</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080"> 8</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">/*+----------------</span>
						<span style="COLOR: #000000">example</span>
						<span style="COLOR: #000000">----------------------</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080"> 9</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />require_once(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">Application.php</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">); <br /></span>
						<span style="COLOR: #008080">10</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />$arr </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">array</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">=&gt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">Hi</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">=&gt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">Yes</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">); <br /></span>
						<span style="COLOR: #008080">11</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />$a </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> Application(); <br /></span>
						<span style="COLOR: #008080">12</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />$a</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">setValue(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">t1</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">arui</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">); <br /></span>
						<span style="COLOR: #008080">13</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />$a</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">setValue(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">arr</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">,$arr); <br /></span>
						<span style="COLOR: #008080">14</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />$u </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> $a</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">getValue(); <br /></span>
						<span style="COLOR: #008080">15</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">---------------------------------------------+*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">16</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />class Application <br /></span>
						<span style="COLOR: #008080">17</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
						<span style="COLOR: #008080">18</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">/**</span>
						<span style="COLOR: #000000">保存共享变量的文件</span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">19</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> var $save_file    </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008000">'</span>
						<span style="COLOR: #008000">Application/Application'; </span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">20</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">/**</span>
						<span style="COLOR: #000000">共享变量的名称</span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">21</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> var $application  </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">null</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">; <br /></span>
						<span style="COLOR: #008080">22</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">/**</span>
						<span style="COLOR: #000000">序列化之后的数据</span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">23</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  var $app_data    </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008000">'</span>
						<span style="COLOR: #008000">'; </span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">24</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">  </span>
						<span style="COLOR: #000000">/**</span>
						<span style="COLOR: #000000">是否已经做过setValue的操作 防止频繁写文件操作</span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">25</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  var $__writed    </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">; <br /></span>
						<span style="COLOR: #008080">26</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">/**</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">27</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #000000">*</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> 构造函数 <br /></span>
						<span style="COLOR: #008080">28</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">29</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> Application() <br /></span>
						<span style="COLOR: #008080">30</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  { <br /></span>
						<span style="COLOR: #008080">31</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   $this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">application </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">array</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">(); <br /></span>
						<span style="COLOR: #008080">32</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  } <br /></span>
						<span style="COLOR: #008080">33</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">/**</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">34</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #000000">*</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> 设置全局变量 <br /></span>
						<span style="COLOR: #008080">35</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000"> @param </span>
						<span style="COLOR: #0000ff">string</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> $var_name 要加入到全局变量的变量名 <br /></span>
						<span style="COLOR: #008080">36</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000"> @param </span>
						<span style="COLOR: #0000ff">string</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> $var_value 变量的值 <br /></span>
						<span style="COLOR: #008080">37</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">38</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> setValue($var_name,$var_value) <br /></span>
						<span style="COLOR: #008080">39</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  { <br /></span>
						<span style="COLOR: #008080">40</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (!is_string($var_name) || </span>
						<span style="COLOR: #0000ff">empty</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">($var_name)) <br /></span>
						<span style="COLOR: #008080">41</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    return </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">; <br /></span>
						<span style="COLOR: #008080">42</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> ($this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">__writed) <br /></span>
						<span style="COLOR: #008080">43</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   { <br /></span>
						<span style="COLOR: #008080">44</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    $this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">application[$var_name] </span>
						<span style="COLOR: #000000">=</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> $var_value; <br /></span>
						<span style="COLOR: #008080">45</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    return; <br /></span>
						<span style="COLOR: #008080">46</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   } <br /></span>
						<span style="COLOR: #008080">47</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   $this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">application </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> $this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">getValue(); <br /></span>
						<span style="COLOR: #008080">48</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (!is_array($this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">application)) <br /></span>
						<span style="COLOR: #008080">49</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    settype($this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">application,</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">array</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">); <br /></span>
						<span style="COLOR: #008080">50</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   $this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">application[$var_name] </span>
						<span style="COLOR: #000000">=</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> $var_value; <br /></span>
						<span style="COLOR: #008080">51</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   $this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">__writed </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">true</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">; <br /></span>
						<span style="COLOR: #008080">52</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      $this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">app_data </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> @serialize($this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">application);     <br /></span>
						<span style="COLOR: #008080">53</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />      $this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">__writeToFile(); <br /></span>
						<span style="COLOR: #008080">54</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  } <br /></span>
						<span style="COLOR: #008080">55</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">/**</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">56</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">*</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> 取得保存在全局变量里的值 <br /></span>
						<span style="COLOR: #008080">57</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000"> @return </span>
						<span style="COLOR: #0000ff">array</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">58</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">59</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> getValue() <br /></span>
						<span style="COLOR: #008080">60</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> { <br /></span>
						<span style="COLOR: #008080">61</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (!is_file($this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">save_file)) <br /></span>
						<span style="COLOR: #008080">62</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />         $this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">__writeToFile(); <br /></span>
						<span style="COLOR: #008080">63</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     return @unserialize(@file_get_contents($this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">save_file)); <br /></span>
						<span style="COLOR: #008080">64</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> } <br /></span>
						<span style="COLOR: #008080">65</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #000000">/**</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">66</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">*</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> 写序列化后的数据到文件 <br /></span>
						<span style="COLOR: #008080">67</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000"> @scope </span>
						<span style="COLOR: #0000ff">private</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">68</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
						<span style="COLOR: #000000">*/</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">69</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> __writeToFile() <br /></span>
						<span style="COLOR: #008080">70</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> { <br /></span>
						<span style="COLOR: #008080">71</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  $fp </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> @fopen($this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">save_file,</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">w</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">); <br /></span>
						<span style="COLOR: #008080">72</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  @fwrite($fp,$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">app_data); <br /></span>
						<span style="COLOR: #008080">73</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  @fclose($fp); <br /></span>
						<span style="COLOR: #008080">74</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> } <br /></span>
						<span style="COLOR: #008080">75</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
						<span style="COLOR: #008080">76</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />?</span>
						<span style="COLOR: #000000">&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> <br /></span>
						<span style="COLOR: #008080">77</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</font>
		</div>
		<br />
		<br />
		<font face="Courier New">另外找到一个类,代码待注释,先看看吧<br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Courier New">
						<span style="COLOR: #008080">  1</span>
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #000000">&lt;?</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">php<br /></span>
						<span style="COLOR: #008080">  2</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">class</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> BsmShm<br /></span>
						<span style="COLOR: #008080">  3</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
						<span style="COLOR: #008080">  4</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">var</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$shm_id</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080">  5</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">var</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$shm_mod</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080">  6</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080">  7</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> BsmShm ()<br /></span>
						<span style="COLOR: #008080">  8</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080">  9</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #008000">//</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000"> Init Shared Memory Support<img src="http://www.phpweblog.net/images/dot.gif" /><br /></span>
						<span style="COLOR: #008080"> 10</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                // Both SysV Shm and Shmop are support under *NIX Operating System<br /></span>
						<span style="COLOR: #008080"> 11</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                // But Only Shmop can be used in Windows.</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 12</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">                <br /></span>
						<span style="COLOR: #008080"> 13</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (get_sys() </span>
						<span style="COLOR: #000000">==</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> SYSTEM_WIN) {<br /></span>
						<span style="COLOR: #008080"> 14</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #008080">function_exists</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmop_open</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)) {<br /></span>
						<span style="COLOR: #008080"> 15</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmop</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 16</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        }<br /></span>
						<span style="COLOR: #008080"> 17</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> {<br /></span>
						<span style="COLOR: #008080"> 18</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">none</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 19</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 20</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        }<br /></span>
						<span style="COLOR: #008080"> 21</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /></span>
						<span style="COLOR: #008080"> 22</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 23</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> {<br /></span>
						<span style="COLOR: #008080"> 24</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #008080">function_exists</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shm_attach</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)) {<br /></span>
						<span style="COLOR: #008080"> 25</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">sysv</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 26</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        }<br /></span>
						<span style="COLOR: #008080"> 27</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #008080">function_exists</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmop_open</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)) {<br /></span>
						<span style="COLOR: #008080"> 28</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmop</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 29</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        }<br /></span>
						<span style="COLOR: #008080"> 30</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> {<br /></span>
						<span style="COLOR: #008080"> 31</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> No Module installed</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 32</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                                </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">none</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 33</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                                </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 34</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        }<br /></span>
						<span style="COLOR: #008080"> 35</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /></span>
						<span style="COLOR: #008080"> 36</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 37</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">sysv</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">) {<br /></span>
						<span style="COLOR: #008080"> 38</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> shm_attach (ftok (</span>
						<span style="COLOR: #ff00ff">__FILE__</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">g</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> SHM_SIZE</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0600</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 39</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /></span>
						<span style="COLOR: #008080"> 40</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 41</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmod</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">) {<br /></span>
						<span style="COLOR: #008080"> 42</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> if no "sysv" module installed, function "ftok())" is unavailiable.</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 43</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                        </span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> shmop_open (SHM_KEY</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">n</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0600</span>
						<span style="COLOR: #000000">,</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> SHM_SIZE);<br /></span>
						<span style="COLOR: #008080"> 44</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /></span>
						<span style="COLOR: #008080"> 45</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 46</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">return</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 47</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080"> 48</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080"> 49</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">function</span>
						<span style="COLOR: #000000"> put_var (</span>
						<span style="COLOR: #800080">$varkey</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$varval</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 50</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080"> 51</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> Write a value into shm</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 52</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">sysv</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 53</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shm_put_var (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$varkey</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$varval</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 54</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 55</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmod</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">) {<br /></span>
						<span style="COLOR: #008080"> 56</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> shmop is much more low-level than sysv, you need to operate every byte yourself!</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 57</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> shmop_read (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> shmop_size (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">shm_id));<br /></span>
						<span style="COLOR: #008080"> 58</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">base64_decode</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 59</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">strpos</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">\0</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">));<br /></span>
						<span style="COLOR: #008080"> 60</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">?</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">unserialize</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">) </span>
						<span style="COLOR: #000000">:</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">array</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> ();<br /></span>
						<span style="COLOR: #008080"> 61</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        <br /></span>
						<span style="COLOR: #008080"> 62</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #800080">$varkey</span>
						<span style="COLOR: #000000">] </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$varval</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 63</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">base64_encode</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #008080">serialize</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">)) </span>
						<span style="COLOR: #000000">.</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">\0</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 64</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        <br /></span>
						<span style="COLOR: #008080"> 65</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shmop_write (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 66</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /></span>
						<span style="COLOR: #008080"> 67</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 68</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 69</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 70</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080"> 71</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080"> 72</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">function</span>
						<span style="COLOR: #000000"> get_var (</span>
						<span style="COLOR: #800080">$varkey</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 73</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080"> 74</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> Fetch a value by a given key</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 75</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">sysv</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 76</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shm_get_var (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$varkey</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 77</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 78</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmod</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">) {<br /></span>
						<span style="COLOR: #008080"> 79</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> shmop_read (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> shmop_size (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">shm_id));<br /></span>
						<span style="COLOR: #008080"> 80</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">base64_decode</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 81</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">strpos</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">\0</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">));<br /></span>
						<span style="COLOR: #008080"> 82</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">?</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">unserialize</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">) </span>
						<span style="COLOR: #000000">:</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">array</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> ();<br /></span>
						<span style="COLOR: #008080"> 83</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        <br /></span>
						<span style="COLOR: #008080"> 84</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #800080">$varkey</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">];<br /></span>
						<span style="COLOR: #008080"> 85</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /></span>
						<span style="COLOR: #008080"> 86</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 87</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 88</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 89</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080"> 90</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080"> 91</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">function</span>
						<span style="COLOR: #000000"> remove_var (</span>
						<span style="COLOR: #800080">$varkey</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 92</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080"> 93</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> Remove a value from shm</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 94</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">sysv</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 95</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> @shm_remove_var (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$varkey</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 96</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080"> 97</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmod</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">) {<br /></span>
						<span style="COLOR: #008080"> 98</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> shmop_read (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> shmop_size (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">shm_id));<br /></span>
						<span style="COLOR: #008080"> 99</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">base64_decode</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">100</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">strpos</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">\0</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">));<br /></span>
						<span style="COLOR: #008080">101</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">?</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">unserialize</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">) </span>
						<span style="COLOR: #000000">:</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">array</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> ();<br /></span>
						<span style="COLOR: #008080">102</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        <br /></span>
						<span style="COLOR: #008080">103</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">unset</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #800080">$varkey</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">]);<br /></span>
						<span style="COLOR: #008080">104</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #008080">base64_encode</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #008080">serialize</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">)) </span>
						<span style="COLOR: #000000">.</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">\0</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080">105</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        <br /></span>
						<span style="COLOR: #008080">106</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shmop_write (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_id</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$curr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">107</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                }<br /></span>
						<span style="COLOR: #008080">108</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080">109</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">110</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080">111</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080">112</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080">113</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> detach ()<br /></span>
						<span style="COLOR: #008080">114</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080">115</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> disconnect/close a shm</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">116</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">sysv</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080">117</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shm_detach (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">shm_id);<br /></span>
						<span style="COLOR: #008080">118</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080">119</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmod</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080">120</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shmop_close (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">shm_id);<br /></span>
						<span style="COLOR: #008080">121</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080">122</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">123</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080">124</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080">125</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080">126</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">function</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000"> destroy ()<br /></span>
						<span style="COLOR: #008080">127</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080">128</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> Bye<img src="http://www.phpweblog.net/images/dot.gif" /></span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">129</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">                </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">sysv</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080">130</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shm_remove (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">shm_id);<br /></span>
						<span style="COLOR: #008080">131</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080">132</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
						<span style="COLOR: #000000">shm_mod </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">shmod</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080">133</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> shmop_delete (</span>
						<span style="COLOR: #800080">$this</span>
						<span style="COLOR: #000000">-&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">shm_id);<br /></span>
						<span style="COLOR: #008080">134</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                <br /></span>
						<span style="COLOR: #008080">135</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">136</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">false</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080">137</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080">138</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
						<span style="COLOR: #008080">139</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">?&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">140</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</font>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1123.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-17 01:26 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/17/1123.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用函数递归实现基于PHP和MySQL的动态树型菜单[转]</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/13/1111.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Fri, 13 Apr 2007 12:39:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/13/1111.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1111.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/13/1111.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1111.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1111.html</trackback:ping><description><![CDATA[
		<span id="ArticleContent">
				<font face="Courier New" size="2"> </font>
				<p>
						<font face="Courier New" size="2">树型菜单在很多桌面应用系统中都有非常广泛的应用，其主要优点是结构清晰，利于使用者非常清楚的知道目前自己所在的位置。但在web上树型菜单的应用因为没有理想的现成组件可以拿过来直接使用，所以一般的情况下，程序员主要是通过JavaScript来实现一些简单的树型结构菜单，但这些菜单往往都是事先定好各菜单项目，以及各菜单项目之间的层次关系，不利于扩充，一旦需要另一个菜单结构时，往往还需要重新编写，因此使用起来不是很方便。 <br /><br />经过对函数递归的研究，我发现这种树型菜单可以通过递归函数，使树型菜单的显示实现动态变化，并没有级数的限制。下面就是我用PHP,</font>
						<font face="Courier New" size="2">MySQL,JavaScript写的一个动态树型菜单的处理代码，如果大家有兴趣的话，就和我一起来看看我是如何实现的吧：） <br /><br />首先，我们需要一个数据库，在这个数据库中，我们建立以下一张表： <br /></font>
				</p>
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<font face="Courier New">
								<span style="COLOR: #008080">1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #0000ff">CREATE</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">TABLE</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000"> menu ( <br /></span>
								<span style="COLOR: #008080">2</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />id </span>
								<span style="FONT-WEIGHT: bold; COLOR: #000000">tinyint</span>
								<span style="COLOR: #000000">(</span>
								<span style="FONT-WEIGHT: bold; COLOR: #800000">4</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #808080">NOT</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">NULL</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000"> auto_increment, <br /></span>
								<span style="COLOR: #008080">3</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />parent_id </span>
								<span style="FONT-WEIGHT: bold; COLOR: #000000">tinyint</span>
								<span style="COLOR: #000000">(</span>
								<span style="FONT-WEIGHT: bold; COLOR: #800000">4</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #0000ff">DEFAULT</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #ff0000">'</span>
								<span style="COLOR: #ff0000">0</span>
								<span style="COLOR: #ff0000">'</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #808080">NOT</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">NULL</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000">, <br /></span>
								<span style="COLOR: #008080">4</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />name </span>
								<span style="FONT-WEIGHT: bold; COLOR: #000000">varchar</span>
								<span style="COLOR: #000000">(</span>
								<span style="FONT-WEIGHT: bold; COLOR: #800000">20</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000">), <br /></span>
								<span style="COLOR: #008080">5</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />url </span>
								<span style="FONT-WEIGHT: bold; COLOR: #000000">varchar</span>
								<span style="COLOR: #000000">(</span>
								<span style="FONT-WEIGHT: bold; COLOR: #800000">60</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000">), <br /></span>
								<span style="COLOR: #008080">6</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">PRIMARY</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">KEY</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000"> (id) <br /></span>
								<span style="COLOR: #008080">7</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />); <br /></span>
								<span style="COLOR: #008080">8</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">9</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</div>
				<br />
				<font face="Courier New" size="2">这张表中 <br />id 为索引 <br />parent_id 用来保存上一级菜单的id号，如果是一级菜单则为0 <br />name 为菜单的名称，也就是要在页面上显示的菜单内容 <br />url 如果某菜单为末级菜单，则需要指定该连接的url地址，这个字段就是用来保存此地址的，其他非末级菜单，该字段为空 <br /><br />好了，数据库有了，你就可以添加一些记录了，下面是我做测试的时候，使用的一些记录： <br /></font>
				<p class="&lt;a" href="/pctech/programe/php/Index.html">
						<font face="Courier New" size="2">INSERT INTO menu VALUES ( '1', '0', '人事管理', ''); <br />INSERT INTO menu VALUES ( '2', '0', '通讯交流', ''); <br />INSERT INTO menu VALUES ( '3', '1', '档案管理', ''); <br />INSERT INTO menu VALUES ( '4', '1', '考勤管理', 'http://localhost/personal/attendance.php'</font>
						<font face="Courier New" size="2">); <br />INSERT INTO menu VALUES ( '5', '2', '通讯录', ''); <br />INSERT INTO menu VALUES ( '6', '2', '网络会议', ''); <br />INSERT INTO menu VALUES ( '7', '3', '新增档案', 'http://localhost/personal/add_achive.php'</font>
						<font face="Courier New" size="2">); <br />INSERT INTO menu VALUES ( '8', '3', '查询档案', 'http://localhost/personal/search_archive.php'</font>
						<font face="Courier New" size="2">); <br />INSERT INTO menu VALUES ( '9', '3', '删除档案', 'http://localhost/personal/delete_archive.php'</font>
						<font face="Courier New" size="2">); <br />INSERT INTO menu VALUES ( '10', '5', '新增通讯记录','http://localhost/communication/add_address.php'</font>
						<font face="Courier New" size="2">); <br />INSERT INTO menu VALUES ( '11', '5', '查询通讯记录', http://localhost/communication/search_address.php'</font>
						<font face="Courier New" size="2">); <br />INSERT INTO menu VALUES ( '12', '5', '删除通讯记录', http://localhost/communication/delete_address.php'</font>
						<font face="Courier New" size="2">); <br />INSERT INTO menu VALUES ( '13', '6', '召开会议', 'http://localhost/communication/convence_meeting.php'</font>
						<font face="Courier New">
								<font size="2">); <br />INSERT INTO menu VALUES ( '14', '6', '会议查询', 'http://localhost/communication/search_meeting.php'</font>
								<font size="2">); </font>
						</font>
				</p>
				<br />
				<font face="Courier New" size="2">在添加记录的时候，一定要注意，非一级菜单的parent_id一定要指定为上级菜单的ID号，否则你的菜单是不会显示出来的：） <br /><br />好了！有了数据库，下面就是通过php</font>
				<font face="Courier New" size="2">,JavaScript把菜单从数据库中读出来，并显示出来了：） <br /><br />1、JavaScript脚本： </font>
				<p class="&lt;a" href="/pctech/programe/php/Index.html"> </p>
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<font face="Courier New">
								<span style="COLOR: #008080"> 1</span>
								<span style="COLOR: #0000ff">function</span>
						</font>
						<font face="Courier New">
								<span style="COLOR: #000000"> ShowMenu(MenuID) <br /></span>
								<span style="COLOR: #008080"> 2</span>
						</font>
						<span id="Codehighlighter1_27_178_Open_Text">
								<font face="Courier New">
										<span style="COLOR: #000000">{ <br /></span>
										<span style="COLOR: #008080"> 3</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000">(MenuID.style.display</span>
										<span style="COLOR: #000000">==</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">none</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">) <br /></span>
										<span style="COLOR: #008080"> 4            </span>
								</font>
								<span id="Codehighlighter1_72_113_Open_Text">
										<font face="Courier New">
												<span style="COLOR: #000000">{ <br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/InBlock.gif" align="top" />        MenuID.style.display</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000">""</span>
										</font>
										<font face="Courier New">
												<span style="COLOR: #000000">; <br /></span>
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
										</font>
								</span>
								<font face="Courier New">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
										<span style="COLOR: #0000ff">else</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_130_175_Open_Image" onclick="this.style.display='none'; Codehighlighter1_130_175_Open_Text.style.display='none'; Codehighlighter1_130_175_Closed_Image.style.display='inline'; Codehighlighter1_130_175_Closed_Text.style.display='inline';" src="http://www.phpweblog.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_130_175_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_130_175_Closed_Text.style.display='none'; Codehighlighter1_130_175_Open_Image.style.display='inline'; Codehighlighter1_130_175_Open_Text.style.display='inline';" src="http://www.phpweblog.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
										<span id="Codehighlighter1_130_175_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										</span>
								</font>
								<span id="Codehighlighter1_130_175_Open_Text">
										<font face="Courier New">
												<span style="COLOR: #000000">{ <br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/InBlock.gif" align="top" />        MenuID.style.display</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">none</span>
												<span style="COLOR: #000000">"</span>
										</font>
										<font face="Courier New">
												<span style="COLOR: #000000">; <br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
										</font>
								</span>
								<font face="Courier New">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
								</font>
						</span>
						<span style="COLOR: #000000">
								<font face="Courier New"> </font>
						</span>
				</div>
				<font face="Courier New" size="2">这个脚本很简单，就是用来响应点击某个菜单被点击的事件的。 <br /><br />2、CSS文件： <br /></font>
				<font face="Courier New">
						<font size="2">&lt;!-- 表格样式 --&gt; <br />TD { <br />FONT-FAMILY: "Verdana", "宋体"; FONT-SIZE: 12px; LINE-HEIGHT: 130%; letter-spacing:1px <br />} <br /><br />&lt;!-- 超级连接样式 --&gt; <br />A:link { <br />COLOR: #990000; FONT-FAMILY: "Verdana", "宋体"; FONT-SIZE: 12px; TEXT-DECORATION: none; letter-spacing:1px <br />} <br />A:visited { <br />COLOR: #990000; FONT-FAMILY: "Verdana", "宋体"; FONT-SIZE: 12px; TEXT-DECORATION: none; letter-spacing:1px <br />} <br />A:active { <br />COLOR: #990000; FONT-FAMILY: "Verdana", "宋体"; FONT-SIZE: 12px; TEXT-DECORATION: none; letter-spacing:1px <br />} <br />A:hover { <br />COLOR: #ff0000; FONT-FAMILY: "Verdana", "宋体"; FONT-SIZE: 12px; TEXT-DECORATION: underline; letter-spacing:1px <br />} <br /><br />&lt;!-- 其他样式 --&gt; <br />.Menu { <br />COLOR:#000000; FONT-FAMILY: "Verdana", "宋体"; FONT-SIZE: 12px; CURSOR: hand <br />} </font>
						<br />
				</font>
				<font size="2">
						<font face="Courier New">定义了一些基本的样式信息，比如字体，颜色，超级连接的样式等，如果你想改变样式的话，只要修改这里就行了！<br /><br /></font>
						<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
								<font face="Courier New">
										<span style="COLOR: #008080"> 1</span>
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #000000">&lt;?</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">php <br /></span>
										<span style="COLOR: #008080"> 2</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">基本变量设置 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080"> 3</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$GLOBALS</span>
										<span style="COLOR: #000000">[</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">ID</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">] </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">1</span>
										<span style="COLOR: #000000">; </span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">用来跟踪下拉菜单的ID号 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080"> 4</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$layer</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">1</span>
										<span style="COLOR: #000000">; </span>
										<span style="COLOR: #008000">//</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">用来跟踪当前菜单的级数 <br /></span>
										<span style="COLOR: #008080"> 5</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 6</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//连接数据库 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$Con</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_connect</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">localhost</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">root</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">""</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008080">mysql_select_db</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">work</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 9</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">提取一级菜单 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$sql</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">select * from menu where parent_id=0</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_query</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$sql</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$Con</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">13</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">如果一级菜单存在则开始菜单的显示 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #008080">mysql_num_rows</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">)</span>
										<span style="COLOR: #000000">&gt;</span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">) ShowTreeMenu(</span>
										<span style="COLOR: #800080">$Con</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$layer</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$ID</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">16</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">17</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">18</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">============================================= <br /></span>
										<span style="COLOR: #008080">19</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//显示树型菜单函数 ShowTreeMenu($con,$result,$layer) <br /></span>
										<span style="COLOR: #008080">20</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//$con：数据库连接 <br /></span>
										<span style="COLOR: #008080">21</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//$result：需要显示的菜单记录集 <br /></span>
										<span style="COLOR: #008080">22</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//layer：需要显示的菜单的级数 <br /></span>
										<span style="COLOR: #008080">23</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//============================================= </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">24</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">function</span>
										<span style="COLOR: #000000"> ShowTreeMenu(</span>
										<span style="COLOR: #800080">$Con</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$layer</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">) <br /></span>
										<span style="COLOR: #008080">25</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
										<span style="COLOR: #008080">26</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">取得需要显示的菜单的项目数 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">27</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$numrows</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_num_rows</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">28</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">29</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">开始显示菜单，每个子菜单都用一个表格来表示 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">30</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;table cellpadding='0' cellspacing='0' border='0'&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">31</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">32</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">for</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$rows</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">;</span>
										<span style="COLOR: #800080">$rows</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #800080">$numrows</span>
										<span style="COLOR: #000000">;</span>
										<span style="COLOR: #800080">$rows</span>
										<span style="COLOR: #000000">++</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">) <br /></span>
										<span style="COLOR: #008080">33</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
										<span style="COLOR: #008080">34</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">将当前菜单项目的内容导入数组 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">35</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$menu</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_fetch_array</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">36</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">37</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">提取菜单项目的子菜单记录集 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">38</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$sql</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">select * from menu where parent_id=$menu[id]</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">39</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$result_sub</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_query</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$sql</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$Con</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">40</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">41</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;tr&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">42</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
								</font>
						</div>
						<br />
						<br />
						<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
								<font face="Courier New">
										<span style="COLOR: #008080"> 1</span>
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">如果该菜单项目有子菜单，则添加JavaScript onClick语句 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080"> 2</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #008080">mysql_num_rows</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result_sub</span>
										<span style="COLOR: #000000">)</span>
										<span style="COLOR: #000000">&gt;</span>
										<span style="COLOR: #000000">0</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">) <br /></span>
										<span style="COLOR: #008080"> 3</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
										<span style="COLOR: #008080"> 4</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">&lt;td width='20'&gt;&lt;img src='folder.gif' border='0 <br /></span>
										<span style="COLOR: #008080"> 5</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> <br /></span>
										<span style="COLOR: #008080"> 6</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />'&gt;&lt;/td&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;td class='Menu' onClick='javascript:ShowMenu(Menu</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">.</span>
										<span style="COLOR: #800080">$GLOBALS</span>
										<span style="COLOR: #000000">[</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">ID</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">]</span>
										<span style="COLOR: #000000">.</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);'&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080"> 8</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">else</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">10</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;td width='20'&gt;&lt;img src='file.gif' border='0'&gt;&lt;/td&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;td class='Menu'&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">13</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #008000">如果该菜单项目没有子菜单，并指定了超级连接地址，则指定为超级连接， <br /></span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//否则只显示菜单名称 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">16</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$menu</span>
										<span style="COLOR: #000000">[url]</span>
										<span style="COLOR: #000000">!=</span>
										<span style="COLOR: #000000">""</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">) <br /></span>
										<span style="COLOR: #008080">17</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;a href='$menu[url]'&gt;$menu[name]&lt;/a&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">18</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">else</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">19</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #800080">$menu</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">[name]; <br /></span>
										<span style="COLOR: #008080">20</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">21</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />&lt;/td&gt; <br /></span>
										<span style="COLOR: #008080">22</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />&lt;/tr&gt; <br /></span>
										<span style="COLOR: #008080">23</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">24</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">25</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">如果该菜单项目有子菜单，则显示子菜单 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">26</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #008080">mysql_num_rows</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result_sub</span>
										<span style="COLOR: #000000">)</span>
										<span style="COLOR: #000000">&gt;</span>
										<span style="COLOR: #000000">0</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">) <br /></span>
										<span style="COLOR: #008080">27</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
										<span style="COLOR: #008080">28</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">指定该子菜单的ID和style，以便和onClick语句相对应 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">29</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;tr id=Menu</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">.</span>
										<span style="COLOR: #800080">$GLOBALS</span>
										<span style="COLOR: #000000">[</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">ID</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">]</span>
										<span style="COLOR: #000000">++.</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000"> style='display:none'&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">30</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;td width='20'&gt;&amp;nbsp;&lt;/td&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">31</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;td&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">32</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">将级数加1 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">33</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$layer</span>
										<span style="COLOR: #000000">++</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">34</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">递归调用ShowTreeMenu()函数，生成子菜单 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">35</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #000000">ShowTreeMenu(</span>
										<span style="COLOR: #800080">$Con</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$result_sub</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$layer</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">36</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">子菜单处理完成，返回到递归的上一层，将级数减1 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">37</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$layer</span>
										<span style="COLOR: #000000">--</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">38</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;/td&gt;&lt;/tr&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">39</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080">40</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">继续显示下一个菜单项目 </span>
								</font>
								<span style="COLOR: #008000">
										<br />
								</span>
								<font face="Courier New">
										<span style="COLOR: #008080">41</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">} <br /></span>
										<span style="COLOR: #008080">42</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;/table&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">43</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080">44</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #000000">?&gt;</span>
										<span style="COLOR: #000000"> </span>
								</font>
						</div>
						<br />
						<p>
								<font face="Courier New">
								</font>
						</p>
						<br />
						<font face="Courier New">在上面的页面里面，我定义了一个函数ShowTreeMenu()，通过这个函数的调用，会从数据库中递归的调出每个菜单项目，并显示在页面上了：） </font>
				</font>
		</span>
		<br />
		<br />
		<br />
<img src ="http://www.phpweblog.net/be-evil/aggbug/1111.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-13 20:39 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/13/1111.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP初学者常见问题[转]</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/13/1109.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Fri, 13 Apr 2007 06:37:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/13/1109.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1109.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/13/1109.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1109.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1109.html</trackback:ping><description><![CDATA[
		<p>
				<font face="Courier New" color="#000000" size="2">【1】页面之间无法传递变量 get,post,session在最新的php版本中自动全局变量是关闭的，所以要从上一页面取得提交过来得变量要使用$_GET['foo'],$_POST['foo'],$_SESSION['foo']来得到 <br />当然也可以修改自动全局变量为开(php.ini改为register_globals = On)；考虑到兼容性，还是强迫自己熟悉新的写法比较好。 <br />【2】Win32下apache2 用get方法传递中文参数会出错 <br />test.php?a=你好&amp;b=你也好 <br />传递参数是会导致一个内部错误 <br />解决办法:"test.php?a=".urlencode(你好)."&amp;b=".urlencode(你也好) <br />............. <br /><br />【3】win32下的session不能正常工作 <br />php.ini默认的session.save_path = /tmp <br />这显然是linux下的配置，win32下php无法读写session文件导致session无法使用 <br />把它改成一个绝对路径就可以了，例如session.save_path = c:windows emp <br />【4】显示错误信息 <br />当php.ini的display_errors = On并且error_reporting = E_ALL时，将显示所有的错误和提示，调试的时候最好打开以便纠错，如果你用以前php写法错误信息多半是关于未定义变量的。变量在赋值以前调用会有提示，解决办法是探测或者屏蔽 <br />例如显示$foo，可以if(isset($foo)) echo $foo 或者echo @$foo <br />【5】Win32下mail()不能发送电子邮件 <br />在linux下配置好的sendmail可以发送，在win32下需要调用smtp服务器来发送电子邮件 <br />修改php.ini的SMTP = ip //ip是不带验证功能的smtp服务器(网上很难找到) <br />php发送邮件的最好解决方法是用socket直接发送到对方email服务器而不用转发服务器 <br />【6】初装的mysql如果没有设置密码，应该使用 <br />update mysql.user set password="yourpassword" where user="root" <br />修改密码 <br />【7】header already sent <br />这个错误通常会在你使用HEADER的时候出现，他可能是几种原因：1，你在使用HEADER前PRING或者ECHO了2.你当前文件前面有空行3.你可能INCLUDE了一个文件,该文件尾部有空行或者输出也会出现这种错误。！ <br />【8】更改php.ini后没有变化 <br />重新启动web server，比如IIS，Apache等等，然后才会应用最新的设置 <br />【9】php在2003上面安装（ISAPI的安装方法恳请高手指教） <br />PHP4的php4isapi.dll好像和2003有些冲突，只能用CGI模式安装 <br />步骤一，先</font>
				<a href="http://www.php.net/" target="_blank">
						<font face="Courier New" color="#000000" size="2">www.php.net</font>
				</a>
				<font face="Courier New" color="#000000" size="2"> 下在一个安装程序，我是装的是：php-4.2.3-installer.exe，你也可以去找最新的版本，在安装php-4.2.3-installer.exe之前保证你的IIS6.0启动了，并能够访问。安装好以后，在默认网站--&gt;应用程序配置 <br />步骤二：点击 web服务扩展 --&gt;新建web服务扩展. <br />步骤三： 扩展名--&gt;php,然后添加 <br />步骤四：找到php.exe的路径添加上去。 <br />步骤五： 确定就可以了！ <br />步骤六： 选择php的服务扩展，然后点击允许。 <br />【10】 <br />有时候sql语句不起作用，对数据库操作失败 <br />最简便的调试方法，echo那句sql，看看变量的值能得到不 <br />【11】include和require的区别 <br />两者没有太大的区别，如果要包含的文件不存在，include提示notice，然后继续执行下面的语句，require提示致命错误并且退出 <br />据我测试，win32平台下它们都是先包含后执行，所以被包含文件里最好不要再有include或require语句，这样会造成目录混乱。或许*nux下情况不同，暂时还没测试 <br />如果一个文件不想被包含多次可以使用include_once或require_once## 读取，写入文档数据 <br />function r($file_name) { <br />$filenum=@fopen($file_name,"r"); <br />@flock($filenum,LOCK_SH); <br />$file_data=@fread($filenum,filesize($file_name)); <br />@fclose($filenum); <br />return $file_data; <br />} <br />function w($file_name,$data,$method="w"){ <br />$filenum=@fopen($file_name,$method); <br />flock($filenum,LOCK_EX); <br />$file_data=fwrite($filenum,$data); <br />fclose($filenum); <br />return $file_data; <br />} <br /><br />【12】isset()和empty()的区别 <br />两者都是测试变量用的 <br />但是isset()是测试变量是否被赋值，而empty()是测试一个已经被赋值的变量是否为空 <br />如果一个变量没被赋值就引用在php里是被允许的,但会有notice提示 <br />如果一个变量被赋空值，$foo=""或者$foo=0或者 $foo=false,那么empty($foo)返回真，isset($foo)也返回真，就是说赋空值不会注销一个变量。 <br />要注销一个变量，可以用 unset($foo)或者$foo=NULL <br />【13】mysql查询语句包含有关键字 <br />php查询mysql的时候，有时候mysql表名或者列名会有关键字 <br />这时候查询会有错误。例如表名是order,查询时候会出错 <br />简单的办法是sql语句里表名或者列名加上`[tab键上面]来加以区别 <br />例如select * from `order` <br />【14】通过HTTP协议一次上传多个文件的方法 <br />有两个思路，是同一个方法的两种实现。具体程序还需自己去设计 <br />1,在form中设置多个文件输入框，用数组命名他们的名字，如下： <br />&lt;form action="" method=post&gt; <br />&lt;input type=file name=usefile[]&gt; <br />&lt;input type=file name=usefile[]&gt; <br />&lt;input type=file name=usefile[]&gt; <br />&lt;/form&gt; <br />这样，在服务器端做以下测试 <br />echo "&lt;pre&gt;"; <br />print_r($_FILES); <br />echo "&lt;/pre&gt;"; <br /><br />1,在form中设置多个文件输入框，但名字不同，如下： <br />&lt;form action="" method=post&gt; <br />&lt;input type=file name=usefile_a&gt; <br />&lt;input type=file name=usefile_b&gt; <br />&lt;input type=file name=usefile_c&gt; <br />&lt;/form&gt; <br />在服务器端做同样测试： <br />echo "&lt;pre&gt;"; <br />print_r($_FILES); <br />echo "&lt;/pre&gt;";</font>
		</p>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1109.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-13 14:37 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/13/1109.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>删除任务栏中空白的工具栏</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/10/1104.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Tue, 10 Apr 2007 15:53:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/10/1104.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1104.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/10/1104.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1104.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1104.html</trackback:ping><description><![CDATA[
		<font face="Courier New" color="#000000" size="2">今天居然发现自己XP系统的任务栏莫名奇妙多了个空白的,删也删不掉拖也拖不走的工具栏.它在那里占着我宝贵的任务栏的空间让我极度不爽,于是打开GOOGLE寻得如下解决方法:</font>
		<div>
				<font face="Courier New" color="#000000" size="2">     windows xp sp2系统可能遇到任务栏出现空白的工具栏,里面没有任何内容,有分割线隔开,把好好的任务栏分成了几部分，可以拖动(在任务栏点击右键-属性，把锁定任务栏前的钩去掉)，但是不能删除或者隐藏。其实我们可以通过修改注册表来达到删除这些空白工具栏的目的。方法如下：<br />     打开注册表编辑器，定位到HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify，删除右边的IconStreams和PastIconsStream，然后打开任务管理器，切换到进程选项卡，找到并选择Explorer.exe进程，点击“结束进程”，然后点击任务管理器的“文件→运行”，输入explorer，点击确定或注销后重新登陆即可。</font>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1104.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-10 23:53 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/10/1104.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP中如何用SQL语句实现论坛置顶功能.</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/10/1100.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Tue, 10 Apr 2007 15:51:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/10/1100.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1100.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/10/1100.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1100.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1100.html</trackback:ping><description><![CDATA[
		<p>
				<font face="Courier New" size="2">假设置顶的标识字段为top,添加时间为time.</font>
		</p>
		<p>
				<font face="Courier New" size="2">如果用普通方法必须查询两次数据库才能做到置顶功能,那么现在介绍一下一次就能做到的SQL语句 :</font>
		</p>
		<p>
				<font face="Courier New" size="2">select   ....   order   by   (case   [top]   when   1   then   1   else   0   end),   [time] </font>
		</p>
		<p>
				<font face="Courier New" size="2">顺便看了一下BMF论坛的排序代码.</font>
		</p>
		<p>
				<font face="Courier New" size="2">BMF的帖子置顶字段是toptype,时间是changetime,时间用的是1970年到现在的秒数,那么排序的语句就是</font>
		</p>
		<p>
				<font face="Courier New" size="2">$orderby = "ORDER BY `toptype` DESC,`changetime` DESC";</font>
		</p>
		<p>
				<font face="Courier New" size="2">小case搞定~</font>
		</p>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1100.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-10 23:51 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/10/1100.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP计算两个时间之差的函数(年,月,周,日,小时,分钟,秒数)</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1090.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:20:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1090.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1090.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1090.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1090.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1090.html</trackback:ping><description><![CDATA[
		<div class="code">
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080"> 1</span>
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<span style="COLOR: #000000">&lt;?</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">PHP<br /></span>
												<span style="COLOR: #008080"> 2</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000"> 时间格式为YYYYMMDDHHmmss</span>
										</font>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080"> 3</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #0000ff">function</span>
												<span style="COLOR: #000000"> timeDiff(</span>
												<span style="COLOR: #800080">$aTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$bTime</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">)<br /></span>
												<span style="COLOR: #008080"> 4</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
												<span style="COLOR: #008080"> 5</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">分割第一个时间</span>
										</font>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080"> 6</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">    </span>
												<span style="COLOR: #800080">$ayear</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$aTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">0</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">4</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080"> 7</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #800080">$amonth</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$aTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">4</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080"> 8</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #800080">$aday</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$aTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">6</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080"> 9</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #800080">$ahour</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$aTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">8</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #800080">$aminute</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$aTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">10</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
												<span style="COLOR: #800080">$asecond</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$aTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">12</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">分割第二个时间</span>
										</font>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">    </span>
												<span style="COLOR: #800080">$byear</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$bTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">0</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">4</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">14</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
												<span style="COLOR: #800080">$bmonth</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$bTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">4</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">15</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
												<span style="COLOR: #800080">$bday</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$bTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">6</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">16</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
												<span style="COLOR: #800080">$bhour</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$bTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">8</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">17</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
												<span style="COLOR: #800080">$bminute</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$bTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">10</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">18</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #800080">$bsecond</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">substr</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$bTime</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">12</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">2</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">19</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">生成时间戳</span>
										</font>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080">20</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">  </span>
												<span style="COLOR: #800080">$a</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">mktime</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$ahour</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$aminute</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$asecond</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$amonth</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$aday</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$ayear</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">21</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #800080">$b</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">mktime</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$bhour</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$bminute</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$bsecond</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$bmonth</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$bday</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #800080">$byear</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">22</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">second</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$a</span>
												<span style="COLOR: #000000">-</span>
												<span style="COLOR: #800080">$b</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">23</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">采用了四舍五入,可以修改</span>
										</font>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080">24</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">mintue</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">round</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">second</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">]</span>
												<span style="COLOR: #000000">/</span>
												<span style="COLOR: #000000">60</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">25</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">hour</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">round</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">mintue</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">]</span>
												<span style="COLOR: #000000">/</span>
												<span style="COLOR: #000000">60</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">26</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">day</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">round</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">hour</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">]</span>
												<span style="COLOR: #000000">/</span>
												<span style="COLOR: #000000">24</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">27</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">week</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">round</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">day</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">]</span>
												<span style="COLOR: #000000">/</span>
												<span style="COLOR: #000000">7</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">28</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">month</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">round</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">day</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">]</span>
												<span style="COLOR: #000000">/</span>
												<span style="COLOR: #000000">30</span>
												<span style="COLOR: #000000">); </span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">按30天来算</span>
										</font>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080">29</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">year</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">] </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #008080">round</span>
												<span style="COLOR: #000000">(</span>
												<span style="COLOR: #800080">$timeDiff</span>
												<span style="COLOR: #000000">[</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">day</span>
												<span style="COLOR: #000000">'</span>
												<span style="COLOR: #000000">]</span>
												<span style="COLOR: #000000">/</span>
												<span style="COLOR: #000000">365</span>
												<span style="COLOR: #000000">); </span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">按365天来算 </span>
										</font>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #008080">30</span>
												<span style="COLOR: #008000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #800080">$timeDiff</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">31</span>
										</font>
								</font>
						</font>
						<font color="#000000">
								<font size="2">
										<font face="Courier New">
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
												<span style="COLOR: #008080">32</span>
												<span style="COLOR: #000000">
														<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												</span>
												<span style="COLOR: #000000">?&gt;</span>
										</font>
								</font>
						</font>
				</div>
		</div>
		<div class="code">
				<font face="Courier New" color="#000000" size="2">用法:<br />$a=timeDiff("20060613161000","20040613150000");<br />print_r($a);<br /><br />返回一个数组,可以用下标直接输出来年,月,周,日,小时,分钟,秒数之差<br /></font>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1090.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:20 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1090.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP版仿GOOGLE和Discuz分页函数</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1089.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:19:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1089.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1089.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1089.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1089.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1089.html</trackback:ping><description><![CDATA[
		<font face="Courier New" size="2">仿GOOGLE和Discuz分页函数(php)<br /><br />这个函数只需要2个参数 当前页码和总页数,$site是路径,文件名可以按自己的需要修改 <br />这个函数不能传递其他参数,如果要传递其他参数,在函数里自己加一个参数就行了 <br /><br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080"> 1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">php <br /></span>
								<span style="COLOR: #008080"> 2</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">计数 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080"> 3</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> “SELECT </span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">*</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) FROM `andycms_title`;”; <br /></span>
								<span style="COLOR: #008080"> 4</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$numrs</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">mysql_query</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$sql</span>
								<span style="COLOR: #000000">) or </span>
								<span style="COLOR: #0000ff">die</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">mysql_error</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">()); <br /></span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$numrow</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">mysql_fetch_row</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$numrs</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">); <br /></span>
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$num</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$numrow</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">]; </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">总记录 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080"> 7</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">ceil</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$num</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">/</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">); </span>
								<span style="COLOR: #008000">//</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008000">总页数 <br /></span>
								<span style="COLOR: #008080"> 8</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />//当前页码 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080">10</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$_GET</span>
								<span style="COLOR: #000000">[‘page’]) </span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">preg_match</span>
								<span style="COLOR: #000000">(‘</span>
								<span style="COLOR: #000000">~</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">^</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">9</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">+~</span>
								<span style="COLOR: #000000">’</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$_GET</span>
								<span style="COLOR: #000000">[‘page’])) </span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$_GET</span>
								<span style="COLOR: #000000">[‘page’] </span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$_GET</span>
								<span style="COLOR: #000000">[‘page’] </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">11</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$_GET</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">[‘page’]; <br /></span>
								<span style="COLOR: #008080">12</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$startnum</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #000000">*</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">记录集开始数 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080">14</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">?&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font face="Courier New" size="2">15</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
		</div>
		<br />
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080"> 1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">php <br /></span>
								<span style="COLOR: #008080"> 2</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000"> Andy分页函数 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080"> 3</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> fenye (</span>
								<span style="COLOR: #800080">$p</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$total</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) <br /></span>
								<span style="COLOR: #008080"> 4</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{ <br /></span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">global</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$site</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$prevs</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$p</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">10</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( </span>
								<span style="COLOR: #800080">$prevs</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">) { </span>
								<span style="COLOR: #800080">$prevs</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; } <br /></span>
								<span style="COLOR: #008080"> 7</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$prev</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$prevs</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( </span>
								<span style="COLOR: #800080">$prev</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">) {</span>
								<span style="COLOR: #800080">$prev</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">;} <br /></span>
								<span style="COLOR: #008080"> 8</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$nexts</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$p</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">9</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( </span>
								<span style="COLOR: #800080">$nexts</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">) { </span>
								<span style="COLOR: #800080">$nexts</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$total</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; } <br /></span>
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$next</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$nexts</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( </span>
								<span style="COLOR: #800080">$next</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">) {</span>
								<span style="COLOR: #800080">$next</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$total</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">;} <br /></span>
								<span style="COLOR: #008080">10</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">11</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pagenavi</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$site</span>
								<span style="COLOR: #000000">/?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">首页</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">12</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pagenavi</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$site</span>
								<span style="COLOR: #000000">/?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$prev</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">上页</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000"> ( </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$prevs</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$p</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> ) { <br /></span>
								<span style="COLOR: #008080">14</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pagenavi</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$site</span>
								<span style="COLOR: #000000">/?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">15</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pagenavi</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">strong</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #800080">$p</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">strong</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000"> ( </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$p</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$nexts</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> ) { <br /></span>
								<span style="COLOR: #008080">18</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pagenavi</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$site</span>
								<span style="COLOR: #000000">/?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">19</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">20</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pagenavi</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$site</span>
								<span style="COLOR: #000000">/?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$next</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">下页</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">21</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pagenavi</span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$site</span>
								<span style="COLOR: #000000">/?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$total</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">尾页</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">22</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">23</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pagenavi</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">24</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">25</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">?&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080">26</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
		</div>
		<font face="Courier New" size="2">效果:<br /><br />page=1 <br />首页 上页 1 2 3 4 5 6 7 8 9 10 下页 尾页 <br />page=10 <br />首页 上页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 下页 尾页 <br />page=20 <br />首页 上页 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 下页 尾页 <br /><br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080"> 1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">另外</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">可以用一下这个函数</span>
								<span style="COLOR: #000000">,</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">Discuz类型的<br /></span>
								<span style="COLOR: #008080"> 2</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 3</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">php <br /></span>
								<span style="COLOR: #008080"> 4</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000"> 分页函数 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> multi(</span>
								<span style="COLOR: #800080">$num</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$perpage</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$curr_page</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$mpurl</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$multipage</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> ‘’; <br /></span>
								<span style="COLOR: #008080"> 7</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$num</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$perpage</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080"> 8</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">10</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$offset</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">2</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">10</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">11</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$pages</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">ceil</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$num</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">/</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$perpage</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">); <br /></span>
								<span style="COLOR: #008080">12</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$curr_page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$offset</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$curr_page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$offset</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">14</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080">15</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} </span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> { <br /></span>
								<span style="COLOR: #008080">18</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080">19</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$curr_page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$from</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">20</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">21</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">((</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080">22</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">23</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">24</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} </span>
								<span style="COLOR: #0000ff">elseif</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080">25</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$curr_page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$to</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">26</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">27</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">((</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">29</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">30</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">31</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">32</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$multipage</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$mpurl</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">首页</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">33</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$from</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$to</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080">34</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">!=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$curr_page</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">) { <br /></span>
								<span style="COLOR: #008080">35</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$multipage</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> “</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$mpurl</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> “; <br /></span>
								<span style="COLOR: #008080">36</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} </span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> { <br /></span>
								<span style="COLOR: #008080">37</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$multipage</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> ‘</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">strong</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">’</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">‘</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">strong</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000"> ‘; <br /></span>
								<span style="COLOR: #008080">38</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">39</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">40</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$multipage</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pages</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$page</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000"> ” … </span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$mpurl</span>
								<span style="COLOR: #000000">?</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$pages</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">尾页</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">” </span>
								<span style="COLOR: #000000">:</span>
								<span style="COLOR: #000000"> ” </span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">a href</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #800080">$mpurl</span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #000000">page</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #800080">$pages</span>
								<span style="COLOR: #000000">\”</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">首页</span>
								<span style="COLOR: #000000">&lt;/</span>
								<span style="COLOR: #000000">a</span>
								<span style="COLOR: #000000">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">”; <br /></span>
								<span style="COLOR: #008080">41</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">42</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$multipage</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">; <br /></span>
								<span style="COLOR: #008080">43</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
								<span style="COLOR: #008080">44</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">?&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #008080">45</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
		</div>
		<font face="Courier New" size="2">效果:<br /><br />page=1 <br />首页 1 2 3 4 5 6 7 8 9 10 … 尾页 <br />page=10 <br />首页 8 9 10 11 12 13 14 15 16 17 … 尾页 <br />page=20 <br />首页 18 19 20 21 22 23 24 25 26 27 … 尾页</font>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1089.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:19 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1089.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>mysql4.1以上版本连接时出现Client does not support authentication protocol问题解决办法</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1088.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:17:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1088.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1088.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1088.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1088.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1088.html</trackback:ping><description><![CDATA[
		<div class="content">
				<p>
						<font face="Courier New" size="2">shell&gt; mysql<br /></font>
						<strong>
								<font face="Courier New" color="#ff0000" size="2">Client does not support authentication protocol requested<br />by server; consider upgrading MySQL client</font>
						</strong>
				</p>
				<p>
						<font face="Courier New" size="2">官方的说法是</font>
				</p>
				<p>
						<font face="Courier New" size="2">MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. .....</font>
				</p>
				<p>
						<strong>
								<font color="#ff0000">
										<br />
								</font>
						</strong>
						<font face="Courier New" size="2"> </font>
				</p>
				<p>
						<font face="Courier New" size="2">如果你升级mysql到4.1以上版本后遇到以上问题,请先确定你的mysql client 是4.1或者更高版本.(WINDOWS下有问题你就直接跳到下面看解决方法了,因为MYSQL 在WINDOWS是client和server一起装上了的)</font>
				</p>
				<p>
						<font face="Courier New" size="2">请使用以下两种方法之一</font>
				</p>
				<p>
						<font face="Courier New" size="2">其一:</font>
				</p>
				<pre>
						<font size="2">mysql&gt; SET PASSWORD FOR     -&gt; '<font color="#ff0000">some_user'@'some_host</font>' = OLD_PASSWORD('<font color="#ff0000">newpwd</font>'); </font>
				</pre>
				<p>
						<font face="Courier New" size="2">其二:</font>
				</p>
				<pre>
						<font size="2">mysql&gt; UPDATE mysql.user SET Password = OLD_PASSWORD('<font color="#ff0000">newpwd</font>')     -&gt; WHERE Host = '<font color="#ff0000">some_host</font>' AND User = '<font color="#ff0000">some_user'</font>; mysql&gt; FLUSH PRIVILEGES; </font>
				</pre>
				<pre>
						<font size="2">上面红色的部分请按自己实际情况修改....</font>
				</pre>
				<pre>
						<font size="2">这样做后,连接就会正常了@!</font>
				</pre>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1088.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:17 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1088.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php正则表达式的快速学习方法</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1087.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:15:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1087.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1087.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1087.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1087.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1087.html</trackback:ping><description><![CDATA[
		<div class="log">
				<div class="tpc_content">
						<font face="Courier New" size="2">1、入门简介 <br /><br />　　简单的说，正则表达式是一种可以用于模式匹配和替换的强有力的工具。我们可以在几乎所有的基于UNIX系统的工具中找到正则表达式的身影，例如，vi编辑器，Perl或PHP脚本语言，以及awk或sed shell程序等。此外，象JavaScript这种客户端的脚本语言也提供了对正则表达式的支持。由此可见，正则表达式已经超出了某种语言或某个系统的局限，成为人们广为接受的概念和功能。 <br />　　正则表达式可以让用户通过使用一系列的特殊字符构建匹配模式，然后把匹配模式与数据文件、程序输入以及WEB页面的表单输入等目标对象进行比较，根据比较对象中是否包含匹配模式，执行相应的程序。 <br />　　举例来说，正则表达式的一个最为普遍的应用就是用于验证用户在线输入的邮件地址的格式是否正确。如果通过正则表达式验证用户邮件地址的格式正确，用户所填写的表单信息将会被正常处理；反之，如果用户输入的邮件地址与正则表达的模式不匹配，将会弹出提示信息，要求用户重新输入正确的邮件地址。由此可见正则表达式在WEB应用的逻辑判断中具有举足轻重的作用。 <br /><br />2、基本语法 <br /><br />　　在对正则表达式的功能和作用有了初步的了解之后，我们就来具体看一下正则表达式的语法格式。 <br />　　正则表达式的形式一般如下： <br />　　/love/ <br />　　其中位于“/”定界符之间的部分就是将要在目标对象中进行匹配的模式。用户只要把希望查找匹配对象的模式内容放入“/”定界符之间即可。为了能够使用户更加灵活的定制模式内容，正则表达式提供了专门的“元字符”。所谓元字符就是指那些在正则表达式中具有特殊意义的专用字符，可以用来规定其前导字符（即位于元字符前面的字符）在目标对象中的出现模式。 <br />　　较为常用的元字符包括： “+”， “*”，以及 “?”。其中，“+”元字符规定其前导字符必须在目标对象中连续出现一次或多次，“*”元字符规定其前导字符必须在目标对象中出现零次或连续多次，而“?”元字符规定其前导对象必须在目标对象中连续出现零次或一次。 <br />　　下面，就让我们来看一下正则表达式元字符的具体应用。 <br />　　/fo+/ <br />　　因为上述正则表达式中包含“+”元字符，表示可以与目标对象中的 “fool”, “fo”, 或者 “football”等在字母f后面连续出现一个或多个字母o的字符串相匹配。 <br />　　/eg*/ <br />　　因为上述正则表达式中包含“*”元字符，表示可以与目标对象中的 “easy”, “ego”, 或者 “egg”等在字母e后面连续出现零个或多个字母g的字符串相匹配。 <br />　　/Wil?/ <br />　　因为上述正则表达式中包含“？”元字符，表示可以与目标对象中的 “Win”, 或者 “Wilson”,等在字母i后面连续出现零个或一个字母l的字符串相匹配。 <br />　　除了元字符之外，用户还可以精确指定模式在匹配对象中出现的频率。例如， <br />　　/jim{2,6}/ <br />　　上述正则表达式规定字符m可以在匹配对象中连续出现2-6次，因此，上述正则表达式可以同jimmy或jimmmmmy等字符串相匹配。 <br />　　在对如何使用正则表达式有了初步了解之后，我们来看一下其它几个重要的元字符的使用方式。 <br />　　\s：用于匹配单个空格符，包括tab键和换行符； <br />　　\S：用于匹配除单个空格符之外的所有字符； <br />　　\d：用于匹配从0到9的数字； <br />　　\w：用于匹配字母，数字或下划线字符； <br />　　\W：用于匹配所有与\w不匹配的字符； <br />　　. ：用于匹配除换行符之外的所有字符。 <br />　　（说明：我们可以把\s和\S以及\w和\W看作互为逆运算） <br />　　下面，我们就通过实例看一下如何在正则表达式中使用上述元字符。 <br />　　/\s+/ <br />　　上述正则表达式可以用于匹配目标对象中的一个或多个空格字符。 <br />　　/\d000/ <br />　　如果我们手中有一份复杂的财务报表，那么我们可以通过上述正则表达式轻而易举的查找到所有总额达千元的款项。 </font>
				</div>
				<div class="tpc_content">
						<br />
						<font face="Courier New" size="2">　　除了我们以上所介绍的元字符之外，正则表达式中还具有另外一种较为独特的专用字符，即定位符。定位符用于规定匹配模式在目标对象中的出现位置。 <br />　　较为常用的定位符包括： “^”, “$”, “\b” 以及 “\B”。其中，“^”定位符规定匹配模式必须出现在目标字符串的开头，“$”定位符规定匹配模式必须出现在目标对象的结尾，\b定位符规定匹配模式必须出现在目标字符串的开头或结尾的两个边界之一，而“\B”定位符则规定匹配对象必须位于目标字符串的开头和结尾两个边界之内，即匹配对象既不能作为目标字符串的开头，也不能作为目标字符串的结尾。同样，我们也可以把“^”和“$”以及“\b”和“\B”看作是互为逆运算的两组定位符。举例来说： <br />　　/^hell/ <br />　　因为上述正则表达式中包含“^”定位符，所以可以与目标对象中以 “hell”, “hello”或 “hellhound”开头的字符串相匹配。 <br />　　/ar$/ <br />　　因为上述正则表达式中包含“$”定位符，所以可以与目标对象中以 “car”, “bar”或 “ar” 结尾的字符串相匹配。 <br />　　/\bbom/ <br />　　因为上述正则表达式模式以“\b”定位符开头，所以可以与目标对象中以 “bomb”, 或 “bom”开头的字符串相匹配。 <br />　　/man\b/ <br />　　因为上述正则表达式模式以“\b”定位符结尾，所以可以与目标对象中以 “human”, “woman”或 “man”结尾的字符串相匹配。 <br />　　为了能够方便用户更加灵活的设定匹配模式，正则表达式允许使用者在匹配模式中指定某一个范围而不局限于具体的字符。例如： <br />　　/[A-Z]/ <br />　　上述正则表达式将会与从A到Z范围内任何一个大写字母相匹配。 <br />　　/[a-z]/ <br />　　上述正则表达式将会与从a到z范围内任何一个小写字母相匹配。 <br />　　/[0-9]/ <br />　　上述正则表达式将会与从0到9范围内任何一个数字相匹配。 <br />　　/([a-z][A-Z][0-9])+/ <br />　　上述正则表达式将会与任何由字母和数字组成的字符串，如 “aB0” 等相匹配。这里需要提醒用户注意的一点就是可以在正则表达式中使用 “()” 把字符串组合在一起。“()”符号包含的内容必须同时出现在目标对象中。因此，上述正则表达式将无法与诸如 “abc”等的字符串匹配，因为“abc”中的最后一个字符为字母而非数字。 <br />　　如果我们希望在正则表达式中实现类似编程逻辑中的“或”运算，在多个不同的模式中任选一个进行匹配的话，可以使用管道符 “|”。例如： <br />　　/to|too|2/ <br />　　上述正则表达式将会与目标对象中的 “to”, “too”, 或 “2” 相匹配。 <br />　　正则表达式中还有一个较为常用的运算符，即否定符 “[^]”。与我们前文所介绍的定位符 “^” 不同，否定符 “[^]”规定目标对象中不能存在模式中所规定的字符串。例如： <br />　　/[^A-C]/ <br />　　上述字符串将会与目标对象中除A，B，和C之外的任何字符相匹配。一般来说，当“^”出现在 “[]”内时就被视做否定运算符；而当“^”位于“[]”之外，或没有“[]”时，则应当被视做定位符。 <br />　　最后，当用户需要在正则表达式的模式中加入元字符，并查找其匹配对象时，可以使用转义符“\”。例如： <br />　　/Th\*/ <br />　　上述正则表达式将会与目标对象中的“Th*”而非“The”等相匹配。 <br /><br />3、使用实例 <br /><br />    ①PHP中可以使用ereg()函数进行模式匹配操作。ereg()函数的使用格式如下： <br />　　 ereg(pattern, string) <br /><br />　　其中，pattern代表正则表达式的模式，而string则是执行查找替换操作的目标对象。同样是验证邮件地址，使用PHP编写的程序代码如下： <br /><br /><br /><br /><br />　&lt;?php <br />　　 if (ereg(“^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+”,$email)) <br />　　　 { echo “Your email address is correct!”;} <br />　　 else <br />　　　 { echo “Please try again!”;} <br />　　 ?&gt; <br /><br /><br />　　②JavaScript 1.2中带有一个功能强大的RegExp()对象，可以用来进行正则表达式的匹配操作。其中的test()方法可以检验目标对象中是否包含匹配模式，并相应的返回true或false。 <br /><br />　　我们可以使用JavaScript编写以下脚本，验证用户输入的邮件地址的有效性。 <br /><br /><br />　&lt;html&gt; <br />　　 &lt;head&gt; <br />　　　 &lt;script language=\"Javascript1.2\"&gt; <br />　　　　 &lt;!-- start hiding <br />　　　　 function verifyAddress(obj) <br />　　　　　{ <br />　　　　　　var email = obj.email.value; <br />　　　　　　var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/; <br />　　　　　　flag = pattern.test(email); <br />　　　　　　if(flag) <br />　　　　　　{ <br />　　　　　　　alert(“Your email address is correct!”); <br />　　　　　　　return true; <br />　　　　　　} <br />　　　　　　else <br />　　　　　　　{ <br />　　　　　　　　alert(“Please try again!”); <br />　　　　　　　　return false; <br />　　　　　　　 } <br />　　　　　 } <br />　　　　 // stop hiding --&gt; <br />　　　 &lt;/script&gt; <br />　　　&lt;/head&gt; <br />　　 &lt;body&gt; <br />　　 &lt;form onSubmit=\"return verifyAddress(this);\"&gt; <br />　　　&lt;input name=\"email\" type=\"text\"&gt; <br />　　　&lt;input type=\"submit\"&gt; <br />　　　&lt;/form&gt; <br />　　&lt;/body&gt; <br />　&lt;/html&gt; <br /><br /><br />想必很多人都对正则表达式都头疼。今天，我以我的认识，加上网上一些文章，希望用常人都可以理解的表达方式。来和大家分享学习经验。 <br /><br /><br /><br />开篇，还是得说说 ^ 和 $ 他们是分别用来匹配字符串的开始和结束，以下分别举例说明： <br /><br />"^The"：开头一定要有"The"字符串； <br />"of despair$"：结尾一定要有"of despair" 的字符串； <br /><br />那么， <br />"^abc$"：就是要求以abc开头和以abc结尾的字符串，实际上是只有abc匹配； <br />"notice"：匹配包含notice的字符串； <br /><br />你可以看见如果你没有用我们提到的两个字符（最后一个例子），就是说模式（正则表达式）可以出现在被检验字符串的任何地方，你没有把他锁定到两边。 <br /><br /><br /><br />接着，说说 '*' '+' 和 '?' <br />他们用来表示一个字符可以出现的次数或者顺序，他们分别表示： <br />"zero or more"相当于{0,} <br />"one or more"相当于{1,} <br />"zero or one."相当于{0,1} <br /><br />这里是一些例子： <br /><br />"ab*"：和ab{0,}同义，匹配以a开头，后面可以接0个或者N个b组成的字符串("a", "ab", "abbb", 等)； <br />"ab+"：和ab{1,}同义，同上条一样，但最少要有一个b存在 ("ab" "abbb"等)； <br />"ab?"：和ab{0,1}同义，可以没有或者只有一个b； <br />"a?b+$"：匹配以一个或者0个a再加上一个以上的b结尾的字符串。 <br /><br />要点：'*' '+' 和 '?' 只管它前面那个字符。 <br /><br /><br /><br />你也可以在大括号里面限制字符出现的个数，比如： <br /><br />"ab{2}": 要求a后面一定要跟两个b（一个也不能少）("abb")； <br />"ab{2,}": 要求a后面一定要有两个或者两个以上b(如"abb" "abbbb" 等)； <br />"ab{3,5}": 要求a后面可以有2－5个b("abbb", "abbbb", or "abbbbb")。 <br /><br /><br /><br />现在我们把一定几个字符放到小括号里，比如： <br /><br />"a(bc)*": 匹配 a 后面跟0个或者一个"bc"； <br />"a(bc){1,5}": 一个到5个 "bc"； <br /><br /><br /><br />还有一个字符 '|'，相当于OR操作： <br /><br />"hi|hello": 匹配含有"hi" 或者 "hello" 的 字符串； <br />"(b|cd)ef": 匹配含有 "bef" 或者 "cdef"的字符串； <br />"(a|b)*c": 匹配含有这样多个（包括0个）a或b，后面跟一个c的字符串； <br /><br /><br /><br />一个点('.')可以代表所有的单一字符，不包括"\n" <br /><br />如果，要匹配包括"\n"在内的所有单个字符，怎么办？ <br /><br />用'[\n.]'这种模式。 <br /><br /><br /><br />"a.[0-9]": 一个a加一个字符再加一个0到9的数字； <br />"^.{3}$": 三个任意字符结尾。 <br /><br /><br /><br />中括号括住的内容只匹配一个单一的字符 <br /><br />"[ab]": 匹配单个的 a 或者 b ( 和 "a│b" 一样)； <br />"[a-d]": 匹配'a' 到'd'的单个字符 (和"a│b│c│d" 还有 "[abcd]"效果一样)； <br /><br />一般我们都用[a-zA-Z]来指定字符为一个大小写英文： <br /><br />"^[a-zA-Z]": 匹配以大小写字母开头的字符串； <br />"[0-9]%": 匹配含有 形如 x％ 的字符串； <br />",[a-zA-Z0-9]$": 匹配以逗号再加一个数字或字母结尾的字符串； <br /><br />你也可以把你不想要得字符列在中括号里，你只需要在总括号里面使用'^' 作为开头 "%[^a-zA-Z]%" 匹配含有两个百分号里面有一个非字母的字符串。 <br /><br />要点：^用在中括号开头的时候，就表示排除括号里的字符。 <br /><br />为了PHP能够解释，你必须在这些字符面前后加''，并且将一些字符转义。 <br /><br />不要忘记在中括号里面的字符是这条规路的例外—在中括号里面，所有的特殊字符，包括('')，都将失去他们的特殊性质 "[*\+?{}.]"匹配含有这些字符的字符串： <br /><br />还有，正如regx的手册告诉我们："如果列表里含有']'，最好把它作为列表里的第一个字符(可能跟在'^'后面)。如果含有'-'，最好把它放在最前面或者最后面， or 或者一个范围的第二个结束点[a-d-0-9]中间的‘-’将有效。 <br /><br />看了上面的例子，你对{n,m}应该理解了吧。要注意的是，n和m都不能为负整数，而且n总是小于m。这样，才能 最少匹配n次且最多匹配m次。如"p{1,5}"将匹配 "pvpppppp"中的前五个p <br /><br />下面说说以\开头的 <br /><br />\b 书上说他是用来匹配一个单词边界，就是...比如've\b'，可以匹配love里的ve而不匹配very里有ve <br /><br />\B 正好和上面的\b相反。例子我就不举了 <br /><br />.....突然想起来....可以到</font>
						<a href="http://www.phpv.net/article.php/251" target="_blank">
								<font face="Courier New" color="#2f5fa1" size="2">http://www.phpv.net/article.php/251</font>
						</a>
						<font face="Courier New" size="2">看看其它用\开头的语法 <br /><br /><br /><br />好，我们来做个应用：如何构建一个模式来匹配货币数量的输入。 <br /><br />构建一个匹配模式去检查输入的信息是否为一个表示money的数字。我们认为一个表示money的数量有四种方式："10000.00" 和 "10,000.00"，或者没有小数部分，"10000" and "10,000"。现在让我们开始构建这个匹配模式： <br /><br />^[1-9][0-9]*$ <br /><br />这是所变量必须以非0的数字开头。但这也意味着单一的"0"也不能通过测试。以下是解决的方法： <br /><br />^(0|[1-9][0-9]*)$ <br /><br />"只有0和不以0开头的数字与之匹配"，我们也可以允许一个负号在数字之前： <br /><br />^(0|-?[1-9][0-9]*)$ <br /><br />这就是：0或者一个以0开头且可能有一个负号在前面的数字。好了，现在让我们别那么严谨，允许以0开头。现在让我们放弃负号，因为我们在表示钱币的时候并不需要用到。我们现在指定模式用来匹配小数部分： <br /><br />^[0-9]+(\.[0-9]+)?$ <br /><br />这暗示匹配的字符串必须最少以一个阿拉伯数字开头。但是注意，在上面模式中 "10." 是不匹配的， 只有 "10" 和 "10.2" 才可以，你知道为什么吗？ <br /><br />^[0-9]+(\.[0-9]{2})?$ <br /><br />我们上面指定小数点后面必须有两位小数。如果你认为这样太苛刻，你可以改成： <br /><br />^[0-9]+(\.[0-9]{1,2})?$ <br /><br />这将允许小数点后面有一到两个字符。现在我们加上用来增加可读性的逗号（每隔三位），我们可以这样表示： <br /><br />^[0-9]{1,3}(,[0-9]{3})*(\.[0-9]{1,2})?$ <br /><br />不要忘记'+'可以被'*'替代如果你想允许空白字符串被输入话，也不要忘记反斜杆'\'在php字符串中可能会出现错误 (很普遍的错误)： <br /><br />现在，我们已经可以确认字符串了，我们现在把所有逗号都去掉str_replace(",", "", $money)然后在把类型看成double然后我们就可以通过他做数学计算了。 <br /><br /><br /><br />再来一个： <br /><br />构造检查email的正则表达式 <br /><br />在一个完整的email地址中有三个部分： <br /><br />1. 用户名 (在 '@' 左边的一切) <br />2.'@' <br />3. 服务器名(就是剩下那部分) <br /><br />用户名可以含有大小写字母阿拉伯数字，句号('.')减号('-')and下划线'_')。服务器名字也是符合这个规则，当然下划线除外。 <br /><br />现在，用户名的开始和结束都不能是句点，服务器也是这样。还有你不能有两个连续的句点他们之间至少存在一个字符，好现在我们来看一下怎么为用户名写一个匹配模式： <br /><br />^[_a-zA-Z0-9-]+$ <br /><br />现在还不能允许句号的存在。我们把它加上： <br /><br />^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*$ <br /><br />上面的意思就是说：以至少一个规范字符（除了.）开头，后面跟着0个或者多个以点开始的字符串。 <br /><br />简单化一点， 我们可以用eregi()取代ereg()、eregi()对大小写不敏感， 我们就不需要指定两个范围 "a-z" 和 "A-Z"只需要指定一个就可以了： <br /><br />^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ <br /><br />后面的服务器名字也是一样，但要去掉下划线： <br /><br />^[a-z0-9-]+(\.[a-z0-9-]+)*$ <br /><br />好。现在只需要用”@”把两部分连接： <br /><br />^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$ <br /><br /><br />这就是完整的email认证匹配模式了，只需要调用： <br /><br />eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$eamil) <br /><br />就可以得到是否为email了 <br /><br /><br /><br />正则表达式的其他用法 <br /><br />提取字符串 <br /><br />ereg() and eregi() 有一个特性是允许用户通过正则表达式去提取字符串的一部分(具体用法你可以阅读手册)。比如说，我们想从 path/URL 提取文件名，下面的代码就是你需要： <br /><br />ereg("([^\\/]*)$", $pathOrUrl, $regs); <br />echo $regs[1]; <br /><br />高级的代换 <br /><br />ereg_replace() 和 eregi_replace()也是非常有用的，假如我们想把所有的间隔负号都替换成逗号： <br /><br />ereg_replace("[ \n\r\t]+", ",", trim($str)); <br /><br />最后，我把另一串检查EMAIL的正则表达式让看文章的你来分析一下： <br /><br />"^[-!#$%&amp;\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&amp;\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&amp;\'*+\\./0-9=?A-Z^_`a-z{|}~]+$" <br /><br />如果能方便的读懂，那这篇文章的目的就达到了。</font>
				</div>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1087.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:15 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1087.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP追踪用户在线人数和位置的简单思路</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1086.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:13:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1086.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1086.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1086.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1086.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1086.html</trackback:ping><description><![CDATA[
		<div class="log">
				<font face="Courier New">
						<font size="2">
								<font color="#ff0000">在开始这篇文章时,作者假设读者已能够写出一个用户的登入认证程序. <br /></font>---------------------------------------------------------- <br />记数器可完成访问 web 页的总次数,但却不能得知一个时段中访问量的动态记载,下面就来介绍如何写一个各个时段动态显示访问量的方法. <br /><br />要记载访问量,首先就要在 mysql 内建立一个数据库,姑且给这个数据库取名为 line,同时建立一个名为 line 的数据表,表内的字段分别为"用户名(name varchar(20)),时间(time datetime)".当然读者也可根据需要增加数据表的字段. <br /><br />建立好数据库后,就可以开始设计程序了,现在先理清一下思路,要想显示访问量,当然数据库就必须要有记录,我已假设读者有能力写一个用户登入程序了,所以向数据库添加纪录可在登入程序假设为 login.php 里添加: <br /><br />先给现在时间付值:$time=date('Y-m-d H:i:s'); <br />mysql_select_db(line); <br />mysql_query("insert into line (name,time) values('$name','$time')"); <br /><br />好了,现在每一位登入的用户在数据库里都有了一个记录,下面就来完成用户在线显示的程序 line.php: <br /><br /></font>
				</font>
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #008080"> 1</span>
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #000000">&lt;?</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080"> 2</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008080">mysql_connect</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">local</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">""</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">""</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 3</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008080">mysql_select_db</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">(line); <br /></span>
										<span style="COLOR: #008080"> 4</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_query</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">select * from line</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 5</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$num</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_numrows</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 6</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #000000">!</span>
										<span style="COLOR: #0000ff">empty</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$num</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">)) { <br /></span>
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;table&gt;&lt;tr&gt;&lt;td&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">现在在线人数为:$num</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   </span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;/td&gt;&lt;/tr&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">for</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">;</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #800080">$num</span>
										<span style="COLOR: #000000">;</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">++</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">){ <br /></span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$name</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_result</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">name</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;tr&gt;&lt;td&gt;用户:$name&lt;/td&gt;&lt;/tr&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">13</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080">14</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #000000">?&gt;</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">16</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
								</font>
						</font>
				</div>
				<br />
				<font face="Courier New" size="2">上面这段程序已能显示所有在线的用户人数及各用户名,当然这个程序还很不完善.如果其中一个用户登出离开后,数据库就不应该有此用户的记录所以,还得在登出程序假设为 logout.php 内加上删除功能: <br /><br />mysql_select_db(line); <br />mysql_query("delete from line where name='$name'"); <br /><br />这时一个基本的用户在线功能已经完成,接下来继续在 line.php 内增加代码使功能更加完善,首先我们得规定用户在多长时间没继续浏览 line.php 时就认为该用户已经离开,这里给定一个时间限制为 5 分钟,也就是说程序将显示从现在开始的前 5 分钟的用户情况,所以必须 line.php 内设置一个现在时间告知程序从这个时间开始执行,然后实现程序执行时把数据库内记录的时间减去现在时间大于 5 分钟的所有记录删除,这样任何用户在执行 line.php 时,都能看到 5 分钟内的所有在线的用户,完成这个功能需要以下这个数据库语句: <br /><br />delete from line where time&lt;date_sub('$time',interval 5 minute) <br /><br />但是其中还有一个问题就是如果有个用户一直在不停地执行 line.php 超过 5 分钟以上时,程序必须得分辨出该用户并一直显示该用户,在这就得利用 cookie 来实现更新数据库的时间记录了,因为是登入认证的,所以会有个 cookie 来记住用户的资料的,假设这个记录用户姓名的 cookie 变量为 $cookiename (具体的变量视 cookie 的设置而定),剩下的就很好办了,利用这个 cookie 变量完成数据库的修改: <br /><br />update line set time='$time' where name='$cookiename' <br /><br />下面来完善 line.php: <br /><br /></font>
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #008080"> 1</span>
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #000000">&lt;?</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080"> 2</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">设置现在的时间 </span>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #008080"> 3</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$time</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">date</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">Y-m-d H:i:s</span>
										<span style="COLOR: #000000">'</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 4</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008080">mysql_connect</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">local</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">""</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">""</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 5</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008080">mysql_select_db</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">(line); <br /></span>
										<span style="COLOR: #008080"> 6</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">更新用户的记录 </span>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008080">mysql_query</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">update line set time='$time' where name='$cookiename'</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080"> 9</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">删除超过 5 分钟的用户记录 </span>
								</font>
						</font>
						<span style="COLOR: #008000">
								<br />
						</span>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #008000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #008080">mysql_query</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">delete from line where time&lt;date_sub('$time',interval 5 minute)</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">12</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">13</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_query</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">select * from line</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$num</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_numrows</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #000000">!</span>
										<span style="COLOR: #0000ff">empty</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$num</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">)) { <br /></span>
										<span style="COLOR: #008080">16</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;table&gt;&lt;tr&gt;&lt;td&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">17</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">现在在线人数为:$num</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">18</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;/td&gt;&lt;/tr&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">19</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">for</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">;</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #800080">$num</span>
										<span style="COLOR: #000000">;</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">++</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">){ <br /></span>
										<span style="COLOR: #008080">20</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #800080">$name</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #008080">mysql_result</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$result</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">name</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">); <br /></span>
										<span style="COLOR: #008080">21</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">echo</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;tr&gt;&lt;td&gt;用户:$name&lt;/td&gt;&lt;/tr&gt;</span>
										<span style="COLOR: #000000">"</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">; <br /></span>
										<span style="COLOR: #008080">22</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080">23</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />} <br /></span>
										<span style="COLOR: #008080">24</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #000000">?&gt;</span>
								</font>
						</font>
						<font face="Courier New">
								<font size="2">
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">25</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
								</font>
						</font>
				</div>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1086.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:13 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1086.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MySql日期和时间函数介绍和简单实例</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1085.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:09:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1085.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1085.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1085.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1085.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1085.html</trackback:ping><description><![CDATA[
		<div class="log">
				<p>
						<font face="Verdana">这里是一个使用日期函数的例子。下面的查询选择了所有记录，其date_col的值是在最后30天以内：  <br /><br />mysql&gt; SELECT something FROM table  <br />WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) &lt;= 30;  <br /><br />DAYOFWEEK(date)  <br />返回日期date的星期索引(1=星期天，2=星期一, ……7=星期六)。这些索引值对应于ODBC标准。  <br />mysql&gt; select DAYOFWEEK('1998-02-03');  <br />-&gt; 3  <br /><br />WEEKDAY(date)  <br />返回date的星期索引(0=星期一，1=星期二, ……6= 星期天)。  <br />mysql&gt; select WEEKDAY('1997-10-04 22:23:00');  <br />-&gt; 5  <br />mysql&gt; select WEEKDAY('1997-11-05');  <br />-&gt; 2  <br /><br />DAYOFMONTH(date)  <br />返回date的月份中日期，在1到31范围内。  <br />mysql&gt; select DAYOFMONTH('1998-02-03');  <br />-&gt; 3  <br /><br />DAYOFYEAR(date)  <br />返回date在一年中的日数, 在1到366范围内。  <br />mysql&gt; select DAYOFYEAR('1998-02-03');  <br />-&gt; 34  <br /><br />MONTH(date)  <br />返回date的月份，范围1到12。  <br />mysql&gt; select MONTH('1998-02-03');  <br />-&gt; 2  <br /><br />DAYNAME(date)  <br />返回date的星期名字。  <br />mysql&gt; select DAYNAME("1998-02-05");  <br />-&gt; 'Thursday'  <br /><br />MONTHNAME(date)  <br />返回date的月份名字。  <br />mysql&gt; select MONTHNAME("1998-02-05");  <br />-&gt; 'February'  <br /><br />QUARTER(date)  <br />返回date一年中的季度，范围1到4。  <br />mysql&gt; select QUARTER('98-04-01');  <br />-&gt; 2  <br /><br />WEEK(date)  <br />　  <br />WEEK(date,first)  <br />对于星期天是一周的第一天的地方，有一个单个参数，返回date的周数，范围在0到52。2个参数形式WEEK()允许 <br />你指定星期是否开始于星期天或星期一。如果第二个参数是0，星期从星期天开始，如果第二个参数是1， <br />从星期一开始。  <br />mysql&gt; select WEEK('1998-02-20');  <br />-&gt; 7  <br />mysql&gt; select WEEK('1998-02-20',0);  <br />-&gt; 7  <br />mysql&gt; select WEEK('1998-02-20',1);  <br />-&gt; 8  <br /><br />YEAR(date)  <br />返回date的年份，范围在1000到9999。  <br />mysql&gt; select YEAR('98-02-03');  <br />-&gt; 1998  <br /><br />HOUR(time)  <br />返回time的小时，范围是0到23。  <br />mysql&gt; select HOUR('10:05:03');  <br />-&gt; 10  <br /><br />MINUTE(time)  <br />返回time的分钟，范围是0到59。  <br />mysql&gt; select MINUTE('98-02-03 10:05:03');  <br />-&gt; 5  <br /><br />SECOND(time)  <br />回来time的秒数，范围是0到59。  <br />mysql&gt; select SECOND('10:05:03');  <br />-&gt; 3  <br /><br />PERIOD_ADD(P,N)  <br />增加N个月到阶段P（以格式YYMM或YYYYMM)。以格式YYYYMM返回值。注意阶段参数P不是日期值。  <br />mysql&gt; select PERIOD_ADD(9801,2);  <br />-&gt; 199803  <br /><br />PERIOD_DIFF(P1,P2)  <br />返回在时期P1和P2之间月数，P1和P2应该以格式YYMM或YYYYMM。注意，时期参数P1和P2不是日期值。  <br />mysql&gt; select PERIOD_DIFF(9802,199703);  <br />-&gt; 11  <br /><br />DATE_ADD(date,INTERVAL expr type)  <br />　  <br />DATE_SUB </font>
						<font face="Verdana">(date,INTERVAL expr type)  <br />　  <br />ADDDATE(date,INTERVAL expr type)  <br />　  <br />SUBDATE(date,INTERVAL expr type)  </font>
				</p>
				<p>
						<br />
						<font face="Verdana">这些功能执行日期运算。对于MySQL 3.22，他们是新的。ADDDATE()和SUBDATE()是DATE_ADD()和DATE_SUB </font>
						<font face="Verdana">()的同义词。 <br />在MySQL 3.23中，你可以使用+和-而不是DATE_ADD()和DATE_SUB </font>
						<font face="Verdana">()。（见例子）date是一个指定开始日期的 <br />DATETIME或DATE值，expr是指定加到开始日期或从开始日期减去的间隔值一个表达式，expr是一个字符串；它可以以 <br />一个“-”开始表示负间隔。type是一个关键词，指明表达式应该如何被解释。EXTRACT(type FROM date)函数从日期 <br />中返回“type”间隔。下表显示了type和expr参数怎样被关联： type值 含义 期望的expr格式  <br />SECOND 秒 SECONDS  <br />MINUTE 分钟 MINUTES  <br />HOUR 时间 HOURS  <br />DAY 天 DAYS  <br />MONTH 月 MONTHS  <br />YEAR 年 YEARS  <br />MINUTE_SECOND 分钟和秒 "MINUTES:SECONDS"  <br />HOUR_MINUTE 小时和分钟 "HOURS:MINUTES"  <br />DAY_HOUR 天和小时 "DAYS HOURS"  <br />YEAR_MONTH 年和月 "YEARS-MONTHS"  <br />HOUR_SECOND 小时, 分钟， "HOURS:MINUTES:SECONDS"  <br />DAY_MINUTE 天, 小时, 分钟 "DAYS HOURS:MINUTES"  <br />DAY_SECOND 天, 小时, 分钟, 秒 "DAYS HOURS:MINUTES:SECONDS"  <br /><br />MySQL在expr格式中允许任何标点分隔符。表示显示的是建议的分隔符。如果date参数是一个DATE值并且你的计算仅仅 <br />包含YEAR、MONTH和DAY部分(即，没有时间部分)，结果是一个DATE值。否则结果是一个DATETIME值。  <br /><br />mysql&gt; SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;  <br />-&gt; 1998-01-01 00:00:00  <br />mysql&gt; SELECT INTERVAL 1 DAY + "1997-12-31";  <br />-&gt; 1998-01-01  <br />mysql&gt; SELECT "1998-01-01" - INTERVAL 1 SECOND;  <br />-&gt; 1997-12-31 23:59:59  <br />mysql&gt; SELECT DATE_ADD("1997-12-31 23:59:59",  <br />INTERVAL 1 SECOND);  <br />-&gt; 1998-01-01 00:00:00  <br />mysql&gt; SELECT DATE_ADD("1997-12-31 23:59:59",  <br />INTERVAL 1 DAY);  <br />-&gt; 1998-01-01 23:59:59  <br />mysql&gt; SELECT DATE_ADD("1997-12-31 23:59:59",  <br />INTERVAL "1:1" MINUTE_SECOND);  <br />-&gt; 1998-01-01 00:01:00  <br />mysql&gt; SELECT DATE_SUB </font>
						<font face="Verdana">("1998-01-01 00:00:00",  <br />INTERVAL "1 1:1:1" DAY_SECOND);  <br />-&gt; 1997-12-30 22:58:59  <br />mysql&gt; SELECT DATE_ADD("1998-01-01 00:00:00",  <br />INTERVAL "-1 10" DAY_HOUR);  <br />-&gt; 1997-12-30 14:00:00  <br />mysql&gt; SELECT <font style="BACKGROUND-COLOR: #ffffff">DATE_SUB</font>("1998-01-02", INTERVAL 31 DAY);  <br />-&gt; 1997-12-02  <br />mysql&gt; SELECT EXTRACT(YEAR FROM "1999-07-02");  <br />-&gt; 1999  <br />mysql&gt; SELECT EXTRACT(YEAR_MONTH FROM "1999-07-02 01:02:03");  <br />-&gt; 199907  <br />mysql&gt; SELECT EXTRACT(DAY_MINUTE FROM "1999-07-02 01:02:03");  <br />-&gt; 20102  <br /><br />如果你指定太短的间隔值(不包括type关键词期望的间隔部分)，MySQL假设你省掉了间隔值的最左面部分。例如， <br />如果你指定一个type是DAY_SECOND，值expr被希望有天、小时、分钟和秒部分。如果你象"1:10"这样指定值， <br />MySQL假设日子和小时部分是丢失的并且值代表分钟和秒。换句话说，"1:10" DAY_SECOND以它等价于"1:10" MINUTE_SECOND <br />的方式解释，这对那MySQL解释TIME值表示经过的时间而非作为一天的时间的方式有二义性。如果你使用确实不正确的日期， <br />结果是NULL。如果你增加MONTH、YEAR_MONTH或YEAR并且结果日期大于新月份的最大值天数，日子在新月用最大的天调整。  <br /><br />mysql&gt; select DATE_ADD('1998-01-30', Interval 1 month);  <br />-&gt; 1998-02-28  <br /><br />注意，从前面的例子中词INTERVAL和type关键词不是区分大小写的。  <br />TO_DAYS(date)  <br />给出一个日期date，返回一个天数(从0年的天数)。  <br />mysql&gt; select TO_DAYS(950501);  <br />-&gt; 728779  <br />mysql&gt; select TO_DAYS('1997-10-07');  <br />-&gt; 729669  <br /><br />TO_DAYS()不打算用于使用格列高里历(1582)出现前的值。  <br /><br />FROM_DAYS(N)  <br />给出一个天数N，返回一个DATE值。  <br />mysql&gt; select FROM_DAYS(729669);  <br />-&gt; '1997-10-07'  <br /><br />TO_DAYS()不打算用于使用格列高里历(1582)出现前的值。  <br /><br />DATE_FORMAT(date,format)  <br />根据format字符串格式化date值。下列修饰符可以被用在format字符串中： %M 月名字(January……December)  <br />%W 星期名字(Sunday……Saturday)  <br />%D 有英语前缀的月份的日期(1st, 2nd, 3rd, 等等。）  <br />%Y 年, 数字, 4 位  <br />%y 年, 数字, 2 位  <br />%a 缩写的星期名字(Sun……Sat)  <br />%d 月份中的天数, 数字(00……31)  <br />%e 月份中的天数, 数字(0……31)  <br />%m 月, 数字(01……12)  <br />%c 月, 数字(1……12)  <br />%b 缩写的月份名字(Jan……Dec)  <br />%j 一年中的天数(001……366)  <br />%H 小时(00……23)  <br />%k 小时(0……23)  <br />%h 小时(01……12)  <br />%I 小时(01……12)  <br />%l 小时(1……12)  <br />%i 分钟, 数字(00……59)  <br />%r 时间,12 小时(hh:mm:ss [AP]M)  <br />%T 时间,24 小时(hh:mm:ss)  <br />%S 秒(00……59)  <br />%s 秒(00……59)  <br />%p AM或PM  <br />%w 一个星期中的天数(0=Sunday ……6=Saturday ）  <br />%U 星期(0……52), 这里星期天是星期的第一天  <br />%u 星期(0……52), 这里星期一是星期的第一天  <br />%% 一个文字“%”。  <br /><br />所有的其他字符不做解释被复制到结果中。  <br /><br />mysql&gt; select DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y');  <br />-&gt; 'Saturday October 1997'  <br />mysql&gt; select DATE_FORMAT('1997-10-04 22:23:00', '%H:%i:%s');  <br />-&gt; '22:23:00'  <br />mysql&gt; select DATE_FORMAT('1997-10-04 22:23:00',  <br />'%D %y %a %d %m %b %j');  <br />-&gt; '4th 97 Sat 04 10 Oct 277'  <br />mysql&gt; select DATE_FORMAT('1997-10-04 22:23:00',  <br />'%H %k %I %r %T %S %w');  <br />-&gt; '22 22 10 10:23:00 PM 22:23:00 00 6'  <br />MySQL3.23中，在格式修饰符字符前需要%。在MySQL更早的版本中，%是可选的。  <br /><br />TIME_FORMAT(time,format)  <br />这象上面的DATE_FORMAT()函数一样使用，但是format字符串只能包含处理小时、分钟和秒的那些格式修饰符。 <br />其他修饰符产生一个NULL值或0。  <br />CURDATE()  <br />　  <br />CURRENT_DATE  <br />以'YYYY-MM-DD'或YYYYMMDD格式返回今天日期值，取决于函数是在一个字符串还是数字上下文被使用。  <br />mysql&gt; select CURDATE();  <br />-&gt; '1997-12-15'  <br />mysql&gt; select CURDATE() + 0;  <br />-&gt; 19971215  <br /><br />CURTIME()  <br />　  <br />CURRENT_TIME  <br />以'HH:MM:SS'或HHMMSS格式返回当前时间值，取决于函数是在一个字符串还是在数字的上下文被使用。  <br />mysql&gt; select CURTIME();  <br />-&gt; '23:50:26'  <br />mysql&gt; select CURTIME() + 0;  <br />-&gt; 235026  <br /><br />NOW()  <br />　  <br />SYSDATE()  <br />　  <br />CURRENT_TIMESTAMP  <br />以'YYYY-MM-DD HH:MM:SS'或YYYYMMDDHHMMSS格式返回当前的日期和时间，取决于函数是在一个字符串还是在数字的 <br />上下文被使用。  <br />mysql&gt; select NOW();  <br />-&gt; '1997-12-15 23:50:26'  <br />mysql&gt; select NOW() + 0;  <br />-&gt; 19971215235026  <br /><br />UNIX_TIMESTAMP()  <br />　  <br />UNIX_TIMESTAMP(date)  <br />如果没有参数调用，返回一个Unix时间戳记(从'1970-01-01 00:00:00'GMT开始的秒数)。如果UNIX_TIMESTAMP()用一 <br />个date参数被调用，它返回从'1970-01-01 00:00:00' GMT开始的秒数值。date可以是一个DATE字符串、一个DATETIME <br />字符串、一个TIMESTAMP或以YYMMDD或YYYYMMDD格式的本地时间的一个数字。  <br />mysql&gt; select UNIX_TIMESTAMP();  <br />-&gt; 882226357  <br />mysql&gt; select UNIX_TIMESTAMP('1997-10-04 22:23:00');  <br />-&gt; 875996580  <br /><br />当UNIX_TIMESTAMP被用于一个TIMESTAMP列，函数将直接接受值，没有隐含的“string-to-unix-timestamp”变换。  <br /><br />FROM_UNIXTIME(unix_timestamp)  <br />以'YYYY-MM-DD HH:MM:SS'或YYYYMMDDHHMMSS格式返回unix_timestamp参数所表示的值，取决于函数是在一个字符串 <br />还是或数字上下文中被使用。  <br />mysql&gt; select FROM_UNIXTIME(875996580);  <br />-&gt; '1997-10-04 22:23:00'  <br />mysql&gt; select FROM_UNIXTIME(875996580) + 0;  <br />-&gt; 19971004222300  <br /><br />FROM_UNIXTIME(unix_timestamp,format)  <br />返回表示 Unix 时间标记的一个字符串，根据format字符串格式化。format可以包含与DATE_FORMAT()函数列出的条 <br />目同样的修饰符。  <br />mysql&gt; select FROM_UNIXTIME(UNIX_TIMESTAMP(),  <br />'%Y %D %M %h:%i:%s %x');  <br />-&gt; '1997 23rd December 03:43:30 x'  <br /><br />SEC_TO_TIME(seconds)  <br />返回seconds参数，变换成小时、分钟和秒，值以'HH:MM:SS'或HHMMSS格式化，取决于函数是在一个字符串还是在数字 <br />上下文中被使用。  <br />mysql&gt; select SEC_TO_TIME(2378);  <br />-&gt; '00:39:38'  <br />mysql&gt; select SEC_TO_TIME(2378) + 0;  <br />-&gt; 3938  <br /><br />TIME_TO_SEC(time)  <br />返回time参数，转换成秒。  <br />mysql&gt; select TIME_TO_SEC('22:23:00');  <br />-&gt; 80580  <br />mysql&gt; select TIME_TO_SEC('00:39:38');  <br />-&gt; 2378 <br /></font>
				</p>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1085.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:09 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1085.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PHP实用DEBUG函数</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1084.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:06:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1084.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1084.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1084.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1084.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1084.html</trackback:ping><description><![CDATA[
		<div class="log">
				<span style="FONT-SIZE: 12px">
						<p>
								<font face="Courier New">
								</font>
						</p>
						<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
								<font face="Courier New">
										<span style="COLOR: #008080"> 1</span>
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #0000ff">function</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000"> debug()  <br /></span>
										<span style="COLOR: #008080"> 2</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{  <br /></span>
										<span style="COLOR: #008080"> 3</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #000000">!</span>
										<span style="COLOR: #008080">defined</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">DEBUG</span>
										<span style="COLOR: #000000">'</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">))  <br /></span>
										<span style="COLOR: #008080"> 4</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {  <br /></span>
										<span style="COLOR: #008080"> 5</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">return</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /></span>
										<span style="COLOR: #008080"> 6</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }  <br /></span>
										<span style="COLOR: #008080"> 7</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #800080">$args</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #008080">func_get_args</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">();  <br /></span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #800080">$msg</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #800080">$args</span>
										<span style="COLOR: #000000">[</span>
										<span style="COLOR: #000000">0</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">];  <br /></span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #008080">array_shift</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$args</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);  <br /></span>
										<span style="COLOR: #008080">11</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #800080">$extra</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #008080">implode</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #800080">$args</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);  <br /></span>
										<span style="COLOR: #008080">13</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #008080">printf</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">[debug] $msg [extra] $extra\n</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);  <br /></span>
										<span style="COLOR: #008080">15</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}  <br /></span>
										<span style="COLOR: #008080">16</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">17</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
								</font>
						</div>
						<p>
								<br />
								<font face="Courier New">debug 会显示debug信息, 当DEBUG被定义的时候. 例如:  <br />(debug will show debug information when DEBUG is defined. For example  <br /><br /></font>
						</p>
						<p>
								<font face="Courier New">
								</font>
						</p>
						<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
								<font face="Courier New">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #008080">define</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">DEBUG</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">true</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />debug(</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">the following sql will be executed</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">SELECT * FROM some_table</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">);  </span>
								</font>
						</div>
						<p>
								<br />
								<br />
								<br />
								<br />
								<font face="Courier New">结果(Result):  <br />[debug] the following sql will be executed [extra] SELECT * FROM some_table  </font>
						</p>
						<p>
								<font face="Courier New">
								</font>
						</p>
						<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
								<font face="Courier New">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #0000ff">function</span>
										<span style="COLOR: #000000"> debugn(</span>
										<span style="COLOR: #800080">$times</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">)  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #0000ff">static</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #800080">$n</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">0</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #800080">$n</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #800080">$times</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">)  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />   {  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #800080">$n</span>
										<span style="COLOR: #000000">++</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #800080">$args</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #008080">func_get_args</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">();  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #008080">array_shift</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$args</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #800080">$call</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">debug(</span>
										<span style="COLOR: #000000">'</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">foreach</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$args</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">as</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #800080">$arg</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">)  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #008080">gettype</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$arg</span>
										<span style="COLOR: #000000">) </span>
										<span style="COLOR: #000000">==</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">string</span>
										<span style="COLOR: #000000">'</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">)  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />               </span>
										<span style="COLOR: #800080">$arg</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">\</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #800080">$arg</span>
										<span style="COLOR: #000000">\</span>
										<span style="COLOR: #000000">""</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />               </span>
										<span style="COLOR: #800080">$call</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">.=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #800080">$arg</span>
										<span style="COLOR: #000000">.</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">'</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #800080">$call</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #008080">substr</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$call</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">-</span>
										<span style="COLOR: #000000">1</span>
										<span style="COLOR: #000000">)</span>
										<span style="COLOR: #000000">.</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">);</span>
										<span style="COLOR: #000000">'</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">eval</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$call</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
										<span style="COLOR: #0000ff">return</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;  <br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /></span>
								</font>
						</div>
						<p>
								<font face="Courier New">
								</font> </p>
						<p>
								<font face="Courier New">debugn用在循环中, 类似debug.  <br />(debugn used in loops, like debug.)  </font>
						</p>
						<p>
								<span style="FONT-SIZE: 12px">
										<font face="Courier New">
										</font>
								</span>
						</p>
						<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
								<font face="Courier New">
										<span style="COLOR: #008080">1</span>
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<span style="COLOR: #008080">define</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">DEBUG</span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">true</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);   <br /></span>
										<span style="COLOR: #008080">2</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">3</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
										<span style="COLOR: #0000ff">for</span>
										<span style="COLOR: #000000">(</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">; </span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">100</span>
										<span style="COLOR: #000000">; </span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000">++</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">)   <br /></span>
										<span style="COLOR: #008080">4</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{   <br /></span>
										<span style="COLOR: #008080">5</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  debugn(</span>
										<span style="COLOR: #000000">7</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">the i value currently is </span>
										<span style="COLOR: #000000">'</span>
										<span style="COLOR: #000000">.</span>
										<span style="COLOR: #800080">$i</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">);   <br /></span>
										<span style="COLOR: #008080">6</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #800080">$i</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">==</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">99</span>
										<span style="COLOR: #000000">) </span>
										<span style="COLOR: #0000ff">print</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">task over\n</span>
										<span style="COLOR: #000000">"</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">;   <br /></span>
										<span style="COLOR: #008080">7</span>
								</font>
								<font face="Courier New">
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}   <br /></span>
										<span style="COLOR: #008080">8</span>
										<span style="COLOR: #000000">
												<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										</span>
								</font>
						</div>
						<p>
								<font face="Courier New">[debug] the i value currently is 0 [extra]   <br />[debug] the i value currently is 1 [extra]   <br />[debug] the i value currently is 2 [extra]   <br />[debug] the i value currently is 3 [extra]   <br />[debug] the i value currently is 4 [extra]   <br />[debug] the i value currently is 5 [extra]   <br />[debug] the i value currently is 6 [extra]   <br />task over </font>
						</p>
				</span>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1084.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:06 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1084.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>win2003服务器II6运行PHP出现"内存位置访问无效"的解决方法</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1083.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 15:03:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1083.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1083.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1083.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1083.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1083.html</trackback:ping><description><![CDATA[
		<font face="Courier New">win2003服务器II6运行PHP出现"内存位置访问无效",解决方法很简单:在II6中新建一个应用程序池，然后设定到消耗一定内存后就回收工作进程,即可解决.</font>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1083.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 23:03 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1083.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转载]PHP实现中文验证码,附gb2312.txt下载</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/09/1082.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Mon, 09 Apr 2007 14:58:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/09/1082.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1082.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/09/1082.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1082.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1082.html</trackback:ping><description><![CDATA[
		<p align="center">
				<font face="Courier New">
						<font color="#0000ff">示例：</font>
						<img height="40" alt="" src="http://www.phpweblog.net/images/phpweblog_net/jiujun/89/o_1.gif" width="180" />
				</font>
		</p>
		<p>
				<font face="Courier New">     几个GD函数堆砌出来的玩意，只要搞定怎样把中文写到图片上就可以了，因为GD函数只接受UTF8格式编码的文字，所以在写文字前首先要进行编码转换。PHP自带的iconv和mbstring库都可以完成这项工作，但一般的虚拟主机很少支持，所以要自己写个，像这里用gb2utf8完成这项工作。当然如果你的页面就是以UTF8格式存储的，就可以省去这些额外工作。<br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Courier New">
						<span style="COLOR: #008080">  1</span>
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #000000">&lt;?</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">php<br /></span>
						<span style="COLOR: #008080">  2</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #008000">/*</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">****************************************************************<br /></span>
						<span style="COLOR: #008080">  3</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * excode.php<br /></span>
						<span style="COLOR: #008080">  4</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @author  风舞<br /></span>
						<span style="COLOR: #008080">  5</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @email   wjiujun (at) gmail.com<br /></span>
						<span style="COLOR: #008080">  6</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> * @note    一个中文附加码<br /></span>
						<span style="COLOR: #008080">  7</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> ****************************************************************</span>
						<span style="COLOR: #008000">*/</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">  8</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #800080">$RANDCODE</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #0000ff">array</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">宠</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">辱</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">不</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">惊</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">静</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">看</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">庭</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">前</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">花</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">开</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">花</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">落</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">得</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">失</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">无</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">意</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">漫</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">望</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">天</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">外</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">云</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">卷</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">云</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">舒</span>
						<span style="COLOR: #000000">'</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">  9</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #800080">$CODETABLE</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #0000ff">array</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">();<br /></span>
						<span style="COLOR: #008080"> 10</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #800080">$fp</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">fopen</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">gb2312.txt</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">r</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 11</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">while</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$line</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">fgets</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$fp</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">))<br /></span>
						<span style="COLOR: #008080"> 12</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #800080">$CODETABLE</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #008080">hexdec</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$line</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">6</span>
						<span style="COLOR: #000000">))]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$line</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">7</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">6</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 13</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #008080">fclose</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$fp</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">); <br /></span>
						<span style="COLOR: #008080"> 14</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 15</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">gb2312转utf8</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 16</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">function</span>
						<span style="COLOR: #000000"> gb2utf8(</span>
						<span style="COLOR: #800080">$gbstr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">) <br /></span>
						<span style="COLOR: #008080"> 17</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
						<span style="COLOR: #008080"> 18</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">global</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$CODETABLE</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 19</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #008080">trim</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000">""</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 20</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$gbstr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 21</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #800080">$ret</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">""</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 22</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #800080">$utf8</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">""</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 23</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">while</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 24</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
						<span style="COLOR: #008080"> 25</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #008080">ord</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">))</span>
						<span style="COLOR: #000000">&gt;</span>
						<span style="COLOR: #000000">127</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 26</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080"> 27</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
						<span style="COLOR: #800080">$thisW</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">2</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 28</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">2</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">strlen</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">));<br /></span>
						<span style="COLOR: #008080"> 29</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
						<span style="COLOR: #800080">$utf8</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">""</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 30</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            @</span>
						<span style="COLOR: #800080">$utf8</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">u2utf8(</span>
						<span style="COLOR: #008080">hexdec</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$CODETABLE</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #008080">hexdec</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #008080">bin2hex</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$thisW</span>
						<span style="COLOR: #000000">))</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">0x8080</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">]));<br /></span>
						<span style="COLOR: #008080"> 31</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$utf8</span>
						<span style="COLOR: #000000">!=</span>
						<span style="COLOR: #000000">""</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 32</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #008080">strlen</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$utf8</span>
						<span style="COLOR: #000000">);</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">+=</span>
						<span style="COLOR: #000000">3</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 33</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
						<span style="COLOR: #800080">$ret</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #008080">chr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$utf8</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">3</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">));<br /></span>
						<span style="COLOR: #008080"> 34</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080"> 35</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">else</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 36</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
						<span style="COLOR: #008080"> 37</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
						<span style="COLOR: #800080">$ret</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">1</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 38</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #008080">substr</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">strlen</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$gbstr</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">));<br /></span>
						<span style="COLOR: #008080"> 39</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
						<span style="COLOR: #008080"> 40</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
						<span style="COLOR: #008080"> 41</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$ret</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 42</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
						<span style="COLOR: #008080"> 43</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 44</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">unicode转utf8</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 45</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">function</span>
						<span style="COLOR: #000000"> u2utf8(</span>
						<span style="COLOR: #800080">$c</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 46</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
						<span style="COLOR: #008080"> 47</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">""</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 48</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">0x80</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 49</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #800080">$c</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 50</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">0x800</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 51</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
						<span style="COLOR: #008080"> 52</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0xC0</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">6</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 53</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0x80</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">0x3F</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 54</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
						<span style="COLOR: #008080"> 55</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">0x10000</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 56</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
						<span style="COLOR: #008080"> 57</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0xE0</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">12</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 58</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0x80</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">6</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">0x3F</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 59</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0x80</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">0x3F</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 60</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
						<span style="COLOR: #008080"> 61</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">elseif</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">0x200000</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 62</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
						<span style="COLOR: #008080"> 63</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0xF0</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">18</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 64</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0x80</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">12</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">0x3F</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 65</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0x80</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">6</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">0x3F</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 66</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$str</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0x80</span>
						<span style="COLOR: #000000">|</span>
						<span style="COLOR: #800080">$c</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">0x3F</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 67</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
						<span style="COLOR: #008080"> 68</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$str</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 69</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
						<span style="COLOR: #008080"> 70</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 71</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">生成附加码</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 72</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">function</span>
						<span style="COLOR: #000000"> create_excode(</span>
						<span style="COLOR: #800080">$length</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 73</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
						<span style="COLOR: #008080"> 74</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #0000ff">global</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$RANDCODE</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 75</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #008080">header</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">content-type: image/png</span>
						<span style="COLOR: #000000">"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 76</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #800080">$image_x</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #800080">$length</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">30</span>
						<span style="COLOR: #000000">;    </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">图片宽度</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 77</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$image_y</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">40</span>
						<span style="COLOR: #000000">;            </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">图片高度</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 78</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">    </span>
						<span style="COLOR: #800080">$noise_num</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">80</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #800080">$length</span>
						<span style="COLOR: #000000">;   </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">杂点数量</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 79</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">    </span>
						<span style="COLOR: #800080">$line_num</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #800080">$length</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">2</span>
						<span style="COLOR: #000000">;      </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">干扰线数量</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 80</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">imagecreate(</span>
						<span style="COLOR: #800080">$image_x</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_y</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 81</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> imagecolorallocate(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0xff</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0xff</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0xff</span>
						<span style="COLOR: #000000">);                  </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">设定背景颜色</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 82</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$rectangle_color</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">imagecolorallocate(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0xAA</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0xAA</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0xAA</span>
						<span style="COLOR: #000000">); </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">边框颜色</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 83</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$noise_color</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">imagecolorallocate(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x00</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x00</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x00</span>
						<span style="COLOR: #000000">);     </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">杂点颜色</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 84</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$font_color</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">imagecolorallocate(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x00</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x00</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x00</span>
						<span style="COLOR: #000000">);      </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">字体颜色</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 85</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #800080">$line_color</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">imagecolorallocate(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x33</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x33</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0x33</span>
						<span style="COLOR: #000000">);      </span>
						<span style="COLOR: #008000">//</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">干扰线颜色<br /></span>
						<span style="COLOR: #008080"> 86</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 87</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> //加入杂点</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 88</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #800080">$noise_num</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">++</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 89</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />  imagesetpixel(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_x</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_y</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$noise_color</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080"> 90</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 91</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> </span>
						<span style="COLOR: #800080">$font_face</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">simkai.ttf</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">;    </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">字体</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080"> 92</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">    </span>
						<span style="COLOR: #800080">$x</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">2</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 93</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #800080">$session_code</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">''</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 94</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #800080">$length</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">++</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080"> 95</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
						<span style="COLOR: #008080"> 96</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$code</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #800080">$RANDCODE</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">count</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$RANDCODE</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)];<br /></span>
						<span style="COLOR: #008080"> 97</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     imagettftext(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">18</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">6</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">6</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$x</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">29</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$font_color</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$font_face</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">gb2utf8(</span>
						<span style="COLOR: #800080">$code</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">));<br /></span>
						<span style="COLOR: #008080"> 98</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$x</span>
						<span style="COLOR: #000000">+=</span>
						<span style="COLOR: #000000">30</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 99</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #800080">$session_code</span>
						<span style="COLOR: #000000">.=</span>
						<span style="COLOR: #800080">$code</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080">100</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
						<span style="COLOR: #008080">101</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    @</span>
						<span style="COLOR: #008080">session_start</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">();<br /></span>
						<span style="COLOR: #008080">102</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #800080">$_SESSION</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">excode</span>
						<span style="COLOR: #000000">'</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #800080">$session_code</span>
						<span style="COLOR: #000000">;  </span>
						<span style="COLOR: #008000">//</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">把附加码的值放在session中<br /></span>
						<span style="COLOR: #008080">103</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080">104</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    //加入干扰线</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">105</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #800080">$line_num</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #800080">$i</span>
						<span style="COLOR: #000000">++</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">)<br /></span>
						<span style="COLOR: #008080">106</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />     imageline(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_x</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_y</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">107</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                    </span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_x</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #008080">mt_rand</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_y</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$line_color</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">108</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> imagerectangle(</span>
						<span style="COLOR: #800080">$image</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_x</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$image_y</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #800080">$rectangle_color</span>
						<span style="COLOR: #000000">);  </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">加个边框</span>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">109</span>
						<span style="COLOR: #008000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000"> imagepng(</span>
						<span style="COLOR: #800080">$image</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">110</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" /> imagedestroy(</span>
						<span style="COLOR: #800080">$image</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">111</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
						<span style="COLOR: #008080">112</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />create_excode(</span>
						<span style="COLOR: #000000">6</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">113</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #000000">?&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #008080">114</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080">115</span>
						<span style="COLOR: #000000">
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</font>
		</div>
		<br />
		<p align="center">
				<font face="Courier New"> 使用的时候直接用html语法：&lt;img src="excode.php"&gt;调用就可以了，在服务端做验证时取session存储的验证字符与用户提交的字符进行比较，相同则通过验证。<br />    注：程序用到的simkai.ttf是windows中常见的楷体，当然你也可以换成别的字体，但一定要支持中文的；gb2312.txt是gb2312和utf8的编码对照表.<br /><br /></font>
				<font face="Courier New" size="2">
						<a title="gb2312.txt下载" href="/Files/be-evil/gb2312.rar" target="_blank">gb2312.txt下载 <br /></a>
				</font>
		</p>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1082.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-09 22:58 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/09/1082.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>