本文整理汇总了PHP中Dao::getGroupes方法的典型用法代码示例。如果您正苦于以下问题:PHP Dao::getGroupes方法的具体用法?PHP Dao::getGroupes怎么用?PHP Dao::getGroupes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dao
的用法示例。
在下文中一共展示了Dao::getGroupes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Dao
function affiche2()
{
$dao = new Dao();
$grp = explode(":", $_POST['groupe'])[1];
$dao->setICS(urldecode($grp));
$dao->getCours();
$precedent = $_POST['date'] - 1;
$suivant = $_POST['date'] + 1;
$groupe_decode = urldecode($grp);
$crenaux = ["8:00 - 9:00", "9:00 - 10:00", "10:00 - 11:00", "11:00 - 12:00", "12:00 - 13:00", "13:00 - 14:00", "14:00 - 15:00", "15:00 - 16:00", "16:00 - 17:00", "17:00 - 18:00", "18:00 - 19:00"];
$jour = ["Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi"];
include 'static/edtHead.html';
$html = "\n\n<div class=edt id=tableEdt ><h1 text-align=center>" . $groupe_decode . " Semaine " . $_POST['date'] . "</h1>\n\n\n<table id=boutons>\n<tr>\n<form method=post action=index.php>\n<td>\n\n\t<input type=hidden name=groupe value=" . urlencode(urldecode($grp)) . " />\n\t<input type=hidden name=date value=" . $precedent . " />\n\t<input type=hidden name=edt value=true />\n\t<input class=suiv_pre type=submit value='Semaine Precedenteeeeeeeee' />\n\n<td/>\n\n<td>\n\n\t<input type=hidden name=groupe value=" . urlencode(urldecode($grp)) . " />\n\t<input type=hidden name=date value=" . $suivant . " />\n\t<input type=hidden name=edt value=true />\n\t<input class=suiv_pre type=submit value='Semaine Suivante' />\n\n<td/>\n<td>\n<a href=index.php?ics=" . urlencode($_POST['groupe']) . "&semaine=" . $_POST['date'] . " target=_blank> <input class=suiv_pre type=button value=FeuilleAbsence> </a>\n<td/>\n</form>\n<tr/>\n</table>\n\n\n\n\n\n\n<table class=tg><tr><th class=tg-c3cn>Heures</th>";
for ($i = 0; $i < 11; $i++) {
$html .= "<th class=tg-c3cn colspan=6>" . $crenaux[$i] . "</th> ";
}
$html .= "</tr>";
for ($j = 0; $j < 5; $j++) {
$tab_courzero = array();
$journee = new DateTime();
$journee->setISOdate("2016", $_POST['date']);
$journee->setTime(8, 0, 0);
//$courpre = new DateTime("2016-02-15 08:00:00");
//Noé
$nbGroupes = count($dao->getGroupes($dao->getCoursDate($journee->format("Y-m-d h:i:s"))));
if (isset($dao->getGroupes($dao->getCoursDate($journee->format("Y-m-d h:i:s")))[0]) && $dao->getGroupes($dao->getCoursDate($journee->format("Y-m-d h:i:s")))[0]->getNumero() == "1") {
$nbGroupes++;
}
//
$html .= "<td class=tg-c3cn rowspan=" . ($nbGroupes * 2 - 1) . ">" . $jour[$j] . "</td>";
foreach ($dao->getGroupes($dao->getCoursDate($journee->format("Y-m-d h:i:s"))) as $ungroupe) {
// echo $ungroupe->getNumero();
$journee = new DateTime();
$journee->setISOdate("2016", $_POST['date']);
$journee->setTime(8, 0, 0);
$courpre = new DateTime();
$courpre->setISOdate("2016", $_POST['date']);
$courpre->setTime(9, 0, 0);
if ($j > 0) {
$cours = $dao->getGroupeSousGroupe($journee->add(new DateInterval("P" . $j . "D"))->format("Y-m-d h:i:s"), $ungroupe->getNumero());
$coursG2 = $dao->getCoursDateJourneeSousGroupeBis($journee->format("Y-m-d h:i:s"), $ungroupe->getNumero());
$courpre = $courpre->add(new DateInterval("P" . $j . "D"));
} else {
$cours = $dao->getGroupeSousGroupe($journee->format("Y-m-d h:i:s"), $ungroupe->getNumero());
$coursG2 = $dao->getCoursDateJourneeSousGroupeBis($journee->format("Y-m-d h:i:s"), $ungroupe->getNumero());
}
$cours = array_merge($cours, $tab_courzero);
sort($cours);
sort($coursG2);
if ($ungroupe->getNumero() == "0") {
$tab_courzero = $cours;
} else {
$html .= "<tr>";
foreach ($cours as $c) {
if ($c->getTypeCour() == "TP") {
$class = "tg-y0wm rowspan=1";
} else {
if ($c->getTypeCour() == "TD") {
$class = "td rowspan=2";
} else {
if ($c->getTypeCour() == "DS=TD") {
$class = "ds rowspan=2";
} else {
if ($c->getTypeCour() == "Cours") {
$class = "amphi rowspan=2";
} else {
$class = "tg-4wtr rowspan=1";
}
}
}
}
//var_dump($dao->getCoursDateJourneeSousGroupe($journee->format("Y-m-d h:i:s"), "1"));
if (diffCoursDate($courpre, $c->getDateDeb()) > 0) {
$html .= "<td class=tg-jbrh colspan=" . diffCoursDate($courpre, $c->getDateDeb()) . " width=" . diffCoursDate($courpre, $c->getDateDeb()) . "0></td>";
}
$html .= "<td class=" . $class . " colspan=" . $c->getDureeToInt() . " width=" . $c->getDureeToInt() . "><div class=nom_matiere>" . $c->getMatiere() . "</div> <div class=prof >" . $c->getProf() . "</div> \n <div class=salle >" . $c->getSalle() . "</div>\n</td>";
$courpre = $c->getDateFin();
}
$html .= "</tr>";
if (!empty($coursG2)) {
$courpre = $dao->getCourPrecedent($coursG2[0]);
$html .= "<tr>";
foreach ($coursG2 as $c2) {
if ($c2->getTypeCour() == "TP") {
$class = "tg-y0wm";
} else {
if ($c2->getTypeCour() == "TD") {
$class = "td rowspan=2";
} else {
if ($c2->getTypeCour() == "Cours") {
$class = "amphi rowspan=2";
} else {
$class = "tg-4wtr rowspan=2";
}
}
}
if (diffCoursDate($courpre, $c2->getDateDeb()) > 0) {
$html .= "<td class=tg-jbrh colspan=" . diffCoursDate($courpre, $c2->getDateDeb()) . " width=" . diffCoursDate($courpre, $c2->getDateDeb()) . "0></td>";
}
$html .= "<td class=" . $class . " colspan=" . $c2->getDureeToInt() . " width=" . $c2->getDureeToInt() . "><div class=nom_matiere>" . $c2->getMatiere() . "</div> <div class=prof >" . $c2->getProf() . "</div> \n <div class=salle >" . $c2->getSalle() . "</div>\n</td>";
//.........这里部分代码省略.........