示例#1
0
<?php

require_once "../lib/core.php";
if (!isset($TvLab)) {
    $TvLab = new TvLab();
}
$q = new TvLabQuery();
// Inputs
//------------------------------------------------------------------------------------------
$Input = array("VideoId" => $_GET['VideoId'], "VideoHistory" => $_COOKIE["VideoHistory"]);
extract(SecureVars($Input), EXTR_OVERWRITE);
//--- Test VideoId
if (preg_match("/(\\d{4,20})/", $VideoId)) {
    //--- get Video Info Variables into globals
    $q->getVideo($VideoId, $isStack, "SetGlobals");
    //--- EditButton and ApproveButton
    $EditButton = '<a href="edit/?video=' . $VideoId . '" class="EditButton"></a>';
    $ApproveButton = '<a href="edit/?video=' . $VideoId . '" class="ApproveButton"></a>';
    if ($_SESSION['user_role'] == "0" or $_SESSION['user_name'] == $By_User) {
        echo $EditButton;
    }
    //--- Here comes output template
    include "../nodes/VideoInfoSection.php";
    //-- After all, set VideoHistory cookie ($_COOKIE["VideoHistory"]) of watched video
    if (!empty($VideoHistory)) {
        //if possibly need an images with ids, vars $Img, $Img_Small available
        $VideoHistoryArr = explode(",", $VideoHistory);
        if ($VideoHistoryArr[0] != $VideoId) {
            //add new $VideoId to array if id unique
            array_unshift($VideoHistoryArr, $VideoId);
            //Clear all grater than 5, witch is size of history buffer
示例#2
0
require_once '../nodes/autotags_add.php';
//теговая система
require_once '../lib/lang/rus.php';
//семантика блока
//GET Setup for Video parameters
GET_Setup_Video();
//Выдача в зависимости от юзера
if (RoleState() == 1 or RoleState() == 2) {
    $isStack = "_stack";
}
if (RoleState() == 0) {
    $isStack = "";
}
//if var $getVideo is ok, get video data from base to variable set
if (isset($getVideo)) {
    $q->getVideo($getVideo, $isStack, "SetGlobals");
}
//Предварительные переменные
$dateNow = date('Y-m-d H:i:s');
$errorCount = 0;
$errorInfo = "";
//Перевод данных массивов в строки
$getBroadcast_Type = implode(",", $getBroadcast_Type);
$getMotion_Type = implode(",", $getMotion_Type);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php