*** empty log message ***
[fa-stable.git] / dimensions / view / view_dimension.php
1 <?php
2
3 $page_security = 10;
4 $path_to_root="../..";
5
6 include_once($path_to_root . "/includes/session.inc");
7
8 page(_("View Dimension"), true);
9
10 include_once($path_to_root . "/includes/date_functions.inc");
11 include_once($path_to_root . "/includes/data_checks.inc");
12
13 include_once($path_to_root . "/dimensions/includes/dimensions_db.inc");
14 include_once($path_to_root . "/dimensions/includes/dimensions_ui.inc");
15
16 //-------------------------------------------------------------------------------------------------
17
18 if ($_GET['trans_no'] != "") 
19 {
20         $id = $_GET['trans_no'];
21 }
22
23 display_heading(systypes::name(systypes::dimension()) . " # " . $id);
24
25 $myrow = get_dimension($id);
26
27 if (strlen($myrow[0]) == 0) 
28 {
29         echo _("The work order number sent is not valid.");
30     exit;
31 }
32
33 start_table($table_style);
34
35 $th = array(_("#"), _("Reference"), _("Name"), _("Type"), _("Date"), _("Due Date"));
36 table_header($th);
37
38 start_row();
39 label_cell($myrow["id"]);
40 label_cell($myrow["reference"]);
41 label_cell($myrow["name"]);
42 label_cell($myrow["type_"]);
43 label_cell(sql2date($myrow["date_"]));
44 label_cell(sql2date($myrow["due_date"]));
45 end_row();
46
47 comments_display_row(systypes::dimension(), $id);
48
49 end_table();
50
51 if ($myrow["closed"] == true) 
52 {
53         echo "<br>" . _("This dimension is closed.") . "<br>";
54 }
55
56 display_dimension_payments($id);
57
58 br(1);
59
60 end_page(true);
61
62 ?>