Your IP : 216.73.217.87


Current Path : /hdd/hdd11/www/vlevski/enter/_old_files/
Upload File :
Current File : /hdd/hdd11/www/vlevski/enter/_old_files/to.php

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
?><!DOCTYPE html>
<html lang="bg">
	<head>
		<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
			{
				font-family:	mf;
			}
		</style>
	</head>
	<body>
	<?php
		$i=1;
		if (isset($_GET["p"]))
			{
				$p=$_GET["p"];
				$p--;
			}
		else
			{
				$p=0;
			}
		if ($p<0)
			{
				$p=0;
			}
		$n=$p;
		$p=$p*10;
		include("./conn.php");
		$cards=mysqli_query($db, "SELECT * FROM `stuff` WHERE `a`='1' ORDER BY `i` ASC LIMIT ".$p.", 10");
		while ($singlecard=mysqli_fetch_row($cards))
				{
					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('./gb.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;\">служебна карта</div>");
					print("	<img src=\"./logo.png\" style=\"position: absolute; top: 1mm; left: 1mm; width: 27mm; float: left;\">");
					print("		<div>");
					print("		<div style=\"position: absolute; top: 5mm; right: 1mm; text-align: right; font-weight: bold; font-family: im; font-size: 7.5mm;\">СУ „Васил Левски“</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;\">ПРОПУСК</div>");
					print("		<div style=\"position: absolute; top: 25mm; left: 0.5mm; text-align: center; width: 55mm; 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: 30.5mm; height: 30.5mm;\">");
					print("		<div style=\"position: absolute; top: 14mm; left: 28mm; font-size: 4mm; font-weight: bold; font-style: italic;\">enter.vlevski.eu</div>");
					$prefix="T-SUVLTR-";
					$current_code=str_replace($prefix, "", $singlecard[1]);
					$prefix="T-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;\">".$prefix.", код: ".$current_code."</div>");
					print("	</div>");
					print("</div>");
				}
		print("<div style=\"position: relative; clear: both; width: 100%;\">");
		if ($p<=90)
		{
			$b=$n;
			$n=$n+2;
			$c=$n-1;
			if ($c<=9)
				{
					$c="0".$c;
				}
			if ($b<=0)
			{
				print("<center>« предишна</a> | стр. ".$c." от общо 10 | ");
			}
			else
			{
				if ($b==1)
				{
					print("<center><a href=\"./t.php\">« предишна</a> | стр. ".$c." от общо 10 | ");
				}
				else
				{
					print("<center><a href=\"./t.php?p=".$b."\">« предишна</a> | стр. ".$c." от общо 10 | ");
				}
			}
			if ($p>=90)
			{
				print("следваща »</center></div>");
			}
			else
			{
				print("<a href=\"./t.php?p=".$n."\">следваща »</a></center></div>");
			}
		}
	?>
	</body>
</html>