Пример #1
0
function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoGroupPermission.class.php";
    load_language_module($module_name);
    //global variables
    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'];
    //conexion resource
    $pDB = "";
    //actions
    $accion = getAction();
    $content = "";
    switch ($accion) {
        case "apply":
            $content = applyGroupPermission($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        default:
            $content = reportGroupPermission($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
Пример #2
0
function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //include module files
    include_once "libs/paloSantoOrganization.class.php";
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    $pDB = new paloDB($arrConf['elastix_dsn']['elastix']);
    //user credentials
    global $arrCredentials;
    //actions
    $accion = getAction();
    $content = "";
    switch ($accion) {
        case "apply":
            $content = applyGroupPermission($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        default:
            $content = reportGroupPermission($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
    }
    return $content;
}