Wer ist online

Gäste online: 2
Mitglieder online: 0

Letzte Mitglieder
Schnurli
Offline
Gonzo
Offline
Lucky637
Offline
vsanny
Offline
eRaZoR2k
Offline
Bellringer
Offline
Septron
Offline
Bdeniz
Offline
Heimlic...
Offline
Denni234
Offline
Mehr anzeigen


Wir suchen...

Moderator
Gast Moderator
Spezial Moderator
DJ
Chat Wache
Sponsor
Techniker
Grafiker

Jetzt Bewerben!

Shoutbox

Du musst eingeloggt sein um eine Nachricht zu schreiben.

Gigabase-Radio
Gigabase-Radio
aus Bocholt
12. Dezember 2019 19:34
Offline
Verwarnstatus: warningwarningwarningwarning
Guten abend zusammen

Septron
Septron
aus Hamm
28. November 2019 14:11
Offline
Verwarnstatus: warningwarningwarningwarning
Hallo, Support Fragen werden im Forum gestellt nicht in der ShoutBox.

Schnurli
Schnurli
aus
24. November 2019 17:06
Offline
Verwarnstatus: warningwarningwarningwarning
paddy22 das wer gans lieb von dir knst mir ruig privat schreiben

Shoutbox Archiv

Shoutbox Beiträge: 517
©
Spenden
Sehr geehrte Gäste und Mitglieder,
PHPFusion-4you ist ein ehrenamtliches Projekt und bietet seine Dienste kostenlos an. Da mit so einem Projekt auch kosten verbunden sind, sind wir auf eure Hilfe angewiesen.
Jede Spende würde uns helfen und würden uns freuen wenn sie einen kleinen Beitrag dazu geben.

Danke euer PHPFusion-4you - Team

[Tutorials-DB] Online User Panel

skpacman / Rick am 27.05.2012 09:23 · Geändert am 27.05.2012 09:31
Beschreibung:
Das ist ein Online User-Panel wie es auch auf http://www.php-fu... zu sehen ist. ist.
www.phpfusion-4you.de/img_upload/daten/1338103321_online-userpanel.jpg
Anleitung:
1. Öffne / Infusionen / online_users_panel / online_users_panel.php
2. lösche alle Inhalte
3. ersetzen Sie sie durch den nachfolgenden Code
4. speichern die Datei
5. Hochladen Fertig

Bitte vorher eine Kopie des Originals zu machen, nur falls etwas schief geht.


