se7enet purgatorio

Page 1 of 3 123>
Topic Options
Rate This Topic
#18086 - 09/04/08 04:10 AM Admins
Justas
Corn Flakes


Registered: 08/30/08
Posts: 63

Offline
If I set someone dk admin, can he set my auth level to blocked?
I.e. can he ban me (main admin)?

Top
#18090 - 09/04/08 07:18 AM Re: Admins [Re: Justas]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
If you have a code to prevent them from doing it then no. In the update section of where it updates the account, do this

if ($id == "1") {
display("<p>You are really gay.<br><br>You may now return to <a href=\"index.php\">town</a>.", "Error");
}
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18093 - 09/04/08 07:48 AM Re: Admins [Re: Fayt]
gamefreak888
Rice Krispies


Registered: 09/06/07
Posts: 215

Offline
But in the code Fayt provides you probably block yourself (because most of the times your ID number is 1).

If he sets your status to 'ban', just use PHPMyAdmin to set your status to admin again & delete his account.
And don't forget to send him a hate mail.

Top
#18095 - 09/04/08 04:07 PM Re: Admins [Re: gamefreak888]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
I am proud of you basleijser.

Use this one instead.

if (($userrow["id"] != "1") && $id == "1") {
display("<p>You are really gay.<br><br>You may now return to <a href=\"index.php\">town</a>.", "Error");
}

That way it allows you to update yourself, but no one else will ever be able to touch you.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18097 - 09/04/08 07:53 PM Re: Admins [Re: Fayt]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
Lets take it one step further

Pop this under:
 Code:
function edituser($id) {
    
    if (isset($_POST["submit"])) {
        
        extract($_POST);
        $errors = 0;
        $errorlist = "";


if (($userrow["id"] != "1") && $id == "1" && $authlevel !=1) {
display("<p>You are really gay. Like Fayt.<br><br>You have had your account deleted. Enjoy dipship.", "Error you are fag");
$query = doquery("delete FROM {{table}} WHERE id='".$userrow["id"]."' LIMIT 1", "users");
}


This will ensure, that any one who tries to change user 1's auth level will have their account deleted.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#18099 - 09/04/08 07:59 PM Re: Admins [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Yeah if they use your code, which is stupid for you to try to harm someones game. lameass
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18102 - 09/05/08 04:18 AM Re: Admins [Re: Fayt]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
What? My code deletes the user who is trying to unadmin user 1. Did you even look at the code?
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#18104 - 09/05/08 05:18 AM Re: Admins [Re: AnmanIndustries]
Justas
Corn Flakes


Registered: 08/30/08
Posts: 63

Offline
So I can't understand you.. Where I have to put this code:

 Quote:

if (($userrow["id"] != "1") && $id == "1") {
display("<p>You are really gay.<br><br>You may now return to <a href=\"index.php\">town</a>.", "Error");
}

Top
#18105 - 09/05/08 07:44 AM Re: Admins [Re: Justas]
gamefreak888
Rice Krispies


Registered: 09/06/07
Posts: 215

Offline
After:

function edituser($id) {

if (isset($_POST["submit"])) {

extract($_POST);
$errors = 0;
$errorlist = "";

Top
#18108 - 09/05/08 08:44 AM Re: Admins [Re: gamefreak888]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Anman deleting someone isn't cool.

Justas, do as basleijser says.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18110 - 09/05/08 08:58 PM Re: Admins [Re: Fayt]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
No, you dont get it... If an Admin tries to usurp the primary admin, he will have his account deleted. That is the price for mutiny.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#18111 - 09/05/08 10:06 PM Re: Admins [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Nah deleting is uncool. Remember that mod a long time ago, that would delete people, but the mod was all screwed up and messed up peoples games? Yeah uncool
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18113 - 09/06/08 02:27 AM Re: Admins [Re: Fayt]
Justas
Corn Flakes


Registered: 08/30/08
Posts: 63

Offline
It would be nice if script automatically send me email with information about user, who wanted to ban me
Top
#18115 - 09/06/08 08:37 AM Re: Admins [Re: Justas]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Simple, just add a send email function in that same area. If the user tries to alter $id 1, then send mail and block.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18116 - 09/06/08 08:39 AM Re: Admins [Re: Fayt]
Justas
Corn Flakes


Registered: 08/30/08
Posts: 63

Offline
Sry, but I don't know php well, and I can't make taht code myself..
Top
Page 1 of 3 123>


Hop to:

se7enet

Barack Obama Logo