diff --git a/adm/shop_admin/codedupcheck.php b/adm/shop_admin/codedupcheck.php index 48a141b22..f7e7b7042 100644 --- a/adm/shop_admin/codedupcheck.php +++ b/adm/shop_admin/codedupcheck.php @@ -1,30 +1,24 @@ include_once("./_common.php"); -include_once("$g4[path]/head.sub.php"); -if ($it_id) +$name = ""; +if ($it_id) { - $sql = " select it_name from $g4[yc4_item_table] where it_id = '$it_id' "; + $sql = " select it_name from {$g4['yc4_item_table']} where it_id = '$it_id' "; $row = sql_fetch($sql); $code = $it_id; - $name = $row[it_name]; -} -else if ($ca_id) -{ - $sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id' "; + $name = $row['it_name']; +} +else if ($ca_id) +{ + $sql = " select ca_name from {$g4['yc4_category_table']} where ca_id = '$ca_id' "; $row = sql_fetch($sql); $code = $ca_id; - $name = $row[ca_name]; + $name = $row['ca_name']; } + +echo $name; + +// json 포맷으로 데이터 전달 +//echo '{ "name": "' . $name . '", "code": "' . $code . '" }'; ?> - \ No newline at end of file diff --git a/adm/shop_admin/contentform.php b/adm/shop_admin/contentform.php index 40a57026e..94136ceac 100644 --- a/adm/shop_admin/contentform.php +++ b/adm/shop_admin/contentform.php @@ -1,7 +1,7 @@ $sub_menu = "400700"; +define('G4_EDITOR', 1); include_once("./_common.php"); -include_once ("$g4[path]/lib/cheditor4.lib.php"); auth_check($auth[$sub_menu], "w"); @@ -12,17 +12,17 @@ sql_query($sql, false); $html_title = "내용"; -if ($w == "u") +if ($w == "u") { $html_title .= " 수정"; $readonly = " readonly"; $sql = " select * from $g4[yc4_content_table] where co_id = '$co_id' "; $co = sql_fetch($sql); - if (!$co[co_id]) + if (!$co[co_id]) alert("등록된 자료가 없습니다."); -} -else +} +else { $html_title .= " 입력"; $co[co_html] = 2; @@ -34,9 +34,6 @@ include_once ("$g4[admin_path]/admin.head.php"); =subtitle($html_title)?>
- -=cheditor1('co_content', '100%', '350');?> -
| 제목 | - - if ($w == 'u') - { - echo icon("보기", "$g4[shop_path]/faq.php?fm_id=$fm_id"); + + if ($w == 'u') + { + echo icon("보기", "$g4[shop_path]/faq.php?fm_id=$fm_id"); echo " 상세보기"; - } + } ?> | @@ -82,11 +78,11 @@ include_once ("$g4[admin_path]/admin.head.php");|
| 상단 내용 | -=cheditor2('fm_head_html', $fm[fm_head_html]);?> | +=editor_html('fm_head_html', $fm[fm_head_html]);?> |
| 하단 내용 | -=cheditor2('fm_tail_html', $fm[fm_tail_html]);?> | +=editor_html('fm_tail_html', $fm[fm_tail_html]);?> |