<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
/********************************************************/
/* NukeSentinel(tm)                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/

if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}

if(is_god($admin)) {
  $pagetitle = _AB_NUKESENTINEL.": "._AB_EDITADMINS;
  incoh();
  $sapi_name = strtolower(php_sapi_name());
  title($pagetitle);
  Max_OpenTable();
  OpenMenu();
  ipbanmenu();
  CarryMenu();
  blankmenu();
  CloseMenu();
  Max_CloseTable();
  br('1');
  Max_OpenTable();
  $admin_row = abget_admin($a_aid);
  echo "<table align='center' border='0' cellpadding='2' cellspacing='2'>\n";
  echo "<form action='".$admin_file.".php' method='post'>\n";
  echo "<tr><td bgcolor='$bgcolor2'><b>"._AB_ADMIN.":</b></td><td><b>$a_aid</b></td></tr>\n";
  echo "<tr><td bgcolor='$bgcolor2'><b>"._AB_AUTHLOGIN.":</b></td>";
  echo "<td><input type='text' name='xlogin' size='20' maxlength='25' value='".$admin_row['login']."' /></td></tr>\n";
  echo "<tr><td bgcolor='$bgcolor2'><b>"._AB_PASSWORD.":</b></td>";
  echo "<td><input type='text' name='xpassword' size='20' maxlength='20' value='".$admin_row['password']."' /></td></tr>\n";
  echo "<tr><td bgcolor='$bgcolor2'><b>"._AB_PROTECTED.":</b></td>";
  if ($admin_row['protected']==0) { $sel1 = " selected"; } else { $sel2 = " selected"; }
  echo "<td><select name='xprotected'>\n";
  echo "<option value='0'$sel1>"._AB_NOTPROTECTED."</option>\n<option value='1'$sel2>"._AB_ISPROTECTED."</option>\n";
  echo "</td></tr>\n";
  echo "<input type='hidden' name='op' value='ABAuthEditSave' />\n";
  echo "<input type='hidden' name='a_aid' value='$a_aid' />\n";
  echo "<tr><td align='center' colspan='2'><input type='submit' value='"._AB_SAVECHANGES."' /></td></tr>\n";
  echo "</form></table>\n";
  Max_CloseTable();
  incof();
} else {
  redirect_url("".$admin_file.".php?op=ABMain");
}