<?php /** * BreezingForms - A Joomla Forms Application * @version 1.4.4 * @package BreezingForms * @copyright (C) 2004-2005 by Peter Koch * @license Released under the terms of the GNU General Public License **/ defined('_JEXEC') or die('Direct Access to this location is not allowed.'); require_once($ff_admpath.'/admin/menu.class.php'); $pkg = getMenuPackage(); switch ($task) { case 'save' : facileFormsMenu::save($option, $pkg); break; case 'cancel': facileFormsMenu::cancel($option, $pkg); break; case 'new' : facileFormsMenu::create($option, $pkg); break; case 'newedit' : $parent = JRequest::getVar( 'parent', ''); $formid = JRequest::getVar( 'formid', ''); facileFormsMenu::edit($option, $pkg, $ids, $formid, $parent); break; case 'edit' : facileFormsMenu::edit($option, $pkg, $ids, '', ''); break;
function getMenuPackage($site, $table, $j, $parent, $depth, $uid) { global $g; static $j, $string; $xdepth = $depth + 1; $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . $xdepth . ' and parent=' . $parent . ' order by gid asc', '*'); while ($C = db_fetch_array($CD)) { $_parent = $C['parent'] ? getDbData($table, ($site ? 'site=' . $site . ' and ' : '') . 'uid=' . $C['parent'], 'id') : array(); $j++; for ($i = 0; $i < $depth; $i++) { $string .= "\t"; } $string .= "\tarray('name'=>'" . $C['name'] . "','id'=>'" . $C['id'] . "','menutype'=>'" . $C['menutype'] . "','mobile'=>'" . $C['mobile'] . "','target'=>'" . $C['target'] . "','redirect'=>'" . $C['redirect'] . "','joint'=>'" . $C['joint'] . "','layout'=>'" . $C['layout'] . "','imghead'=>'" . $C['imghead'] . "','imgfoot'=>'" . $C['imgfoot'] . "','addattr'=>'" . $C['addattr'] . "','depth'=>'" . $C['depth'] . "','parent'=>'" . $_parent['id'] . "','is_child'=>'" . $C['is_child'] . "','gid'=>'" . $C['gid'] . "',),\r\n"; if ($C['is_child']) { getMenuPackage($site, $table, $j, $C['uid'], $C['depth'], $uid); } } return $string; }