function editors_pick() { if ($_GET['add_editor_pick']) { $vid = mysql_clean($_GET['add_editor_pick']); add_to_editor_pick($vid); } if ($_GET['remove_editor_pick']) { $vid = mysql_clean($_GET['remove_editor_pick']); remove_vid_editors_pick($vid); } }
$userquery->admin_login_check(); $pages->page_redir(); if (!defined('MAIN_PAGE')) { define('MAIN_PAGE', 'Videos'); } if (!defined('SUB_PAGE')) { define('SUB_PAGE', "Editor's Pick"); } //Removing if (isset($_GET['remove'])) { $id = mysql_clean($_GET['remove']); remove_vid_editors_pick($id); } if (isset($_POST['delete_selected'])) { for ($id = 0; $id <= count($_POST['check_video']); $id++) { remove_vid_editors_pick($_POST['check_video'][$id]); } $eh->flush(); e("Selected videos have been removed from editors pick", "m"); } $ep_videos = get_ep_videos(); if (isset($_POST['update_order'])) { if (is_array($ep_videos)) { foreach ($ep_videos as $epvid) { $order = $_POST['ep_order_' . $epvid['pick_id']]; move_epick($epvid['videoid'], $order); } } $ep_videos = get_ep_videos(); } assign('videos', $ep_videos);