관리자 페이지 및 일부 데이터 업데이트 시 Event hook 추가

This commit is contained in:
kkigomi
2023-06-22 15:37:06 +09:00
parent 4eba618a82
commit bbbc568db8
15 changed files with 44 additions and 1 deletions

View File

@ -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 = '상품문의가 삭제 되었습니다.';
}

View File

@ -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 = "사용후기를 삭제 하였습니다.";
}