Support for new packaged extensions system.
[fa-stable.git] / includes / ui / view_package.php
1 <?php
2 $page_security = 'SA_OPEN';
3 $path_to_root = "../..";
4 include_once($path_to_root . "/includes/session.inc");
5 include_once($path_to_root . "/includes/packages.inc");
6
7 page(_($help_context = "Package Details"), true);
8
9 include_once($path_to_root . "/includes/ui.inc");
10
11 if (!isset($_GET['id'])) 
12 {
13         /*Script was not passed the correct parameters */
14         display_note(_("The script must be called with a valid package id to review the info for."));
15         end_page();
16 }
17
18 $filter = array(
19         'Version' => _('Available version'), 
20         'Type' => _('Package type'), 
21         'Name' => _('Package content'),
22         'Description' => _('Description'), 
23         'Author' => _('Author'), 
24         'Homepage' => _('Home page'),
25         'Maintenance' => _('Package maintainer'),
26         'InstallPath' => _('Installation path'),
27         'Depends' => _('Minimal software versions'),
28         'RTLDir' => _('Right to left'),
29         'Encoding' => _('Charset encoding')
30 );
31
32 $pkg = get_package_info($_GET['id'], null, $filter);
33
34 display_heading(sprintf(_("Content information for package '%s'"), $_GET['id']));
35 br();
36 start_table(TABLESTYLE2, "width=80%");
37 $th = array(_("Property"), _("Value"));
38 table_header($th);
39
40 foreach ($pkg as $field => $value) {
41         if ($value == '')
42                 continue;
43         start_row();
44         label_cells($field, htmlentities(is_array($value) ? implode('<br>', $value) :$value),
45                  "class='tableheader2'");
46         end_row();
47 }
48 end_table();
49
50 end_page();