Location: PHPKode > scripts > phpMyAccess > phpmyaccess-1.5.3/phpmyaccess/demos/hours/bu_list.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='bu_list';

//  Name of field which is the unique key
$key='ID_bu';
//  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 = 'ACZF';
//   Should authentication be used, "0" if no, anything else is minimum
//   user level needed to be allowed access
$auth = '999';
//   Debugging on/off (0=off, 1=on)
$debug = '0';
//
//
$header = "Business Unit list";
//
$fdd['ID_bu']['name'] = 'Business Unit ID';
$fdd['ID_bu']['sort'] = true;
$fdd['ID_bu']['select'] = 'T';
$fdd['ID_bu']['required'] = true;
$fdd['ID_bu']['auto'] = true;
//$fdd['ID_bu']['listview'] = false;
$fdd['bu']['name'] = 'Bu';
$fdd['bu']['sort'] = true;
$fdd['bu']['select'] = 'T';
$fdd['bu']['required'] = true;
$fdd['bu']['length'] = 50;
//$fdd['bu']['listview'] = false;
$fdd['comment']['name'] = 'Comment';
$fdd['comment']['sort'] = true;
$fdd['comment']['select'] = 'T';
$fdd['comment']['textarea']['rows'] = 5;
$fdd['comment']['textarea']['cols'] = 50;
//$fdd['comment']['listview'] = false;
//  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