Example #1
0
    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();
Example #2
0
File: index.php Project: ruucla/mwf
/**
 * Handle differences between a subsection and the top-level menu, using key
 * 'default' if on the front page or otherwise the $_GET['s'] parameter.
 */
if (isset($_GET['s']) && isset($menu[$_GET['s']])) {
    $menu_items = $menu[$_GET['s']];
    $main_menu = false;
} else {
    $menu_items = $menu['default'];
    $main_menu = true;
}
/**
 * Start page
 */
echo HTML_Decorator::html_start()->render();
echo Site_Decorator::head()->set_title(Config::get('global', 'title_text'))->render();
echo HTML_Decorator::body_start($main_menu ? array('class' => 'front-page') : array())->render();
/*
 * Header
 */
if ($main_menu) {
    echo '<h1 id="header"><img src="' . Config::get('frontpage', 'header_image_main') . '" alt="' . Config::get('frontpage', 'header_image_main_alt') . '"><span>' . Config::get('frontpage', 'header_main_text') . '</span></h1>';
} else {
    echo Site_Decorator::header()->set_title(ucwords(str_replace('_', ' ', $_GET['s'])))->render();
}
/*
 * Menu
 */
$menu = Site_Decorator::menu_full()->set_padded()->set_detailed();
if ($main_menu) {
    $menu->add_class('menu-front');
Example #3
0
 * @uses Site_Decorator
 * @uses HTML_Decorator
 * @uses HTML_Start_HTML_Decorator
 * @uses Head_Site_Decorator
 * @uses Body_Start_HTML_Decorator
 * @uses Header_Site_Decorator
 * @uses Content_Full_Site_Decorator
 * @uses Button_Full_Site_Decorator
 * @uses Default_Footer_Site_Decorator
 * @uses Body_End_HTML_Decorator
 * @uses HTML_End_HTML_Decorator
 */
require_once dirname(dirname(__FILE__)) . '/assets/lib/decorator.class.php';
require_once dirname(dirname(__FILE__)) . '/assets/config.php';
echo HTML_Decorator::html_start()->render();
echo Site_Decorator::head()->set_title('MWF License')->render();
echo HTML_Decorator::body_start()->render();
echo Site_Decorator::header()->set_title('MWF License')->render();
$terms = array('To share all Derivative Works you create of the Software (the Mobile Web
   Framework itself) with the Licensor at UCLA\'s Office of Information
   Technology\'s Academic Application Services so that others who are using the
   Software can benefit from improvements.', 'That you will include the phrase "Powered by: " + the UCLA MOBILE WEB
   FRAMEWORK logo somewhere on your application or website  The Logo should be
   an active hyperlink to this web address: "http://mwf.ucla.edu"', 'Not remove any copyright or other notices from the Software.', 'That you will not distribute this software or any Derivative Works of
   this software to any party whatsoever, modified or unmodified.  UCLA shall be
   the only distributor of this software, with no exceptions.', 'THAT THIS PRODUCT IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
   IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Example #4
0
 * @uses HTML_Decorator
 * @uses HTML_Start_HTML_Decorator
 * @uses Head_Site_Decorator
 * @uses Body_Start_HTML_Decorator
 * @uses Header_Site_Decorator
 * @uses Content_Full_Site_Decorator
 * @uses Button_Full_Site_Decorator
 * @uses Default_Footer_Site_Decorator
 * @uses Body_End_HTML_Decorator
 * @uses HTML_End_HTML_Decorator
 */
require_once dirname(dirname(__FILE__)) . '/assets/lib/decorator.class.php';
require_once dirname(dirname(__FILE__)) . '/assets/config.php';
$contributors = array('UC Los Angeles' => array('Eric Bollens', 'Ed Sakabu', 'Mike Takahashi', 'Joseph Madella', 'Nate Emerson', 'Zorayr Khalapyan'), 'UC Berkeley' => array('Sara Leavitt'), 'UC San Diego' => array('Mojgan Amini', 'Ike Lin'), 'UC San Francisco' => array('Richard Trott'));
echo HTML_Decorator::html_start()->render();
echo Site_Decorator::head()->set_title('MWF Credits')->render();
echo HTML_Decorator::body_start()->render();
echo Site_Decorator::header()->set_title('MWF Credits')->render();
echo Site_Decorator::content_full()->set_padded()->add_header('Project')->add_paragraph('<strong>Project Lead</strong><br>
                                Rose Rocchio (UCLA)<br>' . HTML_Decorator::tag('a', '*****@*****.**', array('href' => 'mailto:rrocchio@oit.ucla.edu')), array('style' => 'text-align:center;'))->add_paragraph('<strong>Technical Lead</strong><br>
                                Eric Bollens (UCLA)<br>' . HTML_Decorator::tag('a', '*****@*****.**', array('href' => 'mailto:ebollens@oit.ucla.edu')), array('style' => 'text-align:center;'))->add_paragraph('<strong>Systems Lead</strong><br>
                                Ed Sakabu (UCLA)<br>' . HTML_Decorator::tag('a', '*****@*****.**', array('href' => 'mailto:sakabu@ats.ucla.edu')), array('style' => 'text-align:center;'))->render();
$contributions = Site_Decorator::content_full()->set_padded()->add_header('Contributors')->add_paragraph('In addition to their own mobile applications, a number of participants have contributed code directly to the UCLA Mobile Web Framework.', array('style' => 'font-style:italic;'));
foreach ($contributors as $campus => $people) {
    $campus_contributors = '<strong>' . $campus . '</strong><br>';
    foreach ($people as $person) {
        $campus_contributors .= $person . '<br>';
    }
    $campus_contributors = substr($campus_contributors, 0, strlen($campus_contributors) - 4);
    $contributions->add_paragraph($campus_contributors, array('style' => 'text-align:center;'));
}