<?php

header("Cache-Control: no-store");
require_once "../lib/core.php";
$TvLab = new TvLab();
$q = new TvLabQuery();
/* All GET URL params of index.php transfer here from $HttpQuery = http_build_query($_GET, '', '&'); */
/*---------------- Inputs */
$Input = array("getSet" => $_GET['set'], "Mode" => $_GET['md'], "Tags" => $_GET['tags'], "Page" => $_GET['page'], "Video" => $_GET['video']);
extract(SecureVars($Input), EXTR_OVERWRITE);
$q->getCollection($getSet, $Mode, $Tags, $Page, 3, $Video);
// If Collection is ok, assemble Json respond
if ($Collection->num_rows > 0) {
    include "wtfll-json-tpl.php";
    //json output template
}
// debug url showcase/wtfll-controller.php?tags=test
// echo $specificQuery;
示例#2
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
示例#3
0
<?php

header("Cache-Control: no-store");
require_once "../lib/core.php";
$TvLab = new TvLab();
$q = new TvLabQuery();
if (!$q->setAuthUser()) {
    unset($AuthUser);
    die;
}
// require_once '../config/config.php'; //подключаем конфиг бд
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;
<?php

header("Cache-Control: no-store");
require_once "../lib/core.php";
$TvLab = new TvLab();
$q = new TvLabQuery();
/*Все параметры, передаваемые в GET URL скрипту index.php перенаправляются сюда через $HttpQuery = http_build_query($_GET, '', '&'); */
/*----------------Обработка входных данных */
$Input = array("Page" => $_GET['page'], "User" => $_GET['user'], "Section" => $_GET['section']);
extract(SecureVars($Input), EXTR_OVERWRITE);
$SectionList = array("timeline", "approved", "stacked", "review");
//Give first name from SectionList (timeline)  to empty section
if (empty($Section)) {
    $Section = $SectionList[0];
}
//Test for right section or die
if (!in_array($Section, $SectionList)) {
    echo "no section";
    die;
}
// 3 or 10 per page depend on section
if ($Section == $SectionList[0]) {
    $inPage = 8;
} else {
    $inPage = 10;
}
$q->getBoardContent($Section, $inPage, $User);
// Debug
// http://www.televisionlab.ru/board/wtfll-controller.php?user=JustViktor
$Tmp = $TotalRows;
unset($TotalRows);
示例#5
0
<?php

require_once "../lib/core.php";
$TvLab = new TvLab();
$q = new TvLabQuery();
require_once "../lib/password_compatibility_library.php";
require_once "../lib/login.php";
// классы ситемы login
$login = new Login();
require_once '../lib/vimeo/vimeo.php';
//классы для работы с vimeo API
require_once '../nodes/autotags_add.php';
//теговая система
require_once '../lib/lang/rus.php';
//семантика блока
$Input = array("getTitle" => $_POST['title'], "getAuthors" => $_POST['authors'], "getLocation" => $_POST['location'], "getYear" => $_POST['year'], "getBrand" => $_POST['brand'], "getTv_Channel" => $_POST['tv'], "getMotion_Type" => $_POST['motion'], "getBroadcast_Type" => $_POST['broadcast'], "getTempo" => $_POST['tempo'], "getRating" => $_POST['rating'], "getCost" => $_POST['cost'], "getTags_SA" => $_POST['sa'], "getTags_Fashion" => $_POST['fashion'], "getTags_Arts" => $_POST['arts'], "getTags_Music" => $_POST['music'], "getTags_Others" => $_POST['tags'], "getBy_User" => $_POST['by_user'], "getVideo" => $_POST['video'], "getToken" => $_POST['_token']);
extract(SecureVars($Input), EXTR_OVERWRITE);
if (!$q->setAuthUser()) {
    unset($AuthUser);
}
// set-unset $AuthUser
$Role = RoleState();
if ($Role == 1 or $Role == 2) {
    $isStack = "_stack";
}
if ($Role == 0) {
    $isStack = "";
}
//Предварительные переменные
$dateNow = date('Y-m-d H:i:s');
$errorCount = 0;
示例#6
0
<?php

header("Cache-Control: no-store");
require_once "../lib/core.php";
$TvLab = new TvLab();
$q = new TvLabQuery();
//-- TODO: ROAD MAP
// 1. Timeline design feed
// 2. Timeline click action inside div block
// 3. Approved play in pop up screen on click
// 4. Approved design inside pop up screen
// 5. Stacked -> go to edit on click
// 6. Come Back from Edit Section
// 7. Review Separate feed by Name of User, remove all info from video icons, -> go to edit on click
// 8. Review Change "Save" button to "Approve" in Review-Edit section.
// 9. Private Massage Section
//-- User Board Inputs
//------------------------------------------------------------------------------------------
$Input = array("InputUser" => $_GET["user"], "Section" => $_GET["section"]);
extract(SecureVars($Input), EXTR_OVERWRITE);
if (isset($_SESSION['user_name'])) {
    $AuthUser = $_SESSION['user_name'];
}
$SectionList = array("timeline", "approved", "stacked", "review");
//-- Output review Section only for Auth User
if (!isset($AuthUser)) {
    if (($SLkey = array_search('review', $SectionList)) !== false) {
        unset($SectionList[$SLkey]);
    }
}
//-- Give first name from SectionList (timeline)  to empty section