Ejemplo n.º 1
0
function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    $action = getAction();
    $content = "";
    switch ($action) {
        case "config_echol":
            $content = viewFormConfEchoCard($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar echo canceler
            break;
        case "config_echo":
            $content = viewFormConfEchoCardParam($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar echo canceler
            break;
        case 'config_span':
            $content = viewFormConfSpan($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar span
            break;
        case 'config_param':
            $content = viewFormConfSpanParam($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar span
            break;
        case "save_new":
            $content = saveNewConfEchoCard($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // save conf echo canceler
            break;
        case "save_span":
            $content = saveNewConfSpan($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // save conf span
            break;
            /*
                    case "setConfig":
                        $content = setConfigHardware($pDB); 
                        break;
            */
        /*
                case "setConfig":
                    $content = setConfigHardware($pDB); 
                    break;
        */
        case "detection":
            $content = hardwareDetect($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // detection button
            break;
        default:
            $content = listPorts($smarty, $module_name, $local_templates_dir, $pDB);
            break;
    }
    return $content;
}
Ejemplo n.º 2
0
function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoConfEcho.class.php";
    load_language_module($module_name);
    //global variables
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    require_once "modules/{$module_name}/libs/PaloSantoHardwareDetection.class.php";
    //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 = new paloDB($arrConf['dsn_conn_database']);
    $action = getAction();
    $content = "";
    switch ($action) {
        case "config_echol":
            $content = viewFormConfEchoCard($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar echo canceler
            break;
        case "config_echo":
            $content = viewFormConfEchoCardParam($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar echo canceler
            break;
        case 'config_span':
            $content = viewFormConfSpan($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar span
            break;
        case 'config_param':
            $content = viewFormConfSpanParam($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // para configurar span
            break;
        case "save_new":
            $content = saveNewConfEchoCard($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // save conf echo canceler
            break;
        case "save_span":
            $content = saveNewConfSpan($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // save conf span
            break;
            /*
                    case "setConfig":
                        $content = setConfigHardware($pDB); 
                        break;
            */
        /*
                case "setConfig":
                    $content = setConfigHardware($pDB); 
                    break;
        */
        case "detection":
            $content = hardwareDetect($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            // detection button
            break;
        default:
            $content = listPorts($smarty, $module_name, $local_templates_dir, $pDB);
            break;
    }
    return $content;
}