|
PCCS MySQLDatabase Admin Tool version 1.3.4
|
/ -> mysqldb_chgpasswd.php
1 <?php
2 //////////////////////////////////////////////////////////////////////////// 3 // Coded by: Chauncey Thorn 4 // email: cthorn 5 /************************************************************************
6 PCCS MySQLDatabase Admin Tool
7 Copyright (C) Chauncey Thorn
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA , USA.
22 **************************************************************************/
23
24 // updated 10-23-2000 25 // -- moving to a single file for global include files 26
27 require('mysqldb_app_includes.php');
28
29 common_header($_title);
30 pageTop("PCCS MySQLAdmin Tool: CHANGE USER PASSWORD","600");
31
32
33 print "<p>";
34 print "<H3 align=center><FONT COLOR=blue>USER ADMINISTRATION</FONT></H3>";
35 print "<P> <CENTER><FONT SIZE=+2 >";
36 print "</FONT></CENTER>";
37 print "<P>";
38
39
40 if($action = "chgpasswd"):
41
42 print "
43 <center>
44 <form action=\"mysqldb_setpass.php?action=setpasswd\" method=\"post\">
45 <table width=400 border=0>
46 <tr>
47 <th colspan=2 align=center><font color=red>Change Password for</font></th>
48 </tr>
49 <tr>
50 <td>DB User Id</td><td>
51 <SELECT NAME=dbuser SINGLE>";
52
53 $qry = "SELECT User,host FROM user ORDER BY User";
54 $res = mysqlquery("mysql",$qry) or die("Error running query");
55 for ($i = 0; $i < mysql_numrows($res); $i++):
56 $user_output = mysql_result($res,$i,"User");
57 $host_output = mysql_result($res,$i,"Host");
58 print "<OPTION VALUE=\"$user_output@$host_output\">$user_output@$host_output</OPTION>";
59 endfor;
60
61
62 print "
63 </SELECT>
64 </td>
65 </tr>
66 <tr>
67 <td>New Password</td><td><input type=text name=db_passwd1></td>
68 </tr>
69 <tr>
70 <td>Re-enter Password</td><td><input type=text name=db_passwd2></td>
71 </tr>
72 <tr>
73 <td colspan=2 align=center><input type=submit value=\"Change Passwd\">
74 </tr>
75 </table>
76 </form>
77 </center>";
78
79 print "<center>";
80
81 print "<a href=mysqldb_newuser.php>
82 Cancel</a>Password Change";
83 print " or got to <a href=./>Main</a><p>";
84 print "</center>";
85 endif;
86
87
88
89 pageBottom();
90 footer();
91 ?>
| |