Few improvements (1). More to come.

Manager clean tool: Now PHP is the one calculating days, not MySQL. PHP is now controlling everything time-related, so it won't be any discrepancies.
CSS: Index.php dialogs have box-shadow.