Exemplo n.º 1
0
    }
}
// Work out what representative types to show
$title = '';
if ($cobrand) {
    $title = cobrand_step_title($cobrand, 1);
}
if ($title == '') {
    $title = "Email your Councillor, MP, MEP, MSP or Welsh, NI, or London Assembly Member for free";
}
$blurb_top = '<h2 id="title">Write to your politicians, national or local, for free.</h2><p>Over 200,000 messages sent last year.</p>';
$fyr_all_url = null;
$area_types = null;
if ($a_forward) {
    # Subset of representatives
    $area_types = fyr_parse_area_type_list($a_forward);
    if ($area_types) {
        $area_type_desc = fyr_describe_area_type_list($area_types);
        if (!$forced_rep_type) {
            $fyr_all_url = htmlspecialchars(url_new('', false, 'pc', get_http_var('pc'), 'fyr_extref', fyr_external_referrer(), 'cocode', get_http_var('cocode')));
        }
        $blurb_top = "<h2>Write to your {$area_type_desc}</h2><p>Over 200,000 messages sent last year.</p>";
    }
}
if ($template != 'index-advice') {
    header('Cache-Control: max-age=3600');
}
$options = cobrand_postcode_form_options($cobrand);
$form = postcode_form($pc, $cobrand, $cocode, $a_forward, $error_message, $options);
$num_messages = null;
if ($cobrand && file_exists("../../data/cobrand.csv")) {
Exemplo n.º 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;
}