当前位置: 首页>>代码示例>>PHP>>正文


PHP Video::log方法代码示例

本文整理汇总了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;
}
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:24,代码来源:reject_task.php

示例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);
开发者ID:saydulk,项目名称:stalker_portal,代码行数:31,代码来源:add_video.php

示例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;
}
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:send_to.php


注:本文中的Video::log方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。