return $text ? 'true' : 'false'; } function text2text($text) { return $text ? $text : 'false'; } function js2bool2text($function) { return '<script type="text/javascript"> document.write(' . $function . '() ? "true" : "false"); </script>'; } function js2text($function) { return '<script type="text/javascript"> var t; if(t = ' . $function . '()) document.write(t); else document.write("false"); </script>'; } echo HTML_Decorator::html_start()->render(); echo Site_Decorator::head()->set_title('MWF About')->render(); echo HTML_Decorator::body_start()->render(); echo Site_Decorator::header()->set_title('MWF Device')->render(); echo Site_Decorator::content_full()->set_padded()->add_header('The Framework')->add_subheader('Server Info')->add_section(label('User Agent') . $_SERVER['HTTP_USER_AGENT'])->add_section(label('IP Address') . $_SERVER['REMOTE_ADDR'])->add_subheader('JS Classification')->add_section(label('mwf.classification.isMobile()') . js2bool2text('mwf.classification.isMobile'))->add_section(label('mwf.classification.isBasic()') . js2bool2text('mwf.classification.isBasic'))->add_section(label('mwf.classification.isStandard()') . js2bool2text('mwf.classification.isStandard'))->add_section(label('mwf.classification.isFull()') . js2bool2text('mwf.classification.isFull'))->add_section(label('mwf.classification.isOverride()') . js2bool2text('mwf.classification.isOverride'))->add_section(label('mwf.classification.isPreview()') . js2bool2text('mwf.classification.isPreview'))->add_subheader('PHP Classification')->add_section(label('Classification::is_mobile()') . bool2text(Classification::is_mobile()))->add_section(label('Classification::is_basic()') . bool2text(Classification::is_basic()))->add_section(label('Classification::is_standard()') . bool2text(Classification::is_standard()))->add_section(label('Classification::is_full()') . bool2text(Classification::is_full()))->add_section(label('Classification::is_override()') . bool2text(Classification::is_override()))->add_section(label('Classification::is_preview()') . bool2text(Classification::is_preview()))->add_subheader('JS User Agent')->add_section(label('mwf.userAgent.getOS()') . js2text('mwf.userAgent.getOS'))->add_section(label('mwf.userAgent.getOSVersion()') . js2text('mwf.userAgent.getOSVersion'))->add_section(label('mwf.userAgent.getBrowser()') . js2text('mwf.userAgent.getBrowser'))->add_section(label('mwf.userAgent.getBrowserEngine()') . js2text('mwf.userAgent.getBrowserEngine'))->add_section(label('mwf.userAgent.getBrowserEngineVersion()') . js2text('mwf.userAgent.getBrowserEngineVersion'))->add_subheader('PHP User Agent')->add_section(label('User_Agent::get_os()') . text2text(User_Agent::get_os()))->add_section(label('User_Agent::get_os_version()') . text2text(User_Agent::get_os_version()))->add_section(label('User_Agent::get_browser()') . text2text(User_Agent::get_browser()))->add_section(label('User_Agent::get_browser_engine()') . text2text(User_Agent::get_browser_engine()))->add_section(label('User_Agent::get_browser_engine_version()') . text2text(User_Agent::get_browser_engine_version()))->add_subheader('JS Screen')->add_section(label('mwf.screen.getHeight()') . js2text('mwf.screen.getHeight'))->add_section(label('mwf.screen.getWidth()') . js2text('mwf.screen.getWidth'))->add_section(label('mwf.screen.getPixelRatio()') . js2text('mwf.screen.getPixelRatio'))->add_subheader('PHP Screen')->add_section(label('Screen::get_height()') . text2text(Screen::get_height()))->add_section(label('Screen::get_width()') . text2text(Screen::get_width()))->add_section(label('Screen::get_pixel_ratio()') . text2text(Screen::get_pixel_ratio()))->render(); echo Site_Decorator::button_full()->set_padded()->add_option(Config::get('global', 'back_to_home_text'), Config::get('global', 'site_url'))->render(); echo Site_Decorator::default_footer()->render(); echo HTML_Decorator::body_end()->render(); echo HTML_Decorator::html_end()->render();
if (isset($menu_item['restriction'])) { $function = $menu_item['restriction']; if (!User_Agent::$function()) { continue; } } $menu->add_item($menu_item['name'], $menu_item['url'], isset($menu_item['id']) ? array('id' => $menu_item['id']) : array()); } echo $menu->render(); /** * Back button */ if (!$main_menu) { echo Site_Decorator::button_full()->set_padded()->add_option(Config::get('global', 'back_to_home_text'), 'index.php')->render(); } /** * Footer */ $footer = Site_Decorator::footer(); if ($full_site_url = Config::get('frontpage', 'full_site_url')) { $footer->set_full_site('Full Site', Config::get('frontpage', 'full_site_url')); } if ($help_site_url = Config::get('frontpage', 'help_site_url')) { $footer->set_help_site('Help', Config::get('frontpage', 'help_site_url')); } echo $footer->render(); /** * End page */ echo HTML_Decorator::body_end()->render(); echo HTML_Decorator::html_end()->render();