Example #1
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']);
}

?>
Example #2
0
 public function output($results)
 {
     $total = count($results);
     //truncate results and determine if a next page is needed
     $start = $_REQUEST["start"] ? (int) $_REQUEST["start"] : 0;
     $pager = new Pager($this->phone, $results, $start);
     $results2 = $results;
     $results = $pager->items();
     $search_terms = $_REQUEST['filter'];
     $params = array_merge(array("filter" => $search_terms), $this->extra_params);
     $arrows = $pager->prev_next_html($_SERVER['SCRIPT_NAME'], $params, "start");
     $start++;
     $end = $pager->last();
     require "../templates/{$this->prefix}/search_results.html";
     return $this->page;
 }