Need Little Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need Little Help

    I have started new script on community similar to prodigits but i need some help

    i think it is very little error but i missed it so please help

    if($way(staff($u)){
    if($way[ghost]==0){
    echo "<br /> <a href="$allow?a=$a&amp;ref=$ref&amp;ghost=on">H ide me</a>|";
    }else{
    echo "<br /><a href="$allow?a=$a&amp;ref=$ref&amp;ghost=off"> Show Me</a>|";
    }
    }
    =================================
    my function for ghost mode for staff is

    function ghost($act){
    global $u;

    if($act=="on"){
    $value = 1;
    }else{
    $value = 0;
    }

    $info = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='".$u."'"));
    if(staff($u)){

    $res = mysql_query("UPDATE users SET
    hidden='".$value."'

    WHERE id='".$u."'");
    if($res){
    if($act=="on"){
    mysql_query("DELETE FROM online WHERE user='".$u."'");
    }
    $ret = "<span class="spansuccess">You are Invisible now</span><br />";
    }else{
    $ret = errorSQL();
    }
    }else{
    $ret = "<span class="spanfailed">Don't have a permission to continue.</span><br />";
    }
    return $ret;
    }


    the error which i am getting is Hide me option showing on page but as one staff opted for hide that show me is not shoing for them

    is there any error? or should i use else if there?
    Last edited by spiderwebs; 17.03.16, 13:10.
    E107 Security Team Leader
    Proudly Support AccountLab Plus Billing Software

    Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
    ------------------

    #2
    This line is a little confusing: if($way[ghost]==0){

    Comment


      #3
      Originally posted by something else View Post
      This line is a little confusing: if($way[ghost]==0){
      Hi Someting else here i did some changes that one was previous code which give some error now this code i used the error i am testing on localhost a staff member want to be invisible if he clicks on invisible he/she hidden but there show me option is not shoing for them i have to do manually from browser by putting off in place of on
      E107 Security Team Leader
      Proudly Support AccountLab Plus Billing Software

      Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
      ------------------

      Comment


        #4
        is $way[ghost] a mysql array?

        Also best to put it in quotes to stop any warning errors: $way['ghost'] unless ghost is defined

        Also above it now its edited to $way() rather than $way[]

        So without seeing what $way is about its hard to help

        Comment


          #5
          Originally posted by something else View Post
          is $way[ghost] a mysql array?

          Also best to put it in quotes to stop any warning errors: $way['ghost'] unless ghost is defined

          Also above it now its edited to $way() rather than $way[]

          So without seeing what $way is about its hard to help
          yes its mysql array

          i have tried that but still same issue hide option is only viewing after hiding again hide option is there
          E107 Security Team Leader
          Proudly Support AccountLab Plus Billing Software

          Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
          ------------------

          Comment


            #6
            Is the mysql array suppose to be: $way['hidden'] ? the same as in your function?

            Comment


              #7
              yes sorry that the error i fixed

              but still the same issue
              E107 Security Team Leader
              Proudly Support AccountLab Plus Billing Software

              Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
              ------------------

              Comment


                #8
                Hope you have fixed this, Iv gone as far as i can as i can help without seeing full/updated code

                Comment


                  #9
                  yes thanks mate i am able to fix it

                  Will ask if i need further help
                  E107 Security Team Leader
                  Proudly Support AccountLab Plus Billing Software

                  Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
                  ------------------

                  Comment

                  Working...
                  X