Witam. Bardzo bym prosił kogoś aby przerobił mi statystyki "MOD-Statystyki Strony v2.00" mianowicie chodzi mi tu o obciecie tych statystyk do napisu "twoje ip" a reszte czyli:
Kategorie Forum
Wątki na Forum
Posty na Forum
Komentarzy
Newsy
Artykuły
Galerie
Zdjęcia w Albumach
Ściągniętych plików
Kategorie Downloads
Ciekawe Strony
Postów w Shoutbox
poprostu wywalić.
Mój plik online_users_extend_panel:
<?php
/*--------------------------------------------+
| PHP-Fusion 5.01 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/* Created for PHP-FUSION 6.0
Mod 2005 Petter Paulsson
http://www.php-fusion.se/
Gets it´s name from panel administration. */
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."online_users_extend_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."online_users_extend_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."online_users_extend_panel/locale/English.php";
}
if ($settings['maintenance'] != "1") {
$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."");
if (dbrows($result) != 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()."')");
}
if (isset($_POST['login'])) {
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_user='0' AND online_ip='".USER_IP."'");
} else if (isset($logout)) {
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_ip='".USER_IP."'");
}
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
// Get Panel Name from Database
$panel_name = dbresult(dbquery("SELECT panel_name FROM ".$db_prefix."panels WHERE panel_filename = 'online_users_extend_panel'"),0);
opensidex("$panel_name","on");
$sitename = dbresult(dbquery("SELECT sitename FROM ".$db_prefix."settings"),0);
echo "<div style='text-align:center;font-weight:bold'>".$sitename."<br />".$locale['OUE_001']."<br />\n";
$result = dbquery("SELECT user_id,user_name FROM ".$db_prefix."users ORDER BY user_joined DESC");
$total = dbrows($result);
$data = dbarray($result);
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a><br />".$locale['OUE_002']."</div>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
echo "<hr>";
echo $locale['014'].$total."<br />";
echo "<br />";
//antal Superadmins
$total = dbrows(dbquery("SELECT user_id, user_level FROM ".$db_prefix."users WHERE user_level='103'"));
echo $locale['OUE_003'].$total. "<br />\n";
//antal Admins
$total = dbrows(dbquery("SELECT user_id, user_level FROM ".$db_prefix."users WHERE user_level='102'"));
echo $locale['OUE_004'].$total. "<br />";
//antal almindelige medlemmer
$total = dbrows(dbquery("SELECT user_id, user_level FROM ".$db_prefix."users WHERE user_level='101'"));
echo $locale['OUE_005'].$total. "<br />";
echo "<hr>".$locale['012']."<br /><br />\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 0,5");
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"\">";
if(dbrows($result)!=0){
while($data=dbarray($result)){
$lastseen = time() - $data['user_lastvisit'];
$iW = sprintf("%2d", floor($lastseen/604800));
$iD = sprintf("%2d", floor($lastseen/(60*60*24)));
$iH = sprintf("%02d", floor((($lastseen%604800)%86400)/3600));
$iM = sprintf("%02d", floor(((($lastseen%604800)%86400)%3600)/60));
$iS = sprintf("%02d", floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60) {
$lastseen="<nobr><img src='".IMAGES."online.gif'></nobr>";
} elseif ($lastseen < 360) {
$lastseen="<nobr><img src='".IMAGES."offline.gif'></nobr>";
} elseif ($iW > 0) {
if ($iW == 1) $Text= $locale['OUE_020'];
else $Text= $locale['OUE_021'];
$lastseen="<nobr>$iW $Text</nobr>";
}elseif($iD > 0){
if ($iD == 1) $Text= $locale['OUE_022'];
else $Text= $locale['OUE_023'];
$lastseen="<nobr>$iD $Text</nobr>";
} else {
$lastseen="$iH:$iM:$iS";
}
echo "<tr><td class=\"small\" align=\"left\"><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>";
echo $data['user_name']."</a></td><td class=\"small2\" align=\"right\">".$lastseen."</td></tr>";
}
}
echo "</table>";
echo "<hr>";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
echo $locale['011'].dbrows($result)."<br />\n";
echo "<hr>";
$userip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($userip);
echo $locale['OUE_006'].$userip."<br />";$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");
$newscount = dbquery("SELECT count(news_id) FROM ".$db_prefix."news");
$result = dbquery("SELECT count(comment_id) FROM ".$db_prefix."comments");
$online_user = dbquery("SELECT count(online_user) FROM ".$db_prefix."online");
$downloadcount = dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads");
$userip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($userip);
echo "<hr>";
echo "<table border='0' width='100%' class='small'>
<tr><td class='small'>".$locale['OUE_007']."</td><td align='right' class='small'>".dbresult($fkategoriecount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_008']."</td><td align='right' class='small'> ".dbresult($fthemencount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_009']."</td><td align='right' class='small'>".dbresult($fbeiträgecount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_010']."</td><td align='right' class='small'>".dbresult($result, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_012']."</td><td align='right' class='small'>".dbresult($newscount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_013']."</td><td align='right' class='small'>".dbresult($articlecount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_014']."</td><td align='right' class='small'>".dbresult($albumcount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_015']."</td><td align='right' class='small'>".dbresult($photocount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_016']."</td><td align='right' class='small'>".dbresult($downloadcount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_017']."</td><td align='right' class='small'>".dbresult($linkkategoriecount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_018']."</td><td align='right' class='small'>".dbresult($linkcount, 0)."</td></tr>
<tr><td class='small'>".$locale['OUE_019']."</td><td align='right' class='small'>".dbresult($shoutcount, 0)."</td></tr>
</table>";
closeside();
}
?>
|