Your IP : 216.73.216.48
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
session_start();
if (isset($_POST["u"]))
{
$u=$_POST["u"];
}
else
{
$u="";
}
if (isset($_POST["p"]))
{
$p=$_POST["p"];
}
else
{
$p="";
}
if (isset($_COOKIE["lgn"]))
{
$lgn=$_COOKIE["lgn"];
}
else
{
if ((($u=="office1") && ($p=="0ff1c3!")) || (($u=="galka") && ($p=="bazar86")))
{
$lgn=1;
setcookie("lgn", 1, 0, "", "", 1, 1);
}
else
{
$lgn="not";
}
}
?><!DOCTYPE html>
<html lang="bg">
<head>
<title>Издаване на изгубени карти</title>
</head>
<body style="font-family: 'Courier'">
<?php
if ($lgn=="not")
{
?>
<div style="position: relative; width: 410px; margin-right: auto; margin-left: auto; text-align: center; font-size: 25px; font-weight: bold;">
<br />
<br />С И С Т Е М А
<br />за разпечатване
<br />на пропуски
<br />на СУ "Васил Левски"
<br />
<br />
<br />
<form action="./" method="post">
<div style="position: relative; width: 150px; height: 25px; text-align: left; font-size: 20px; float: left;">Потребител:</div><input name="u" type="text" value="" style="position: relative; width: 250px; height: 25px; background-color: #009900; color: #FFFFFF; font-size: 20px; float: left;" />
<br />
<br />
<div style="position: relative; width: 150px; height: 25px; text-align: left; font-size: 20px; float: left;">Парола:</div><input name="p" type="password" value="" style="position: relative; width: 250px; height: 25px; background-color: #009900; color: #FFFFFF; font-size: 20px; float: left;" />
<br />
<br />
<div style="position: relative; width: 150px; height: 25px; text-align: left; font-size: 20px; float: left;"> </div><input name="sbmt" type="submit" value="Вход" style="position: relative; width: 250px; height: 40px; background-color: #004400; color: #FFFFFF; font-size: 20px; float: left;" />
</form>
</div>
<?php
}
else
{
if (isset($_GET["s"]))
{
$s=$_GET["s"];
$s=$s*1;
include("./conn.php");
$cards=mysqli_query($db, "SELECT * FROM `students` WHERE (`a`='1') AND (`i`='".$s."') LIMIT 1");
while ($singlecard=mysqli_fetch_row($cards))
{
print("<div style=\"position: relative; width: 100mm; margin-right: auto; margin-left: auto; text-align: center; font-size: 20px; font-weight: bold;\"><br /><br />");
print("<div style=\"position: relative; width: 90mm; height: 50mm; border: 1px solid black; margin-right: 1.5mm; margin-bottom: 1.5mm; float: left; background-image: url('./sb.jpg'); background-size: 90mm 50mm;\">");
print(" <div style=\"position: absolute; top: 1mm; right: 2mm; font-size: 4mm; font-weight: bold; font-style: italic; text-align: right;\">ученическа карта</div>");
print(" <img src=\"./logo.png\" style=\"position: absolute; top: 1mm; left: 1mm; width: 21mm; float: left;\">");
print(" <div>");
print(" <div style=\"position: absolute; top: 4mm; right: 2mm; text-align: right; font-weight: bold; font-family: Impact; font-size: 8mm;\">СУ "Васил Левски"</div>");
print(" <div style=\"position: absolute; top: 24mm; left: 2mm; width: 55mm; height: 17mm; background-color: transparent; text-align: center; font-weight: bold; font-family: Impact; font-size: 13mm; color: #FFFFFF; -webkit-transform: rotate(-20deg); -moz-transform: rotate(-20deg); -ms-transform: rotate(-20deg); -o-transform: rotate(-20deg); opacity: 0.7; text-shadow: 1px 1px #999999;\">ПРОПУСК</div>");
print(" <div style=\"position: absolute; top: 25mm; left: 0.5mm; text-align: center; width: 60mm; font-size: 5mm; font-weight: bold;\">");
print(" ".$singlecard[2]."<br />".$singlecard[3]."<br />".$singlecard[4]."");
print(" </div>");
print(" <div style=\"position: absolute; top: 15.5mm; left: 56mm; width: 32mm; height: 32mm; border: 0.5mm solid #000000; background-color: #ffffff;\">");
print(" </div>");
print(" <img src=\"https://api.qrserver.com/v1/create-qr-code/?size=600x600&data=".$singlecard[1]."\" style=\"position: absolute; top: 16.5mm; left: 57mm; width: 30mm; height: 30mm;\">");
print(" <div style=\"position: absolute; top: 15mm; left: 21mm; font-size: 3.5mm; font-weight: bold; font-style: italic;\">enter.vlevski.eu</div>");
print(" <div style=\"position: absolute; width: 45mm; top: 45mm; left: 1mm; font-size: 3mm; font-style: italic; text-align: left;\">код: ".$singlecard[1]."</div>");
print(" </div>");
print("</div>");
print("<input name=\"prnt\" type=\"button\" value=\"Отпечатай\" style=\"position: relative; margin-top: 1.5cm; margin-left: auto; margin-right: auto; width: 90mm; height: 10mm; background-image: url('./print.png'); background-size: 10mm 10mm; background-position: top left; background-repeat: no-repeat; background-color: #FFFFFF; border: 1px solid #000000; color: #000000; font-size: 20px; float: left;\" onclick=\"window.print();\" />");
print("<input name=\"newp\" type=\"button\" value=\"Нов пропуск\" style=\"position: relative; margin-top: 0.5cm; margin-left: auto; margin-right: auto; width: 90mm; height: 10mm; background-image: url('./newpass.png'); background-size: 10mm 10mm; background-position: top left; background-repeat: no-repeat; background-color: #FFFFFF; border: 1px solid #000000; color: #000000; font-size: 20px; float: left;\" onclick=\"window.open('./','_self');\" />");
print("</div>");
}
}
else
{
?>
<div style="position: relative; width: 610px; margin-right: auto; margin-left: auto; text-align: center; font-size: 25px; font-weight: bold;">
<br />
<br />С И С Т Е М А
<br />за разпечатване
<br />на пропуски
<br />на СУ "Васил Левски"
<br />
<br />
<br />
<form action="./" method="get">
<div style="position: relative; width: 200px; height: 25px; text-align: left; font-size: 20px; float: left;">Изберете ученик:</div>
<select name="s" style="position: relative; width: 400px; height: 25px; background-color: transparent; color: #000000; font-size: 20px; float: left;" />
<?php
include("./conn.php");
$cards=mysqli_query($db, "SELECT * FROM `students` WHERE `a`='1' ORDER by length(`k`), `k` ASC, `n1` ASC, n2 ASC, n3 ASC");
while ($singlecard=mysqli_fetch_row($cards))
{
print("<option value=\"".$singlecard[0]."\">".$singlecard[7].". ".$singlecard[2]." ".$singlecard[3]." ".$singlecard[4]."</option>");
}
?>
</select>
<br />
<br />
<div style="position: relative; width: 150px; height: 25px; text-align: left; font-size: 20px; float: left;"> </div><input name="sbmt" type="submit" value="Продължи" style="position: relative; width: 250px; height: 40px; background-color: #004400; color: #FFFFFF; font-size: 20px; float: left;" />
</form>
</div>
<?php
}
}
?>
</body>
</html>