Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Last seen user panel modification request

Hi, I had on my old website last seen user panel. Can somebady edit it to work good on PHP F9 website ? And what I can do to this panel shows good some Polish letrers ? I translate locale file ho is in this panel, but website not shows good Polish letters.

This is code of panels
CodeDownload  
<?php
/*---------------------------------------------------+
| PHP-Fusion 7 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2013 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 (!defined("IN_FUSION")) { die("Access Denied"); }

if (file_exists(LOCALE."last_seen_users_panel/locale/".$settings['locale'].".php")) {
   include LOCALE."last_seen_users_panel/locale/".$settings['locale'].".php";
} else {
   include LOCALE."last_seen_users_panel/locale/Polish.php";
}

openside($locale['lsup000']);
$result = dbquery("SELECT * FROM ".DB_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%'>\n";
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;
      }
if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar']))  {
   $img = "<img src='".BASEDIR."images/avatars/".$data['user_avatar']."'  title='".$data['user_name']."' alt='".$data['user_name']."' style='border:0px' align='center' width='40px' height='40px' >";
   }
     else { $img = "<img src='".INFUSIONS."last_seen_users_panel/images/noAvatar.jpg' title='".$data['user_name']."' style='border:0px' width='40px' height='40px' >";
   }
      echo "<tr>\n<td class='side-small' align='center'>\n";
      echo "<table><td><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' >".$img."</a></td>\n";
      echo "<td class='side-small'>".$locale['lsup007']." <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' >".$data['user_name']."</a><br />".$locale['lsup008']." ".showdate("%d.%m.%y", $data['user_joined'])."<br>\n";
      echo "".$lastseen."</td>\n</table></td></tr>\n";
   }
}
echo "</table>";
closeside();
?>

Thread Information
Author
Replies
1 post
Views
1,006 times
Last Post
Last updated on 3 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: omikron20