Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
upnp_change.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: Enable or disable a UPnP port forwarding
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 $fields = array (
34  "id" => array ("request", "integer", 0),
35  "action" => array("request", "string", "enable"),
36 );
38 
39 if ($action=="disable") {
40  $upnp->disable($id);
41 } else {
42  $upnp->enable($id);
43 }
44 
45 require_once("upnp_list.php");
46