Invisible Mode On/off

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

28 replies · 2,771 views · started 18 years ago · 1 min read

TL;DR · summary of 28 replies
  • khan1 is trying to add a row with a visible mode (varchar 10 default off) in the ibwf_users table and update it to on using an action.
  • The core.php code needs to be updated or replaced for users to see links like forum, inbox after setting the visible mode to 'on'.
  • There are conflicting opinions about whether the script is for Lavalair or Wapdesire, which could affect the coding approach.
  • rukiya suggests using a MySQL query to update the ibwf_users table and add it into core.php.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

11 participants
khan1 Developer · 101 posts #1

need help

added row as visible (varchar) default off in ibwf_users

in index.php

else if($action=="visible")
{
    echo "<head>";
    echo "<title>visible</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
    $uid = getuid_sid($sid);
    echo "<form action=\"genproc.php?action=upvisible&sid=$sid\" method=\"post\">";
    echo "<select name=\"visible\">";
    echo "<option value=\"off\">no</option>";
    echo "<option value=\"on\">yes</option>";
    echo "</select>";
    echo "<input type=\"Submit\" name=\"submit\" Value=\"Save\"></form>";
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
}
khan1 Developer · 101 posts #2

in genproc

else if($action=="upvisible")
{

$visible = $_GET["visible"];
     
    echo "<head>";
    echo "<title>Ghost Mode</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";    
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
    $ghost = mysql_query("UPDATE ibwf_users SET visible='".$visible."' WHERE id='".$uid."'");

  if($ghost)
        {
            echo "<img src=\"images/ok.gif\" alt=\"o\"/>Ghost Mode updated successfully
";
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Can't update your Ghost Mode
";
        } 
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
    echo "</body>";
}
khan1 Developer · 101 posts #3

in core

 $ttime = time();
    
   $ghost = mysql_fetch_array(mysql_query("SELECT visible FROM ibwf_users WHERE id='".$uid."'"));
