Exemplo n.º 1
0
<?php

require_once "../config/mobi_web_constants.php";
require PAGE_HEADER;
require "WhatsNew.php";
// dynamic pages need to include dynamics scripts
switch ($_REQUEST['page']) {
    // dynamic cases
    case "statistics":
        require "statistics.php";
        break;
        // static cases
    // static cases
    case "background":
        $device_phrases = array("Webkit" => "iPhone, Android, and Palm webOS phones", "Touch" => "touchscreen phones", "Basic" => "non-touchscreen phones");
        $device_phrase = $device_phrases[$page->branch];
    case "requirements":
    case "credits":
        require "{$page->branch}/{$_REQUEST['page']}.html";
        $page->cache();
        $page->output();
        break;
    case "about":
    default:
        $whats_new = new WhatsNew();
        $whats_new_count = $whats_new->count(WhatsNew::getLastTime());
        require "{$page->branch}/index.html";
        $page->output();
}
Exemplo n.º 2
0
<?php
$docRoot = getenv("DOCUMENT_ROOT");

require_once $docRoot . "/mobi-config/mobi_web_constants.php";
require WEBROOT . "/page_builder/page_header.php";
require WEBROOT . "/mobile-about/WhatsNew.php";

$whats_new = new WhatsNew();
$new_items = $whats_new->get_items();
WhatsNew::setLastTime();

$start = !isset($_REQUEST['start']) ? 0 : intval($_REQUEST['start']);
$pager = new Pager($page->max_list_items, $new_items, $start);
$arrows = $pager->prev_next_html($_SERVER['SCRIPT_NAME'], array(), "start");
$items = $pager->items();

require "$page->branch/new.html";
$page->output();

/*
function text($data) {
  return htmlentities($data['body']);
}
*/

function date_string($data, $format) {
  return date($format, $data['unixtime']);
}

?>
Exemplo n.º 3
0
 public static function init() {
   self::$whats_new = new WhatsNew();
   self::$time = WhatsNew::getLastTime();
   self::$whats_new_count = self::$whats_new->count(self::$time);
  
 }