File: calendar_search.php

package info (click to toggle)
kronolith2 2.1.4-1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 5,560 kB
  • ctags: 2,171
  • sloc: php: 8,755; xml: 1,049; sql: 258; makefile: 65
file content (29 lines) | stat: -rw-r--r-- 961 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
 * $Horde: kronolith/calendar_search.php,v 1.2.2.2 2006/01/01 21:29:02 jan Exp $
 *
 * Copyright 2005-2006 Jan Schneider <jan@horde.org>
 *
 * See the enclosed file COPYING for license information (GPL). If you did not
 * receive this file, see http://www.fsf.org/copyleft/gpl.html.
 */

@define('KRONOLITH_BASE', dirname(__FILE__));
require_once KRONOLITH_BASE . '/lib/base.php';

if (!Auth::getAuth()) {
    Util::closeWindowJS();
    exit;
}

$results = false;
if (($search = Util::getFormData('search', '')) !== '') {
    $results = array_filter($all_calendars, create_function('&$share', 'return stristr($share->get("name"), $GLOBALS["search"]) !== false;'));
}

/* Display the form. */
$title = _("Show Calendar");
Horde::addScriptFile('stripe.js', 'kronolith', true);
require KRONOLITH_TEMPLATES . '/common-header.inc';
require KRONOLITH_TEMPLATES . '/calendars/search.inc';
require $registry->get('templates', 'horde') . '/common-footer.inc';