function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    switch (getParameter('action')) {
        case 'new':
        case 'edit':
            return addRemovePortsUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
        default:
            return listPortKnockUsers($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
    }
}
Exemple #2
0
function _moduleContent(&$smarty, $module_name)
{
    require_once "modules/{$module_name}/configs/default.conf.php";
    require_once "modules/{$module_name}/libs/paloSantoPortKnockUsers.class.php";
    load_language_module($module_name);
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    //folder path for custom templates
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    switch (getParameter('action')) {
        case 'new':
        case 'edit':
            return addRemovePortsUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
        default:
            return listPortKnockUsers($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
    }
}