$count = 0; $i = ($page - 1) * $rpp; while ($count < $rpp && $i < $tcount) { mysqli_data_seek($result, $i); $row = mysqli_fetch_array($result); /* dernière connexion au portail if ($row["lastvisit_user"] != "0000-00-00"){ $dateusa = DateTime::createFromFormat('Y-m-d', $row["lastvisit_user"]); $datefr = $dateusa->format('d/m/Y'); }else{ $datefr="NC"; } */ $age = date('Y') - $row["annee_naissance_user"]; //ADHESION $adhesion = getNomTarif($row["tarif_user"]); $aujourdhui = date_create(date('Y-m-d')); $daterenouvellement = date_create($row["dateRen_user"]); //$interval = date_diff($aujourdhui,$daterenouvellement); //debug($interval->format('%R%a')); if ($row["status_user"] == 1) { if ($daterenouvellement <= $aujourdhui) { $classadh = 'label label-warning'; } elseif ($daterenouvellement > $aujourdhui) { $classadh = 'label label-success'; } } elseif ($row["status_user"] == 2) { $classadh = 'label label-danger'; } //TARIF CONSULTATION $tarifTemps = getForfaitConsult($row["id_user"]);
if ($mesno != "") { echo getError($mesno); } $b = $_GET["b"]; $iduser = $_GET["iduser"]; $searchuser = $_POST["searchuser"]; $idstatut = $_GET["idstatut"]; $idsession = $_GET["idsession"]; $espaces = getAllepn(); // affichage d'une session--------------------------------------- $row = getSession($idsession); $titresession = getTitreSession($row["nom_session"]); $anim = getUserName($row["id_anim"]); $salle = mysqli_fetch_array(getSalle($row["id_salle"])); $nomsalle = $salle["nom_salle"] . " (" . $espaces[$salle["id_espace"]] . ")"; $tarif = getNomTarif($row["id_tarif"]); $idtarif = $row["id_tarif"]; $epn = $salle['id_espace']; $nbplace = $row["nbplace_session"]; $sessionstatut = $row["status_session"]; //Afficher les dates de la session $nbrdates = $row["nbre_dates_sessions"]; $datesarray = getDatesSession($idsession); for ($f = 0; $f < $nbrdates; $f++) { $rowd = mysqli_fetch_array($datesarray); //debug($row); $datessession = $datessession . getDatefr($rowd["date_session"]) . " <br>"; $iddate = $rowd["id_datesession"]; //donner la derniere id } $placesoccupee = countPlaceSession($idsession, 0);
<?php /// forfait atelier utilisateur $tariforfaits = getTarifsbyCat(5); $rowtransaction = getAllForfaitUser($id_user, "for"); $nbf = mysqli_num_rows($rowtransaction); if ($nbf == 0) { echo "<p>l'adhérent n'a souscrit à aucun forfait atelier</p>"; } else { ?> <div class="table"><table class="table"><thead><th>Nom du Tarif</th><th>Date d'achat</th><th>Nbr</th><th>Dépensé</th><th>Statut</th><th></th><th></th></thead> <?php for ($f = 0; $f < $nbf; $f++) { $rowf = mysqli_fetch_array($rowtransaction); $nomTarif = getNomTarif($rowf["id_tarif"]); //**** le chiffre issu de la table rel $rowforfait = getForfaitDonnesbyID($rowf['id_transac'], $id_user); $achete = $rowforfait["total_atelier"]; $depense = $rowforfait["depense"]; $statutachat = $forfaitArray[$rowf['status_transac']]; $statutforfait = $arraystatutforfait[$rowforfait["statut_forfait"]]; ?> <tr><td><?php echo $nomTarif; ?> </td> <td><?php echo $rowf["date_transac"]; ?> </td>
$idatelier = $_GET["idatelier"]; $iduser = $_GET["iduser"]; $searchuser = $_POST["searchuser"]; $idstatut = $_GET["idstatut"]; $espaces = getAllepn(); if ($b != "") { //debut if0 //recuperation des variables $row = getAtelier($idatelier, 0); $idsujet = $row["id_sujet"]; $result = getSujetById($idsujet); $rowsujet = mysqli_fetch_array($result); $anim = getUserName($row["anim_atelier"]); $salle = mysqli_fetch_array(getSalle($row["salle_atelier"])); $nomsalle = $salle["nom_salle"] . " (" . $espaces[$salle["id_espace"]] . ")"; $tarif = getNomTarif($row["tarif_atelier"]); $idtarif = $row["tarif_atelier"]; $statut = $row["statut_atelier"]; //variable pour les courriers $idepn = $salle['id_espace']; $statusepnconnect = $row["status_atelier"]; //actions du formulaire pour inscriptions if ($b == 2) { if (FALSE != addUserAtelier($idatelier, $idstatut, $iduser, $idtarif)) { echo geterror(25); } } if ($b == 3) { if (FALSE != delUserAtelier($idatelier, $iduser)) { echo geterror(27); }
<thead><tr> <th></th> <th>Nom de l'adhérent</th> <th>Machine</th> <th >Début</th> <th >Fin</th> <th>Durée </th> <th > </th></tr></thead> <tbody> <?php while ($rowresa = mysqli_fetch_array($resultresa)) { $statususer = getUser($rowresa['id_user_resa']); if ($statususer['status_user'] == 2) { $class = "text-muted"; $info = "<span class=\"badge bg-primary\" title=\"Renouvellement de l'adhésion depuis le " . getDateFr($statususer['dateRen_user']) . " au tarif : " . getNomTarif($statususer['tarif_user']) . "\" data-toggle=\"tooltip\"><i class=\"fa fa-info\"></i></span>"; } else { $class = ""; $info = ""; } echo '<tr><form method="post" role="form"> <td><a href="index.php?a=1&b=2&iduser='******'id_user_resa'] . '"><button type="button" class="btn btn-primary sm" data-toggle="tooltip" title=" Fiche adhérent"><i class="fa fa-edit"></i></button></a> <a href="index.php?a=21&b=1&iduser='******'id_user_resa'] . '"><button type="button" class="btn bg-navy sm" data-toggle="tooltip" title="Ajouter impressions"><i class="fa fa-print"></i></button></a></td> <td><h5 id="p' . $rowresa['id_user_resa'] . '" class=' . $class . '>' . getUserName($rowresa['id_user_resa']) . ' ' . $info . '</h5></td> <td><h5>' . getComputerName($rowresa['id_computer_resa']) . '</h5></td> <td><h5>' . getTime($rowresa['debut_resa']) . '</h5></td> <td><h5>' . getTime($rowresa['debut_resa'] + $rowresa['duree_resa']) . '</h5></td>
$dateheure = getDayfr($row["date_atelier"]) . " à " . $row["heure_atelier"]; $salle = mysqli_fetch_array(getSalle($row["salle_atelier"])); $nomsalle = $salle["nom_salle"] . " (" . $espaces[$salle["id_espace"]] . ")"; $anim = getUserName($row["anim_atelier"]); $posturl = "index.php?m=6&b=2&idatelier=" . $idatelier; $bouton = "s'inscrire à cet atelier"; break; case 5: $rowsession = getSession($idsession); $titresession = getTitreSession($rowsession["nom_session"]); $titreatelier = stripslashes($titresession["session_titre"]); $detailatelier = stripslashes($titresession["session_detail"]); $anim = getUserName($rowsession["id_anim"]); $salle = mysqli_fetch_array(getSalle($rowsession["id_salle"])); $nomsalle = $salle["nom_salle"] . " (" . $espaces[$salle["id_espace"]] . ")"; $prix = getNomTarif($rowsession["id_tarif"]); $nbplaceatelier = $rowsession["nbplace_session"]; $nbplacerestantes = $nbplaceatelier - countPlaceSession($idsession, 0); //Afficher les dates de la session $nbrdates = $rowsession["nbre_dates_sessions"]; $datesarray = getDatesSession($idsession); for ($f = 0; $f < $nbrdates; $f++) { $rowd = mysqli_fetch_array($datesarray); $dateheure = $dateheure . getDatefr($rowd["date_session"]) . " <br>"; // $iddate=$rowd["id_datesession"]; //donner la derniere id } $posturl = "index.php?m=6&b=6&idsession=" . $idsession . "&nbd=" . $nbrdates; $bouton = "s'inscrire à cette session"; $break; } ?>