[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************************/ 4 /* PHP-NUKE: Web Portal System */ 5 /* =========================== */ 6 /* */ 7 /* Copyright (c) 2005 by Francisco Burzi */ 8 /* http://phpnuke.org */ 9 /* */ 10 /* This program is free software. You can redistribute it and/or modify */ 11 /* it under the terms of the GNU General Public License as published by */ 12 /* the Free Software Foundation; either version 2 of the License. */ 13 /************************************************************************/ 14 15 if ( !defined('BLOCK_FILE') ) { 16 Header("Location: ../index.php"); 17 die(); 18 } 19 20 global $user, $cookie, $prefix, $db, $user_prefix; 21 22 cookiedecode($user); 23 if (isset($_SERVER['REMOTE_ADDR'])) { $ip = $_SERVER['REMOTE_ADDR']; } 24 if (is_user($user)) 25 { 26 $uname = $cookie[1]; 27 $guest = 0; 28 } 29 else 30 { 31 if (!empty($ip)) { 32 $uname = $ip; 33 } else { 34 $uname = ""; 35 } 36 $guest = 1; 37 } 38 39 $guest_online_num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_session WHERE guest='1'")); 40 $member_online_num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_session WHERE guest='0'")); 41 42 $who_online_num = $guest_online_num + $member_online_num; 43 $who_online = "<div align=\"center\"><span class=\"content\">"._CURRENTLY." $guest_online_num "._GUESTS." $member_online_num "._MEMBERS."<br>"; 44 45 $content = "$who_online"; 46 47 if (is_user($user)) { 48 if (is_active("Private_Messages")) { 49 $row = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM ".$user_prefix."_users WHERE username='$uname'")); 50 $uid = intval($row['user_id']); 51 $newpm = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')")); 52 } 53 } 54 55 $row2 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_blocks WHERE bkey='online'")); 56 $title = filter($row2['title'], "nohtml"); 57 58 if (is_user($user)) { 59 $content .= "<br>"._YOUARELOGGED." <b>$uname</b>.<br>"; 60 if (is_active("Private_Messages")) { 61 $row3 = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM ".$user_prefix."_users WHERE username='$uname'")); 62 $uid = intval($row3['user_id']); 63 $numrow = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='1' OR privmsgs_type='5' OR privmsgs_type='0')")); 64 $content .= ""._YOUHAVE." <a href=\"modules.php?name=Private_Messages\"><b>$numrow</b></a> "._PRIVATEMSG.""; 65 } 66 $content .= "</span></div>"; 67 } else { 68 $content .= "<br>"._YOUAREANON."</span></div>"; 69 } 70 71 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |