<?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)  {

    incoh();

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

    if ($db->XMFnum($result['graphic_admin']) == 1) { GraphicAdmin();}

    nsnsecureadminmenu();

    Max_OpenTable();
    echo "<center><font class='title'><b>"._SECUREADMIN."&nbsp;-&nbsp;Version: ". $result['version'] ."</b></font></center>";
    Max_CloseTable();

    br('1');

    Max_OpenTable();
    echo "<center><table border=\"0\">";
    echo "<form action=\"".$admin_file.".php?op=nsnsecureadminconfigvalid\" method=\"post\">\n";
    echo "<tr><td align=\"center\">"._ACTIVEJOURNAL."</td><td>";
    $chk1 = $chk2 = $chk3 = $chk4 = $chk5 = $chk6 = $chk7 = $chk8 = $chk9 = $chk10 ="";
    if ($result['active_journal']== 0) { $chk1 = " checked"; } else { $chk2 = " checked"; }
    echo "<input type=\"radio\" name=\"xactive_journal\" value=\"0\"$chk1> "._NO." &nbsp;";
    echo "<input type=\"radio\" name=\"xactive_journal\" value=\"1\"$chk2> "._YES."</td></tr>";
    echo "<tr><td align=\"center\">"._ACTIVEMAIL."</td><td>";
    if ($result['active_mail']== 0) {  $chk5 = " checked"; } else { $chk6 = " checked"; }
    echo "<input type=\"radio\" name=\"xactive_mail\" value=\"0\"$chk5> "._NO." &nbsp;";
    echo "<input type=\"radio\" name=\"xactive_mail\" value=\"1\"$chk6> "._YES."</td></tr>";
    echo "<tr><td align=\"center\">"._ACTIVEGRAPHICADMIN."</td><td>";
    if ($result['graphic_admin']== 0) {  $chk3 = " checked"; } else { $chk4 = " checked"; }
    echo "<input type=\"radio\" name=\"xgraphic_admin\" value=\"0\"$chk3> "._NO." &nbsp;";
    echo "<input type=\"radio\" name=\"xgraphic_admin\" value=\"1\"$chk4> "._YES."</td></tr>";
    echo "<tr><td align=\"center\">"._ACTIVEIPFIXE."</td><td>";
    if ($result['ip_fixe']== 0) {  $chk7 = " checked"; } else { $chk8 = " checked"; }
    echo "<input type=\"radio\" name=\"xip_fixe\" value=\"0\"$chk7> "._NO." &nbsp;";
    echo "<input type=\"radio\" name=\"xip_fixe\" value=\"1\"$chk8> "._YES."</td></tr>";
    echo "<tr><td align=\"center\">"._ACTIVEBAN."</td><td>";
    if ($result['active_ban']== 0) {  $chk9 = " checked"; } else { $chk10 = " checked"; }
    echo "<input type=\"radio\" name=\"xactive_ban\" value=\"0\"$chk9> "._NO." &nbsp;";
    echo "<input type=\"radio\" name=\"xactive_ban\" value=\"1\"$chk10> "._YES."</td></tr>";
    echo "<tr><td align=\"center\">"._NUMACTIVEBAN."</td><td>";
    echo "<input type=\"text\" name=\"xnum_ban\" value=\"".$result['num_ban']."\" size=\"1\" maxlength=\"2\"></td></tr>";
    echo "</table><hr width='40%'><table><tr><td align=\"center\">". _MESSAGENSNSA.":<br /><br /> "
       . "<textarea name='xmessagesa' cols='100%' rows='20' WRAP='virtual'>".$result['messagesa']."</TEXTAREA></td></tr></table>";
    echo "<hr width='40%'><table><tr><td align=\"center\">". _IMAGENSNSA.":</td><td> "
       ."<input type=\"text\" name=\"ximagesa\" value=\"".$result['imagesa']."\" size=\"50\" maxlength=\"100\"></td></tr></table>";
    echo "<table><input type=\"hidden\" value=\"".$admin_file.".php?op=nsnsecureadminconfigvalid\"><br />";
    echo "<tr><td align=\"right\"><br /><input type=\"submit\" value=\""._SAVECHANGES."\"></td></tr>";
    echo "</form></table></center>";
    echo "<br /><CENTER><a href=\"_GOBACK\">"._GOBACK."</A></CENTER>";
    Max_CloseTable();

    incof();

}
}else {
	echo "Access Denied";
}