This commit is contained in:
wuhao 2020-12-11 20:08:31 +08:00
parent 84dc9cc3b2
commit 9a3fca1622

View File

@ -42,11 +42,14 @@ else if($act=='del'){
$sql = "select * from calendar where id='{$cardId}'"; $sql = "select * from calendar where id='{$cardId}'";
$rs = DB::getOne($sql); $rs = DB::getOne($sql);
$oldFujian = json_decode($rs['fujian'], true); $oldFujian = json_decode($rs['fujian'], true);
$file = '.'.$oldFujian[$fujianId]['file'];
unset($oldFujian[$fujianId]); unset($oldFujian[$fujianId]);
$dict = array(); $dict = array();
$dict['fujian'] = json_encode($oldFujian, true); $dict['fujian'] = json_encode($oldFujian, true);
$sql = DB::update('calendar', $dict, "id='{$cardId}'"); $sql = DB::update('calendar', $dict, "id='{$cardId}'");
DB::exe($sql); DB::exe($sql);
if(file_exists($file))
unlink($file);
we(1); we(1);
} }