7 * LICENSE: This source file is licensed under the terms of the GNU General Public License.
9 * @package Magic3 Framework
10 * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11 * @copyright Copyright 2006-2010 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: s_slide_menuDb.php 3129 2010-05-14 05:37:22Z fishbone $
14 * @link http://www.magic3.org
16 require_once($gEnvManager->getDbPath() . '/baseDb.php');
18 class s_slide_menuDb extends BaseDb
23 * @param int $deviceType 端末タイプ
24 * @param function $callback コールバック関数
27 function getMenuIdList($deviceType, $callback)
29 $queryStr = 'SELECT * FROM _menu_id ';
30 $queryStr .= 'WHERE mn_device_type = ? ';
31 $queryStr .= 'ORDER BY mn_sort_order';
32 $this->selectLoop($queryStr, array($deviceType), $callback);
37 * @param string $menuId メニュー識別ID
38 * @param string $parentId 親項目ID
39 * @param array $rows 取得レコード
40 * @return true=取得、false=取得せず
42 function getChildMenuItems($menuId, $parentId, &$rows)
44 $queryStr = 'SELECT * FROM _menu_def ';
45 $queryStr .= 'WHERE md_menu_id = ? ';
46 $queryStr .= 'AND md_parent_id = ? ';
47 $queryStr .= 'ORDER BY md_index';
48 $retValue = $this->selectRecords($queryStr, array($menuId, $parentId), $rows);
54 * @param string $id メニューID
55 * @return true=正常、false=異常
57 function getMenu($id, &$row)
59 $queryStr = 'SELECT * FROM _menu_id ';
60 $queryStr .= 'WHERE mn_id = ? ';
61 $ret = $this->selectRecord($queryStr, array($id), $row);