Your IP : 216.73.216.48


Current Path : /var/www/vlevski/enter/
Upload File :
Current File : //var/www/vlevski/enter/plloverallold4.php

<?php
	session_start();
	header("Cache-Control: no-cache, must-revalidate");
	header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
	if (isset($_POST["tn"]))
	{
		$tn=$_POST["tn"];
	}
	else
	{
		header("location: /");
	}
	date_default_timezone_set("Europe/Sofia");
	include("./conn.php");
?><!DOCTYPE HTML>
<html lang="bg">
	<head>
		<meta charset="utf-8" />
		<title>Справка за последната анкета</title>
		<style>
			td, th
			{
				border: 1px solid #000000;
				margin: 0;
				padding: 0;	
			}
		</style>
	</head>
	<body style="background-color: #CCCCCC;">
		<h1>Справка за последната анкета</h1>
		<table style="width: 100%; border: 1px solid #000000; margin: 0; padding: 0;">
			<thead>
				<th>№</th>
				<th>Име, фамилия</th>
				<th>Отговор</th>
			</thead>
			<tbody>
				<?php
					$lgn=mysqli_query($db, "SELECT * FROM `stuff` WHERE `a`='1' ORDER BY `n1` ASC, `n2` ASC, `n3` ASC");
					$i=1;
					while ($res=mysqli_fetch_row($lgn))
					{
						$tname="".$res[3]." ".$res[5]."";
						$egn=$res[6];
						$dl=$res[12];
						$st="no";
						$color=0;
						$psnd=mysqli_query($db, "SELECT * FROM `pollsans` WHERE `u`='".$res[1]."' AND `pi`='5' LIMIT 1");
						while ($resp=mysqli_fetch_row($psnd))
						{
							$st="yes";
							$tmf=$resp[4];
							$ans=$resp[3];
						}
						if ($st=="no")
						{
							print("<tr style=\"background-color: #CC0000; color: #DDDDDD;\"><td style=\"text-align: right;\">".$i.".</td><td>".$tname."</td>");
							print("<td></td>");
							print("</tr>");
						}
						else
						{
							$stn=$ans;
							print("<tr><td style=\"text-align: right;\">".$i.".</td><td>".$tname."</td>");
							print("<td>".$stn."</td>");
							print("</tr>");
						}
						$i++;
					}
				?>
			</tbody>
		</table>
	</body>
</html>