<?php
if (!defined('IN_OELOVE')) {
    exit('OElove[OEPHP] Access Denied');
}
function smarty_modifier_diffdays($int_date){
    $days = 0;
    if ($int_date > 0) {
        $now_date = strtotime(date("Y-m-d"));
        if ($int_date > $now_date) {
            $days = ($int_date-$now_date)/(3600*24);
        }
        else {
            $days = ($now_date-$int_date)/(3600*24);
        }
    }
    return $days;
}
?>