Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
dom_subdodel.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: dom_subdodel.php,v 1.2 2003/06/10 11:18:27 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:
27  Purpose of file:
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 
45 $dt=$dom->domains_type_lst();
46 if (!$isinvited && $dt[strtolower($r['type'])]["enable"] != "ALL" ) {
47  __("This page is restricted to authorized staff");
48  exit();
49 }
50 
51 
52 $dom->lock();
53 if (!$r=$dom->get_sub_domain_all($sub_domain_id)) {
54  $error=$err->errstr();
55 }
56 
57 if (!$dom->del_sub_domain($sub_domain_id)) {
58  $error=$err->errstr();
59 }
60 
61 $dom->unlock();
62 
63 ?>
64 <h3><?php echo sprintf(_("Deleting the subdomain %s:"),(($r['name'])?$r['name'].".":$r['name']).$r['domain']); ?></h3>
65 <hr id="topbar"/>
66 <br />
67 <?php
68  if (isset($error) && $error) {
69  echo "<p class=\"alert alert-danger\">$error</p>";
70  include_once("foot.php");
71  exit();
72  } else {
73  $t = time();
74  // XXX: we assume the cron job is at every 5 minutes
75  $error=strtr(_("The modifications will take effect at %time. Server time is %now."), array('%now' => date('H:i:s', $t), '%time' => date('H:i:s', ($t-($t%300)+300))));
76  echo "<p class=\"alert alert-info\">".$error."</p>";
77  }
78 ?>
79 <p><span class="ina"><a href="dom_edit.php?domain=<?php echo urlencode($r['domain']) ?>"><?php __("Click here to continue"); ?></a></span></p>
80 <?php include_once("foot.php"); ?>