123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <?php
- require_once 'auth.php';
-
- if (!isset($_REQUEST['operation']) && !isset($_REQUEST['savechange'])
- && !isset($_REQUEST['cancelchange']) ) {
- echo "<script language=javascript>
- location.href = '".$_SERVER['PHP_SELF'].
- "?fl=0&fm=0&sfn[0]=0&operation=Change&rec=".$_SESSION['userid']."';
- </script>";
- }
- if (isset($_GET['operation']) && $_GET['rec'] !== $_SESSION['userid']) {
- echo "<script language=javascript>
- location.href = '".$_SERVER['PHP_SELF']."';
- </script>";
- }
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title><?=getTitle(__FILE__);?></title>
- <link rel="stylesheet" href="phpME.css" type="text/css"></link>
- </head>
- <body onLoad='documentOnLoad()'>
- <h3><?=getTitle(__FILE__);?></h3>
- <?php
- echo "
- <script language=javascript>
- function documentOnLoad() {
- ";
- if (in_array($_REQUEST['operation'],array(__('Change')))
- || isset($_REQUEST['morechange'])) {
- echo "document.forms[0].userid.readOnly = true;";
-
- }
- echo "
- }
- </script>
- ";
- require_once 'config.php';
- $opts['hn'] = $adodb_host;
- $opts['un'] = $adodb_user;
- $opts['pw'] = $adodb_pass;
- $opts['db'] = $adodb_db;
- $opts['tb'] = 'qb_user';
- $opts['key'] = 'userid';
- $opts['key_type'] = 'string';
- $opts['sort_field'] = array('userid');
- $opts['inc'] = 25;
- $opts['options'] = 'C';
- $opts['multiple'] = '4';
- $opts['navigation'] = 'UG';
- $opts['display'] = array(
- 'form' => true,
- 'query' => false,
- 'sort' => false,
- 'time' => false,
- 'tabs' => false
- );
- $opts['logtable'] = isLogTable($opts['tb']);
- $opts['language'] = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
- $opts['filters'] = " userid = '".$_SESSION['userid']."'";
- $opts['fdd']['userid'] = array(
- 'name' => 'UserID',
- 'select' => 'T',
- 'maxlen' => 32,
- 'required' => true,
- 'sort' => true,
- 'sqlw' => 'LOWER("$val")'
- );
- $opts['fdd']['passwd'] = array(
- 'name' => 'Password',
- 'select' => 'T',
- 'maxlen' => 32,
- 'sort' => true,
- 'input' => 'W',
- 'sqlw' => 'IF (LENGTH("$val")>0,MD5("$val"),passwd)',
- 'sql' => '""'
- );
- $moduleId = 'Change Password';
- $opts['options'] = getUserOptions($moduleId, $opts['options']);
- $opts['filters'] = getUserFilters($moduleId, $opts['filters']);
- require_once 'phpMyEdit.class.php';
- new phpMyEdit($opts);
- ?>
- </body>
- </html>
|