} else { print_successful_notice("成功删除图书", 'library-manage.php?status=OK&Stype=all-del'); } library_category_up_all(); break; case 'all-succ-edit': $all_succ_edit = new library_book_all_edit(); $all_succ_edit->get_post_arr($_POST); $all_succ_edit->edit(); if (count($all_succ_edit->err) == 0) { print_successful_notice("成功更新选定图书", 'library-manage.php?status=OK&Stype=all-edit'); } else { $err = array(); foreach ($all_succ_edit->status as $n => $v) { array_push($err, 'ID ' . $n . ' 编辑 ' . $v); } foreach ($all_succ_edit->err as $n => $v) { array_push($err, 'ID :' . $n . ' 编辑错误'); foreach ($v as $v2) { array_push($err, $v2); } } print_err_arr_notice("编辑出现错误", $err); } library_category_up_all(); break; default: print_err_notice('未知操作'); } } get_admin_footer();
function other_action() { global $mysql; if (!$mysql->delete("library_history", '`user`' . $this->where_id)) { return '历史图书删除失败'; } if (!$mysql->delete("library_book", '`stuName`' . $this->where_id)) { return '用户所有的图书删除失败'; } if (!$mysql->up_sql_arr("library_book", array('nowBorrow' => 0), '`nowBorrow`' . $this->where_id)) { return '归还用户图书失败'; } if (!$mysql->up_sql_arr("group", array('lader' => 0), '`lader`' . $this->where_id)) { return '用户分组信息改变失败'; } library_category_up_all(); return 'OK'; }