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)
Started on the old forum in March 2008 · view the original in the archive · old links redirect here
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)
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.
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)
a didnt nw that dont really nw alot about the lavalair script i should have a look sumtym
Want something coded email me at sales@webnwaphost.com for a prices.
What about the part where the user is logged out and when viewng his or her profile you would see Last Seen: Logging Out any help?
External image (may be gone) WapCHAT Forum Currenltly changing over to xhtml External image (may be gone) My Dowloads Site External image (may be gone)
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