Your IP : 216.73.217.87


Current Path : /hdd/hdd11/www/vlevski/e/
Upload File :
Current File : /hdd/hdd11/www/vlevski/e/lookup.php

<?php
	if ($emb!="OK")
	{
		header("location: https://e.vlevski.eu/");
	}
	if (isset($_GET["k"]))
	{
		$k=$_GET["k"];
	}
	else
	{
		$k="";
	}
	if (isset($_GET["sub"]))
	{
		$sub=$_GET["sub"];
	}
	else
	{
		$sub="cat";
	}
	if (isset($_GET["p"]))
	{
		$p=$_GET["p"];
	}
	else
	{
		$p="";
	}
	if (isset($_GET["o"]))
	{
		$o=$_GET["o"];
	}
	else
	{
		$o="";
	}
?>
<div style="margin-top: 55px;" class="container-fluid">
	<div class="row">
		<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12" style="margin-bottom: 10px;">
			<?php
				if ($sub=="cat")
				{
					print("<h3 class=\"main-header\"><i class=\"far fa-eye\"></i>&nbsp;Методически обединения</h3>");
				}
				else
				{
					if ($k!="")
					{
						print("<h3 class=\"main-header\"><i class=\"far fa-eye\"></i>&nbsp;<a href=\"/?lookup\" style=\"color: #3333CC;\">НАЧАЛО</a>» &quot;<a href=\"/?lookup&sub=".$sub."\" style=\"color: #3333CC;\">".$sub."</a>&quot; » материали за ".$k.". клас</h3>");
					}
					else if ($p!="")
					{
						print("<h3 class=\"main-header\"><i class=\"far fa-eye\"></i>&nbsp;<a href=\"/?lookup\" style=\"color: #3333CC;\">НАЧАЛО</a>» &quot;<a href=\"/?lookup&sub=".$sub."\" style=\"color: #3333CC;\">".$sub."</a>&quot; » материали от ".$p."</h3>");
					}
					else
					{
						print("<h3 class=\"main-header\"><i class=\"far fa-eye\"></i>&nbsp;<a href=\"/?lookup\" style=\"color: #3333CC;\">НАЧАЛО</a>» &quot;".$sub."&quot;</h3>");
					}
				}
			?>
		</div>
	</div>
	<div class="row">
		<?php
			if ($sub=="cat")
			{
				$catq=mysqli_query($db, "SELECT * FROM `subjects` ORDER BY `i` ASC;");
				while ($cats=mysqli_fetch_row($catq))
				{
					$ct="".$cats[1]."";
					$ct=str_replace("МО - ", "", $ct);
					print("<div class=\"col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4\" style=\"margin-bottom: 25px;\">");
					print("<div onclick=\"window.open('/?lookup&sub=".$cats[1]."', '_self'); return true;\" style=\"cursor: pointer; margin: 0px auto; padding: 0px; width: 322px; max-width: 322px; min-width: 322px; border: 1px solid #555555; 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('/up/subjects/".$cats[2].".png'); background-repeat: no-repeat; background-position: top left;\">");
					print("</div>");
					print("<div style=\"position: relative; top: 0px; left: 5px; width: 310px; height: 25px; overflow: hidden; font-size: 20px; font-weight: bold; color: #3333CC; text-align: right;\">");
					print("".$ct."");
					print("</div>");
					print("<div style=\"position: relative; top: 0px; left: 5px; width: 310px; font-size: 15px; font-weight: bold; font-style: italic; color: #555555; text-align: justify; text-indent: 10px;\">");
					if ($ct=="Педагогически практики")
					{
						print("Материали от открити уроци");
					}
					else
					{
						print("Материали от обединението");
					}
					print("</div>");
					print("</div>");
					print("</div>");
				}
			}
			else
			{
				if ($k!="")
				{
					if ($o=="k")
					{
						$catq=mysqli_query($db, "SELECT * FROM `files` WHERE `ctgry`='".$sub."' AND `k`='".$k."' ORDER BY `k` ASC, `pup` ASC, `fname` ASC;");
					}
					else
					{
						$catq=mysqli_query($db, "SELECT * FROM `files` WHERE `ctgry`='".$sub."' AND `k`='".$k."' ORDER BY `pup` ASC, `fname` ASC;");
					}
				}
				else if ($p!="")
				{
					if ($o=="k")
					{
						$catq=mysqli_query($db, "SELECT * FROM `files` WHERE `ctgry`='".$sub."' AND `pup`='".$p."' ORDER BY `k` ASC, `pup` ASC, `fname` ASC;");
					}
					else
					{
						$catq=mysqli_query($db, "SELECT * FROM `files` WHERE `ctgry`='".$sub."' AND `pup`='".$p."' ORDER BY `pup` ASC, `fname` ASC;");
					}
				}
				else
				{
					if ($o=="k")
					{
						$catq=mysqli_query($db, "SELECT * FROM `files` WHERE `ctgry`='".$sub."' ORDER BY `k` ASC, `pup` ASC, `fname` ASC;");
					}
					else
					{
						$catq=mysqli_query($db, "SELECT * FROM `files` WHERE `ctgry`='".$sub."' ORDER BY `pup` ASC, `fname` ASC;");
					}
				}
				while ($cats=mysqli_fetch_row($catq))
				{
					print("<div class=\"col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4\" style=\"margin-bottom: 20px;\">");
					print("<div style=\"margin: 0px auto; padding: 0px; width: 322px; max-width: 322px; min-width: 322px; border: 1px solid #555555; border-radius: 0px 15px 0px 15px;\">");
					$ex=$cats[5];
					$rn=str_replace(".".$ex."", "", $cats[4]);
					if (($ex=="doc") || ($ex=="docx") || ($ex=="rtf") || ($ex=="xls") || ($ex=="xlsx") || ($ex=="ppt") || ($ex=="pptx") || ($ex=="pps") || ($ex=="ppsx") || ($ex=="pdf"))
					{
						print("<div style=\"position: relative; top: 0px; left: 0px; width: 320px; height: 180px; border-radius: 0px 15px 0px 0px; text-align: center; background-size: cover; background-position: center center; background-image:url('/up/thumbs/".$rn.".png'); overflow: hidden;\">");
					}
					else
					{
						print("<div style=\"position: relative; top: 0px; left: 0px; width: 320px; height: 180px; border-radius: 0px 15px 0px 0px; text-align: center; overflow: hidden;\">");
					}
					if (($ex=="doc") || ($ex=="docx") || ($ex=="rtf"))
					{
						print("<i style=\"font-size: 120px; margin-top: 30px; color: #000099; opacity: 0.8;\" class=\"fas fa-file-word\"></i>");
					}
					else if (($ex=="xls") || ($ex=="xlsx"))
					{
						print("<i style=\"font-size: 120px; margin-top: 30px; color: #009900; opacity: 0.8;\" class=\"fas fa-file-excel\"></i>");
					}
					else if (($ex=="ppt") || ($ex=="pptx") || ($ex=="pps") || ($ex=="ppsx"))
					{
						print("<i style=\"font-size: 120px; margin-top: 30px; color: #990000; opacity: 0.8;\" class=\"fas fa-file-powerpoint\"></i>");
					}
					else if (($ex=="mp3") || ($ex=="ac3") || ($ex=="wav") || ($ex=="aac") || ($ex=="wma"))
					{
						print("<i style=\"font-size: 120px; margin-top: 30px;\" class=\"fas fa-file-audio\"></i>");
					}
					else if (($ex=="avi") || ($ex=="mp4") || ($ex=="mkv") || ($ex=="mpg") || ($ex=="wmv"))
					{
						print("<i style=\"font-size: 120px; margin-top: 30px;\" class=\"fas fa-file-video\"></i>");
					}
					else if ($ex=="pdf")
					{
						print("<i style=\"font-size: 120px; color: #990000; opacity: 0.8; margin-top: 30px;\" class=\"fas fa-file-pdf\"></i>");
					}
					else if ($ex=="txt")
					{
						print("<i style=\"font-size: 120px; margin-top: 30px;\" class=\"fas fa-file-alt\"></i>");
					}
					else
					{
						print("<i style=\"font-size: 120px; margin-top: 30px;\" class=\"fas fa-file\"></i>");
					}
					print("</div>");
					print("<div style=\"position: relative; top: 0px; left: 5px; width: 310px; height: 25px; font-size: 20px; font-weight: bold; color: #555555; text-align: right; overflow: hidden;\">");
					print("".$cats[3]."");
					print("</div>");
					print("<div style=\"position: relative; top: 0px; left: 5px; width: 310px; font-size: 15px; font-weight: bold; font-style: italic; color: #555555; text-align: left; text-indent: 0px;\">");
					if ($cats[7]=="99")
					{
						print("Педагогическа практика<br />");
						print("Автор: <a href=\"/?lookup&sub=".$sub."&p=".$cats[2]."\">".$cats[2]."</a>");
					}
					else
					{
						print("За <a href=\"/?lookup&sub=".$sub."&k=".$cats[7]."\">".$cats[7]."</a>.<a href=\"/?lookup&sub=".$sub."&k=".$k."&p=".$p."&o=k\">клас</a><br />");
						print("Автор: <a href=\"/?lookup&sub=".$sub."&p=".$cats[2]."\">".$cats[2]."</a>");
					}
					print("<a href=\"/download.php?id=".$cats[8]."\" download=\"\" class=\"btn btn-success\" style=\"width: 150px; margin-left: 165px; margin-top: 5px; margin-bottom: 5px;\"><i class=\"fas fa-file-download\"></i> Свали</a>");
					print("</div></div></div>");
				}
			}
		?>
	</div>
</div>