Auto Un-ban Main Admin

Kleine Codeänderungen oder Mini-MODs
Keine Anfragen!!! -- No requests!!!

Moderator: Supporter

Auto Un-ban Main Admin

Beitragvon AmigaLink » 25. Jan 2005 21:30

Code: Alles auswählen
#################################################################
## Hack Title: Auto Un-ban Main Admin
## Hack Version: 1.0.0
## Author: Nivisec < nivisec @ hotmail.com > - http://nivisec.com/mods/
## Description: This will not prevent the banning of the first super
##              admin, but will unban this user (if banned) on each
##              page load.
##
## Installation Level: easy
## Installation Time: 2 Minutes
## Files To Edit: common.php
## Included Files: n/a
#################################################################
##
## Author Note:
## None.
##
#################################################################
## Before Adding This Hack To Your Forum, You Should Back Up All Files Related To This Hack
#################################################################
## Example Page:     n/a
## Discussion Forum: http://nivisec.com/mods/viewforum.php?f=7
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
/common.php

#
#-----[ FIND ]------------------------------------------
#
//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
   message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}

#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Delete Main Admin Ban
//
$sql = "DELETE FROM " . BANLIST_TABLE . "
   WHERE ban_userid = 2";
if (!$db->sql_query($sql))
{
      message_die(GENERAL_MESSAGE, 'Unable to access the Banlist Table.');
}

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Zurück zu phpBB2 Snippets



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 4 Gäste

cron