Location: PHPKode > scripts > phpMyAccess > phpmyaccess-1.5.3/phpmyaccess/menu_items.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='menu_items';
$header="Menu Items Edit";

//  Name of field which is the unique key
$key='menu_item_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) Z(oom) J(ump)
$options = 'ACDFZPX';
//   Should authentication be used, "0" if no, anything else is minimum
//   user level needed to be allowed access
$auth = 999;
$debug = 0;
//
//
$fdd['menu_item_ID']['name'] = 'record ID';
$fdd['menu_item_ID']['sort'] = true;
$fdd['menu_item_ID']['select'] = 'T';
$fdd['menu_item_ID']['required'] = true;
$fdd['menu_item_ID']['auto'] = true;
//$fdd['menu_ID']['listview'] = false;
$fdd['menu_name']['name'] = 'Menu Item Name';
$fdd['menu_name']['sort'] = true;
$fdd['menu_name']['select'] = 'T';
$fdd['menu_name']['length'] = 30;
//$fdd['menu_name']['listview'] = false;
$fdd['menu_value']['name'] = 'Menu Item Value';
$fdd['menu_value']['sort'] = true;
$fdd['menu_value']['select'] = 'T';
$fdd['menu_value']['length'] = 50;
//$fdd['menu_value']['listview'] = false;

$fdd['menu_comment']['name'] = 'Menu Item Comments';
$fdd['menu_comment']['sort'] = true;
$fdd['menu_comment']['select'] = 'T';
$fdd['menu_comment']['length'] = 50;
//$fdd['menu_value']['listview'] = false;
//  and now the all-important call to PHPMyEdit
//  warning - beware of case-sensitive operating systems!
//$editinlinelocal = "//Desired js subfunction before text reloaded into cell here\n";
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