Alternc  latest
Alternc logiel libre pour l'hébergement
adm_tlddoadd.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * Manages allowed TLDs on the server
22  * soon deprecated
23  *
24  * @copyright AlternC-Team 2000-2017 https://alternc.com/
25  */
26 
27 require_once("../class/config.php");
28 
29 if (!$admin->enabled) {
30  $msg->raise("ERROR", "admin", _("This page is restricted to authorized staff"));
31  echo $msg->msg_html_all();
32  exit();
33 }
34 
35 $fields = array (
36  "tld" => array ("post", "string", ""),
37  "mode" => array ("post", "integer", ""),
38 );
40 
41 
42 if (!$admin->addtld($tld,$mode)) {
43  include("adm_tldadd.php");
44  exit();
45 } else {
46  $msg->raise("INFO", "admin", _("The TLD has been successfully added"));
47  include("adm_tld.php");
48  exit();
49 }
50 ?>
exit
Definition: adm_doadd.php:70
if(! $admin->enabled) $fields
Manages allowed TLDs on the server soon deprecated.
$mode
Definition: adm_tldedit.php:40
$msg
Definition: bootstrap.php:75
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688