1 sayfadan 1. sayfa

Diğer Yöneticiler Ana Yöneticiyi Banlayamasın!

İletiTarih: 20.07.2006, 12:03
webci
Bu modu ben denedim siz de deneyin bakalım.
Kod: Tümünü seç
###############################################
##   Hack Title:   Main Admin Security
##   Hack Version:   1.1.0
##   Author:      Aiencran
##   Description:   This hack gives some extra security to the main administrator.
##          - The other administrators can't delete the Main Admin
##          - They can't change his profile
##          - They can't change his user level to simple user
##   Compatibility:   2.0.10
##
##   Installation Level: Easy
##   Installation Time: 2 Minutes
##   Files To Edit: 4
##      admin/admin_ug_auth.php,
##      admin/admin_users.php,
##      language/lang_english/lang_admin.php,
##      language/lang_italian/lang_admin.php
##
##   Included Files: None
##
##   History:
##      2004-08-21 - Version 1.1.0
##         - Added Main Admin's profile security
##
##      2004-08-14 - Version 1.0.0
##         - First version
##
##   Author Notes:
##      In this MOD I supposed that Main Admin's user_id is 2. Feel free to changhe '2' with the id of your MainAdmin.
##
##   Support:      None
##   Copyright:      ©2004 Main Admin Security 1.1.0 - Aiencran
##
###############################################
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
##   Please visit http://www.phpbbhacks.com/forums for support.
###############################################
##
###############################################
##   This hack is released under the GPL License.
##   This hack can be freely used, but not distributed, without permission.
##   Intellectual Property is retained by the hack author(s) listed above.
###############################################

#
#-----[ OPEN ]------------------------------------------
#
/language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!

#
#-----[ BEFORE, ADD ]------------------------------------
#
$lang['Main_Admin_Undeleted'] = 'Main Admin can\'t be deleted!';
$lang['Main_Admin_Unchanged_Profile'] = 'You can\'t modify Main Admin\'s profile!';
$lang['Main_Admin_Unchanged_Level'] = 'Main Admin can\'t become a simple user!';

#
#-----[ OPEN ]------------------------------------------
#
/language/lang_italian/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!

#
#-----[ BEFORE, ADD ]------------------------------------
#
$lang['Main_Admin_Undeleted'] = 'L\'amministratore principale non può essere cancellato!';
$lang['Main_Admin_Unchanged_Profile'] = 'Non puoi modificare il profilo dell\'amministratore principale!';
$lang['Main_Admin_Unchanged_Level'] = 'L\'amministratore principale non può diventare un semplice utente!';

#
#-----[ OPEN ]------------------------------------------
#
/admin/admin_users.php

#
#-----[ FIND ]------------------------------------------
#
if( $HTTP_POST_VARS['deleteuser'] )

#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// Main Admin can't be deleted
//
if( $HTTP_POST_VARS['deleteuser'] && $user_id == 2)
{
   message_die(GENERAL_ERROR, $lang['Main_Admin_Undeleted'] );
}
if( $HTTP_POST_VARS['deleteuser'] && $user_id != 2)

#
#-----[ FIND ]------------------------------------------
#
$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username']))) : '';

#
#-----[ BEFORE, ADD ]------------------------------------
#
//
// Main Admin's profile can't be modified
//
if ( $user_id == 2 && $userdata['user_id'] != 2 )
{
   message_die(GENERAL_ERROR, $lang['Main_Admin_Unchanged_Profile'] );
}

#
#-----[ OPEN ]------------------------------------------
#
/admin/admin_ug_auth.php

#
#-----[ FIND ]------------------------------------------
#
//
// Make admin a user (if already admin) ... ignore if you're trying
// to change yourself from an admin to user!
//
if ( $userdata['user_id'] != $user_id )

#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// Make admin a user (if already admin) ... ignore if you're trying
// to change yourself from an admin to user!
//
if ( $user_id == 2 )
{
   message_die(GENERAL_ERROR, $lang['Main_Admin_Unchanged_Level'] );
}
else if ( $userdata['user_id'] != $user_id )

#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End

İletiTarih: 23.07.2006, 01:04
KaRTuNYa
Sağolasın

İletiTarih: 23.07.2006, 11:08
webci
şimdi dene bakalım üye bilgilerini değiştirmeyi.Eğer değiştirebiliyorsan helal olsun diyeceğim.Ben kurdum kaldırdım orjinal dosyaları bile koydum ama hala üye bilgilerini değiştiremedim.

Cvp: Diğer Yöneticiler Ana Yöneticiyi Banlayamasın!

İletiTarih: 25.07.2006, 18:10
KaRTuNYa
Modu kurmadımki :?