示例#1
0
 $row = db_fetch_row($res);
 if ($k == 1) {
     $row_text = "class='oddrow'";
     $k = 0;
 } else {
     $row_text = "class='evenrow'";
     $k++;
 }
 // check if it's an overdue work order
 if (date_diff(Today(), sql2date($myrow["due_date"]), "d") > 0) {
     $row_text = "class='overduebg'";
 }
 start_row($row_text);
 $mpage = $path_to_root . "/dimensions/dimension_entry.php?" . SID . "trans_no=" . $myrow["id"];
 label_cell(get_dimensions_trans_view_str(systypes::dimension(), $myrow["id"]));
 label_cell(get_dimensions_trans_view_str(systypes::dimension(), $myrow["id"], $myrow["reference"]));
 label_cell($myrow["name"]);
 label_cell($myrow["type_"]);
 label_cell(sql2date($myrow["date_"]));
 label_cell(sql2date($myrow["due_date"]));
 if (!$outstanding_only) {
     label_cell($myrow["closed"] ? tr("Yes") : tr("No"));
 }
 amount_cell($row[0]);
 if ($myrow["closed"] == 0) {
     label_cell("<a href='{$mpage}'>" . tr("Edit") . "</a>");
 }
 end_row();
 $j++;
 if ($j == 12) {
     $j = 1;
function view_link($row)
{
    return get_dimensions_trans_view_str(ST_DIMENSION, $row["id"]);
}