Doublezero
New Member
I need to put some php code in the template. Is there anyway for me to do this?
$today = date('d/m/Y');
$start_date="01/02/2013";
$end_date="05/03/2013";
$date_from_user="$today";
function geraTimestamp($data)
{
$partes = explode('/', $data);
return mktime(0, 0, 0, $partes[1], $partes[0], $partes[2]);
}
$startDatedt = geraTimestamp($start_date);
$endDatedt = geraTimestamp($end_date);
$usrDatedt = geraTimestamp($date_from_user);
if (($usrDatedt >= $startDatedt) && ($usrDatedt <= $endDatedt))
{
echo file_get_contents("/home/qwerty/public_html/plugins/Sponsor/taken.html");
}
else
{
echo file_get_contents("/home/qwerty/public_html/plugins/Sponsor/empty.html");
}