Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
sql_users_add.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: sql_users_add.php,v 1.5 2004/05/19 14:23:06 nahuel 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: Nahuel ANGELINETTI
27  Purpose of file:
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 $fields = array (
34  "usern" => array ("request", "string", ""),
35  "password" => array ("request", "string", ""),
36  "passconf" => array ("request", "string", ""),
37 );
39 
40 ?>
41 <h3><?php __("Create a new MySQL user"); ?></h3>
42 <hr id="topbar"/>
43 <br />
44 <?php
45  if (isset($error) && $error) {
46  echo "<p class=\"alert alert-danger\">$error</p>";
47  if (isset($fatal) && $fatal) {
48 ?>
49 <?php include_once("foot.php"); ?>
50 
51 <?php
52  exit();
53  }
54  }
55 ?>
56 <form method="post" action="sql_users_doadd.php" id="main" name="main">
57 <table class="tedit">
58 <tr>
59  <th><label for="usern"><?php __("Username"); ?></label></th>
60  <td><span class="int" id="usernpfx"><?php echo $mem->user["login"]; ?>_</span><input type="text" class="int" name="usern" id="usern" value="<?php ehe($usern); ?>" size="20" maxlength="20" /></td>
61 </tr>
62 <tr>
63  <th><label for="password"><?php __("Password"); ?></label></th>
64  <td><input type="password" class="int" name="password" id="password" size="26"/><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#password","#passconf"); ?></td>
65 </tr>
66 <tr>
67  <th><label for="password"><?php __("Confirm password"); ?></label></th>
68  <td><input type="password" class="int" name="passconf" id="passconf" size="26"/></td>
69 </tr>
70 
71 <tr class="trbtn"><td colspan="2">
72  <input type="submit" class="inb ok" name="submit" value="<?php __("Create this new MySQL user"); ?>" />
73  <input type="button" class="inb cancel" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='sql_users_list.php'"/>
74 </td></tr>
75 </table>
76 </form>
77 <script type="text/javascript">
78  if (document.forms['main'].usern.text!='') {
79  document.forms['main'].password.focus();
80  } else {
81  document.forms['main'].usern.focus();
82  }
83  document.forms['main'].setAttribute('autocomplete', 'off');
84 
85 </script>
86 <?php include_once("foot.php"); ?>