Commit 3f0d1e11 authored by BARRY Telly's avatar BARRY Telly

1

parent b7c719dc
......@@ -16,7 +16,7 @@ $plat = $_POST['plat'];
$dessert = $_POST['dessert'];
$jour = $_POST['jour'];
if (isset($_POST["submit"])) {
if (isset($_POST["submit1"])) {
$form_data = array(
'jour de la semaine' => $jour,
'entree' => $entree,
......@@ -32,7 +32,7 @@ if (isset($_POST["submit"])) {
$nom = $_POST['nom'];
$date = $_POST['date'];
if (isset($_POST["submit"])) {
if (isset($_POST["submit2"])) {
$form_data = array(
'nom' => $nom,
'date' => $date
......@@ -46,7 +46,7 @@ if (isset($_POST["submit"])) {
$titre = $_POST['titre'];
$info = $_POST['info'];
if (isset($_POST["submit"])) {
if (isset($_POST["submit3"])) {
$form_data = array(
'info' => $nom,
'info' => $date
......@@ -80,67 +80,9 @@ if (isset($_POST["submit"])) {
<h1 class="display-1">
<center>Formulaire</center>
</h1>
<h2>Formulaire menu</h2>
<form method='post'>
<div class="form-group">
<label>Jours de la semaine</label> <select class="form-control"
name="jour">
<option>Lundi</option>
<option>Mardi</option>
<option>Mercredi</option>
<option>Jeudi</option>
<option>Vendredi</option>
</select>
</div>
<div class="form-group">
<label>Entrée</label> <input type='text' class="form-control"
placeholder="Veuillez taper l'entrée qui sera affiché sur le menu"
name='entree'>
</div>
<div class="form-group">
<label for="InputPlat">Plat</label> <input type='text'
class="form-control"
placeholder="Veuillez taper le plat principal qui sera affiché sur le menu"
name='plat'>
</div>
<div class="form-group">
<label>Dessert</label> <input type='text' class="form-control"
placeholder="Veuillez taper le déssert qui sera affiché sur le menu"
name='dessert'>
</div>
<button type='submit' class="btn btn-success" value="Submit"
name='submit'>Valider</button>
</form>
<iframe src="http://192.168.201.12/display/index.php" width="400"
height="300"></iframe>
<h2>Formulaire Absence</h2>
<h3>Ce formulaire permet d'afficher les professeurs absents sur l'écran</h3>
<form method='post'>
<div class="form-group">
<label>Professeur absent</label> <input type='text'
class="form-control"
placeholder="Veuillez taper le nom du professeur absent" name='nom'>
</div>
<div class="form-group">
<label for="InputPlat">Date et heure de retour</label> <input
type='text' class="form-control"
placeholder="Veuillez taper la date et l'heure de retour du professeur absent"
name='date'>
</div>
<button type='submit' class="btn btn-success" value="Submit"
name='submit'>Valider</button>
</form>
<h2>Formulaire Information</h2>
<h3>Ce formulaire permet d'afficher une information sur l'écran</h3>
<h5>Ce formulaire permet d'afficher une information sur l'écran</h3>
<form method='post'>
<div class="form-group">
<label>Titre</label> <input type='text' class="form-control"
......@@ -153,9 +95,12 @@ if (isset($_POST["submit"])) {
placeholder="Veuillez taper l'information que vous voulez afficher"
name='info'>
</div>
<iframe src="http://192.168.201.12/display/index.php" width="400"
height="300"></iframe>
<button type='submit' class="btn btn-success" value="Submit"
name='submit'>Valider</button>
name='submit3'>Valider</button>
</form>
......
<?php
$rss=simplexml_load_file('http://lyc-perrin-soa.ac-versailles.fr/portail/spip.php?page=rss_actus');
$rss=simplexml_load_file('http://www.diderot.org/index.php/component/ninjarsssyndicator/?feed_id=1&format=raw&Itemid=144');
//print_r($rss);
$output = "";
$i=0;
......@@ -31,7 +31,7 @@ foreach ($rss->channel->item as $item) {
$description = substr($description,0,300);
$espace=strrpos($description, ' ');
$description .=substr($titre,0,$espace)."(...)";
$description .=substr($title,0,$espace)."(...)";
}
$output .= "\n<section data-background-image=\"IMG/LYCEE-DIDEROT.jpg\">\n
......
......@@ -139,40 +139,6 @@ function returnflux($intro, $fond, $url)
}
}
function returnagenda($intro, $fond, $url)
{
$rss = simplexml_load_file($url);
$output = "";
$i = 0;
$entete = " ";
foreach ($rss->channel->item as $item) {
$i ++;
$date = $item->date; // extract the link
$title = $item->title; // extract the title
$description = strip_tags($item->description);
$output .= "
<section data-autoslide=\"6000\" data-background-image=\"$fond\">
<h2 style=\"color:#ffffff;\">$date</h2>\n
<h3 style=\"color:#ff5c5c;\" >$title </h3>\n
<div style=\"color:#ffffff;\">
<p>
$description
</p>
</div>
</section>";
// if ($i > 4) { break;}
}
if ($i > 0) {
return $output;
} else {
return " \n\n\n";
}
}
function returnimages($intro, $fond, $url)
{
$output = "";
......@@ -251,4 +217,4 @@ function convertCSVToXML($data, $purgeData = true)
fclose($handle);
}
?>
?>
\ No newline at end of file
......@@ -30,15 +30,12 @@ foreach ($rss->channel->item as $item) {
// }
$output .= "\n<section data-background-image=\"IMG/FOND_LEMONDE.JPG\">\n
$output.= "\n<section data-background-image=\"IMG/FOND_LEMONDE.JPG\">\n
<h3 style=\"color:#ff5c5c;\" > $title </h3>\n
<div style=\"color:#140209;\">\n
<div class=\"layout-container\">\n
<div class=\"feature-img-container\">\n
<img width=\"1024\" height=\"685\" src=\"$img\" class=\"attachment-large size-large wp-post-image\" alt=\"\" srcset=\"\" sizes=\"(max-width: 1024px) 100vw, 1024px\" />\n
</div>\n
<div class=\"content-container\" style=\"color:#ffffff;\">\n
<p>$description</p>\n
<p style='text-align: center'>$description</p>\n
</div>\n
</div>\n
</div>\n
......
<?php
require_once (dirname(__FILE__) . '/../../vendor/autoload.php');
$entete = "<section data-autoslide=\"3000\" data-background-image=\><h2 style=\"color:#ffffff;\"></h2>
<h3 style=\"color:#ed3434;\"></h3>
<div style=\"color:#ffffff;\"><p>&nbsp;</p>
<p>
<strong></strong>
</p>
<p>
</p>
</div>
</section>";
$client = new GuzzleHttp\Client([
'base_uri' => "http://127.0.0.1:21727",
'cookies' => true
]);
$response = $client->request('POST', '/', [
'json' => [
"type" => "fetch",
"username" => "barry",
"password" => "tellyb5050",
"url" => "https://0780582j.index-education.net/pronote/",
"cas" => "none"
]
]);
(string) $data = $response->getBody();
$ent = json_decode($data, true);
$menu = $ent['menu'];
// $string = array($menu);
// var_dump($menu);
$nom_plat = array(
"entrée",
"viande",
"accompagnement",
"fromage",
"dessert"
);
$table = "<table>";
$table .= " <tr><th colspan='2'>Menu du jour</th></tr>";
foreach ($menu as $key => $plat) {
$lignes = count($plat);
foreach ($plat as $index => $contenu) {
if ($index == 0)
$table .= "<tr><td rowspan=\"" . $lignes . "\">" . $nom_plat[$key] . "</td><td>" . $contenu . "<td></tr>";
else
$table .= "<tr><td>" . $contenu . "</td></tr>";
}
}
$table .= "</table>";
$output .= "\n<section data-background-image=\"IMG/FOND_LEMONDE.JPG\">\n
<div style=\"color:#140209;\">\n
<div class=\"layout-container\">\n
<div class=\"content-container\" style=\"color:#ffffff;\">\n
<p style='text-align: center'>$table</p>\n
</div>\n
</div>\n
</div>\n
</section>";
echo $entete . $output;
?>
\ No newline at end of file
<?php
$rss=simplexml_load_file("https://api.rtm.fr/front/rss-actus-info");
//print_r($rss);
$output = "";
$i=0;
$entete = "<section data-background-image=\"IMG/METRO.JPG\" data-autoslide=\"3000\"><h2 style=\"color:#ffffff;\"></h2>
require_once (dirname(__FILE__) . '/../../vendor/autoload.php');
// $rss = file_get_contents("https://api-ratp.pierre-grimaud.fr/v4/schedules/metros/7B/danube/A");
$client = new GuzzleHttp\Client([
'base_uri' => "https://api-ratp.pierre-grimaud.fr/v4/schedules/metros/7B/danube/A",
'cookies' => true
]);
$response = $client->request('GET', "https://api-ratp.pierre-grimaud.fr/v4/schedules/metros/7B/danube/A");
(string) $data = $response->getBody();
$rss = json_decode($data, true);
$entete = "<section data-autoslide=\"3000\" data-background-image=\"IMG/ACTUS_MONDE.JPG\"><h2 style=\"color:#ffffff;\"></h2>
<h3 style=\"color:#ed3434;\"></h3>
<div style=\"color:#ffffff;\"><p>&nbsp;</p>
<p>
......@@ -20,45 +20,37 @@ $entete = "<section data-background-image=\"IMG/METRO.JPG\" data-autoslide=\"30
</p>
</div>
</section>";
foreach ($rss->channel->item as $item) {
$i++;
$link = $item->link; //extract the link
$title = $item->title; //extract the title
$date = $item->pubDate; //extract the date
$description = strip_tags($item->description);
// if (isset($item->enclosure)) {
$img = $item->enclosure['url'];
// }
$output .= "\n<section data-background-image=\"IMG/FOND_VIE.jpg\">\n
<h3 style=\"color:#ff5c5c;\" > $title </h3>\n
// var_dump($rss['result']);
$affichage = array(
"Prochain metro :",
"Destination :"
);
$table = "<table>";
$table .= " <tr><th colspan='2'>Metro</th></tr>";
foreach ($rss as $value) {
$lignes = count($value);
foreach ($value as $contenu) {
foreach ($contenu as $valeur) {
foreach ($valeur as $numero => $val) {
if ($numero == "message")
$table .= "<tr><td rowspan=\"" . $lignes . "\">" . $affichage[0] . "</td><td>" . $val . "<td></tr>";
else
$table .= "<tr><td rowspan=\"" . $lignes . "\">" . $affichage[1] . "</td><td>" . $val . "<td></tr>";
}
}
}
}
$table .= "</table>";
$output .= "\n<section data-background-image=\"IMG/FOND_LEMONDE.JPG\">\n
<div style=\"color:#140209;\">\n
<div class=\"layout-container\">\n
<div class=\"feature-img-container\">\n
<img width=\"1024\" height=\"685\" src=\"$img\" class=\"attachment-large size-large wp-post-image\" alt=\"\" srcset=\"\" sizes=\"(max-width: 1024px) 100vw, 1024px\" />\n
</div>\n
<div class=\"content-container\" style=\"color:#ffffff;\">\n
<p>$description</p>\n
<p style='text-align: center'>$table</p>\n
</div>\n
</div>\n
</div>\n
</section>";
if ($i > 4) { break;}
}
if ($i >0) {
echo $entete.$output;
} else {
echo "";
}
echo $entete.$output;
?>
<?php
require_once (dirname(__FILE__) . '/../../vendor/autoload.php');
// $rss = file_get_contents("https://api-ratp.pierre-grimaud.fr/v4/schedules/metros/7B/danube/A");
$client = new GuzzleHttp\Client([
'base_uri' => "https://api-ratp.pierre-grimaud.fr/v4/schedules/buses/75/Lyc%C3%A9e%20Diderot/A%2BR",
'cookies' => true
]);
$response = $client->request('GET', "https://api-ratp.pierre-grimaud.fr/v4/schedules/buses/75/Lyc%C3%A9e%20Diderot/A%2BR");
(string) $data = $response->getBody();
$rss = json_decode($data, true);
//var_dump($rss['result']);
$entete = "<section data-autoslide=\"3000\" data-background-image=\"IMG/ACTUS_MONDE.JPG\"><h2 style=\"color:#ffffff;\"></h2>
<h3 style=\"color:#ed3434;\"></h3>
<div style=\"color:#ffffff;\"><p>&nbsp;</p>
<p>
<strong></strong>
</p>
<p>
</p>
</div>
</section>";
$affichage = array(
"Prochain bus :",
"Destination :"
);
$table = "<table>";
$table .= " <tr><th colspan='2'>Bus</th></tr>";
foreach ($rss as $value) {
$lignes = count($value);
foreach ($value as $contenu) {
foreach ($contenu as $valeur) {
foreach ($valeur as $numero => $val) {
if ($numero == "message")
$table .= "<tr><td rowspan=\"" . $lignes . "\">" . $affichage[0] . "</td><td>" . $val . "<td></tr>";
else
$table .= "<tr><td rowspan=\"" . $lignes . "\">" . $affichage[1] . "</td><td>" . $val . "<td></tr>";
}
}
}
}
$table .= "</table>";
$output .= "\n<section data-background-image=\"IMG/FOND_LEMONDE.JPG\">\n
<div style=\"color:#140209;\">\n
<div class=\"layout-container\">\n
<div class=\"content-container\" style=\"color:#ffffff;\">\n
<p style='text-align: center'>$table</p>\n
</div>\n
</div>\n
</div>\n
</section>";
echo $entete.$output;
?>
<?php
<?php
ini_set('display_errors', 0);
require("include/inc.php");
require ("include/inc.php");
// on crache le XML du meunu à partir du CSV de temps en temps
if (file_exists("include/menu.csv")) {
if (intval(date("Ymdh")) <= intval(date ("Ymdh", filemtime("include/menu.csv")))) {
convertCSVToXML("include/menu.csv", $purgeData = true);
}
if (intval(date("Ymdh")) <= intval(date("Ymdh", filemtime("include/menu.csv")))) {
convertCSVToXML("include/menu.csv", $purgeData = true);
}
}
?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Actus | Channels | Affichage Dynamique</title>
<meta name='robots' content='noindex,follow' />
<link rel='stylesheet' id='wpds_clock-style-css' href='css/clock.css' type='text/css' media='all' />
<link rel='stylesheet' id='wpds-style-css' href='css/style.css' type='text/css' media='all' />
<link rel='stylesheet' id='reveal.js_css-css' href='css/reveal.css' type='text/css' media='all' />
<link rel='stylesheet' id='reveal.js_theme-css' href='css/simple.css' type='text/css' media='all' />
<script type='text/javascript' src='js/jquery.js'></script>
<script type='text/javascript' src='js/custom.modernizr.js'></script>
</head>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Actus | Channels | Affichage Dynamique</title>
<meta name='robots' content='noindex,follow' />
<link rel='stylesheet' id='wpds_clock-style-css' href='css/clock.css'
type='text/css' media='all' />
<link rel='stylesheet' id='wpds-style-css' href='css/style.css'
type='text/css' media='all' />
<link rel='stylesheet' id='reveal.js_css-css' href='css/reveal.css'
type='text/css' media='all' />
<link rel='stylesheet' id='reveal.js_theme-css' href='css/simple.css'
type='text/css' media='all' />
<script type='text/javascript' src='js/jquery.js'></script>
<script type='text/javascript' src='js/custom.modernizr.js'></script>
</head>
<body class="archive tax-channel term-actus term-2 logged-in">
<div class="reveal">
<div class="slides">
<div class="reveal">
<div class="slides">
<!-- Main Content -->
<!-- Main Content -->
<!-- IMAGE DE DEPART-->
<section data-background-image="IMG/AA_DSC_0021.JPG" data-autoslide="3000">
<h1 style="color:#ed3434;">Lycée Diderot</h1>
<h3 style="color:#ed3434;"></h3>
<div style="color:#ffffff;"><p>&nbsp;</p>
<p>
<strong></strong>
</p>
<!-- IMAGE DE DEPART-->
<section data-background-image="IMG/AA_DSC_0021.JPG"
data-autoslide="3000">
<h1 style="color: #ed3434;">Lycée Diderot</h1>
<h3 style="color: #ed3434;"></h3>
<div style="color: #ffffff;">
<p>&nbsp;</p>
<p>
<strong></strong>
</p>
<p>
</p>
</div>
</section>
<p></p>
</div>
</section>
......@@ -57,9 +62,9 @@ if (file_exists("include/menu.csv")) {
//
//
//
// flux des articles des IMAGES en plein écran
// flux des articles des IMAGES en plein écran
echo "<!-- IMAGE PLEIN ECRAN -->";
echo returnimages(" "," ","http://localhost/portail/spip.php?page=rss_images");
// echo returnimages(" "," ","http://localhost/portail/spip.php?page=rss_images");
echo "<!-- //IMAGE PLEIN ECRAN -->";
//
// MENUS
......@@ -68,58 +73,63 @@ echo "<!-- //IMAGE PLEIN ECRAN -->";
//
echo "<!-- MENU -->";
//echo returnmenu("IMG/INTRO_MENU.JPG","IMG/FOND_MENU.jpg","menu.xml");
// echo returnmenu("IMG/INTRO_MENU.JPG","IMG/FOND_MENU.jpg","menu.xml");
//
// Flux du mot clé "Vie du lycée"
//echo "<!-- VIE DU LYCEE -->";
//echo returnflux("IMG/VIE_LYCEE.JPG","IMG/LYCEE-DIDEROT.jpg","http://localhost/portail/spip.php?page=rss_viedulycee");
// echo "<!-- VIE DU LYCEE -->";
// echo returnflux("IMG/VIE_LYCEE.JPG","IMG/LYCEE-DIDEROT.jpg","http://localhost/portail/spip.php?page=rss_viedulycee");
// Flux du mot clé "ACTU"
//echo returnflux("IMG/ACTUS_LYCEE.JPG","IMG/LYCEE-DIDEROT.jpg",'http://www.diderot.org/index.php/component/ninjarsssyndicator/?feed_id=1&format=raw&Itemid=144');
include("include/actus.php");
// echo returnflux("IMG/ACTUS_LYCEE.JPG","IMG/LYCEE-DIDEROT.jpg",'http://www.diderot.org/index.php/component/ninjarsssyndicator/?feed_id=1&format=raw&Itemid=144');
include ("include/actus.php");
// IMAGES
// IMAGES
// AU HASARD
echo returnimages(" "," ","http://localhost/portail/spip.php?page=rss_hasard");
// echo returnimages(" "," ","http://localhost/portail/spip.php?page=rss_hasard");
// MENUS
//
echo returnmenu("IMG/INTRO_MENU.JPG","IMG/FOND_MENU.jpg","menu.xml");
//
// LE MONDE
include("include/lemonde.php");
include ("include/pronote.php");
// LE MONDE
include ("include/lemonde.php");
// HERALD
include("include/herald.php");
//
// MENUS
//
echo returnmenu("IMG/INTRO_MENU.JPG","IMG/FOND_MENU.jpg","menu.xml");
//
include ("include/herald.php");
// RATP
include ("include/ratp.php");
// BUS
include ("include/ratpBus.php");
// EL PAIS
include("include/elpais.php");
// DER SPIEGEL
include("include/derspiegel.php");
// TWITTER ??
include("include/tweet.php");
// AGENDA
echo returnagenda("IMG/ACTUS_AGENDA.JPG","IMG/LYCEE-DIDEROT.jpg","http://localhost/portail/spip.php?page=rss_agendas");
include ("include/elpais.php");
// DER SPIEGEL
include ("include/derspiegel.php");
?>
<!-- End Main Content -->
</div>
</div>
<footer class="footer" style="color:#ffffff; background-color:rgba(79, 75, 75, 0.43)">
<div class="dock">
<div class="dock-container">
<div id="wpds-clock-widget-2" class="dock-element widget_wpds-clock-widget" style="width:100%"><div class="clock"><div class="clock-time"><span class="clock-hours"> </span><span class="clock-point clock-point-animated">:</span><span class="clock-minutes"> </li></div><div class="clock-date"></div></div></div>
</div>
</div>
</footer>
<script>
</div>
</div>
<footer class="footer"
style="color: #ffffff; background-color: rgba(79, 75, 75, 0.43)">
<div class="dock">
<div class="dock-container">
<div id="wpds-clock-widget-2"
class="dock-element widget_wpds-clock-widget" style="width: 100%">
<div class="clock">
<div class="clock-time">
<span class="clock-hours"> </span><span
class="clock-point clock-point-animated">:</span><span
class="clock-minutes">
</li></div>
<div class="clock-date"></div>
</div>
</div>
</div>
</div>
</footer>
<script>
var defaultReloadTimeout = 600000;
var defaultContentChangeCheckInterval = 100000;
var postModified='4e7287270038680c0c5541cb63d89275';
......@@ -132,14 +142,15 @@ var showSlideNumber=false;
var centerVertically=false;
var autoplayStoppable=false;
</script>
<!-- var statusUrl='http://www.scottie.fr/wordpress/wpds-status' -->
<!-- var statusUrl='http://www.scottie.fr/wordpress/wpds-status' -->
<script type='text/javascript' src='js/moment-with-locales.min.js'></script>
<script type='text/javascript' src='js/moment-timezone-with-data.min.js'></script>
<script type='text/javascript' src='js/clock.js'></script>
<script type='text/javascript' src='js/reveal.js'></script>
<script type='text/javascript' src='js/app.js'></script>
<script type='text/javascript' src='js/wp-embed.min.js'></script>
<script type='text/javascript' src='js/moment-with-locales.min.js'></script>
<script type='text/javascript'
src='js/moment-timezone-with-data.min.js'></script>
<script type='text/javascript' src='js/clock.js'></script>
<script type='text/javascript' src='js/reveal.js'></script>
<script type='text/javascript' src='js/app.js'></script>
<script type='text/javascript' src='js/wp-embed.min.js'></script>
</body>
</body>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment