Alternc  latest
Alternc logiel libre pour l'hébergement
dom_doadd.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  * Add a new domain name to an AlternC's account
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 include_once("head.php");
28 
29 $fields = array (
30  "newdomain" => array ("post", "string", ""),
31  "dns" => array ("post", "string", ""),
32  "newisslave" => array ("post", "integer" ,0),
33  "slavedom" => array ("post", "string" ,0),
34 );
36 
37 $dom->lock();
38 
39 if (!$dom->add_domain($newdomain,$dns,0,0,$newisslave,$slavedom)) {
40  include("dom_add.php");
41  exit();
42 } else
43  $msg->raise("INFO", "dom", _("Your new domain %s has been successfully installed"),$newdomain);
44 
45 $dom->unlock();
46 
47 ?>
48 <h3><?php __("Add a domain"); ?></h3>
49 <p>
50 <?php
51 echo $msg->msg_html_all();
52 ?>
53 <span class="inb"><a href="dom_edit.php?domain=<?php echo urlencode($newdomain);?>" ><?php __("Click here to continue"); ?></a></span><br />
54 <?php $mem->show_help("add_domain"); ?>
55 <br />
56 <?php
57  if (is_array($dom->dns)) {
58  echo "<br />"._("Whois result on the domain")." : <pre>";
59  reset($dom->dns);
60  while (list($key,$val)=each($dom->dns)) {
61  echo "nameserver: $val\n";
62  }
63  echo "</pre>";
64  }
65 ?>
66 </p>
67 <?php include_once("foot.php"); ?>
exit
Definition: adm_doadd.php:70
$mem
Definition: bootstrap.php:71
$msg
Definition: bootstrap.php:75
$fields
Add a new domain name to an AlternC's account.
Definition: dom_doadd.php:29
__($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
$val
Definition: tempovars.php:15
if(empty($_POST['key'])||empty($_POST['val'])) $key
Definition: tempovars.php:14
$dom
Definition: whois_test.php:10