Merged bugfixes upto [0000072] (version 2.0.3).
[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 $js = "";
9 if ($use_popup_windows)
10         $js .= get_js_open_window(800, 500);
11 page(_("View Dimension"), true, false, "", $js);
12
13 include_once($path_to_root . "/includes/date_functions.inc");
14 include_once($path_to_root . "/includes/data_checks.inc");
15
16 include_once($path_to_root . "/dimensions/includes/dimensions_db.inc");
17 include_once($path_to_root . "/dimensions/includes/dimensions_ui.inc");
18
19 //-------------------------------------------------------------------------------------------------
20
21 if ($_GET['trans_no'] != "")
22 {
23         $id = $_GET['trans_no'];
24 }
25
26 display_heading(systypes::name(systypes::dimension()) . " # " . $id);
27
28 br(1);
29 $myrow = get_dimension($id);
30
31 if (strlen($myrow[0]) == 0)
32 {
33         echo _("The work order number sent is not valid.");
34     exit;
35 }
36
37 start_table($table_style);
38
39 $th = array(_("#"), _("Reference"), _("Name"), _("Type"), _("Date"), _("Due Date"));
40 table_header($th);
41
42 start_row();
43 label_cell($myrow["id"]);
44 label_cell($myrow["reference"]);
45 label_cell($myrow["name"]);
46 label_cell($myrow["type_"]);
47 label_cell(sql2date($myrow["date_"]));
48 label_cell(sql2date($myrow["due_date"]));
49 end_row();
50
51 comments_display_row(systypes::dimension(), $id);
52
53 end_table();
54
55 if ($myrow["closed"] == true)
56 {
57         display_note(_("This dimension is closed."));
58 }
59
60 display_dimension_payments($id);
61
62 br(1);
63
64 end_page(true);
65
66 ?>