<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — help me pls :(]]></title>
		<link>https://punbb.informer.com/forums/topic/15640/help-me-pls/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/15640/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in help me pls :(.]]></description>
		<lastBuildDate>Sun, 22 Apr 2007 14:22:12 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92369/#p92369</link>
			<description><![CDATA[<p>No problem <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sun, 22 Apr 2007 14:22:12 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92369/#p92369</guid>
		</item>
		<item>
			<title><![CDATA[Re: help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92368/#p92368</link>
			<description><![CDATA[<p>oh sorry</p><p>very very thank you <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (FruitCake)]]></author>
			<pubDate>Sun, 22 Apr 2007 14:20:40 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92368/#p92368</guid>
		</item>
		<item>
			<title><![CDATA[Re: help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92367/#p92367</link>
			<description><![CDATA[<p>No, you made a mistake</p><p>FIND<br /></p><div class="codebox"><pre><code>$result = $db-&gt;query(&#039;SELECT SUM(num_topics), SUM(num_posts) FROM &#039;.$db-&gt;prefix.&#039;forums&#039;) or error(&#039;Unable to fetch topic/post count&#039;, __FILE__, __LINE__, $db-&gt;error());
$result = $db-&gt;query(&#039;SELECT COUNT(id) FROM &#039;.$db-&gt;prefix.&#039;blogs&#039;) or error(&#039;Unable to fetch total user count&#039;, __FILE__, __LINE__, $db-&gt;error());
$stats[&#039;total_blogs&#039;] = $db-&gt;result($result);</code></pre></div><p>REPLACE WITH<br /></p><div class="codebox"><pre><code>$result = $db-&gt;query(&#039;SELECT SUM(num_topics), SUM(num_posts) FROM &#039;.$db-&gt;prefix.&#039;forums&#039;) or error(&#039;Unable to fetch topic/post count&#039;, __FILE__, __LINE__, $db-&gt;error());
list($stats[&#039;total_topics&#039;], $stats[&#039;total_posts&#039;]) = $db-&gt;fetch_row($result);
$result = $db-&gt;query(&#039;SELECT COUNT(id) FROM &#039;.$db-&gt;prefix.&#039;blogs&#039;) or error(&#039;Unable to fetch total user count&#039;, __FILE__, __LINE__, $db-&gt;error());
$stats[&#039;total_blogs&#039;] = $db-&gt;result($result);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sun, 22 Apr 2007 14:09:43 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92367/#p92367</guid>
		</item>
		<item>
			<title><![CDATA[Re: help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92365/#p92365</link>
			<description><![CDATA[<p>i see readme in PBB User Blogs 1.2</p><p>readme say</p><div class="codebox"><pre><code>#
#---------[ 4. OPEN ]-------------------------------------------------------
#

index.php

#
#---------[ 5. FIND (line: 158) ]-------------------------------------------------------
#

$result = $db-&gt;query(&#039;SELECT SUM(num_topics), SUM(num_posts) FROM &#039;.$db-&gt;prefix.&#039;forums&#039;) or error(&#039;Unable to fetch topic/post count&#039;, __FILE__, __LINE__, $db-&gt;error());
list($stats[&#039;total_topics&#039;], $stats[&#039;total_posts&#039;]) = $db-&gt;fetch_row($result);

#
#---------[ 6. AFTER ADD ]-------------------------------------------------
#

$result = $db-&gt;query(&#039;SELECT COUNT(id) FROM &#039;.$db-&gt;prefix.&#039;blogs&#039;) or error(&#039;Unable to fetch total user count&#039;, __FILE__, __LINE__, $db-&gt;error());
$stats[&#039;total_blogs&#039;] = $db-&gt;result($result);


#
#---------[ 7. FIND (line: 173) ]-------------------------------------------------
#

                &lt;dd&gt;&lt;?php echo $lang_index[&#039;No of posts&#039;].&#039;: &lt;strong&gt;&#039;.$stats[&#039;total_posts&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;

#
#---------[ 8. AFTER ADD ]-------------------------------------------------
#

                &lt;dd&gt;&lt;?php echo $lang_index[&#039;No of blogs&#039;].&#039;: &lt;strong&gt;&#039;.$stats[&#039;total_blogs&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;</code></pre></div><p>my index.php</p><p>add</p><div class="codebox"><pre><code>&lt;?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


define(&#039;PUN_ROOT&#039;, &#039;./&#039;);
require PUN_ROOT.&#039;include/common.php&#039;;


if ($pun_user[&#039;g_read_board&#039;] == &#039;0&#039;)
    message($lang_common[&#039;No view&#039;]);


// Load the index.php language file
require PUN_ROOT.&#039;lang/&#039;.$pun_user[&#039;language&#039;].&#039;/index.php&#039;;

$page_title = pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]);
define(&#039;PUN_ALLOW_INDEX&#039;, 1);
require PUN_ROOT.&#039;header.php&#039;;

////////////////////////////////////////////////////////////////////////////////
// THE BEGIN of PBB Chatbox 2.0 on index

$pun_config[&#039;cb_height&#039;] = &#039;150&#039;; // Height of the chatbox in px

require PUN_ROOT.&#039;include/parser.php&#039;;

// Load the chatbox.php and post.php language file
require PUN_ROOT.&#039;lang/&#039;.$pun_user[&#039;language&#039;].&#039;/chatbox.php&#039;;
require PUN_ROOT.&#039;lang/&#039;.$pun_user[&#039;language&#039;].&#039;/post.php&#039;;

// This particular function doesn&#039;t require forum-based moderator access. It can be used
// by all moderators and admins.
if (isset($_GET[&#039;get_host&#039;]))
{
    if ($pun_user[&#039;g_id&#039;] &gt; PUN_MOD)
        message($lang_common[&#039;No permission&#039;]);
    
    // Is get_host an IP address or a post ID?
    if (preg_match(&#039;/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/&#039;, $_GET[&#039;get_host&#039;]))
        $ip = $_GET[&#039;get_host&#039;];
    else {
        $get_host = intval($_GET[&#039;get_host&#039;]);
        if ($get_host &lt; 1)
            message($lang_common[&#039;Bad request&#039;]);
        
        $result = $db-&gt;query(&#039;SELECT poster_ip FROM &#039;.$db-&gt;prefix.&#039;chatbox_msg WHERE id=&#039;.$get_host) or error(&#039;Unable to fetch post IP address&#039;, __FILE__, __LINE__, $db-&gt;error());
        if (!$db-&gt;num_rows($result))
            message($lang_common[&#039;Bad request&#039;]);
    
        $ip = $db-&gt;result($result);
    }
    
    message(&#039;The IP address is: &#039;.$ip.&#039;&lt;br /&gt;The host name is: &#039;.@gethostbyaddr($ip).&#039;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;admin_users.php?show_users=&#039;.$ip.&#039;&quot;&gt;Show more users for this IP&lt;/a&gt;&#039;);
}

if ($pun_user[&#039;g_read_chatbox&#039;] != &#039;1&#039;)
    message($lang_chatbox[&#039;No Read Permission&#039;]);

?&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;include/lib/js/prototype.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;include/lib/js/chatbox.js&quot;&gt;&lt;/script&gt;
&lt;div class=&quot;block&quot;&gt;
   &lt;h2&gt;
    &lt;span&gt;
        &lt;span class=&quot;conr&quot; &gt;&lt;img style=&quot;display:none;&quot; id=&quot;loading&quot; name=&quot;loading&quot; src=&quot;img/chatbox/loading.gif&quot; /&gt;&lt;/span&gt;
    &lt;?php echo $lang_chatbox[&#039;Chatbox&#039;] ?&gt; &lt;span style=&quot;font-size:7px;vertical-align:super;&quot;&gt;© PBB ChatBox &lt;?php if ($pun_config[&#039;o_show_version&#039;] == &#039;1&#039;) echo &#039; &#039;.$pun_config[&#039;cb_pbb_version&#039;]; ?&gt;&lt;/span&gt;
    &lt;/span&gt;
  &lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div id=&quot;chatbox&quot; class=&quot;inbox&quot; style=&quot;overflow:auto;height:&lt;?php echo $pun_config[&#039;cb_height&#039;] ?&gt;px;&quot;&gt;
&lt;?php

$cur_msg_txt = &#039;&#039;;
$last_msg_time = &#039;&#039;;
$count_id = array();

$result = $db-&gt;query(&#039;SELECT u.id, u.group_id, u.num_posts_chatbox, m.id AS m_id, m.poster_id, m.poster, m.poster_ip, m.poster_email, m.message, m.posted, g.g_id, g.g_title_chatbox FROM &#039;.$db-&gt;prefix.&#039;chatbox_msg AS m INNER JOIN &#039;.$db-&gt;prefix.&#039;users AS u ON u.id=m.poster_id INNER JOIN &#039;.$db-&gt;prefix.&#039;groups AS g ON g.g_id=u.group_id ORDER BY m.posted DESC LIMIT &#039;.$pun_config[&#039;cb_max_msg&#039;]) or error(&#039;Unable to fetch messages&#039;, __FILE__, __LINE__, $db-&gt;error());

$new_msg_time = false;
while ($cur_msg = $db-&gt;fetch_assoc($result)) {
    
    // Get newest timestamp
    if ($new_msg_time == false) {
        $last_msg_time = $cur_msg[&#039;posted&#039;];
        $new_msg_time = true;
    }
    $cur_msg_txt = $pun_config[&#039;cb_space&#039;].$cur_msg[&#039;g_title_chatbox&#039;].$pun_config[&#039;cb_disposition&#039;].$cur_msg_txt;
    
    if ($cur_msg[&#039;g_id&#039;] != PUN_GUEST)
        $cur_msg_txt = str_replace(&#039;&lt;pun_username&gt;&#039;, &#039;&lt;a href=&quot;profile.php?id=&#039;.$cur_msg[&#039;id&#039;].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($cur_msg[&#039;poster&#039;]).&#039;&lt;/a&gt;&#039;, $cur_msg_txt);
    else
        $cur_msg_txt = str_replace(&#039;&lt;pun_username&gt;&#039;, pun_htmlspecialchars($cur_msg[&#039;poster&#039;]), $cur_msg_txt);
    
    $cur_msg_txt = str_replace(&#039;&lt;pun_date&gt;&#039;, format_time($cur_msg[&#039;posted&#039;]), $cur_msg_txt);
    
    if ($cur_msg[&#039;g_id&#039;] != PUN_GUEST)
        $cur_msg_txt = str_replace(&#039;&lt;pun_nbpost&gt;&#039;, $cur_msg[&#039;num_posts_chatbox&#039;], $cur_msg_txt);
    else {
        if (!isset($count_id[$cur_msg[&#039;poster&#039;]])) {
            $like_command = ($db_type == &#039;pgsql&#039;) ? &#039;ILIKE&#039; : &#039;LIKE&#039;;
        
            $count = $db-&gt;query(&#039;SELECT COUNT(id) FROM &#039;.$db-&gt;prefix.&#039;chatbox_msg WHERE poster &#039;.$like_command.&#039; \&#039;&#039;.$db-&gt;escape(str_replace(&#039;*&#039;, &#039;%&#039;, $cur_msg[&#039;poster&#039;])).&#039;\&#039;&#039;) or error(&#039;Unable to fetch user chatbox post count&#039;, __FILE__, __LINE__, $db-&gt;error());
            $num_post = $db-&gt;result($count);
            $count_id[$cur_msg[&#039;poster&#039;]] = $num_post;
        }
        else
            $num_post = $count_id[$cur_msg[&#039;poster&#039;]];
        
        $cur_msg_txt = str_replace(&#039;&lt;pun_nbpost&gt;&#039;, $num_post, $cur_msg_txt);
    }
    
    $cur_msg_txt = str_replace(&#039;&lt;pun_nbpost_txt&gt;&#039;, $lang_chatbox[&#039;Posts&#039;], $cur_msg_txt);
    
    if ($pun_user[&#039;g_id&#039;] &lt; PUN_GUEST) {
        $cur_msg_admin = &#039; [ &lt;a href=&quot;chatbox.php?get_host=&#039;.$cur_msg[&#039;m_id&#039;].&#039;&quot;&gt;&#039;.$cur_msg[&#039;poster_ip&#039;].&#039;&lt;/a&gt;&#039;;
        if ($cur_msg[&#039;poster_email&#039;])
            $cur_msg_admin .= &#039; | &lt;a href=&quot;mailto:&#039;.$cur_msg[&#039;poster_email&#039;].&#039;&quot;&gt;&#039;.$lang_common[&#039;E-mail&#039;].&#039;&lt;/a&gt; ]&#039;;
        else
            $cur_msg_admin .= &#039; ] &#039;;
    }
    else
        $cur_msg_admin = &#039;&#039;;
    
    $cur_msg_txt = str_replace(&#039;&lt;pun_admin&gt;&#039;, $cur_msg_admin, $cur_msg_txt);
    $cur_msg_txt = str_replace(&#039;&lt;pun_message&gt;&#039;, parse_message($cur_msg[&#039;message&#039;], 0), $cur_msg_txt);
}

if (!$cur_msg_txt)
    echo $lang_chatbox[&#039;No Message&#039;];
else
    echo &quot;\t\t\t&quot;.$cur_msg_txt.&quot;\n&quot;;
?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  &lt;h2&gt;
    &lt;span&gt;
    &lt;script language=&quot;javascript&quot;&gt;
    &lt;!--
    // This checkbox is utterly useless, unless we have javascript enabled. As such, we won&#039;t display it until then.
    document.write(&#039;&lt;span class=&quot;conr&quot; style=&quot;width:150px;&quot; &gt;&lt;?php echo $lang_chatbox[&#039;Autoscroll&#039;] ?&gt;: &lt;input type=&quot;checkbox&quot; id=&quot;autoscroll&quot; value=&quot;&quot; checked  tabindex=&quot;&lt;?php echo $cur_index++ ?&gt;&quot; /&gt;&lt;/span&gt;&#039;);

    // --&gt;
    &lt;/script&gt;
&lt;?php
if ($pun_user[&#039;g_post_chatbox&#039;] == &#039;1&#039;) {
    $cur_index = 1;
?&gt;
      &lt;form style=&quot;display: inline&quot; id=&quot;post&quot; method=&quot;post&quot; name=&quot;formulaire&quot; action=&quot;chatbox.php&quot; onsubmit=&quot;send_message(); return false;&quot;&gt;
         &lt;input type=&quot;hidden&quot; name=&quot;form_sent&quot; value=&quot;1&quot; /&gt;
         &lt;input type=&quot;hidden&quot; name=&quot;form_user&quot; id=&quot;form_user&quot; value=&quot;&lt;?php echo (!$pun_user[&#039;is_guest&#039;]) ? pun_htmlspecialchars($pun_user[&#039;username&#039;]) : &#039;Guest&#039;; ?&gt;&quot; /&gt;
&lt;?php
    if ($pun_user[&#039;is_guest&#039;]) {
        $email_label = ($pun_config[&#039;p_force_guest_email&#039;] == &#039;1&#039;) ? &#039;&lt;strong&gt;&#039;.$lang_common[&#039;E-mail&#039;].&#039;:&lt;/strong&gt;&#039; : $lang_common[&#039;E-mail&#039;];
        $email_form_name = ($pun_config[&#039;p_force_guest_email&#039;] == &#039;1&#039;) ? &#039;req_email&#039; : &#039;email&#039;;
        
        if($email_form_name = &#039;req_email&#039;)
            echo &quot;\t&quot;.&#039;&lt;input type=&quot;hidden&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&quot; /&gt;&#039;.&quot;\n&quot;;
        else
            echo &quot;\t&quot;.&#039;&lt;input type=&quot;hidden&quot; name=&quot;req_email&quot; id=&quot;req_email&quot; value=&quot;&quot; /&gt;&#039;.&quot;\n&quot;;
?&gt;
          &lt;strong&gt;&lt;?php echo $lang_post[&#039;Guest name&#039;] ?&gt;:&lt;/strong&gt; &lt;input type=&quot;text&quot; name=&quot;req_username&quot; id=&quot;req_username&quot; value=&quot;&lt;?php if (isset($_POST[&#039;req_username&#039;])) echo pun_htmlspecialchars($username); ?&gt;&quot; size=&quot;15&quot; maxlength=&quot;25&quot; tabindex=&quot;&lt;?php echo $cur_index++ ?&gt;&quot; /&gt; 
          &lt;?php echo $email_label ?&gt; &lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $email_form_name ?&gt;&quot; id=&quot;&lt;?php echo $email_form_name ?&gt;&quot; value=&quot;&lt;?php if (isset($_POST[$email_form_name])) echo pun_htmlspecialchars($email); ?&gt;&quot; size=&quot;15&quot; maxlength=&quot;50&quot; tabindex=&quot;&lt;?php echo $cur_index++ ?&gt;&quot; /&gt; 
&lt;?php
    }
    else {
?&gt;
          &lt;input type=&quot;hidden&quot; name=&quot;req_username&quot; id=&quot;req_username&quot; value=&quot;&quot; /&gt; 
          &lt;input type=&quot;hidden&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&quot; /&gt; 
          &lt;input type=&quot;hidden&quot; name=&quot;req_email&quot; id=&quot;req_email&quot; value=&quot;&quot; /&gt; 
&lt;?php
    }
?&gt;
         &lt;strong&gt;&lt;?php echo $lang_chatbox[&#039;Message&#039;] ?&gt;:&lt;/strong&gt; &lt;input type=&quot;text&quot; name=&quot;req_message&quot;  id=&quot;req_message&quot; value=&quot;&lt;?php if (isset($_POST[&#039;req_message&#039;])) echo pun_htmlspecialchars($message); ?&gt;&quot; size=&quot;35&quot; maxlength=&quot;&lt;?php echo $pun_config[&#039;cb_msg_maxlength&#039;] ?&gt;&quot;  tabindex=&quot;&lt;?php echo $cur_index++ ?&gt;&quot; /&gt; 
         &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php echo $lang_chatbox[&#039;Btn Send&#039;] ?&gt;&quot; accesskey=&quot;s&quot; tabindex=&quot;&lt;?php echo $cur_index++ ?&gt;&quot; /&gt;
    &lt;script language=&quot;javascript&quot;&gt;
    &lt;!--
    document.formulaire.req_message.focus();
    // --&gt;
    &lt;/script&gt;
    &lt;/form&gt;
&lt;?php
}
else
    echo $lang_chatbox[&#039;No Post Permission&#039;];
?&gt;
    &lt;/span&gt;
  &lt;/h2&gt;
&lt;/div&gt;

&lt;script language=&quot;javascript&quot;&gt;
    // Begin getting messages
    var LastMsg = &#039;&lt;?php echo $last_msg_time; ?&gt;&#039;;
    $(&#039;autoscroll&#039;).value = &#039;true&#039;;
    get_messages();
    checker = new PeriodicalExecuter(get_messages, &lt;?php echo $pun_config[&#039;cb_ajax_refresh&#039;]; ?&gt;);
&lt;/script&gt;
&lt;?php
// THE END of PBB Chatbox 2.0 on index
////////////////////////////////////////////////////////////////////////////////

// Print the categories and forums
$result = $db-&gt;query(&#039;SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM &#039;.$db-&gt;prefix.&#039;categories AS c INNER JOIN &#039;.$db-&gt;prefix.&#039;forums AS f ON c.id=f.cat_id LEFT JOIN &#039;.$db-&gt;prefix.&#039;forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=&#039;.$pun_user[&#039;g_id&#039;].&#039;) WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position&#039;, true) or error(&#039;Unable to fetch category/forum list&#039;, __FILE__, __LINE__, $db-&gt;error());

$cur_category = 0;
$cat_count = 0;
while ($cur_forum = $db-&gt;fetch_assoc($result))
{
    $moderators = &#039;&#039;;

    if ($cur_forum[&#039;cid&#039;] != $cur_category)    // A new category since last iteration?
    {
        if ($cur_category != 0)
            echo &quot;\t\t\t&quot;.&#039;&lt;/tbody&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/table&gt;&#039;.&quot;\n\t\t&quot;.&#039;&lt;/div&gt;&#039;.&quot;\n\t&quot;.&#039;&lt;/div&gt;&#039;.&quot;\n&quot;.&#039;&lt;/div&gt;&#039;.&quot;\n\n&quot;;

        ++$cat_count;

?&gt;
&lt;div id=&quot;idx&lt;?php echo $cat_count ?&gt;&quot; class=&quot;blocktable&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;?php echo pun_htmlspecialchars($cur_forum[&#039;cat_name&#039;]) ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div class=&quot;inbox&quot;&gt;
            &lt;table cellspacing=&quot;0&quot;&gt;
            &lt;thead&gt;
                &lt;tr&gt;
                    &lt;th class=&quot;tcl&quot; scope=&quot;col&quot;&gt;&lt;?php echo $lang_common[&#039;Forum&#039;] ?&gt;&lt;/th&gt;
                    &lt;th class=&quot;tc2&quot; scope=&quot;col&quot;&gt;&lt;?php echo $lang_index[&#039;Topics&#039;] ?&gt;&lt;/th&gt;
                    &lt;th class=&quot;tc3&quot; scope=&quot;col&quot;&gt;&lt;?php echo $lang_common[&#039;Posts&#039;] ?&gt;&lt;/th&gt;
                    &lt;th class=&quot;tcr&quot; scope=&quot;col&quot;&gt;&lt;?php echo $lang_common[&#039;Last post&#039;] ?&gt;&lt;/th&gt;
                &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
&lt;?php

        $cur_category = $cur_forum[&#039;cid&#039;];
    }

    $item_status = &#039;&#039;;
    $icon_text = $lang_common[&#039;Normal icon&#039;];
    $icon_type = &#039;icon&#039;;

    // Are there new posts?
    if (!$pun_user[&#039;is_guest&#039;] &amp;&amp; $cur_forum[&#039;last_post&#039;] &gt; $pun_user[&#039;last_visit&#039;])
    {
        $item_status = &#039;inew&#039;;
        $icon_text = $lang_common[&#039;New icon&#039;];
        $icon_type = &#039;icon inew&#039;;
    }

    // Is this a redirect forum?
    if ($cur_forum[&#039;redirect_url&#039;] != &#039;&#039;)
    {
        $forum_field = &#039;&lt;h3&gt;&lt;a href=&quot;&#039;.pun_htmlspecialchars($cur_forum[&#039;redirect_url&#039;]).&#039;&quot; title=&quot;&#039;.$lang_index[&#039;Link to&#039;].&#039; &#039;.pun_htmlspecialchars($cur_forum[&#039;redirect_url&#039;]).&#039;&quot;&gt;&#039;.pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]).&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;
        $num_topics = $num_posts = &#039; &#039;;
        $item_status = &#039;iredirect&#039;;
        $icon_text = $lang_common[&#039;Redirect icon&#039;];
        $icon_type = &#039;icon&#039;;
    }
    else
    {
        $forum_field = &#039;&lt;h3&gt;&lt;a href=&quot;&#039;.makeurl(&quot;f&quot;, $cur_forum[&#039;fid&#039;], $cur_forum[&#039;forum_name&#039;]).&#039;&quot;&gt;&#039;.pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]).&#039;&lt;/a&gt;&lt;div style=&quot;float:right;&quot;&gt;&lt;a href=&quot;extern.php?type=rss&amp;action=active&amp;fid=&#039;.$cur_forum[&#039;fid&#039;].&#039;&quot;&gt;&lt;img src=&quot;img/rss.png&quot; border=&quot;0&quot; height=&quot;15&quot; width=&quot;15&quot; alt=&quot;RSS&quot; align=&quot;middle&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/h3&gt;&#039;;

        $num_topics = $cur_forum[&#039;num_topics&#039;];
        $num_posts = $cur_forum[&#039;num_posts&#039;];
    }

    if ($cur_forum[&#039;forum_desc&#039;] != &#039;&#039;)
        $forum_field .= &quot;\n\t\t\t\t\t\t\t\t&quot;.$cur_forum[&#039;forum_desc&#039;];


    // If there is a last_post/last_poster.
    if ($cur_forum[&#039;last_post&#039;] != &#039;&#039;)
        $last_post = &#039;&lt;a href=&quot;&#039;.makeurl(&quot;p&quot;, $cur_forum[&#039;last_post_id&#039;], format_time($cur_forum[&#039;last_post&#039;])).&#039;#p&#039;.$cur_forum[&#039;last_post_id&#039;].&#039;&quot;&gt;&#039;.format_time($cur_forum[&#039;last_post&#039;]).&#039;&lt;/a&gt; &lt;span class=&quot;byuser&quot;&gt;&#039;.$lang_common[&#039;by&#039;].&#039; &#039;.pun_htmlspecialchars($cur_forum[&#039;last_poster&#039;]).&#039;&lt;/span&gt;&#039;;

    else
        $last_post = &#039; &#039;;

    if ($cur_forum[&#039;moderators&#039;] != &#039;&#039;)
    {
        $mods_array = unserialize($cur_forum[&#039;moderators&#039;]);
        $moderators = array();

        while (list($mod_username, $mod_id) = @each($mods_array))
            $moderators[] = &#039;&lt;a href=&quot;profile.php?id=&#039;.$mod_id.&#039;&quot;&gt;&#039;.pun_htmlspecialchars($mod_username).&#039;&lt;/a&gt;&#039;;

        $moderators = &quot;\t\t\t\t\t\t\t\t&quot;.&#039;&lt;p&gt;&lt;em&gt;(&#039;.$lang_common[&#039;Moderated by&#039;].&#039;&lt;/em&gt; &#039;.implode(&#039;, &#039;, $moderators).&#039;)&lt;/p&gt;&#039;.&quot;\n&quot;;
    }

?&gt;
                 &lt;tr&lt;?php if ($item_status != &#039;&#039;) echo &#039; class=&quot;&#039;.$item_status.&#039;&quot;&#039;; ?&gt;&gt;
                    &lt;td class=&quot;tcl&quot;&gt;
                        &lt;div class=&quot;intd&quot;&gt;
                            &lt;div class=&quot;&lt;?php echo $icon_type ?&gt;&quot;&gt;&lt;div class=&quot;nosize&quot;&gt;&lt;?php echo $icon_text ?&gt;&lt;/div&gt;&lt;/div&gt;
                            &lt;div class=&quot;tclcon&quot;&gt;
                                &lt;?php echo $forum_field.&quot;\n&quot;.$moderators ?&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/td&gt;
                    &lt;td class=&quot;tc2&quot;&gt;&lt;?php echo $num_topics ?&gt;&lt;/td&gt;
                    &lt;td class=&quot;tc3&quot;&gt;&lt;?php echo $num_posts ?&gt;&lt;/td&gt;
                    &lt;td class=&quot;tcr&quot;&gt;&lt;?php echo $last_post ?&gt;&lt;/td&gt;
                &lt;/tr&gt;
&lt;?php

}

// Did we output any categories and forums?
if ($cur_category &gt; 0)
    echo &quot;\t\t\t&quot;.&#039;&lt;/tbody&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/table&gt;&#039;.&quot;\n\t\t&quot;.&#039;&lt;/div&gt;&#039;.&quot;\n\t&quot;.&#039;&lt;/div&gt;&#039;.&quot;\n&quot;.&#039;&lt;/div&gt;&#039;.&quot;\n\n&quot;;
else
    echo &#039;&lt;div id=&quot;idx0&quot; class=&quot;block&quot;&gt;&lt;div class=&quot;box&quot;&gt;&lt;div class=&quot;inbox&quot;&gt;&lt;p&gt;&#039;.$lang_index[&#039;Empty board&#039;].&#039;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&#039;;


// Collect some statistics from the database
$result = $db-&gt;query(&#039;SELECT COUNT(id)-1 FROM &#039;.$db-&gt;prefix.&#039;users&#039;) or error(&#039;Unable to fetch total user count&#039;, __FILE__, __LINE__, $db-&gt;error());
$stats[&#039;total_users&#039;] = $db-&gt;result($result);

$result = $db-&gt;query(&#039;SELECT id, username FROM &#039;.$db-&gt;prefix.&#039;users ORDER BY registered DESC LIMIT 1&#039;) or error(&#039;Unable to fetch newest registered user&#039;, __FILE__, __LINE__, $db-&gt;error());
$stats[&#039;last_user&#039;] = $db-&gt;fetch_assoc($result);

$result = $db-&gt;query(&#039;SELECT SUM(num_topics), SUM(num_posts) FROM &#039;.$db-&gt;prefix.&#039;forums&#039;) or error(&#039;Unable to fetch topic/post count&#039;, __FILE__, __LINE__, $db-&gt;error());
$result = $db-&gt;query(&#039;SELECT COUNT(id) FROM &#039;.$db-&gt;prefix.&#039;blogs&#039;) or error(&#039;Unable to fetch total user count&#039;, __FILE__, __LINE__, $db-&gt;error());
$stats[&#039;total_blogs&#039;] = $db-&gt;result($result);
list($stats[&#039;total_topics&#039;], $stats[&#039;total_posts&#039;]) = $db-&gt;fetch_row($result);

?&gt;

&lt;pun_include &quot;ajax_extern.php&quot;&gt;

&lt;div id=&quot;announce&quot; class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;b&gt;Top 20 most active users&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div class=&quot;inbox&quot;&gt;
            &lt;div&gt;
&lt;?php
 
$result = $db-&gt;query(&#039;SELECT id, username, num_posts FROM &#039;.$db-&gt;prefix.&#039;users ORDER BY num_posts DESC LIMIT 20&#039;) or error(&#039;Unable to fetch user data&#039;, __FILE__, __LINE__, $db-&gt;error());
while ($data = $db-&gt;fetch_assoc($result))
{
echo &quot;\t\t\t\t\t\t&quot;.&#039;&lt;a href=&quot;profile.php?id=&#039;.$data[&#039;id&#039;].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($data[&#039;username&#039;]).&#039;&lt;/a&gt;(&#039;.$data[&#039;num_posts&#039;].&#039;) &#039;.&quot;\n&quot;;
}
 
?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;brdstats&quot; class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;?php echo $lang_index[&#039;Board info&#039;] ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div class=&quot;inbox&quot;&gt;
            &lt;dl class=&quot;conr&quot;&gt;
                &lt;dt&gt;&lt;strong&gt;&lt;?php echo $lang_index[&#039;Board stats&#039;] ?&gt;&lt;/strong&gt;&lt;/dt&gt;
                &lt;dd&gt;&lt;?php echo $lang_index[&#039;No of users&#039;].&#039;: &lt;strong&gt;&#039;. $stats[&#039;total_users&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;
                &lt;dd&gt;&lt;?php echo $lang_index[&#039;No of topics&#039;].&#039;: &lt;strong&gt;&#039;.$stats[&#039;total_topics&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;
                &lt;dd&gt;&lt;?php echo $lang_index[&#039;No of posts&#039;].&#039;: &lt;strong&gt;&#039;.$stats[&#039;total_posts&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;
                &lt;dd&gt;&lt;?php echo $lang_index[&#039;No of blogs&#039;].&#039;: &lt;strong&gt;&#039;.$stats[&#039;total_blogs&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;
                &lt;?php
                // Begin: Activity Barometer mod
                $result = $db-&gt;query(&quot;SELECT COUNT(*) FROM &quot;.$db-&gt;prefix.&quot;posts WHERE posted &gt; &quot;.(time()-7*24*3600)) or error(&#039;Unable to fetch online list&#039;, __FILE__, __LINE__, $db-&gt;error());
                $posts_week = $db-&gt;result($result);
                $result = $db-&gt;query(&quot;SELECT COUNT(*) FROM &quot;.$db-&gt;prefix.&quot;posts WHERE posted &gt; &quot;.(time()-24*3600)) or error(&#039;Unable to fetch online list&#039;, __FILE__, __LINE__, $db-&gt;error());
                $posts_day = $db-&gt;result($result);
                $posts_h = $posts_day/24;
                ?&gt;
                &lt;dd&gt;
                &lt;?php
                if ($posts_h&lt;1)
                       if ($posts_day&lt;1)
                        if ($posts_week&lt;1)
                            echo $lang_index[&#039;dormant&#039;];
                        else
                                      echo $lang_index[&#039;number week&#039;].&#039;: &lt;strong&gt;&#039;.$posts_week;
                       else
                              echo  $lang_index[&#039;number day&#039;].&#039;: &lt;strong&gt;&#039;.$posts_day;
                else
                       echo $lang_index[&#039;average h&#039;].&#039;: &lt;strong&gt;&#039;.number_format($posts_h,1);
                ?&gt;
                &lt;/strong&gt;&lt;/dd&gt;
                &lt;?php // End: Activity Barometer mod ?&gt; 
            &lt;/dl&gt;
            &lt;dl class=&quot;conl&quot;&gt;
                &lt;dt&gt;&lt;strong&gt;&lt;?php echo $lang_index[&#039;User info&#039;] ?&gt;&lt;/strong&gt;&lt;/dt&gt;
                &lt;dd&gt;&lt;?php echo $lang_index[&#039;Newest user&#039;] ?&gt;: &lt;a href=&quot;profile.php?id=&lt;?php echo $stats[&#039;last_user&#039;][&#039;id&#039;] ?&gt;&quot;&gt;&lt;?php echo pun_htmlspecialchars($stats[&#039;last_user&#039;][&#039;username&#039;]) ?&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;?php

if ($pun_config[&#039;o_users_online&#039;] == &#039;1&#039;)
{
    // Fetch users online info and generate strings for output
    $num_guests = 0;
    $users = array();
    $result = $db-&gt;query(&#039;SELECT user_id, ident, color FROM &#039;.$db-&gt;prefix.&#039;online WHERE idle=0 ORDER BY ident&#039;, true) or error(&#039;Unable to fetch online list&#039;, __FILE__, __LINE__, $db-&gt;error());

    while ($pun_user_online = $db-&gt;fetch_assoc($result))
    {
        if ($pun_user_online[&#039;user_id&#039;] &gt; 1)
            $users[] = &quot;\n\t\t\t\t&quot;.&#039;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_user_online[&#039;user_id&#039;].&#039;&quot;&gt;&lt;span style=&quot;color: &#039;.$pun_user_online[&#039;color&#039;].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($pun_user_online[&#039;ident&#039;]).&#039;&lt;/span&gt;&lt;/a&gt;&#039;;
        else
            ++$num_guests;
    }

    $num_users = count($users);
    // users on line today 
    $date = getdate(time());
    $todaystamp = mktime(0,0,0, $date[&#039;mon&#039;], $date[&#039;mday&#039;], $date[&#039;year&#039;]);

$result = $db-&gt;query(&quot;SELECT username, id, last_visit from &quot;.$db-&gt;prefix.&quot;users WHERE last_visit &gt;= &#039;&quot;.$todaystamp.&quot;&#039; ORDER by last_visit DESC&quot;) or error(&quot;Unable to find the list of the users online today&quot;, __FILE__, __LINE__, $db-&gt;error());

    $users_today = array();
    while ($pun_user_online_today = $db-&gt;fetch_assoc($result))
        $users_today[] .=  &quot;\n\t\t\t\t&quot;.&#039;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_user_online_today[&#039;id&#039;].&#039;&quot; title=&quot;Last visit of &#039;.$pun_user_online_today[&#039;username&#039;].&#039; : &#039;.format_time($pun_user_online_today[&#039;last_visit&#039;]).&#039;&quot;&gt;&#039;.$pun_user_online_today[&#039;username&#039;].&#039;&lt;/a&gt;&#039;;
        
    $num_users_today = count($users_today);
    echo &quot;\t\t\t\t&quot;.&#039;&lt;dd&gt;&#039;. $lang_index[&#039;Users online&#039;].&#039;: &lt;strong&gt;&#039;.$num_users.&#039;&lt;/strong&gt;&lt;/dd&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dd&gt;&#039;.$lang_index[&#039;Users today&#039;].&#039;: &lt;strong&gt;&#039;.$num_users_today.&#039;&lt;/strong&gt;&lt;/dd&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dd&gt;&#039;.$lang_index[&#039;Guests online&#039;].&#039;: &lt;strong&gt;&#039;.$num_guests.&#039;&lt;/strong&gt;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;


include(&#039;botdetect.php&#039;);
    $botStatus = isBotOnline();

    if ($num_users &gt; 0 || $botStatus != &#039;&#039;) {
       echo &quot;\t\t\t&quot;.&#039;&lt;dl id=&quot;onlinelist&quot; class= &quot;clearb&quot;&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dt&gt;&lt;strong&gt;&#039;.$lang_index[&#039;Online&#039;].&#039;: &lt;/strong&gt;&lt;/dt&gt;&#039;.&quot;\t\t\t\t&quot;.implode(&#039;,&lt;/dd&gt; &#039;, $users);
    if($botStatus != &#039;&#039; &amp; $num_users == 0)
        echo substr($botStatus, 1);
    else
        echo $botStatus;    

    echo &#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    }
        echo &quot;\t\t\t&quot;.&#039;&lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;&#039;.&quot;\n&quot;;

            //--- birthday begin ---/
    $today = getdate();
    $result = $db-&gt;query(&#039;SELECT username, id, YEAR(FROM_UNIXTIME(birthday)) AS year, hide_age from &#039;.$db-&gt;prefix.&#039;users WHERE DAYOFMONTH(FROM_UNIXTIME(birthday))=\&#039;&#039;.$today[&#039;mday&#039;].&#039;\&#039; AND MONTH(FROM_UNIXTIME(birthday))=\&#039;&#039;.$today[&#039;mon&#039;].&#039;\&#039; ORDER by username ASC&#039;) or error(&#039;Cannot retreive birthdays&#039;, __FILE__, __LINE__, $db-&gt;error());

    $birthdays_today = array();
    while ($row = $db-&gt;fetch_assoc($result))
        $birthdays_today[] .=  &quot;\n\t\t\t\t&quot;.&#039;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$row[&#039;id&#039;].&#039;&quot;&gt;&#039;.$row[&#039;username&#039;].&#039;&lt;/a&gt;&#039;.
        ((!$row[&#039;hide_age&#039;])?&#039;(&#039;.($today[&#039;year&#039;]-$row[&#039;year&#039;]).&#039;)&#039;:&#039;&#039;);

    if (count($birthdays_today) &gt; 0) {
        echo &quot;\t\t\t&quot;.&#039;&lt;dl id=&quot;birthdayslist&quot;&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dt&gt;&lt;strong&gt;&#039; . $lang_index[&#039;Birthday Today&#039;] . &#039;: &lt;/strong&gt;&lt;/dt&gt;&#039;;
        echo implode(&#039;,&lt;/dd&gt; &#039;, $birthdays_today) . &#039;&lt;/dd&gt;&#039; . &quot;\n\t\t\t&quot; . &#039;&lt;/dl&gt;&#039; . &quot;\n&quot;;
    }
    //--- birthday end ---/

    // list users on line today
    echo &quot;\t\t\t&quot;.&#039;&lt;dl id=&quot;onlinetodaylist&quot;&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dt&gt;&lt;strong&gt;&#039;.$lang_index[&#039;Online today&#039;].&#039;: &lt;/strong&gt;&lt;/dt&gt;&#039;;
                
    if ($num_users_today &gt; 0) 
        echo implode(&#039;,&lt;/dd&gt; &#039;, $users_today).&#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    else
        echo &#039;&lt;dd&gt;&lt;em&gt;&lt;/em&gt;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;

}
else
    echo &quot;\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;&#039;.&quot;\n&quot;;


?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;?php

$footer_style = &#039;index&#039;;
require PUN_ROOT.&#039;footer.php&#039;;</code></pre></div><p>I see it correctly</p><p>pls help me</p>]]></description>
			<author><![CDATA[null@example.com (FruitCake)]]></author>
			<pubDate>Sun, 22 Apr 2007 14:04:31 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92365/#p92365</guid>
		</item>
		<item>
			<title><![CDATA[Re: help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92358/#p92358</link>
			<description><![CDATA[<p>When you install a mod, there&#039;s a file with instructions that you follow. If the mod isn&#039;t working right, chances are you didn&#039;t follow the instructions correctly.</p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sun, 22 Apr 2007 13:44:15 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92358/#p92358</guid>
		</item>
		<item>
			<title><![CDATA[Re: help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92357/#p92357</link>
			<description><![CDATA[<p>what readme mod i check ?</p><p>sorry my bad english</p>]]></description>
			<author><![CDATA[null@example.com (FruitCake)]]></author>
			<pubDate>Sun, 22 Apr 2007 13:42:47 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92357/#p92357</guid>
		</item>
		<item>
			<title><![CDATA[Re: help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92351/#p92351</link>
			<description><![CDATA[<p>Moved to Modifications<br />It sounds to me like you need to check the readme for the mod</p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sun, 22 Apr 2007 13:33:19 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92351/#p92351</guid>
		</item>
		<item>
			<title><![CDATA[help me pls :(]]></title>
			<link>https://punbb.informer.com/forums/post/92348/#p92348</link>
			<description><![CDATA[<p>my forum show this</p><p>Total number of registered users: 529<br />Total number of topics:<br />Total number of posts:<br />Total number of user blogs: 2<br />Average posts per hour: 1.3</p><br /><p>why Total number of topics: and Total number of posts: not show</p><p>pls help me T^T</p>]]></description>
			<author><![CDATA[null@example.com (FruitCake)]]></author>
			<pubDate>Sun, 22 Apr 2007 13:30:02 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92348/#p92348</guid>
		</item>
	</channel>
</rss>
