2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
$Id: adm_tld.php,v 1.4 2004/11/29 17:27:04 anonymous Exp $
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
AlternC - Web Hosting System
|
|
|
|
Copyright (C) 2002 by the AlternC Development Team.
|
|
|
|
http://alternc.org/
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
Based on:
|
|
|
|
Valentin Lacambre's web hosting softwares: http://altern.org/
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
LICENSE
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License (GPL)
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
Original Author of file: Benjamin Sonntag
|
|
|
|
Purpose of file: Manage allowed TLD on the server
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
require_once("../class/config.php");
|
|
|
|
|
|
|
|
if (!$admin->enabled) {
|
|
|
|
__("This page is restricted to authorized staff");
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2012-08-20 16:14:37 +00:00
|
|
|
$fields = array (
|
|
|
|
"sel" => array ("post", "array", ""),
|
|
|
|
);
|
|
|
|
getFields($fields);
|
|
|
|
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
if (is_array($sel)) {
|
|
|
|
$error="";
|
|
|
|
for($i=0;$i<count($sel);$i++) {
|
|
|
|
if (!$admin->deltld($sel[$i])) {
|
|
|
|
$error.=_("Some TLD cannot be deleted...")." : ".$sel[$i]."<br />";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!$error) $error=_("The requested TLD has been deleted");
|
|
|
|
}
|
|
|
|
|
2009-09-08 05:29:38 +00:00
|
|
|
include_once("head.php");
|
2006-04-26 12:28:53 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
<h3><?php __("Manage allowed domains (TLD)"); ?></h3>
|
2010-06-02 22:42:03 +00:00
|
|
|
<hr id="topbar" />
|
|
|
|
<br />
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
2012-08-20 16:14:37 +00:00
|
|
|
if (isset($error) && $error) {
|
2006-04-26 12:28:53 +00:00
|
|
|
echo "<p class=\"error\">$error</p>";
|
|
|
|
}
|
|
|
|
|
|
|
|
$c=$admin->listtld();
|
|
|
|
|
|
|
|
?>
|
|
|
|
<p>
|
|
|
|
<?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...)"); ?>
|
|
|
|
</p>
|
2010-06-02 22:42:03 +00:00
|
|
|
<p><span class="ina"><a href="adm_tldadd.php"><?php __("Add a new TLD"); ?></a></span></p>
|
|
|
|
<form method="post" action="adm_tld.php" name="main" id="main">
|
|
|
|
<table class="tlist">
|
2011-02-09 08:37:23 +00:00
|
|
|
<tr><th colspan="2"> </th><th><?php __("TLD"); ?></th><th><?php __("Allowed Mode"); ?></th></tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($c);$i++) {
|
|
|
|
?>
|
|
|
|
|
2013-05-23 16:18:56 +00:00
|
|
|
<tr class="lst">
|
2010-06-02 22:42:03 +00:00
|
|
|
<td><input id="sel<?php echo $i; ?>" type="checkbox" name="sel[]" class="inc" value="<?php echo $c[$i]["tld"]; ?>" /></td>
|
2013-04-25 12:39:24 +00:00
|
|
|
<td><div class="ina edit"><a href="adm_tldedit.php?tld=<?php echo urlencode($c[$i]["tld"]); ?>"><?php __("Edit"); ?></a></div></td>
|
2006-04-26 12:28:53 +00:00
|
|
|
<td><label for="sel<?php echo $i; ?>"><?php echo $c[$i]["tld"]; ?></label></td>
|
|
|
|
<td><?php __($admin->tldmode[$c[$i]["mode"]]); ?></td></tr>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2010-06-02 22:42:03 +00:00
|
|
|
<tr class="trbtn"><td colspan="3"><input type="submit" class="inb" value="<?php __("Delete the checked TLD"); ?>" /></td></tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
</table>
|
|
|
|
</form>
|
2010-06-02 22:42:03 +00:00
|
|
|
|
|
|
|
<p><span class="ina"><a href="adm_tldadd.php"><?php __("Add a new TLD"); ?></a></span></p>
|
2009-09-08 05:29:38 +00:00
|
|
|
<?php include_once("foot.php"); ?>
|