function same_themes($theme, $preset) { $tp = fopen("themes/" . $preset . ".thm", 'r'); $ptheme = load_theme($tp, $preset); // reset the array pointer reset($ptheme); // grab the first array item $item = each($ptheme); // while not at the end of the array while ($item) { // if the item key is a theme setting if (substr($item["key"], 0, 4) == "thm_") { // if they differ return FALSE if ($item["value"] != $theme[strtoupper(trim($item["key"]))]) { return FALSE; } } // grab the next item in the array $item = each($ptheme); } // they match, return TRUE return TRUE; }
| Software distributed under the License is distributed on an "AS IS" | | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See | | the License for the specific language governing rights and | | limitations under the License. | +----------------------------------------------------------------------+ | The Original Code is: Elastix Open Source. | | The Initial Developer of the Original Code is PaloSanto Solutions | +----------------------------------------------------------------------+ $Id: frameRight.php,v 1.1.1.1 2007/07/06 21:31:56 gcarrillo Exp $ */ include_once "../libs/misc.lib.php"; include_once "../configs/default.conf.php"; load_default_timezone(); session_name("elastixSession"); session_start(); // Load smarty $arrConf['mainTheme'] = load_theme($arrConf['basePath'] . "/"); $smarty = getSmarty($arrConf['mainTheme']); $smarty->assign("THEMENAME", $arrConf['mainTheme']); // Nombres válidos de módulos son alfanuméricos y subguión if (!preg_match('/^\\w+$/', $_GET['id_nodo'])) { unset($_GET['id_nodo']); } if (!empty($_GET['id_nodo'])) { $idMenuMostrar = $_GET['id_nodo']; if (!empty($_GET['name_nodo'])) { $smarty->assign("node_name", htmlentities($_GET['name_nodo'], ENT_COMPAT, 'UTF-8')); } // Si no existe el archivo de ayuda y se trata de un menu "padre", // muestro el menu hijo que encuentre primero /* $resArchivoExiste = existeArchivoAyuda($idMenuMostrar);
function process(&$request, &$response) { //init all the resolvers, mappings, handlers, and translators $this->initDispatcher(); //resolve the locale if (!is_null($this->localeResolver)) { $request->locale =& $this->localeResolver->resolveLocale(&$request, &$response); } //themes are loaded after initializing the Dispatcher //so they can't override core functionality with their context (only plugins can do that) if (!is_null($this->themeResolver)) { $request->theme =& load_theme($this->themeResolver->resolveThemeName(&$request, &$response)); } //load text domains AFTER the app, plugins, and theme has been loaded (so they can add their domains) if (!is_null($request->locale)) { i18n_load_text_domains($request->locale); } //do it $this->_dispatch($request, $response); }
} else { $config[$row['key']] = $row['value']; } } } // Check version if ($config['version'] != '1.2') { // send to upgrade header('location: setup/upgrade.php?v=' . $config['version']); } /** * Include theme functions */ include "include/functions/theme.php"; // Load the theme load_theme(); /** * Include language functions */ include "include/functions/language.php"; // Include language file if (isset($config['language']) && $config['language'] != "") { $lang = language($config['language']); if (!is_array($lang)) { // Default language $lang = language('en'); } } else { $lang = language('en'); } // Functions to include
// ini_set('include_path', dirname($_SERVER['SCRIPT_FILENAME']) . ":{$elxPath}:" . ini_get('include_path')); include_once "libs/misc.lib.php"; include_once "configs/default.conf.php"; include_once "libs/paloSantoDB.class.php"; include_once "libs/paloSantoACL.class.php"; include_once "libs/paloSantoMenu.class.php"; include_once "libs/paloSantoNavigation.class.php"; $arrConf['basePath'] = $arrConf['basePath'] . "/admin"; //se cambia la ubicacion del modulo $arrConf['webCommon'] = "../" . $arrConf['webCommon']; //se cambia la ubicacion del modulo load_default_timezone(); session_name("elastixSession"); session_start(); $arrConf['mainTheme'] = load_theme(); if (isset($_GET['logout']) && $_GET['logout'] == 'yes') { $user = isset($_SESSION['elastix_user']) ? $_SESSION['elastix_user'] : "******"; writeLOG("audit.log", "LOGOUT {$user}: Web Interface logout successful. Accepted logout for {$user} from {$_SERVER['REMOTE_ADDR']}."); session_destroy(); session_name("elastixSession"); session_start(); header("Location: index.php"); exit; } //cargar el archivo de idioma load_language(); $lang = get_language(); if (file_exists("langmenus/{$lang}.lang")) { include_once "langmenus/{$lang}.lang"; global $arrLangMenu;
// overwrites default settings set earlier $personal = array_merge($personal, load_settings($fp, $default_theme, $def_Display_Hidden, $numeric_val)); // if the user specified to start in a different dir from his home dir if (compat_array_key_exists("start_dir", $personal) && $personal["start_dir"] != "") { $location = "Location: crossover.php?SID=" . session_id() . "&submit=CD&CHDIR={$personal['start_dir']}"; } } $theme = find_theme($fp, $personal, $default_theme); $location = "Location: ftp.php?SID={$SID}"; break; case gettext("Load Theme"): // if not loading the personal theme if ($theme_select != gettext("personal")) { $tp = fopen("themes/" . $theme_select . ".thm", 'r'); // grab the theme $theme = load_theme($tp); $personal["theme"] = $theme_select; // close the file fclose($tp); } else { $theme = load_personal($personal); $personal["theme"] = $theme_select; } $sess_Data["warn"] = sprintf("%s: %s. %s \"%s\".", gettext("Info"), gettext("Theme loaded"), gettext("Changes not saved permanently until you click"), gettext("Save")); $sess_Data["level"] = "info"; $location = "Location: preferences.php?SID={$SID}"; } // Redirect the browser to the appropriate page. if (!isset($location)) { $location = "Location: ftp.php?SID={$SID}"; }
<?php define('INDEX_RUN', true); /* Load Functions */ require 'engine.php'; if (isset($_GET['err']) && $_GET['err'] != '') { /* 404 and 403 picture */ switch ($_GET['err']) { case '404': header('Content-Type: image/jpeg', true, 404); echo file_get_contents('site-img/404.jpg'); break; case '403': header('Content-Type: image/jpeg', true, 403); echo file_get_contents('site-img/403.jpg'); break; } } else { if (isset($_POST['normal']) && $_POST['normal'] == 'upload') { $results = file_handler(); } else { $results = null; } load_theme($results); }
function update_theme() { //actualizo el tema personalizado del usuario global $arrConf; $arrConf['mainTheme'] = load_theme(); //Update menus elastix permission. if (isset($_SESSION['elastix_user_permission'])) { unset($_SESSION['elastix_user_permission']); } }
function nw_apply_template($template, $args, $no_add = false) { global $themes; $sts = access_query("servertheme"); $lts = access_query("loadtheme"); $thmid = array_pop($sts); $fname = $themes[$thmid]["_fname"]; if ($thmid == $fname) { $thmid = $themes[$thmid]["theme_id"]; } if (!is_array($themes[$thmid]) && ($ltid = array_pop($lts))) { $fname = $ltid; } clearstatcache(); if ($themes[$thmid]["_mtime"] != filemtime($fname) && ($tmp_thm = load_theme($fname))) { if ($themes[$thmid]["_pmode"] == "master") { int_sendtomaster(NM_RELOAD_THEME, $thmid); } $themes[$thmid] = $tmp_thm; $themes[$fname] = $tmp_thm; $themes[$tmp_thm["_fname"]] = $tmp_thm; } $tlang = strtolower($themes[$thmid]["theme_language"]); if (($al = $GLOBALS["htreq_headers"]["ACCEPT-LANGUAGE"]) && ($als = nw_decode_mq_hdr($al))) { foreach (array_keys($als) as $lang) { $lang = strtolower($lang); if (isset($themes[$thmid][$template . ":" . $lang])) { $tname = $template . ":" . $lang; break; } else { if ($tlang == $lang) { break; } } } } if (!$tname) { $tname = $template; } $tmpl = $themes[$thmid][$tname] or $tmpl = $themes[DEFAULT_SERVER_THEME][$tname]; foreach ($args as $k => $v) { $tr_arr["@\$" . strtolower($k) . "@"] = $v; } if (!$no_add) { $tr_arr['@$server_signature@'] = _genpage_signature(); } $trt = strtr($tmpl, $tr_arr); while (($p = strpos($trt, "@!")) !== false && ($p2 = strpos(substr($trt, $p + 2), "@")) !== false) { $ret = substr($trt, 0, $p); $ret .= access_query(strtolower(substr($trt, $p + 2, $p2)), 0); $ret .= substr($trt, $p + $p2 + 3); $trt = $ret; } return $trt; }
require_once BASEPATH . HM_ADMINCP_DIR . '/index.php'; } elseif (isset($modules[$module_key])) { /** Module */ $module = $modules[$module_key]; if (is_array($module)) { $module_name = $module['module_name']; $module_key = $module['module_key']; $module_dir = $module['module_dir']; $module_index = $module['module_index']; if (file_exists(BASEPATH . HM_MODULE_DIR . '/' . $module_dir . '/' . $module_index)) { require_once BASEPATH . HM_MODULE_DIR . '/' . $module_dir . '/' . $module_index; } else { hm_exit('Không tìm thấy file "' . $module_index . '" của module "' . $module_key . '"'); } } else { hm_exit('Lỗi xử lý module' . ' ' . $module); } } else { if (isset($hmrequest[$request_slug])) { if (!function_exists($hmrequest[$request_slug])) { die('Unknown function: ' . $hmrequest[$request_slug]); } else { call_user_func($hmrequest[$request_slug]); } } else { /** Fontend */ $theme = activated_theme(); $args = array('theme' => $theme, 'request' => $request_slug); load_theme($args); } }