Fixed many issues in output HTML code according to HTML 4.01 Transitional format.
[fa-stable.git] / includes / ui / view_package.php
1 <?php
2 /**********************************************************************
3     Copyright (C) FrontAccounting, LLC.
4         Released under the terms of the GNU General Public License, GPL, 
5         as published by the Free Software Foundation, either version 3 
6         of the License, or (at your option) any later version.
7     This program is distributed in the hope that it will be useful,
8     but WITHOUT ANY WARRANTY; without even the implied warranty of
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
10     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 $page_security = 'SA_OPEN';
13 $path_to_root = "../..";
14 include_once($path_to_root . "/includes/session.inc");
15 include_once($path_to_root . "/includes/packages.inc");
16
17 page(_($help_context = "Package Details"), true);
18
19 include_once($path_to_root . "/includes/ui.inc");
20
21 if (!isset($_GET['id'])) 
22 {
23         /*Script was not passed the correct parameters */
24         display_note(_("The script must be called with a valid package id to review the info for."));
25         end_page();
26 }
27
28 $filter = array(
29         'Version' => _('Available version'), 
30         'Type' => _('Package type'), 
31         'Name' => _('Package content'),
32         'Description' => _('Description'), 
33         'Author' => _('Author'), 
34         'Homepage' => _('Home page'),
35         'Maintenance' => _('Package maintainer'),
36         'InstallPath' => _('Installation path'),
37         'Depends' => _('Minimal software versions'),
38         'RTLDir' => _('Right to left'),
39         'Encoding' => _('Charset encoding')
40 );
41
42 $pkg = get_package_info($_GET['id'], null, $filter);
43
44 display_heading(sprintf(_("Content information for package '%s'"), $_GET['id']));
45 br();
46 start_table(TABLESTYLE2, "width='80%'");
47 $th = array(_("Property"), _("Value"));
48 table_header($th);
49
50 foreach ($pkg as $field => $value) {
51         if ($value == '')
52                 continue;
53         start_row();
54         label_cells($field, nl2br(htmlentities(is_array($value) ? implode("\n", $value) :$value)),
55                  "class='tableheader2'");
56         end_row();
57 }
58 end_table(1);
59
60 end_page(true);