<?php session_start(); ob_start(); include "./common.php"; include "./lib/tasks.php"; $error = ''; Admin::checkAuth(); Admin::checkAccess(AdminAccess::ACCESS_VIEW); if (@$_GET['id']) { Admin::checkAccess(AdminAccess::ACCESS_EDIT); $task_id = (int) $_GET['id']; $task = Mysql::getInstance()->from('moderator_tasks')->where(array('id' => $task_id))->get()->first(); if (!empty($task) && $task['ended'] == 0) { Mysql::getInstance()->update('moderator_tasks', array('ended' => 1, 'rejected' => 1, 'end_time' => 'NOW()'), array('id' => $task_id)); Video::log($task['media_id'], '<a href="msgs.php?task=' . $task_id . '">' . _('task rejected') . '</a>'); } if (@$_GET['send_to']) { header("Location: send_to.php?id=" . $_GET['send_to']); } else { header("Location: tasks.php"); } exit; }
} else { Mysql::getInstance()->update('video_on_tasks', $data, array('video_id' => $video_id)); } } else { if ($_GET['accessed'] == 1) { Video::switchOnById($video_id); } else { Video::switchOffById($video_id); } } header("Location: add_video.php?letter=" . @$_GET['letter'] . "&search=" . @urldecode($_GET['search']) . "&page=" . @$_GET['page']); exit; } if (@$_GET['del']) { Admin::checkAccess(AdminAccess::ACCESS_DELETE); Video::log(intval(@$_GET['id']), _('video deleted')); Mysql::getInstance()->delete('video', array('id' => intval(@$_GET['id']))); header("Location: add_video.php?letter=" . @$_GET['letter'] . "&search=" . @$_GET['search'] . "&page=" . @$_GET['page']); exit; } if (count(@$_POST) > 0) { if (Admin::isEditAllowed() || Admin::isCreateAllowed()) { if (isset($_FILES['screenshot'])) { if (is_uploaded_file($_FILES['screenshot']['tmp_name'])) { if (preg_match("/jpeg/", $_FILES['screenshot']['type'])) { $upload_id = Mysql::getInstance()->insert('screenshots', array('name' => $_FILES['screenshot']['name'], 'size' => $_FILES['screenshot']['size'], 'type' => $_FILES['screenshot']['type']))->insert_id(); if (empty($_SESSION['upload'])) { $_SESSION['upload'] = array(); } $_SESSION['upload'][] = $upload_id; $img_path = get_save_folder($upload_id);
<?php session_start(); ob_start(); include "./common.php"; include "./lib/tasks.php"; $error = ''; Admin::checkAuth(); Admin::checkAccess(AdminAccess::ACCESS_VIEW); if (count($_POST) > 0) { Admin::checkAccess(AdminAccess::ACCESS_CREATE); $task_id = Mysql::getInstance()->insert('moderator_tasks', array('to_usr' => $_POST['to_usr'], 'media_type' => 2, 'media_id' => $_POST['id'], 'start_time' => 'NOW()'))->insert_id(); Mysql::getInstance()->insert('moderators_history', array('task_id' => $task_id, 'from_usr' => $_SESSION['uid'], 'to_usr' => $_POST['to_usr'], 'comment' => $_POST['comment'], 'send_time' => 'NOW()')); Video::log((int) $_POST['id'], '<a href="msgs.php?task=' . $task_id . '">' . _('task open') . '</a>', (int) $_POST['to_usr']); if ($task_id) { js_redirect('add_video.php', _('the task has been sent')); } else { echo 'error'; } exit; } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> body { font-family: Arial, Helvetica, sans-serif; font-weight: bold; }