function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //include framework lib form
    include_once "libs/paloSantoForm.class.php";
    //include email configuration files
    include_once "configs/email.conf.php";
    include_once "libs/cyradm.php";
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]);
    //user credentials
    global $arrCredentials;
    $accion = getAction();
    $content = "";
    switch ($accion) {
        case "update":
            $content = updateAntispam($smarty, $module_name, $local_templates_dir, $arrConf);
            break;
        default:
            $content = formAntispam($smarty, $module_name, $local_templates_dir, $arrConf);
            break;
    }
    return $content;
}
Exemple #2
0
function _moduleContent(&$smarty, $module_name)
{
    //include elastix framework
    include_once "libs/paloSantoGrid.class.php";
    include_once "libs/paloSantoForm.class.php";
    include_once "libs/paloSantoConfig.class.php";
    include_once "configs/email.conf.php";
    include_once "libs/cyradm.php";
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoAntispam.class.php";
    $lang = get_language();
    $script_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    if (file_exists("{$script_dir}/{$lang_file}")) {
        include_once $lang_file;
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    global $arrConf;
    global $arrConfModule;
    global $arrLang;
    global $arrLangModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $arrLang = array_merge($arrLang, $arrLangModule);
    //folder path for custom templates
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $templates_dir = isset($arrConfModule['templates_dir']) ? $arrConfModule['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    $accion = getAction();
    $content = "";
    switch ($accion) {
        case "update":
            $content = updateAntispam($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule, $arrConf, $arrConfModule);
            break;
        default:
            $content = formAntispam($smarty, $module_name, $local_templates_dir, $arrLang, $arrLangModule, $arrConf, $arrConfModule);
            break;
    }
    return $content;
}