Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Neveikia

Parašė WantedBoy· 2008 Geg. 10 15:05:24
#11

Imk:



<?php
$photocount = dbquery("SELECT count(photo_id) FROM ".$db_prefix."photos");
$albumcount = dbquery("SELECT count(album_id) FROM ".$db_prefix."photo_albums");
$usercount = dbquery("SELECT count(user_id) FROM ".$db_prefix."users");
$shoutcount = dbquery("SELECT count(shout_id) FROM ".$db_prefix."shoutbox");
$fkategoriecount = dbquery("SELECT count(forum_id) FROM ".$db_prefix."forums");
$fthemencount = dbquery("SELECT count(thread_id) FROM ".$db_prefix."threads");
$fbeiträgecount = dbquery("SELECT count(post_id) FROM ".$db_prefix."posts");
$linkkategoriecount = dbquery("SELECT count(weblink_cat_id) FROM ".$db_prefix."weblink_cats");
$linkcount = dbquery("SELECT count(weblink_id) FROM ".$db_prefix."weblinks");
$articlecount = dbquery("SELECT count(article_id) FROM ".$db_prefix."articles");
$articlekategoriecount = dbquery("SELECT count(article_cat_id) FROM ".$db_prefix."article_cats");
$newscount = dbquery("SELECT count(news_id) FROM ".$db_prefix."news");
$result = dbquery("SELECT count(comment_id) FROM ".$db_prefix."comments");
$downloadcount = dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads");


openside("$locale[road_1]");
echo "<b><img src='".IMAGES."nariai3.gif'> Nariø info:</b><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'> Naujausias: <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a><br />\n";
$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'> U&#254;siregistravo vakar: ".dbcount("(user_id)", "users", "user_joined >='".$ganfang."' AND user_joined <='".$gende."'")."<br>";
echo "<img src='".THEME."images/bullet.gif'> U&#254;siregistravo &#240;iandien: ".dbcount("(user_id)", "users", "user_joined >='".$hanfang."' AND user_joined <='".$hende."'")."<br>";
echo "<img src='".THEME."images/bullet.gif'> Neaktyvuoti nariai: <span class='alt'>".dbcount("(user_id)", "users", "user_status='2'")."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Aktyvuoti nariai: <span class='alt'>".dbresult($usercount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> U&#254;baninti: <span class='alt'>".dbcount("(user_id)", "users", "user_status='1'")."</span><br><br>";



   
echo "<center></center><hr>\n";
echo "<img src='".IMAGES."porstat.gif'><b> Portalo info:</b><br>";
echo "<img src='".THEME."images/bullet.gif'> Forumo kategorijos: <span class='alt'>".dbresult($fkategoriecount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Forumo temos: <span class='alt'>".dbresult($fthemencount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Forumo prane&#240;imai: <span class='alt'>".dbresult($fbeiträgecount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Foto albumai: <span class='alt'>".dbresult($albumcount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Foto nuotrukos: <span class='alt'>".dbresult($photocount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Nuorodø kategorijos: <span class='alt'>".dbresult($linkkategoriecount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Nuorodos: <span class='alt'>".dbresult($linkcount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Straipsniø kategorijos: <span class='alt'>".dbresult($articlekategoriecount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Straipsniai: <span class='alt'>".dbresult($articlecount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> &#222;aidimø kodai: <span class='alt'>".dbresult($codescount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Naujienos: <span class='alt'>".dbresult($newscount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Shoutbox prane&#240;imai: <span class='alt'>".dbresult($shoutcount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Komentarai: <span class='alt'>".dbresult($result, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Siuntiniai: <span class='alt'>".dbresult($downloadcount, 0)."</span><br>";
echo "<img src='".THEME."images/bullet.gif'> Parsisiøsta failø: <span class='alt'>".$dcount = dbresult(dbquery("SELECT sum(download_count) FROM ".$db_prefix."downloads"),0);
echo "<center></center><hr>\n";


include_once(INFUSIONS.'stats_info_panel/log.inc.php');

if($_SERVER['REMOTE_ADDR'] == "xxx.xxx.xxx.xxx") {
   $log = new log(1);
} else {
   $log = new log();
}

include "config.inc.php";

$loged_users = array();



$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user=".$cond."");
$rows = dbrows($result);
if ($rows != 0) {
   $result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond."");
} else {
   $name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
   $result = dbquery("INSERT INTO ".$db_prefix."online VALUES('$name', '".USER_IP."', '".time()."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
$result = dbquery(
   "SELECT ton.*, user_id,user_name,user_ip FROM ".$db_prefix."online ton
   LEFT JOIN ".$db_prefix."users tu ON ton.online_user=tu.user_id
   WHERE online_user!='0'"
);
$members = dbrows($result);
if ($members!=0) {
   echo "<table width='100%'><tr><td  width='100%'><b><img src='".IMAGES."nariai3.gif'>Prisijungæ nariai:</b></td></tr></table>\n";
   echo "<div style='word-wrap:break-word'>\n";
   $result = dbquery("
   SELECT * FROM ".$db_prefix."online tbl1
   INNER JOIN ".$db_prefix."stats tbl2 ON tbl2.ip = tbl1.online_ip
   INNER JOIN ".$db_prefix."users tbl3 ON tbl3.user_id = tbl1.online_user
   WHERE tbl1.online_user!='0' AND tbl2.time>=".(time()-60).";
   ");
   while ($data = dbarray($result)) {
      $loged_users[]=$data['user_ip'];
      $pos = strrpos($data['page'], ".php");
      $script = substr($data['page'], 0, $pos + 4);
      echo "<img src='".THEME."images/bullet.gif' border='0'> <span style='font-size:9px'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a> @ <a href='".BASEDIR.$data['page']."'>".trimlink(basename($script), 17)."</a></span><br  />\n";   
   }
    echo "</div>\n";
}

echo "<table width='100%'><tr><td  width='100%'><b><img src='".IMAGES."guest.gif'>Prisijungæ sve&#232;iai:</b></td></tr></table>\n";
echo "<div style='word-wrap:break-word'>\n";
$result2 = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0';");
$rows = dbrows($result2);
if ($rows!=0) {
   $result = dbquery("SELECT * FROM ".$db_prefix."stats WHERE time>=".(time()-60).";");
   while ($data = dbarray($result)) {
      if (!in_array($data['ip'], $loged_users)) {
         $pos = strrpos($data['page'], ".php");
         $script = substr($data['page'], 0, $pos + 4);
         $explode = explode(".", $data['ip']);
         $visitor_ip = $explode[0].".".$explode[1].".".$explode[2].".xxx";
          echo "<img src='".THEME."images/bullet.gif' border='0'> <span style='font-size:9px'>".$visitor_ip."</a> @ <a href='".BASEDIR.$data['page']."'>".trimlink($script, 17)."</a></span><br  />\n";
      }
   }
} else {
   echo LANGSTATS_073;
}
echo "</div>\n";

closeside();

?>