Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/dev/htdocs/custom/menuconfighelper/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/dev/htdocs/custom/menuconfighelper/admin/modules_list.php
<?php
/* Copyright (C) 2008-2015	Laurent Destailleur     <eldy@users.sourceforge.net>
 * Copyright (C) 2011		Regis Houssin           <regis.houssin@capnetworks.com>
 * Copyright (C) 2011-2013  Juanjo Menent           <jmenent@2byte.es>
 * Copyright (C) 2015		Jean-François Ferry		<jfefe@aternatik.fr>
 * Copyright (C) 2017		Open-DSI        		<support@open-dsi.fr>
 *
 * 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 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

/**
 *	    \file       htdocs/menuconfighelper/admin/admin.php
 *      \ingroup    menuconfighelper
 *      \brief      menuconfighelper module setup page
 */

// Dolibarr environment
$res=0;
if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php");		// For root directory
if (! $res && file_exists("../../../main.inc.php")) $res=@include("../../../main.inc.php");	// For "custom" directory
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
dol_include_once("/menuconfighelper/lib/menuconfighelper.lib.php");

$langs->load("admin");
$langs->load("errors");
$langs->load('other');
$langs->load("cron");
$langs->load("menuconfighelper@menuconfighelper");

if (! $user->admin) accessforbidden();

$action = GETPOST('action','alpha');
$value = GETPOST('value','alpha');

/*
 * Actions
 */

/*
 * Affiche page
 */

$modules = menuconfighelper_load_modules($conf->entity);

uasort($modules, function ($a, $b) {
    $name_a = strtolower($a->getName());
    $name_b = strtolower($b->getName());

    if ($name_a==$name_b) return 0;
    return $name_a>$name_b ? 1 : -1;
});

llxHeader('',$langs->trans("MenuConfigHelperSetup"));

$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("MenuConfigHelperSetup"),$linkback,'title_setup');

$head = menuconfighelper_prepare_head();

print '<br>';
dol_fiche_head($head, 'modules_list', $langs->trans("MenuConfigHelperModulesList"), 0, 'opendsi@menuconfighelper');

/*
 *  Parameters
 */
print '<br>';

$var=true;
print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
print "  <td>".$langs->trans("Module")."</td>\n";
print "  <td>".$langs->trans("Value")."</td>\n";
print "</tr>\n";

foreach ($modules as $key => $module) {
    $var=!$var;
    $module_name = $module->getName();
    $conf_path = '$conf->' . $key . '->enabled';
    print "<tr ".$bc[$var].">\n  <td>".$module_name."</td>\n  <td>".$conf_path."</td>\n</tr>\n";
}

print "</table>";

print '<br>';
llxFooter();

$db->close();

Hry