Last Seen At Profile,onlist Watever

Started on the old forum in March 2008 · view the original in the archive · old links redirect here

6 replies · 914 views · started 18 years ago · 1 min read

5 participants
cortez Junior · 27 posts #1

hey frndz i need last seen code in profile does any1 have it plz post it here thnx

Last seen at:Profile last seen at :logout last seen at :online list

ifr user is offline External image (may be gone)

crazybrumi Super moderator Principal · 1,064 posts #2

thast the code thats shows it

echo "[b]Where - [$here][/b]
";

to pull the information from database i use

$sqlSHY = mysql_query("SELECT * FROM members WHERE username='$name'"); 
 $here=(mysql_result($sqlSHY,0,"here"));

to update wer they are i use

$sql = "update members SET here='Viewing Profile' WHERE username='$username'";
$result = mysql_query($sql);

you can try modifying this for lavalair to get it workin in there but this is for my script i use

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

WhiteWarrior Principal · 1,419 posts #3

thast the code thats shows it

echo "Where - [$here]
";

to pull the information from database i use

$sqlSHY = mysql_query("SELECT * FROM members WHERE username='$name'"); 
  $here=(mysql_result($sqlSHY,0,"here"));

to update wer they are i use

$sql = "update members SET here='Viewing Profile' WHERE username='$username'";
 $result = mysql_query($sql);

you can try modifying this for lavalair to get it workin in there but this is for my script i use

Whats the point in modifying it?.. its already on the lavalair script on the online list, just move the coding to the profile part. External image (may be gone)

cortez Junior · 27 posts #5

really dis code is working on lavascript?

jsyguy23 Developer · 134 posts #7

CODE $sql = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM lastview WHERE whonick='".$whonick."'")); if ($sql[0]>10) { $sql = mysql_fetch_array(mysql_query("SELECT MAX(id) FROM lastview WHERE whonick='".$whonick."'")); $sql = $sql[0]-9; mysql_query("DELETE FROM lastview WHERE whonick='".$whonick."' AND id <'".$sql."'"); } $lv=getnick_sid($sid); $a = getuid_nick($whonick); if($a!=$uid) { mysql_query("INSERT INTO lastview SET lastview='".$lv."', whonick='".$whonick."', ltime='".time()."'"); } $sql= mysql_fetch_array(mysql_query("SELECT lastview,ltime FROM lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 1")); $a = getuid_nick($sql[0]); $link = "<a href="index.php?action=viewuser&sid=$sid&who=$a">$sql[0]</a>"; echo "last viewed by $link -"; $newtime =$sql[1]+(0 *60 *60); echo date("D d M y - h:i:s a",$newtime); echo "<a href="index.php?action=10pv&who=$who&sid=$sid">+</a> ";

/////////////////////////////////////// 10 viewers

else if($action=="10pv") { addonline(getuid_sid($sid),"Viewing Last 10 profileviewers",""); if($who==""||$who==0) { $mnick = $_POST["mnick"]; $who = getuid_nick($mnick); } $whonick = getnick_uid($who);

echo "<card id=\"main\" title=\"Viewing Last 10 profileviewers\">";
echo "

"; $sql= mysql_query("SELECT lastview,ltime FROM lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 10"); while($row = mysql_fetch_array($sql)) { $a = getuid_nick($row[0]); echo "<a href="index.php?action=viewuser&sid=$sid&who=$a">$row[0]</a>"; $newtime =$row[1]+(0 *60 60); echo " ".date("D d M y - h:i:s a",$newtime)." "; echo "------------ "; } $a = getuid_nick($whonick); echo "back to <a href="index.php?action=viewuser&sid=$sid&who=$a">$whonick</a>'s profile "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>"; echo "Home</a>"; echo "© coded by Rukiya"; echo " "; echo "</card>"; }

CREATE TABLE lastview ( whonick varchar(20) collate latin1_general_ci NOT NULL, id int(100) NOT NULL auto_increment, lastview varchar(20) collate latin1_general_ci NOT NULL, ltime int(100) NOT NULL default '0', PRIMARY KEY (whonick,id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1

you can mod this code to do that

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close