Location: PHPKode > scripts > phpMyAccess > phpmyaccess-1.5.3/phpmyaccess/demos/hours/useraccounts.php
<?php

function MyHeader($header) {
echo("<?xml version=\"1.0\"?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
  <title>$header </title>
</head>
<body bgcolor=\"#ffeb10\">
  <div class=\"main\">
  <h3>$header</h3>
");
}

//   MySQL host name, user name, password, database, and table to edit
include "dbaccess.php";
$tb='useraccounts';

//  Name of field which is the unique key
$key='useracc_ID';
//  Type of key field (int/real/string/date etc)
$key_type='int';
//   Number of records to display on the screen
$inc = 15;
//   Options you wish to give the users - A(dd) C(hange) D(elete) F(ilter)
$options = 'ACFZ';
//   Should authentication be used, "0" if no, anything else is minimum
//   user level needed to be allowed access
$auth = '100';
//   Debugging on/off (0=off, 1=on)
$debug = '0';
//
$header= "User Account Management";
//
//
$fdd['useracc_ID']['name'] = 'Useracc ID';
$fdd['useracc_ID']['sort'] = true;
$fdd['useracc_ID']['select'] = 'T';
$fdd['useracc_ID']['required'] = true;
$fdd['useracc_ID']['auto'] = true;
//$fdd['useracc_ID']['listview'] = false;
$fdd['user_name']['name'] = 'User Name';
$fdd['user_name']['sort'] = true;
$fdd['user_name']['select'] = 'T';
$fdd['user_name']['required'] = true;
$fdd['user_name']['length'] = 50;
//$fdd['user_name']['listview'] = false;
$fdd['user_logname']['name'] = 'User Logname';
$fdd['user_logname']['sort'] = true;
$fdd['user_logname']['select'] = 'T';
$fdd['user_logname']['required'] = true;
$fdd['user_logname']['length'] = 10;
//$fdd['user_logname']['listview'] = false;
$fdd['user_passwd']['name'] = 'User Passwd';
$fdd['user_passwd']['sort'] = false;
$fdd['user_passwd']['select'] = 'T';
$fdd['user_passwd']['required'] = true;
$fdd['user_passwd']['password'] = true;
$fdd['user_passwd']['length'] = 15;
//$fdd['user_passwd']['listview'] = false;
$fdd['user_level']['name'] = 'User Level';
$fdd['user_level']['sort'] = true;
$fdd['user_level']['select'] = 'T';
//$fdd['user_level']['listview'] = false;
$fdd['user_bu']['name'] = 'Business Unit';
$fdd['user_bu']['sort'] = true;
$fdd['user_bu']['select'] = 'T';
$fdd['user_bu']['values']['table'] = 'bu_list';
$fdd['user_bu']['values']['column'] = 'ID_bu';
$fdd['user_bu']['values']['description'] = 'bu';
//  and now the all-important call to PHPMyEdit
//  warning - beware of case-sensitive operating systems!
include 'PHPMyEdit.php';

function Post_run() {
echo "  </div>
  <p></p>
  <hr  width=\"30%\" >
  <table>
   <tr>
     <td><a href=\"index.php\" name=\"link\">Main Page</a></td>
     <td> &nbsp;&nbsp;&nbsp; </td>
     <td><a href=\"index.php?page=menus\" name=\"link\">Menus Maintenance Page</a></td>
   </tr>
  </table>
  <br><b> User : ".$GLOBALS['auth_user']." </b><br>
";
}

function footer () {
   echo "  </body>\n</html>\n";
}
?>
Return current item: phpMyAccess