Ejemplo n.º 1
0
												</tr>
												<tr>
													<th rowspan="2">Catégorie</th>
													<th rowspan="2">Type</th>
													<th colspan="' . $nbPeriodes . '">Période</th>
												</tr>
												<tr>';
// RECUP CATYPE 'A1' 'A3' etc + libelle type
$stmtCatype = retourneStatementSelect('SELECT CONCAT(lettre, num) as catype, libelle FROM type');
while ($resultatCatype = $stmtCatype->fetch(PDO::FETCH_ASSOC)) {
    $catypes['ID'][] = $resultatCatype['catype'];
    $catypes[$resultatCatype["catype"]] = $resultatCatype['libelle'];
}
$stmtCatype = null;
// RECUP LES ID PERIODE
$stmtPeriode = retourneStatementSelect('SELECT * FROM periode');
while ($resultatPeriode = $stmtPeriode->fetch(PDO::FETCH_ASSOC)) {
    $lignes .= '<td>' . setDateFormatLecture($resultatPeriode['datedeb']) . ' au ' . setDateFormatLecture($resultatPeriode['datefin']) . '</td>';
    $periodes[] = $resultatPeriode['idperiode'];
}
$stmtPeriode = null;
$lignes .= '					</tr>';
// <td rowspan="3">A <span class="pc">- Passager</span></td>
// <td>1 <span class="pc">- Adulte</span></td>
foreach ($catypes['ID'] as $CATYP) {
    $lignes .= '<tr>';
    switch ($CATYP) {
        case 'A1':
            $lignes .= '<td rowspan="3">A <span class="pc">- Passager</span></td>
										<td>1 <span class="pc">- ' . $catypes[$CATYP] . '</span></td>';
            break;
Ejemplo n.º 2
0
									<div class="form-group">
									  <div>
									    <label for="select_liaison" control-label">Liaison effectuée</label>
										<select class="form-control" name="select_liaison" id="select_liaison">';
$stmt = retourneStatementSelect('SELECT code, idportdepart, idportarrivee FROM liaison');
while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
    $lignes .= '	<option value="' . $resultat['code'] . '">' . returnNomLiaison($resultat['idportdepart'], $resultat['idportarrivee']) . '</option>';
}
$lignes .= '
										</select>
									  </div>
									</div>
									<div class="form-group">
									  <div>
									    <label for="select_bateau" control-label">Bateau utilisé</label>
										<select class="form-control" name="select_bateau" id="select_bateau">';
$stmt = retourneStatementSelect('SELECT idbateau, nom FROM bateau');
while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
    $lignes .= '	<option value="' . $resultat['idbateau'] . '">' . $resultat['nom'] . '</option>';
}
$lignes .= '
										</select>
									  </div>
									</div>
									<div>
										<button type="" class="btn btn-primary">Valider</button>
									</div>
								  </fieldset><br>
								  <span id="crea_traversee_msg"></span>
							</form>';
echo $lignes;
Ejemplo n.º 3
0
									</div>
									<div class="form-group">
									  <div>
									    <label for="select_periode" control-label">Période</label>
										<select class="form-control" name="select_periode" id="select_periode">';
$stmtPeriode = retourneStatementSelect('SELECT idperiode FROM periode');
while ($resultatPeriode = $stmtPeriode->fetch(PDO::FETCH_ASSOC)) {
    $lignes .= '	<option value="' . $resultatPeriode['idperiode'] . '">' . returnNomPeriode($resultatPeriode['idperiode']) . '</option>';
}
$lignes .= '
										</select>
									  </div>
									</div>';
