Your IP : 216.73.216.48
<?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");
$sfq=mysqli_query($db, "SELECT * FROM `ringbell` WHERE `i`='1' LIMIT 1;");
while($resf=mysqli_fetch_row($sfq))
{
$hoursf="".$resf[1]."";
$hstart="".$resf[2]."";
$hend="".$resf[3]."";
$hcoud="".$resf[4]."";
$music="".$resf[5]."";
$volume="".$resf[6]."";
$desf="".$resf[7]."";
$asts="".$resf[8]."";
}
$smq=mysqli_query($db, "SELECT * FROM `songs` WHERE `s`='".$music."' LIMIT 1;");
while($resm=mysqli_fetch_row($smq))
{
$songname="".$resm[2]."";
}
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/fa6/js/all.min.js" defer></script>
<script>
"use strict";
let fSize=0;
let uplfile="";
let uplfilename="";
let uplfilenameex="";
let uplpdfname="";
let uplpdfalrdy=0;
let mainid="";
let maincbell="";
let psong="";
function adds()
{
$("#mp").modal("show");
}
function pdelme()
{
$("#mww").modal("hide");
$("#mpdel").modal("show");
}
function pdelmereal()
{
$.ajax(
{
url: "/b/pdelreal.php",
type: "POST",
data: {"id": ""+uplfilename+"", "ex": ""+uplfilenameex+""},
success: function(data)
{
if (data!="ERR")
{
uplfilename="";
$("#puplno").css("display", "block");
$("#pfileok").css("display", "none");
$("#mww").modal("hide");
$("#mpdel").modal("hide");
}
else
{
srvrdwn();
}
}
});
}
function isMp3(s)
{
return s.toLowerCase().endsWith(".mp3");
}
function regp()
{
let errtxt="";
let errf=0;
let desc=$("#sdes").val().replace(/"/g, '"').replace(/'/g, ''');
if (uplfilename==="")
{
errtxt+="<br />- не сте качили файл";
errf++;
}
if (desc==="")
{
errtxt+="<br />- не сте написали име на изпълнител и песен";
errf++;
}
if (errf>0)
{
let erro=errf===1?"а":"и";
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Грешк"+erro+" при попълването");
$("#merrb").html(""+errtxt+"");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
}
else
{
$("#mp").modal("hide");
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/svp.php",
type: "POST",
data: {"d": ""+desc+"", "s": ""+uplfilename+""},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
$("#mok").modal("show");
$("#moky").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#111199\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><polyline class=\"path check\" fill=\"none\" stroke=\"#111199\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" points=\"100.2,40.2 51.5,88.8 29.8,67.5 \"/></svg>");
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
}
function pchu()
{
let err=0;
let upl=$("#pfile").val();
if (upl==="")
{
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Не сте избрали файл...");
$("#merrb").html("Не сте избрали файл за качване!<br />За да добавите мелодия, трябва да изберете песен в MP3 формат!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
err++;
}
else if (fSize>=21474830)
{
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Прекалено голям размер на файла...");
$("#merrb").html("Файлът не може да е по-голям от 20MB!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
err++;
}
else if (fSize==0)
{
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Празен файл...");
$("#merrb").html("Файлът е празен!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
err++;
}
else if (!isMp3(uplfile))
{
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Файлът не е правилен...");
$("#merrb").html("Файлът не е мелодия в MP3 формат!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
err++;
}
if (err==0)
{
if (isMp3(uplfile))
{
$("#mwwt").html("<i class=\"fas fa-file-audio\"></i> Вашият файл се качва...");
}
$("#mww").modal("show");
setTimeout(function(){ $("#filefrm").submit(); }, 1500);
}
}
function puplna()
{
$("#mww").modal("hide");
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Файлът не е правилен...");
$("#merrb").html("Файлът не е музикален или не е 44100 Кхц до 60 секунди като дължина!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
}
function puplok(fnm, ex)
{
uplfilename=fnm;
uplfilenameex=ex;
$("#puplno").css("display", "none");
$("#pfileok").css("display", "block");
$("#mww").modal("hide");
}
function upcvs()
{
$("#mww").modal("hide");
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Мелодията е неподходяща...");
$("#merrb").html("Мелодията не отговаря на изискванията.<br />Трябва да бъде семпъл 44 100 Hz и дължината му да е под 1 минута!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
}
function uplem()
{
$("#mww").modal("hide");
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Празен файл...");
$("#merrb").html("Файлът е празен!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merr").modal("show");
}
function uplerr()
{
$("#mww").modal("hide");
srvrdwn();
}
function wo()
{
window.open("/b/", "_self");
}
function srvrdwn()
{
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Проблем със сървъра");
$("#merrb").html("Има проблем със сървъра. Презаредете страницата като натиснете <a style=\"color: #FFFFFF; font-weight: bold; font-style: italic;\" href=\"javascript:void();\" onclick=\"location.reload(); return true;\">НА ТАЗИ ВРЪЗКА</a>.");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merrf").html("<button type=\"button\" onclick=\"window.open('/b/', '_self'); return true;\" class=\"btn btn-warning btn-lg\"><i class=\"fas fa-refresh\"></i> Презареди</button>");
$("#merr").modal("show");
}
function startb()
{
$("#msbt").html("<i class=\"fas fa-power-off\"></i> Пускане на звънеца");
$("#msba").html("Наистина ли пускате звънеца?");
$("#msb").modal("show");
}
function stopb()
{
$("#msbt").html("<i class=\"fas fa-power-off\"></i> Спиране на звънеца");
$("#msba").html("Наистина ли спирате звънеца?");
$("#msb").modal("show");
}
function sbelly(h, d)
{
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/chng.php",
type: "POST",
data: {"yid": ""+h+"", "des": ""+d+""},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
function sbell(h, d)
{
let hrs=h.split("|");
let bb="";
bb+="<div class=\"container-fluid\">";
bb+="<div class=\"row\">";
bb+="<div class=\"col-12\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<i><b>Сменяте ли режима на звънеца с този?</b></i><br /><br />";
bb+="</div>";
bb+="</div>";
bb+="<div class=\"row\">";
bb+="<div class=\"col-12\" style=\"font-size: 25px; font-weight: bold; color: #000099;\">";
bb+=""+d+"<br /><br />";
bb+="</div>";
bb+="</div>";
bb+="<div class=\"row\">";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="Час";
bb+="</div>";
bb+="<div class=\"col-9\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<div class=\"container-fluid m-0 p-0\">";
bb+="<div class=\"row m-0 p-0\">";
bb+="<div class=\"col-12 m-0 p-0\" style=\"border-bottom: dashed 1px #000099;\">";
bb+="Звънци";
bb+="</div>";
bb+="</div>";
bb+="<div class=\"row m-0 p-0\">";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Първи";
bb+="</div>";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Втори";
bb+="</div>";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Край";
bb+="</div>";
bb+="</div>";
bb+="</div>";
bb+="</div>";
bb+="</div>";
for (let i=1; i<=7; i++)
{
let clc=3*(i-1);
let f=1*clc;
let s=1*clc+1;
let l=1*clc+2;
bb+="<div class=\"row\">";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+=""+i+".";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+=""+hrs[f]+"";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+=""+hrs[s]+"";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+=""+hrs[l]+"";
bb+="</div>";
bb+="</div>";
}
bb+="</div>";
$("#mcht").html("<i class=\"fas fa-bell\"></i> Смяна на режима на звънеца");
$("#mcha").html(""+bb+"");
$("#mchf").html("<button type=\"button\" class=\"btn btn-primary btn-lg\" onclick=\"sbelly('"+h+"', '"+d+"'); return true;\"><i class=\"fas fa-check\"></i> Да</button><button type=\"button\" class=\"btn btn-danger btn-lg\" data-dismiss=\"modal\" aria-label=\"Затвори\"><i class=\"fas fa-times\"></i> Не</button>");
$("#mch").modal("show");
}
function poweroff()
{
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/ponoff.php",
type: "POST",
data: {"yid": "0"},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
function poweron()
{
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/ponoff.php",
type: "POST",
data: {"yid": "1"},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
function svdes()
{
let es="";
es=$("#bdes").val();
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/des.php",
type: "POST",
data: {"yid": ""+es+""},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
function svschange(i)
{
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/sndchange.php",
type: "POST",
data: {"yid": ""+i+""},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
function sets(i, s)
{
$("#msst").html("<i class=\"fas fa-music\"></i> Смяна на мелодията");
$("#mssa").html("Наистина ли сменяте мелодията на звънеца с тази:<br /><i>"+s+"</i>?");
$("#mssf").html("<button type=\"button\" class=\"btn btn-primary btn-lg\" onclick=\"svschange('"+i+"'); return true;\"><i class=\"fas fa-check\"></i> Да</button><button type=\"button\" class=\"btn btn-danger btn-lg\" data-dismiss=\"modal\" aria-label=\"Затвори\"><i class=\"fas fa-times\"></i> Не</button>");
$("#mss").modal("show");
}
function showcoud()
{
$("#mec").modal("show");
}
function showdes()
{
$("#med").modal("show");
}
function showcs()
{
$("#mcs").modal("show");
}
function evolume()
{
$("#mmm").modal("show");
}
function volch(v)
{
$("#volt").html(""+v+"%");
}
function svvolume()
{
let es="";
es=$("#volsl").val();
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/sndvol.php",
type: "POST",
data: {"yid": ""+es+""},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
function svcoud()
{
let es="";
es=$("#coud").val();
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/coud.php",
type: "POST",
data: {"yid": ""+es+""},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
function svedit()
{
let mb="";
let es="";
for (let i=1; i<=7; i++)
{
es=eval("$(\"#e"+i+"f\").val();");
if (mb=="")
{
mb=""+es+"";
}
else
{
mb=""+mb+"|"+es+"";
}
es=eval("$(\"#e"+i+"s\").val();");
mb=""+mb+"|"+es+"";
es=eval("$(\"#e"+i+"l\").val();");
mb=""+mb+"|"+es+"";
}
let repa=mb.split("|");
let repn=repa.length;
let rep="";
repn--;
for (let i=0; i<=repn; i++)
{
for (let k=i+1; k<=repn; k++)
{
if ((repa[i]==repa[k]) && (repa[i]!="-"))
{
rep=repa[i];
}
}
}
if (rep=="")
{
if (mb=="-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-")
{
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Няма избрани часове");
$("#merrb").html("Не сте избрали нито един час.<br />Ако не желаете звънецът да звъни, можете да го изключите, като натиснете бутона в ляво "Спри звънеца"!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merrf").html("<button type=\"button\" data-dismiss=\"modal\" class=\"btn btn-warning btn-lg\"><i class=\"fas fa-times\"></i> Затвори</button>");
$("#merr").modal("show");
}
else
{
$("#mwait").modal("show");
$("#mwaity").html("<div class=\"svg-loader\"><svg class=\"svg-container\" style=\"width: 100px; height: 100px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><circle class=\"loader-svg bg\" cx=\"50\" cy=\"50\" r=\"45\"></circle><circle class=\"loader-svg animate\" cx=\"50\" cy=\"50\" r=\"45\"></circle></svg></div>");
$.ajax(
{
url: "/b/hours.php",
type: "POST",
data: {"yid": ""+mb+""},
success: function(data)
{
setTimeout(function()
{
$("#mwait").modal("hide");
if (data!="ERR")
{
wo();
}
else
{
srvrdwn();
}
}, 1600);
}
});
}
}
else
{
$("#merrt").html("<i class=\"fas fa-exclamation-triangle\"></i> Съвпадащ час");
$("#merrb").html("Часът <b><i>"+rep+"</i></b> съвпада.<br />Моля, направете корекция преди да продължите!");
$("#merry").html("<svg style=\"width: 120px; height: 120px;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 130.2 130.2\"><circle class=\"path circle\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"7\" stroke-miterlimit=\"10\" cx=\"65.1\" cy=\"65.1\" r=\"62.1\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"34.4\" y1=\"37.9\" x2=\"95.8\" y2=\"92.3\"/><line class=\"path line\" fill=\"none\" stroke=\"#DDDDDD\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" x1=\"95.8\" y1=\"38\" x2=\"34.4\" y2=\"92.2\"/></svg>");
$("#merrf").html("<button type=\"button\" data-dismiss=\"modal\" class=\"btn btn-warning btn-lg\"><i class=\"fas fa-times\"></i> Затвори</button>");
$("#merr").modal("show");
}
}
function as2(i, l)
{
const newSelectId="e"+i+""+l+"";
const $newSelectElement=$("#" + newSelectId);
if ($newSelectElement.length > 0)
{
$newSelectElement.select2(
{
width: "80%",
minimumInputLength: 0,
dropdownParent: $("#meb"),
language:
{
noResults: function() { return "Няма такъв час"; },
escapeMarkup: function (markup) { return markup; }
}
});
}
}
function ebell(id, cbell)
{
mainid=id;
maincbell=cbell;
let b=1;
let bb="";
bb+="<div class=\"container-fluid\">";
bb+="<div class=\"row\">";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="Час";
bb+="</div>";
bb+="<div class=\"col-9\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<div class=\"container-fluid m-0 p-0\">";
bb+="<div class=\"row m-0 p-0\">";
bb+="<div class=\"col-12 m-0 p-0\" style=\"border-bottom: dashed 1px #000099;\">";
bb+="Звънци";
bb+="</div>";
bb+="</div>";
bb+="<div class=\"row m-0 p-0\">";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Първи";
bb+="</div>";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Втори";
bb+="</div>";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Край";
bb+="</div>";
bb+="</div>";
bb+="</div>";
bb+="</div>";
bb+="</div>";
for (let i=1; i<=7; i++)
{
bb+="<div class=\"row\">";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+=""+i+".";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<select id=\"e"+i+"f\">";
bb+="<option value=\"-\">-</option>";
for (let j=0; j<=425; j=j+5)
{
let h=7;
let m=55;
m+=j;
if (m>=60)
{
while (m>=60)
{
m-=60;
h++;
}
}
let t=`${h<10?'0':''}${h}:${m<10?'0':''}${m}`;
bb+="<option value=\""+t+"\">"+t+"</option>";
}
bb+="</select>";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<select id=\"e"+i+"s\">";
bb+="<option value=\"-\">-</option>";
for (let j=0; j<=425; j=j+5)
{
let h=7;
let m=55;
m+=j;
if (m>=60)
{
while (m>=60)
{
m-=60;
h++;
}
}
let t=`${h<10?'0':''}${h}:${m<10?'0':''}${m}`;
bb+="<option value=\""+t+"\">"+t+"</option>";
}
bb+="</select>";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<select id=\"e"+i+"l\">";
bb+="<option value=\"-\">-</option>";
for (let j=0; j<=425; j=j+5)
{
let h=7;
let m=55;
m+=j;
if (m>=60)
{
while (m>=60)
{
m-=60;
h++;
}
}
let t=`${h<10?'0':''}${h}:${m<10?'0':''}${m}`;
bb+="<option value=\""+t+"\">"+t+"</option>";
}
bb+="</select>";
bb+="</div>";
bb+="</div>";
}
bb+="</div>";
$("#mebb").html(""+bb+"");
if (cbell=="")
{
cbell="07:55|08:00|08:40|08:50|08:55|09:35|09:40|09:45|10:25|10:45|10:50|11:30|11:35|11:40|12:20|12:25|12:30|13:10|13:15|13:20|14:00";
}
let cbella=cbell.split("|");
let bc=0;
for (let i=1; i<=7; i++)
{
as2(i, "f");
as2(i, "s");
as2(i, "l");
eval("$(\"#e"+i+"f\").val(\""+cbella[bc]+"\").trigger(\"change\");");
bc++;
eval("$(\"#e"+i+"s\").val(\""+cbella[bc]+"\").trigger(\"change\");");
bc++;
eval("$(\"#e"+i+"l\").val(\""+cbella[bc]+"\").trigger(\"change\");");
bc++;
}
$("#meb").modal("show");
}
function editb(cbell)
{
let b=1;
let bb="";
bb+="<div class=\"container-fluid\">";
bb+="<div class=\"row\">";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="Час";
bb+="</div>";
bb+="<div class=\"col-9\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<div class=\"container-fluid m-0 p-0\">";
bb+="<div class=\"row m-0 p-0\">";
bb+="<div class=\"col-12 m-0 p-0\" style=\"border-bottom: dashed 1px #000099;\">";
bb+="Звънци";
bb+="</div>";
bb+="</div>";
bb+="<div class=\"row m-0 p-0\">";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Първи";
bb+="</div>";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Втори";
bb+="</div>";
bb+="<div class=\"col-4 m-0 p-0\">";
bb+="Край";
bb+="</div>";
bb+="</div>";
bb+="</div>";
bb+="</div>";
bb+="</div>";
for (let i=1; i<=7; i++)
{
bb+="<div class=\"row\">";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+=""+i+".";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<select id=\"e"+i+"f\">";
bb+="<option value=\"-\">-</option>";
for (let j=0; j<=425; j=j+5)
{
let h=7;
let m=55;
m+=j;
if (m>=60)
{
while (m>=60)
{
m-=60;
h++;
}
}
let t=`${h<10?'0':''}${h}:${m<10?'0':''}${m}`;
bb+="<option value=\""+t+"\">"+t+"</option>";
}
bb+="</select>";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<select id=\"e"+i+"s\">";
bb+="<option value=\"-\">-</option>";
for (let j=0; j<=425; j=j+5)
{
let h=7;
let m=55;
m+=j;
if (m>=60)
{
while (m>=60)
{
m-=60;
h++;
}
}
let t=`${h<10?'0':''}${h}:${m<10?'0':''}${m}`;
bb+="<option value=\""+t+"\">"+t+"</option>";
}
bb+="</select>";
bb+="</div>";
bb+="<div class=\"col-3\" style=\"font-size: 25px; font-weight: bold; color: #000000;\">";
bb+="<select id=\"e"+i+"l\">";
bb+="<option value=\"-\">-</option>";
for (let j=0; j<=425; j=j+5)
{
let h=7;
let m=55;
m+=j;
if (m>=60)
{
while (m>=60)
{
m-=60;
h++;
}
}
let t=`${h<10?'0':''}${h}:${m<10?'0':''}${m}`;
bb+="<option value=\""+t+"\">"+t+"</option>";
}
bb+="</select>";
bb+="</div>";
bb+="</div>";
}
bb+="</div>";
$("#mebb").html(""+bb+"");
if (cbell=="")
{
cbell="07:55|08:00|08:40|08:50|08:55|09:35|09:40|09:45|10:25|10:45|10:50|11:30|11:35|11:40|12:20|12:25|12:30|13:10|13:15|13:20|14:00";
}
let cbella=cbell.split("|");
let bc=0;
for (let i=1; i<=7; i++)
{
as2(i, "f");
as2(i, "s");
as2(i, "l");
eval("$(\"#e"+i+"f\").val(\""+cbella[bc]+"\").trigger(\"change\");");
bc++;
eval("$(\"#e"+i+"s\").val(\""+cbella[bc]+"\").trigger(\"change\");");
bc++;
eval("$(\"#e"+i+"l\").val(\""+cbella[bc]+"\").trigger(\"change\");");
bc++;
}
$("#meb").modal("show");
}
function stops(id)
{
$("#aplays")[0].pause();
$("#psng"+id+"").removeClass("btn-danger");
$("#psng"+id+"").addClass("btn-primary");
$("#psng"+id+"").attr("onclick", "plays('"+id+"'); return true;");
$("#psng"+id+"").html("<i class=\"fas fa-play-circle\"></i>");
}
function plays(id)
{
if ((psong!=="") && (psong!==id))
{
stops(psong);
}
psong=id;
$("#psng"+id+"").removeClass("btn-primary");
$("#psng"+id+"").addClass("btn-danger");
$("#psng"+id+"").attr("onclick", "stops('"+id+"'); return true;");
$("#psng"+id+"").html("<i class=\"fas fa-stop-circle\"></i>");
$("#aplays").attr("src", "/b/up/"+id+".mp3");
$("#aplays")[0].load();
$("#aplays")[0].pause();
$("#aplays")[0].play();
}
$(document).ready(function()
{
$("#coud").select2(
{
width: "80%",
minimumInputLength: 0,
dropdownParent: $("#mec"),
language:
{
noResults: function() { return "Няма такъв час"; },
escapeMarkup: function (markup) { return markup; }
}
});
$("#coud").val("<?php print("".$hcoud.""); ?>").trigger("change");
$(".modal").on("hidden.bs.modal", function(e)
{
if ($(".modal:visible").length)
{
$("body").addClass("modal-open");
}
});
let $dropZone=$("#puplno");
let $fileInput=$("#pfile");
$(document).on("dragenter dragover dragleave drop", function(e)
{
e.preventDefault();
e.stopPropagation();
});
$dropZone.on("dragenter dragover", function(e)
{
e.preventDefault();
e.stopPropagation();
$dropZone.addClass("hover");
});
$dropZone.on("dragleave drop", function(e)
{
e.preventDefault();
e.stopPropagation();
$dropZone.removeClass("hover");
});
$dropZone.on("drop", function(e)
{
let files=e.originalEvent.dataTransfer.files;
if (files.length>0)
{
let dataTransfer=new DataTransfer();
dataTransfer.items.add(files[0]);
$fileInput[0].files=dataTransfer.files;
$fileInput.trigger("change");
}
});
$dropZone.on("dragleave", function(e)
{
let $target=$(e.target);
if (!$target.is($dropZone) && $.contains($dropZone[0], $target[0]))
{
return;
}
$dropZone.removeClass('hover');
});
$("#pfile").on("change", function()
{
fSize=document.getElementById("pfile").files[0].size;
uplfile=$("#pfile").val();
uplfile=uplfile.replace("C:\\fakepath\\","");
pchu();
});
});
</script>
<style>
html, body
{
background-color: #112233;
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
font-size: 20px;
margin: 0;
}
label
{
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
font-size: 28px;
margin: 0;
width: 100%;
color: #112233;
}
a, div, input, h1, h2, h3, p
{
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
}
a.dropdown-item
{
color: #DDDDDD!important;
}
a.dropdown-item:hover
{
color: #FFFFFF!important;
background-color: transparent!important;
}
.fh
{
position: relative;
margin-bottom: 10px;
}
.fi
{
outline: none;
}
.fl
{
position: absolute;
text-align: left;
top: 15px;
left: 0;
font-size: 20px;
color: #777777;
cursor: text;
opacity: 0;
transition: .3s ease-in-out;
}
.fi:focus + .fl
{
color: #DDDDDD;
font-size: 15px;
top: -20px;
margin-left: 5px;
text-align: left;
pointer-events: none;
opacity: 1;
transition: .3s ease-in-out;
}
.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;
}
.o
{
background: #112233;
color: #fff;
font-weight: bold;
max-width: 290px;
overflow-x: hidden;
white-space: normal;
}
.select2-search, .select2-search input, .select2-results, .select2-container--default .select2-selection--single, .select2-selection__rendered
{
font-weight: bold!important;
min-height: 45px!important;
line-height: 40px!important;
font-size: 25px!important;
}
.datepicker
{
z-index: 3600!important;
border: none;
}
.table-condensed
{
width: 280px;
height: 280px;
}
input[type="checkbox"]
{
vertical-align: middle;
}
::-webkit-scrollbar
{
width: 10px;
}
::-webkit-scrollbar-track
{
background-color: #115533;
}
::-webkit-scrollbar-thumb
{
background-color: #DDDDDD;
border-radius: 5px;
}
.switchbtn
{
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switchbtn input
{
display: none;
}
.slider
{
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before
{
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input.success:checked + .slider
{
background-color: #3333DD;
}
input:focus + .slider
{
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before
{
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
.slider.round
{
border-radius: 34px;
}
.slider.round:before
{
border-radius: 50%;
}
.path
{
stroke-dasharray: 1000;
stroke-dashoffset: 0;
&.circle
{
-webkit-animation: dash 1.8s ease-in-out;
animation: dash 1.8s ease-in-out;
}
&.line
{
stroke-dashoffset: 1000;
-webkit-animation: dash 1.8s .7s ease-in-out forwards;
animation: dash 1.8s .7s ease-in-out forwards;
}
&.check
{
stroke-dashoffset: -100;
-webkit-animation: dash-check 1.8s .7s ease-in-out forwards;
animation: dash-check 1.8s .7s ease-in-out forwards;
}
}
.svg-loader
{
display: flex;
position: relative;
align-content: space-around;
justify-content: center;
}
.loader-svg
{
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
fill: none;
stroke-width: 5px;
stroke-linecap: round;
stroke: rgb(64, 0, 148);
}
.loader-svg.bg
{
stroke-width: 8px;
stroke: rgb(207, 205, 245);
}
.drag-drop-zone
{
border: 2px dashed #999;
border-radius: 5px;
padding: 10px;
text-align: center;
transition: all 0.2s ease;
}
.drag-drop-zone.hover
{
border-color: #28a745;
background-color: #e9ecef;
}
p
{
text-align: center;
margin: 20px 0 60px;
font-size: 1.25em;
&.success
{
color: #73AF55;
}
&.error
{
color: #D06079;
}
}
@-webkit-keyframes dash
{
0%
{
stroke-dashoffset: 1000;
}
100%
{
stroke-dashoffset: 0;
}
}
@keyframes dash
{
0%
{
stroke-dashoffset: 1000;
}
100%
{
stroke-dashoffset: 0;
}
}
@-webkit-keyframes dash-check
{
0%
{
stroke-dashoffset: -100;
}
100%
{
stroke-dashoffset: 900;
}
}
@keyframes dash-check
{
0%
{
stroke-dashoffset: -100;
}
100%
{
stroke-dashoffset: 900;
}
}
.animate
{
stroke-dasharray: 242.6;
animation: fill-animation 1s cubic-bezier(1,1,1,1) 0s infinite;
}
@keyframes fill-animation
{
0%
{
stroke-dasharray: 40 242.6;
stroke-dashoffset: 0;
}
50%
{
stroke-dasharray: 141.3;
stroke-dashoffset: 141.3;
}
100%
{
stroke-dasharray: 40 242.6;
stroke-dashoffset: 282.6;
}
}
</style>
</head>
<body>
<iframe id="frms" name="frms" src="about:blank" style="position: absolute; top: 0px; left: 0px; border: none; frameborder: none; width: 0px; height: 0px; overflow: hidden; z-index: 1;"></iframe>
<audio id="aplays" style="display: none;"></audio>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mok" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mok" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mokt">
<i class="fas fa-check-circle"></i> Готово
</h5>
</div>
<div class="modal-body" style="text-align: center;">
<br /><b>Готово!</b>
<br />
<br />
<div id="moky">
</div>
</div>
<div class="modal-footer">
<button type="button" onclick="location.reload(); return true;" class="btn btn-primary btn-lg"><i class="fas fa-check"></i> Добре</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mpdel" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mpdel" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; font-size: 30px;" id="mpdelt">
<i class="fas fa-exclamation-triangle"></i> Изтривате ли файла?
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true">×</span>
</button>
</div>
<div id="mdelb" class="modal-body">
Сигурни ли сте, че желаете да изтриете току-що качения от Вас файл?<br />Няма да можете да качите мелодия, ако нямате прикачен файл.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-lg" onclick="pdelmereal(); return true;" aria-label="Да"><i class="fas fa-trash"></i> Да</button>
<button type="button" class="btn btn-warning btn-lg" data-dismiss="modal" aria-label="Не"><i class="fas fa-times"></i> Не</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 2222;" class="modal fade" id="mp" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mp" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content" style="background-color: #BBBBBB;">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mpt">
<i class="fab fa-itunes-note"></i> Добави мелодия
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #112233;">×</span>
</button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div id="pfiled" class="row" style="margin-bottom: 10px;">
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
<strong>Файл за качване:</strong>
</div>
<div class="col-12 col-sm-12 col-md-6 col-lg-8 col-xl-8">
<div id="puplno" class="drag-drop-zone">
<div id="puplret" style="position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; overflow: hidden; z-index: 1000;">
</div>
<form id="filefrm" action="/b/pupload.php" target="frms" enctype="multipart/form-data" name="filefrm" method="POST">
<label id="pfilelbl" for="pfile" class="btn btn-lg btn-warning" style="width: 100%; text-align: center; cursor: pointer;">
<input type="file" accept=".mp3, audio/mpeg" capture="environment" id="pfile" name="pfile" style="display: none;" />
<i class="fas fa-upload"></i> Плъзнете файлa тук<br />или щракнете на бутона за качване
</label>
</form>
</div>
<div id="pfileok" style="display: none;">
<div class="container-fluid">
<div class="row">
<div style="font-weight; bold; text-align: left; color: #112233;" class="col-9 m-0 p-0">
<button type="button" class="btn btn-lg btn-info" style="width: 100%; text-align: center; cursor: default;" disabled><i class="fas fa-check"></i> качен</button>
</div>
<div style="text-align: right;" class="col-3 m-0 p-0">
<button type="button" onclick="pdelme(); return true;" class="btn btn-lg btn-danger" style="width: 75px; text-align: center; cursor: pointer;"><i class="fas fa-trash"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div class="row">
<div class="col-12" style="text-align: center;">
<b>Въведете изпълнител
<br />и име на песента:</b>
</div>
</div>
<div class="row">
<div class="col-1">
</div>
<div class="col-10">
<input id="sdes" name="sdes" type="text" value="" style="width: 100%;" class="form-control form-control-lg" />
</div>
<div class="col-1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-lg btn-light" onclick="regp(); return true;"><i class="fas fa-cloud-arrow-up"></i> Качете песента</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="meb" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="meb" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mebt">
<i class="fas fa-clock"></i> Редактиране на текущия звънец
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div id="mebb" class="modal-body" style="text-align: center;">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-lg" onclick="svedit(); return true;"><i class="fas fa-save"></i> Запиши</button>
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" aria-label="Затвори"><i class="fas fa-times"></i> Затвори</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mec" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mec" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mect">
<i class="fas fa-clock"></i> Редактиране на звънеца за ЦОУД
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div class="row">
<div class="col-12" style="text-align: center;">
<b>Изберете час за звънеца за ЦОУД,
<br />обявяващ край на занятието
<br />"Организиран отдих и физическа активност":</b>
</div>
</div>
<div class="row">
<div class="col-3">
</div>
<div class="col-6">
<select id="coud">
<option value="-">-</option>
<option value="14:10">14:10</option>
<option value="14:15">14:15</option>
<option value="14:20">14:20</option>
<option value="14:25">14:25</option>
<option value="14:30">14:30</option>
<option value="14:35">14:35</option>
<option value="14:40">14:40</option>
<option value="14:45">14:45</option>
<option value="14:50">14:50</option>
<option value="14:55">14:55</option>
<option value="15:00">15:00</option>
<option value="15:05">15:05</option>
<option value="15:10">15:10</option>
<option value="15:15">15:15</option>
<option value="15:20">15:20</option>
<option value="15:25">15:25</option>
<option value="15:30">15:30</option>
</select>
</div>
<div class="col-3">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-lg" onclick="svcoud(); return true;"><i class="fas fa-save"></i> Запиши</button>
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" aria-label="Затвори"><i class="fas fa-times"></i> Затвори</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="med" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="med" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="medt">
<i class="fas fa-info-circle"></i> Редактиране на описанието
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div class="row">
<div class="col-12" style="text-align: center;">
<b>Въведете Ваше описание,
обясняващо режима на текущия звънец:</b>
</div>
</div>
<div class="row">
<div class="col-1">
</div>
<div class="col-10">
<input id="bdes" name="bdes" type="text" value="<?php print("".$desf.""); ?>" style="width: 100%;" class="form-control form-control-lg" />
</div>
<div class="col-1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-lg" onclick="svdes(); return true;"><i class="fas fa-save"></i> Запиши</button>
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" aria-label="Затвори"><i class="fas fa-times"></i> Затвори</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mch" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mch" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mcht">
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div class="row">
<div id="mcha" class="col-12" style="font-weight: bold; text-align: center;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="mchf" class="modal-footer">
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="msb" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="msb" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="msbt">
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div class="row">
<div id="msba" class="col-12" style="font-weight: bold; text-align: center;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-lg" onclick="<?php if ($asts==1) { print("poweroff()"); } else { print("poweron()"); } ?>; return true;"><i class="fas fa-power-off"></i> Да</button>
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" aria-label="Затвори"><i class="fas fa-times"></i> Не</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mmm" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mmm" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mmmt">
<i class="fas fa-volume-high"></i> Сила на звука
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div class="row">
<div class="col-12" style="text-align: center;">
<b>Изберете сила на звука:</b>
</div>
</div>
<div class="row">
<div class="col-3">
</div>
<div class="col-6">
<input type="range" onchange="volch(this.value); return true;" class="form-control-range" id="volsl" value="<?php print("".$volume.""); ?>" min="5" max="100" step="5" style="width: 100%;" />
<div id="volt" style="width: 100%; text-align: right; font-weight: bold;">
<?php print("".$volume.""); ?>%
</div>
</div>
<div class="col-3">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-lg" onclick="svvolume(); return true;"><i class="fas fa-save"></i> Запиши</button>
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" aria-label="Затвори"><i class="fas fa-times"></i> Затвори</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mcs" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mcs" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mcst">
<i class="fas fa-music"></i> Списък с песни
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<div class="container-fluid">
<div class="row">
<div style="font-weight: bold; text-align: center; padding-top: 10px; padding-bottom: 10px; border: dashed 1px #000099" class="col-9">
Песен
</div>
<div style="font-weight: bold; text-align: center; padding-top: 10px; padding-bottom: 10px; border: dashed 1px #000099" class="col-3">
Действия
</div>
</div>
<?php
$sq=mysqli_query($db, "SELECT * FROM `songs` ORDER BY `d` ASC;");
while($ress=mysqli_fetch_row($sq))
{
$sng=str_replace("'", "`", $ress[2]);
print("<div class=\"row align-items-center\" style=\"border: dashed 1px #000099;\">");
print("<div style=\"font-weight: bold; text-align: left;\" class=\"col-9\">");
print("".$sng."");
print("</div>");
print("<div style=\"font-weight: bold; text-align: center; border-left: dashed 1px #000099\" class=\"col-3\">");
print("<button id=\"psng".$ress[1]."\" onclick=\"plays('".$ress[1]."'); return true;\" style=\"margin-top: 5px; margin-bottom: 5px; width: 45%;\" type=\"button\" class=\"btn btn-primary\">");
print("<i class=\"fas fa-play-circle\"></i>");
print("</button> ");
if ($music==$ress[1])
{
print("<button id=\"ssng".$ress[1]."\" style=\"margin-top: 5px; margin-bottom: 5px; width: 45%;\" type=\"button\" class=\"btn btn-success\">");
print("<i class=\"fas fa-toggle-on\"></i>");
print("</button>");
}
else
{
print("<button id=\"ssng".$ress[1]."\" onclick=\"sets('".$ress[1]."', '".$sng."'); return true;\" style=\"margin-top: 5px; margin-bottom: 5px; width: 45%;\" type=\"button\" class=\"btn btn-dark\">");
print("<i class=\"fas fa-toggle-off\"></i>");
print("</button>");
}
print("</div>");
print("</div>");
}
?>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" aria-label="Затвори"><i class="fas fa-times"></i> Затвори</button>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mss" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mss" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content" style="background-color: #FFFF44;">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="msst">
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #111111;">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div class="row">
<div id="mssa" class="col-12" style="font-weight: bold; text-align: center;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="mssf" class="modal-footer">
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3999;" class="modal fade" id="mww" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mww" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div style="font-size: 30px; font-weight: bold;" class="modal-content" style="background-color: #FFFF44;">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mwwt">
</h5>
</div>
<div class="modal-body">
<div id="mwwb" style="text-align: center; font-size: 28px; font-weight: bold;" class="modal-body">
Моля, изчакайте...
<br />
</div>
<hr />
<center>
<div style="position: relative; margin: 0 auto; width: 280px; height: 25px; border: none; text-align: left;">
<div style="position: absolute; top: 0px; left: 5px; width: 180px; text-align: left; font-style: italic; font-size: 18px; z-index: 1000;">
Статус:
</div>
<div id="status-p" style="position: absolute; top: 0px; left: 190px; width: 85px; text-align: right; font-weight: bold; font-size: 18px; z-index: 1000;">
0%
</div>
</div>
<div style="position: relative; margin: 0 auto; width: 280px; border-radius: 3px; height: 20px; border: 1px solid #000000; text-align: left;"><div id="progress-bar" style="margin: 5px; border-radius: 2px; background-color: #000099; height: 10px; color: #FFFFFF; width: 0px; -webkit-transition: width 0.3s; -moz-transition: width 0.3s; transition: width 0.3s;"></div>
</center>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="mwait" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="mwait" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content" style="background-color: #FFFF88;">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #112233; font-size: 30px;" id="mwaitt">
<i class="fas fa-refresh"></i> Моля, изчакайте...
</h5>
</div>
<div style="text-align: center;" class="modal-body">
<br />
<br />Моля, изчакайте...
<br />
<br />
<div id="mwaity">
</div>
</div>
</div>
</div>
</div>
<div style="position: fixed; z-index: 3210;" class="modal fade" id="merr" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="merr" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width: 95%;">
<div class="modal-content" style="background-color: #DD3333;">
<div class="modal-header">
<h5 class="modal-title" style="font-weight: bold; color: #DDDDDD; font-size: 30px;" id="merrt">
</h5>
<button type="button" style="font-size: 45px;" class="close" data-dismiss="modal" aria-label="Затвори">
<span aria-hidden="true" style="color: #DDDDDD;">×</span>
</button>
</div>
<div class="modal-body" style="color: #DDDDDD;">
<div id="merrb">
</div>
<div id="merry" style="text-align: center;">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-warning btn-lg" data-dismiss="modal" aria-label="Затвори"><i class="fas fa-times"></i> Затвори</button>
</div>
</div>
</div>
</div>
<?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">"Васил Левски"</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;">
<i class="fas fa-bell" style="min-width: 50px;"></i> Текущ звънец:
<br /><i class="fas fa-clock" style="min-width: 50px;"></i> <button class="btn btn-warning" id="editb" onclick="ebell('c', '<?php print("".$hoursf.""); ?>'); return true;"><i class="fas fa-pen"></i></button> Начало и край: <b><?php print("".$hstart.""); ?>-<?php print("".$hend.""); ?></b>
<br /><i class="fab fa-itunes-note" style="min-width: 50px;"></i> <button class="btn btn-primary" onclick="showcs(); return true;"><i class="fas fa-refresh"></i></button> Песен: <i><?php print("".$songname.""); ?></i>
<br /><i class="fas fa-volume-high" style="min-width: 50px;"></i> <button class="btn btn-primary" onclick="evolume(); return true;"><i class="fas fa-refresh"></i></button> Сила на звука: <b><?php print("".$volume.""); ?>%</b>
<br /><i class="fas fa-clock" style="min-width: 50px;"></i> <button class="btn btn-warning" onclick="showcoud(); return true;"><i class="fas fa-pen"></i></button> Час за влизане на ЦОУД: <b><?php print("".$hcoud.""); ?></b>
<br /><i class="fas fa-info-circle" style="min-width: 50px;"></i> <button class="btn btn-warning" onclick="showdes(); return true;"><i class="fas fa-pen"></i></button> Описание: <i><?php print("".$desf.""); ?></i>
</div>
<div class="col-4" style="margin-bottom: 20px; font-size: 25px; font-weight: bold; color: #DDDDDD;">
<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 /><br /><br />
<?php
if ($asts==1)
{
?>
<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>
<?php
}
else
{
?>
<button id="playb" onclick="startb(); return true;" style="margin-bottom: 5px; font-size: 35px; width: 95%; height: 70px;" type="button" class="btn btn-info">
<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>
<?php
}
?>
</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: 200px; width: 200px;">Начало</th>
<th style="vertical-align: middle; text-align: center; max-width: 150px; min-width: 200px; width: 200px;">Край</th>
<th style="vertical-align: middle; text-align: center; max-width: 300px; min-width: 200px; width: 200px;">Действие</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];
$hourchk=$res[1];
$des=$res[4];
$starth=$res[2];
$endh=$res[3];
$schbell=$res[1];
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;\">");
if ($hourchk==$hoursf)
{
print("<button id=\"stat".$vl."\" style=\"font-size: 35px; width: 85px; height: 70px;\" type=\"button\" class=\"btn btn-success\"><i class=\"fas fa-toggle-on\"></i></button>");
}
else
{
print("<button id=\"stat".$vl."\" onclick=\"sbell('".$hourchk."','".$des."'); return true;\" style=\"font-size: 35px; width: 85px; height: 70px;\" type=\"button\" class=\"btn btn-dark\"><i class=\"fas fa-toggle-off\"></i></button>");
}
print("</td>");
print("<tr>");
$i++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>