コード例 #1
0
<pre>
<?php 
print basename(__FILE__);
?>
 - output the Menu Structure Format obtained querying the DB

<?php 
require_once 'PEAR.php';
require_once 'DB.php';
require_once 'lib/layersmenu-common.inc.php';
require_once 'lib/layersmenu-process.inc.php';
$mid = new ProcessLayersMenu();
$mid->setIconsize(16, 16);
//$mid->setMenuStructureFile('layersmenu-horizontal-1.txt');
//$mid->parseStructureForMenu('hormenu1');
$mid->setDBConnParms('mysql://*****:*****@localhost/phplayersmenu');
//$mid->setDBConnParms('pgsql://*****:*****@localhost/phplayersmenu');
//$mid->setDBConnParms('sqlite:///DUMPS/phplayersmenu');
$mid->scanTableForMenu('hormenu1', 'it');
//$mid->scanTableForMenu('hormenu1');
print $mid->getMenuStructure('hormenu1');
?>
</pre>
コード例 #2
0
<pre>
Output the Menu Structure Format obtained querying the DB

<?php 
include "lib/PHPLIB.php";
include "lib/layersmenu-common.inc.php";
include "lib/layersmenu-process.inc.php";
$mid = new ProcessLayersMenu();
//$mid->setMenuStructureFile("layersmenu-horizontal-1.txt");
//$mid->parseStructureForMenu("hormenu1");
$mid->setDBConnParms("pgsql://*****:*****@localhost/phplayersmenu");
//$mid->setDBConnParms("mysql://*****:*****@localhost/phplayersmenu");
$mid->scanTableForMenu("hormenu1");
print $mid->getMenuStructure("hormenu1");
?>
</pre>