27 lines
868 B
PHP
27 lines
868 B
PHP
<?php
|
|
include_once ('./_common.php');
|
|
if(!$_SESSION['user_id']) exit;
|
|
|
|
if ( isset($_POST['idx']) ) ) {
|
|
$idx = trim($_POST['idx']);
|
|
|
|
// log 기록을 위한 데이터 불러와서 변수 저장하기
|
|
$query = "SELECT * FROM {$fg['log_table']} WHERE idx='{$idx}'";
|
|
$log = sql_fetch($query);
|
|
// 삭제실행
|
|
$query = "DELETE FROM {$fg['member_table']} WHERE idx='{$idx}'";
|
|
$result = sql_query($query);
|
|
|
|
if (isset($result) && $result) {
|
|
|
|
$time = date("Y-m-d H:i:s");
|
|
$work_detail = "ID : ".$log['user_id'].", 처리자 : ".$_SESSION['user_name'];
|
|
$work = "사용자삭제";
|
|
log_update($work, $work_detail, $_SESSION['user_id'], $time);
|
|
// log 기록 끝
|
|
|
|
$data = array("isSuccess" => $result);
|
|
header("Content-Type: application/json");
|
|
echo json_encode($data);
|
|
}
|
|
} |