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>
<style>
@font-face
{
font-family: mf;
src: url("/font/calibri.woff");
}
@font-face
{
font-family: im;
src: url("/font/impact.ttf");
}
body, div, span, font, input
{
font-family: mf;
}
</style>
</head>
<body>
<?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: 2mm; float: left; background-color: transparent; z-index: 0;\">");
print("<img src=\"./sb.jpg\" style=\"position: absolute; top: 0mm; left: 0mm; width: 90mm; height: 50mm; z-index: 1;\" alt=\"\" />");
//print("<div style=\"position: relative; width: 90mm; height: 50mm; border: 1px solid black; margin-right: 1.5mm; margin-bottom: 2mm; float: left; background-image: url('./sb.jpg'); background-size: 90mm 50mm;\">");
print(" <div style=\"position: absolute; top: 0mm; right: 1mm; font-size: 4mm; font-weight: bold; font-style: italic; text-align: right; z-index: 2;\">ученическа карта</div>");
print(" <img src=\"./logo.png\" style=\"position: absolute; top: 1mm; left: 1mm; width: 27mm; float: left; z-index: 2;\">");
print(" <div>");
print(" <div style=\"position: absolute; top: 5mm; right: 1mm; text-align: right; font-weight: bold; font-family: im; font-size: 7.5mm; z-index: 2;\">СУ „Васил Левски“</div>");
print(" <div style=\"position: absolute; top: 24mm; left: 1mm; width: 55mm; height: 17mm; background-color: transparent; text-align: center; font-weight: bold; font-family: im; font-size: 13mm; color: #FFFFFF; -webkit-transform: rotate(-20deg); -moz-transform: rotate(-20deg); -ms-transform: rotate(-20deg); -o-transform: rotate(-20deg); opacity: 0.6; text-shadow: 1px 1px #999999; z-index: 2;\">ПРОПУСК</div>");
print(" <div style=\"position: absolute; top: 25mm; left: 0.5mm; text-align: center; width: 55mm; font-size: 5mm; font-weight: bold; z-index: 3;\">");
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; z-index: 2;\">");
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: 30.5mm; height: 30.5mm; z-index: 3;\">");
print(" <div style=\"position: absolute; top: 14mm; left: 28mm; font-size: 4mm; font-weight: bold; font-style: italic; z-index: 2;\">enter.vlevski.eu</div>");
$prefix="S-SUVLTR-";
$current_code=str_replace($prefix, "", $singlecard[1]);
$prefix="S-SUVLTR";
$current_code1=substr($current_code, 0, 1);
$current_code2=substr($current_code, 1, 3);
$current_code3=substr($current_code, 4, 3);
$current_code4=substr($current_code, 7, 3);
$current_code="".$current_code1." ".$current_code2." ".$current_code3." ".$current_code4."";
print(" <div style=\"position: absolute; width: 50mm; top: 45mm; left: 1mm; font-size: 3.5mm; font-style: italic; text-align: left; z-index: 2;\">".$prefix.", код: ".$current_code."</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>