Esempio n. 1
0
function _moduleContent(&$smarty, $module_name)
{
    //include elastix framework
    include_once "libs/paloSantoGrid.class.php";
    include_once "libs/paloSantoForm.class.php";
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoLanguageAdmin.class.php";
    //include lang local module
    $lang = get_language();
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    if (file_exists("{$base_dir}/{$lang_file}")) {
        include_once $lang_file;
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    global $arrConf;
    global $arrLang;
    global $arrLangModule;
    //folder path for custom templates
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $templates_dir = isset($arrConfig['templates_dir']) ? $arrConfig['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    $accion = getAction();
    $content = "";
    $arrFormConference = createFieldForm($arrLangModule);
    $oForm = new paloForm($smarty, $arrFormConference);
    switch ($accion) {
        case "show":
            $_POST['nav'] = null;
            $_POST['start'] = null;
            $content = showLanguages($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule);
            break;
        case "new":
            $content = newLanguage($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule);
            break;
        case "save_language":
            $content = saveLanguage($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule, $oForm);
            break;
        case "cancel_language":
            $content = showLanguages($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule);
            break;
        case "save_all":
            $content = saveAll($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule, $oForm);
            break;
        default:
            //report_Languages
            $content = showLanguages($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule);
            break;
    }
    return $content;
}
Esempio n. 2
0
function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['elastix_dsn']['elastix']);
    $pACL = new paloACL($pDB);
    //user credentials
    global $arrCredentials;
    $uid = $arrCredentials['idUser'];
    //actions
    $accion = getAction();
    switch ($accion) {
        case "save":
            $content = saveLanguage($smarty, $module_name, $local_templates_dir, $arrConf, $pACL, $uid);
            break;
        default:
            $content = formLanguage($smarty, $module_name, $local_templates_dir, $arrConf, $pACL, $uid);
            break;
    }
    return $content;
}
Esempio n. 3
0
    ?>
	<p class="alert alert-error"><span class="alert-head"><?php 
    echo _t('gen.short.damn');
    ?>
</span> <?php 
    echo _t('install.not_deleted', DATA_PATH . '/do-install.txt');
    ?>
</p>
<?php 
}
initTranslate();
checkStep();
switch (STEP) {
    case 0:
    default:
        saveLanguage();
        break;
    case 1:
        saveStep1();
        break;
    case 2:
        saveStep2();
        break;
    case 3:
        saveStep3();
        break;
    case 4:
        break;
    case 5:
        deleteInstall();
        break;