Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
dom_subdel.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: dom_subdel.php,v 1.3 2003/08/13 23:31:47 root Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13 
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Benjamin Sonntag
27  Purpose of file: delete a subdomain
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 $fields = array (
34  "sub_domain_id" => array ("request", "integer", ""),
35 );
37 
38 $dom->lock();
39 if (!$r=$dom->get_sub_domain_all($sub_domain_id)) {
40  $error=$err->errstr();
41 }
42 $dom->unlock();
43 
44 $dt=$dom->domains_type_lst();
45 if (!$isinvited && $dt[strtolower($r['type'])]["enable"] != "ALL" ) {
46  __("This page is restricted to authorized staff");
47  exit();
48 }
49 
50 ?>
51 <h3><?php printf(_("Deleting subdomain %s"),ife($r['name'],$r['name'].".").$r['domain']); ?> : </h3>
52 <?php
53 if (isset($error) && $error) {
54  echo "<p class=\"alert alert-danger\">$error</p>";
55  include_once("foot.php");
56  exit();
57 }
58 ?>
59 <hr id="topbar"/>
60 <br />
61 <form action="dom_subdodel.php" method="post">
62  <p class="alert alert-warning">
63  <input type="hidden" name="sub_domain_id" value="<?php echo $sub_domain_id ?>" />
64  <?php __("WARNING : You are going to delete a sub-domain."); ?></p>
65  <p><?php
66  __("Informations about the subdomain you're going to delete:");
67  echo "<ul>";
68  echo "<li>"._("Entry:")." ".( empty($r['name'])?'':$r['name'].".").$r['domain']."</li>";
69  echo "<li>"._("Type:")." "._($r['type_desc'])."</li>";
70  if (!empty($r['dest'])) {
71  echo "<li>"._("Value:")." "._($r['dest'])."</li>";
72  }
73  echo "</ul>";
74  echo "<br/>";
75  __("Do you really want to delete it?");
76  ?>
77  </p>
78  <blockquote>
79  <input type="submit" class="inb" name="confirm" value="<?php __("Yes"); ?>" />&nbsp;&nbsp;
80  <input type="button" class="inb" name="cancel" value="<?php __("No"); ?>" onclick="history.back();" />
81  </blockquote>
82 </form>
83 <?php include_once("foot.php"); ?>