Your IP : 216.73.216.48
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header('Access-Control-Allow-Origin: *');
date_default_timezone_set("Europe/Sofia");
$tn=$_POST["tn"];
$st=$_POST["st"];
$et=$_POST["et"];
$dtts=$_POST["dtts"];
if ($tn=="5014546008")
{
// 1а - Боряна Нановска
$k="1а";
}
else if ($tn=="7411614006")
{
// 1б - Атанаска Христова
$k="1б";
}
else if ($tn=="2356582067")
{
// 2а - Поля Дудева
$k="2а";
}
else if ($tn=="9859586072")
{
// 2б - Росица Якова
$k="2б";
}
else if ($tn=="5056610060")
{
// 3а - Пенка Неофитова
$k="3а";
}
else if ($tn=="7717537009")
{
// 3б - Валентина Цочева
$k="3б";
}
else if ($tn=="4750605059")
{
// 4а - Нягул Моллов
$k="4а";
}
else if ($tn=="2326533019")
{
// 4б - Емилия Дачева
$k="4б";
}
else if ($tn=="5659627069")
{
// 5а - Радостка Петкова
$k="5а";
}
else if ($tn=="4447616038")
{
// 5б - Магда Латинска
$k="5б";
}
else if ($tn=="4120551011")
{
// 5в - Галинка Калева
$k="5в";
}
else if ($tn=="5950535054")
{
// 5г - Нели Радева
$k="5г";
}
else if ($tn=="6547637040")
{
// 6а - Мариела Тенева
$k="6а";
}
else if ($tn=="4735627027")
{
// 6б - Ивелина Маринова
$k="6б";
}
else if ($tn=="4777707088")
{
// 6в - Цветлина Митева
$k="6в";
}
else if ($tn=="6247591043")
{
// 7а - Марийка Станчева
$k="7а";
}
else if ($tn=="4147752045")
{
// 7б - Мария Кинова
$k="7б";
}
else if ($tn=="4726614018")
{
// 7в - Емил Мичев
$k="7в";
}
else if ($tn=="7459647071")
{
// 8а - Ренета Христова
$k="8а";
}
else if ($tn=="6259653068")
{
// 8б - Радосвета Станевска
$k="8б";
}
else if ($tn=="1750597089")
{
// 8в - Николай Вълков
$k="8в";
}
else if ($tn=="7477607086")
{
// 9а - Цветанка Христова
$k="9а";
}
else if ($tn=="1447706047")
{
// 9б - Мариян Балев
$k="9б";
}
else if ($tn=="4777557087")
{
// 9в - Цветелина Муфатафова
$k="9в";
}
else if ($tn=="7747691044")
{
// 10а - Мария Църовска
$k="10а";
}
else if ($tn=="2023687013")
{
// 10б - Дарина Гадевска
$k="10б";
}
else if ($tn=="1120583010")
{
// 10в - Габриела Ангелска
$k="10в";
}
else if ($tn=="6523525015")
{
// 11а - Диляна Табакова
$k="11а";
}
else if ($tn=="2347527039")
{
// 11б - Магдалена Димова
$k="11б";
}
else if ($tn=="4135819030")
{
// 11в - Ирина Калинова
$k="11в";
}
else if ($tn=="4762565079")
{
// 12а - Стела Михайлова
$k="12а";
}
else if ($tn=="4756617066")
{
// 12б - Поля Минкова
$k="12б";
}
else if ($tn=="3835537022")
{
// 12в - Ивайло Йорданов
$k="12в";
}
else if ($tn=="4747582049")
{
// 12г - Милена Мартинова
$k="12г";
}
else if (($tn=="1411697002") || ($tn=="1141625031") || ($tn=="1459597070") || ($tn=="3535620024") || ($tn=="2362526075"))
{
// Ангел Балев, Камелия Алексиева, Ренета Бакарова, Иван Иванов, Свилен Димитров
$k="sp";
}
else
{
$k="";
}
?><!DOCTYPE html>
<html>
<head>
<title>Справка за заболеваемост от COVID-19</title>
<meta charset="utf-8" />
<meta name="description" content="Система за характеристика на средата" />
<link rel="shortcut icon" type="image/png" href="/c19/images/site/c19.png">
<link rel="shortcut icon" type="image/png" href="https://enter.vlevski.eu/c19/images/site/c19.png">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="bg_BG" />
<meta property="og:title" content="Справка за заболеваемост от COVID-19" />
<meta property="og:description" content="СУ „Васил Левски“ - Троян - справка за заболеваемост от COVID-19" />
<meta property="og:url" content="https://enter.vlevski.eu/c19" />
<meta property="og:image" content="https://enter.vlevski.eu/c19/images/site/c19.jpg" />
<meta property="og:image:width" content="1920" />
<meta property="og:image:height" content="1080" />
<meta property="og:image:alt" content="Справка за заболеваемост от COVID-19" />
<link rel="stylesheet" href="/c19/assets/css/bootstrap.min.css" />
<script src="/c19/assets/js/jquery.min.js"></script>
<script src="/c19/assets/js/popper.min.js"></script>
<script src="/c19/assets/js/tooltip.min.js"></script>
<script src="/c19/assets/js/bootstrap.min.js"></script>
<script>
sndstr="";
stmax=0;
hcnt=0;
scnt=0;
ccnt=0;
st1="";
st2="";
st3="";
st4="";
st5="";
st6="";
st7="";
st8="";
st9="";
st10="";
st11="";
st12="";
st13="";
st14="";
st15="";
st16="";
st17="";
st18="";
st19="";
st20="";
st21="";
st22="";
st23="";
st24="";
st25="";
st26="";
st27="";
function rep(st, et)
{
$("#st").val(st);
$("#et").val(et);
$("#snd").submit();
}
function chcnt(str, l)
{
var lc = 0;
for (var psn = 0; psn < str.length; psn++)
{
if (str.charAt(psn)==l)
{
lc+=1;
}
}
return lc;
}
function frmsnd()
{
$("#dtts").val(sndstr);
$("#snd").submit();
}
function chksnd()
{
$("#at").css("display", "block");
$("#at").html("<div class=\"alert alert-warning alert-dismissible fade show\" role=\"alert\">Изпращате следнните данни:<br />Здрави ученици: <b>"+hcnt+"</b><br />Болни ученици: <b>"+scnt+"</b><br />Ученици с COVID-19: <b>"+ccnt+"</b><br />Отсъстващи: </b>"+acnt+"</b><br /><br /><br /><button type=\"button\" onclick=\"frmsnd(); return true;\" class=\"btn btn-primary btn-lg btn-block\">ДА, ИЗПРАТИ</button><br /><br /><button type=\"button\" onclick=\"ccl(); return true;\" class=\"btn btn-danger btn-lg btn-block\">НЕ, ИСКАМ КОРЕКЦИЯ</button><button onclick=\"ccl(); return true;\" type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Затвори\"><span aria-hidden=\"true\">×</span></button></div>");
$("#atb").css("display", "block");
}
function shlgn()
{
$("#at").css("display", "block");
$("#at").html("<div class=\"alert alert-warning alert-dismissible fade show\" role=\"alert\">Въведете номера на Вашата карта:<br /><form id=\"lgn\" action=\"/c19/\" method=\"POST\"><input id=\"tn\" name=\"tn\" placeholder=\"Номерът на Вашата карта\" type=\"password\" class=\"form-control\" maxlength=\"10\" /><br /><br /><button type=\"sumbit\" class=\"btn btn-primary btn-lg btn-block\">ВХОД</button></form><button onclick=\"ccl(); return true;\" type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Затвори\"><span aria-hidden=\"true\">×</span></button></div>");
$("#atb").css("display", "block");
}
function chngst(id, s, t, i)
{
if (t=="h")
{
if (s=="b")
{
$("#sttxt"+id+"").html(" ЗДРАВ");
$("#ststat"+id+"").attr("src", "/c19/images/site/h.png");
}
else
{
$("#sttxt"+id+"").html(" ЗДРАВА");
$("#ststat"+id+"").attr("src", "/c19/images/site/h.png");
}
}
else if (t=="s")
{
$("#sttxt"+id+"").html(" С ГРИП ИЛИ ДРУГО");
$("#ststat"+id+"").attr("src", "/c19/images/site/s.png");
}
else if (t=="c")
{
$("#sttxt"+id+"").html(" С COVID-19");
$("#ststat"+id+"").attr("src", "/c19/images/site/c.png");
}
else
{
$("#sttxt"+id+"").html(" ОТСЪСТВА");
$("#ststat"+id+"").attr("src", "/c19/images/site/a.png");
}
eval("st"+i+"=\""+id+"|"+t+"\";");
sndstr="";
for (k=1; k<=stmax; k++)
{
if (sndstr=="")
{
sndstr=st1;
}
else
{
sndstr=sndstr+"|"+eval("st"+k)+"";
}
}
hcnt=chcnt(sndstr, "h");
scnt=chcnt(sndstr, "s");
ccnt=chcnt(sndstr, "c");
acnt=chcnt(sndstr, "a");
ccl();
}
function chng(id, name, s, i)
{
if (s=="b")
{
st="ЗДРАВ";
}
else
{
st="ЗДРАВА";
}
$("#at").css("display", "block");
$("#at").html("<div class=\"alert alert-warning alert-dismissible fade show\" role=\"alert\"><img src=\"/c19/images/site/"+s+".png\" style=\"position: absolute; top: 0px; left: 0px; width: 50px; height: 50px; z-index: 11;\"><br /><br /><br />Данни<br />за здравния статус<br />на <strong>"+name+"</strong><br /><br /><i>Изберете статус:</i><br /><button type=\"button\" onclick=\"chngst('"+id+"', '"+s+"', 'h', "+i+"); return true;\" class=\"btn btn-primary btn-lg btn-block\"><img src=\"/c19/images/site/h.png\" style=\"float: left; width: 35px; height: 35px;\">"+st+"</button><br /><button type=\"button\" onclick=\"chngst('"+id+"', '"+s+"', 's', "+i+"); return true;\" class=\"btn btn-warning btn-lg btn-block\"><img src=\"/c19/images/site/s.png\" style=\"float: left; width: 35px; height: 35px;\">С ГРИП ИЛИ ДРУГО</button><br /><button type=\"button\" onclick=\"chngst('"+id+"', '"+s+"', 'c', "+i+"); return true;\" class=\"btn btn-secondary btn-lg btn-block\"><img src=\"/c19/images/site/c.png\" style=\"float: left; width: 35px; height: 35px;\">С COVID-19</button><br /><button type=\"button\" onclick=\"chngst('"+id+"', '"+s+"', 'a', "+i+"); return true;\" class=\"btn btn-warning btn-lg btn-block\"><img src=\"/c19/images/site/a.png\" style=\"float: left; width: 35px; height: 35px;\">ОТСЪСТВА</button><button onclick=\"ccl(); return true;\" type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Затвори\"><span aria-hidden=\"true\">×</span></button></div>");
$("#atb").css("display", "block");
}
function ccl()
{
$("#at").css("display", "none");
$("#atb").css("display", "none");
}
</script>
</head>
<body>
<div id="at" style="position: fixed; width: 90%; left: 5%; top: 10%; text-align: center; z-index: 10; display: none;">
</div>
<div id="atb" style="position: fixed; width: 100%; height: 100%; left: 0; top: 0; text-align: center; z-index: 9; background-color: #000000; opacity: 0.9; display: none;" onclick="ccl(); return true;">
</div>
<?php
if ($k=="")
{
?>
<div id="bg" style="position: absolute; z-index: 3; top: 0; left: 0; margin: 0; padding: 0; width: 100vw; height: 100vh; background-image: url('/c19/images/site/c19.jpg'); background-position: top left; background-repeat: no-repeat; background-size: cover; opacity: 0.8; z-index: 0;">
</div>
<div id="bgt" style="position: absolute; width: 90%; left: 5%; top: 60%; height: 40%; z-index: 5; text-align: center;">
<table style="width: 100%; border: none;">
<tr>
<td colspan="2" style="width: 100%; text-align: left; font-weight: bold; font-size: 20pt; color: #990000;">
<br />
<br />
<br />
<button type="button" onclick="shlgn(); return true;" class="btn btn-success btn-lg btn-block">ВЪВЕДИ ДАННИ</button>
</td>
</tr>
</table>
</div>
<?php
}
else if ($k=="sp")
{
if ($st=="")
{
?>
<div id="bgt" style="position: absolute; width: 90%; left: 5%; top: 0%; z-index: 5; text-align: center;">
<img src="/c19/images/site/c19.png" style="border: none;" alt="" />
<br />
<br />
<strong>ОБОБЩЕНА СПРАВКА ЗА ЗАБОЛЕВАЕМОСТ ОТ COVID-19<br /><br />НА СУ "Васил Левски" - ТРОЯН</strong><br /><br />
<?php
$first_week_start=mktime(4,0,1,9,28,2020);
$first_week_end=$first_week_start+4*24*3600+16*3600;
$current_time=time();
$get_week_day=date("w", $current_time);
if ($get_week_day==1)
{
}
else if ($get_week_day==2)
{
$current_time=$current_time-24*3600;
}
else if ($get_week_day==3)
{
$current_time=$current_time-2*24*3600;
}
else if ($get_week_day==4)
{
$current_time=$current_time-3*24*3600;
}
else if ($get_week_day==5)
{
$current_time=$current_time-4*24*3600;
}
else if ($get_week_day==6)
{
$current_time=$current_time-5*24*3600;
}
else
{
$current_time=$current_time-6*24*3600;
}
$monday_day=date("d", $current_time);
$monday_month=date("m", $current_time);
$monday_year=date("Y", $current_time);
$monday_time=mktime(4,0,1,$monday_month,$monday_day,$monday_year);
?>
<form id="snd" action="/c19/" method="POST" target="_blank">
<input id="st" name="st" type="hidden" value="" />
<input id="et" name="et" type="hidden" value="" />
<input id="tn" name="tn" type="hidden" value="<?php print("".$tn.""); ?>" />
<input id="k" name="k" type="hidden" value="<?php print("".$k.""); ?>" />
<table style="width: 100%; border: none;">
<?php
if ($first_week_start!=$monday_time)
{
while ($first_week_start<$monday_time)
{
$monday_day=date("d", $monday_time);
$monday_month=date("m", $monday_time);
$monday_year=date("Y", $monday_time);
$monday_time=mktime(4,0,1,$monday_month,$monday_day,$monday_year);
$friday_time=$monday_time+4*24*3600+16*3600;
?>
<tr>
<td style="width: 60%">
Справка за седмицата от <?php print("".date("d.m.Y г.", $monday_time).""); ?> до <?php print("".date("d.m.Y г.", $friday_time).""); ?><br />(отваря се в нов прозорец)
</td>
<td style="width: 40%">
<button type="button" onclick="rep('<?php print("".$monday_time.""); ?>','<?php print("".$friday_time.""); ?>'); return true;" class="btn btn-success btn-lg btn-block">ПОКАЖИ</button>
</td>
</tr>
<tr style="border-bottom: 1px solid #000000;">
<td style="width: 60%">
</td>
<td style="width: 40%">
</td>
</tr>
<tr>
<td style="width: 60%">
</td>
<td style="width: 40%">
</td>
</tr>
<?php
$monday_time=$monday_time-7*24*3600;
}
}
?>
<tr>
<td style="width: 60%">
Справка за седмицата от <?php print("".date("d.m.Y г.", $first_week_start).""); ?> до <?php print("".date("d.m.Y г.", $first_week_end).""); ?><br />(отваря се в нов прозорец)
</td>
<td style="width: 40%">
<button type="button" onclick="rep('<?php print("".$first_week_start.""); ?>','<?php print("".$first_week_end.""); ?>'); return true;" class="btn btn-success btn-lg btn-block">ПОКАЖИ</button>
</td>
</tr>
</table>
</form>
<br />
<br />
</div>
<?php
}
else
{
//1-168
//169-410
//411-783
include("./conn.php");
$sqlq1=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='1' AND `sid`<='168' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='h'");
$hcnt1=0;
$inkey="s1а s1б s2а s2б 3а 3б 4а 4б 5а 5б 5в 5г 6а 6б 6в 7а 7б 7в 8а 8б 8в 9а 9б 9в 10а 10б 10в 11а 11б 11в 12а 12б 12в 12г";
while ($res1=mysqli_fetch_row($sqlq1))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$res1[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$hcnt1++;
}
else if ($rsa[0]>$st)
{
$hcnt1++;
}
else
{
}
}
}
$sqlqs1=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='1' AND `sid`<='168' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='s';");
$scnt1=0;
while ($ress1=mysqli_fetch_row($sqlqs1))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$ress1[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$scnt1++;
}
else if ($rsa[0]>$st)
{
$scnt1++;
}
else
{
}
}
}
$sqlqc1=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='1' AND `sid`<='168' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='c';");
$ccnt1=0;
while ($resc1=mysqli_fetch_row($sqlqc1))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$resc1[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$ccnt1++;
}
else if ($rsa[0]>$st)
{
$ccnt1++;
}
else
{
}
}
}
$sqlq2=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='169' AND `sid`<='410' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='h'");
$hcnt2=0;
while ($res2=mysqli_fetch_row($sqlq2))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$res2[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$hcnt2++;
}
else if ($rsa[0]>$st)
{
$hcnt2++;
}
else
{
}
}
}
$sqlqs2=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='169' AND `sid`<='410' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='s';");
$scnt2=0;
while ($ress2=mysqli_fetch_row($sqlqs2))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$ress2[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$scnt2++;
}
else if ($rsa[0]>$st)
{
$scnt2++;
}
else
{
}
}
}
$sqlqc2=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='169' AND `sid`<='410' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='c';");
$ccnt2=0;
while ($resc2=mysqli_fetch_row($sqlqc2))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$resc2[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$ccnt2++;
}
else if ($rsa[0]>$st)
{
$ccnt2++;
}
else
{
}
}
}
$sqlq3=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='411' AND `sid`<='783' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='h'");
$hcnt3=0;
while ($res3=mysqli_fetch_row($sqlq3))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$res3[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$hcnt3++;
}
else if ($rsa[0]>$st)
{
$hcnt3++;
}
else
{
}
}
}
$sqlqs3=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='411' AND `sid`<='783' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='s';");
$scnt3=0;
while ($ress3=mysqli_fetch_row($sqlqs3))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$ress3[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$scnt3++;
}
else if ($rsa[0]>$st)
{
$scnt3++;
}
else
{
}
}
}
$sqlqc3=mysqli_query($db, "SELECT DISTINCT `sid` FROM `dt` WHERE `sid`>='411' AND `sid`<='783' AND `t`>='".$st."' AND `t`<='".$et."' AND `st`='c';");
$ccnt3=0;
while ($resc3=mysqli_fetch_row($sqlqc3))
{
$sa=mysqli_query($db, "SELECT `s`, `k` FROM `students` WHERE `i`='".$resc3[0]."' LIMIT 1");
while ($rsa=mysqli_fetch_row($sa))
{
if (($rsa[1]=="1а") || ($rsa[1]=="1б") || ($rsa[1]=="2а") || ($rsa[1]=="2б"))
{
$inkey=str_replace("s".$rsa[1]."", "", $inkey);
}
else
{
$inkey=str_replace("".$rsa[1]."", "", $inkey);
}
if ($rsa[0]==0)
{
$ccnt3++;
}
else if ($rsa[0]>$st)
{
$ccnt3++;
}
else
{
}
}
}
$cnt1=$hcnt1+$scnt1+$ccnt1;
$cnt2=$hcnt2+$scnt2+$ccnt2;
$cnt3=$hcnt3+$scnt3+$ccnt3;
$cnt=$cnt1+$cnt2+$cnt3;
$hcnt=$hcnt1+$hcnt2+$hcnt3;
$scnt=$scnt1+$scnt2+$scnt3;
$ccnt=$ccnt1+$ccnt2+$ccnt3;
?>
<div id="bgt" style="position: absolute; width: 19cm; left: 1cm; top: 1cm; z-index: 5; text-align: center;">
<img src="/c19/images/site/logo.png" style="width: 19cm;" alt="" />
<br />
<br />
<?php
$inkey=str_replace("s", "", $inkey);
$chckkey=str_replace(" ", "", $inkey);
if ($chckkey!="")
{
$inkey=str_replace(" ", " ", $inkey);
$inkey=str_replace(" ", " ", $inkey);
$inkey=str_replace(" ", " ", $inkey);
$inkey=str_replace(" ", " ", $inkey);
$inkey=str_replace(" ", " ", $inkey);
print("<br /><span style=\"color: #990000; font-weight: bold;\">НЕПЪЛНА СПРАВКА. ЛИПСВАЩИ КЛАСОВЕ:</span>");
print("<br /> <span style=\"font-size: 9pt; color: #990000; font-weight: bold;\">".$inkey."</span>");
}
else
{
print("<br /><br />");
}
?>
<br />
<br />
<br /><b style="font-size: 24pt;">С Ъ О Б Щ Е Н И Е</b>
<br />
<br /><i>за ежеседмично съобщаване на броя на учениците
<br />поради съмнение за COVID-19 или заболели от COVID-19</i>
<br />
<br />седмица: <b><?php print("".date("d.m.Y г.", $st).""); ?> - <?php print("".date("d.m.Y г.", $et).""); ?></b>
<br />
<br />от <b>Средно училище "Васил Левски"</b>
<br />адрес: <b>гр. Троян, п.к. 5600, ул. "34-и Троянски полк" №43</b>
<br />телефон за връзка: <b>067062772</b>
<br />
<br />
<br /><table style="border: none; width: 19cm; margin: 0; padding: 0;">
<tr style="min-height: 1.5cm; height: 1.5cm;">
<td style="border: 0.5mm solid #000000; font-size: 9pt; width: 7cm; font-style: italic; text-align: left;">
</td>
<td style="border: 0.5mm solid #000000; font-size: 9pt; width: 3cm; text-align: center; font-weight: bold;">
начален<br />етап
</td>
<td style="border: 0.5mm solid #000000; font-size: 9pt; width: 3cm; text-align: center; font-weight: bold;">
прогимназиален<br />етап
</td>
<td style="border: 0.5mm solid #000000; font-size: 9pt; width: 3cm; text-align: center; font-weight: bold;">
гимназиален<br />етап
</td>
<td style="border: 0.5mm solid #000000; font-size: 9pt; width: 3cm; text-align: center; font-weight: bold;">
ОБЩО
</td>
</tr>
<tr style="min-height: 1.5cm; height: 1.5cm;">
<td style="border: 0.5mm solid #000000; width: 7cm; font-style: italic; text-align: left;">
Общ брой ученици:
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$cnt1.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$cnt2.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$cnt3.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$cnt.""); ?>
</td>
</tr>
<tr style="min-height: 1.5cm; height: 1.5cm;">
<td style="border: 0.5mm solid #000000; width: 7cm; font-style: italic; text-align: left;">
Здрави ученици:
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$hcnt1.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$hcnt2.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$hcnt3.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$hcnt.""); ?>
</td>
</tr>
<tr style="min-height: 1.5cm; height: 1.5cm;">
<td style="border: 0.5mm solid #000000; width: 7cm; font-style: italic; text-align: left;">
Отсъстващи поради
<br /> съмнение за COVID-19:
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$ccnt1.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$ccnt2.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$ccnt3.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$ccnt.""); ?>
</td>
</tr>
<tr style="min-height: 1.5cm; height: 1.5cm;">
<td style="border: 0.5mm solid #000000; width: 7cm; font-style: italic; text-align: left;">
Отсъстващи поради
<br /> грипоподобна симптоматика:
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$scnt1.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$scnt2.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$scnt3.""); ?>
</td>
<td style="border: 0.5mm solid #000000; width: 3cm; text-align: right; font-weight: bold;">
<?php print("".$scnt.""); ?>
</td>
</tr>
</table>
<br />
<br />
<br />
<br />
<table style="border: none; width: 19cm; margin: 0; padding: 0;">
<tr>
<td style="width: 7cm; text-align: left;">
Дата: <?php print("".date("d.m.Y г.", $et).""); ?><br />гр. Троян
</td>
<td style="width: 12cm; text-align: right;">
ДИРЕКТОР: ___________________<br />/ Ангел Балев /
</td>
</tr>
</table>
</div>
<?php
}
}
else
{
if ($dtts!="")
{
?>
<div id="bgt" style="position: absolute; width: 90%; left: 5%; top: 0%; z-index: 5; text-align: center;">
<img src="/c19/images/site/c19.png" style="border: none;" alt="" />
<br />
<br />
<strong>СПРАВКА ЗА ЗАБОЛЕВАЕМОСТ ОТ COVID-19<br /><br />ЗА УЧЕНИЦИТЕ ОТ <?php print("".$k.""); ?> КЛАС</strong><br /><br />
<br />
<br /><?php
$tsvd=time();
$indb=explode("|", $dtts);
$numin=count($indb);
$numin--;
$i=0;
$instr="";
while ($i<=$numin)
{
if ($instr!="")
{
$instr="".$instr.", ";
}
$instr="".$instr."(NULL, '".$tsvd."', '".$indb[$i]."', '";
$i++;
if ($indb[$i]=="a")
{
$instr="".$instr."h')";
}
else
{
$instr="".$instr."".$indb[$i]."')";
}
$i++;
}
include("./conn.php");
$sqlq=mysqli_query($db, "INSERT INTO `dt` (`i`, `t`, `sid`, `st`) VALUES ".$instr.";");
if ($sqlq)
{
print("<b>Данните бяха успешно запазени!</b><br /><br />Благодарим Ви!<br />Можете да затворите прозореца!");
}
else
{
print("<b>Грешка при изпращането!</b><br />");
?>
<form id="snd" action="/c19/" method="POST">
<input id="dtts" name="dtts" type="hidden" value="<?php print("".$dtts.""); ?>" />
<input id="tn" name="tn" type="hidden" value="<?php print("".$tn.""); ?>" />
<input id="k" name="k" type="hidden" value="<?php print("".$k.""); ?>" />
<button type="submit" class="btn btn-success btn-lg btn-block">ПОВТОРНО ИЗПРАЩАНЕ</button>
</form>
<br />
<br />Ако виждате за втори път същото съобщение, ще трябва да въведете данните наново.
<br />
<br />
<button type="button" onclick="window.open('/c19/', '_self'); return true;" class="btn btn-danger btn-lg btn-block">ЗАПОЧНЕТЕ ОТНАЧАЛО</button>
<?php
}
?>
</div>
<?php
}
else
{
$is_friday=date("w", time());
if ($is_friday!=5)
{
?>
<div id="bgt" style="position: absolute; width: 90%; left: 5%; top: 0%; z-index: 5; text-align: center;">
<img src="/c19/images/site/c19.png" style="border: none;" alt="" />
<br />
<br />
<strong>СПРАВКА ЗА ЗАБОЛЕВАЕМОСТ ОТ COVID-19<br /><br /><br /><br />
МОЖЕТЕ ДА ПОПЪЛВАТЕ ТАЗИ СПРАВКА САМО В ПЕТЪК!
</div>
<?php
}
else
{
?>
<div id="bgt" style="position: absolute; width: 90%; left: 5%; top: 0%; z-index: 5; text-align: center;">
<img src="/c19/images/site/c19.png" style="border: none;" alt="" />
<br />
<br />
<strong>СПРАВКА ЗА ЗАБОЛЕВАЕМОСТ ОТ COVID-19<br /><br />СПИСЪК НА УЧЕНИЦИТЕ ОТ <?php print("".$k.""); ?> КЛАС</strong><br /><br />
<?php
$current_time=time();
$get_week_day=date("w", $current_time);
if ($get_week_day==1)
{
}
else if ($get_week_day==2)
{
$current_time=$current_time-24*3600;
}
else if ($get_week_day==3)
{
$current_time=$current_time-2*24*3600;
}
else if ($get_week_day==4)
{
$current_time=$current_time-3*24*3600;
}
else if ($get_week_day==5)
{
$current_time=$current_time-4*24*3600;
}
else if ($get_week_day==6)
{
$current_time=$current_time-5*24*3600;
}
else
{
$current_time=$current_time-6*24*3600;
}
$monday_day=date("d", $current_time);
$monday_month=date("m", $current_time);
$monday_year=date("Y", $current_time);
$monday_time=mktime(4,0,1,$monday_month,$monday_day,$monday_year);
$friday_time=$monday_time+4*24*3600+16*3600;
$stsnd=$friday_time-36*3600;
$etsnd=$friday_time+36*3600;
include("./conn.php");
$sqlq=mysqli_query($db, "SELECT * FROM `students` WHERE `k` = '".$k."' ORDER BY `i` ASC LIMIT 1");
$i=1;
$rep=0;
while ($res=mysqli_fetch_row($sqlq))
{
$sqlr=mysqli_query($db, "SELECT * FROM `dt` WHERE `sid`=".$res[0]." AND `t`>='".$stsnd."' AND `t`<=".$etsnd." LIMIT 1");
while ($resr=mysqli_fetch_row($sqlr))
{
$rep=1;
}
}
if ($rep==1)
{
print("Вече сте подали данни!");
}
else
{
?>
<table style="width: 100%; border: 1px #000000 solid;">
<tr>
<td style="width: 5%; text-align: center; font-weight: bold; font-size: 16pt; color: #000000; border: 1px #000000 solid;">
№
</td>
<td style="width: 55%; text-align: center; font-weight: bold; font-size: 16pt; color: #000000; border: 1px #000000 solid;">
Имена
</td>
<td style="width: 40%; text-align: center; font-weight: bold; font-size: 16pt; color: #000000; border: 1px #000000 solid;">
Статус
</td>
</tr>
<?php
include("./conn.php");
$sqlq=mysqli_query($db, "SELECT * FROM `students` WHERE `k` = '".$k."' AND `s`='0' ORDER BY `i` ASC");
$i=1;
while ($res=mysqli_fetch_row($sqlq))
{
$id="".$res[0]."";
$s="".$res[6]."";
$n1="".$res[2]."";
$n2="".$res[3]."";
$n3="".$res[4]."";
if ($i%2==0)
{
print("<tr style=\"min-height: 60px; background-color: #AAAAAA; cursor: pointer;\" onclick=\"chng('".$id."','".$n1." ".$n2." ".$n3."', '".$s."', '".$i."'); return true;\">");
}
else
{
print("<tr style=\"min-height: 60px; cursor: pointer;\" onclick=\"chng('".$id."','".$n1." ".$n2." ".$n3."', '".$s."', '".$i."'); return true;\">");
}
print("<td style=\"width: 10%; text-align: center; font-size: 14pt; color: #000000; border: 1px #000000 solid;\"><b>".$i.".</b><br />");
if ($s=="b")
{
print("<img src=\"/c19/images/site/b.png\" id=\"stico".$id."\" style=\"border: 0; width: 45px;\" /></td>");
}
else
{
print("<img src=\"/c19/images/site/g.png\" id=\"stico".$id."\" style=\"border: 0; width: 45px;\" /></td>");
}
print("<td style=\"width: 50%; text-align: left; font-size: 14pt; color: #000000; border: 1px #000000 solid;\">".$n1." ".$n2." ".$n3."</td>");
print("<td style=\"width: 40%; text-align: center; border: 1px #000000 solid;\">");
print("<img src=\"/c19/images/site/h.png\" id=\"ststat".$id."\" style=\"border: 0; width: 45px;\" />");
if ($s=="b")
{
print("<span id=\"sttxt".$id."\"> ЗДРАВ</span></td></tr>");
}
else
{
print("<span id=\"sttxt".$id."\"> ЗДРАВА</span></td></tr>");
}
$n="st".$i;
$$n="".$id."|h";
$i++;
}
?>
</table>
<script>
<?php
$i--;
print("stmax=".$i."; hcnt=".$i.";");
$j=1;
$ff="";
while($j<=$i)
{
$n="st".$j;
$ff="".$ff."".$$n."";
print(" st".$j."=\"".$$n."\";");
$j++;
}
?>
for (j=1; j<=stmax; j++)
{
if (sndstr=="")
{
sndstr=st1;
}
else
{
sndstr=sndstr+"|"+eval("st"+j)+"";
}
}
</script>
<br />
<br />
<form id="snd" action="/c19/" method="POST">
<input id="dtts" name="dtts" type="hidden" value="<?php print("".$ff.""); ?>" />
<input id="tn" name="tn" type="hidden" value="<?php print("".$tn.""); ?>" />
<input id="k" name="k" type="hidden" value="<?php print("".$k.""); ?>" />
</form>
<button type="button" onclick="chksnd(); return true;" class="btn btn-success btn-lg btn-block">ИЗПРАТИ</button>
<br />
<br />
</div>
<?php
}
}
}
}
?>
</body>
</html>