26 require_once(
"../class/config.php");
28 include_once(
"head.php");
31 "newdomain" => array (
"post",
"string",
""),
32 "yndns" => array (
"post",
"integer", 0),
33 "newisslave" => array (
"post",
"integer", 0),
34 "slavedom" => array (
"post",
"string",
""),
38 if (!isset($dns)) $dns=
"1";
41 <h3><?php
__(
"Domain hosting"); ?></h3>
44 if (!$quota->cancreate(
"dom")) {
45 $msg->raise(
"ALERT",
"dom", _(
"You cannot add any new domain, your quota is over.").
" "._(
"Contact your administrator for more information."));
46 echo
$msg->msg_html_all();
49 echo
$msg->msg_html_all();
51 <form method=
"post" action=
"dom_doadd.php" id=
"main">
54 <label
for=
"newdomain"><b><?php
__(
"Domain name"); ?> :</b></label> <span
class=
"int" id=
"newdomwww">www.</span><input type=
"text" class=
"int" id=
"newdomain" name=
"newdomain" value=
"<?php ehe($newdomain); ?>" size=
"32" maxlength=
"255" /> <a
class=
"inb settings" href=
"dom_import.php"><?php
__(
"Advanced import"); ?></a>
57 <input type=
"checkbox" name=
"dns" class=
"inc" value=
"1" id=
"yndns"<?php
cbox($dns==
"1"); ?>/> <label
for=
"yndns"><?php
__(
"host my dns here"); ?></label>
60 $q = $quota->getquota(
"dom");
62 if (
$q[
"u"]>0 && count(
$dl)) {
66 <?php
__(
"Do you want to point this domain to another domain already installed in your account?"); ?>
69 <input type=
"radio" id=
"newisslave0" name=
"newisslave" value=
"0"<?php
cbox($newisslave==0); ?>/><label
for=
"newisslave0"><?php
__(
"No: This domain will have its own folder."); ?></label>
71 <input type=
"radio" id=
"newisslave1" name=
"newisslave" value=
"1"<?php
cbox($newisslave==1); ?>/><label
for=
"newisslave1"><?php
__(
"Yes, redirect this new domain to this one:"); ?> </label> <select name=
"slavedom" id=
"slavedom" class=
"inl">
83 <input type=
"submit" class=
"inb ok" name=
"submit" value=
"<?php __("Add
this domain
"); ?>" />
86 <p
class=
"alert alert-info">
87 <?php
__(
"If you don't want to host in our server the DNS of your domain, don't check the box 'host my dns here'. If you don't know what it mean, leave it checked."); ?></p>
88 <?php
$mem->show_help(
"add_domain"); ?>
91 if (is_array(
$dom->dns)) {
92 echo
"<br />"._(
"Whois result on the domain").
" : <pre>";
95 echo
"nameserver: $val\n";
100 <script type=
"text/javascript">
101 document.forms[
'main'].newdomain.focus();
103 <?php include_once(
"foot.php"); ?>
$fields
Form to add a new domain to an AlternC's account.
eoption($values, $cur, $onedim=false)
select_values($arr,$cur) echo des <option> du tableau $values ou de la table sql $values selectionne ...
cbox($test, $echo=true)
ECHOes checked="checked" only if the parameter is true useful for checkboxes and radio buttons.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
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 ...
if(empty($_POST['key'])||empty($_POST['val'])) $key