Moving 2.0 development version to main trunk.
[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 $myrow = get_dimension($id);
29
30 if (strlen($myrow[0]) == 0)
31 {
32         echo _("The work order number sent is not valid.");
33     exit;
34 }
35
36 start_table($table_style);
37
38 $th = array(_("#"), _("Reference"), _("Name"), _("Type"), _("Date"), _("Due Date"));
39 table_header($th);
40
41 start_row();
42 label_cell($myrow["id"]);
43 label_cell($myrow["reference"]);
44 label_cell($myrow["name"]);
45 label_cell($myrow["type_"]);
46 label_cell(sql2date($myrow["date_"]));
47 label_cell(sql2date($myrow["due_date"]));
48 end_row();
49
50 comments_display_row(systypes::dimension(), $id);
51
52 end_table();
53
54 if ($myrow["closed"] == true)
55 {
56         display_note(_("This dimension is closed."));
57 }
58
59 display_dimension_payments($id);
60
61 br(1);
62
63 end_page(true);
64
65 ?>