Your IP : 216.73.217.87


Current Path : /hdd/hdd11/www/vlevski/enter/b/
Upload File :
Current File : /hdd/hdd11/www/vlevski/enter/b/1index.php

<?php
	session_start();
	if (($_SESSION["acc"]==6) || ($_SESSION["acc"]==9))
	{
		$tnr=$_SESSION["tname"];
		$tn=explode(" ", $_SESSION["tname"]);
		$tfn=mb_substr($tn[0], 0, 1);
		$tln=mb_substr($tn[1], 0, 1);
		$uin="".$tfn."".$tln."";
	}
	else
	{
		header("location: /");
	}
	include("./conn.php");
	date_default_timezone_set("Europe/Sofia");
	$cd=date("d.m.Y", time());
?><!DOCTYPE HTML>
<html lang="bg">
	<head>
		<meta charset="utf-8" />
		<title>Училищен звънец</title>
		<link rel="shortcut icon" type="image/png" href="/assets/images/site/enter.png" />
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
		<link rel="stylesheet" href="/assets/css/select2.min.css" />
		<link rel="stylesheet" href="/assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="/assets/css/datepicker.css" />
		<script src="/assets/js/jquery.min.js"></script>
		<script src="/assets/js/form.min.js"></script>
		<script src="/assets/js/select.min.js"></script>
		<script src="/assets/js/popper.min.js"></script>
		<script src="/assets/js/bootstrap.min.js"></script>
		<script src="/assets/js/bootstrap-datepicker.js"></script>
		<script src="/assets/js/jquery.dataTables.min.js"></script>
		<script src="/assets/js/dataTables.bootstrap4.min.js"></script>
		<script src="/assets/fa6/js/all.min.js" defer></script>
		<script>
			function addb()
		</script>
		<style>
			html, body
			{
				background-color: #112233;
			}
			strong
			{
				font-weight: bold;
				color: #DDDDDD;
				font-size: 25px;
			}
			a, div, input
			{
				font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
			}
			th
			{
				cursor: pointer;
			}
			a.dropdown-item
			{
				color: #DDDDDD!important;
			}
			a.dropdown-item:hover
			{
				color: #FFFFFF!important;
				background-color: transparent!important;
			}
			.dropdown .dropdown-menu
			{
				-webkit-transition: all 0.5s;
				-moz-transition: all 0.5s;
				-ms-transition: all 0.5s;
				-o-transition: all 0.5s;
				transition: all 0.5s;
				max-height: 0;
				display: block;
				overflow: hidden;
				opacity: 0;
			}
			.dropdown.show .dropdown-menu
			{
				max-height: 300px;
				opacity: 1;
			}
			.select2-search, .select2-search input, .select2-results, .select2-container--default .select2-selection--single, .select2-selection__rendered
			{
				background-color: #112233!important;
				color: #999911!important;
				font-weight: bold!important;
				min-height: 35px!important;
				line-height: 35px!important;
				font-size: 25px!important;
			}
			.datepicker
			{
				z-index: 1600!important;
				background-color: #112233!important;
				color: #999911!important;
				border: none;
			}
			::-webkit-scrollbar
			{
				width: 10px;
			}
			::-webkit-scrollbar-track
			{
				background-color: #116633;
			}
			::-webkit-scrollbar-thumb
			{
				background-color: #BBBB33;
				border-radius: 5px;
			}
		</style>
	</head>
	<body>
		<?php
			include("../menuin.php");
		?>
		<div style="margin-top: 55px;" class="container-fluid">
			<div class="row">
				<div class="col-1" style="margin-bottom: 20px; font-size: 25px; font-weight: bold; color: #DDDDDD;">
					<img src="/assets/images/site/enter.png" style="height: 100px; border: none;" alt="" />
				</div>
				<div class="col-5" style="margin-bottom: 20px; font-size: 60px; font-weight: bold; color: #DDDDDD;">
					<span class="d-sm-none d-md-inline">&quot;Васил Левски&quot;</span>
				</div>
				<div class="col-6" style="margin-bottom: 20px; font-size: 60px; font-weight: bold; color: #DDDDDD; text-align: right; padding-right: 30px; border-radius: 15px; background-image: linear-gradient(to right, rgba(51,51,255,0), rgba(51,51,255,1))!important;">
					<i class="fas fa-bell"></i> <span class="d-sm-none d-md-inline">Училищен звънец</span>
				</div>
			</div>
			<div class="row">
				<div class="col-8" style="margin-bottom: 20px; font-size: 25px; font-weight: bold; color: #DDDDDD;">
					<div class="container-fluid">
						<div class="row">
							<div class="col-6">
								<i class="fas fa-bell" style="min-width: 50px;"></i> Текущ звънец:
								<br /><i class="fas fa-clock" style="min-width: 50px;"></i> Начало и край: <b>07:55-14:00</b>
							</div>
							<div class="col-6">
								<button id="editb" onclick="editb(); return true;" style="margin-bottom: 5px; font-size: 35px; width: 95%; height: 70px;" type="button" class="btn btn-warning">
									<div class="container-fluid">
										<div class="row">
											<div class="col-sm-12 col-md-2">
												<i class="fas fa-pencil"></i>
											</div>
											<div style="text-align: right; paddin-right: 5px;" class="d-sm-none d-md-inline col-sm-12 col-md-10">
												Редактирай
											</div>
										</div>
									</div>
								</button>
							</div>
						</div>
						<div class="row">
							<div class="col-12">
								<i class="fab fa-itunes-note" style="min-width: 50px;"></i> Песен: <i>Lady Gaga - Abracadabra</i>
								<br /><i class="fas fa-volume-high" style="min-width: 50px;"></i> Сила на звука: <b>100%</b>
								<br /><i class="fas fa-clock" style="min-width: 50px;"></i> Час за влизане на ЦОУД: <b>15:00</b>
								<br /><i class="fas fa-info-circle" style="min-width: 50px;"></i> Описание: <i>Часове 40 минути, първо - 15 и голямо - 25 - стандартен</i>
							</div>
						</div>
					</div>
				</div>
				<div class="col-4" style="margin-bottom: 20px; font-size: 25px; font-weight: bold; color: #DDDDDD;">
					<button id="addb" onclick="addb(); return true;" style="margin-bottom: 5px; font-size: 35px; width: 95%; height: 70px;" type="button" class="btn btn-success">
						<div class="container-fluid">
							<div class="row">
								<div class="col-sm-12 col-md-2">
									<i class="fas fa-file-audio"></i>
								</div>
								<div style="text-align: right; paddin-right: 5px;" class="d-sm-none d-md-inline col-sm-12 col-md-10">
									Създай нов звънец
								</div>
							</div>
						</div>
					</button><br />
					<button id="adds" onclick="adds(); return true;" style="margin-bottom: 5px; font-size: 35px; width: 95%; height: 70px;" type="button" class="btn btn-primary">
						<div class="container-fluid">
							<div class="row">
								<div class="col-sm-12 col-md-2">
									<i class="fas fa-music"></i>
								</div>
								<div style="text-align: right; paddin-right: 5px;" class="d-sm-none d-md-inline col-sm-12 col-md-10">
									Добави мелодия
								</div>
							</div>
						</div>
					</button><br />
					<button id="stopb" onclick="stopb(); return true;" style="margin-bottom: 5px; font-size: 35px; width: 95%; height: 70px;" type="button" class="btn btn-danger">
						<div class="container-fluid">
							<div class="row">
								<div class="col-sm-12 col-md-2">
									<i class="fas fa-power-off"></i>
								</div>
								<div style="text-align: right; paddin-right: 5px;" class="d-sm-none d-md-inline col-sm-12 col-md-10">
									Спри звънеца
								</div>
							</div>
						</div>
					</button>
				</div>
			</div>
			<div class="row">
				<div class="col-12" style="border-top: solid 1px #DDDDDD; margin-top: 20px; font-size: 40px; font-weight: bold; color: #DDDDDD;">
					<i class="fas fa-bell"></i> Съществуващи звънци
				</div>
			</div>
			<div class="row">
				<div class="col-12" style="margin-bottom: 20px; font-size: 25px; font-weight: bold; color: #DDDDDD;">
					<table id="ttbl" style="width: 1250px; min-width: 1250px; max-width: 1250px; margin: 0 auto;" class="table table-bordered table-striped table-dark">
						<thead>
							<tr>
								<th style="vertical-align: middle; text-align: center; max-width: 80px; min-width: 80px; width: 80px;">№</th>
								<th style="vertical-align: middle; text-align: center; max-width: 550px; min-width: 550px; width: 550px;">Описание на звънеца</th>
								<th style="vertical-align: middle; text-align: center; max-width: 150px; min-width: 150px; width: 150px;">Начало</th>
								<th style="vertical-align: middle; text-align: center; max-width: 150px; min-width: 150px; width: 150px;">Край</th>
								<th style="vertical-align: middle; text-align: center; max-width: 300px; min-width: 300px; width: 300px;">Действия</th>
							</tr>
						</thead>
						<tbody id="stbl">
							<?php
								$i=1;
								$dq=mysqli_query($db, "SELECT * FROM `schoolbell` ORDER BY `d` ASC;");
								while($res=mysqli_fetch_row($dq))
								{
									$vl=$res[0];
									$des=$res[4];
									$starth=$res[2];
									$endh=$res[3];
									$edt=$res[0];
									print("<tr>");
									print("<td style=\"text-align: center;\">".$i."</td>");
									print("<td>".$des."</td>");
									print("<td style=\"text-align: center;\">".$starth."</td>");
									print("<td style=\"text-align: center;\">".$endh."</td>");
									print("<td style=\"text-align: center;\">");
									print("<button id=\"view".$vl."\" onclick=\"vbell('".$vl."'); return true;\" style=\"font-size: 35px; width: 85px; height: 70px;\" type=\"button\" class=\"btn btn-primary\"><i class=\"fas fa-eye\"></i></button>&nbsp;");
									print("<button id=\"edit".$vl."\" onclick=\"ebell('".$vl."'); return true;\" style=\"font-size: 35px; width: 85px; height: 70px;\" type=\"button\" class=\"btn btn-warning\"><i class=\"fas fa-pencil\"></i></button>&nbsp;");
									if ($i!=17)
									{
										print("<button id=\"stat".$vl."\" onclick=\"sbell('".$vl."'); return true;\" style=\"font-size: 35px; width: 85px; height: 70px;\" type=\"button\" class=\"btn btn-dark\"><i class=\"fas fa-toggle-off\"></i></button>");
									}
									else
									{
										print("<button id=\"stat".$vl."\" onclick=\"sbell('".$vl."'); return true;\" style=\"font-size: 35px; width: 85px; height: 70px;\" type=\"button\" class=\"btn btn-success\"><i class=\"fas fa-toggle-on\"></i></button>");
									}
									print("</td>");
									print("<tr>");
									$i++;
								}
							?>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</body>
</html>