Lavalair/invisible Users
Started on the old forum in February 2008 · view the original in the archive · old links redirect here
invincible mod or users? if you mean invincible mod when inserting the users to the online list do this CODE
function addonline($uid,$place,$plclink) { /////delete inactive users $tm = time(); $timeout = $tm - 420; //time out = 5 minutes $deloff = mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'"); ///now try to add user to online list if(!ismod($uid)) { $res = mysql_query("UPDATE ibwf_users SET lastact='".time()."' WHERE id='".$uid."'"); $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");
if(!$res) { //most probably userid already in the online list //so just update the place and time $res = mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."' WHERE userid='".$uid."'");
} } }
R.M.C
PHP Adovocate B)
yes m8 for invisible users TO HAVE THEY A OPTION TO BE INVISIBLE OR NOT . Sorry when i said "mod" i refered to "mode" . So i try something like this with a row in table ibwf_users wich name "invisible" if $invisuble[0]=1 then ann the user to online list else if $invisible[0]=0 dont add the user to online list ! BUT WHEN I DO THIS IN FUNCTION ADDONLINE .... IN THE LIST ONLINE ON THE CHAT APEARE -2 USERS OR -3 !!! I DONT KNOW TO DO THIS IS DONT WORK WELL thx
iengioi!
ok first creat a row call visible... place this below WHERE the user enter there pass and user name
echo "Login invincible ?:
<select name=\"visible\"><option value=\"on\">Yes</option><option value=\"off\">no</option></select>
";
//this in the post field
echo "<postfield name=\"visible\"
value=\"$(visible)\"/>";
//on the login page if user login successfully
just
update the visible row
mysql_query("UPDATE ibwf_users SET visible='".$_GET["visible"]."' WHERE nick='".$uid."'");
//addonline function CODE $tm = time(); $timeout = $tm - 420; //time out = 5 minutes $deloff = mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'"); ///now try to add user to online list
$mode = mysql_fetch_array(mysql_query("SELECT visible FROM ibwf_users WHERE id='".$uid."'")); if($mode[0]=="on") {
$res = mysql_query("UPDATE ibwf_users SET lastact='".time()."' WHERE id='".$uid."'"); $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'"); if(!$res) { //most probably userid already in the online list //so just update the place and time $res = mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."' WHERE userid='".$uid."'"); } } }
R.M.C
PHP Adovocate B)
Thanx m8 thanx very much it is work now External image (may be gone) , with little changes , it is work more that i have expected External image (may be gone)
iengioi!
at index.php page??? please help
if like my post click:
m8 nice code (invisible users) please add the code in core.php file and upload it coz v dont want our site to go offline please coz i will get error if i mess the core.php
why dont you make another(clone to main) site for testing purpose, then at least you could try by your self? External image (may be gone)
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
i have added mod invisible code i am getting this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 5
CODE
//////////////////////Function add user to online list External image (may be gone)
function addonline($uid,$place,$plclink) { $hidden=mysql_fetch_array(mysql_query("SELECT hidden FROM ibwf_users WHERE id='".$uid."'")); if($hidden[0]==0) { /////delete inactive users $tm = time(); $timeout = $tm - 420; //time out = 5 minutes $deloff = mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'"); ///now try to add user to online list
if(!ismod($uid)) { $res = mysql_query("UPDATE ibwf_users SET lastact='".time()."' WHERE id='".$uid."'"); $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'"); if(!$res) { //most probably userid already in the online list //so just update the place and time $res = mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."' WHERE userid='".$uid."'");
}
} } $maxmem=mysql_fetch_array(
sorry maybe it is somethig incompatible with your table users... but i have done some changes too at this code... This it was only an ideea and i make changes to work on my chat External image (may be gone)
iengioi!