Your IP : 216.73.216.48
| Current Path : /srv/www/vlevski/enter/ |
|
|
| Current File : //srv/www/vlevski/enter/plloverallold.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>
<th>Име, презиме, фамилия</th>
<th>ЕГН</th>
<th>длъжност</th>
</thead>
<tbody>
<?php
$lgn=mysqli_query($db, "SELECT * FROM `stuff` WHERE `a`<'3' ORDER BY `n1` ASC, `n2` ASC, `n3` ASC");
$i=1;
while ($res=mysqli_fetch_row($lgn))
{
$tname="".$res[3]." ".$res[5]." ".$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`='2' LIMIT 1");
while ($resp=mysqli_fetch_row($psnd))
{
$st="yes";
$tmf=$resp[4];
$ans=$resp[3];
$ansa=explode("|NEW|", $ans);
if ($ansa[0]=="y")
{
$ans1="Да, има PCR";
}
else
{
$ans1="Не, няма PCR";
$color++;
}
if ($ansa[1]=="y")
{
$ans2="Да, желае тест";
$color++;
}
else
{
$ans2="Не, не желае тест";
}
}
if ($st=="no")
{
//print("<tr style=\"background-color: #00CCCC; color: #DDDDDD;\"><td>".$i."</td><td>непопълнена</td><td>".$tname."</td><td>-</td><td>-</td></tr>");
}
else
{
if ($color==2)
{
print("<tr><td>Троян</td><td>Троян</td><td>СУ "Васил Левски"</td><td>".$tname."</td><td>".$egn."</td><td>".$dl."</td></tr>");
}
else
{
//print("<tr>");
}
}
$i++;
}
?>
</tbody>
</table>
</body>
</html>