2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
$Id: dom_subedit.php,v 1.3 2003/08/13 23:01:45 root 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:
|
|
|
|
Purpose of file:
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
require_once("../class/config.php");
|
2009-09-08 05:29:38 +00:00
|
|
|
include_once("head.php");
|
|
|
|
|
|
|
|
$fields = array (
|
|
|
|
"domain" => array ("request", "string", ""),
|
|
|
|
"sub" => array ("request", "string", ""),
|
|
|
|
);
|
|
|
|
getFields($fields);
|
2006-04-26 12:28:53 +00:00
|
|
|
|
|
|
|
$dom->lock();
|
|
|
|
if (!$r=$dom->get_sub_domain_all($domain,$sub)) {
|
|
|
|
$error=$err->errstr();
|
|
|
|
}
|
|
|
|
$dom->unlock();
|
|
|
|
|
|
|
|
?>
|
2009-09-08 05:29:38 +00:00
|
|
|
<h3><?php __("Editing subdomain"); ?> http://<?php ecif($sub,$sub."."); echo $domain; ?> : </h3>
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
if ($error) {
|
2009-09-08 05:29:38 +00:00
|
|
|
echo "<p class=\"erroe\">$error</p>";
|
|
|
|
include_once("foot.php");
|
2006-04-26 12:28:53 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<hr />
|
|
|
|
<!-- *****************************************
|
|
|
|
gestion du sous-domaine
|
|
|
|
-->
|
2009-09-08 05:29:38 +00:00
|
|
|
<h3><?php __("Sub-domain"); ?> http://<?php ecif($sub,$sub."."); echo $domain; ?></h3>
|
2006-04-26 12:28:53 +00:00
|
|
|
<form action="dom_subdoedit.php" method="post" id="main" name="main">
|
|
|
|
<table border="0">
|
2009-09-08 05:29:38 +00:00
|
|
|
<tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
<td> <input type="hidden" name="domain" value="<?php echo $domain ?>" />
|
|
|
|
<input type="hidden" name="sub" value="<?php echo $sub ?>" />
|
|
|
|
<input type="hidden" name="action" value="edit" />
|
|
|
|
|
|
|
|
<input type="radio" id="local" class="inc" name="type" value="<?php echo $dom->type_local; ?>" <?php cbox($r["type"]==$dom->type_local); ?> onclick="document.main.sub_local.focus();" />
|
|
|
|
<label for="local"><?php __("Locally managed"); ?></label></td>
|
|
|
|
<td><input type="text" class="int" name="sub_local" id="sub_local" value="<?php ecif($r["type"]==0,$r["dest"],"/"); ?>" size="40" />
|
|
|
|
<script type="text/javascript">
|
|
|
|
<!--
|
|
|
|
document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.sub_local');\" value=\" ... \" class=\"inb\">");
|
|
|
|
// -->
|
|
|
|
</script>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><input type="radio" id="url" class="inc" name="type" value="<?php echo $dom->type_url; ?>" <?php cbox($r["type"]==$dom->type_url); ?> onclick="document.main.sub_url.focus();" />
|
|
|
|
<label for="url"><?php __("URL redirection"); ?></label></td>
|
|
|
|
<td><input type="text" class="int" name="sub_url" id="sub_url" value="<?php ecif($r["type"]==1,$r["dest"],"http://"); ?>" size="50" /></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><input type="radio" id="ip" class="inc" name="type" value="<?php echo $dom->type_ip; ?>" <?php cbox($r["type"]==$dom->type_ip); ?> onclick="document.main.sub_ip.focus();" />
|
|
|
|
<label for="ip"><?php __("IP redirection"); ?></label></td>
|
|
|
|
<td><input type="text" class="int" name="sub_ip" id="sub_ip" value="<?php ecif($r["type"]==2,$r["dest"],"xxx.xxx.xxx.xxx"); ?>" size="16" /></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><input type="radio" id="webmail" class="inc" name="type" value="<?php echo $dom->type_webmail; ?>" <?php cbox($r["type"]==$dom->type_webmail); ?> />
|
|
|
|
<label for="webmail"><?php __("Webmail access"); ?></label></td>
|
|
|
|
<td> </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2009-09-08 05:29:38 +00:00
|
|
|
<td><input type="submit" class="inb" name="submit" value="<?php __("Validate this change"); ?>" /></td>
|
|
|
|
<td><input type="button" class="inb" name="back" value="<?php __("Cancel"); ?>" onclick="history.back();" /></td>
|
2006-04-26 12:28:53 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
2009-09-08 05:29:38 +00:00
|
|
|
<?php include_once("foot.php"); ?>
|