Files
firstgarden-web-gnu/manager/annual_member/annual_member_category.delete.php

28 lines
732 B
PHP

<?php
include_once '_common.php';
if(!$_SESSION['user_id']) exit;
// POST로 가져온 값 정리
$ca_id = trim($_POST['idx']);
$table = $fg['annual_category_table'];
// log 기록
// 그룹명 가져와서 담기
$query = "SELECT * FROM {$table} WHERE ca_id='{$ca_id}'";
$org_data = sql_fetch($query);
$time = date("Y-m-d H:i:s");
$work = "연간회원 구분 삭제";
$work_detail = "구분 : ".$org_data['name'].", 처리자 : ".$_SESSION['user_name'];
log_update($work, $work_detail, $_SESSION['user_id'], $time);
// 삭제실행
$query = "DELETE FROM {$table} WHERE ca_id='{$ca_id}'";
$result = sql_query($query);
$data = array("isSuccess" => $result);
header("Content-Type: application/json");
echo json_encode($data);