コード例 #1
0
ファイル: functions.php プロジェクト: rhertzog/lcs
function tableau_mois($mois_de, $annee_de, $mois_au, $annee_au)
{
	$jour = '1';
	$i = '0';
	$mois_passe = '';
	$annee_passe = '';
	$sortire_de_la_boucle = 'non';
	while ( $sortire_de_la_boucle != 'oui' )
	{

		// si le moi passe n'est pas défini alors on le définie avec
		if ( $mois_passe === '' and $annee_passe === '' )
		{
			$mois_passe = $mois_de;
			$annee_passe = $annee_de;
		}

	  if ( $mois_passe.'-'.$annee_passe === $mois_au.'-'.$annee_au ) { $sortire_de_la_boucle = 'oui'; }

		// tableau des nom des mois par rapport à leurs numéro
		$tab_mois = array('01'=>"jan.", '02'=>"fev.", '03'=>"mar.", '04'=>"avr.", '05'=>"mai", '06'=>"jui.", '07'=>"juil.", '08'=>"aoû.", '09'=>"sep.", '10'=>"oct.", '11'=>"nov.", '12'=>"déc.");

		$mois[$i]['mois'] = $tab_mois[$mois_passe].' '.$annee_passe;
		$mois[$i]['mois_court'] = $tab_mois[$mois_passe];
		$mois[$i]['num_mois'] = $mois_passe;
		$mois[$i]['num_annee'] = $annee_passe;

	  if ( $sortire_de_la_boucle != 'oui' )
	  {
		$mois_suivant = explode('/',mois_suivant('01/'.$mois_passe.'/'.$annee_passe));
		$mois_passe = $mois_suivant[1];
		$annee_passe = $mois_suivant[2];
	  }

	$i = $i + 1;
	}

	return($mois);
}
コード例 #2
0
ファイル: statistiques.php プロジェクト: rhertzog/lcs
		  $year = $ou_est_on[2]; $month = $ou_est_on[1]; $day =  $ou_est_on[0];
	        } else { $du = $day."/".$month.'/'.$year; }

	if (empty($_GET['echelle_x']) and empty($_POST['echelle_x'])) { $echelle_x = 'M'; }
	   else { if (isset($_GET['echelle_x'])) { $echelle_x = $_GET['echelle_x']; } if (isset($_POST['echelle_x'])) { $echelle_x = $_POST['echelle_x']; } }
	if (empty($_GET['echelle_y']) and empty($_POST['echelle_y'])) { $echelle_y = 'D'; }
	   else { if (isset($_GET['echelle_y'])) { $echelle_y = $_GET['echelle_y']; } if (isset($_POST['echelle_y'])) { $echelle_y = $_POST['echelle_y']; } }
	if (empty($_GET['type_graphique']) and empty($_POST['type_graphique'])) { $type_graphique = 'ligne'; }
	   else { if (isset($_GET['type_graphique'])) { $type_graphique = $_GET['type_graphique']; } if (isset($_POST['type_graphique'])) { $type_graphique = $_POST['type_graphique']; } }
	if (empty($_GET['long_absence']) and empty($_POST['long_absence'])) { $long_absence = ''; }
	   else { if (isset($_GET['long_absence'])) { $long_absence = $_GET['long_absence']; } if (isset($_POST['long_absence'])) { $long_absence = $_POST['long_absence']; } }
	if (empty($_GET['doublon_journee']) and empty($_POST['doublon_journee'])) { $doublon_journee = ''; }
	   else { if (isset($_GET['doublon_journee'])) { $doublon_journee = $_GET['doublon_journee']; } if (isset($_POST['doublon_journee'])) { $doublon_journee = $_POST['doublon_journee']; } }

	// si au n'est pas défini alors on prend le premier jour du mois suivant
	if ( $au === '' or $au === 'JJ/MM/AAAA' or $du > $au ) { $au = mois_suivant($du); }

// Préparation des requêtes
	// pour la sélection des type A/R/I/D
	if(!empty($type[0])) {
		$i = '0';
		while ( !empty($type[$i]) )
		{
			if( $i === '0' ) { $type_selectionne = "(type_absence_eleve = '".$type[$i]."'"; }
			if( $i != '0' ) { $type_selectionne = $type_selectionne." OR type_absence_eleve = '".$type[$i]."'"; }
				if(empty($type[$i+1])) { $type_selectionne = $type_selectionne.")"; }
		$i = $i + 1;
		}
	}
	// pour la sélection de la justification ou non justification
	 // affiché tout
コード例 #3
0
		
		<div class="container">
			<div class="top">
				<span class="left">
					<?php 
echo "<a href='" . mois_precedent($mois, $annee) . "'><<</a>";
?>
				</span>
				<span>
					<?php 
echo $tab_mois[$mois] . " " . $annee;
?>
				</span>
				<span class="right">
					<?php 
echo "<a href='" . mois_suivant($mois, $annee) . "'>>></a>";
?>
				</span>
			</div>
			<br>
			<div class="container">
				<div class="journom">
					<?php 
echo $tab_jours_min[1];
?>
				</div>
				<div class="journom">
					<?php 
echo $tab_jours_min[2];
?>
				</div>