Your IP : 216.73.217.87


Current Path : /hdd/hdd11/www/vlevski/enter/ps/
Upload File :
Current File : /hdd/hdd11/www/vlevski/enter/ps/presents.php

<?php
	header("Cache-Control: no-cache, must-revalidate");
	header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
	date_default_timezone_set("Europe/Sofia");
?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
			<title>
				Система за гласуване на педагогически съвет в СУ &quot;Васил Левски&quot; - Троян
			</title>
			<link rel="stylesheet" href="./jquery-ui.css">
			<script src="./jquery-3.1.1.min.js"></script>
			<script src="./jquery-ui.js"></script>
			<script src="./jquery.tablesorter.min.js"></script>
			<script>
				$(function()
				{
					$("table").tablesorter();
				});
			</script>
			<style>
				table, tr, td
				{
					margin: 0px;
					padding: 0px;
					border: 1px solid black;
				}
				th
				{
					margin: 0px;
					padding: 0px;
					border: 1px solid black;
					background-color: #000000;
					color: #FFFFFF;
					cursor: pointer;
				}
				a, a:active, a:hover, a:visited
				{
					color: #000000;
				}
				@media print
				{
					.np
					{
						page-break-after: always;
					}
				}
			</style>
	</head>
	<body style="font-family: Verdana; font-size: 10pt;">
		<center>
		<h1>
			Присъствен лист за педагогически съвет,
			<br />проведен на 10.03.2021 г.
		</h1>
		<?php
			include("./conn.php");
			$i=1;
			print("<table id=\"large\" class=\"tablesorter\" style=\"width: 800px;\">");
			print("<thead><tr><th style=\"width: 100px;\"><b>N</b></th><th style=\"width: 550px;\"><b>Три имена</b></th><th style=\"width: 150px;\"><b>Присъствие</b></th></tr></thead><tbody>");
			$cardsint=mysqli_query($db, "SELECT * FROM `stuff` WHERE `a`='1' ORDER BY `n1` ASC, `n2` ASC, `n3` ASC");
			while ($psi=mysqli_fetch_row($cardsint))
			{
				$n1=$psi[3];
				$n2=$psi[4];
				$n3=$psi[5];
				$cn=$psi[1];
				$cn=str_replace("T-VL1920-", "", $cn);
				$vt="no";
				$qsq=mysqli_query($db, "SELECT * FROM `psvote` WHERE `c`='".$cn."' AND `q`='1' LIMIT 1");
				while ($qsqp=mysqli_fetch_row($qsq))
				{
					$vt="yes";
				}
				if ($i%2==0)
				{
					print("<tr style=\"background-color: #DDDDDD;\">");
				}
				else
				{
					print("<tr>");
				}
				print("<td style=\"text-align: center;\">".$i.".</td><td>".$n1." ".$n2." ".$n3."</td>");
				if ($vt=="yes")
				{
					print("<td style=\"text-align: center;\">Да");
				}
				else
				{
					print("<td style=\"background-color: #990000; color: #FFFFFF; text-align: center;\">Не");
				}
				print("</td></tr>");
				$i++;
			}
		?>
		</table>
		</center>
	</body>
</html>