1
|
#!/usr/local/bin/php
|
2
|
<?php
|
3
|
/*
|
4
|
pkg_mgr.php
|
5
|
Copyright (C) 2004 Scott Ullrich
|
6
|
All rights reserved.
|
7
|
|
8
|
Redistribution and use in source and binary forms, with or without
|
9
|
modification, are permitted provided that the following conditions are met:
|
10
|
|
11
|
1. Redistributions of source code must retain the above copyright notice,
|
12
|
this list of conditions and the following disclaimer.
|
13
|
|
14
|
2. Redistributions in binary form must reproduce the above copyright
|
15
|
notice, this list of conditions and the following disclaimer in the
|
16
|
documentation and/or other materials provided with the distribution.
|
17
|
|
18
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
19
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
20
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
21
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
22
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
23
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
24
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
25
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
26
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27
|
POSSIBILITY OF SUCH DAMAGE.
|
28
|
*/
|
29
|
|
30
|
require("guiconfig.inc");
|
31
|
require("xmlparse_pkg.inc");
|
32
|
|
33
|
?>
|
34
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
35
|
<html>
|
36
|
<head>
|
37
|
<title><?=gentitle("System: Package Manager");?></title>
|
38
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
39
|
<link href="gui.css" rel="stylesheet" type="text/css">
|
40
|
</head>
|
41
|
|
42
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
43
|
<?php include("fbegin.inc"); ?>
|
44
|
<p class="pgtitle">System: Package Manager</p>
|
45
|
<form action="firewall_nat_out_load_balancing.php" method="post">
|
46
|
<?php if ($savemsg) print_info_box($savemsg); ?>
|
47
|
<?php if (file_exists($d_natconfdirty_path)): ?><p>
|
48
|
<?php print_info_box_np("The Package Manager configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
|
49
|
<input name="apply" type="submit" class="formbtn" id="apply" value="Apply changes"></p>
|
50
|
<?php endif; ?>
|
51
|
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>
|
52
|
<ul id="tabnav">
|
53
|
<li class="tabinact"><a href="pkg_mgr.php">Available Packages</a></li>
|
54
|
<li class="tabact">Installed Packages</li>
|
55
|
</ul>
|
56
|
</td></tr>
|
57
|
<tr>
|
58
|
<td class="tabcont">
|
59
|
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
60
|
<tr>
|
61
|
<td width="25%" class="listhdrr">Package Name</td>
|
62
|
<td width="25%" class="listhdrr">Category</td>
|
63
|
<td width="50%" class="listhdr">Description</td>
|
64
|
</tr>
|
65
|
|
66
|
<?php
|
67
|
$i = 0;
|
68
|
if($config['installedpackages']['package']) {
|
69
|
foreach ($config['installedpackages']['package'] as $pkg) {
|
70
|
if($pkg['name'] <> "") {
|
71
|
?>
|
72
|
<tr valign="top">
|
73
|
<td class="listlr">
|
74
|
<?= $pkg['name'] ?>
|
75
|
</td>
|
76
|
<td class="listlr">
|
77
|
<?= $pkg['category'] ?>
|
78
|
</td>
|
79
|
<td class="listbg">
|
80
|
<font color="#FFFFFFF">
|
81
|
<?= $pkg['descr'] ?>
|
82
|
</td>
|
83
|
<td valign="middle" class="list" nowrap>
|
84
|
<a onclick="return confirm('Do you really want to remove this package?')" href="pkg_mgr_delete.php?id=<?=$i;?>"><img src="x.gif" width="17" height="17" border="0"></a>
|
85
|
</td>
|
86
|
</tr>
|
87
|
|
88
|
<?php
|
89
|
$i++;
|
90
|
}
|
91
|
}
|
92
|
}
|
93
|
?>
|
94
|
</table>
|
95
|
</td>
|
96
|
</tr>
|
97
|
</table>
|
98
|
</form>
|
99
|
<?php include("fend.inc"); ?>
|
100
|
</body>
|
101
|
</html>
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107
|
|
108
|
|
109
|
|
110
|
|
111
|
|