diff --git a/adm/contentformupdate.php b/adm/contentformupdate.php index a18c1c6cc..2f88546be 100644 --- a/adm/contentformupdate.php +++ b/adm/contentformupdate.php @@ -113,17 +113,20 @@ if ($w == "") { set co_id = '$co_id', $sql_common "; sql_query($sql); + run_event('admin_content_created', $co_id); } elseif ($w == "u") { $sql = " update {$g5['content_table']} set $sql_common where co_id = '$co_id' "; sql_query($sql); + run_event('admin_content_updated', $co_id); } elseif ($w == "d") { @unlink(G5_DATA_PATH . "/content/{$co_id}_h"); @unlink(G5_DATA_PATH . "/content/{$co_id}_t"); $sql = " delete from {$g5['content_table']} where co_id = '$co_id' "; sql_query($sql); + run_event('admin_content_deleted', $co_id); } if (function_exists('get_admin_captcha_by')) { diff --git a/adm/faqformupdate.php b/adm/faqformupdate.php index a68984bcf..0758974a8 100644 --- a/adm/faqformupdate.php +++ b/adm/faqformupdate.php @@ -30,6 +30,7 @@ if ($w == "") sql_query($sql); $fa_id = sql_insert_id(); + run_event('admin_faq_item_created', $fa_id, $fm_id); } else if ($w == "u") { @@ -37,11 +38,14 @@ else if ($w == "u") set $sql_common where fa_id = '$fa_id' "; sql_query($sql); + run_event('admin_faq_item_updated', $fa_id, $fm_id); + } else if ($w == "d") { $sql = " delete from {$g5['faq_table']} where fa_id = '$fa_id' "; sql_query($sql); + run_event('admin_faq_item_deleted', $fa_id, $fm_id); } if ($w == 'd') diff --git a/adm/faqmasterformupdate.php b/adm/faqmasterformupdate.php index 8d0fafd22..e43846893 100644 --- a/adm/faqmasterformupdate.php +++ b/adm/faqmasterformupdate.php @@ -49,9 +49,13 @@ if ($w == "") { sql_query($sql); $fm_id = sql_insert_id(); + run_event('admin_faq_master_created', $fm_id); + } elseif ($w == "u") { $sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' "; sql_query($sql); + run_event('admin_faq_master_updated', $fm_id); + } elseif ($w == "d") { @unlink(G5_DATA_PATH . "/faq/{$fm_id}_h"); @unlink(G5_DATA_PATH . "/faq/{$fm_id}_t"); @@ -63,6 +67,8 @@ if ($w == "") { // FAQ상세삭제 $sql = " delete from {$g5['faq_table']} where fm_id = '$fm_id' "; sql_query($sql); + + run_event('admin_faq_master_deleted', $fm_id); } if ($w == "" || $w == "u") { diff --git a/adm/mail_delete.php b/adm/mail_delete.php index e763c3db9..00cbabedc 100644 --- a/adm/mail_delete.php +++ b/adm/mail_delete.php @@ -19,6 +19,7 @@ for ($i = 0; $i < $post_count_chk; $i++) { $sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' "; sql_query($sql); + run_event('admin_mail_deleted', $ma_id); } goto_url('./mail_list.php'); diff --git a/adm/mail_update.php b/adm/mail_update.php index 31558022e..556340255 100644 --- a/adm/mail_update.php +++ b/adm/mail_update.php @@ -21,6 +21,10 @@ if ($w == '') { ma_time = '" . G5_TIME_YMDHIS . "', ma_ip = '{$_SERVER['REMOTE_ADDR']}' "; sql_query($sql); + + $ma_id = sql_insert_id(); + run_event('admin_mail_created', $ma_id); + } elseif ($w == 'u') { $sql = " update {$g5['mail_table']} set ma_subject = '{$ma_subject}', @@ -29,9 +33,12 @@ if ($w == '') { ma_ip = '{$_SERVER['REMOTE_ADDR']}' where ma_id = '{$ma_id}' "; sql_query($sql); + run_event('admin_mail_updated', $ma_id); + } elseif ($w == 'd') { $sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' "; sql_query($sql); + run_event('admin_mail_deleted', $ma_id); } goto_url('./mail_list.php'); diff --git a/adm/newwinformupdate.php b/adm/newwinformupdate.php index 3e5faf927..9991b1af9 100644 --- a/adm/newwinformupdate.php +++ b/adm/newwinformupdate.php @@ -59,14 +59,16 @@ $sql_common = " nw_device = '{$posts['nw_device']}', if ($w == "") { $sql = " insert {$g5['new_win_table']} set $sql_common "; sql_query($sql); - $nw_id = sql_insert_id(); + run_event('admin_newwin_created', $nw_id); } elseif ($w == "u") { $sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' "; sql_query($sql); + run_event('admin_newwin_updated', $nw_id); } elseif ($w == "d") { $sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' "; sql_query($sql); + run_event('admin_newwin_deleted', $nw_id); } if ($w == "d") { diff --git a/adm/qa_config_update.php b/adm/qa_config_update.php index e671471d4..9d604d5d6 100644 --- a/adm/qa_config_update.php +++ b/adm/qa_config_update.php @@ -108,6 +108,8 @@ $sql = " update {$g5['qa_config_table']} qa_5 = '{$_POST['qa_5']}' "; sql_query($sql); +run_event('admin_qa_config_updated'); + if (function_exists('get_admin_captcha_by')) { get_admin_captcha_by('remove'); } diff --git a/adm/shop_admin/categoryformupdate.php b/adm/shop_admin/categoryformupdate.php index f78169bd6..7409eb9d4 100644 --- a/adm/shop_admin/categoryformupdate.php +++ b/adm/shop_admin/categoryformupdate.php @@ -193,6 +193,7 @@ if ($w == "") ca_name = '$ca_name', $sql_common "; sql_query($sql); + run_event('shop_admin_category_created', $ca_id); } else if ($w == "u") { @@ -212,6 +213,7 @@ else if ($w == "u") $sql .= " and ca_mb_id = '{$member['mb_id']}' "; sql_query($sql); } + run_event('shop_admin_category_updated', $ca_id); } else if ($w == "d") { @@ -243,6 +245,7 @@ else if ($w == "d") // 분류 삭제 $sql = " delete from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' "; sql_query($sql); + run_event('shop_admin_category_deleted', $ca_id); } if(function_exists('get_admin_captcha_by')) diff --git a/adm/shop_admin/itemeventformupdate.php b/adm/shop_admin/itemeventformupdate.php index 181f60408..80fad61f9 100644 --- a/adm/shop_admin/itemeventformupdate.php +++ b/adm/shop_admin/itemeventformupdate.php @@ -75,6 +75,7 @@ if ($w == "") $sql_common , ev_id = '$ev_id' "; sql_query($sql); + run_event('shop_admin_event_created', $ev_id); } else if ($w == "u") { @@ -82,6 +83,7 @@ else if ($w == "u") $sql_common where ev_id = '$ev_id' "; sql_query($sql); + run_event('shop_admin_event_updated', $ev_id); } else if ($w == "d") { @@ -92,6 +94,7 @@ else if ($w == "d") // 이벤트상품삭제 $sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' "; sql_query($sql); + run_event('shop_admin_event_deleted', $ev_id); $sql = " delete from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' "; sql_query($sql); diff --git a/adm/shop_admin/itemqaformupdate.php b/adm/shop_admin/itemqaformupdate.php index a23ded782..5b44c3c60 100644 --- a/adm/shop_admin/itemqaformupdate.php +++ b/adm/shop_admin/itemqaformupdate.php @@ -19,6 +19,7 @@ if ($w == "u") iq_answer = '$iq_answer' where iq_id = '$iq_id' "; sql_query($sql); + run_event('shop_admin_item_qa_updated', $iq_id); if(trim($iq_answer)) { $sql = " select a.iq_email, a.iq_hp, b.it_name diff --git a/adm/shop_admin/itemqalistupdate.php b/adm/shop_admin/itemqalistupdate.php index 247d7dab9..cb0ab10ab 100644 --- a/adm/shop_admin/itemqalistupdate.php +++ b/adm/shop_admin/itemqalistupdate.php @@ -23,6 +23,7 @@ if ($_POST['act_button'] == "선택삭제") { $sql = "delete from {$g5['g5_shop_item_qa_table']} where iq_id = '{$iiq_id}' "; sql_query($sql); + run_event('shop_admin_item_qa_deleted', $iiq_id); } } diff --git a/adm/shop_admin/itemuseformupdate.php b/adm/shop_admin/itemuseformupdate.php index 2246bcfc6..058333bec 100644 --- a/adm/shop_admin/itemuseformupdate.php +++ b/adm/shop_admin/itemuseformupdate.php @@ -34,6 +34,7 @@ if ($w == "u") is_reply_name = '".$member['mb_nick']."' where is_id = '".$posts['is_id']."'"; sql_query($sql); + run_event('shop_admin_item_use_updated', $posts['is_id']); if( isset($_POST['it_id']) ) { update_use_cnt($_POST['it_id']); diff --git a/adm/shop_admin/itemuselistupdate.php b/adm/shop_admin/itemuselistupdate.php index df911beee..e7155d0c4 100644 --- a/adm/shop_admin/itemuselistupdate.php +++ b/adm/shop_admin/itemuselistupdate.php @@ -40,6 +40,7 @@ for ($i=0; $i<$count_post_chk; $i++) { $sql = "delete from {$g5['g5_shop_item_use_table']} where is_id = '{$iis_id}' "; sql_query($sql); + run_event('shop_admin_item_use_deleted', $iis_id); } if($iit_id){ diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php index bb44f1e19..cb7522ed8 100644 --- a/shop/itemqaformupdate.php +++ b/shop/itemqaformupdate.php @@ -47,6 +47,8 @@ if ($w == "") iq_time = '".G5_TIME_YMDHIS."', iq_ip = '".$_SERVER['REMOTE_ADDR']."' "; sql_query($sql); + $iq_id = sql_insert_id(); + run_event('shop_item_qa_created', $iq_id, $it_id); $alert_msg = '상품문의가 등록 되었습니다.'; } @@ -68,6 +70,7 @@ else if ($w == "u") iq_question = '$iq_question' where iq_id = '$iq_id' "; sql_query($sql); + run_event('shop_item_qa_updated', $iq_id, $it_id); $alert_msg = '상품문의가 수정 되었습니다.'; } @@ -128,6 +131,7 @@ else if ($w == "d") $sql = " delete from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' and md5(concat(iq_id,iq_time,iq_ip)) = '{$hash}' "; sql_query($sql); + run_event('shop_item_qa_deleted', $iq_id, $it_id); $alert_msg = '상품문의가 삭제 되었습니다.'; } diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php index 997e1bbab..ddde3c70d 100644 --- a/shop/itemuseformupdate.php +++ b/shop/itemuseformupdate.php @@ -59,6 +59,8 @@ if ($w == "") if (!$default['de_item_use_use']) $sql .= ", is_confirm = '1' "; sql_query($sql); + $is_id = sql_insert_id(); + run_event('shop_item_use_created', $is_id, $it_id); if ($default['de_item_use_use']) { $alert_msg = "평가하신 글은 관리자가 확인한 후에 출력됩니다."; @@ -80,6 +82,7 @@ else if ($w == "u") is_score = '$is_score' where is_id = '$is_id' "; sql_query($sql); + run_event('shop_item_use_updated', $is_id, $it_id); $alert_msg = "사용후기가 수정 되었습니다."; } @@ -118,6 +121,7 @@ else if ($w == "d") $sql = " delete from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' "; sql_query($sql); + run_event('shop_item_use_deleted', $is_id, $it_id); $alert_msg = "사용후기를 삭제 하였습니다."; }