Invisible Mode On/off

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Invisible Mode On/off

    need help

    added row as visible (varchar) default off in ibwf_users

    in index.php

    Code:
    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>";
    }

    #2
    in genproc

    Code:
    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=&#39;".$visible."&#39; WHERE id=&#39;".$uid."&#39;");
    
      if($ghost)
            {
                echo "<img src=\"images/ok.gif\" alt=\"o\"/>Ghost Mode updated successfully
    ";
            }else{
              echo "<img src=\"images/notok.gif\" alt=\"x\"/>Can&#39;t update your Ghost Mode
    ";
            } 
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
        echo "</body>";
    }

    Comment


      #3
      in core


      Code:
       $ttime = time();
          
         $ghost = mysql_fetch_array(mysql_query("SELECT visible FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
      if($ghost[0]=="on")
      {
      
          $res = mysql_query("UPDATE ibwf_users SET lastact=&#39;" . $ttime . "&#39; WHERE id=&#39;" . $uid . "&#39;");
          $res = mysql_query("INSERT INTO ibwf_online SET userid=&#39;" . $uid . "&#39;, actvtime=&#39;" . $ttime . "&#39;, place=&#39;" . $place . "&#39;, placedet=&#39;" . $plclink . "&#39;");
          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

      Comment


        #4
        in core
        Code:
        $ghost = mysql_fetch_array(mysql_query("SELECT visible FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
        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[/b]
        it will be
        Code:
        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=&#39;".$visible."&#39; WHERE id=&#39;".$uid."&#39;");
        
          if($ghost)
                {
                    echo "<img src=\"images/ok.gif\" alt=\"o\"/>Ghost Mode updated successfully
        ";
                }else{
                  echo "<img src=\"images/notok.gif\" alt=\"x\"/>Can&#39;t update your Ghost Mode
        ";
                } 
            echo "<a href=\"index.php?action=main&amp;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

        Comment


          #5
          thanks
          i updated visible mode to on using visible action
          but
          now when i checked mySQL ibwf_users table
          there&#39;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...

          Comment


            #6
            hey khan1 ..

            use this code ~

            add the query into example ibwf_users

            `visible` char(1) NOT NULL default &#39;0&#39;,

            /////

            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=&#39;".$uid."&#39;"));
            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 <&#39;".$timeout."&#39;");
            ///now try to add user to online list
            $res = mysql_query("UPDATE ibwf_users SET lastact=&#39;".time()."&#39; WHERE id=&#39;".$uid."&#39;");
            $res = mysql_query("INSERT INTO ibwf_online SET userid=&#39;".$uid."&#39;, actvtime=&#39;".$tm."&#39;, place=&#39;".$place."&#39;, placedet=&#39;".$plclink."&#39;");
            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=&#39;".$tm."&#39;, place=&#39;".$place."&#39;, placedet=&#39;".$plclink."&#39; WHERE userid=&#39;".$uid."&#39;");


            }
            }
            $maxmem=mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE id=&#39;2&#39;"));

            $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=&#39;".$tnow."&#39;, value=&#39;".$result[0]."&#39; WHERE id=&#39;2&#39;");
            }
            $maxtoday = mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt=&#39;".date("d m y")."&#39;"));
            if($maxtoday[0]==0||$maxtoday=="")
            {
            mysql_query("INSERT INTO ibwf_mpot SET ddt=&#39;".date("d m y")."&#39;, ppl=&#39;1&#39;, dtm=&#39;".date("H:i:s")."&#39;");
            $maxtoday[0]=1;
            }
            if($result[0]>=$maxtoday[0])
            {
            mysql_query("UPDATE ibwf_mpot SET ppl=&#39;".$result[0]."&#39;, dtm=&#39;".date("H:i:s")."&#39; WHERE ddt=&#39;".date("d m y")."&#39;");
            }
            }[/b]

            ///////


            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=&#39;0&#39; AND id=&#39;".$who."&#39;"));
            if($noi[0]==1)
            {
            echo "<a href=\"genproc.php?action=visible&amp;sid=$sid\">L ogin As Invisible</a>
            ";
            }else{
            echo "<a href=\"genproc.php?action=unvisible&amp;sid=$sid\" >Login As Visible</a>
            ";
            }[/b]
            ////

            and the genproc.php is ..

            else if($action=="visible")
            {
            echo "<card id=\"main\" title=\"Invisible Users\">";
            echo "<p align=\"center\">";
            $res = mysql_query("Update ibwf_users SET visible=&#39;1&#39; WHERE id=&#39;".$uid."&#39;");
            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&amp;who=$uid&am p;sid=$sid\">My Profile</a>
            ";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
            echo "</p>";
            echo "</card>";
            }

            else if($action=="unvisible")
            {
            echo "<card id=\"main\" title=\"Invisible Users\">";
            echo "<p align=\"center\">";
            $res = mysql_query("Update ibwf_users SET visible=&#39;0&#39; WHERE id=&#39;".$uid."&#39;");
            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&amp;who=$uid&am p;sid=$sid\">My Profile</a>
            ";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
            echo "</p>";
            echo "</card>";
            }[/b]
            // 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 (

            Comment


              #7
              hey khan1 ..

              use this code ~

              add the query into example ibwf_users

              `visible` char(1) NOT NULL default &#39;0&#39;,[/b]
              better is as you are using number
              Code:
              `visible` tinyint(1) NOT NULL default &#39;0&#39;,

              Comment


                #8
                but this options add only 4 staff members...
                if like my post click:

                http://coding-talk.com/images/totall...ost_thanks.gif

                Comment


                  #9
                  wat do u mean sweetangel?
                  btw with lil mod u can make it every invisible can viewed by staffs lol any one want that code?? i will share
                  get cheap web hosting ever AdzeHost
                  ===================
                  get free hosting for life time hostwebswap not allowed
                  ===================
                  get free cpanel web hosting free cpanel hostingwap are allowed
                  ===================

                  ===================

                  Comment


                    #10
                    but this is 4 lavalair script or wapdesire??
                    if like my post click:

                    http://coding-talk.com/images/totall...ost_thanks.gif

                    Comment


                      #11
                      why does it matter? both are the same script

                      Comment


                        #12
                        but this is 4 lavalair script or wapdesire??[/b]
                        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...
                        Code:
                        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

                        Comment


                          #13
                          I wont add this at my wapdesire version but not so the code is complet...:?:
                          if like my post click:

                          http://coding-talk.com/images/totall...ost_thanks.gif

                          Comment


                            #14
                            I wont add this at my wapdesire version but not so the code is complet...:?:[/b]
                            thats because you are a bull**** copier and paster.

                            Comment


                              #15
                              core.php code not is correct
                              if like my post click:

                              http://coding-talk.com/images/totall...ost_thanks.gif

                              Comment

                              Working...
                              X