PHP Code in template to use date function?
In a template is it possible to replace the code like the following examples to use a date function:
<li>
<a href="https://www.usapolicesupply.com/help.php?"><img src="{$AltSkinDir}/custom/welcome/promotions/image_slider/images/operator.jpg" alt="" /></a>
<p class="flex-caption">We have access to over 120,000 products.</p>
</li>
<li>
<a href="http://www.usapolicesupply.com/breast-cancer-awareness/"><img src="{$AltSkinDir}/custom/welcome/promotions/image_slider/images/bcaware.jpg" alt="" /></a>
<p class="flex-caption">October is Breast Cancer Awareness Month</p>
</li>
with PHP code like this:
// Macmillan Cancertalk week (21-25 Jan)
if ((date('m') == 01) && (date('d') >= 21) || (date('m') == 01) && (date('d') <= 23)) {
echo "<img src=\"images/ribbons/cancertalk.gif\" height=\"145\" width=\"175\" alt=\"Macmillan Cancertalk\" /><br /><h6 class=\"awareness\">Macmillan Cancertalk Week <span class=\"morelink\"><a href=\"the-bookstall-cancer-links-and-resources.php\">more...</a></span></h6>";
}
// Macmillan Cancertalk week (21-25 Jan) and Cervical Cancer Awareness Week (24-30 Jan)
else if ((date('m') == 01) && (date('d') == 24)) {
echo "<img src=\"images/ribbons/macmillan_cervical.gif\" height=\"145\" width=\"175\" alt=\"Macmillan Cancertalk and white and teal awareness ribbons\" /><br /><h6 class=\"awareness\">Macmillan Cancertalk Week & Cervical Cancer Awareness Week <span class=\"morelink\"><a href=\"the-bookstall-cancer-links-and-resources.php\">more...</a></span></h6>";
}
__________________
www.usapolicesupply.com
v4.6.3
Xcartmods reBoot Template
WebsiteCM CDSEO Pro SEO
BCS Multipe Upselling Links
Firetank Feed Manager
BCS Product Importer Updater Pro
BCS Drop Shipper Pro
BCS Quote Request Module
BCS Printable Online Catalog
|