Search PHP
Search PHP
Search PHP
php
/*
* @author Mark Slee
*
* @package ubersearch
*/
flag_allow_guest();
$user = search_require_login();
if ($_POST) {
$arr = us_flatten_checkboxes($_POST, array('ii'));
$qs = '?';
foreach($arr as $key = > $val) {
$qs. = $key.'='.urlencode($val).'&';
}
$qs = substr($qs, 0, (strlen($qs) - 1));
redirect($_SERVER['PHP_SELF'].$qs);
}
tpl_set('hs_id', $hsid);
tpl_set('hs_name', get_high_school($hsid));
tpl_set('hs_year', $hsyear);
tpl_set('is_advanced_search', $get_adv);
tpl_set('user', $user);
tpl_set('count_total', 0); // pre-set count_total for the sake of ads page length
$EVENTS_CAL_DAYS_AHEAD = 60;
$events_begin = strftime("%Y%m01"); // first of the month
$events_end = strftime("%Y%m%d", strtotime(strftime("%m/01/%Y")) + (86400 *
$EVENTS_CAL_DAYS_AHEAD));
$events_params = array('dy1' = > $events_begin, 'dy2' = > $events_end);
// Holy shit, is this the cleanest fucking frontend file you've ever seen?!
ubersearch($_GET, $embedded = false, $template = true);
// Render it
render_template($_SERVER['PHP_ROOT'].'/html/s.phpt');
/**
* login function for s.php
*
* @author Philip Fung
*/
function search_require_login() {
global $get_k;
$search_key = $get_k;