disable login [lavalair script]

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

16 replies · 1,626 views · started 17 years ago · 3 min read

9 participants
realcoder Junior · 17 posts #1

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

//////////////////

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&sid=$sid&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&sid=$sid&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&sid=$sid\">";
  echo "Users Info</a><br/>";
    echo "<a href=\"index.php?action=admincp&sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
  echo "Admin CP</a><br/>";
  echo "<a href=\"index.php?action=main&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&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

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&sid=$sid\">";
  echo "Users Info</a><br/>";
      echo "<a href=\"index.php?action=admincp&sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
  echo "Admin CP</a><br/>";
  echo "<a href=\"index.php?action=main&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

///////

$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

call it login set it a char(1) Not Null and Default 1

brandon rules the codeing industry

alesh Lead · 604 posts #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?

eeeeerrr....

capofret Developer · 225 posts #3

lol i agree, y disable login when u can either close the site or ban the users

LDSWAPWORLD 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.

External image (may be gone)

realcoder Junior · 17 posts #4

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

brandon rules the codeing industry

capofret Developer · 225 posts #5

realcoder wrote: 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 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.

External image (may be gone)

alesh Lead · 604 posts #6

realcoder wrote: 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.....😲

eeeeerrr....

metulj Super moderator Principal · 1,726 posts #7

realcoder wrote: 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ノ刀ノイリ!

realcoder Junior · 17 posts #8

disable login

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

brandon rules the codeing industry

subzero Super moderator Fellow · 3,954 posts #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... _______…

mcKeny Developer · 130 posts #10

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

R.M.C

PHP Adovocate B)

crazybrumi Super moderator Principal · 1,064 posts #11
$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?

$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

$login = mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$uid."'"));
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.

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

djdevil89 Senior · 287 posts #12

lol or use

$who = $uid;
foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
realcoder Junior · 17 posts #14

login page

thankx bro will do am gonna test it and tell you

brandon rules the codeing industry

mcKeny Developer · 130 posts #15

drwap wrote: lol or use

$who = $uid;

whats tha perpose of assiging $uid as $who????

R.M.C

PHP Adovocate B)

djdevil89 Senior · 287 posts #16

lol if he uses the $who more then once in the same script where it should be $uid its easier to use the statement i gave instead of changing all parts

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
kuklux Newbie · 8 posts #17

i think it should be like this to work.

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

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