Zobacz temat
Modyfikacja welcome_message_panel!!
|
|
miczeg |
Dodany dnia 23.08.2006 10:35:54
|
Przedszkolak Postów: 14 Data rejestracji: 02.06.2006 15:22 |
Witam otóż mam taki problem z modyfikacja skryptu welcome message panel.Już dzięki pomocy @wooya jest troche lepiej ale tera wyswetla mi sie takie cos http://img243.ima...lembq8.jpg A to skrypt juz po modyfikacji: <?php Prosze sprawdzic i powiedziec co jest nie tak.A do tego chciałbym jeszcze dodac skrypt zeby sie uaktywnial po zalogowaniu uzytkownika.Z góry dziękuje.
/*---------------------------------------------------+ | PHP-Fusion 6 Content Management System +----------------------------------------------------+ | Copyright © 2002 - 2005 Nick Jones | http://www.php-fu... +----------------------------------------------------+ | 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; } opentable($locale['024']); echo stripslashes($settings['siteintro'])."\n <hr>"; echo "<table width='100%'> <tr> <td width='50%'>"; if (file_exists(INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php")) { include INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php"; } else { include INFUSIONS."last_seen_users_panel/locale/English.php"; } openside($locale['lsup000']); $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,10"); echo "<table cellpadding='0' cellspacing='0' width='100%'>"; 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= $locale['lsup001']; } elseif ($lastseen < 360){ $lastseen= $locale['lsup002']; } elseif ($iW > 0){ if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; } $lastseen = $iW." ".$text; } elseif ($iD > 0){ if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; } $lastseen = $iD." ".$text; } else { $lastseen = $iH.":".$iM.":".$iS; } echo "<tr>\n<td class='side-small' align='left'><img src='".THEME."images/bullet.gif' alt=''>\n"; echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n"; echo trimlink($data['user_name'], 20)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n"; } } echo "</table>"; echo "<br><center><img src='".THEME."images/bullet.gif' alt=''> ".$locale['014'].number_format(dbcount("(user_id)", "users", "user_status<='1'"))."</center>\n"; if ($settings['admin_activation'] == "1") echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['015'].dbcount("(user_id)", "users", "user_status='2'")."\n"; $data = dbarray(dbquery("SELECT user_id,user_name,user_color,user_prefix FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1")); echo "<center><img src='".THEME."images/bullet.gif' alt=''> ".$locale['011'].dbrows($result)."</center>\n"; echo "</td> <td width='50%'>"; if (file_exists(INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php")) { include INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php"; } else { include INFUSIONS."last_seen_users_panel/locale/English.php"; } openside($locale['lsup000']); $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,10"); echo "<table cellpadding='0' cellspacing='0' width='100%'>"; 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= $locale['lsup001']; } elseif ($lastseen < 360){ $lastseen= $locale['lsup002']; } elseif ($iW > 0){ if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; } $lastseen = $iW." ".$text; } elseif ($iD > 0){ if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; } $lastseen = $iD." ".$text; } else { $lastseen = $iH.":".$iM.":".$iS; } echo "<tr>\n<td class='side-small' align='left'><img src='".THEME."images/bullet.gif' alt=''>\n"; echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n"; echo trimlink($data['user_name'], 20)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n"; } } echo "</table>"; echo "<br><center><img src='".THEME."images/bullet.gif' alt=''> ".$locale['014'].number_format(dbcount("(user_id)", "users", "user_status<='1'"))."</center>\n"; if ($settings['admin_activation'] == "1") echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['015'].dbcount("(user_id)", "users", "user_status='2'")."\n"; $data = dbarray(dbquery("SELECT user_id,user_name,user_color,user_prefix FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1")); echo "<center><img src='".THEME."images/bullet.gif' alt=''> ".$locale['011'].dbrows($result)."</center>\n"; echo "</td> </tr> </table>"; closeside(); ?> Edytowane przez miczeg dnia 23.08.2006 11:31:49 |
|
|
Wścibski Gość |
Dodany dnia 25.11.2024 19:31:50
|
Pan Kontekstualny Postów: n^x Data rejestracji: Zawsze |
|
IP: localhost | |
slawekneo |
Dodany dnia 23.08.2006 17:02:13
|
Bywalec Postów: 915 Pomógł: 41 Data rejestracji: 12.03.2006 07:28 |
oto poprawiony kod (poprawki zaznaczone pogrubionym textem
Edytowane przez slawekneo dnia 23.08.2006 17:05:09 |
|
Przejdź do forum: |