Пример #1
0
$person = get_http_var("person");
if ($person) {
    $ids = dadem_get_same_person($person);
    dadem_check_error($ids);
    // TODO: Fix up case when a person is a representative multiple times
    // (for now we just take the most recent made one, i.e. last in list)
    $id = $ids[count($ids) - 1];
    header('Location: ' . url_new('write', false, 'fyr_extref', fyr_external_referrer(), 'cocode', get_http_var('cocode'), 'who', $id));
    exit;
}
// Pass on any representative type selection
$a_forward = get_http_var("a");
$forced_rep_type = false;
if ($cobrand) {
    $old_a_forward = $a_forward;
    $a_forward = cobrand_force_representative_type($cobrand, $cocode, $a_forward);
    if ($old_a_forward != $a_forward) {
        $forced_rep_type = true;
    }
}
// Validate postcode, and prepare appropriate page
if (isset($_GET['t'])) {
    $template = 'index-' . $_GET['t'];
} else {
    $template = "index-index";
}
$error_message = null;
if ($pc == '' && (array_key_exists('pc', $_GET) || array_key_exists('pc', $_POST))) {
    $error_message = cobrand_empty_postcode_message($cobrand, $cocode);
}
if ($pc) {
Пример #2
0
function get_area_types()
{
    global $cobrand, $cocode;
    $a_forward = get_http_var('a');
    if ($cobrand) {
        $a_forward = cobrand_force_representative_type($cobrand, $cocode, $a_forward);
    }
    $area_types = fyr_parse_area_type_list($a_forward);
    debug_timestamp();
    return $area_types;
}