Pradinis
Pagalba
Užsisakyk!
- Reklamą
- Hostingą
- El. pašto dėžutę
Užsisakyk!
Įrankiai
Pasidalink
- Visos temos
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Žaliems |
Autorius: legionas | Peržiūrų: 2547 |
legionas Narys Fruktas Pranešimai: 29 Įstojęs: 2010 Kov. 21 15:03:09 | |
<?php /*-------------------------------------------------------+ | PHP-Fusion Content Management System | Copyright © 2002 - 2008 Nick Jones | http://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: online_users_panel.php | Author: ptown67 | Website: http://pennerprofi.bplaced.net +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ if (!defined("IN_FUSION")) { die("Access Denied"); } add_to_head(" <link rel='stylesheet' type='text/css' href='".INFUSIONS."online_users_panel/tooltip.css' /> <script src='".INFUSIONS."online_users_panel/jquery.tooltip.pack.js' type='text/javascript'></script> <script type='text/javascript'> $(function() { $('#boxover a').tooltip({ track: true, delay: 0, showURL: false, showBody: ' - ', fade: 250 }); }); </script> "); $result = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'")); if (dbrows($result)) { $result = dbquery("UPDATE ".DB_ONLINE." SET online_lastactive='".time()."' WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'").""); } else { $result = dbquery("INSERT INTO ".DB_ONLINE." (online_user, online_ip, online_lastactive) VALUES ('".($userdata['user_level'] != 0 ? $userdata['user_id'] : "0")."', '".USER_IP."', '".time()."')"); } $result = dbquery("DELETE FROM ".DB_ONLINE." WHERE online_lastactive<".(time()-600).""); openside($locale['global_010']); $result = dbquery( "SELECT ton.*, tu.user_id,user_name FROM ".DB_ONLINE." ton LEFT JOIN ".DB_USERS." tu ON ton.online_user=tu.user_id" ); $guests = 0; $members = array(); while ($data = dbarray($result)) { if ($data['online_user'] == "0") { $guests++; } else { array_push($members, array($data['user_id'], $data['user_name'])); } } echo THEME_BULLET." ".$locale['global_011'].": ".$guests."<br />\n"; echo THEME_BULLET." ".$locale['global_012'].": ".count($members)."<br />\n"; echo "<hr />"; $result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 0,10"); echo "<div id='boxover'><table width='100%' cellpadding='0' cellspacing='0'>"; 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 = "<img src='".INFUSIONS."online_users_panel/images/online.png' border='0' alt='Online' />"; } elseif ($lastseen < 600){ $lastseen = "<img src='".INFUSIONS."online_users_panel/images/10min.png' border='0' alt='10Min' />"; } else { $lastseen = "<img src='".INFUSIONS."online_users_panel/images/offline.png' border='0' alt='Offline' />"; } if ($data['user_level'] == 103) $userlevel = "Administratorius"; if ($data['user_level'] == 102) $userlevel = "Super Administratorius"; if ($data['user_level'] == 101) $userlevel = "Narys"; echo "<tr>\n<td class='side-small' align='left'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".trimlink($data['user_name'],30)." [".$userlevel."] - Prisiregistraves: ".showdate("longdate", $data['user_joined'])." - Paskutinis apsilankymas: ".showdate("longdate", $data['user_lastvisit'])."' class='side'>"; echo trimlink($data['user_name'],15)."</a></td><td class='side-small' align='right'>".$lastseen."</td></tr>"; } } echo "</table></div>"; echo "<hr />\n".THEME_BULLET." ".$locale['global_014'].": ".number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'"))."<br />\n"; if (iADMIN && checkrights("M") && $settings['admin_activation'] == "1") { echo THEME_BULLET." <a href='".ADMIN."members.php".$aidlink."&status=2' class='side'>".$locale['global_015']."</a>"; echo ": ".dbcount("(user_id)", DB_USERS, "user_status='2'")."<br />\n"; } $data = dbarray(dbquery("SELECT user_id,user_name FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1")); echo THEME_BULLET." ".$locale['global_016'].": <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".trimlink($data['user_name'],15)."</a>\n"; closeside(); ?> ............................................................................................................................ Kur reikia iterpti ši koda kad if (checkvip($data['user_vip'])) echo "<img src='".IMAGES."vip.png' alt='VIP Narys' title='VIP Narys'>"; ir paveiksliuką kad rodytų vip ženkliuka |
|
switz Narys Tankas Pranešimai: 2261 Įstojęs: 2009 Lap. 7 14:11:14 | |
Išjunk smailus pirmiausiai |
|
legionas Narys Fruktas Pranešimai: 29 Įstojęs: 2010 Kov. 21 15:03:09 | |
Išjungiau |
|
Waldoss Narys Ekspertas Pranešimai: 2891 Įstojęs: 2009 Kov. 26 17:03:56 | |
<?php Neesu šimtai procentų įsitikinęs kad veiks,bet pabandyk. http://www.dviratis.ipp.lt Redagavo Waldoss 2010 Kov. 27 17:03:24 |
|
legionas Narys Fruktas Pranešimai: 29 Įstojęs: 2010 Kov. 21 15:03:09 | |
Neveikia |
|
legionas Narys Fruktas Pranešimai: 29 Įstojęs: 2010 Kov. 21 15:03:09 | |
šitas kodas kito paneles pabandikite gal išeis su tuo: <?php /*-------------------------------------------------------+ | PHP-Fusion Content Management System | Copyright © 2002 - 2008 Nick Jones | http://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: online_users_panel.php | Author: ptown67 | Website: http://pennerprofi.bplaced.net +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ if (!defined("IN_FUSION")) { die("Access Denied"); } add_to_head(" <link rel='stylesheet' type='text/css' href='".INFUSIONS."online_users_panel/tooltip.css' /> <script src='".INFUSIONS."online_users_panel/jquery.tooltip.pack.js' type='text/javascript'></script> <script type='text/javascript'> $(function() { $('#boxover a').tooltip({ track: true, delay: 0, showURL: false, showBody: ' - ', fade: 250 }); }); </script> "); $result = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'")); if (dbrows($result)) { $result = dbquery("UPDATE ".DB_ONLINE." SET online_lastactive='".time()."' WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'").""); } else { $result = dbquery("INSERT INTO ".DB_ONLINE." (online_user, online_ip, online_lastactive) VALUES ('".($userdata['user_level'] != 0 ? $userdata['user_id'] : "0")."', '".USER_IP."', '".time()."')"); } $result = dbquery("DELETE FROM ".DB_ONLINE." WHERE online_lastactive<".(time()-600).""); openside($locale['global_010']); $result = dbquery( "SELECT ton.*, tu.user_id,user_name FROM ".DB_ONLINE." ton LEFT JOIN ".DB_USERS." tu ON ton.online_user=tu.user_id" ); $guests = 0; $members = array(); while ($data = dbarray($result)) { if ($data['online_user'] == "0") { $guests++; } else { array_push($members, array($data['user_id'], $data['user_name'])); } } echo THEME_BULLET." ".$locale['global_011'].": ".$guests."<br />\n"; echo THEME_BULLET." ".$locale['global_012'].": ".count($members)."<br />\n"; echo "<hr />"; $result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 0,10"); echo "<div id='boxover'><table width='100%' cellpadding='0' cellspacing='0'>"; 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 = "<img src='".INFUSIONS."online_users_panel/images/online.png' border='0' alt='Online' />"; } elseif ($lastseen < 600){ $lastseen = "<img src='".INFUSIONS."online_users_panel/images/10min.png' border='0' alt='10Min' />"; } else if (checkvip($data['user_vip'])) echo "<img src='".IMAGES."vip.png' alt='VIP Narys' title='VIP Narys'>" { $lastseen = "<img src='".INFUSIONS."online_users_panel/images/offline.png' border='0' alt='Offline' />"; } if ($data['user_level'] == 103) $userlevel = "Administratorius"; if ($data['user_level'] == 102) $userlevel = "Super Administratorius"; if ($data['user_level'] == 101) $userlevel = "Narys"; echo "<tr>\n<td class='side-small' align='left'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".trimlink($data['user_name'],30)." [".$userlevel."] - Prisiregistraves: ".showdate("longdate", $data['user_joined'])." - Paskutinis apsilankymas: ".showdate("longdate", $data['user_lastvisit'])."' class='side'>"; echo trimlink($data['user_name'],15)."</a></td><td class='side-small' align='right'>".$lastseen."</td></tr>"; } } echo "</table></div>"; echo "<hr />\n".THEME_BULLET." ".$locale['global_014'].": ".number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'"))."<br />\n"; if (iADMIN && checkrights("M") && $settings['admin_activation'] == "1") { echo THEME_BULLET." <a href='".ADMIN."members.php".$aidlink."&status=2' class='side'>".$locale['global_015']."</a>"; echo ": ".dbcount("(user_id)", DB_USERS, "user_status='2'")."<br />\n"; } $data = dbarray(dbquery("SELECT user_id,user_name FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1")); echo THEME_BULLET." ".$locale['global_016'].": <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".trimlink($data['user_name'],15)."</a>\n"; closeside(); ?> |
|
bruzgis Narys Ekspertas Pranešimai: 3368 Įstojęs: 2006 Geg. 9 18:05:02 | |
tu greiciau bana gausi uz taisykliu pazeidimus ir savo kvailus vaidinimus negu pagalbos sulauksi |
|
legionas Narys Fruktas Pranešimai: 29 Įstojęs: 2010 Kov. 21 15:03:09 | |
chipass parašė: tu greiciau bana gausi uz taisykliu pazeidimus ir savo kvailus vaidinimus negu pagalbos sulauksi Negasdink gausiu.tai gausiu ir ne be reikalo |
Peršokti į forumą: |