@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-01-07 11:04:37 | |||||
<?php /* Smarty version 2.6.16, created on 2007-06-09 16:07:33 | |||||
compiled from checkmail.tpl */ ?> | compiled from checkmail.tpl */ ?> | ||||
<?php $_smarty_tpl_vars = $this->_tpl_vars; | <?php $_smarty_tpl_vars = $this->_tpl_vars; | ||||
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array())); | $this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array())); | ||||
@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-04-09 19:25:37 | |||||
<?php /* Smarty version 2.6.16, created on 2007-06-09 16:07:02 | |||||
compiled from index.tpl */ ?> | compiled from index.tpl */ ?> | ||||
<?php $_smarty_tpl_vars = $this->_tpl_vars; | <?php $_smarty_tpl_vars = $this->_tpl_vars; | ||||
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array())); | $this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array())); | ||||
@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-01-07 11:04:37 | |||||
<?php /* Smarty version 2.6.16, created on 2007-06-09 16:07:32 | |||||
compiled from confirm_email_text.tpl */ ?> | compiled from confirm_email_text.tpl */ ?> | ||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); | <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); | ||||
smarty_core_load_plugins(array('plugins' => array(array('block', 'textformat', 'confirm_email_text.tpl', 1, false),)), $this); ?> | smarty_core_load_plugins(array('plugins' => array(array('block', 'textformat', 'confirm_email_text.tpl', 1, false),)), $this); ?> | ||||
@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-04-21 12:06:10 | |||||
<?php /* Smarty version 2.6.16, created on 2007-04-25 09:44:13 | |||||
compiled from rss.tpl */ ?> | compiled from rss.tpl */ ?> | ||||
<?php echo '<?xml'; ?> | <?php echo '<?xml'; ?> | ||||
version="1.0" encoding="UTF-8"<?php echo '?>'; ?> | version="1.0" encoding="UTF-8"<?php echo '?>'; ?> | ||||
@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-04-04 21:36:10 | |||||
<?php /* Smarty version 2.6.16, created on 2007-05-22 18:21:22 | |||||
compiled from xml.tpl */ ?> | compiled from xml.tpl */ ?> | ||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); | <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); | ||||
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'xml.tpl', 6, false),)), $this); ?> | smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'xml.tpl', 6, false),)), $this); ?> | ||||
@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-04-09 19:25:37 | |||||
<?php /* Smarty version 2.6.16, created on 2007-06-09 16:07:33 | |||||
compiled from header.tpl */ ?> | compiled from header.tpl */ ?> | ||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||||
@@ -22,7 +22,7 @@ | |||||
<div id="divMenu"> | <div id="divMenu"> | ||||
<ul class="collapse"> | <ul class="collapse"> | ||||
<li <?php if ($this->_tpl_vars['menu_item'] == 'about'): ?>class="selected"<?php endif; ?>><a href="about.php">About</a></li> | <li <?php if ($this->_tpl_vars['menu_item'] == 'about'): ?>class="selected"<?php endif; ?>><a href="about.php">About</a></li> | ||||
<li <?php if ($this->_tpl_vars['menu_item'] == 'api'): ?>class="selected"<?php endif; ?>><a href="api.php?howto">API</a></li> | |||||
<li <?php if ($this->_tpl_vars['menu_item'] == 'api'): ?>class="selected"<?php endif; ?>><a href="apihowto.php">API</a></li> | |||||
<li <?php if ($this->_tpl_vars['menu_item'] == 'getinvolved'): ?>class="selected"<?php endif; ?>><a href="getinvolved.php">Get involved</a></li> | <li <?php if ($this->_tpl_vars['menu_item'] == 'getinvolved'): ?>class="selected"<?php endif; ?>><a href="getinvolved.php">Get involved</a></li> | ||||
<li <?php if ($this->_tpl_vars['menu_item'] == 'faq'): ?>class="selected"<?php endif; ?>><a href="faq.php"><acronym title="Frequently asked questions">FAQ</acronym>s</a></li> | <li <?php if ($this->_tpl_vars['menu_item'] == 'faq'): ?>class="selected"<?php endif; ?>><a href="faq.php"><acronym title="Frequently asked questions">FAQ</acronym>s</a></li> | ||||
@@ -61,7 +61,7 @@ class confirmed_page { | |||||
$smarty->assign("menu_item", "signup"); | $smarty->assign("menu_item", "signup"); | ||||
$smarty->assign("page_title","Confirmed"); | $smarty->assign("page_title","Confirmed"); | ||||
$smarty->assign("form_action", $form_action); | $smarty->assign("form_action", $form_action); | ||||
$smarty->assign("postcode", $this->postcode); | |||||
$smarty->assign("postcode", clean_postcode($this->postcode)); | |||||
$smarty->assign("alert_area_size", $this->alert_area_size); | $smarty->assign("alert_area_size", $this->alert_area_size); | ||||
//Render | //Render | ||||
@@ -236,6 +236,22 @@ function scrape_applications_islington ($search_url, $info_url_base, $comment_ur | |||||
} | } | ||||
return $valid; | return $valid; | ||||
} | } | ||||
function clean_postcode ($postcode, $upper = true) { | |||||
$reg = array(); | |||||
$postcode = trim($postcode); | |||||
preg_match('/^(.+?)([0-9][a-z]{2})$/',$postcode, $reg); | |||||
$clean_postcode = trim($reg[1]) . ' ' . trim($reg[2]); | |||||
if($upper){ | |||||
$clean_postcode = strtoupper($clean_postcode); | |||||
} | |||||
return $clean_postcode; | |||||
} | |||||
//Tiny url | //Tiny url | ||||
function tiny_url($url,$length=30){ | function tiny_url($url,$length=30){ | ||||
@@ -344,7 +360,7 @@ function scrape_applications_islington ($search_url, $info_url_base, $comment_ur | |||||
} | } | ||||
function safe_scrape_page($url, $method = "GET"){ | function safe_scrape_page($url, $method = "GET"){ | ||||
error_log(print_r($url, true)); | |||||
$page = ""; | $page = ""; | ||||
for ($i=0; $i < 3; $i++){ | for ($i=0; $i < 3; $i++){ | ||||
if($page == false){ | if($page == false){ | ||||
@@ -47,7 +47,7 @@ | |||||
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; | $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; | ||||
$smarty->assign("email", $this->email); | $smarty->assign("email", $this->email); | ||||
$smarty->assign("postcode", $this->postcode); | |||||
$smarty->assign("postcode", clean_postcode($this->postcode)); | |||||
$smarty->assign("url", BASE_URL . "/confirmed.php?cid=" . $this->confirm_id); | $smarty->assign("url", BASE_URL . "/confirmed.php?cid=" . $this->confirm_id); | ||||
//Get the email text | //Get the email text | ||||