Alternc  latest
Alternc logiel libre pour l'hébergement
dom_subedit.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  * Form to edit subdomains informations
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 
30 $fields = array (
31  "sub_domain_id" => array ("request", "integer", 0),
32 );
34 
35 $dom->lock();
36 
37 $r=true;
38 if (!isset($noread) || !$noread) {
39  if (!$r=$dom->get_sub_domain_all($sub_domain_id)) {
40  echo $msg->msg_html_all();
41  include_once('foot.php');
42  die();
43  }
44 }
45 
46 // Just in case
47 if (!$r) {
48  include_once('foot.php');
49  die();
50 }
51 
52 $dt=$dom->domains_type_lst();
53 if (!$isinvited && $dt[strtolower($r['type'])]["enable"] != "ALL" ) {
54  $msg->raise("ERROR", "dom", _("This page is restricted to authorized staff"));
55  include("dom_edit.php");
56  exit();
57 }
58 
59 $domroot=$dom->get_domain_all($r['domain']);
60 $dom->unlock();
61 
62 if ($msg->has_msgs("ERROR")) {
63  include_once("dom_edit.php");
64  exit();
65 }
66 
67 echo "<h3>";
68 __("Editing subdomain");
69 echo " http://"; ecif($r['name'],$r['name']."."); echo $r['domain']."</h3>";
70 
71 echo $msg->msg_html_all();
72 ?>
73 
74 <hr id="topbar"/>
75 <br />
76 <?php
77  $isedit=true;
78 require_once('dom_edit.inc.php');
79 sub_domains_edit($r['domain'],$sub_domain_id);
80 
81 include_once("foot.php");
82 ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
$isinvited
Definition: config.php:204
sub_domains_edit($domain, $sub_domain_id=false)
Form to edit / add subdomains, using domaine_type table to show a synamic form.
$noread
if(!isset($noread)||! $noread) if(! $r) $dt
Definition: dom_subedit.php:52
$r
Definition: dom_subedit.php:37
$isedit
Definition: dom_subedit.php:77
$fields
Form to edit subdomains informations.
Definition: dom_subedit.php:30
if(! $isinvited && $dt[strtolower($r['type'])]["enable"] !="ALL") $domroot
Definition: dom_subedit.php:59
__($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
ecif($test, $tr, $fa="", $affiche=1)
Definition: functions.php:387
$dom
Definition: whois_test.php:10