root/alternc/trunk/bureau/admin/adm_add.php

Revision 2247, 4.5 kB (checked in by azerttyu, 8 months ago)

Création d'un nouveau compte avec son sous domaine

Permettre à un (sous) administrateur d'affecter au choix le domaine entre ceux déclarés pour son compte ou celui générique du serveur (défini par l'admin général).

close #1087

Line 
1 <?php
2 /*
3  $Id: adm_add.php,v 1.9 2006/01/24 05:03:30 joe Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2006 Le réseau Koumbit Inc.
7  http://koumbit.org/
8  Copyright (C) 2002 by the AlternC Development Team.
9  http://alternc.org/
10  ----------------------------------------------------------------------
11  Based on:
12  Valentin Lacambre's web hosting softwares: http://altern.org/
13  ----------------------------------------------------------------------
14  LICENSE
15
16  This program is free software; you can redistribute it and/or
17  modify it under the terms of the GNU General Public License (GPL)
18  as published by the Free Software Foundation; either version 2
19  of the License, or (at your option) any later version.
20
21  This program is distributed in the hope that it will be useful,
22  but WITHOUT ANY WARRANTY; without even the implied warranty of
23  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  GNU General Public License for more details.
25
26  To read the license please visit http://www.gnu.org/copyleft/gpl.html
27  ----------------------------------------------------------------------
28  Original Author of file: Benjamin Sonntag
29  Purpose of file: Member managment
30  ----------------------------------------------------------------------
31 */
32 require_once("../class/config.php");
33
34 if (!$admin->enabled) {
35     __("This page is restricted to authorized staff");
36     exit();
37 }
38
39 if (!isset($canpass)) $canpass=1;
40
41 include("head.php");
42
43 ?>
44 </head>
45 <body>
46 <h3><?php __("New member"); ?></h3>
47 <?php
48 if ($error) {
49     echo "<p class=\"error\">$error</p>";
50 }
51 ?>
52 <form method="post" action="adm_doadd.php">
53 <table border="1" cellspacing="0" cellpadding="4">
54 <tr><th><label for="login"><?php __("Username"); ?></label></th><td>
55     <input type="text" class="int" name="login" id="login" value="<?php echo $login; ?>" size="20" maxlength="64" />
56 </td></tr>
57 <tr>
58     <th><label for="pass"><?php __("Initial password"); ?></label></th>
59     <td><input type="password" id="pass" name="pass" class="int" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td>
60 </tr>
61 <tr>
62     <th><label for="passconf"><?php __("Confirm password"); ?></label></th>
63     <td><input type="password" id="passconf" name="passconf" class="int" value="<?php echo $passconf; ?>" size="20" maxlength="64" /></td>
64 </tr>
65 <tr>
66     <th><label for="canpass"><?php __("Can he change its password"); ?></label></th>
67     <td><select class="inl" name="canpass" id="canpass">
68     <?php
69     for($i=0;$i<count($bro->l_icons);$i++) {
70       echo "<option";
71       if ($canpass==$i) echo " selected=\"selected\"";
72       echo " value=\"$i\">"._($bro->l_icons[$i])."</option>";
73     }
74 ?></select>
75     </td>
76 </tr>
77 <tr>
78     <th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th>
79     <td><input class="int" type="text" id="nom" name="nom" value="<?php echo $nom; ?>" size="20" maxlength="128" />&nbsp;/&nbsp;<input type="text" name="prenom" id="prenom" value="<?php echo $prenom; ?>" class="int" size="20" maxlength="128" /></td>
80 </tr>
81 <tr>
82     <th><label for="nmail"><?php __("Email address"); ?></label></th>
83     <td><input type="text" name="nmail" id="nmail" class="int" value="<?php echo $nmail; ?>" size="30" maxlength="128" /></td>
84 </tr>
85 <tr>
86     <th><label for="type"><?php __("Account type"); ?></label></th>
87     <td><select name="type" id="type" class="inl">
88     <?php
89     $db->query("SELECT distinct(type) FROM defquotas ORDER by type");
90     while($db->next_record()) {
91       $type = $db->f("type");
92       echo "<option value=\"$type\"";
93       if($type == 'default')
94         echo " selected=\"selected\"";
95       echo ">$type</option>";
96     }
97 ?></select>
98     </td>
99 </tr>
100
101 <tr>
102     <th colspan="2">
103         <input type="checkbox" name="create_dom" value="1" />
104         <label><?php printf(_("Create the domain <b>username.%s</b>"),""); ?></label>
105         <select name="create_dom_list">
106             <?php if (variable_get('hosting_tld')) { ?>
107                 <option value="<?php echo variable_get('hosting_tld'); ?>" selected="selected"><?php echo variable_get('hosting_tld'); ?></option>
108             <?php }
109             /* Enumeration des domaines : */
110             $domain=$dom->enum_domains();
111             reset($domain);
112             while (list($key,$val)=each($domain)) { ?>
113                 <option value="<?php echo $val; ?>" > <?php echo $val?> </option>
114             <?php } ?>
115         </select>
116     </th>
117 </tr>
118 <tr>
119     <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create a new member"); ?>" /></td>
120 </tr>
121 </table>
122 </form>
123
124 </body>
125 </html>
126
Note: See TracBrowser for help on using the browser.