Esempio n. 1
0
function api_getWMS_person($pid)
{
    _api_getHansard_search(array('pid' => $pid, 'type' => 'wms'));
}
Esempio n. 2
0
function api_getDebates_type($t)
{
    if ($t == 'commons') {
        $list = 'DEBATE';
        $type = 'debates';
    } elseif ($t == 'lords') {
        $list = 'LORDSDEBATE';
        $type = 'lords';
    } elseif ($t == 'westminsterhall') {
        $list = 'WHALL';
        $type = 'whall';
    } elseif ($t == 'scotland') {
        $list = 'SP';
        $type = 'sp';
    } elseif ($t == 'northernireland') {
        $list = 'NI';
        $type = 'ni';
    } else {
        api_error('Unknown type');
        return;
    }
    if ($d = get_http_var('date')) {
        _api_getHansard_date($list, $d);
    } elseif (get_http_var('search') || get_http_var('person')) {
        $s = get_http_var('search');
        $pid = get_http_var('person');
        _api_getHansard_search(array('s' => $s, 'pid' => $pid, 'type' => $type));
    } elseif ($gid = get_http_var('gid')) {
        $redirect = _api_getHansard_gid($list, $gid);
        if (is_string($redirect)) {
            $URL = $_SERVER['REQUEST_URI'];
            $URL = str_replace($gid, $redirect, $URL);
            #header('Location: http://' . DOMAIN . $URL);
            #exit;
        }
    } elseif ($y = get_http_var('year')) {
        _api_getHansard_year($list, $y);
    } else {
        api_error('That is not a valid search.');
    }
}
Esempio n. 3
0
function api_getHansard_person($pid) {
	_api_getHansard_search(array(
		'pid' => $pid
	));
}
function api_getDebates_type($t) {
	if ($t == 'commons') {
		$list = 'DEBATE';
		$type = 'debates';
	} elseif ($t == 'lords') {
		$list = 'LORDSDEBATE';
		$type = 'lords';
	} elseif ($t == 'westminsterhall') {
		$list = 'WHALL';
		$type = 'whall';
	} elseif ($t == 'scotland') {
		$list = 'SP';
		$type = 'sp';
	} elseif ($t == 'northernireland') {
		$list = 'NI';
		$type = 'ni';
	} else {
		api_error('Unknown type');
		return;
	}
	if ($d = get_http_var('date')) {
		_api_getHansard_date($list, $d);
	} elseif (get_http_var('search') || get_http_var('person')) {
		$s = get_http_var('search');
		$pid = get_http_var('person');
		_api_getHansard_search(array(
			's' => $s,
			'pid' => $pid,
			'type' => $type,
		));
	} elseif ($gid = get_http_var('gid')) {
		$redirect = _api_getHansard_gid($list, $gid);
		if (is_string($redirect)) {
            api_output(array(
                'redirect' => $redirect
            ));
		}
	} elseif ($y = get_http_var('year')) {
		_api_getHansard_year($list, $y);
	} else {
		api_error('That is not a valid search.');
	}
}
function api_getWrans_person($pid) {
	_api_getHansard_search(array(
		'pid' => $pid,
		'type' => 'wrans',
	));
}