Example #1
0
function _moduleContent(&$smarty, $module_name)
{
    //include elastix framework
    include_once "libs/paloSantoForm.class.php";
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoBuildModule.class.php";
    global $arrConf;
    global $arrConfig;
    //include lang local module
    global $arrLangModule;
    load_language_module($module_name);
    //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'];
    require_once 'libs/paloSantoDB.class.php';
    $pDB_acl = new paloDB($arrConf['elastix_dsn']['acl']);
    if (!empty($pDB_acl->errMsg)) {
        echo "ERROR DE DB: {$pDB_acl->errMsg} <br>";
    }
    $accion = getAction();
    switch ($accion) {
        case "mostrar_menu":
            $content = mostrar_menu();
            break;
        case "save_module":
            $content = save_module($smarty, $module_name, $local_templates_dir, $arrLangModule, $pDB_acl, $arrConf);
            break;
        case "check_errors":
            $content = check_errors();
            break;
        default:
            $content = new_module($smarty, $module_name, $local_templates_dir, $arrLangModule, $pDB_acl);
            break;
    }
    return $content;
}
Example #2
0
	$user=new usersMenus();
	if($user->AsVirtualBoxManager==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["services"])){services();exit;}
	if(isset($_GET["windows_manager"])){windows_drivers();exit;}
	if(isset($_GET["utilities"])){utilities_drivers();exit;}
	
	
	if(isset($_GET["sound"])){sound_drivers();exit;}
	if(isset($_GET["storage"])){storage_module();exit;}
	if(isset($_GET["module"])){save_module();exit;}
	if(isset($_GET["package"])){save_package();exit;}

	
	
	
	
js();

function js(){
	$page=CurrentPageName();
	$tpl=new templates();	
	$title=$tpl->_ENGINE_parse_body('{services}');
	
$html="
	function ThinCLientSoftLoadpage(){
    exit;
}
if (isset($_GET["usb"])) {
    usb_drivers();
    exit;
}
if (isset($_GET["sound"])) {
    sound_drivers();
    exit;
}
if (isset($_GET["storage"])) {
    storage_module();
    exit;
}
if (isset($_GET["module"])) {
    save_module();
    exit;
}
if (isset($_GET["package"])) {
    save_package();
    exit;
}
if (isset($_GET["keyboard"])) {
    keyboard_drivers();
    exit;
}
if (isset($_GET["video"])) {
    video_drivers();
    exit;
}
if (isset($_GET["filesystem"])) {