if($ghost[0]=="on")
{

    $res = mysql_query("UPDATE ibwf_users SET lastact='" . $ttime . "' WHERE id='" . $uid . "'");
    $res = mysql_query("INSERT INTO ibwf_online SET userid='" . $uid . "', actvtime='" . $ttime . "', place='" . $place . "', placedet='" . $plclink . "'");
    if(!$res)
    {
        // most probably userid already in the online list
        // so just update the place and time

please help where am i doing wrong

also what is this a.name / b.place

    a.name,a.plusses, b.place, b.userid FROM ibwf_users a
    INNER JOIN ibwf_online b ON a.id = b.userid
rukiya Lead · 569 posts #4

in core

$ghost = mysql_fetch_array(mysql_query("SELECT visible FROM ibwf_users WHERE id='".$uid."'"));
if($ghost[0]=="on")

please help where am i doing wrong

also what is this a.name / b.place

    a.name,a.plusses, b.place, b.userid FROM ibwf_users a
    INNER JOIN ibwf_online b ON a.id = b.userid

it will be

else if($action=="upvisible")
{

$visible = $_POST["visible"];
     
    echo "<head>";
    echo "<title>Ghost Mode</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";    
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
    $ghost = mysql_query("UPDATE ibwf_users SET visible='".$visible."' WHERE id='".$uid."'");

  if($ghost)
        {
            echo "<img src=\"images/ok.gif\" alt=\"o\"/>Ghost Mode updated successfully
";
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Can't update your Ghost Mode
";
        } 
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
    echo "</body>";
}

a.name,a.plusses, b.place, b.userid FROM ibwf_users a INNER JOIN ibwf_online b ON a.id = b.userid is a mysql select command using innner join mode to join 2 sql table. here a is named for 1st sql table=ibwf_users and b is 2nd sql table=ibwf_online WHERE id row of ibwf_users= userid row of ibwf_online

khan1 Developer · 101 posts #5

thanks i updated visible mode to on using visible action but now when i checked mySQL ibwf_users table there's no value in visible row i mean no on/off in visible row in my id default value i have kept to off (varchar 10) characters = 10

i have added link to change mode in login page also after i updated visible mode to on after entering the forum in main menu i can only see time no other links to forum / inbox etc...

i tried changing mode to on / off still i can only see time no other links to forum / inbox etc...

SiLeNce Developer · 138 posts #6

hey khan1 ..

use this code ~

add the query into example ibwf_users

visible char(1) NOT NULL default '0',

/////

for core.php

edit this code or replace if you use lavalair ..

function addonline($uid,$place,$plclink) { ////for hidden user from online list n not active $visible=mysql_fetch_array(mysql_query("SELECT visible FROM ibwf_users WHERE id='".$uid."'")); if($visible[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 $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(mysql_query("SELECT value FROM ibwf_settings WHERE id='2'"));

        $result = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online"));

      if($result[0]>=$maxmem[0])
      {
        $tnow = date("D d M Y - H:i");
        mysql_query("UPDATE ibwf_settings set name='".$tnow."', value='".$result[0]."' WHERE id='2'");
      }
      $maxtoday = mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
      if($maxtoday[0]==0||$maxtoday=="")
      {
        mysql_query("INSERT INTO ibwf_mpot SET ddt='".date("d m y")."', ppl='1', dtm='".date("H:i:s")."'");
        $maxtoday[0]=1;
      }
      if($result[0]>=$maxtoday[0])
      {
        mysql_query("UPDATE ibwf_mpot SET ppl='".$result[0]."', dtm='".date("H:i:s")."' WHERE ddt='".date("d m y")."'");
      }

}

///////

for cpanel or where you want to put visible n invisible users ..

example login.php..

$noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE visible='0' AND id='".$who."'")); if($noi[0]==1) { echo "<a href="genproc.php?action=visible&sid=$sid">Login As Invisible</a> "; }else{ echo "<a href="genproc.php?action=unvisible&sid=$sid">Login As Visible</a> "; }

////

and the genproc.php is ..

else if($action=="visible") { echo "<card id="main" title="Invisible Users">"; echo " "; $res = mysql_query("Update ibwf_users SET visible='1' WHERE id='".$uid."'"); if($res) { echo "<img src="images/ok.gif" alt="O"/>Visible successfully"; }else{ echo "<img src="images/notok.gif" alt="X"/>Error Visiblilty""; } echo "

"; echo "<a href="profile.php?action=viewuser&who=$uid&sid=$sid">My Profile</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; }

else if($action=="unvisible") { echo "<card id="main" title="Invisible Users">"; echo " "; $res = mysql_query("Update ibwf_users SET visible='0' WHERE id='".$uid."'"); if($res) { echo "<img src="images/ok.gif" alt="O"/>Unvisible successfully"; }else{ echo "<img src="images/notok.gif" alt="X"/>Error Visiblilty"; } echo "

"; echo "<a href="profile.php?action=viewuser&who=$uid&sid=$sid">My Profile</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; }

// Please tell me if the script not working ok .. im not use the coding but i want help you easy to coded the script ..

sorry for my language External image (may be gone)(

amylee Principal · 1,092 posts #11

why does it matter? both are the same script

WhiteWarrior Principal · 1,419 posts #12

but this is 4 lavalair script or wapdesire??

How many more times do we ALL have to tell you lavalair is wapdesire, meaning, the coding for wapdesire is the SAME coding as the lavalair coding...

everything for funmobile, wapdesire will work on a lavalair 
everything for wapdesire , lavalair will work with funmobile
everything for  funmobile, lavalair will work with wapdesire
subzero Super moderator Fellow · 3,954 posts #16

but this options add only 4 staff members...External image (may be gone)

type this on the link.

if(ismod($uid))
{
echo "<a href=\"ghost_mode.php\">Ghost Mode Only admins/mods </a>";
}

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

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