<?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                                 */
/************************************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}
if ($acces == 1) {
if($admintest && $adminsecu)  {

    $idlogs = $db->XMFnum($idlogs);
    if($ok) {
	$result = $db->sql_query("delete from `".TABLE_NSNSECUREADMIN_LOGS."` where `idlogs`='$idlogs'");
    	if (!$result) {
	    return;
    	}
	redirect_url("".$admin_file.".php?op=nsnsecureadminjournal");
    } else {

	incoh();

	$sql = "SELECT `graphic_admin` from `".TABLE_NSNSECUREADMIN_CONFIG."`";
        if ( !($graf = $db->sql_query($sql)) )
{ query_die(GENERAL_ERROR, 'Could not obtain config nsnsecureadmin', '', __LINE__, __FILE__, $sql);}
        $row = $db->sql_fetchrow($graf);
        $grafic_admin = $db->XMFnum($row['graphic_admin']);

        if ($grafic_admin == 1) { GraphicAdmin();}

	Max_OpenTable();
	echo "<center><font size=\"4\"><b>"._SECUREADMIN."</b></font></center>";
	Max_CloseTable();

	br('1');

	Max_OpenTable();
	echo "<center>"._REMOVEIP.""
	    ."<br /><br />[ <a href=\"".$admin_file.".php?op=nsnsecureadminjournal\">" . _NO . "</a> | <a href=\"".$admin_file.".php?op=deletensnsecureadminjournal&amp;idlogs=$idlogs&amp;ok=1\">" . _YES . "</a> ]</center>";
    	Max_CloseTable();

	incof();
    }


}
} else {
	echo "Access Denied";
}