diff --git a/components/election.php b/components/election.php index 3661ed5d0599574a792b7f21d85654a9a5ec9c5b..ed681a0d5f613957f94c21b864177a7458687e5b 100644 --- a/components/election.php +++ b/components/election.php @@ -1,10 +1,4 @@ <?php -# Settings for this particular election: -define('ELECTION_YEAR', '2009'); -define('ELECTION_START', '2008-12-01 00:00'); -define('ELECTION_END', '2008-12-08 00:00'); -define('ELECTION_NO_MANIFESTO', 'http://sucs.org/vote/None.html'); - $smarty->assign("election_year", ELECTION_YEAR); $smarty->assign("title", "Executive Election ".ELECTION_YEAR); diff --git a/components/electionreminder.php b/components/electionreminder.php new file mode 100644 index 0000000000000000000000000000000000000000..61cd43c8ccbafe4bd4d88df939c010389b1e7ed1 --- /dev/null +++ b/components/electionreminder.php @@ -0,0 +1,8 @@ +<?php + +if (strtotime('now') > strtotime(ELECTION_START) && strtotime('now') < strtotime(ELECTION_END) && !$DB->GetOne("SELECT username FROM election_votes where username=?", $session->username)) { + $messages['info'][] = "<strong>You haven't voted yet</strong><br />\nThe SUCS Executive Election is in progress. <a href=\"/Vote\">Vote now!</a>\n"; +} + + +?> diff --git a/components/front.php b/components/front.php index e11783f0b1393f7e0034dc52895e18ef34916586..d138ecf38039aef012614fdea3ffdd8daf0fb9a7 100644 --- a/components/front.php +++ b/components/front.php @@ -11,6 +11,8 @@ if (!$session->loggedin) { $output = "<div class=\"cbb\"><h3>You are logged in</h3><p>If you would like to contribute to the site or report a bug, please contact chckens or dez.</p></div>"; //include('users.php'); //$output .= $result; +include('electionreminder.php'); +$output .= $result; include('planetposts.php'); $output .= $result; include('forumposts.php');