4am: editing crufty code. lots of logic mixed up in the html old school style. Across the room a pile of three HP servers that need OSes catcalling: “I think I need a rebooty…”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// TODO: Clean this input
//$tpar= $_GET[parent];
$tpar= intval($_GET['parent']);
// TODO: Why are we putting a date into the server array???
$SERVER['$today']= date('y-m-d');
// TODO: Why are we storing a negative integer value as a string???
$colname_res_fillContent = "-1";
if (isset($_GET['parent'])) {
// TODO: Check this input
//$colname_res_fillContent = (get_magic_quotes_gpc()) ? $_GET['parent'] : addslashes($_GET['parent']);
  $colname_res_fillContent = intval($_GET['parent']);
}
// TODO: Why are we storing a negative integer value as a string again???
$today_res_fillContent = "-1";
if (isset($SERVER['$today'])) {
    //
    // TODO: didn't we set this??? why are we doing this??? why not set the date here???
    //
  $today_res_fillContent = (get_magic_quotes_gpc()) ? $SERVER['$today'] : addslashes($SERVER['$today']);
}