Your IP : 216.73.217.87


Current Path : /hdd/hdd11/www/vlevski/enter/vid/
Upload File :
Current File : /hdd/hdd11/www/vlevski/enter/vid/index.php

<?php
	session_start();
	header("Cache-Control: no-cache, must-revalidate");
	header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
	date_default_timezone_set("Europe/Sofia");
	$allowaccess="no";
	if (isset($_COOKIE["allowaccess"]))
	{
		$allowaccess=$_COOKIE["allowaccess"];
	}
	if ($allowaccess=="no")
	{
		header("location: /");
	}
?><!DOCTYPE HTML>
<html lang="bg">
	<head>
		<meta charset="utf-8" />
		<title>Видеопортал</title>
		<link rel="shortcut icon" type="image/png" href="/assets/images/site/enter.png" />
		<link rel="shortcut icon" type="image/png" href="https://enter.vlevski.eu/assets/images/site/enter.png" />
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
		<link rel="stylesheet" href="/assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="/assets/css/datepicker.css" />
		<script src="/assets/js/jquery.min.js"></script>
		<script src="/assets/js/popper.min.js"></script>
		<script src="/assets/js/bootstrap.min.js"></script>
		<script src="/assets/js/bootstrap-datepicker.js"></script>
		<script src="/assets/fa/js/all.min.js" defer></script>
		<style>
			html, body
			{
				margin: 0;
				padding: 0;
				background-color: #112233;
				font-family: Calibri, sans-serif;
			}
			div
			{
				color: #DDDDDD;
			}
			a.dropdown-item
			{
				color: #DDDDDD!important;
			}
			a.dropdown-item:hover
			{
				color: #FFFFFF!important;
				background-color: transparent!important;
			}
			.dropdown .dropdown-menu
			{
				-webkit-transition: all 0.5s;
				-moz-transition: all 0.5s;
				-ms-transition: all 0.5s;
				-o-transition: all 0.5s;
				transition: all 0.5s;
				max-height: 0;
				display: block;
				overflow: hidden;
				opacity: 0;
			}
			.dropdown.show .dropdown-menu
			{
				max-height: 300px;
				opacity: 1;
			}
		</style>
		<script>
			<?php
				$ua=strtolower($_SERVER["HTTP_USER_AGENT"]);
				if (stripos($ua, "android") !== false)
				{
					print("alert('".$_SERVER["HTTP_USER_AGENT"]."');");
				}
			?>
			if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
			{
				window.location="microsoft-edge:"+window.location;
				setTimeout(function() { window.location="https://go.microsoft.com/fwlink/?linkid=2135547"; }, 1);
			}
			function plv(id, name)
			{
				if (history.pushState)
				{
					namef=name.split(" ").join("-");
					window.history.pushState({}, "Видеопортал", "#гледате-"+namef+"");
				}
				ct=Math.floor(Date.now()/1000);
				$("#vp").attr("src", "./v.php?id="+id+"&ct="+ct);
				p=document.getElementById("vp");
				p.load();
			}
			function plvp(id, name)
			{
				$("#mwv").modal("show");
				$("#mwvt").html(name);
				w=window.innerWidth;
				if (w>720)
				{
					$("#mwvb").html("<video id=\"vp\" type=\"video/mp4\" style=\"position: relative; width: 640px; height: 360px; border: none; overflow: hidden;\" controls tabindex=\"0\" disablePictureInPicture controlsList=\"nodownload\" poster=\"/vid/images/"+id+".jpg\"></video>");
					$("#vp").bind("contextmenu", function() { return false; });
				}
				else
				{
					$("#mwvb").html("<video id=\"vp\" type=\"video/mp4\" style=\"position: relative; width: 320px; height: 180px; border: none; overflow: hidden;\" controls tabindex=\"0\" disablePictureInPicture controlsList=\"nodownload\" poster=\"/vid/images/"+id+".jpg\"></video>");
					$("#vp").bind("contextmenu", function() { return false; });
				}
				$.ajax({url: "./video.php", type: "POST", data:{"allow": "yes"}, success: function(data) { if (data=="OK") { setTimeout(function() { plv(id, name); }, 300); } } });
			}
			function vcl()
			{
				if (history.pushState)
				{
					window.history.pushState({}, "Видеопортал", "./");
				}
				$("#vp").remove();
				$("#mwvb").html("");
				$.ajax({url: "./video.php", type: "POST", data:{"allow": "no"}, success: function(data) { if (data=="OK") { } } });
			}
			function mdta(dt)
			{
				$("#mw").modal("show");
				nfo=dt.split("|");
				$("#mwt").html(nfo[0]);
				$("#mwb").html(nfo[1]);
			}
		</script>
	</head>
	<body>
		<?php
			if ($_SESSION["stts"]=="s")
			{
				include("../menus.php");
			}
			else
			{
				include("../menuv.php");
			}
		?>
		<div class="modal fade" id="mwv" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mwv" aria-hidden="true">
			<div class="modal-dialog modal-lg" style="width: 95%;">
				<div class="modal-content">
					<div class="modal-header">
						<h5 class="modal-title" id="mwvt" style="color: #000000;">
						</h5>
						<button type="button" class="close" onclick="vcl(); return true;" data-dismiss="modal" aria-label="Затвори">
							<span aria-hidden="true">&times;</span>
						</button>
					</div>
					<div id="mwvb" class="modal-body" style="color: #000000; text-align: center;">
					</div>
				</div>
			</div>
		</div>
		<div class="container-fluid" style="margin-top: 75px;">
			<div class="row">
				<div class="col-12" style="margin-bottom: 20px; font-size: 25px; font-weight: bold; color: #DDDDDD;">
					<i class="fas fa-photo-video"></i> Видеопортал
				</div>
			</div>
			<div class="row">
				<?php
					include("../conn.php");
					$vdbq=mysqli_query($db, "SELECT * FROM `videos` ORDER BY `movname` ASC;");
					while ($vres=mysqli_fetch_row($vdbq))
					{						
						print("<div class=\"col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4\" style=\"margin-bottom: 20px;\">");
						print("<div style=\"position: relative; margin: 0px auto; padding: 0px; width: 322px; max-width: 322px; min-width: 322px; border: 1px dashed #CCCCCC; border-radius: 0px 15px 0px 15px;\">");
						print("<div style=\"position: relative; top: 0px; left: 0px; width: 320px; height: 180px; border-radius: 0px 15px 0px 0px; overflow: hidden; background-size: 320px 180px; background-image: url('/vid/images/".$vres[1].".jpg'); background-repeat: no-repeat; background-position: top left;\">");
						print("&nbsp;</div>");
						print("<div style=\"position: absolute; top: 175px; left: 0px; width: 320px; height: 25px; overflow: hidden; border-radius: 10px 0px 0px 0px; background-color: #999900; z-index: 2;\">");
						print("<div style=\"position: absolute; top: 2px; left: 2px; width: 316px; height: 21px; overflow: hidden; background-color: #333333;  border-radius: 10px 0px 0px 0px; z-index: 3;\"></div>");
						print("</div>");
						print("<div style=\"position: absolute; top: 172px; left: 0px; width: 315px; height: 25px; text-align: right; font-size: 20px; font-weight: bold; color: #DDDDDD; overflow: hidden; background-color: transparent; z-index: 4;\">");
						print("".$vres[6]."");
						print("</div>");
						print("<a href=\"javascript:void(0);\" onclick=\"plvp('".$vres[1]."', '".$vres[2]."');\" class=\"btn btn-primary\" style=\"position: absolute; top: 153px; left: 10px; width: 155px; height: 40px; z-index: 5;\"><i class=\"fas fa-photo-video\"></i>&nbsp;&nbsp;Гледай&nbsp;&nbsp;<i class=\"fas fa-expand-alt\"></i></a>");
						print("<div style=\"position: relative; top: 25px; left: 5px; width: 310px; height: 45px; line-height: 21px; font-size: 22px; font-weight: bold; text-align: right;\">");
						print("".$vres[2]."<br />".$vres[3]."");
						print("</div>");
						print("<div style=\"position: relative; top: 25px; left: 5px; width: 310px; max-height: 125px; height: 125px; overflow: hidden; line-height: 19px; font-size: 15px; font-weight: bold; font-style: italic; text-align: justify; text-indent: 10px; color: #BBBB00;\">");
						print("".$vres[4]."");
						print("</div>");
						//print("<a id=\"mwb-".$vres[1]."\" href=\"javascript:void(0);\" onclick=\"mdta('Снежната кралица|'); return true;\" class=\"btn btn-dark\" style=\"width: 150px; margin-left: 165px; margin-top: 20px; margin-bottom: 5px;\"><i class=\"fas fa-info-circle\"></i> Информация</a>");
						print("</div>");
						print("</div>");
					}
				?>
			</div>
		</div>
		<script>
			$(document).ready(function()
			{
				$("#vp").bind("contextmenu", function() { return false; });
			});
		</script>
	</body>
</html>