本文整理汇总了PHP中Video::log方法的典型用法代码示例。如果您正苦于以下问题:PHP Video::log方法的具体用法?PHP Video::log怎么用?PHP Video::log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::log方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_start
<?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;
}
示例2: array
} 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);
示例3: session_start
<?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;
}