<?php

$graceminfreq=48*60*60;// 2 days
$gracetime=30*24*60*60;// 30 days
$graceline=getgraceline($gracetime);

function getgraceline($gracetime) {
	$now=time();
	return gmmktime(0,0,0,gmdate('n',$now),gmdate('j',$now),gmdate('Y',$now))-$gracetime;// we fix the graceline at start of today minus $gracetime
}

?>
