SF Guy - 2006-05-08

hi,

i'm getting the following error while displaying a Vertical DB(mysql) menu:

Fatal error: Call to undefined function: fetchinto() in c:\appserv\www\site\topics\current\phplayers\lib\layersmenu-common.inc.php on line 716

And here are the contents of the menu file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>

<link rel="stylesheet" href="menu.css" type="text/css"></link>
<link rel="shortcut icon" href="LOGOS/shortcut_icon_phplm.png"></link>
<title>The PHP Layers Menu System</title>

<script language="JavaScript" type="text/javascript">
<!--
<?php require_once 'libjs/layersmenu-browser_detection.js'; ?>
// -->
</script>
<script language="JavaScript" type="text/javascript" src="libjs/layersmenu-library.js"></script>
<script language="JavaScript" type="text/javascript" src="libjs/layersmenu.js"></script>

<?php
require_once 'lib/PHPLIB.php';
require_once 'PEAR.php';
require_once 'DB.php';
require_once 'lib/layersmenu-common.inc.php';
require_once 'lib/layersmenu.inc.php';

$mid = new LayersMenu();

////$mid->setHorizontalMenuTpl('layersmenu-horizontal_menu-old.ihtml');
////$mid->setSubMenuTpl('layersmenu-sub_menu-old.ihtml');
//$mid->setDownArrowImg('down-arrow.png');
//$mid->setForwardArrowImg('forward-arrow.png');
//$mid->setMenuStructureFile('layersmenu-horizontal-1.txt');
//$mid->setIconsize(16, 16);
//$mid->parseStructureForMenu('hormenu1');
$mid->setDBConnParms('mysql://root@localhost/islam_islamdb');

/* THE DEFAULTS FOR THE DEFAULT LANGUAGE TABLE:*/
$mid->setTableName('site_section');
$mid->setTableFields(array(
    'id'        => 'cat_id',
    'parent_id'    => 'parent_cat_id',
    'text'        => 'cat_name',
    'href'        => 'cat_url',
    'title'        => '',
    'icon'        => '',
    'target'    => '',
    'orderfield'    => 'cat_order',
    'expanded'    => ''
));

/* UNCOMMENT THE COMMAND BELOW IF YOU DO NOT WANT TO SHOW ICONS
$mid->setTableFields(array(
    'id'        => 'id',
    'parent_id'    => 'parent_id',
    'text'        => 'text',
    'href'        => 'href',
    'title'        => 'title',
    'icon'        => '',
    'icon'        => "''",    // this is an alternative to the line above
    'target'    => 'target',
    'orderfield'    => 'orderfield',
    'expanded'    => 'expanded'
));
*/

/* YOU CAN ELIMINATE ICONS ALSO THIS WAY:
$mid->setTableFields(array(
    'icon'        => ''
));
*/
/* THE DEFAULTS FOR THE I18N TABLE:
$mid->setTableName_i18n('phplayersmenu_i18n');
$mid->setTableFields_i18n(array(
    'language'    => 'language',
    'id'        => 'id',
    'text'        => 'text',
    'title'        => 'title'
));
*/
/* HOWTO use data taken from the PgMarket 'categories'
   and 'categories_i18n' tables:
$mid->setDBConnParms('pgsql://postgres:postgres@localhost/pgmarket');
//$mid->setDBConnParms('pgsql://mysql:mysql@localhost/pgmarket');
$mid->setTableName('categories');
$mid->setTableFields(array(
    'id'        => 'id',
    'parent_id'    => 'parent_id',
    'text'        => 'name',
    'href'        => 'id',
    'title'        => 'description',
//    'title'        => '',
    'icon'        => '',
    'target'    => '',
    'orderfield'    => 'special_level',
    'expanded'    => ''
));
$mid->setTableName_i18n('categories_i18n');
$mid->setTableFields_i18n(array(
    'language'    => 'lang',
    'id'        => 'category_id',
    'text'        => 'name',
    'title'        => ''
));
$mid->setPrependedUrl('/~pratesi/pgmarket/shopping/index.php?id=');
//$mid->setIconsize(16, 16);
//$mid->scanTableForMenu('hormenu1', 'en');
*/
//$mid->setIconsize(16, 16);
//$mid->scanTableForMenu('hormenu1');
$mid->setIconsize(16, 16);
$mid->scanTableForMenu('vermenu1', 'it');
$mid->newVerticalMenu('vermenu1');

$mid->printHeader();
?>

</head>
<body>
<table width="100%" border="0">
  <tr>
    <th width="80%" scope="row">&nbsp;</th>
    <td width="20%" align="right"><? $mid->printMenu('vermenu1'); ?></td>
  </tr>
</table>
<?php
$mid->printFooter();
?>

</body>
</html>