Пример #1
0
Файл: day.php Проект: swirly/GRR
 $tab_ligne = 3;
 $iii = 0;
 for ($t = $am7; $t <= $pm7; $t += $resolution) {
     echo '<tr>' . PHP_EOL;
     if ($iii % 2 == 1) {
         tdcell("cell_hours");
     } else {
         tdcell("cell_hours2");
     }
     $iii++;
     if ($enable_periods == 'y') {
         $time_t = date("i", $t);
         $time_t_stripped = preg_replace("/^0/", "", $time_t);
         echo $periods_name[$time_t_stripped] . '</td>' . PHP_EOL;
     } else {
         echo affiche_heure_creneau($t, $resolution) . '</td>' . PHP_EOL;
     }
     while (list($key, $room) = each($rooms)) {
         if (verif_acces_ressource(getUserName(), $room)) {
             if (isset($today[$room][$t]["id"])) {
                 $id = $today[$room][$t]["id"];
                 $color = $today[$room][$t]["color"];
                 $descr = $today[$room][$t]["data"];
             } else {
                 unset($id);
             }
             if (isset($id) && !est_hors_reservation(mktime(0, 0, 0, $month, $day, $year), $area)) {
                 $c = $color;
             } else {
                 if ($statut_room[$room] == "0") {
                     $c = "avertissement";
Пример #2
0
$nb_case = 0;
$semaine_changement_heure_ete = 'no';
$semaine_changement_heure_hiver = 'no';
for ($slot = $first_slot; $slot <= $last_slot; $slot++) {
    echo "<tr>";
    if ($slot % 2 == 1) {
        tdcell("cell_hours");
    } else {
        tdcell("cell_hours2");
    }
    if ($enable_periods == 'y') {
        $time_t = date("i", $t);
        $time_t_stripped = preg_replace("/^0/", "", $time_t);
        echo $periods_name[$time_t_stripped] . "</td>\n";
    } else {
        echo affiche_heure_creneau($t, $resolution) . "</td>\n";
    }
    $wt = $t;
    $empty_color = "empty_cell";
    $num_week_day = $weekstarts;
    for ($weekday = 0; $weekday < 7; $weekday++) {
        $wday = date("d", $wt);
        $wmonth = date("m", $wt);
        $wyear = date("Y", $wt);
        $hour = date("H", $wt);
        $minute = date("i", $wt);
        $heureete1 = heure_ete_hiver("ete", $wyear, 0);
        $heurehiver1 = heure_ete_hiver("hiver", $wyear, 0);
        $heureete2 = heure_ete_hiver("ete", $wyear, 2);
        $heurehiver2 = heure_ete_hiver("hiver", $wyear, 2);
        if (!isset($correct_heure_ete_hiver) || $correct_heure_ete_hiver == 1) {
Пример #3
0
             $tplArray['jours'][$weekcol]['jourCycleActif'] = false;
         }
         /* j'ajoute les creneaux dans les jours */
         for ($tCreneaux = $am7; $tCreneaux <= $pm7; $tCreneaux += $resolution) {
             //$tplArray['jours'][$weekcol]['creneuaxH'][''] =
             $tplArray['jours'][$weekcol]['creneauxHoraire'][$tCreneaux]['heure'] = date('H', $tCreneaux);
             $tplArray['jours'][$weekcol]['creneauxHoraire'][$tCreneaux]['minute'] = date('i', $tCreneaux);
             $tplArray['jours'][$weekcol]['creneauxHoraire'][$tCreneaux]['tCreneauStart'] = $tCreneaux;
             $tplArray['jours'][$weekcol]['creneauxHoraire'][$tCreneaux]['tCreneauEnd'] = $tCreneaux + $resolution;
             if ($enable_periods == 'y') {
                 $time_t = date('i', $tCreneaux);
                 $time_t_stripped = preg_replace('/^0/', '', $time_t);
                 //echo $periods_name[$time_t_stripped].'</td>'.PHP_EOL;
                 $tplArray['jours'][$weekcol]['creneauxHoraire'][$tCreneaux]['periodeNameOrHeure'] = $periods_name[$time_t_stripped];
             } else {
                 $tplArray['jours'][$weekcol]['creneauxHoraire'][$tCreneaux]['periodeNameOrHeure'] = affiche_heure_creneau($tCreneaux, $resolution, true);
                 //echo affiche_heure_creneau($t, $resolution).'</td>'.PHP_EOL;
             }
         }
         //echo '</th>'.PHP_EOL;
     }
     $num_week_day++;
     $num_week_day = $num_week_day % 7;
 }
 /*echo '</tr>'.PHP_EOL;
   echo '</thead>'.PHP_EOL;*/
 /**
  * todo vocab, a rassembler
  * sorti de la boucle for
  */
 $tplArray['vocab']['ressource_temporairement_indisponible'] = get_vocab('ressource_temporairement_indisponible');
Пример #4
0
            }
          }
        } // Fin Deuxième boucle sur la liste des ressources du domaine

        // Répétition de la première colonne
        // Si la ressource est temporairement indisponible, on le signale, sinon, couleur normale
        tdcell("cell_hours");
        if( $enable_periods == 'y' ){
            $time_t = date("i", $t);
            $time_t_stripped = preg_replace( "/^0/", "", $time_t );
            echo $periods_name[$time_t_stripped] . "</td>\n";
            $tab[$tab_ligne][] =  $periods_name[$time_t_stripped];

        } else {
            echo affiche_heure_creneau($t,$resolution)."</td>\n";
            $tab[$tab_ligne][] = affiche_heure_creneau($t,$resolution);
        }

        echo "</tr>\n";

        reset($rooms);
        $tab_ligne++;
    }
    // répétition de la ligne d'en-tête
    echo "<tr>\n<th>&nbsp;</th>";
    for ($i = 0; $i < $nbcol; $i++)
    {
        // On affiche pas toutes les ressources
        if (verif_acces_ressource(getUserName(), $id_room[$i])) {
          echo "<th";
          if ($statut_room[$id_room[$i]] == "0") echo " class='avertissement' ";