disable login [lavalair script]

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

    disable login [lavalair script]

    i am haveing trouble codeing the login for the disable login i have coded the sql admincp an admin proc but have problem with the login.php if i use the codeing it shows the link blank

    put this in admin cp
    PHP Code:
    //////////////////

    else if($action=="chubi")
    {
        echo 
    "<card id=\"main\" title=\"Admin CP\">";
        
    $who $_GET["who"];
        
    $sid $_GET["sid"];
        
    $unick getnick_uid($who);
        
    $uid getuid_sid($sid);
        echo 
    "<onevent type=\"onenterforward\">";
        
    $avat getavatar($who);
        
    $email mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
        
    $site mysql_fetch_array(mysql_query("SELECT site FROM ibwf_users WHERE id='".$who."'"));
        
    $bdy mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$who."'"));
        
    $uloc mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$who."'"));
        
    $usig mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
        
    $sx mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
        
    $login mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$who."'"));
        
    $perm mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
        
    $specialid mysql_fetch_array(mysql_query("SELECT specialid FROM ibwf_users WHERE id='".$who."'"));
        
      echo 
    "<refresh>
            <setvar name=\"unick\" value=\"
    $unick\"/>
            <setvar name=\"savat\" value=\"
    $avat\"/>
            <setvar name=\"semail\" value=\"
    $email[0]\"/>
            <setvar name=\"usite\" value=\"
    $site[0]\"/>
            <setvar name=\"ubday\" value=\"
    $bdy[0]\"/>
            <setvar name=\"uloc\" value=\"
    $uloc[0]\"/>
            <setvar name=\"usig\" value=\"
    $usig[0]\"/>
            <setvar name=\"sx\" value=\"
    $sx[0]\"/>
            <setvar name=\"perm\" value=\"
    $perm[0]\"/>
            <setvar name=\"login\" value=\"
    $login[0]\"/>
            <setvar name=\"npwd\" value=\"\"/>
       "
    ;
      echo 
    "</refresh></onevent>";
        echo 
    "<p>";
        echo 
    "Nickname: <input name=\"unick\" maxlength=\"15\"/><br/>";
        echo 
    "Avatar: <input name=\"savat\" maxlength=\"100\"/><br/>";
        echo 
    "E-Mail: <input name=\"semail\" maxlength=\"100\"/><br/>";
        echo 
    "Site: <input name=\"usite\" maxlength=\"100\"/><br/>";
        echo 
    "Birthday<small>(YYYY-MM-DD)</small>: <input name=\"ubday\" maxlength=\"50\"/><br/>";
        echo 
    "Location: <input name=\"uloc\" maxlength=\"50\"/><br/>";
        echo 
    "Signature: <input name=\"usig\" maxlength=\"100\"/><br/>";
        echo 
    "Sex: <select name=\"usex\" value=\"$sx[0]\">";
        echo 
    "<option value=\"M\">Male</option>";
        echo 
    "<option value=\"F\">Female</option>";
        echo 
    "</select><br/>";
        echo 
    "Privileges: <select name=\"perm\" value=\"$perm[0]\">";
        echo 
    "<option value=\"0\">Normal</option>";
        echo 
    "<option value=\"1\">Moderator</option>";
        echo 
    "<option value=\"2\">Admin</option>";
        if(
    $uid==1) {
        echo 
    "<option value=\"3\">Owner</option>";
        }
        echo 
    "</select><br/>";
        echo 
    "Login Menu: <select name=\"login\" value=\"$login[0]\">";
        echo 
    "<option value=\"1\">Enable</option>";
        echo 
    "<option value=\"2\">Disable</option>";
        echo 
    "</select><br/>";
        echo 
    "VIP: <select name=\"specialid\" value=\"$specialid[0]\">";
        echo 
    "<option value=\"0\">Normal</option>";
        echo 
    "<option value=\"1\">Millionaire</option>";
        echo 
    "<option value=\"2\">Fimi Masters</option>";
        echo 
    "<option value=\"8\">Fimi Marines</option>";
        echo 
    "<option value=\"9\">Fimi Sniper</option>";
        echo 
    "</select><br/>";
        echo 
    "<anchor>Update";
        echo 
    "<go href=\"admproc.php?action=uprof&amp;sid=$sid&amp;who=$who\" method=\"post\">";
        echo 
    "<postfield name=\"unick\" value=\"$(unick)\"/>";
        echo 
    "<postfield name=\"savat\" value=\"$(savat)\"/>";
        echo 
    "<postfield name=\"semail\" value=\"$(semail)\"/>";
        echo 
    "<postfield name=\"usite\" value=\"$(usite)\"/>";
        echo 
    "<postfield name=\"ubday\" value=\"$(ubday)\"/>";
        echo 
    "<postfield name=\"uloc\" value=\"$(uloc)\"/>";
        echo 
    "<postfield name=\"usig\" value=\"$(usig)\"/>";
        echo 
    "<postfield name=\"usex\" value=\"$(usex)\"/>";
        echo 
    "<postfield name=\"perm\" value=\"$(perm)\"/>";
        echo 
    "<postfield name=\"login\" value=\"$(login)\"/>";
        echo 
    "<postfield name=\"specialid\" value=\"$(specialid)\"/>";
        echo 
    "</go></anchor>";
        echo 
    "<br/><br/>";
        echo 
    "Password: <input name=\"npwd\" format=\"*x\" maxlength=\"15\"/><br/>";
        echo 
    "<anchor>Change";
        echo 
    "<go href=\"admproc.php?action=upwd&amp;sid=$sid&amp;who=$who\" method=\"post\">";
        echo 
    "<postfield name=\"npwd\" value=\"$(npwd)\"/>";

        echo 
    "</go></anchor>";
        echo 
    "</p>";
        echo 
    "<p align=\"center\">";
        echo 
    "<a href=\"admincp.php?action=chuinfo&amp;sid=$sid\">";
      echo 
    "Users Info</a><br/>";
        echo 
    "<a href=\"index.php?action=admincp&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
      echo 
    "Admin CP</a><br/>";
      echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
      echo 
    "Home</a>";
      echo 
    "</p>";
        echo 
    "</card>";
        
    }
    else{
       echo 
    "<card id=\"main\" title=\"Admin CP\">";
      echo 
    "<p align=\"center\">";
      echo 
    "I don't know how did you get into here, but there's nothing to show<br/><br/>";
      echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
    echo 
    "Home</a>";
      echo 
    "</p></card>";

    and in adminproc.php put this code

    PHP Code:
    else if($action=="uprof")
    {
        
        
    $who $_GET["who"];
        
    $unick $_POST["unick"];
        
    $perm $_POST["perm"];
        
    $savat $_POST["savat"];
        
    $semail $_POST["semail"];
        
    $usite $_POST["usite"];
        
    $ubday $_POST["ubday"];
        
    $uloc $_POST["uloc"];
        
    $usig $_POST["usig"];
        
    $usex $_POST["usex"];
        
    $login $_POST["login"];
        
    $specialid $_POST["specialid"];
        echo 
    "<card id=\"main\" title=\"fimiwap\">";
      echo 
    "<p align=\"center\">";
      
    $onk mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$who."'"));
      
    $exs mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$unick."'"));
      if(
    $onk[0]!=$unick)
      {
          if(
    $exs[0]>0)
          {
            echo 
    "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>New nickname already exist, choose another one<br/>";
          }else
      {
      
    $res mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', login='".$login."', name='".$unick."', perm='".$perm."', specialid='".$specialid."' WHERE id='".$who."'");
      if(
    $res)
      {
        echo 
    "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
      }else{
        echo 
    "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
      }
      }
      }else
      {
      
    $res mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', login='".$login."', name='".$unick."', perm='".$perm."', specialid='".$specialid."' WHERE id='".$who."'");
      if(
    $res)
      {
        echo 
    "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
      }else{
        echo 
    "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
      }
      }
      echo 
    "<br/><a href=\"admincp.php?action=chuinfo&amp;sid=$sid\">";
      echo 
    "Users Info</a><br/>";
          echo 
    "<a href=\"index.php?action=admincp&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
      echo 
    "Admin CP</a><br/>";
      echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
    echo 
    "Home</a>";
      echo 
    "</p></card>";
    }

    //// 
    and in login.php put this code
    PHP Code:
    ///////

    $login mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$who."'"));
     if(
    $login==1)
      {
    //this is were i put the site login link//
    }else if($login[0]=='2'){
     echo 
    "$uid your login has been disabled by a staff member<br/>";
     echo 
    "if this is a error contact a admin/owner<br/>";

    and the sql for it

    make a new row in ibwf_users
    Code:
    call it login set it a char(1) Not Null and Default 1
    Last edited by metulj; 10.05.09, 21:40. Reason: use [ php ] ... [ / php ] tag for posting code

    #2
    lol call me stupid but whats the use of this? lol

    disable login??? i thought lava already has BAN option? lol

    wheres the difference?
    sigpiceeeeerrr....

    Comment


      #3
      lol i agree, y disable login when u can either close the site or ban the users
      LDSWAPWORLD sigpic
      site closed.
      im busy with other things in life like facebook , send me PM so i can add you
      www.pinoySG.com

      don't ask for help if you're not even helping yourself!
      i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


      Comment


        #4
        why if you dont have anything to say that will help me in getting the code right my advice shut up

        Comment


          #5
          Originally posted by realcoder View Post
          why if you dont have anything to say that will help me in getting the code right my advice shut up
          well, this is a forum if you forgot and were just saying that your idea can be done in other ways like banning or just closing the site. and from your username, you should get the code for it.
          anyway, u can check other lava script edits for reference with what u are asking.
          LDSWAPWORLD sigpic
          site closed.
          im busy with other things in life like facebook , send me PM so i can add you
          www.pinoySG.com

          don't ask for help if you're not even helping yourself!
          i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


          Comment


            #6
            Originally posted by realcoder View Post
            why if you dont have anything to say that will help me in getting the code right my advice shut up
            very nice... i didnt know tht we r not aloved 2 comment.....:eek:
            sigpiceeeeerrr....

            Comment


              #7
              Originally posted by realcoder View Post
              why if you dont have anything to say that will help me in getting the code right my advice shut up
              i dont think you will get much help with such behavior....
              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ノ刀ノイリ!

              Comment


                #8
                disable login

                i need to know what am doing wrong can someone who actually knows how to code help me plz :p

                Comment


                  #9
                  You want it to lock with sql or plan shut down ??
                  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...
                  _______
                  Info & Tips
                  php.net
                  w3schools.com

                  Comment


                    #10
                    lol lol anyways who is not declare in the login page......................use $uid instead

                    R.M.C
                    ----------
                    PHP Adovocate B)

                    Comment


                      #11
                      PHP Code:
                      $login mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$who."'"));
                       if(
                      $login==1)
                        {
                      //this is were i put the site login link//
                      }else if($login[0]=='2'){
                       echo 
                      "$uid your login has been disabled by a staff member<br/>";
                       echo 
                      "if this is a error contact a admin/owner<br/>";

                      do you know what you have told it to do here?


                      PHP Code:
                      $login mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$who."'")); 
                      this selects the column login in the row where id is = $Who
                      this is incorrect because u want to find the id of the person who logged in there for it should be set as $uid

                      so the above should be changed to
                      PHP Code:
                      $login mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$uid."'")); 
                      PHP Code:
                      if($login[0]=='0'// if statements begins, if user has 1 in the column of the selected row for that member 
                      {  // then output this following
                      echo "Please click this link for example in your case";
                      }else 
                      // otherwise if it dostnt have 0 in the column display this
                      {
                      echo 
                      "$uid your login has been disabled by a staff member<br/>";
                      echo 
                      "if this is a error contact a admin/owner<br/>";
                      //end if statement 
                      ther is no need for if($login[0]=='2') cos it can only be something else. you would only need to use this if there was more than 3 statements

                      make 0 default in databse and make 1 = ban that way you can clearly see whats hapnin 1 and 2 dont really mean anything. 0,1 most people can relate to as 0 and 1 is used in binary etc.
                      Last edited by crazybrumi; 13.05.09, 15:50.
                      Want something coded email me at sales@webnwaphost.com for a prices.




                      Comment


                        #12
                        lol or use
                        PHP Code:
                        $who $uid

                        PHP Code:
                        foreach ($_SERVER as $server => $value)
                        {
                        echo 
                        "$server is $value<br />";

                        Comment


                          #13
                          but why, theres no point of assigning it if it dosnt need to. thats just silly, and can take alot of space if its a big script. think about it
                          Want something coded email me at sales@webnwaphost.com for a prices.




                          Comment


                            #14
                            login page

                            thankx bro will do am gonna test it and tell you
                            Last edited by realcoder; 15.05.09, 11:48. Reason: mistakes made

                            Comment


                              #15
                              Originally posted by drwap View Post
                              lol or use
                              PHP Code:
                              $who $uid
                              whats tha perpose of assiging $uid as $who????

                              R.M.C
                              ----------
                              PHP Adovocate B)

                              Comment

                              Working...
                              X