$stmtCategories = retourneStatementSelect('SELECT lettre, nom FROM categorie');
while ($resCategories = $stmtCategories->fetch(PDO::FETCH_ASSOC)) {
    $stmtTypes = retourneStatementSelect('SELECT lettre, num, libelle FROM type WHERE lettre="' . $resCategories['lettre'] . '"');
    while ($resTypes = $stmtTypes->fetch(PDO::FETCH_ASSOC)) {
        $lignes .= '<div class="form-group">
										  <label for="' . $resCategories['lettre'] . '-' . $resTypes['num'] . '-input_tarif" control-label">' . $resCategories['nom'] . ' / ' . $resTypes['libelle'] . '</label>
										  <div>
											<input type="number" class="form-control tarif"  cat="' . $resCategories['lettre'] . '" typ="' . $resTypes['num'] . '" name = "' . $resCategories['lettre'] . '-' . $resTypes['num'] . '-input_tarif" id="' . $resCategories['lettre'] . '-' . $resTypes['num'] . '-input_tarif" value="">
										  </div>
										</div>';
    }
}
$lignes .= '
									<div>
										<button type="" class="btn btn-primary">Valider</button>
									</div>
								  </fieldset><br>
								  <span id="crea_tarif_msg"></span>
Ejemplo n.º 4
0
										<input type="text" placeholder="15/06/2016" class="form-control" name = "input_datefin" id="input_datefin" value="' . setDateFormatLecture($DFIN) . '">
									  </div>
									</div>
									<div>
										<button class="btn btn-blueish">Mettre à jour</button>
										<a id="del_choix" class="btn btn-reddish">Supprimer</a>
									</div>
								  </fieldset><br>
								  <span id="updt_periode_msg"></span>
									  <span id="del_msg"></span>
							</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un periode à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT idperiode, datedeb, datefin FROM periode');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['idperiode'] . '">' . setDateFormatLecture($resultat['datedeb']) . ' - ' . setDateFormatLecture($resultat['datefin']) . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
    $lignes .= '<div class="bloc_reservation" style="clear:both">';
    $lignes .= '<br><br><span><b>' . $resultat['nom'] . '</b>, réservation du <b>' . setTimestampFormatLecture($resultat['dateEnregistrement']) . '</b></span>';
    $lignes .= '<br>' . $resultat['adresse'] . ' ' . $resultat['cp'] . ' ' . $resultat['ville'] . '<br>';
    $stmtTraversee = retourneStatementSelect('Select dateTraversee, heure, idliaison, idbateau From traversee WHERE num =' . $resultat['idtraversee']);
    while ($resultatTraversee = $stmtTraversee->fetch(PDO::FETCH_ASSOC)) {
        $lignes .= 'Réservation pour le ' . setDateFormatLecture($resultatTraversee['dateTraversee']) . ' à ' . $resultatTraversee['heure'];
        $stmtLiaison = retourneStatementSelect('Select code, idsecteur, idportdepart, idportarrivee, distance From liaison WHERE code =' . $resultatTraversee['idliaison']);
        while ($resultatLiaison = $stmtLiaison->fetch(PDO::FETCH_ASSOC)) {
            $lignes .= ' pour la liaison ' . returnNomLiaison($resultatLiaison['idportdepart'], $resultatLiaison['idportarrivee']);
        }
    }
    $lignes .= '<br><table class="table table-striped><thead colspan="8"><b>Places</b></thead><tbody>';
    $lignes .= '<tr>';
    $stmtTickettes = retourneStatementSelect('Select lettre, num, quantite From enregistrer WHERE idreservation =' . $resultat['idreservation']);
    while ($resultatTickettes = $stmtTickettes->fetch(PDO::FETCH_ASSOC)) {
        $lignes .= '<th>' . $resultatTickettes['lettre'] . $resultatTickettes['num'] . '</th>';
    }
    $lignes .= '</tr><tr>';
    $stmtTickettes = retourneStatementSelect('Select lettre, num, quantite From enregistrer WHERE idreservation =' . $resultat['idreservation']);
    while ($resultatTickettes = $stmtTickettes->fetch(PDO::FETCH_ASSOC)) {
        if ($resultatTickettes['quantite'] == 0) {
            $lignes .= '<td>-</td>';
        } else {
            $lignes .= '<td>' . $resultatTickettes['quantite'] . '</td>';
        }
    }
    $lignes .= '</tr>';
    $lignes .= '</tbody></table>';
    $lignes .= '</div>';
}
echo $lignes;
Ejemplo n.º 6
0
											<input type="text" class="form-control" name = "input_dist" id="input_dist" value="' . $Dist . '">
										  </div>
										</div>
										<div>
											<button class="btn btn-blueish">Valider</button>
											<a id="del_choix" class="btn btn-reddish">Supprimer</a>
										</div>
									  </fieldset><br>
									  <span id="updt_liaison_msg"></span>
									  <span id="del_msg"></span>
								</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un liaison à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT code, idsecteur, idportdepart, idportarrivee, distance FROM liaison');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['code'] . '">' . $resultat['code'] . ' - ' . returnNomLiaison($resultat['idportdepart'], $resultat['idportarrivee']) . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
