WebSite
we need 2 Pages for use this alarm. ThePage : Alarme.html
This page enable/disable the alarm. <?php
session_start ();
if (!isset($_SESSION['login']) || !isset($_SESSION['pwd']))
{
header("location:login.php");
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DOMOS</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Bootstrap -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script><link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Domos Phil & Mag</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Alarme<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="domos.php">Activation</a></li>
<li><a href="setupalarm.php">Configuration</a></li>
</ul>
</li>
<li><a href="temperature.php">Confort</a></li>
<li><a href="Switch.php">Commande</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="deconnexion.php">Se déconnecter</a></li>
</ul>
</div>
</div>
</nav>
<div>
<?php
$db=mysql_connect('localhost','yourLogin','yourPassword');
mysql_select_db('ALARME',$db);
if (isset($_POST["setAlarme"]))
{
if ($_POST["setAlarme"]=="ON")
{
$sqlUpdate="UPDATE AlarmeState SET Status=1;";
mysql_query($sqlUpdate);
// echo "update ON";
}
if ($_POST["setAlarme"]=="OFF")
{
$sqlUpdate="UPDATE AlarmeState SET Status=0;";
mysql_query($sqlUpdate);
// echo "update OFF";
}
header('Location: ?');
}
$sql='SELECT * FROM AlarmeState;';
$req=mysql_query($sql); // or die('Erreur SQL!<br>.$sql.'<br>'.mysql_error());
while($data=mysql_fetch_assoc($req))
{
if ($data['Status']==1)
$_AlarmeStatus='ON';
else
$_AlarmeStatus='OFF';
// echo '<br>Alarme Status : '.$data['Status'];
}
//$mysql_close($db);
?>
<br>
</div>
<div class="container">
<div class="page-header row">
<h4 class="glyphicon glyphicon-home text-primary col-xs-8"> Fil&Mag</h4>
</div>
<div class="row">
<div class="panel panel-primary">
<div class="panel-heading ">
<h5 class="panel-title"> Alarme status : <span><?php echo $_AlarmeStatus; ?></span></h5>
</div>
<div class="panel-body">
<div class="container col-xs-8">
<form method="post" role="form" class="row">
<div class="col-xs-5"><button type="button" class="btn btn-default btn-lg btn-block" onClick="$('input[type=hidden]').attr('value','ON');this.form.submit();" >ON</button> </div>
<div class="col-xs-5"><button type="button" class="btn btn-default btn-lg btn-block" onClick="$('input[type=hidden]').attr('value','OFF');this.form.submit();">OFF</button></div>
<input name="setAlarme" type="hidden" id="setAlarme" value="NULL" />
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-5">
<button type="button" class="btn btn-default btn-lg" onclick="window.location.href ='calendrier.php';" >
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> Planning
</button>
</div>
</div>
</div>
</body>
</html>
Page SetupAlarm.php
We can plan this alarm, for each day of the week. <?php
session_start ();
if (!isset($_SESSION['login']) || !isset($_SESSION['pwd']))
{
header("location:login.php");
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<!--<script src='jqtouch.js'></script>-->
<script src="Scripts/jquery-2.1.3.js"></script>
<script src="Scripts/bootstrap.js"></script>
<link href="Content/bootstrap.css" rel="stylesheet" />
<link href="Content/bootstrap-theme.css" rel="stylesheet" />
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.0/css/bootstrap-toggle.min.css" rel="stylesheet" />
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.0/js/bootstrap-toggle.min.js"></script>
<script type="text/javascript">
function SelectAll(jour) {
for (i = 0; i < 24; i++) {
var elt = document.getElementsByName(jour + i)[0];
toggleOnByInput(elt);
}
}
function copie(jour) {
semaine = ['L', 'M', 'W', 'J', 'V', 'S', 'D'];
for (j = 0; j < 7; j++) {
for (i = 0; i < 24; i++) {
if (jour != semaine[j]) {
if (document.getElementsByName(jour + i)[0].checked == true)
toggleOnByInput(document.getElementsByName(semaine[j] + i)[0]);
else
toggleOffByInput(document.getElementsByName(semaine[j] + i)[0]);
}
}
}
}
function toggleOnByInput(element) {
$(element).prop('checked', true).change()
}
function toggleOffByInput(element) {
$(element).prop('checked', false).change()
}
function setToggle(element, value) {
if (value == true)
toggleOnByInput(element);
else
toggleOffByInput(element);
}
function btnreset() {
semaine = ['L', 'M', 'W', 'J', 'V', 'S', 'D'];
for (j = 0; j < 7; j++) {
for (i = 0; i < 24; i++) {
toggleOffByInput(document.getElementsByName(semaine[j] + i)[0]);
}
}
}
function SavePlanning() {
//mettre les valeurs des controles dans la variable setPlanningAlarme
chainePlanning = '';
semaine = ['L', 'M', 'W', 'J', 'V', 'S', 'D'];
for (j = 0; j < 7; j++) {
for (i = 0; i < 24; i++) {
if (document.getElementsByName(semaine[j] + i)[0].checked == true)
chainePlanning = chainePlanning + 1;
else
chainePlanning = chainePlanning + 0;
}
}
$('#setPlanningAlarme').attr('value', chainePlanning);
this.document.forms[0].submit();
}
//function loadPlanning(planning) {
// semaine = ['L', 'M', 'W', 'J', 'V', 'S', 'D'];
// idplanning = 0;
// for (j = 0; j < 7; j++) {
// for (i = 0; i < 24; i++) {
// if (planning[idplanning] == 1)
// toggleOnByInput(document.getElementsByName(semaine[j] + i)[0]);
// else
// toggleOffByInput(document.getElementsByName(semaine[j] + i)[0]);
// idplanning++;
// }
// }
//}
</script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Domos Phil & Mag</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Alarme<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="domos.php">Activation</a></li>
<li><a href="calendrier.php">Configuration</a></li>
</ul>
</li>
<li><a href="temperature.php">Confort</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="deconnexion.php">Se déconnecter</a></li>
</ul>
</div>
</div>
</nav>
<?php
//Mettre a jour la table planning
// jour heure
// lundi 1110100000001
// mardi 0110100000001
$db=mysql_connect('localhost','yourLogin','yourPassword');
mysql_select_db('ALARME',$db);
if (isset($_POST["setPlanningAlarme"]))
{
$vs=$_POST["setPlanningAlarme"];
//Sauvegarde en base
$sqlUpdate="UPDATE Plannings SET PlanningName='alarme',Semaine='". $vs ."';";
mysql_query($sqlUpdate);
//echo $v[0];
header('Location: ?');
}
// Chargement des valeurs de la base
$sql="SELECT Semaine FROM Plannings where PlanningName like 'alarme';";
$req=mysql_query($sql); // or die('Erreur SQL!<br>.$sql.'<br>'.mysql_error());
while($data=mysql_fetch_assoc($req))
{
$v=$data['Semaine'];
}
//$mysql_close($db);
?>
<div class="panel">
<div class="panel-title">
<h1>Planning</h1>
</div>
<div class="panel-body">
<!--<div style="overflow-x:scroll">-->
<table>
<!--class="table table-responsive" >-->
<!-- Titre -->
<tr>
<th>Jour</th>
<th>
<!--<p class="bg-info">Tous</p>-->
</th>
<th>
<!--<p class="bg-info">Recopier</p>-->
</th>
<th>00H</th>
<th>01H</th>
<th>02H</th>
<th>03H</th>
<th>04H</th>
<th>05H</th>
<th>06H</th>
<th>07H</th>
<th>08H</th>
<th>09H</th>
<th>10H</th>
<th>11H</th>
<th>12H</th>
<th>13H</th>
<th>14H</th>
<th>15H</th>
<th>16H</th>
<th>17H</th>
<th>18H</th>
<th>19H</th>
<th>20H</th>
<th>21H</th>
<th>22H</th>
<th>23H</th>
</tr>
<!--Lundi-->
<tr>
<td style="vertical-align: middle;">Lundi
</td>
<td style="vertical-align: middle;">
<button type="button" name="L" onclick="SelectAll('L');" class="btn btn-sm">all</button>
</td>
<td style="vertical-align: middle;">
<button type="button" name="LC" onclick="copie('L');" class="btn btn-sm">copy</button>
</td>
<td>
<div class="checkbox">
<input name="L0" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[0]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L1" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[1]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L2" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[2]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L3" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[3]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L4" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[4]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L5" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[5]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L6" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[6]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L7" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[7]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L8" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[8]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L9" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[9]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L10" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[10]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L11" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[11]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L12" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[12]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L13" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[13]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L14" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[14]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L15" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[15]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L16" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[16]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L17" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[17]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L18" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[18]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L19" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[19]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L20" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[20]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L21" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[21]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L22" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[22]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="L23" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[23]) echo ' checked="true" '; ?> />
</div>
</td>
</tr>
<!--mardi-->
<tr>
<td style="vertical-align: middle;">Mardi
</td>
<td style="vertical-align: middle;">
<button type="button" onclick="SelectAll('M');" class="btn btn-sm">all</button>
</td>
<td style="vertical-align: middle;">
<button type="button" name="MC" onclick="copie('M');" class="btn btn-sm">copy</button>
</td>
<td>
<div class="checkbox">
<input name="M0" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[24]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M1" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[25]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M2" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[26]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M3" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[27]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M4" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[28]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M5" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[29]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M6" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[30]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M7" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[31]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M8" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[32]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M9" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[33]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M10" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[34]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M11" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[35]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M12" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[36]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M13" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[37]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M14" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[38]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M15" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[39]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M16" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[40]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M17" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[41]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M18" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[42]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M19" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[43]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M20" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[44]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M21" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[45]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M22" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[46]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="M23" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[47]) echo ' checked="true" '; ?> />
</div>
</td>
</tr>
<!--mercredi-->
<tr>
<td style="vertical-align: middle;">Mercredi
</td>
<td style="vertical-align: middle;">
<button type="button" name="W" onclick="SelectAll('W');" class="btn btn-sm">all</button>
</td>
<td style="vertical-align: middle;">
<button type="button" name="WC" onclick="copie('W');" class="btn btn-sm">copy</button>
</td>
<td>
<div class="checkbox">
<input name="W0" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[48]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W1" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[49]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W2" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[50]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W3" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[51]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W4" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[52]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W5" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[53]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W6" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[54]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W7" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[55]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W8" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[56]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W9" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[57]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W10" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[58]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W11" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[59]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W12" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[60]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W13" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[61]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W14" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[62]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W15" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[63]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W16" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[64]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W17" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[65]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W18" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[66]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W19" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[67]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W20" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[68]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W21" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[69]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W22" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[70]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="W23" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[71]) echo ' checked="true" '; ?> />
</div>
</td>
</tr>
<!--jeudi-->
<tr>
<td style="vertical-align: middle;">Jeudi
</td>
<td style="vertical-align: middle;">
<button type="button" name="J" onclick="SelectAll('J');" class="btn btn-sm">all</button>
</td>
<td style="vertical-align: middle;">
<button type="button" name="JC" onclick="copie('J');" class="btn btn-sm">copy</button>
</td>
<td>
<div class="checkbox">
<input name="J0" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[72]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J1" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[73]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J2" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[74]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J3" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[75]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J4" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[76]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J5" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[77]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J6" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[78]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J7" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[79]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J8" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[80]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J9" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[81]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J10" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[82]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J11" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[83]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J12" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[84]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J13" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[85]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J14" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[86]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J15" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[87]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J16" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[88]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J17" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[89]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J18" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[90]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J19" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[91]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J20" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[92]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J21" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[93]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J22" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[94]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="J23" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[95]) echo ' checked="true" '; ?> />
</div>
</td>
</tr>
<!--vendredi-->
<tr>
<td style="vertical-align: middle;">Vendredi
</td>
<td style="vertical-align: middle;">
<button type="button" name="V" onclick="SelectAll('V');" class="btn btn-sm">all</button>
</td>
<td style="vertical-align: middle;">
<button type="button" name="VC" onclick="copie('V');" class="btn btn-sm">copy</button>
</td>
<td>
<div class="checkbox">
<input name="V0" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[96]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V1" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[97]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V2" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[98]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V3" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[99]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V4" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[100]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V5" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[101]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V6" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[102]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V7" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[103]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V8" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[104]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V9" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[105]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V10" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[106]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V11" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[107]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V12" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[108]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V13" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[109]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V14" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[110]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V15" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[111]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V16" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[112]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V17" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[113]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V18" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[114]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V19" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[115]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V20" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[116]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V21" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[117]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V22" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[118]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="V23" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[119]) echo ' checked="true" '; ?> />
</div>
</td>
</tr>
<!--samedi-->
<tr>
<td style="vertical-align: middle;">Samedi
</td>
<td style="vertical-align: middle;">
<button type="button" name="S" onclick="SelectAll('S');" class="btn btn-sm">all</button>
</td>
<td style="vertical-align: middle;">
<button type="button" name="SC" onclick="copie('S');" class="btn btn-sm">copy</button>
</td>
<td>
<div class="checkbox">
<input name="S0" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[120]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S1" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[121]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S2" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[122]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S3" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[123]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S4" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[124]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S5" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[125]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S6" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[126]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S7" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[127]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S8" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[128]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S9" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[129]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S10" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[130]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S11" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[131]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S12" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[132]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S13" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[133]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S14" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[134]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S15" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[135]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S16" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[136]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S17" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[137]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S18" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[138]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S19" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[139]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S20" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[140]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S21" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[141]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S22" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[142]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="S23" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[143]) echo ' checked="true" '; ?> />
</div>
</td>
</tr>
<!--Dimanche-->
<tr>
<td style="vertical-align: middle;">Dimanche
</td>
<td style="vertical-align: middle;">
<button type="button" name="D" onclick="SelectAll('D');" class="btn btn-sm">all</button>
</td>
<td style="vertical-align: middle;">
<button type="button" name="DC" onclick="copie('D');" class="btn btn-sm">copy</button>
</td>
<td>
<div class="checkbox">
<input name="D0" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[144]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D1" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[145]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D2" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[146]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D3" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[147]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D4" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[148]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D5" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[149]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D6" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[150]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D7" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[151]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D8" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[152]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D9" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[153]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D10" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[154]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D11" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[155]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D12" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[156]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D13" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[157]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D14" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[158]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D15" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[159]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D16" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[160]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D17" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[161]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D18" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[162]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D19" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[163]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D20" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[164]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D21" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[165]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D22" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[166]) echo ' checked="true" '; ?> />
</div>
</td>
<td>
<div class="checkbox">
<input name="D23" type="checkbox" data-toggle="toggle" data-size="mini" <?php if ($v[167]) echo ' checked="true" '; ?> />
</div>
</td>
</tr>
</table>
<form method="post" role="form">
<input class="btn btn-success" type="button" value="Sauvegarder" onclick="SavePlanning();" />
<input class="btn btn-danger" type="button" onclick="btnreset();" value="Reset" />
<input type="hidden" name="setPlanningAlarme" id="setPlanningAlarme" value="NULL" />
</form>
</div>
</div>
<div class=row">
<div class="col-xs-5">
<button type="button" class="btn btn-default btn-lg" onclick="window.location.href ='domos.php';" >
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> Retour </button>
</div>
</div>
</body>
</html>
>Conclusion
Of course you can add others pages, like a login page, home page and more ...
I hope this tutorial help you in your development :), it's possible to replace RF433 communication by Xbee, it will be an other article....