Alternc  latest
Alternc logiel libre pour l'hébergement
sql_users_password.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * Manage MySQL users password
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 include_once("head.php");
28 
29 $fields = array (
30  "id" => array ("request", "string", ""),
31 );
33 ?>
34 <h3><?php __("Change this user's password"); echo " - ".$id ?></h3>
35 <hr id="topbar"/>
36 <br />
37 <?php
38 $r=$mysql->get_user_dblist($id);
39 
40 $c=$admin->listPasswordPolicies();
41 $passwd_classcount = $c['mysql']['classcount'];
42 ?>
43 
44 <form method="post" action="sql_users_dopassword.php" autocomplete="off">
45  <?php csrf_get(); ?>
46 <input type="hidden" name="id" value="<?php ehe($id); ?>" />
47 
48 <!-- honeypot fields -->
49 <input type="text" style="display: none" id="fakeUsername" name="fakeUsername" value="" />
50 <input type="password" style="display: none" id="fakePassword" name="fakePassword" value="" />
51 
52 <table cellspacing="0" cellpadding="4" class="tedit">
53  <tr>
54  <th><label for="password"><?php __("Password"); ?></label></th>
55  <td><input type="password" class="int" autocomplete="off" name="password" id="password" value="" size="20" maxlength="64" /><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#password","#passwordconf",$passwd_classcount); ?></td>
56  </tr>
57  <tr>
58  <th><label for="passwordconf"><?php __("Confirm password"); ?></label></th>
59  <td><input type="password" class="int" autocomplete="off" name="passwordconf" id="passwordconf" value="" size="20" maxlength="64" /></td>
60  </tr>
61 </table>
62 <br/>
63 <input type="submit" class="inb" value="<?php __("Change user password"); ?>" />
64 <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='sql_users_list.php'"/>
65 </form>
66 
67 <?php include_once("foot.php"); ?>
$r
Definition: aws_add.php:75
const DEFAULT_PASS_SIZE
Define constants from vars of /etc/alternc/local.sh The you can't choose where is the AlternC Panel.
Definition: config.php:81
display_div_generate_password($pass_size=DEFAULT_PASS_SIZE, $fields_to_fill1="", $fields_to_fill2="", $classcount=3)
Show a button to set a random password for a password field.
Definition: functions.php:922
__($str)
Definition: functions.php:404
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
Definition: functions.php:1159
$fields
Manage MySQL users password.
$passwd_classcount
if(!isset($is_include)) if(! $key &&! $crt) $id