@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-06-09 16:07:33 | |||||
<?php /* Smarty version 2.6.16, created on 2008-09-09 09:15:00 | |||||
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 2008-02-21 14:24:04 | |||||
<?php /* Smarty version 2.6.16, created on 2008-09-28 20:51:25 | |||||
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())); | ||||
@@ -57,6 +57,8 @@ unset($_smarty_tpl_vars); | |||||
<div id="divSiteUpdates"> | <div id="divSiteUpdates"> | ||||
<h4>Recent site updates</h4> | <h4>Recent site updates</h4> | ||||
<ul class="nobullets"> | <ul class="nobullets"> | ||||
<li><em>May 2008</em>Now has 250 Local authorities covered</li> | |||||
<li><em>July 2007</em>Shortlisted for New Statesman New Media Award</li> | |||||
<li><em>July 2007</em>Added 21 councils inc. Lewisham, New Forest National Park and Edinburgh </li> | <li><em>July 2007</em>Added 21 councils inc. Lewisham, New Forest National Park and Edinburgh </li> | ||||
<li><em>April 2007</em>Added 50 more councils.<li> | <li><em>April 2007</em>Added 50 more councils.<li> | ||||
<li><em>March 2007</em> Added an API and a few more councils (inc. Islington and Hackney)</li> | <li><em>March 2007</em> Added an API and a few more councils (inc. Islington and Hackney)</li> | ||||
@@ -1,4 +1,4 @@ | |||||
<?php /* Smarty version 2.6.16, created on 2007-06-09 16:07:32 | |||||
<?php /* Smarty version 2.6.16, created on 2008-09-09 09:15:00 | |||||
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-07-21 09:12:43 | |||||
<?php /* Smarty version 2.6.16, created on 2008-09-09 09:08:27 | |||||
compiled from getinvolved.tpl */ ?> | compiled from getinvolved.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 2008-02-21 14:24:04 | |||||
<?php /* Smarty version 2.6.16, created on 2008-09-28 20:51:25 | |||||
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"> | ||||
@@ -0,0 +1,19 @@ | |||||
{textformat style='email'} | |||||
Hello, | |||||
This is a one off email to let you know about a new local information website I've built on top of PlanningAlerts: | |||||
http://www.streetwire.org | |||||
StreetWire is like PlanningAlerts for every kind of local information. As well as planning applications, it will tell you about licensing applications, crime, events and local news near you. | |||||
You can also share news with your neighbours, so If you know some little tipbit of local news, or want to tell your neighbours about an event it helps conenct you with your neighbours. | |||||
You can signup here: | |||||
http://www.streetwire.org | |||||
All the best, | |||||
Richard Pope (volunteer PlanningAlerts.com) | |||||
{/textformat} |
@@ -18,7 +18,7 @@ | |||||
//Run | //Run | ||||
function run (){ | function run (){ | ||||
$db = DB::connect(DB_CONNECTION_STRING); | $db = DB::connect(DB_CONNECTION_STRING); | ||||
//Grab all the users | //Grab all the users | ||||
@@ -0,0 +1,56 @@ | |||||
<?php | |||||
require_once('tools_ini.php'); | |||||
require_once('application.php'); | |||||
require_once('DB.php'); | |||||
//initialise | |||||
$news_mailer = new news_mailer(); | |||||
$news_mailer->run(); | |||||
//class | |||||
class news_mailer { | |||||
//Run | |||||
function run (){ | |||||
$db = DB::connect(DB_CONNECTION_STRING); | |||||
//Grab all the users | |||||
$sql = "select user_id, email, postcode, bottom_left_x, bottom_left_y, top_right_x, top_right_y, alert_area_size, confirm_id | |||||
from user | |||||
where confirmed = 1 and user_id = 5959"; | |||||
$user_results = $db->getAll($sql); | |||||
print "Found " . sizeof($user_results) . " to email "; | |||||
if(sizeof($user_results) > 0){ | |||||
//Loop though users | |||||
for ($i=0; $i < sizeof($user_results); $i++){ | |||||
//Smarty template | |||||
$smarty = new Smarty; | |||||
$smarty->force_compile = true; | |||||
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; | |||||
//Get the email text | |||||
$email_text = $smarty->fetch(SMARTY_TEMPLATE_DIRECTORY . 'news_mail.tpl'); | |||||
//Send the email | |||||
if($email_text !=""){ | |||||
send_text_email($user_results[$i][1], EMAIL_FROM_NAME, EMAIL_FROM_ADDRESS, "StreetWire - a new service from PlanningAlerts", $email_text); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
?> |