Example #1
0
});
</script>

</head>
<body>

<?php 
//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>";
    }
Example #2
0
    }
}
//-- Give first name from SectionList (timeline)  to empty section
if (empty($Section)) {
    $Section = $SectionList[0];
}
//-- Logic
if (!empty($InputUser)) {
    //Test the right name of sections or die
    if (!in_array($Section, $SectionList) and !empty($Section)) {
        echo "no such section";
        die;
    }
    //User Info Model
    $UserQuery = 'SELECT * FROM u186876_tvarts.users WHERE user_name = "' . $InputUser . '"';
    $result = $q->Query($UserQuery);
    //If there is no such User, kill the page
    if ($result->num_rows != 1) {
        die;
    } else {
        //Extract User variables
        while ($row = $result->fetch_assoc()) {
            $UserName = $row['user_name'];
            $UserEmail = $row['user_email'];
            $Role = $row['Role'];
            $Activity = $row['Activity'];
            $Added = $row['Added'];
            $Edit = $row['Edit'];
        }
    }
    //If we've got a User here, who looking on his own page