퍼스트가든에서 사용하는 사용자 함수 및 관련파일 추가
This commit is contained in:
25
manager/adm/dashboard_update.php
Normal file
25
manager/adm/dashboard_update.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
if(!$_SESSION['user_id']) exit;
|
||||
include_once '_common.php';
|
||||
include_once 'lib/lib.php';
|
||||
|
||||
// 변수 선언
|
||||
$input = trim($_POST['input']); // 신청부서
|
||||
$date = date("Y-m-d H:i:s"); // 작업일시
|
||||
$memo = $vip_card_no.' 입고, 처리자 : '.$_SESSION['user_name']; // memo
|
||||
|
||||
// DB에 넣을 쿼리문 작성
|
||||
$query = "INSERT INTO {$fg['card_stock_table']} (status, input, memo, date)";
|
||||
$query .= "VALUES('입고', '{$input}', '{$memo}', '{$date}') ";
|
||||
$result = sql_query($query);
|
||||
|
||||
// log 기록
|
||||
$time = date("Y-m-d H:i:s");
|
||||
|
||||
$work_detail = "수량 : ".$input."EA, 처리자 : ".$_SESSION['user_name'];
|
||||
$logquery = "INSERT INTO {$fg['log_table']} (work, work_detail, id, date) VALUES ('입고', '{$work_detail}', '{$_SESSION['user_id']}', '{$time}')";
|
||||
$result = sql_query($logquery);
|
||||
|
||||
$data = array("isSuccess" => $result);
|
||||
header("Content-Type: application/json");
|
||||
echo json_encode($data);
|
||||
Reference in New Issue
Block a user