Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
upnp_list.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  AlternC - Web Hosting System
5  Copyright (C) 2000-2012 by the AlternC Development Team.
6  https://alternc.org/
7  ----------------------------------------------------------------------
8  LICENSE
9 
10  This program is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License (GPL)
12  as published by the Free Software Foundation; either version 2
13  of the License, or (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  To read the license please visit http://www.gnu.org/copyleft/gpl.html
21  ----------------------------------------------------------------------
22  Purpose of file: Show the UPnP port forwarding list
23  ----------------------------------------------------------------------
24 */
25 require_once("../class/config.php");
26 include_once("head.php");
27 
28 if (!$admin->enabled) {
29  __("This page is restricted to authorized staff");
30  exit();
31 }
32 
33 $r=$upnp->get_forward_list();
34 
35 $aaction=array("CREATE" => _("Creation in progress"),
36  "DELETE" => _("Deletion in progress"),
37  "DELETING" => _("Deletion in progress"),
38  "DISABLE" => _("Will be disabled soon"),
39  "ENABLE" => _("Will be enabled soon"),
40  "OK" => _("OK"),
41  );
42 
43 ?>
44 <h3><?php __("UPnP port forwarding list"); ?></h3>
45 <hr id="topbar"/>
46 <br />
47 <?php
48  if (isset($error) && $error ) {
49  echo "<p class=\"error\">$error</p>";
50  }
51 ?>
52 <p>
53 <?php __("Here is the list of the requested port forward for AlternC's services, and their status. You can enable or disable some of them."); ?>
54 
55 <table class="tlist">
56 <tr>
57 <th></th>
58 <th><?php __("Name"); ?></th>
59 <th><?php __("Class"); ?></th>
60 <th><?php __("Protocol/Port") ?></th>
61 <th><?php __("Mandatory") ?></th>
62 <th><?php __("Enabled") ?></th>
63 <th><?php __("Last Check"); ?></th>
64 <th><?php __("Last Update"); ?></th>
65 <th><?php __("Status"); ?></th>
66 </tr>
67 <?php
68 reset($r);
69 
70 $col=1;
71 while (list($key,$val)=each($r))
72  {
73  $col=3-$col;
74 ?>
75  <tr class="lst<?php echo $col; ?>">
76 
77 <?php
78  if ($val["mandatory"]) { ?>
79  <td>&nbsp;</td>
80 <?php } else { ?>
81  <td><?php if ($val["enabled"]) { ?><a href="upnp_change.php?action=disable&id=<?php echo $val["id"]; ?>"><?php __("Disable"); ?></a><?php } else { ?><a href="upnp_change.php?action=enable&id=<?php echo $val["id"]; ?>"><?php __("Enable"); ?></a><?php } ?></td>
82 <?php } ?>
83  <td><?php echo $val["class"] ?></td>
84  <td><?php echo $val["protocol"]."/".$val["port"] ?></td>
85  <td><?php if ($val["mandatory"]) __("Yes"); else __("No"); ?></td>
86  <td><?php if ($val["enabled"]) __("Yes"); else __("No"); ?></td>
87  <td><?php echo $val["lastcheck"] ?></td>
88  <td><?php echo $val["lastupdate"] ?></td>
89  <td><?php echo $aaction[$val["status"]]; ?><br /><?php echo $val["result"]; ?></td>
90  </tr>
91 <?php
92  } // for loop
93 ?>
94 </table>
95 </form>
96 <?php include_once("foot.php"); ?>
97