Created
          December 3, 2014 05:35 
        
      - 
      
 - 
        
Save seanmcn/340eb2ed8f04156932a3 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
seanmcn created this gist
Dec 3, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ <?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>