<?php
/********************************************************/
/* NSN HELP 1.1.0 for PHP-Nuke 7.5/7.6                  */
/* Author: Benoit (gargamel10@msn.com)                  */
/*                                                      */
/* http://www.nukescripts.net                           */
/*http://www.nukescripts.fr                             */
/* Copyright  2005 by NukeScripts Network              */
/********************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die("Illegal File Access");
}
global $prefix, $db, $currentlang, $aid, $admin_file;
if (!stristr($_SERVER['SCRIPT_NAME'], "".$admin_file.".php")) { die ("Access Denied"); }
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".TABLE_MODULES." WHERE title='NSN_HELP'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".TABLE_AUTHORS." WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
    if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") {
        $auth_user = 1;	
    }
}

if ($row2['radminsuper'] == 1 || $auth_user == 1) {
$module_name = "NSN_HELP";
$radminsuper = $row2['radminsuper'];
require_once("modules/$module_name/includes/functions.php");
$help_config = help_get_configs();
if($admintest && $adminsecu)  {
switch ($op) {

    case "ListAide":include("modules/$module_name/admin/HELP/ListAide.php");break;
    case "AddFonction":include("modules/$module_name/admin/HELP/AddFonction.php");break;
    case "SaveFonction":include("modules/$module_name/admin/HELP/SaveFonction.php");break;
    case "DisplayAide":include("modules/$module_name/admin/HELP/DisplayAide.php");break;
    case "DeleteAide":include("modules/$module_name/admin/HELP/DeleteAide.php");break;
    case "GestionFonction":include("modules/$module_name/admin/HELP/GestionFonction.php");break;
    case "EditFonction":include("modules/$module_name/admin/HELP/EditFonction.php");break;
    case "DeleteFonction":include("modules/$module_name/admin/HELP/DeleteFonction.php");break;
    case "EditSaveFonction":include("modules/$module_name/admin/HELP/EditSaveFonction.php");break;
    case "ConfigHelp":include("modules/$module_name/admin/HELP/ConfigHelp.php");break;
    case "ConfigSaveHelp":include("modules/$module_name/admin/HELP/ConfigSaveHelp.php");break;
    case "SubmitAvisAide":include("modules/$module_name/admin/HELP/SubmitAvisAide.php");break;
    case "HelpWait":include("modules/$module_name/admin/HELP/HelpWait.php");break;
}
}
} else { echo "Access Denied"; }