<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[مەکۆکانی وێبچن - رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
	<link rel="self" href="https://www.webchin.org/Meko/extern.php?action=feed&amp;tid=28303&amp;type=atom" />
	<updated>2012-10-03T11:59:10Z</updated>
	<generator>PunBB</generator>
	<id>https://www.webchin.org/Meko/viewtopic.php?id=28303</id>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=226411#p226411" />
			<content type="html"><![CDATA[<p>به ريزم زانياريه كانم نارد بزانه كيشه ى جيه زؤر سوباست ئه كه م</p>]]></content>
			<author>
				<name><![CDATA[ديارى d]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=22236</uri>
			</author>
			<updated>2012-10-03T11:59:10Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=226411#p226411</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=226226#p226226" />
			<content type="html"><![CDATA[<p>زانیاری FTPـم بۆ بنێرە بە پەیامی تایبەتی.</p>]]></content>
			<author>
				<name><![CDATA[گه‌یلان]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=2438</uri>
			</author>
			<updated>2012-09-28T12:19:11Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=226226#p226226</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=226223#p226223" />
			<content type="html"><![CDATA[<p>وه لا برام كه بارى ده كه م يانه كه م ناكريته وه ئه مه بيشان ئه دات نازانم كيشه كه له كودايه </p><p><span class="postimg"><img src="http://webchinupload.com/O72d4/1238826919-9-28-2012%2011-15-00%20AM.jpg" alt="http://webchinupload.com/O72d4/1238826919-9-28-2012%2011-15-00%20AM.jpg" /></span></p>]]></content>
			<author>
				<name><![CDATA[ديارى d]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=22236</uri>
			</author>
			<updated>2012-09-28T08:18:22Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=226223#p226223</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=226221#p226221" />
			<content type="html"><![CDATA[<p>ئەو کۆدانەی خوارەوە لە شوێنی ئەوانەی خۆت تاقی بکەوە،<br /></p><div class="codebox"><pre><code data-language=php>&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;;
require PUN_ROOT.&#039;lang/&#039;.$pun_user[&#039;language&#039;].&#039;/birthday.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;;
################################################################################
########################### Sub Forum MOD (start) ##############################
################################################################################
$sfcount=0;
$sfdb = array($_parent_id_, $_topics_, $_posts_, $_last_post_id_, $_last_poster_, $_last_post_);
//$forums_info = $db-&gt;query(&#039;SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, id, forum_name FROM &#039;.$db-&gt;prefix.&#039;forums ORDER BY disp_position&#039;) or error(implode($db-&gt;error(),&#039;&#039;),__FILE__,__LINE__,$db-&gt;error());

$forums_info = $db-&gt;query(&#039;SELECT f.num_topics, f.num_posts, f.parent_forum_id, f.last_post_id, f.last_poster, f.last_post, f.id, f.forum_name, p.poster_id as last_poster_id, t.subject FROM &#039;.$db-&gt;prefix.&#039;forums AS f LEFT JOIN &#039;.$db-&gt;prefix.&#039;posts AS p ON (p.id=f.last_post_id) LEFT JOIN &#039;.$db-&gt;prefix.&#039;topics AS t ON t.last_post_id=f.last_post_id ORDER BY disp_position&#039;) or error(implode($db-&gt;error(),&#039;&#039;),__FILE__,__LINE__,$db-&gt;error());
while($current = $db-&gt;fetch_assoc($forums_info)) {
 if ($current[&#039;parent_forum_id&#039;] != 0)
  {
   $sfdb[$sfcount][0] = $current[&#039;parent_forum_id&#039;];
   $sfdb[$sfcount][1] = $current[&#039;num_topics&#039;];
   $sfdb[$sfcount][2] = $current[&#039;num_posts&#039;];
   $sfdb[$sfcount][3] = $current[&#039;last_post_id&#039;];
   $sfdb[$sfcount][4] = $current[&#039;last_poster&#039;];
   $sfdb[$sfcount][5] = $current[&#039;last_post&#039;];
   $sfdb[$sfcount][6] = $current[&#039;id&#039;];
   $sfdb[$sfcount][7] = $current[&#039;forum_name&#039;];
   $sfdb[$sfcount][8] = $current[&#039;last_poster_id&#039;];
   $sfdb[$sfcount][9] = $current[&#039;subject&#039;];

   $sfcount++;
  }
}
################################################################################
########################### Sub Forum MOD ( end ) ##############################
################################################################################
require PUN_ROOT.&#039;include/mod_topicpreview.php&#039;;
    mtp_showactopic();    // Mod Topic Preview with Active Topic Lite

// 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, f.parent_forum_id, p.poster_id as last_poster_id, t.subject 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;topics AS t ON t.last_post_id=f.last_post_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;) LEFT JOIN &#039;.$db-&gt;prefix.&#039;posts AS p ON (p.id=f.last_post_id) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND (f.parent_forum_id IS NULL OR f.parent_forum_id=0) 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;&amp;nbsp;&#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;viewforum.php?id=&#039;.$cur_forum[&#039;fid&#039;].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]).&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;
        ################################################################################
########################### Sub Forum MOD (start) ##############################
################################################################################
  $n_t = 0;
  $n_p = 0;
  $l_pid = $cur_forum[&#039;last_post_id&#039;];
  $l_pr = $cur_forum[&#039;last_poster&#039;];
  $l_pr_id = $cur_forum[&#039;last_poster_id&#039;];
  $l_pr_su = $cur_forum[&#039;subject&#039;];
  $l_post = $cur_forum[&#039;last_post&#039;];
  for ($i = 0; $i &lt; $sfcount; $i++)
  {
   if ($sfdb[$i][0] == $cur_forum[&#039;fid&#039;])
    {
     $n_t = $n_t + $sfdb[$i][1];
     $n_p = $n_p + $sfdb[$i][2];
     if ($l_pid &lt; $sfdb[$i][3])
      {
       $l_pid = $sfdb[$i][3];
       $l_pr = $sfdb[$i][4];
     $l_pr_id = $sfdb[$i][8];
       $l_post = $sfdb[$i][5];
       $l_pr_su = $sfdb[$i][9];
      }
    }
  }
  $num_topics = $n_t + $cur_forum[&#039;num_topics&#039;];
  $num_posts = $n_p + $cur_forum[&#039;num_posts&#039;];
################################################################################
########################### Sub Forum MOD ( end ) ##############################
################################################################################
    }

    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;];


    // Display the last topic
    $idm = $cur_forum[&#039;subject&#039;];
    if(strlen($idm) &gt; 300000) {
        $idmComp = str_replace(&#039;&quot;&#039;, &quot;&#039;&#039;&quot;, $idm);
        $idm = substr($idm, 0, 300000).&#039;...&#039;;
    } else
        $idmComp = &#039;&#039;;
 
    // If there is a last_post/last_poster.
    if ($cur_forum[&#039;last_post&#039;] != &#039;&#039;) {
        $idmT = (isset($idmComp)) ? &#039; title=&quot;&#039;.$idmComp.&#039;&quot;&#039; : &#039;&#039;;
        $last_post = format_time($cur_forum[&#039;last_post&#039;]).&#039;&lt;br /&gt;&amp;#1576;&amp;#1600;&amp;#1575;&amp;#1576;&amp;#1600;&amp;#1607;&amp;#8204;&amp;#1578; &lt;a href=&quot;viewtopic.php?pid=&#039;.$cur_forum[&#039;last_post_id&#039;].&#039;#p&#039;.$cur_forum[&#039;last_post_id&#039;].&#039;&quot;&#039;.$idmT.&#039;&gt;&lt;em&gt;&#039;.$idm.&#039;&lt;/em&gt;&lt;/a&gt;&lt;br /&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;&amp;nbsp;&#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;&lt;span class=&quot;byuser&quot;&gt;&#039;.pun_htmlspecialchars($mod_username).&#039;&lt;/span&gt;&lt;/a&gt;&#039;;

        $moderators = &quot;\t\t\t\t\t\t\t\t&quot;.&#039;&lt;br /&gt;&lt;span class=&quot;moderator&quot;&gt;[&lt;span class=&quot;mod_by&quot;&gt;&#039;.$lang_common[&#039;Moderated by&#039;].&#039;:&lt;/span&gt; &#039;.implode(&#039;, &#039;, $moderators).&#039;]&lt;/span&gt;&#039;.&quot;\n&quot;;
    }
if (!empty($sfdb))
            {
                foreach ($sfdb as $sub_forums)
                {
                    if ($cur_forum[&#039;fid&#039;] == $sub_forums[0] &amp;&amp; !$pun_user[&#039;is_guest&#039;] &amp;&amp; $sub_forums[5] &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;;
                    }
                }
            }

?&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;?php
                        $sub_forums_list = array();
                        if(!empty($sfdb)) {
                           foreach ($sfdb as $sub_forums) {
                                 if($cur_forum[&#039;fid&#039;] == $sub_forums[0]) {
                                    $sub_forums_list[] = &#039;&lt;a class=&quot;subforum_name&quot; href=&quot;viewforum.php?id=&#039;.$sub_forums[6].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($sub_forums[7]).&#039;&lt;/a&gt;&#039;;
                                 }
                             }
                           // EDIT THIS FOR THE DISPLAY STYLE OF THE SUBFORUMS ON MAIN PAGE
                           if(!empty($sub_forums_list)) {
                                 // Leave one $sub_forums_list commented out to use the other (between the ###..)
                                 ################################
                                 // This is Single Line Wrap Style
                                 $sub_forums_list = &quot;\t\t\t\t\t\t\t\t&quot;.&#039;&lt;span class=&quot;subforum&quot;&gt;&#039;.$lang_common[&#039;Sub Forums&#039;].&#039;:&lt;/span&gt; &#039;.implode(&#039;, &#039;, $sub_forums_list).&quot;\n&quot;;
                                 // This is List Style
                                 //$sub_forums_list = &quot;\n&quot;.&#039;&lt;b&gt;&lt;em&gt;Sub Forums:&lt;/em&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp; -- &amp;nbsp;&#039;.implode(&#039;&lt;br /&gt;&amp;nbsp; -- &amp;nbsp;&#039;, $sub_forums_list).&quot;\n&quot;;
                                 ################################
                                 if ($cur_forum[&#039;forum_desc&#039;] != NULL) {
                                    echo &quot;&lt;br /&gt;&quot;;
                                 }
                                 // TO TURN OFF DISPLAY OF SUBFORUMS ON INDEX PAGE, COMMENT OUT THE FOLLOWING LINE
                                 echo &quot;$sub_forums_list&quot;;
                           }
                        }
?&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());
list($stats[&#039;total_topics&#039;], $stats[&#039;total_posts&#039;]) = $db-&gt;fetch_row($result);

?&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;?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 day&#039;].&#039;: &lt;strong&gt;&#039;.$posts_day;
                       else
                              echo  $lang_index[&#039;number day&#039;].&#039;: &lt;strong&gt;&#039;.$posts_day;
                else
                       echo $lang_index[&#039;number day&#039;].&#039;: &lt;strong&gt;&#039;.number_format($posts_day);
                ?&gt;
                &lt;/strong&gt;&lt;/dd&gt;
                &lt;?php // End: Activity Barometer mod ?&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 week&#039;].&#039;: &lt;strong&gt;&#039;.$posts_week;
                else
                       echo $lang_index[&#039;number week&#039;].&#039;: &lt;strong&gt;&#039;.number_format($posts_week);
                ?&gt;
                &lt;/strong&gt;&lt;/dd&gt;
                &lt;?php // End: Activity Barometer mod ?&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;average h&#039;].&#039;: &lt;strong&gt;&#039;.$posts_h,1;
                       else
                              echo  $lang_index[&#039;average h&#039;].&#039;: &lt;strong&gt;&#039;.$posts_h,1;
                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;img alt=&quot;Nwetrin Endam&quot; src=&quot;http://kurdup.com/up/uploads/picture/fc089808ab.gif&quot; style=&quot;border:0;&quot; /&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 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;img src=&quot;http://kurdup.com/up/uploads/picture/bf3f51d3cf.png&quot; alt=&quot;wene&quot; /&gt;&amp;nbsp;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_user_online[&#039;user_id&#039;].&#039;&amp;phpMyAdmin=8vWbAgsnOIpH1T-G3ObkpK6EOD8&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);
//-------Birthday Code Start-------
    // today&#039;s birthdays
    $ttoday = time();
    $tdiff = ($pun_user[&#039;timezone&#039;] - $pun_config[&#039;o_server_timezone&#039;]) * 3600;
    $ttoday += $tdiff;
    $tyear = date(&quot;Y&quot;);
    $tmonth = date(&quot;n&quot;);
    $tday = date(&quot;j&quot;, $ttoday);
    
$result = $db-&gt;query(&#039;SELECT id, username, birthday FROM &#039;.$db-&gt;prefix.&#039;users WHERE DAYOFMONTH(birthday) = &#039;.$tday.&#039; AND MONTH(birthday) = &#039;.$tmonth.&#039; ORDER BY username&#039;) or error(&#039;Unable to fetch birthday list&#039;, __FILE__, __LINE__, $db-&gt;error());

    $bdays_today = array();
    while ($pun_bdays_today = $db-&gt;fetch_assoc($result)){
        $bparts = Explode(&#039;-&#039;, $pun_bdays_today[&#039;birthday&#039;]);
        $bday_year = $bparts[0];
        $age = (strlen($bday_year)!=&#039;4&#039;)? &quot;&quot;: &quot;(&quot;.($tyear-$bday_year).&quot;)&quot;;
        $bdays_today[] .=  &quot;\n\t\t\t\t&quot;.&#039;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_bdays_today[&#039;id&#039;].&#039;&quot;&gt;&#039;.$pun_bdays_today[&#039;username&#039;].&#039;&lt;/a&gt;&#039;.$age;
        }
        
    $num_bdays_today = count($bdays_today);
//-------Birthday Code End-------
    // utilisateurs en ligne aujourd&#039;hui
    $date = getdate(time());
    $todaystamp = mktime(0,0,0, $date[&#039;mon&#039;], $date[&#039;mday&#039;], $date[&#039;year&#039;]);

    $result = $db-&gt;query(&#039;SELECT username, id, last_visit from &#039;.$db-&gt;prefix.&#039;users WHERE last_visit &gt;= \&#039;&#039;.$todaystamp.&#039;\&#039; ORDER by last_visit DESC&#039;) or error(&#039;Impossible de retrouver la liste des utilisateurs en ligne aujourd\&#039;hui&#039;, __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;img src=&quot;http://kurdup.com/up/uploads/picture/461f0c454f.png&quot; alt=&quot;wene&quot; /&gt;&amp;nbsp;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_user_online_today[&#039;id&#039;].&#039;&amp;phpMyAdmin=8vWbAgsnOIpH1T-G3ObkpK6EOD8&quot; title=&quot;Dernière visite de &#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;;


    if ($num_users &gt; 0)
        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;:&amp;nbsp;&lt;/strong&gt;&lt;/dt&gt;&#039;.&quot;\t\t\t\t&quot;.implode(&#039;,&lt;/dd&gt; &#039;, $users).&#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    else
        echo &quot;\t\t\t&quot;.&#039;&lt;div class=&quot;clearer&quot;&gt;&lt;/div&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 id=&quot;announce&quot; class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;b&gt;ڕۆژی له‌ دایکبونت پیرۆزبێت&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
{

    if ($num_bdays_today &gt; 0)
        echo &quot;\t\t\t&quot;.&#039;&lt;dl id=&quot;bdayslist&quot; class= &quot;clearb&quot;&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dt&gt;&lt;strong&gt;&#039;.$lang_birthday[&#039;Bdays_today&#039;].&#039;:&amp;nbsp;&lt;/strong&gt;&lt;/dt&gt;&#039;.&quot;\t\t\t\t&quot;.implode(&#039;,&lt;/dd&gt; &#039;, $bdays_today).&#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    else
        echo &quot;\t\t\t&quot;.&#039;&lt;dl id=&quot;bdayslist&quot; class= &quot;clearb&quot;&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dt&gt;&lt;strong&gt;&#039;.$lang_birthday[&#039;Bdays_today&#039;].&#039;:&amp;nbsp;&lt;/strong&gt;&lt;/dt&gt;&#039;.&quot;\t\t\t\t&quot;.$lang_birthday[&#039;Bdays_info&#039;].&#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;


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

&lt;div id=&quot;announce&quot; class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;b&gt;&amp;#1574;&amp;#1575;&amp;#1605;&amp;#1575;&amp;#1583;&amp;#1607;&amp;#8204;&amp;#1576;&amp;#1608;&amp;#1575;&amp;#1606;&amp;#1740; &amp;#1574;&amp;#1607;&amp;#8204;&amp;#1605;&amp;#1685;&amp;#1734;&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
{
    if ($data[&#039;id&#039;] != 1)
    {
        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;aucun&lt;/em&gt;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    }
}

?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;announce&quot; class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;b&gt;&amp;#1670;&amp;#1575;&amp;#1604;&amp;#1575;&amp;#1603;&amp;#1578;&amp;#1585;&amp;#1740;&amp;#1606; 20 &amp;#1574;&amp;#1607;&amp;#8204;&amp;#1606;&amp;#1583;&amp;#1575;&amp;#1605;&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, username LIMIT 20&#039;) or error(&#039;Unable to fetch user data&#039;, __FILE__, __LINE__, $db-&gt;error());
while ($data = $db-&gt;fetch_assoc($result))
{
    if ($data[&#039;id&#039;] != 1)
    {
       echo &quot;\t\t\t\t\t\t&quot;.&#039;&lt;img src=&quot;http://kurdup.com/up/uploads/picture/fe6df16695.gif&quot; alt=&quot;wene&quot; /&gt;&amp;nbsp;&lt;a href=&quot;profile.php?id=&#039;.$data[&#039;id&#039;].&#039;&amp;phpMyAdmin=8vWbAgsnOIpH1T-G3ObkpK6EOD8&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&gt;

&lt;?php

$footer_style = &#039;index&#039;;
require PUN_ROOT.&#039;footer.php&#039;;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[گه‌یلان]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=2438</uri>
			</author>
			<updated>2012-09-27T23:57:58Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=226221#p226221</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=226218#p226218" />
			<content type="html"><![CDATA[<p><a href="http://www.gullinwe.net">www.gullinwe.net</a></p>]]></content>
			<author>
				<name><![CDATA[ديارى d]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=22236</uri>
			</author>
			<updated>2012-09-27T20:49:20Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=226218#p226218</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=226203#p226203" />
			<content type="html"><![CDATA[<p>کامە کۆدە تایبەتە بە ڕۆژی لەدایکبوونی ئەندامان؟<br />یان بەستەری مەکۆکانت دابنێ.</p>]]></content>
			<author>
				<name><![CDATA[گه‌یلان]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=2438</uri>
			</author>
			<updated>2012-09-27T15:04:40Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=226203#p226203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[رؤزى له دايكبونم بؤ بخه نه جوارجيوه وه]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=226110#p226110" />
			<content type="html"><![CDATA[<p>سلاو هاورييان ئه كه ر رؤزى له ديكبونم بؤ بخه نه جوار جيوه يه كه وه زؤر سوباستان ئه كه م به س با له خوار جالاكترين 20ئه ندامه وه بيت <br />ئه وه ش ئينديكس</p><div class="codebox"><pre><code data-language=php>&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;;
require PUN_ROOT.&#039;lang/&#039;.$pun_user[&#039;language&#039;].&#039;/birthday.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;;
################################################################################
########################### Sub Forum MOD (start) ##############################
################################################################################
$sfcount=0;
$sfdb = array($_parent_id_, $_topics_, $_posts_, $_last_post_id_, $_last_poster_, $_last_post_);
//$forums_info = $db-&gt;query(&#039;SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, id, forum_name FROM &#039;.$db-&gt;prefix.&#039;forums ORDER BY disp_position&#039;) or error(implode($db-&gt;error(),&#039;&#039;),__FILE__,__LINE__,$db-&gt;error());

$forums_info = $db-&gt;query(&#039;SELECT f.num_topics, f.num_posts, f.parent_forum_id, f.last_post_id, f.last_poster, f.last_post, f.id, f.forum_name, p.poster_id as last_poster_id, t.subject FROM &#039;.$db-&gt;prefix.&#039;forums AS f LEFT JOIN &#039;.$db-&gt;prefix.&#039;posts AS p ON (p.id=f.last_post_id) LEFT JOIN &#039;.$db-&gt;prefix.&#039;topics AS t ON t.last_post_id=f.last_post_id ORDER BY disp_position&#039;) or error(implode($db-&gt;error(),&#039;&#039;),__FILE__,__LINE__,$db-&gt;error());
while($current = $db-&gt;fetch_assoc($forums_info)) {
 if ($current[&#039;parent_forum_id&#039;] != 0)
  {
   $sfdb[$sfcount][0] = $current[&#039;parent_forum_id&#039;];
   $sfdb[$sfcount][1] = $current[&#039;num_topics&#039;];
   $sfdb[$sfcount][2] = $current[&#039;num_posts&#039;];
   $sfdb[$sfcount][3] = $current[&#039;last_post_id&#039;];
   $sfdb[$sfcount][4] = $current[&#039;last_poster&#039;];
   $sfdb[$sfcount][5] = $current[&#039;last_post&#039;];
   $sfdb[$sfcount][6] = $current[&#039;id&#039;];
   $sfdb[$sfcount][7] = $current[&#039;forum_name&#039;];
   $sfdb[$sfcount][8] = $current[&#039;last_poster_id&#039;];
   $sfdb[$sfcount][9] = $current[&#039;subject&#039;];

   $sfcount++;
  }
}
################################################################################
########################### Sub Forum MOD ( end ) ##############################
################################################################################
require PUN_ROOT.&#039;include/mod_topicpreview.php&#039;;
    mtp_showactopic();    // Mod Topic Preview with Active Topic Lite

// 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, f.parent_forum_id, p.poster_id as last_poster_id, t.subject 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;topics AS t ON t.last_post_id=f.last_post_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;) LEFT JOIN &#039;.$db-&gt;prefix.&#039;posts AS p ON (p.id=f.last_post_id) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND (f.parent_forum_id IS NULL OR f.parent_forum_id=0) 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;&amp;nbsp;&#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;viewforum.php?id=&#039;.$cur_forum[&#039;fid&#039;].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]).&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;
        ################################################################################
########################### Sub Forum MOD (start) ##############################
################################################################################
  $n_t = 0;
  $n_p = 0;
  $l_pid = $cur_forum[&#039;last_post_id&#039;];
  $l_pr = $cur_forum[&#039;last_poster&#039;];
  $l_pr_id = $cur_forum[&#039;last_poster_id&#039;];
  $l_pr_su = $cur_forum[&#039;subject&#039;];
  $l_post = $cur_forum[&#039;last_post&#039;];
  for ($i = 0; $i &lt; $sfcount; $i++)
  {
   if ($sfdb[$i][0] == $cur_forum[&#039;fid&#039;])
    {
     $n_t = $n_t + $sfdb[$i][1];
     $n_p = $n_p + $sfdb[$i][2];
     if ($l_pid &lt; $sfdb[$i][3])
      {
       $l_pid = $sfdb[$i][3];
       $l_pr = $sfdb[$i][4];
     $l_pr_id = $sfdb[$i][8];
       $l_post = $sfdb[$i][5];
       $l_pr_su = $sfdb[$i][9];
      }
    }
  }
  $num_topics = $n_t + $cur_forum[&#039;num_topics&#039;];
  $num_posts = $n_p + $cur_forum[&#039;num_posts&#039;];
################################################################################
########################### Sub Forum MOD ( end ) ##############################
################################################################################
    }

    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;];


    // Display the last topic
    $idm = $cur_forum[&#039;subject&#039;];
    if(strlen($idm) &gt; 300000) {
        $idmComp = str_replace(&#039;&quot;&#039;, &quot;&#039;&#039;&quot;, $idm);
        $idm = substr($idm, 0, 300000).&#039;...&#039;;
    } else
        $idmComp = &#039;&#039;;
 
    // If there is a last_post/last_poster.
    if ($cur_forum[&#039;last_post&#039;] != &#039;&#039;) {
        $idmT = (isset($idmComp)) ? &#039; title=&quot;&#039;.$idmComp.&#039;&quot;&#039; : &#039;&#039;;
        $last_post = format_time($cur_forum[&#039;last_post&#039;]).&#039;&lt;br /&gt;&amp;#1576;&amp;#1600;&amp;#1575;&amp;#1576;&amp;#1600;&amp;#1607;&amp;#8204;&amp;#1578; &lt;a href=&quot;viewtopic.php?pid=&#039;.$cur_forum[&#039;last_post_id&#039;].&#039;#p&#039;.$cur_forum[&#039;last_post_id&#039;].&#039;&quot;&#039;.$idmT.&#039;&gt;&lt;em&gt;&#039;.$idm.&#039;&lt;/em&gt;&lt;/a&gt;&lt;br /&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;&amp;nbsp;&#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;&lt;span class=&quot;byuser&quot;&gt;&#039;.pun_htmlspecialchars($mod_username).&#039;&lt;/span&gt;&lt;/a&gt;&#039;;

        $moderators = &quot;\t\t\t\t\t\t\t\t&quot;.&#039;&lt;br /&gt;&lt;span class=&quot;moderator&quot;&gt;[&lt;span class=&quot;mod_by&quot;&gt;&#039;.$lang_common[&#039;Moderated by&#039;].&#039;:&lt;/span&gt; &#039;.implode(&#039;, &#039;, $moderators).&#039;]&lt;/span&gt;&#039;.&quot;\n&quot;;
    }
if (!empty($sfdb))
            {
                foreach ($sfdb as $sub_forums)
                {
                    if ($cur_forum[&#039;fid&#039;] == $sub_forums[0] &amp;&amp; !$pun_user[&#039;is_guest&#039;] &amp;&amp; $sub_forums[5] &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;;
                    }
                }
            }

?&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;?php
                        $sub_forums_list = array();
                        if(!empty($sfdb)) {
                           foreach ($sfdb as $sub_forums) {
                                 if($cur_forum[&#039;fid&#039;] == $sub_forums[0]) {
                                    $sub_forums_list[] = &#039;&lt;a class=&quot;subforum_name&quot; href=&quot;viewforum.php?id=&#039;.$sub_forums[6].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($sub_forums[7]).&#039;&lt;/a&gt;&#039;;
                                 }
                             }
                           // EDIT THIS FOR THE DISPLAY STYLE OF THE SUBFORUMS ON MAIN PAGE
                           if(!empty($sub_forums_list)) {
                                 // Leave one $sub_forums_list commented out to use the other (between the ###..)
                                 ################################
                                 // This is Single Line Wrap Style
                                 $sub_forums_list = &quot;\t\t\t\t\t\t\t\t&quot;.&#039;&lt;span class=&quot;subforum&quot;&gt;&#039;.$lang_common[&#039;Sub Forums&#039;].&#039;:&lt;/span&gt; &#039;.implode(&#039;, &#039;, $sub_forums_list).&quot;\n&quot;;
                                 // This is List Style
                                 //$sub_forums_list = &quot;\n&quot;.&#039;&lt;b&gt;&lt;em&gt;Sub Forums:&lt;/em&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp; -- &amp;nbsp;&#039;.implode(&#039;&lt;br /&gt;&amp;nbsp; -- &amp;nbsp;&#039;, $sub_forums_list).&quot;\n&quot;;
                                 ################################
                                 if ($cur_forum[&#039;forum_desc&#039;] != NULL) {
                                    echo &quot;&lt;br /&gt;&quot;;
                                 }
                                 // TO TURN OFF DISPLAY OF SUBFORUMS ON INDEX PAGE, COMMENT OUT THE FOLLOWING LINE
                                 echo &quot;$sub_forums_list&quot;;
                           }
                        }
?&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());
list($stats[&#039;total_topics&#039;], $stats[&#039;total_posts&#039;]) = $db-&gt;fetch_row($result);

?&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;?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 day&#039;].&#039;: &lt;strong&gt;&#039;.$posts_day;
                       else
                              echo  $lang_index[&#039;number day&#039;].&#039;: &lt;strong&gt;&#039;.$posts_day;
                else
                       echo $lang_index[&#039;number day&#039;].&#039;: &lt;strong&gt;&#039;.number_format($posts_day);
                ?&gt;
                &lt;/strong&gt;&lt;/dd&gt;
                &lt;?php // End: Activity Barometer mod ?&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 week&#039;].&#039;: &lt;strong&gt;&#039;.$posts_week;
                else
                       echo $lang_index[&#039;number week&#039;].&#039;: &lt;strong&gt;&#039;.number_format($posts_week);
                ?&gt;
                &lt;/strong&gt;&lt;/dd&gt;
                &lt;?php // End: Activity Barometer mod ?&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;average h&#039;].&#039;: &lt;strong&gt;&#039;.$posts_h,1;
                       else
                              echo  $lang_index[&#039;average h&#039;].&#039;: &lt;strong&gt;&#039;.$posts_h,1;
                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;img alt=&quot;Nwetrin Endam&quot; src=&quot;http://kurdup.com/up/uploads/picture/fc089808ab.gif&quot; style=&quot;border:0;&quot; /&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 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;img src=&quot;http://kurdup.com/up/uploads/picture/bf3f51d3cf.png&quot; alt=&quot;wene&quot; /&gt;&amp;nbsp;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_user_online[&#039;user_id&#039;].&#039;&amp;phpMyAdmin=8vWbAgsnOIpH1T-G3ObkpK6EOD8&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);
//-------Birthday Code Start-------
    // today&#039;s birthdays
    $ttoday = time();
    $tdiff = ($pun_user[&#039;timezone&#039;] - $pun_config[&#039;o_server_timezone&#039;]) * 3600;
    $ttoday += $tdiff;
    $tyear = date(&quot;Y&quot;);
    $tmonth = date(&quot;n&quot;);
    $tday = date(&quot;j&quot;, $ttoday);
    
$result = $db-&gt;query(&#039;SELECT id, username, birthday FROM &#039;.$db-&gt;prefix.&#039;users WHERE DAYOFMONTH(birthday) = &#039;.$tday.&#039; AND MONTH(birthday) = &#039;.$tmonth.&#039; ORDER BY username&#039;) or error(&#039;Unable to fetch birthday list&#039;, __FILE__, __LINE__, $db-&gt;error());

    $bdays_today = array();
    while ($pun_bdays_today = $db-&gt;fetch_assoc($result)){
        $bparts = Explode(&#039;-&#039;, $pun_bdays_today[&#039;birthday&#039;]);
        $bday_year = $bparts[0];
        $age = (strlen($bday_year)!=&#039;4&#039;)? &quot;&quot;: &quot;(&quot;.($tyear-$bday_year).&quot;)&quot;;
        $bdays_today[] .=  &quot;\n\t\t\t\t&quot;.&#039;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_bdays_today[&#039;id&#039;].&#039;&quot;&gt;&#039;.$pun_bdays_today[&#039;username&#039;].&#039;&lt;/a&gt;&#039;.$age;
        }
        
    $num_bdays_today = count($bdays_today);
//-------Birthday Code End-------
    // utilisateurs en ligne aujourd&#039;hui
    $date = getdate(time());
    $todaystamp = mktime(0,0,0, $date[&#039;mon&#039;], $date[&#039;mday&#039;], $date[&#039;year&#039;]);

    $result = $db-&gt;query(&#039;SELECT username, id, last_visit from &#039;.$db-&gt;prefix.&#039;users WHERE last_visit &gt;= \&#039;&#039;.$todaystamp.&#039;\&#039; ORDER by last_visit DESC&#039;) or error(&#039;Impossible de retrouver la liste des utilisateurs en ligne aujourd\&#039;hui&#039;, __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;img src=&quot;http://kurdup.com/up/uploads/picture/461f0c454f.png&quot; alt=&quot;wene&quot; /&gt;&amp;nbsp;&lt;dd&gt;&lt;a href=&quot;profile.php?id=&#039;.$pun_user_online_today[&#039;id&#039;].&#039;&amp;phpMyAdmin=8vWbAgsnOIpH1T-G3ObkpK6EOD8&quot; title=&quot;Dernière visite de &#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;;


    if ($num_users &gt; 0)
        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;:&amp;nbsp;&lt;/strong&gt;&lt;/dt&gt;&#039;.&quot;\t\t\t\t&quot;.implode(&#039;,&lt;/dd&gt; &#039;, $users).&#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    else
        echo &quot;\t\t\t&quot;.&#039;&lt;div class=&quot;clearer&quot;&gt;&lt;/div&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;;
// list today&#039;s birthdays           
    if ($num_bdays_today &gt; 0)
        echo &quot;\t\t\t&quot;.&#039;&lt;dl id=&quot;bdayslist&quot; class= &quot;clearb&quot;&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dt&gt;&lt;strong&gt;&#039;.$lang_birthday[&#039;Bdays_today&#039;].&#039;:&amp;nbsp;&lt;/strong&gt;&lt;/dt&gt;&#039;.&quot;\t\t\t\t&quot;.implode(&#039;,&lt;/dd&gt; &#039;, $bdays_today).&#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    else
        echo &quot;\t\t\t&quot;.&#039;&lt;dl id=&quot;bdayslist&quot; class= &quot;clearb&quot;&gt;&#039;.&quot;\n\t\t\t\t&quot;.&#039;&lt;dt&gt;&lt;strong&gt;&#039;.$lang_birthday[&#039;Bdays_today&#039;].&#039;:&amp;nbsp;&lt;/strong&gt;&lt;/dt&gt;&#039;.&quot;\t\t\t\t&quot;.$lang_birthday[&#039;Bdays_info&#039;].&#039;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;


?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;announce&quot; class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;b&gt;&amp;#1574;&amp;#1575;&amp;#1605;&amp;#1575;&amp;#1583;&amp;#1607;&amp;#8204;&amp;#1576;&amp;#1608;&amp;#1575;&amp;#1606;&amp;#1740; &amp;#1574;&amp;#1607;&amp;#8204;&amp;#1605;&amp;#1685;&amp;#1734;&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
{
    if ($data[&#039;id&#039;] != 1)
    {
        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;aucun&lt;/em&gt;&lt;/dd&gt;&#039;.&quot;\n\t\t\t&quot;.&#039;&lt;/dl&gt;&#039;.&quot;\n&quot;;
    }
}

?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;announce&quot; class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;b&gt;&amp;#1670;&amp;#1575;&amp;#1604;&amp;#1575;&amp;#1603;&amp;#1578;&amp;#1585;&amp;#1740;&amp;#1606; 20 &amp;#1574;&amp;#1607;&amp;#8204;&amp;#1606;&amp;#1583;&amp;#1575;&amp;#1605;&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, username LIMIT 20&#039;) or error(&#039;Unable to fetch user data&#039;, __FILE__, __LINE__, $db-&gt;error());
while ($data = $db-&gt;fetch_assoc($result))
{
    if ($data[&#039;id&#039;] != 1)
    {
       echo &quot;\t\t\t\t\t\t&quot;.&#039;&lt;img src=&quot;http://kurdup.com/up/uploads/picture/fe6df16695.gif&quot; alt=&quot;wene&quot; /&gt;&amp;nbsp;&lt;a href=&quot;profile.php?id=&#039;.$data[&#039;id&#039;].&#039;&amp;phpMyAdmin=8vWbAgsnOIpH1T-G3ObkpK6EOD8&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&gt;

&lt;?php

$footer_style = &#039;index&#039;;
require PUN_ROOT.&#039;footer.php&#039;;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ديارى d]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=22236</uri>
			</author>
			<updated>2012-09-24T20:43:39Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=226110#p226110</id>
		</entry>
</feed>
