<?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)) {
  $aidrow = $db->sql_fetchrow($db->sql_query("SELECT * FROM `".TABLE_NSNST_ADMINS."` WHERE `aid`='$a_aid'"));
  $subject = _AB_ACCESSFOR." ".$nuke_config['sitename'];
  $message  = ""._AB_HTTPONLY."\n";
  $message .= ""._AB_LOGIN.": ".$aidrow['login']."\n";
  $message .= ""._AB_PASSWORD.": ".$aidrow['password']."\n";
  $message .= ""._AB_PROTECTED.": ";
  if($aidrow['protected']==0) { $message .= ""._AB_NO."\n"; } else { $message .= ""._AB_YES."\n"; }
  list($amail) = $db->sql_fetchrow($db->sql_query("SELECT `email` FROM `".TABLE_AUTHORS."` WHERE `aid`='$a_aid'"));
  @mail($amail, $subject, $message,"From: ".$nuke_config['adminmail']."\r\nX-Mailer: "._AB_NUKESENTINEL."\r\n");
  redirect_url("".$admin_file.".php?op=ABAuthList");
} else {
  redirect_url("".$admin_file.".php?op=ABMain");
}