Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
adm_tld.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: adm_tld.php,v 1.4 2004/11/29 17:27:04 anonymous 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: Manage allowed TLD on the server
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 
32 if (!$admin->enabled) {
33  __("This page is restricted to authorized staff");
34  exit();
35 }
36 
37 $fields = array (
38  "sel" => array ("post", "array", ""),
39 );
41 
42 
43 if (is_array($sel)) {
44  $error="";
45  for($i=0;$i<count($sel);$i++) {
46  if (!$admin->deltld($sel[$i])) {
47  $error.=_("Some TLD cannot be deleted...")." : ".$sel[$i]."<br />";
48  }
49  }
50  if (!$error) $error=_("The requested TLD has been deleted");
51 }
52 
53 include_once("head.php");
54 
55 ?>
56 <h3><?php __("Manage allowed domains (TLD)"); ?></h3>
57 <hr id="topbar" />
58 <br />
59 <?php
60  if (isset($error) && $error) {
61  echo "<p class=\"alert alert-danger\">$error</p>";
62  }
63 
64 $c=$admin->listtld();
65 
66 ?>
67 <p>
68 <?php __("Here is the list of the TLD allowed on this server. Each TLD can be allowed or denied after some checks (whois, ns, domain exists...)"); ?>
69 </p>
70 <p><span class="ina"><a href="adm_tldadd.php"><?php __("Add a new TLD"); ?></a></span></p>
71 <form method="post" action="adm_tld.php" name="main" id="main">
72 <table class="tlist">
73 <tr><th colspan="2"> </th><th><?php __("TLD"); ?></th><th><?php __("Allowed Mode"); ?></th></tr>
74 <?php
75 for($i=0;$i<count($c);$i++) {
76 ?>
77 
78 <tr class="lst">
79 <td><input id="sel<?php echo $i; ?>" type="checkbox" name="sel[]" class="inc" value="<?php echo $c[$i]["tld"]; ?>" /></td>
80  <td><div class="ina edit"><a href="adm_tldedit.php?tld=<?php echo urlencode($c[$i]["tld"]); ?>"><?php __("Edit"); ?></a></div></td>
81 <td><label for="sel<?php echo $i; ?>"><?php echo $c[$i]["tld"]; ?></label></td>
82 <td><?php __($admin->tldmode[$c[$i]["mode"]]); ?></td></tr>
83 
84 <?php
85 }
86 ?>
87 <tr class="trbtn"><td colspan="3"><input type="submit" class="inb" value="<?php __("Delete the checked TLD"); ?>" /></td></tr>
88 </table>
89 </form>
90 
91 <p><span class="ina"><a href="adm_tldadd.php"><?php __("Add a new TLD"); ?></a></span></p>
92 <?php include_once("foot.php"); ?>