1 | <? |
---|
2 | /* |
---|
3 | (C) 2004-2013 DatuX - info@datux.nl |
---|
4 | |
---|
5 | This program is free software: you can redistribute it and/or modify |
---|
6 | it under the terms of the GNU General Public License as published by |
---|
7 | the Free Software Foundation, either version 3 of the License, or |
---|
8 | (at your option) any later version. |
---|
9 | |
---|
10 | This program is distributed in the hope that it will be useful, |
---|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | GNU General Public License for more details. |
---|
14 | |
---|
15 | You should have received a copy of the GNU General Public License |
---|
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
17 | */ |
---|
18 | |
---|
19 | $LEVEL=10; |
---|
20 | require_once("../common.php"); |
---|
21 | require_once("../form2.php"); |
---|
22 | require_once("model.php"); |
---|
23 | |
---|
24 | |
---|
25 | Title(_OpenVPNStatus()); |
---|
26 | Head(); |
---|
27 | |
---|
28 | if ($_REQUEST[revoke]) |
---|
29 | { |
---|
30 | openvpn_Revoke($_REQUEST[name]); |
---|
31 | Redirect("listcerts.php"); |
---|
32 | } |
---|
33 | |
---|
34 | $clients=openvpn_Status(); |
---|
35 | |
---|
36 | //maak een mooie tabel ervan |
---|
37 | |
---|
38 | echo "<table class='list'>"; |
---|
39 | |
---|
40 | echo "<tr>"; |
---|
41 | echo "<th>"._User(); |
---|
42 | echo "<th>"._CertificateName(); |
---|
43 | echo "<th>"._ConnectedSince(); |
---|
44 | echo "<th>"._RemoteIP(); |
---|
45 | echo "<th>"._VirtualIP(); |
---|
46 | echo "<th>"._BytesReceived(); |
---|
47 | echo "<th>"._BytesSent(); |
---|
48 | echo "</tr>"; |
---|
49 | |
---|
50 | foreach ($clients as $client) |
---|
51 | { |
---|
52 | echo "<tr>"; |
---|
53 | echo "<td><a href='/useradmin/edituser.php?name=".$client[9]."'>".$client[9]."</a>"; |
---|
54 | echo "<td>".$client[1]; |
---|
55 | echo "<td>".$client[7]; |
---|
56 | echo "<td>".$client[2]; |
---|
57 | echo "<td>".$client[3]; |
---|
58 | echo "<td>".$client[5]; |
---|
59 | echo "<td>".$client[6]; |
---|
60 | |
---|
61 | echo "</tr>"; |
---|
62 | |
---|
63 | } |
---|
64 | |
---|
65 | echo "</table>"; |
---|
66 | |
---|
67 | |
---|
68 | echo "<p><a href='listcerts.php'>"._OpenVPNCerts()."</a>"; |
---|
69 | echo "<p><a href='editsettings.php'>"._OpenVPNsettings()."</a>"; |
---|
70 | |
---|
71 | |
---|
72 | Foot(); |
---|