Exemple #1
0
  $dates = SearchOptions::search_dates($timeframe);
  $events = MIT_Calendar::fullTextSearch($search_terms, $dates['start'], $dates['end'], $category);
} else {
  if (isset($_REQUEST['timeframe'])) {
    $dates = SearchOptions::search_dates($timeframe);
    $start = $dates['start'];
    $end = $dates['end'];
  } else {
    $today = day_info(time());
    $start = $today['date'];
    $end = NULL;
  }
  $events = MIT_Calendar::CategoryEventsHeaders($category, $start, $end);
}

$content = new ResultsContent(
  "items", "calendar", $page,
  array(
    "id" => $category->catid,
    "timeframe" => $timeframe
  )
);

$form = new CalendarForm($page, SearchOptions::get_options($timeframe), $category->catid);
$content->set_form($form);

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

?>
Exemple #2
0
<?php

/**
 * Copyright (c) 2008 Massachusetts Institute of Technology
 * 
 * Licensed under the MIT License
 * Redistributions of files must retain the above copyright notice.
 * 
 */
// various copy includes
require_once "../../config.gen.inc.php";
require_once "data/data.inc.php";
// records stats
require_once "../page_builder/page_header.php";
//defines all the variables related to being today
require_once "lib/calendar.lib.php";
require_once "lib/textformat.lib.php";
$today = day_info(time());
$search_options = SearchOptions::get_options();
require "templates/{$prefix}/index.html";
$page->output();
<?php

require_once "../config/mobi_web_constants.php";
require PAGE_HEADER;
require LIBDIR . "mit_calendar.php";
require "calendar_lib.php";
$search_terms = $_REQUEST['filter'];
$timeframe = isset($_REQUEST['timeframe']) ? $_REQUEST['timeframe'] : 0;
$dates = SearchOptions::search_dates($timeframe);
$events = MIT_Calendar::fullTextSearch($search_terms, $dates['start'], $dates['end']);
$content = new ResultsContent("items", "calendar", $page, array("timeframe" => $timeframe));
$form = new CalendarForm($page, SearchOptions::get_options($timeframe));
$content->set_form($form);
require "{$page->branch}/search.html";
$page->output();