source: alternc/trunk/bureau/admin/dom_add.php @ 2678

Revision 2678, 3.8 KB checked in by benjamin, 3 years ago (diff)

suite GROS upgrade ergo, homogeneisation et glossaire ... MySQL cette fois-ci...

Line 
1<?php
2/*
3 $Id: dom_add.php,v 1.5 2003/06/10 13:16:11 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: Add a new domain
28 ----------------------------------------------------------------------
29*/
30require_once("../class/config.php");
31
32include_once("head.php");
33
34$fields = array (
35        "newdomain"   => array ("request", "string", ""),
36        "yndns"   => array ("request", "integer", 0),
37        "newisslave"   => array ("request", "integer", 0),
38        "slavedom"   => array ("request", "string", ""),
39);
40getFields($fields);
41
42if (!isset($dns)) $dns="1";
43
44?>
45<h3><?php __("Domain hosting"); ?></h3>
46<hr />
47<?php
48if (!$quota->cancreate("dom")) { ?>
49<p class="error"><?php echo _("You cannot add any new domain, your quota is over.")." "._("Contact your administrator for more information."); ?></p>
50<?php
51exit();
52}
53if ($error) echo "<p class=\"error\">$error</p>";
54?>
55<form method="post" action="dom_doadd.php" id="main">
56<p>
57<label for="newdomain"><b><?php __("Domain name"); ?> :</b></label> <span class="int" id="newdomwww">www.</span><input type="text" class="int" id="newdomain" name="newdomain" value="<?php ehe($newdomain); ?>" size="32" maxlength="255" />
58</p>
59<p>
60  <input type="checkbox" name="dns" class="inc" value="1" id="yndns"<?php cbox($dns=="1"); ?>/>&nbsp;<label for="yndns"><?php __("host my dns here"); ?></label>
61</p>
62<?php
63  $q = $quota->getquota("dom");
64if ($q["u"]>0) {
65?> 
66<p>
67    <?php __("Do you want to point this domain to another domain already installed in your account?"); ?>
68<br />
69   <input type="radio" id="newisslave0" name="newisslave" value="0"<?php cbox($newisslave==0); ?>/><label for="newisslave0"><?php __("No: This domain will have its own folder."); ?></label>
70<br />
71   <input type="radio" id="newisslave1" name="newisslave" value="1"<?php cbox($newisslave==1); ?>/><label for="newisslave1"><?php __("Yes, redirect this new domain to this one:"); ?> </label> <select name="slavedom" id="slavedom" class="inl">
72 <option value=""><?php __("-- Choose a domain --"); ?></option>
73<?php
74$dl=$dom->get_domain_list();
75  $ddl=array();
76  foreach($dl as $d) {
77    $ddl[$d]=$d;
78  }
79  eoption($ddl,"slavedom");
80?></select>
81<br />
82</p>
83    <?php } ?>
84
85<p>
86  <input type="submit" class="inb" name="submit" value="<?php __("Add this domain"); ?>" />
87</p>
88
89<p class="error">
90<small>
91<?php __("If you don't want to host in our server the DNS of your domain, don't check the box 'host my dns here'. If you don't know what it mean, leave it checked."); ?></small></p>
92<?php $mem->show_help("add_domain"); ?>
93</form>
94<?php
95        if (is_array($dom->dns)) {
96                echo "<br />"._("Whois result on the domain")." : <pre>";
97                reset($dom->dns);
98                while (list($key,$val)=each($dom->dns)) {
99                        echo "nameserver: $val\n";
100                }
101                echo "</pre>";
102        }
103?>
104<script type="text/javascript">
105document.forms['main'].newdomain.focus();
106</script>
107<?php include_once("foot.php"); ?>
Note: See TracBrowser for help on using the repository browser.