$img->set_width($pic_width); //決定縮圖大小,大圖大小 $img->set_savepath("../images/" . date("Y-m-d")); //設定儲存路徑 $pic2 = $img->save(); } else { $pic2 = $_POST['pic2']; } if ($check == 'upd') { $unit->table = $pro_class_table; $unit->get_vars(); $unit->pic = $pic; $unit->pic2 = $pic2; $buff = array(); $unit->get_history($unit->upid, $buff); $unit->upd(); $tool->show(get_msg("upd_success"), $_SERVER['HTTP_REFERER']); exit; } if (isset($_POST['del'])) { $id = $_POST['id']; for ($i = 0; $i < count($id); $i++) { del_child($id[$i]); } if (count($id) > 0) { $tool->show(get_msg("del_success"), $_SERVER['HTTP_REFERER']); } else { $tool->error(get_msg("del_fail")); } exit; }