What would be the best way to do this on lava script. I want it so owners can appear to be offline. I've put an extra field on users table called visibility and set up a link in ownercp to change this from 0 to 1 as required whats the best way to do the rest?
Invisibility Mode
Collapse
X
-
bombTags: None
-
What would be the best way to do this on lava script. I want it so owners can appear to be offline. I've put an extra field on users table called visibility and set up a link in ownercp to change this from 0 to 1 as required whats the best way to do the rest?[/b]
THIS ONE WORKS FINE!
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
Comment
-
linkrx7
my new script has it all users can use the option and owners can see the invisible ppl in online list
Comment
-
bomb -
linkrx7
i had really annoying error in online list if only person online was hidden the sql from getnumonline() didnt wana work lol
function getnumonline($sid)
{
if(isowner(getuid_sid($sid))){
$online=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users a INNER JOIN online b ON a.id=b.uid"));
}else{
$online=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users a INNER JOIN online b ON a.id=b.uid"));
$count=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE hidden='1'"));
if($count[0]>1){$online[0]=$online[0]-$count[0];}
}
return $online[0];
}
i had to do this
else if(($action=="online")&&($mode==""))
{
addonline(getuid_sid($sid),"Online List","index.php?action=$action");
$nick=getnick_sid($sid);
echo head_tag($nick."@Online List",1,$nick);
$title="Online Users ".getnumonline($sid)."";
$main=$center;
if($page==""||$page<=0)$page=1;
$num_items=getnumonline($sid);
if(getnumonline($sid)==0){$items_per_page=0;}
else{$items_per_page=10;}
$num_pages=ceil($num_items/$items_per_page);
if($page>$num_pages)$page=$num_pages;
$limit_start=($page-1)*$items_per_page;
if(!isowner(getuid_sid($sid))){$hidden="a.hidden=& #39;0'";}
else{$hidden="a.hidden<'2'";}
$sql="
SELECT a.username,a.level, b.place, b.uid, a.hidden
FROM users a INNER JOIN online b ON a.id = b.uid
WHERE $hidden
GROUP BY 1,2 LIMIT $limit_start, $items_per_page
";
$items=mysql_query($sql);
$main.=mysql_error();
while($item=mysql_fetch_array($items))
{
if($item[1]=='0'){$tit="";}
if($item[1]=='1'){$tit="*";}
if($item[1]=='2'){$tit="*";}
if($item[1]=='3'){$tit="*";}
if($item[1]=='4'){$tit="*";}
$sex=mysql_fetch_array(mysql_query("SELECT sex, image FROM profiles WHERE uid='$item[3]'"));
if($sex[0]=="M"){$usersex="<img src=\"images/male.gif\" alt=\"(M)\"/>";}
if($sex[0]=="F"){$usersex="<img src=\"images/female.gif\" alt=\"(F)\"/>";}
if($sex[0]==""){$usersex="";}
if($sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1);}
if($item[4]==1){$hide="<img src=\"images\hidden.gif\" alt=\"[H]\"/>";}
if($item[4]==0){$hide="";}
$main.="$usersex<a href=\"profiles.php?who=$item[3]&sid=$sid\">$tit$item[0]$tit</a>$hide - $item[2]
";
}
if($page>1){
$ppage=$page-1;
$main.="<a href=\"index.php?action=online&page=$ppage& ;sid=$sid\">-Prev</a> ";
}
if($page<$num_pages){
$npage=$page+1;
$main.="<a href=\"index.php?action=online&page=$npage& ;sid=$sid\">Next-</a>";
}
$main.="
$page/$num_pages";
if($num_pages>2){$main.=getjumper("main",$action," ","",$sid);}
$main.="
";
$L1="$sixkey<a $key6 href=\"inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"chat.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"main.php?sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
$main.=$center2;
if($script=="html"){echo html($sid,$title,1,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$ma in);}
else if($script=="xhtml"){echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$mai n);}
else if($script=="wml"){echo wml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main) ;}
echo foot_tag();
}
Comment
-
linkrx7
u can only use that code as reference like ideas and such i can assure u that code wont work if u copy and paste it lol
Comment
Comment