Beispiel #1
0
//echo "<div class='debug'>";  $TvLab->DebugCookie(1);  echo "</div>";
if ($ps == "(0)setDefault") {
    include "view_intro.php";
}
if ($ps == "(1)setCode") {
    if (isset($AuthUser)) {
        $TestIdQuery = "SELECT * FROM u186876_tvarts.contents WHERE OutId = " . $Vimeo_Id . " AND State = 1";
        //Проверка наличия дубликата видео в базе по OuId
        $result = $q->Query($TestIdQuery);
        if ($result->num_rows > 0) {
            $isVideoExist = 1;
            // Set flag, that define isVideoExist
            include "view_intro.php";
            // If video exist check inside this chunk,
        } else {
            $q->getVideoFromVimeo($Vimeo_Id);
            // Otherwise run Vimeo API connection
            include 'view_input.php';
        }
    } else {
        echo "<div style='text-align: center; margin: 50px auto 0; width: 400px;'>You need to log in to post this video<br />";
        include "../nodes/not_logged_in.php";
        echo "</div>";
    }
}
if ($ps == "(2)setVideo") {
    if (!isset($AuthUser)) {
        die;
    }
    $q->getVideoFromVimeo($getVideo);
    // Run Vimeo API connection with "video" from GET parameter