/** * @name warning This function revise if the current Navigator is Internet Explorer and if is true, show a message to upgrade if is older version */ static function warning() { if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { echo '<!--[if lte IE 9]> <div class="warning">' . kw::t('Please, update your Internet Explorer version or change to:', 'kw/InternetExplorer') . ' <a href="http://www.mozilla.org/es-ES/firefox/new/" target="_blank">Mozilla Firefox</a> o <a href="http://www.google.com/intl/es_es/chrome/" target="_blank">Google Chrome</a></div> <![endif]-->'; } }
<h1><?php echo kw::t('Error'), ' ', $this->error; ?> </h1> <p> <?php echo kw::t($this->errorMessage); ?> </p>
/** * This function load main functions kernel and include controllers, models and others * It just prepare the get base ($module, $controller, $action) and launch $controller->main(); * Also checks if controller file exists to load the error controller * It load APP configuration too * @param unknown $def_module Default module * @param unknown $def_controller Default controller * @param unknown $def_action Default action */ static function start($def_module, $def_controller, $def_action) { // Cargamos el idioma self::loadlang(); // preparamos una URL con los valores recibidos y utilizando los de defecto si nos falta alguno importante (o todos) $module = kw::get('l', $def_module); $controller = kw::get('c', $def_controller); $action = kw::get('a', $def_action); $file = kw::$app_dir . 'private/modules/' . $module . '/controllers/' . $controller . '.php'; // Cargamos la configuracion propia de la aplicacion (es mas rapido hacerlo manualmente que a traves de la funcion) require kw::$app_dir . 'private/config/app.conf.php'; require kw::$app_dir . 'private/config/config.conf.php'; // Comprobamos si existe el archivo del controlador if (!is_file($file)) { // El controlador no existe... $controller = 'errors'; $file = kw::$app_dir . 'private/modules/' . $module . '/controllers/' . $controller . '.php'; // Tampoco el archivo de error if (!is_file($file)) { Redirector::rewrite($def_module, $def_controller, $def_action); } // El de error existe... $action = 'e404'; } // Cargamos el controlador include $file; // Create the main APP $c = $controller . 'Controller'; $app = new $c($module, $controller, $action); // $controller extend KWController? if (is_subclass_of($app, 'KWController')) { // Launch the app, it will load all (controller and after view) if (!$app->main()) { // APP instatie fail (action no exist and is an error) Redirector::rewrite($def_module, $def_controller, $def_action); } } else { echo $controller, ' ', kw::t('must extends KWController'); die; } }
<?php /* CONTENT OF EACH ARRAY * 'TextMenu'=>array( * mod = module, * cont = controller, * act = action, * target = type of target in href, * href = direct HREF (this is ignored if are "cont" or "act" * ) * * EMPTY show index */ return array(kw::t('Home', 'generic') => array('href' => array('cont' => 'index', 'act' => 'index')), kw::t('Documentation', 'generic') => array('href' => array('cont' => 'documentation', 'act' => 'index')), kw::t('Downloads', 'generic') => array('href' => array('cont' => 'downloads', 'act' => 'index')), kw::t('Changelog', 'generic') => array('href' => array('cont' => 'changelog', 'act' => 'index')), kw::t('Contact', 'generic') => array('href' => array('cont' => 'contact', 'act' => 'index')));
<?php /* CONTENT OF EACH ARRAY * 'TextMenu'=>array( * mod = module, * cont = controller, * act = action, * target = type of target in href, * href = direct HREF (this is ignored if are "cont" or "act" * ) * * EMPTY show index */ return array(kw::t('Home', 'generic') => array('href' => array('cont' => 'index', 'act' => 'index')), kw::t('Contact', 'generic') => array('href' => array('cont' => 'contact', 'act' => 'index')), 'ArrayZone.com' => array('target' => '_blank', 'href' => 'http://arrayzone.com'), 'KernelWeb Webpage' => array('target' => '_blank', 'href' => 'http://kernel.arrayzone.com'));