Created
December 3, 2014 05:35
-
-
Save seanmcn/340eb2ed8f04156932a3 to your computer and use it in GitHub Desktop.
Some legacy code from OTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Author: Sean McNamara | |
* Some legacy code from OTS | |
*/ | |
$tr_date = strtotime($options['tr_date']); | |
$fest_date = strtotime($options['fest_date']); | |
$games_date = strtotime($options['games_date']); | |
$now = strtotime("now"); | |
$difference = $tr_date - $now; | |
if ($difference < 0) { $difference = 0; } | |
echo "<div class=\"countdown_container\"><div class=\"countdown_days\"><h2>Torch Relay</h2>". ceil($difference/60/60/24)."<em>days</em><br /><date>18th May 2012</date></div></div>"; | |
$difference = $fest_date - $now; | |
if ($difference < 0) { $difference = 0; } | |
echo "<div class=\"countdown_container\"><div class=\"countdown_days\"><h2>Festival Date</h2>". ceil($difference/60/60/24)."<em>days</em><br /><date>21st June 2012</date></div></div>"; | |
$difference = $games_date - $now; | |
if ($difference < 0) { $difference = 0; } | |
echo "<div class=\"countdown_container\"><div class=\"countdown_days\"><h2>Olympic Games</h2>". ceil($difference/60/60/24)."<em>days</em><br /><date>27th July 2012</date></div></div>"; | |
?> | |
<div class="olympic_date">Olympic Games {pyro:theme:image file="torch_icon.png"} <date>27th July - 12th August 2012</date></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment