To jest kod panelu, któreko obraz dołączam w załączniku:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (iMEMBER) {
openside ("<div style='text-align:left'> Witaj: ".$userdata['user_name']);
echo "<img src='http://img465.imageshack.us/img465/9729/hjfgh9iw.gif' border='0' weight='10'> <b>Własne menu</b><br>";
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['080']."</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."messages.php' class='side'>".$locale['081']."</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."members.php' class='side'>".$locale['082']."</a><br>\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".ADMIN."index.php' class='side'>".$locale['083']."</a><br>\n";
}
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['084']."</a><hr>\n";
if ($msg_count) echo "<br><br><center><b><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['085'], $msg_count).($msg_count == 1 ? $locale['086'] : $locale['087'])."</a></b></center>\n";
} else {
openside($locale['060']);
echo "<div align='center'>".(isset($loginerror) ? $loginerror : "")."
<form name='loginform' method='post' action='".FUSION_SELF."'>
".$locale['061']."<br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
".$locale['062']."<br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y' title='".$locale['063']."' style='vertical-align:middle;'>
<input type='submit' name='login' value='".$locale['064']."' class='button'><br>
</form>
<br>\n";
if ($settings['enable_registration']) {
echo "".$locale['065']."<br><br>\n";
}
echo $locale['066']."
</div>\n";
echo "<hr>";
}
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."user_info_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."user_info_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."user_info_panel/locale/Polish.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 = ("Info");
$sitename = "<font color='black'>Nie oficjalne centrum Sony Ericssona K300i</font>";
echo "<div style='text-align:center;font-weight:bold'><font color='black'>".$sitename."<br />".$locale['OUE_001']."</font><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 "<font color='black'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."</font>' class='side'><font color='teal'>".$data['user_name']."</a></font><br />".$locale['OUE_002']."</div>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
echo "<hr color='black'><font color='black'>";
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 color='black'>".$locale['012']."<br /><br /></font>\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' alt='online'></nobr>";
} elseif ($lastseen < 360) {
$lastseen="<nobr><img src='".IMAGES."offline.gif' alt='offline'></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 "<font color='red'><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></font>";
}
}
echo "</table>";
echo "<font color='black'><hr color='black'>";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
echo $locale['011'].dbrows($result)."<br />\n";
echo "<hr color='black'>";
$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 "<table border='0' width='100%' class='small'>
</table>";
closeside();
}
?>
I chodzi mi, żeby wyświetlało się więcej użytkowników online...
Wylaczaj emotki i uzywaj tagow wstawiajac kod/Pieka
iras12 dodał/a następującą grafikę:
Edytowane przez Pieka dnia 02.07.2006 16:48:27
|