<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[DZ论坛显示网站运行天数]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[Web开发]]></category>
<pubDate>Wed, 27 Aug 2008 17:58:37 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	DZ论坛需要修改Index.php和当前风格的Discuz.htm文件<br/>1。打开Index.php并且找到如下代码:<div class="code">$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;</div><br/>2。在上述代码下添加以下代码：<div class="code">//论坛运行天数代码开始<br/>$Today&nbsp;&nbsp;= mktime (0,0,0,date(&quot;m&quot;)&nbsp;&nbsp;,date(&quot;d&quot;),date(&quot;Y&quot;));<br/>$Build_Time = mktime (0,0,0,12,20,2007);//请修改后面的三个数字，分别代表你论坛运行第一天的月，日，年。<br/>$Build_days = (int)(($Today-$Build_Time)/(24*3600));//论坛运行天数代码结束</div><br/>3。打开/templates中您的风格目录中的discuz.htm，并且找到如下代码：<div class="code">&#123;lang index_today&#125;&#91;/quote&#93;<br/>4。在上述代码前面加入以下代码：&#91;quote&#93;论坛已运行 $Build_days 天, </div><br/>效果见http://bbs.jingyihome.com<br/>第二种在需要的地方添加以下代码：：<div class="code">&lt;SCRIPT language=javascript&gt;&lt;!--<br/>BirthDay=new Date(&quot;November 20,2007&quot;);//修改成你的建站时间<br/>today=new Date();<br/>timeold=(today.getTime()-BirthDay.getTime());<br/>sectimeold=timeold/1000<br/>secondsold=Math.floor(sectimeold);<br/>msPerDay=24*60*60*1000<br/>e_daysold=timeold/msPerDay<br/>daysold=Math.floor(e_daysold);<br/>document.write(&quot;本论坛已经运行了&lt;font color=red&gt;&quot;+daysold+&quot;&lt;/font&gt;天&quot;);<br/>//--&gt;<br/>&lt;/SCRIPT&gt;</div><br/>第三种在需要的地方添加以下代码<div class="code">&lt;div&gt;<br/>建站日期：2007年11月20日<br/>已建立&lt;/FONT&gt;&lt;FONT color=#3300ff&gt;<br/>&lt;SCRIPT language=JavaScript&gt;<br/>var urodz= new Date(&quot;11/20/2007&quot;);<br/>var now = new Date();<br/>var ile = now.getTime() - urodz.getTime();<br/>var dni = Math.floor(ile / (1000 * 60 * 60 * 24));<br/>document.write(+dni)<br/>&lt;/SCRIPT&gt;<br/>&lt;/FONT&gt;天<br/>&lt;/div&gt;</div><br/>Tags - <a href="http://www.zhanghaijun.com/tags/discuz/" rel="tag">discuz</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] DZ论坛显示网站运行天数]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>