Ejemplo n.º 7
0
										<input type="text" class="form-control" name = "input_poidsMaxFret" id="input_poidsMaxFret" value="' . $PDSMAX . '">
									  </div>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Mettre à jour</button>
										<a id="del_choix" class="btn btn-reddish">Supprimer</a>
									  </div>
								  </fieldset><br>
								  <span id="updt_bateau_msg"></span>
									  <span id="del_msg"></span>
							</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un bateau à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT idbateau, nom, longueurBat, largeurBat, heritage FROM bateau');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['idbateau'] . '">' . $resultat['nom'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
Ejemplo n.º 8
0
											<input type="text" class="form-control" name = "input_nom" id="input_nom" value="' . $NOM . '">
										  </div>
										</div>
										<div>
											<button type="" id="upd_choixSect" class="btn btn-blueish">Mettre à jour</button>
											<a id="del_choix" class="btn btn-reddish">Supprimer</a>
										</div>
									  </fieldset><br>
									  <span id="updt_port_msg"></span>
									  <span id="del_msg"></span>
								</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un port à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT idport, nom FROM port');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['idport'] . '">' . $resultat['nom'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
								  </fieldset><br>
								  <span id="updt_bateau_cptmax"></span>
							</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un bateau à modifier pour une catégorie</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT idbateau, nom, longueurBat, largeurBat, heritage FROM bateau WHERE heritage=0');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['idbateau'] . '">' . $resultat['nom'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div class="form-group">
										<select class="form-control" name="select_ChoixCat" id="select_ChoixCat">';
    $stmt = retourneStatementSelect('SELECT lettre, nom FROM categorie');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['lettre'] . '">' . $resultat['lettre'] . ' - ' . $resultat['nom'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
Ejemplo n.º 10
0
										</select>
									  </div>
									</div>
									<div>
											<button type="" id="upd_choixTraversee" class="btn btn-blueish">Mettre à jour</button>
											<a id="del_choix" class="btn btn-reddish">Supprimer</a>
									</div>
								  </fieldset><br>
									<span id="crea_traversee_msg"></span>
									<span id="del_msg"></span>
							</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez une traversee à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT num FROM traversee ORDER BY num');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['num'] . '">' . $resultat['num'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
Ejemplo n.º 11
0
    if ($resultatAction['type_action'] == $ACTION) {
        $selected = 'selected="selected"';
    } else {
        $selected = "";
    }
    $lignesFormChoix .= '			<option ' . $selected . ' value="' . $resultatAction['type_action'] . '">' . $resultatAction['type_action'] . '</option>';
}
$lignesFormChoix .= '		</select>
											</div>
											<div>
												<button type="submit" id="choixAction" class="btn btn-blueish" style="margin-bottom:30px;">Valider</button>
											</div>
										  </fieldset>
										  <div class="col-lg-4"></div>
									</form>';
