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.
Not a member yet? Click here to register.
Forgot Password?

Please someone help! (members.php)

Asked Modified Viewed 2,587 times
Q
Qrmiz
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

healthy.5gigs.com/membersphp.jpg

Code looks like this:
$lastseen= time() - $data['user_lastvisit'];

if($lastseen < 60) {
$lastseen = "<nobr><img src='images/user_online.gif' style='vertical-align:middle;' title='User is Online' alt='User is Online'> <span class='small'>On</span></NOBR>";
} else {
$lastseen = "<nobr><img src='images/user_offline.gif' style='vertical-align:middle;' title='User is Offline' alt='User is Offline'> <span class='small'>Off</span></NOBR>";


and ofcourse:
   echo "<tr>\n<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>".$lastseen."</td>\n";


Please help me :(
0 replies

14 posts

K
kejonn
K
kejonn 10
  • Member, joined since
  • Contributed 160 posts on the community forums.
  • Started 16 threads in the forums
answered
Member

?? best response to this one...you need to be more specific in your cry for help :o.
0 replies
Q
Qrmiz
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Ok, i will try to explain more.
This is members.php
Those: Off/On shows if user is online. Vartotojo vardas=User name. Below Linas name is time, i don't know there did it come from :|
Qrmiz- is online (left side panel), but members.php shows, that Romas Vienarankis is online and Qrmiz off!:(
0 replies
B
bertm
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

i registered to your site to look a bit closer to the problem.

what i see is the following: the first person on a page appears not to have a on/offline status, but when you hover the person below, you see that person has the status of the first.

could you please upload your full members.php, so we can try to fix things?
0 replies
Q
Qrmiz
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

<?php
/*---------------------------------------------------+
| PHPFusion 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
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."members-profile.php";

opentable($locale['400']);
if (iMEMBER) {
   if (!isset($sortby)) $sortby = "all";
   $orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
   $result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
   $rows = dbrows($result);
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $i = 0;

   $search = array(
      "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
      "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
   );
   echo "<br /><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
   echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
   for ($i=0;$i < 36!="";$i++) {
      echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
      echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
   }
   echo "</tr>\n</table>\n<br /><hr><br />";


      echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2'><b>".$locale['401']."</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>Privati<br> žinutė</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>Pranešimai<br> Forume</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>Paskutinis<br> prisijungimas</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>Gimimo<br> metai</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>Email</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>WWW</b></td>
</tr>\n";
      $result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_name ASC LIMIT $rowstart,20");
      while ($data = dbarray($result)) {
         $cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;

if ($data['user_birthdate'] != "0000-00-00") {
      $months = explode("|", $locale['months']);
      $user_birthdate = explode("-", $data['user_birthdate']);
} else {
}
         echo "<tr>\n<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>".$lastseen."</td>\n";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>\n<a href='messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='PM schreiben'></a></td>";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".$data['user_posts']."</td>";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".showdate("%d.%m.%y", $data['user_joined'])."</td>";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>";
if ($data['user_birthdate'] != "0000-00-00") echo "".number_format($user_birthdate['2']).". ".$months[number_format($user_birthdate['1'])]." ".$user_birthdate['0']."";
      echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><a href='mailto:".str_replace("@","@",$data['user_email'])."' title='".str_replace("@","@",$data['user_email'])."'><IMG SRC='".THEME."forum/email.gif' BORDER='0' title ='Pastas' alt='Email'></a></td>";
      echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='www' title='www' style='border:0px;'></a></td>\n</tr>";
if ($data['user_web'] != "www") {
         $urlprefix = !strstr($data['user_web'], "http://") ? "http://" : "";
   }   

$lastseen= time() - $data['user_lastvisit'];

   if($lastseen < 60) {
   $lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_online.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Online</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
} else {
   $lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_offline.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Offline</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
   }   
      }
      echo "</table>\n";
   } else {
      echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
   }
   $search = array(
      "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
      "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
   );
   echo "<br /><hr><br />\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
   echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
   for ($i=0;$i < 36!="";$i++) {
      echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
      echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
   }
   echo "</tr>\n</table>\n";
} else {
   echo "<center><br>\n".$locale['003']."<br><br>\n</center>\n";
}
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&")."\n</div>\n";

require_once "side_right.php";
require_once "footer.php";
?>


:|
0 replies
Q
Qrmiz
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

i'm done with this problem, now everything is ok :)

but now i have another problem :)
in my members.php are: 'User name', 'Birthday', 'Forum Posts', 'City' and 'Last visit'.

Is it posible (and how?) to make, that then you press on 'Forum posts' they sorts from biggest to lowest (i hope you understand, i'm not very good in english...)

when you press 'City' it sorts from A to Z? etc.
Thanks!
0 replies
B
bertm
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

i'll try to code something to this.
please be patient ;)
0 replies
B
bertm
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

you must have updated your members.php again..
would you please send me the code of your new members.php? only then i can create a code that fits your needs :)
0 replies
Q
Qrmiz
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Quote

bertm wrote:
i'll try to code something to this.
please be patient ;)


ok, thank you ;) i can give you my members.php code, it will be easier i think?

<?php
/*---------------------------------------------------+
| PHPFusion 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
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."members-profile.php";

opentable($locale['400']);
if (iMEMBER) {
   if (!isset($sortby)) $sortby = "all";
   $orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
   $result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
   $rows = dbrows($result);
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $i = 0;

   $search = array(
      "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
      "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
   );
   echo "<br /><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
   echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
   for ($i=0;$i < 36!="";$i++) {
      echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
      echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
   }
   echo "</tr>\n</table>\n<br /><hr><br />";


      echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td align='center' class='tbl2'><b><img src='images/members/name.gif' alt='Vartotojo vardas'</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/pm.gif' alt='Privati žinutė'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/email.gif' alt='Email'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/forum.gif' alt='Pranešimai Forume'</a></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/last.gif' alt='Paskutinis prisijungimas'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/time.gif' alt='Gimimo metai'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/home.gif' alt='Miestas'></b></td>
</tr>\n";
      $result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_name ASC LIMIT $rowstart,20");
      while ($data = dbarray($result)) {
         $cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;

if ($data['user_birthdate'] != "0000-00-00") {
      $months = explode("|", $locale['months']);
      $user_birthdate = explode("-", $data['user_birthdate']);
} else {
}
         $lastseen = time() - $data['user_lastvisit'];
if($lastseen < 60) {
$lastseen = "<nobr><img src='images/members/online.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>Prisijungęs(us)</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
} else {
$lastseen = "<nobr><img src='images/members/offline.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>Neprisijungęs(us)</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
}         
         echo "<tr>\n<td class='$cell_color'>\n".$lastseen." <a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>\n";

         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>\n<a href='messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='Rašyti privačią žinutę'></a></td>";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><a href='mailto:".str_replace("@","@",$data['user_email'])."' title='".str_replace("@","@",$data['user_email'])."'><IMG SRC='".THEME."forum/email.gif' BORDER='0' title ='Paštas' alt='Email'></a></td>";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".$data['user_posts']."</td>";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".showdate("%d.%m.%y", $data['user_joined'])."</td>";
         echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>";
if ($data['user_birthdate'] != "0000-00-00") echo "".number_format($user_birthdate['2']).". ".$months[number_format($user_birthdate['1'])]." ".$user_birthdate['0']."";
         echo"<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><font alt='".$data['user_location']."' title='".$data['user_location']."'>".trimlink($data['user_location'],10)."</font></td>";

$lastseen= time() - $data['user_lastvisit'];

   if($lastseen < 60) {
   $lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_online.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Online</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
} else {
   $lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_offline.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Offline</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
   }   
      }
      echo "</table>\n";
   } else {
      echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
   }
   $search = array(
      "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
      "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
   );
   echo "<br /><hr><br />\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
   echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
   for ($i=0;$i < 36!="";$i++) {
      echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
      echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
   }
   echo "</tr>\n</table>\n";
} else {
   echo "<center><br>\n".$locale['003']."<br><br>\n</center>\n";
}
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&")."\n</div>\n";

require_once "side_right.php";
require_once "footer.php";
?>
0 replies
Q
Qrmiz
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

:D:D:D
0 replies
B
bertm
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

well.. i won't finish that today (it's alomost night in the netherlands ;)) so i'll continue tomorrow

but.. i'm on the way, it's nearly finished :)
0 replies
B
bertm
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

<?php
/*---------------------------------------------------+
| PHPFusion 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
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

include LOCALE.LOCALESET."members-profile.php";

opentable($locale['400']);
if (iMEMBER) {
if (!isset($sortby)) $sortby = "all";
$orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$i = 0;

$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<br /><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
for ($i=0;$i < 36!="";$i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
}
echo "</tr>\n</table>\n<br /><hr><br />";


echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td align='center' class='tbl2'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=username'><b><img src='images/members/name.gif' alt='Vartotojo vardas'></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/pm.gif' alt='Privati žinutė'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/email.gif' alt='Email'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=forum'><b><img src='images/members/forum.gif' alt='Pranešimai Forume'</a></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=joined'><b><img src='images/members/last.gif' alt='Paskutinis prisijungimas'></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=birthday'><b><img src='images/members/time.gif' alt='Gimimo metai'></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=location'><b><img src='images/members/home.gif' alt='Miestas'></b></a></td>
</tr>\n";

switch($_GET['sort']) {
case username:
$sortbyfield = "user_name";
$sortdirection = "ASC";
break;
case joined:
$sortbyfield = "user_joined";
$sortdirection = "ASC";
break;
case location:
$sortbyfield = "user_location";
$sortdirection = "ASC";
break;
case forum:
$sortbyfield = "user_posts";
$sortdirection = "DESC";
break;
case birthday:
$sortbyfield = "user_birthdate";
$sortdirection = "ASC";
break;
default:
$sortbyfield = "user_name";
$sortdirection = "ASC";
break; }

$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY ".$sortbyfield." ".$sortdirection." LIMIT $rowstart,20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;

if ($data['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data['user_birthdate']);
} else {
}
$lastseen = time() - $data['user_lastvisit'];
if($lastseen < 60) {
$lastseen = "<nobr><img src='images/members/online.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>Prisijungęs(us)</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
} else {
$lastseen = "<nobr><img src='images/members/offline.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>Neprisijungęs(us)</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
}
echo "<tr>\n<td class='$cell_color'>\n".$lastseen." <a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>\n";

echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>\n<a href='messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='Rašyti privačią žinutę'></a></td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><a href='mailto:".str_replace("@","@",$data['user_email'])."' title='".str_replace("@","@",$data['user_email'])."'><IMG SRC='".THEME."forum/email.gif' BORDER='0' title ='Paštas' alt='Email'></a></td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".$data['user_posts']."</td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".showdate("%d.%m.%y", $data['user_joined'])."</td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>";
if ($data['user_birthdate'] != "0000-00-00") echo "".number_format($user_birthdate['2']).". ".$months[number_format($user_birthdate['1'])]." ".$user_birthdate['0']."";
echo"<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><font alt='".$data['user_location']."' title='".$data['user_location']."'>".trimlink($data['user_location'],10)."</font></td>";

$lastseen= time() - $data['user_lastvisit'];

if($lastseen < 60) {
$lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_online.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Online</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
} else {
$lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_offline.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Offline</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
}
}
echo "</table>\n";
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<br /><hr><br />\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
for ($i=0;$i < 36!="";$i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['003']."<br><br>\n</center>\n";
}
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&sort=$sortbyfield&")."\n</div>\n";

require_once "side_right.php";
require_once "footer.php";
?>


well.. here it is :)

i've tested it, so it should work.
if you find any bugs, please tell me, i'll fix them :)
0 replies
Q
Qrmiz
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Thank you very much !!!!!!!!!!!!!! Very good job www.mycat.gr/infusions/forum/images/smilies/thumbsup.gif
Edited by Qrmiz on 23-07-2006 21:02,
0 replies
B
bertm
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

Qrmiz, thank you for the bug report cool

Here's the new code, let's say, version 1.02 grin

-- EDIT: removed the code, found a possible XSS bug sad
I'm fixing that right now...
Edited by bertm on 24-07-2006 14:03,
0 replies
B
bertm
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

so.. here's another bugfix, hope this works now ;)

v1.03, here it is:

<?php
/*---------------------------------------------------+
| PHPFusion 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
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

include LOCALE.LOCALESET."members-profile.php";

opentable($locale['400']);
if (iMEMBER) {
if (!isset($sortby)) $sortby = "all";
$orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$i = 0;

$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<br /><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
for ($i=0;$i < 36!="";$i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
}
echo "</tr>\n</table>\n<br /><hr><br />";


echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td align='center' class='tbl2'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=username'><b><img src='images/members/name.gif' alt='Vartotojo vardas'></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/pm.gif' alt='Privati žinutė'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b><img src='images/members/email.gif' alt='Email'></b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=forum'><b><img src='images/members/forum.gif' alt='Pranešimai Forume'</a></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=joined'><b><img src='images/members/last.gif' alt='Paskutinis prisijungimas'></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=birthday'><b><img src='images/members/time.gif' alt='Gimimo metai'></b></a></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='members.php?rowstart=".$rowstart."&sortby=".$sortby."&sort=location'><b><img src='images/members/home.gif' alt='Miestas'></b></a></td>
</tr>\n";

switch($_GET['sort']) {
case username:
$sort_request = "username";
$sortbyfield = "user_name";
$sortdirection = "ASC";
break;
case joined:
$sort_request = "joined";
$sortbyfield = "user_joined";
$sortdirection = "ASC";
break;
case location:
$sort_request = "location";
$sortbyfield = "user_location";
$sortdirection = "ASC";
break;
case forum:
$sort_request = "forum";
$sortbyfield = "user_posts";
$sortdirection = "DESC";
break;
case birthday:
$sort_request = "birthday";
$sortbyfield = "user_birthdate";
$sortdirection = "ASC";
break;
default:
$sort_request = "username";
$sortbyfield = "user_name";
$sortdirection = "ASC";
break; }

$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY ".$sortbyfield." ".$sortdirection." LIMIT $rowstart,20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;

if ($data['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data['user_birthdate']);
} else {
}
$lastseen = time() - $data['user_lastvisit'];
if($lastseen < 60) {
$lastseen = "<nobr><img src='images/members/online.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>Prisijungęs(us)</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
} else {
$lastseen = "<nobr><img src='images/members/offline.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>Neprisijungęs(us)</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
}
echo "<tr>\n<td class='$cell_color'>\n".$lastseen." <a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>\n";

echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>\n<a href='messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='Rašyti privačią žinutę'></a></td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><a href='mailto:".str_replace("@","@",$data['user_email'])."' title='".str_replace("@","@",$data['user_email'])."'><IMG SRC='".THEME."forum/email.gif' BORDER='0' title ='Paštas' alt='Email'></a></td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".$data['user_posts']."</td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".showdate("%d.%m.%y", $data['user_joined'])."</td>";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>";
if ($data['user_birthdate'] != "0000-00-00") echo "".number_format($user_birthdate['2']).". ".$months[number_format($user_birthdate['1'])]." ".$user_birthdate['0']."";
echo"<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'><font alt='".$data['user_location']."' title='".$data['user_location']."'>".trimlink($data['user_location'],10)."</font></td>";

$lastseen= time() - $data['user_lastvisit'];

if($lastseen < 60) {
$lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_online.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Online</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
} else {
$lastseen = "<nobr><img src='".INFUSIONS."shoutbox_panel/images/user_offline.gif' onMouseOver=\"toolTip('<span class=\'info\'>".$data['user_name']."</span> <span class=\'info2\'>is Offline</span>');\"onMouseOut=\"toolTip();\"'></NOBR>";
}
}
echo "</table>\n";
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<br /><hr><br />\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
for ($i=0;$i < 36!="";$i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['003']."<br><br>\n</center>\n";
}
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&sort=".$sort_request."&")."\n</div>\n";

require_once "side_right.php";
require_once "footer.php";
?>
0 replies

Category Forum

General Discussion

Labels

None yet

Statistics

  • Views 0 views
  • Posts 14 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

K
K
kejonn 10
  • Member, joined since
  • Contributed 160 posts on the community forums.
  • Started 16 threads in the forums
Q
Q
Qrmiz 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
B
B
bertm 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 2 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet