if($date1>0){$date_condition=" AND sent >= $date1";}
if($date2>0){$date_condition.=" AND sent <= $date2";}
$query=$db->query("select `from` AS email, count(`from`) AS num FROM ".VIEW_MESSAGES." WHERE `to`=? $date_condition GROUP BY `from` ORDER BY num DESC LIMIT $page_len",array($email));
$query=$db->query("select `to` AS email, count(`to`) AS num FROM ".VIEW_MESSAGES." WHERE `from`=? $date_condition GROUP BY `to` ORDER BY num DESC LIMIT $page_len",array($email));
echo"\t--webui=\"[REQUIRED: path to the Piler WebUI Directory, default: $webuidir]\"\n";
echo"\t--email=email address to look for conversations\n";
echo"\noptions:\n";
echo"\t-h Prints this help screen and exits\n";
echo"\t--start=\"Beginning of date range to process, ok values are today, yesterday or DDMMMYYYY...anything php's strtotime can process. Optional, will default to beginning of current day.\"\n";
echo"\t--stop=\"End of date range, same parameters as above. Optional (will default to end of current day)\"\n\n";