Alternc  latest
Alternc logiel libre pour l'hébergement
adm_tldadd.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  * Manage 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 $fields = array (
35  "tld" => array ("post", "string", ""),
36  "mode" => array ("post", "integer", ""),
37 );
39 
40 
41 include_once ("head.php");
42 
43 ?>
44 <h3><?php __("Manage allowed domains (TLD)"); ?></h3>
45 <hr id="topbar"/>
46 <br />
47 <?php
48 echo $msg->msg_html_all();
49 ?>
50 <h3><?php __("Add a new TLD"); ?></h3>
51 <p>
52 <?php __("Enter the new TLD (without the first dot) and choose what check should be done."); ?><br />
53 <small><?php __("Warning : only some final tld are known in the whois function of AlternC, please check m_dom.php accordingly."); ?></small>
54 </p>
55 
56 <form method="post" action="adm_tlddoadd.php" name="main" id="main">
57  <?php csrf_get(); ?>
58 <table class="tedit">
59 <tr><th><label for="tld"><?php __("TLD"); ?></label></th><td><input type="text" id="tld" name="tld" class="int" value="<?php ehe( (isset($tld)?$tld:'') ); ?>" size="20" maxlength="64" /></td></tr>
60 <tr><th><label for="mode"><?php __("Allowed Mode"); ?></label></th><td><select name="mode" id="mode" class="inl">
61  <?php $admin->selecttldmode($mode); ?>
62 </select></td></tr>
63 <tr class="trbtn"><td colspan="2">
64  <input type="submit" class="inb" value="<?php __("Add a new TLD"); ?>" />
65  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_tld.php'"/>
66 </td></tr>
67 </table>
68 </form>
69 <script type="text/javascript">
70 document.forms['main'].tld.focus();
71 </script>
72 
73 
74 <?php include_once("foot.php"); ?>
exit
Definition: adm_doadd.php:70
if(! $admin->enabled) $fields
Manage allowed TLDs on the server soon deprecated.
Definition: adm_tldadd.php:34
$mode
Definition: adm_tldedit.php:40
$msg
Definition: bootstrap.php:75
__($str)
Definition: functions.php:404
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
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
Definition: functions.php:1159