Code
<?php<br />     /*-------------------------------------------------------+<br />     | PHP-Fusion Content Management System<br />     | Copyright (C) 2002 - 2009 Nick Jones<br />     | http://www.php-fusion.co.uk/<br />     +--------------------------------------------------------+<br />     | Filename: online_users_panel.php<br />     | Author: Nick Jones (Digitanium)<br />     | Edited for PHP-Fusion USA by skpacman<br />     | German Edited for PHPFusion-4you by rick<br />     +--------------------------------------------------------+<br />     | This program is released as free software under the<br />     | Affero GPL license. You can redistribute it and/or<br />     | modify it under the terms of this license which you<br />     | can read by viewing the included agpl.txt or online<br />     | at www.gnu.org/licenses/agpl.html. Removal of this<br />     | copyright header is strictly prohibited without<br />     | written permission from the original author(s).<br />     +--------------------------------------------------------*/<br />     if (!defined("IN_FUSION")) { die("Access Denied") }<br />      <br />     if (dbcount("(online_user)", DB_ONLINE, (iMEMBER ? "online_user='".$userdata['user_id']."'" : "online_user='0' AND online_ip='".USER_IP."'")) == 1) {<br />     $result = dbquery(<br />     "UPDATE ".DB_ONLINE." SET online_lastactive='".time()."', online_ip='".USER_IP."'<br />     WHERE ".(iMEMBER ? "online_user='".$userdata['user_id']."'" : "online_user='0' AND online_ip='".USER_IP."'"))<br />     } else {<br />     $result = dbquery(<br />     "INSERT INTO ".DB_ONLINE." (online_user, online_ip, online_ip_type, online_lastactive)<br />     VALUES ('".(iMEMBER ? $userdata['user_id']: 0)."', '".USER_IP."', '".USER_IP_TYPE."', '".time()."')")<br />     }<br />     $result = dbquery("DELETE FROM ".DB_ONLINE." WHERE online_lastactive<".(time()-60)."")<br />      <br />     openside($locale['global_010'])<br />     $result = dbquery(<br />     "SELECT ton.online_user, tu.user_id, tu.user_name, tu.user_status, tu.user_level FROM ".DB_ONLINE." ton<br />     LEFT JOIN ".DB_USERS." tu ON ton.online_user=tu.user_id"<br />     )<br />     $guests = 0; $members = array() $admins = array()<br />     while ($data = dbarray($result)) {<br />     if ($data['online_user']== "0") {<br />     $guests++;<br />     } else {<br />     if ($data['user_level']< 102){<br />     $members[]= array($data['user_id'], $data['user_name'], $data['user_status'])<br />     }<br />     if ($data['user_level']> 101){<br />     $admins[]= array($data['user_id'], $data['user_name'], $data['user_status'])<br />     }<br />     }<br />     }<br />     echo THEME_BULLET." ".$locale['global_011'].": ".$guests."<br /><br />\n";<br />     echo THEME_BULLET." Admin Online: ".count($admins)."<br />\n";<br />     if (count($admins)) {<br />     $si = 1;<br />     while (list($key, $admin) = each($admins)) {<br />     echo "<span class='side'>".profile_link($admin[0], $admin[1], $admin[2])."</span>";<br />     if ($si != count($admins)) { echo ",\n"; } else { echo "<br />\n"; }<br />     $si++;<br />     }<br />     }<br />     echo "<br />".THEME_BULLET." ".$locale['global_012'].": ".count($members)."<br />\n";<br />     if (count($members)) {<br />     $i = 1;<br />     while (list($key, $member) = each($members)) {<br />     echo "<span class='side'>".profile_link($member[0], $member[1], $member[2])."</span>";<br />     if ($i != count($members)) { echo ",\n"; } else { echo "<br />\n"; }<br />     $i++;<br />     }<br />     }<br />     echo "<br />\n".THEME_BULLET." ".$locale['global_014'].": ".number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'"))."<br />\n";<br />     if (iADMIN && checkrights("M") && $settings['admin_activation']== "1") {<br />     echo "<br />".THEME_BULLET." <a href='".ADMIN."members.php".$aidlink."&amp;status=2' class='side'>".$locale['global_015']."</a>";<br />     echo ": ".dbcount("(user_id)", DB_USERS, "user_status='2'")."<br />\n";<br />     }<br />     $data = dbarray(dbquery("SELECT user_id, user_name, user_status FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"))<br />     echo "<br />".THEME_BULLET." ".$locale['global_016'].": <span class='side'>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</span>\n";<br />      <br />     //LAST SEEN USERS PANEL ADDITION BY skpacman<br />      <br />     /*---------------------------------------------------+<br />     | PHP-Fusion 7 Content Management System<br />     +----------------------------------------------------+<br />     | Copyright � 2002 - 2011 Nick Jones<br />     | http://www.php-fusion.co.uk/<br />     +----------------------------------------------------+<br />     | Filename: last_seen_users_panel.php<br />     | Author: PHP-Fusion Addons Team<br />     | Edited for PHP-Fusion USA by skpacman<br />     | German Edited for PHPFusion-4you by rick<br />     +--------------------------------------------------------+<br />     | This program is released as free software under the<br />     | Affero GPL license. You can redistribute it and/or<br />     | modify it under the terms of this license which you<br />     | can read by viewing the included agpl.txt or online<br />     | at www.gnu.org/licenses/agpl.html. Removal of this<br />     | copyright header is strictly prohibited without<br />     | written permission from the original author(s).<br />     +--------------------------------------------------------*/<br />      <br />     $locale['lsup000']= "letzte Users";<br />     $locale['lsup001']= "Online";<br />     $locale['lsup002']= "< 5 min";<br />     $locale['lsup003']= "Woche";<br />     $locale['lsup004']= "Wochen";<br />     $locale['lsup005']= "Tag";<br />     $locale['lsup006']= "Tage";<br />     $locale['lsup007']= "Letzter Admin";<br />      <br />     echo "<br /><br /><fieldset><legend>".$locale['lsup007'].":</legend>";<br />      <br />     $result = dbquery("SELECT<br />     user_id,<br />     user_name,<br />     user_status,<br />     user_lastvisit<br />     FROM ".DB_USERS."<br />     WHERE user_lastvisit >'0'<br />     AND user_status='0'<br />     AND user_level>'101'<br />     ORDER BY user_lastvisit<br />     DESC LIMIT 0,10<br />     ")<br />      <br />     echo "<table cellpadding='0' cellspacing='0' width='100%'>";<br />     if (dbrows($result) != 0) {<br />     while ($data = dbarray($result)) {<br />     $lastseen = time() - $data['user_lastvisit'];<br />     $iW=sprintf("%2d",floor($lastseen/604800))<br />     $iD=sprintf("%2d",floor($lastseen/(60*60*24)))<br />     $iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600))<br />     $iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60))<br />     $iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)))<br />     if ($lastseen < 60){<br />     $lastseen= $locale['lsup001'];<br />     } elseif ($lastseen < 360){<br />     $lastseen= $locale['lsup002'];<br />     } elseif ($iW > 0){<br />     if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; }<br />     $lastseen = $iW." ".$text;<br />     } elseif ($iD > 0){<br />     if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; }<br />     $lastseen = $iD." ".$text;<br />     } else {<br />     $lastseen = $iH.":".$iM.":".$iS;<br />     }<br />     echo "<tr>\n<td class='side-small' align='left'>".THEME_BULLET."\n";<br />     echo profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";<br />     }<br />     }<br />     echo "</table></fieldset>";<br />      <br />     echo "<br /><fieldset><legend>".$locale['lsup000'].":</legend>";<br />      <br />     $result = dbquery("SELECT<br />     user_id,<br />     user_name,<br />     user_status,<br />     user_lastvisit<br />     FROM ".DB_USERS."<br />     WHERE user_lastvisit >'0'<br />     AND user_status='0'<br />     AND user_level<'102'<br />     ORDER BY user_lastvisit<br />     DESC LIMIT 0,15<br />     ")<br />      <br />     echo "<table cellpadding='0' cellspacing='0' width='100%'>";<br />     if (dbrows($result) != 0) {<br />     while ($data = dbarray($result)) {<br />     $lastseen = time() - $data['user_lastvisit'];<br />     $iW=sprintf("%2d",floor($lastseen/604800))<br />     $iD=sprintf("%2d",floor($lastseen/(60*60*24)))<br />     $iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600))<br />     $iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60))<br />     $iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)))<br />     if ($lastseen < 60){<br />     $lastseen= $locale['lsup001'];<br />     } elseif ($lastseen < 360){<br />     $lastseen= $locale['lsup002'];<br />     } elseif ($iW > 0){<br />     if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; }<br />     $lastseen = $iW." ".$text;<br />     } elseif ($iD > 0){<br />     if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; }<br />     $lastseen = $iD." ".$text;<br />     } else {<br />     $lastseen = $iH.":".$iM.":".$iS;<br />     }<br />     echo "<tr>\n<td class='side-small' align='left'>".THEME_BULLET."\n";<br />     echo profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";<br />     }<br />     }<br />     echo "</table></fieldset>";<br />     closeside()<br />     ?>


Tutorials DB © 2010-2020 ptown67