Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kiek balų irvertintumėt štai šį dizainą

Parašė Demonas· 2007 Spa. 21 11:10:50
#18

<?php
echo "<table width='100%'><tr><td width='50%'>";
openside("Vartotojai");
echo "<img src='".THEME."images/bullet.gif' alt=''> Narių: ".number_format(dbcount("(user_id)", "users", "user_status<='1'"))."<br>";

$data = dbarray(dbquery("SELECT user_id,user_name FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
   echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['016']."";
rodyk($data['user_name']);

$result = dbquery(
      "SELECT ton.*, tu.user_id,user_name FROM ".$db_prefix."online ton
      LEFT JOIN ".$db_prefix."users tu ON ton.online_user=tu.user_id"
   );
   $guests = 0; $members = array();
   while ($data = dbarray($result)) {
      if ($data['online_user'] == "0") {
         $guests++;
      } else {
         array_push($members, array($data['user_id'], $data['user_name']));
      }
   }
   echo "<br><img src='".THEME."images/bullet.gif' alt=''> ".$locale['011'].$guests."<br>\n";
   if (count($members) > 0) {
      $i = 1;
      echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['012'];
      while (list($key, $member) = each($members)) {
         rodyk($member[1]);
         if ($i != count($members)) echo ", ";
         $i++;
      }
      echo "<br>\n";
   } else {
      echo $locale['013']."<br>\n";
   }

$tag1= date('d');
$tag1= date('d');
$monat1= date('m');
$jahr1= date('Y');
$hanfang = mktime(0,0,0,$monat1,$tag1,$jahr1);
$hende = mktime(23,59,59,$monat1,$tag1,$jahr1);
$ganfang = mktime(0,0,0,$monat1,$tag1-1,$jahr1);
$gende = mktime(23,59,59,$monat1,$tag1-1,$jahr1);
echo "<img src='".THEME."images/bullet.gif' alt=''> Naujų narių vakar: ".dbcount("(user_id)", "users", "user_joined >='".$ganfang."' AND user_joined <='".$gende."'")."<br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Naujų narių šiandien: ".dbcount("(user_id)", "users", "user_joined >='".$hanfang."' AND user_joined <='".$hende."'")."<br>";

$sql=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_posts DESC LIMIT 0, 1");
$i=0;
while ($data=dbarray($sql)) {
echo "<img src='".THEME."images/bullet.gif' alt=''> Daugiausiai postų: ";
rodyk($data['user_name']);
echo " - ".$data['user_posts']." Postai<br>";
$i++;
}


$result=dbquery("SELECT user_name, user_location, user_icq, user_id, count(user_id) AS comment_count FROM ".$db_prefix."comments INNER JOIN
".$db_prefix."users ON comment_name=user_id GROUP BY user_name ORDER BY comment_count DESC LIMIT 0,1");
echo "<img src='".THEME."images/bullet.gif'> Daugiausia komentarų: ";
if(dbrows($result)!=0){
     while($data=dbarray($result)){
rodyk($data['user_name']);
echo " - ".$data['comment_count']." Komentarai<br>";
   }
    }


$result = dbquery("SELECT count(user_id) FROM ".$db_prefix."users WHERE user_status=1");
echo "<img src='".THEME."images/bullet.gif'> Užbanintų: ".dbresult($result, 0)."<br>";


echo "<img src='".THEME."images/bullet.gif'> Unikalių apsilankymų: ".$settings['counter']."<br>";




closeside();
echo "</td><td width='50%'>";
openside("Forumas");
echo "<br /><br />";
echo "<img src='".THEME."images/bullet.gif'> Kategorijų: 3<br>";

echo "<img src='".THEME."images/bullet.gif'> Forumų: 9<br>";

$result = dbquery("SELECT count(thread_id) FROM ".$db_prefix."threads");
echo "<img src='".THEME."images/bullet.gif'> Temų: ".dbresult($result, 0)."<br>";


$result = dbquery("SELECT count(post_id) FROM ".$db_prefix."posts");
echo "<img src='".THEME."images/bullet.gif' alt=''> Pranešimų: ".dbresult($result, 0)."<br>";

$result = dbquery("SELECT * FROM ".$db_prefix."threads ORDER BY thread_lastpost DESC LIMIT 0,1");
while($data = dbarray($result)) {
$itemsubject = trimlink($data['thread_subject'], 35);
echo "<img src='".THEME."images/bullet.gif' alt=''> Naujausia tema: <a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&amp;thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side-small'>$itemsubject</a><br>";
}


$result = dbquery(
   "SELECT tf.forum_id, tt.thread_id, tt.thread_subject, COUNT(tp.post_id) as count_posts,
   MAX(tp.post_id) as last_id FROM ".$db_prefix."forums tf
   INNER JOIN ".$db_prefix."threads tt USING(forum_id)
   INNER JOIN ".$db_prefix."posts tp USING(thread_id)
   WHERE $specified_forum".groupaccess('forum_access')." GROUP BY thread_id
   ORDER BY count_posts DESC, thread_lastpost DESC LIMIT 0,1");
while($data = dbarray($result)) {
      $itemsubject = trimlink($data['thread_subject'], 35);
echo "<img src='".THEME."images/bullet.gif' alt=''> Populiariausia tema: <a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&amp;thread_id=".$data['thread_id']."&amp;pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."' class='side-small'>$itemsubject</a><br>";
}
echo "<br /><br />";
closeside();
echo "</td></tr></table>";
echo "<table align='center' width='70%'><tr><td>";
openside("Kita");
echo "<center>";
$result = dbquery("SELECT count(article_id) FROM ".$db_prefix."articles");
echo "<img src='".THEME."images/bullet.gif' alt=''> Bandymų: ".dbresult($result, 0)." <img src='".THEME."images/bulletb.gif'> | ";
$result = dbquery("SELECT count(comment_id) FROM ".$db_prefix."comments");
echo "<img src='".THEME."images/bullet.gif' alt=''> Komentarų: ".dbresult($result, 0)." <img src='".THEME."images/bulletb.gif'> | ";
$result = dbquery("SELECT count(shout_id) FROM ".$db_prefix."shoutbox");
echo "<img src='".THEME."images/bullet.gif' alt=''> Shout'ų: ".dbresult($result, 0)." <img src='".THEME."images/bulletb.gif'>";
echo "</center>";
closeside();
echo "</td></tr></table>";
?>




Jei norėsi - pasidarysi panelę.