";
}
else
{ $head = "";
}
if (is_array($myArray))
{ // cosmetics ......
$reps = intval((62 - strlen($arrayName)) / 2);
echo "\n".$head.str_repeat("*", $reps)." $arrayName ".str_repeat("*", $reps).$tail."\n";
$arrayValues[0]['v'] = $myArray;
$arrayValues[0]['k'] = "\$$arrayName";
$idx = 0;
while ($idx < count($arrayValues))
{ foreach ($arrayValues[$idx]['v'] as $k => $v)
{ if (is_array($v))
{ $nv = count($arrayValues);
$arrayValues[$nv]['v'] = $v;
$arrayValues[$nv]['k'] = $arrayValues[$idx]['k']."[$k]";
}
else
echo $head.$arrayValues[$idx]['k']."['$k'] => $v".$tail."\n";
}
$idx++;
}
echo $head.str_repeat("*", (2 * $reps) + strlen($arrayName) + 2).$tail."\n";
}
else
echo $head."(DEBUGDUMP):$arrayName is not an array".$tail."\n";
}
if (!empty($_REQUEST['combo']))
{
$args = explode("\t", $_REQUEST['combo']);
$times = explode("-", $args[2]);
$_REQUEST['startDate'] = $args[0];
$_REQUEST['startTime'] = $times[0];
$_REQUEST['estLabor'] = $times[1];
//debugDump($args, "args");
//debugDump($times, "times");
unset($_REQUEST['combo']);
}
else
{
if ($_REQUEST['units'] == "d" and empty($_REQUEST['estLabor']))
$_REQUEST['estLabor'] = 1;
if (!empty($_REQUEST['startDate']) and !empty($_REQUEST['estLabor']))
{
$_REQUEST['startDate'] = str_replace(array("/","\\"," ","-","."), "", $_REQUEST['startDate']);
$y = substr($_REQUEST['startDate'], 0, 4);
$m = substr($_REQUEST['startDate'], 4, 2);
$d = substr($_REQUEST['startDate'], 6, 2);
if ($_REQUEST['units'] == "d")
{
$start = mktime( 0, 0, 0, $m, $d, $y);
$end = mktime( 0, 0, 0, $m, ($d + $_REQUEST['estLabor']), $y);
}
else
{
$_REQUEST['startTime'] = substr("00".str_replace(array(":","/","\\","."," "),"", $_REQUEST['startTime']), -4);
$h = substr($_REQUEST['startTime'], 0, 2);
$i = substr($_REQUEST['startTime'], -2);
$start = mktime( $h, $i, 0, $m, $d, $y);
if ($_REQUEST['units'] == "t")
{
$_REQUEST['estLabor'] = substr("00".str_replace(array(":","/","\\","."," "),"", $_REQUEST['estLabor']), -4);
if ($_REQUEST['estLabor'] <= $_REQUEST['startTime'])
$d += 1;
$h = substr($_REQUEST['estLabor'], 0, 2);
$i = substr($_REQUEST['estLabor'], -2);
$end = mktime( $h, $i, 0, $m, $d, $y);
}
else
{ if ($_REQUEST['units'] == "h")
$_REQUEST['estLabor'] *= 60;
$l = $i + $_REQUEST['estLabor'];
$end = mktime( $h, $l, 0, $m, $d, $y);
}
}
unset($_REQUEST['startDate']);
unset($_REQUEST['startTime']);
unset($_REQUEST['estLabor']);
}
}
?>
End:
\n";
}
else if (!empty($_REQUEST['tstamp']))
{ echo "
\n";
}
?>