From 023e6a2638b0a4812bcbc1cecca61e7269cbe6a7 Mon Sep 17 00:00:00 2001 From: Amberstone Date: Sat, 9 Nov 2024 16:31:59 +0900 Subject: [PATCH] init --- adm/menu_form.php | 171 ++++++++++++++++++++++++ adm/menu_list.php | 277 +++++++++++++++++++++++++++++++++++++++ adm/menu_list_update.php | 120 +++++++++++++++++ 3 files changed, 568 insertions(+) create mode 100644 adm/menu_form.php create mode 100644 adm/menu_list.php create mode 100644 adm/menu_list_update.php diff --git a/adm/menu_form.php b/adm/menu_form.php new file mode 100644 index 0000000..8616584 --- /dev/null +++ b/adm/menu_form.php @@ -0,0 +1,171 @@ + + + + + + + + \ No newline at end of file diff --git a/adm/menu_list.php b/adm/menu_list.php new file mode 100644 index 0000000..95dfad4 --- /dev/null +++ b/adm/menu_list.php @@ -0,0 +1,277 @@ +dbconfig.php 파일에 $g5[\'menu_table\'] = G5_TABLE_PREFIX.\'menu\'; 를 추가해 주세요.'); +} +if (!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) { + sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['menu_table']}` ( + `me_id` int(11) NOT NULL AUTO_INCREMENT, + `me_code` varchar(255) NOT NULL DEFAULT '', + `me_name` varchar(255) NOT NULL DEFAULT '', + `me_link` varchar(255) NOT NULL DEFAULT '', + `me_target` varchar(255) NOT NULL DEFAULT '0', + `me_order` int(11) NOT NULL DEFAULT '0', + `me_use` tinyint(4) NOT NULL DEFAULT '0', + `me_mobile_use` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`me_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); +} + +$temp = sql_fetch("select * from {$g5['menu_table']}"); +if (!isset($temp['me_level'])) { + sql_query(" ALTER TABLE `{$g5['menu_table']}` ADD `me_level` int(11) NOT NULL DEFAULT '1' after `me_mobile_use`, ADD `me_img` varchar(255) NOT NULL DEFAULT '' after `me_name`", false); +} +if (!isset($temp['me_img2'])) { + sql_query(" ALTER TABLE `{$g5['menu_table']}` ADD `me_img2` varchar(255) NOT NULL DEFAULT '' after `me_img`", false); +} +if (!in_array("me_depth", $columns)) { + sql_query("ALTER TABLE {$g5['menu_table']} ADD COLUMN me_depth INT DEFAULT 0"); +} +if (!in_array("me_parent", $columns)) { + sql_query("ALTER TABLE {$g5['menu_table']} ADD COLUMN me_parent VARCHAR(50) DEFAULT ''"); +} + +$sql = " select * from {$g5['menu_table']} order by me_order*1, me_id "; +$result = sql_query($sql); + +$g5['title'] = "메뉴설정"; +include_once('./admin.head.php'); + +$colspan = 14; +?> + +
+

주의! 메뉴설정 작업 후 반드시 확인을 누르셔야 저장됩니다.

+
+ +
+ + +
+ +
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/adm/menu_list_update.php b/adm/menu_list_update.php new file mode 100644 index 0000000..d68eca6 --- /dev/null +++ b/adm/menu_list_update.php @@ -0,0 +1,120 @@ + \ No newline at end of file