function do_print($row_in)
{
    global $today, $today_ref, $line_ctr, $units_str, $severities;
    if (empty($today)) {
        $today_ref = date("z", $row_in['problemstart']);
        $today = substr(format_date($row_in['problemstart']), 0, 5);
    } else {
        if (!($today_ref == date("z", $row_in['problemstart']))) {
            // date change?
            $today_ref = date("z", $row_in['problemstart']);
            $today = substr(format_date($row_in['problemstart']), 0, 5);
        }
    }
    $def_city = get_variable('def_city');
    $def_st = get_variable('def_st');
    print "<TR CLASS= ''>\n";
    print "<TD>{$today}</TD>\n";
    //		Date -
    $problemstart = format_date($row_in['problemstart']);
    $problemstart_sh = short_ts($problemstart);
    print "<TD onMouseover=\"Tip('{$problemstart}');\" onmouseout='UnTip();'>{$problemstart_sh}</TD>\n";
    //		start
    $problemend = format_date($row_in['problemend']);
    $problemend_sh = short_ts($problemend);
    print "<TD onMouseover=\"Tip('{$problemend}');\" onmouseout='UnTip();'>{$problemend_sh}</TD>\n";
    //		end
    $elapsed = my_date_diff($row_in['problemstart'], $row_in['problemend']);
    print "<TD>{$elapsed}</TD>\n";
    //		Ending time
    print "<TD ALIGN='center'>{$severities[$row_in['severity']]}</TD>\n";
    $scope = $row_in['tick_scope'];
    $scope_sh = shorten($row_in['tick_scope'], 20);
    print "<TD onMouseover=\"Tip('{$scope}');\" onmouseout='UnTip();'>{$scope_sh}</TD>\n";
    //		Call type
    $comment = $row_in['comments'];
    $short_comment = shorten($row_in['comments'], 50);
    print "<TD onMouseover=\"Tip('{$comment}');\" onMouseout='UnTip();'>{$short_comment}</TD>\n";
    //		Comments/Disposition
    $facility = $row_in['facy_name'];
    $facility_sh = shorten($row_in['facy_name'], 16);
    print "<TD onMouseover=\"Tip('{$facility}');\" onmouseout='UnTip();'>{$facility_sh}</TD>\n";
    //		Facility
    $city = $row_in['tick_city'] == $def_city ? "" : ", {$row_in['tick_city']}";
    $st = $row_in['tick_state'] == $def_st ? "" : ", {$row_in['tick_state']}";
    $addr = "{$row_in['tick_street']}{$city}{$st}";
    $addr_sh = shorten($row_in['tick_street'] . $city . $st, 20);
    print "<TD onMouseover=\"Tip('{$addr}');\" onMouseout='UnTip();'>{$addr_sh}</TD>\n";
    //		Street addr
    print "<TD>{$units_str}</TD>\n";
    //		Units responding
    print "</TR>\n\n";
    $line_ctr++;
}
 function do_print_log($ary_in)
 {
     //     ["code"]=> string(1) "3" ["info"]=>  string(14) "test test test"  ["when"]=>   string(10) "1302117158"
     global $today, $today_ref, $line_ctr, $evenodd, $types;
     global $w_tiny, $w_small, $w_medium, $w_large;
     print "<TR CLASS = '{$evenodd[$line_ctr % 2]}'>\n";
     print "<TD>{$today}</TD>\n";
     //		Date -
     $when = format_date($ary_in['when']);
     $when_sh = short_ts($when);
     print "<TD onMouseover=\"Tip('{$when}');\" onmouseout='UnTip();'>{$when_sh}</TD>\n";
     //		start
     print "<TD  COLSPAN=3></TD>\n";
     //		end	Ending time
     print "<TD><I>Log entry:</I></TD>\n";
     //		Call type
     $info = $ary_in['info'];
     $sh_info = shorten($ary_in['info'], $w_large);
     print "<TD onMouseover=\"Tip('{$info}');\" onMouseout='UnTip();'>{$sh_info}</TD>\n";
     //		Comments/Disposition
     print "<TD>{$ary_in['user']}</TD>\n";
     //		Facility
     print "<TD COLSPAN=2></TD>\n";
     //		Street addr, Units responding
     print "</TR>\n\n";
     $line_ctr++;
 }