JEMBOT MAWOT Bypass Shell
<?php
include_once 'Tableau.php';
class Affiche {
var $titre;
var $cine;
var $groupe;
var $dateDebut;
var $dateFin;
var $listeFilms;
var $listeHeures;
var $tabNom;
var $html;
function __construct($titre, $cine, $groupe, $dateDebut, $dateFin) {
$this->titre = $titre;
$this->cine = $cine;
$this->groupe = $groupe;
$this->dateDebut = $dateDebut;
$this->dateFin = $dateFin;
$this->tabNom = "tab_" . $this->cine;
}
public function generationHtml() {
$listeJours = DAOFactory::getListeJourGroupeDAO()->queryFiltreDate($this->cine, $this->groupe, $this->dateDebut, $this->dateFin);
// $this->html.= "<div class=\"dev\">";
//
// $this->html.= "</div>";
$this->html = "<div id=\"affiche\">";
$this->html .= "<h1> " . $this->titre . "</h1>\n";
$this->html.= "<div class =\"tabAffiche\" id = \"" . $this->tabNom . "\">\n";
$this->html.= "<ul>\n";
foreach ($listeJours as $jour) {
$this->html.= "<li><a href=\"#" . $this->tabNom . "-" . $jour->jour . "\">";
$this->html.=testValeur(Date::formatageDate(Date::getDateAujourdhui(0), DAte::DD_M_Y), Date::formatageDate($jour->jour, Date::DD_M_Y), "Aujourd'hui", substr(ucfirst(Date::formatageDate($jour->jour, Date::DD_M_Y)), 0, 3) . " " . Date::formatageDate($jour->jour, Date::D_M));
$this->html.="</a></li>";
}
$this->html.= "</ul>\n";
foreach ($listeJours as $jour) {
$this->html.= "<div id=\"" . $this->tabNom . "-" . $jour->jour . "\">\n";
$listeFilms = DAOFactory::getListeFilmGroupeDAO()->queryByFilm($this->groupe, $this->cine, $jour->jour);
$listeHeuresTotales = DAOFactory::getListeHeureGroupeDAO()->queryByHeureParJour($this->groupe, $this->cine, $jour->jour);
$nbrHeure = DAOFactory::getListeHeureGroupeDAO()->queryByHeureTotalParJour($this->groupe, $this->cine, $jour->jour);
$this->html.="<table class=\"tableaux100pc\">\n";
// $this->html.="<tr><td>";
// $this->html.=$nbrHeure;
// $this->html.="</td>\n";
// foreach ($listeHeuresTotales as $heure) {
// $this->html.="<td>" . Date::foramtageDate($heure->heure, Date::HH_MM) . "</td>\n";
// }
//
// $this->html.="</tr>\n";
$i = 0;
foreach ($listeFilms as $film) {
$this->html.="<tr class=\"";
$this->html.= testValeur(($i % 2), 1, "affichImpaire", "affichePaire");
$this->html.="\"><td width=\"550px\">";
$filmComplet = DAOFactory::getFilmDAO()->load($film->pkFilm);
$lienFilm = new Synopsys($filmComplet, false, "", "", "");
$this->html.= $lienFilm->generationHtml();
// $this->html.= $film->nomFilm .
$this->html.= "</td>";
$listeHeure = DAOFactory::getListeHeureGroupeDAO()->queryByHeureFilm($this->groupe, $this->cine, $jour->jour, $film->pkFilm);
foreach ($listeHeuresTotales as $heureTotales) {
$this->html.="<td>\n";
foreach ($listeHeure as $heure) {
if ($heure->heure == $heureTotales->heure) {
$this->html.= Date::formatageDate($heure->heure, DAte::HH_MM);
}
}
$this->html.="<\td>\n";
}
$this->html.="</tr>\n";
$i++;
}
$this->html.="</table>\n";
$this->html.= "</div>\n";
}
$this->html.="</div>\n";
$this->html .= "</div>";
$this->html.= "<script>";
$this->html.= " $(function () {";
$this->html.= " $(\"#" . $this->tabNom . "\").tabs();";
$this->html.="});";
$this->html.="</script>";
return $this->html;
}
}
class Synopsys {
var $html;
var $film;
var $miniature;
var $texte;
var $cssClass;
var $urlmod;
function __construct($film, $miniature, $texte, $cssClass, $urlmod) {
$this->film = $film;
$this->miniature = $miniature;
$this->texte = $texte;
$this->cssClass = $cssClass;
$this->urlmod = $urlmod;
}
public function generationHtml() {
// print_r($this->film);
$this->html = "";
if ($this->film->urlExterne != "") {
$this->html .= "<a target=\"".$this->film->urlExterneTarget ."\" href = \"" . $this->film->urlExterne. "\">\n";
} else {
$this->html .= "<a class = \"" . $this->cssClass . "fancybox fancybox.iframe\" href = \"".$this->urlmod."php/synopsis.php?id=" . $this->film->pkFilm . "&time=" . time() . "\">\n";
}
if ($this->miniature == true) {
$this->html .="<img style = \"opacity: 1;\" src =\"../patriaManagment/media/files/thumbnail/" . $this->film->affiche . "\">\n";
} else if (isset($this->texte) && $this->texte != "") {
$this->html .= $this->texte;
} else {
$this->html .= $this->film->nomFilm;
}
$this->html .="</a>\n";
return $this->html;
}
}
class Date {
/* Configure le script en hollandais */
const Y_M_D = "Y-m-d";
const D_M_Y = "d/m/Y";
const DD_M_Y = "l";
const D_M = "d/m";
const HH_MM = "H\hi";
const DD_DD_M_Y = "l d/m";
const NOSLOISIRS = "nosLoisirs";
public static function getPremierJourSemaine() {
return date('Y-m-d', mktime(0, 0, 0, date('m'), date('d') - date('N') + 1, date('Y')));
}
public static function getDernierJourSemaine() {
return date('Y-m-d', mktime(0, 0, 0, date('m'), date('d') - date('N') + 7, date('Y')));
}
public static function getJourSemaine($jour) {
return date('Y-m-d', mktime(0, 0, 0, date('m'), date('d') - date('N') + $jour, date('Y')));
}
public static function getDateAujourdhui($jour) {
return date('Y-m-d', mktime(0, 0, 0, date('m'), date('d') + $jour, date('Y')));
}
public static function formatageDate($date, $Langue) {
setlocale(LC_TIME, 'fr', 'fr_FR', 'fr_FR.ISO8859-1');
$dateBase = new DateTime($date);
$dateFormat = ""
;
switch ($Langue) {
case Date::D_M_Y:
$dateFormat = $dateBase->format(Date::D_M_Y);
break;
case Date::Y_M_D:
$dateFormat = $dateBase->format(Date::Y_M_D);
break;
case Date::HH_MM:
$dateFormat = $dateBase->format(Date::HH_MM);
break;
case Date::D_M:
$dateFormat = $dateBase->format(Date::D_M);
break;
case Date::DD_M_Y:
$dateFormat = strftime("%A", strtotime($date));
break;
case Date::DD_DD_M_Y:
$dateFormat = strftime("%A", strtotime($date)) . " " . $dateBase->format('d/m');
break;
default:
break;
}
return $dateFormat;
}
}
function testValeur($valeurATester, $valeur, $valeurVraie, $valeurFause) {
if ($valeurATester == $valeur) {
return $valeurVraie;
} else {
return $valeurFause;
}
}
class ListeFilm {
var $listeFilm;
var $groupe;
var $cine;
var $typeListe;
const AVENIR = "AVENIR";
const ENCOURS = "ENCOURS";
function __construct($groupe, $cine, $typeListe) {
$this->groupe = $groupe;
$this->cine = $cine;
$this->typeListe = $typeListe;
}
public function generationHtml() {
$tableau = new Tableau();
switch ($this->typeListe) {
case $this::AVENIR:
$this->listeFilm = DAOFactory::getListeFilmGroupeDAO()->queryByFilmAVenir($this->groupe->pkGroupe, Cine::PATRIA, Date::getDateAujourdhui(5));
break;
case $this::ENCOURS:
$this->listeFilm = DAOFactory::getListeFilmGroupeDAO()->queryByFilmEnCours($this->groupe->pkGroupe, Cine::PATRIA, Date::getDateAujourdhui(5));
break;
default:
break;
}
echo "<table id=\"avenir\">\n";
foreach ($this->listeFilm as $film) {
echo "<tr>";
echo "<td colspan=\"2\">";
echo "<h2>" . $film->nomFilm . "</h2>";
echo "</td>";
echo "</tr>";
echo "<tr class=\"borderBottomGrey\">";
echo "<td class=\"texteAlignCentre vMiddle tdAffiche\">";
$synopsys = new Synopsys($film, false, "<img class=\"vMiddle affiche\" src=\"../patriaManagment/media/files/" . $film->affiche . "\"/>", "","");
echo testValeur($film->affiche, "", "", $synopsys->generationHtml());
echo "</td>";
echo "<td class=\"vTop\">";
echo "<table>\n";
$listeGenres = DAOFactory::getListeGenreFilmDAO()->queryAllOrderByFilm($film->pkFilm);
$genreTitre = "GENRE";
if (count($listeGenres) > 1) {
$genreTitre.= "S";
}
$listeGenres = DAOFactory::getListeGenreFilmDAO()->queryByFkFilm($film->pkFilm);
$listeGenreHtml = "";
$i = 0;
foreach ($listeGenres as $genre) {
$activeGenre = new Genre();
$activeGenre->pkGenre = $genre->fkGenre;
$selectGenre = DAOFactory::getGenreDAO()->load($activeGenre->pkGenre);
$i++;
$listeGenreHtml.= $selectGenre->genre;
if (count($listeGenres) > 1 && $i < count($listeGenres)) {
$listeGenreHtml.= " - ";
};
}
echo testValeur($listeGenreHtml, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", $genreTitre), new Colonne("", $listeGenreHtml))));
echo testValeur($film->dateSortie, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "DATE DE SORTIE"), new Colonne("", Date::formatageDate($film->dateSortie, DATE::D_M_Y)))));
echo testValeur($film->acteur, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "ACTEURS"), new Colonne("", $film->acteur))));
echo testValeur($film->realisateur, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "REALISATEUR"), new Colonne("", $film->realisateur))));
echo testValeur($film->duree, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "DUREE"), new Colonne("", Date::formatageDate($film->duree, Date::HH_MM)))));
$synopsys = new Synopsys($film, false, $film->urlSite, "", "");
echo testValeur($film->urlSite, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "BANDE ANNONCE"), new Colonne("", $synopsys->generationHtml()))));
echo testValeur($film->information, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "SYNOPSIS"), new Colonne("texteAlignjustify", $film->information))));
echo "<tr>";
echo "<td>";
echo "</td>";
echo "<td>";
$titreBouton = "BANDE ANNONCE";
if ($film->acceuil == -1) {
$titreBouton.=" & HORAIRES";
}
$synopsys = new Synopsys($film, false, $titreBouton, "largeur90pc backRougeBorderArrondi5px","");
echo testValeur($film->affiche, "", "", $synopsys->generationHtml());
echo "</td>";
echo "</tr>";
echo "</table>\n";
echo "</td>";
echo "</tr>";
}
echo "</table>\n";
}
}
class ListeFilmFestival {
var $listeFilm;
var $groupe;
var $cine;
var $typeListe;
const AVENIR = "AVENIR";
const ENCOURS = "ENCOURS";
function __construct($groupe, $cine, $typeListe) {
$this->groupe = $groupe;
$this->cine = $cine;
$this->typeListe = $typeListe;
}
public function generationHtml() {
$tableau = new Tableau();
switch ($this->typeListe) {
case $this::AVENIR:
$this->listeFilm = DAOFactory::getListeFilmGroupeDAO()->queryByFilmFestival($this->groupe->pkGroupe, Cine::PATRIA, Date::getDateAujourdhui(5));
break;
case $this::ENCOURS:
$this->listeFilm = DAOFactory::getListeFilmGroupeDAO()->queryByFilmFestival($this->groupe->pkGroupe, Cine::PATRIA, Date::getDateAujourdhui(5));
break;
default:
break;
}
echo "<table id=\"avenir\">\n";
foreach ($this->listeFilm as $film) {
echo "<tr>";
echo "<td colspan=\"2\">";
echo "<h2>" . $film->nomFilm . "</h2>";
echo "</td>";
echo "</tr>";
echo "<tr class=\"borderBottomGrey\">";
echo "<td class=\"texteAlignCentre vMiddle tdAffiche\">";
$synopsys = new Synopsys($film, false, "<img class=\"vMiddle affiche\" src=\"../patriaManagment/media/files/" . $film->affiche . "\"/>", "", "../");
echo testValeur($film->affiche, "", "", $synopsys->generationHtml());
echo "</td>";
echo "<td class=\"vTop\">";
echo "<table>\n";
$listeGenres = DAOFactory::getListeGenreFilmDAO()->queryAllOrderByFilm($film->pkFilm);
$genreTitre = "GENRE";
if (count($listeGenres) > 1) {
$genreTitre.= "S";
}
$listeGenres = DAOFactory::getListeGenreFilmDAO()->queryByFkFilm($film->pkFilm);
$listeGenreHtml = "";
$i = 0;
foreach ($listeGenres as $genre) {
$activeGenre = new Genre();
$activeGenre->pkGenre = $genre->fkGenre;
$selectGenre = DAOFactory::getGenreDAO()->load($activeGenre->pkGenre);
$i++;
$listeGenreHtml.= $selectGenre->genre;
if (count($listeGenres) > 1 && $i < count($listeGenres)) {
$listeGenreHtml.= " - ";
};
}
echo testValeur($listeGenreHtml, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", $genreTitre), new Colonne("", $listeGenreHtml))));
echo testValeur($film->dateSortie, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "DATE DE SORTIE"), new Colonne("", Date::formatageDate($film->dateSortie, DATE::D_M_Y)))));
echo testValeur($film->acteur, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "ACTEURS"), new Colonne("", $film->acteur))));
echo testValeur($film->realisateur, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "REALISATEUR"), new Colonne("", $film->realisateur))));
echo testValeur($film->duree, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "DUREE"), new Colonne("", Date::formatageDate($film->duree, Date::HH_MM)))));
$synopsys = new Synopsys($film, false, $film->urlSite, "", "");
echo testValeur($film->urlSite, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "BANDE ANNONCE"), new Colonne("", $synopsys->generationHtml()))));
echo testValeur($film->information, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "SYNOPSIS"), new Colonne("texteAlignjustify", $film->information))));
echo "<tr>";
echo "<td>";
echo "</td>";
echo "<td>";
$titreBouton = "BANDE ANNONCE";
if ($film->acceuil == -1) {
$titreBouton.=" & HORAIRES";
}
$synopsys = new Synopsys($film, false, $titreBouton, "largeur90pc backRougeBorderArrondi5px", "../");
echo testValeur($film->affiche, "", "", $synopsys->generationHtml());
echo "</td>";
echo "</tr>";
echo "</table>\n";
echo "</td>";
echo "</tr>";
}
echo "</table>\n";
}
}
class ListeFilmHorreur {
var $listeFilm;
var $groupe;
var $cine;
var $typeListe;
const AVENIR = "AVENIR";
const ENCOURS = "ENCOURS";
function __construct($groupe, $cine, $typeListe) {
$this->groupe = $groupe;
$this->cine = $cine;
$this->typeListe = $typeListe;
}
public function generationHtml() {
$tableau = new Tableau();
switch ($this->typeListe) {
case $this::AVENIR:
$this->listeFilm = DAOFactory::getListeFilmGroupeDAO()->queryByFilmFestivalHorreur($this->groupe->pkGroupe, Cine::PATRIA, Date::getDateAujourdhui(5));
break;
case $this::ENCOURS:
$this->listeFilm = DAOFactory::getListeFilmGroupeDAO()->queryByFilmFestivalHorreur($this->groupe->pkGroupe, Cine::PATRIA, Date::getDateAujourdhui(5));
break;
default:
break;
}
echo "<table id=\"avenir\">\n";
foreach ($this->listeFilm as $film) {
echo "<tr>";
echo "<td colspan=\"2\">";
echo "<h2>" . $film->nomFilm . "</h2>";
echo "</td>";
echo "</tr>";
echo "<tr class=\"borderBottomGrey\">";
echo "<td class=\"texteAlignCentre vMiddle tdAffiche\">";
$synopsys = new Synopsys($film, false, "<img class=\"vMiddle affiche\" src=\"../patriaManagment/media/files/" . $film->affiche . "\"/>", "");
echo testValeur($film->affiche, "", "", $synopsys->generationHtml());
echo "</td>";
echo "<td class=\"vTop\">";
echo "<table>\n";
$listeGenres = DAOFactory::getListeGenreFilmDAO()->queryAllOrderByFilm($film->pkFilm);
$genreTitre = "GENRE";
if (count($listeGenres) > 1) {
$genreTitre.= "S";
}
$listeGenres = DAOFactory::getListeGenreFilmDAO()->queryByFkFilm($film->pkFilm);
$listeGenreHtml = "";
$i = 0;
foreach ($listeGenres as $genre) {
$activeGenre = new Genre();
$activeGenre->pkGenre = $genre->fkGenre;
$selectGenre = DAOFactory::getGenreDAO()->load($activeGenre->pkGenre);
$i++;
$listeGenreHtml.= $selectGenre->genre;
if (count($listeGenres) > 1 && $i < count($listeGenres)) {
$listeGenreHtml.= " - ";
};
}
echo testValeur($listeGenreHtml, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", $genreTitre), new Colonne("", $listeGenreHtml))));
echo testValeur($film->dateSortie, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "DATE DE SORTIE"), new Colonne("", Date::formatageDate($film->dateSortie, DATE::D_M_Y)))));
echo testValeur($film->acteur, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "ACTEURS"), new Colonne("", $film->acteur))));
echo testValeur($film->realisateur, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "REALISATEUR"), new Colonne("", $film->realisateur))));
echo testValeur($film->duree, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "DUREE"), new Colonne("", Date::formatageDate($film->duree, Date::HH_MM)))));
$synopsys = new Synopsys($film, false, $film->urlSite, "");
echo testValeur($film->urlSite, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "BANDE ANNONCE"), new Colonne("", $synopsys->generationHtml()))));
echo testValeur($film->information, "", "", $tableau->generationLigne(array(new Colonne("txtRed td100px", "SYNOPSIS"), new Colonne("texteAlignjustify", $film->information))));
echo "<tr>";
echo "<td>";
echo "</td>";
echo "<td>";
$titreBouton = "BANDE ANNONCE";
if ($film->acceuil == -1) {
$titreBouton.=" & HORAIRES";
}
$synopsys = new Synopsys($film, false, $titreBouton, "largeur90pc backRougeBorderArrondi5px");
echo testValeur($film->affiche, "", "", $synopsys->generationHtml());
echo "</td>";
echo "</tr>";
echo "</table>\n";
echo "</td>";
echo "</tr>";
}
echo "</table>\n";
}
}
xxxxx1.0, XXX xxxx