Exemple #1
0
                }
            }
            break;
        case 'library':
            library_option();
            //加载图书管理设置
            $up_option = new library_option_up();
            $status = $up_option->get_post($_POST);
            if ($status != 'OK') {
                print_err_notice($status);
            } else {
                $status = $up_option->check();
                if ($up_option->status == FALSE) {
                    print_err_arr_notice("数据检查出错", $status);
                } else {
                    $status = $up_option->up();
                    if (count($status) != 0) {
                        print_err_arr_notice("数据更新出错", $status);
                    } else {
                        print_successful_notice("成功更新设置信息", "library-option.php?status=OK");
                    }
                }
            }
            break;
        default:
            print_err_notice("未知操作");
    }
} else {
    print_err_notice("错误的请求");
}
get_admin_footer();
Exemple #2
0
            } 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();
                library_category_up_all();
                break;
            case 'all-succ-del':
                $all_succ_del = new library_category_del();
                $all_succ_del->get_post_arr($_POST);
                $status = $all_succ_del->add_all();
                if (!empty($status)) {
                    print_err_arr_notice('出现参数错误', $status);
                } else {
                    $status = $all_succ_del->del();
                    $err_arr = array();
                    foreach ($status as $v) {
                        $err_arr += $v;
                    }
                    if (count($err_arr) > 0) {
                        print_err_arr_notice('操作错误', $err_arr);
                    } else {
                        print_successful_notice("成功删除分类", 'library-category.php?status=OK');
                    }
                }
                library_category_up_all();
                break;
            default:
                print_err_notice('POST操作未知', '');
        }
    } else {
        print_err_notice('未知操作', 'library-category.php');
    }
}
?>
</div>