$lignes = $lignesFormChoix;
/****** affichage des modifications *****/
$stmt = retourneStatementSelect('SELECT idmodif, iduser, nom_prenom, table_modifiee, action, donnees, date_modif FROM modifications ' . $WHERE . ' ORDER BY idmodif DESC');
while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
    $lignes .= '<div class="bloc_reservation" style="clear:both">';
    $lignes .= '<br><span><b>' . $resultat['nom_prenom'] . '</b>, modification du <b>' . setTimestampFormatLecture($resultat['date_modif']) . '</b></span>';
    $lignes .= '<br>sur la table "' . $resultat['table_modifiee'] . '" a été opérée une action de <b>' . $resultat['action'] . '</b> avec les données suivantes :<br><br>';
    // .$resultat['donnees'].'<br>' ;
    foreach (json_decode($resultat['donnees']) as $key => $value) {
        if ($key != "CHAMPS_ID") {
            $lignes .= '[' . $key . ']' . ' => ' . $value . '<br>';
        }
    }
    $lignes .= '<br></div>';
}
echo $lignes;
Ejemplo n.º 12
0
											<input type="text" class="form-control" name = "input_libequip" id="input_libequip" value="' . $libequip . '">
										  </div>
										</div>
										<div>
											<button type="" id="upd_choixSect" class="btn btn-blueish">Mettre à jour</button>
											<a id="del_choix" class="btn btn-reddish">Supprimer</a>
										</div>
									  </fieldset><br>
									  <span id="updt_equipement_msg"></span>
									  <span id="del_msg"></span>
								</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un equipement à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT idequip, libequip FROM equipement');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['idequip'] . '">' . $resultat['libequip'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
Ejemplo n.º 13
0
											<input type="text" class="form-control" name = "input_nom" id="input_nom" value="' . $NOM . '">
										  </div>
										</div>
										<div>
											<button type="" id="upd_choixSect" class="btn btn-blueish">Mettre à jour</button>
											<a id="del_choix" class="btn btn-reddish">Supprimer</a>
										</div>
									  </fieldset><br>
									  <span id="updt_secteur_msg"></span>
									  <span id="del_msg"></span>
								</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un secteur à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT idsecteur, nom FROM secteur');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['idsecteur'] . '">' . $resultat['nom'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}
Ejemplo n.º 14
0
function recupLastInsertBat($data)
{
    $ID = "";
    $sql = "SELECT idbateau From bateau WHERE nom= '" . $data['params']['nom'] . "'";
    $stmt = retourneStatementSelect($sql);
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $ID = $resultat['idbateau'];
    }
    $stmt = null;
    return $ID;
}
Ejemplo n.º 15
0
												<input type="text" class="form-control" name = "input_droit" id="input_droit" value="' . $droit . '">
											  </div>
											</div>
										<div>
											<button type="" id="upd_choixMembre" class="btn btn-blueish">Mettre à jour</button>
											<a id="del_choix" class="btn btn-reddish">Supprimer</a>
										</div>
									  </fieldset><br>
									  <span id="updt_membre_msg"></span>
									  <span id="del_msg"></span>
								</form>';
    echo $lignes;
} else {
    /**** FORM SELECT ID ******/
    $lignesFormChoix = '<form method="post" class="form-horizontal">
									<legend>Choisissez un membre à modifier</legend>
									<fieldset class="col-lg-4">
									<div class="form-group">
										<select class="form-control" name="select_Choix" id="select_Choix">';
    $stmt = retourneStatementSelect('SELECT id, nom, prenom FROM membre');
    while ($resultat = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $lignesFormChoix .= '			<option value="' . $resultat['id'] . '">' . $resultat['nom'] . ' ' . $resultat['prenom'] . '</option>';
    }
    $lignesFormChoix .= '		</select>
									</div>
									<div>
										<button type="submit" class="btn btn-blueish">Modifier cet élément</button>
									</div>
								</form>';
    echo $lignesFormChoix;
}