if ($id) { PtpVideoDB::delVideo($id); } else { $delete_id = $_POST['delete_id']; foreach ($delete_id as $id) { PtpVideoDB::delVideo($id); } } header("Location: {$return_url}"); exit; } else { if (!$action && $id) { //select //URL : /wp-admin/admin.php?page=ptp-video-category&file=category_op.php&id=2 $title = "更新"; $data = PtpVideoDB::getVideoRow($id); } else { if (isset($_POST['act_sort'])) { $sorts = $_POST['sort']; foreach ($sorts as $id => $sort) { $data = array('sort' => $sort); PtpVideoDB::saveVideo($data, $id); } header("Location: {$return_url}"); exit; } } } } ?> <table width="100%" cellspacing="0" cellpadding="0" border="0">