Hi!! i use this code for change de background code if something are expiring (date diff between now and expiration date). But with this code if something is expired, the value of days is always positive, and the if block doesn't works. For example if something is expired than more 31 days, the result of var days is 32 and not -32.
$SC = $data["data_scadenza"];
$SG = $data["scadenza_gestita"];
$diff = abs(strtotime($SC) - strtotime(now()));
$days = floor($diff/(606024));
if ($days<32 and $SG==0)
$row["rowstyle"]='style="background:yellow"';
if ($data["scadenza_gestita"])
{
$record["edit_link"] = false;
$record["inlineedit_link"] = false;
}