function afficheliste($publie) { // and TO_DAYS(NOW()) - TO_DAYS(a.date) <= 90 $id_site = 2; if (!$_POST) { $cat = 0; $query = "select * from annonces a, annonces_annonces_sites sa, annonces_sites s, annonces_categories c where sa.id_annonce=a.id_annonce and sa.id_site=s.id_site and s.id_site='{$id_site}' and a.id_cat=c.id_cat and a.publie={$publie} and TO_DAYS(NOW()) - TO_DAYS(a.date) <= 90 order by date desc"; } else { extract($_POST, EXTR_OVERWRITE); if ($cat == 0) { $query = "select * from annonces a, annonces_annonces_sites sa, annonces_sites s, annonces_categories c where sa.id_annonce=a.id_annonce and sa.id_site=s.id_site and s.id_site='{$id_site}' and a.id_cat=c.id_cat and a.publie={$publie} and TO_DAYS(NOW()) - TO_DAYS(a.date) <= 90 order by date desc"; } else { $query = "select * from annonces a, annonces_annonces_sites sa, annonces_sites s, annonces_categories c where sa.id_annonce=a.id_annonce and sa.id_site=s.id_site and s.id_site='{$id_site}' and a.id_cat=c.id_cat and a.id_cat='{$cat}' and a.publie={$publie} and TO_DAYS(NOW()) - TO_DAYS(a.date) <= 90 order by date desc"; } } $result = mysql_query($query) or die("<p>Echec select<br>" . mysql_error() . "</p>"); while ($line = mysql_fetch_assoc($result)) { extract($line, EXTR_OVERWRITE); echo '<div class="span-244 last annonces">'; echo '<h3>'; if ($cat == 0) { echo '<span class="cat1">' . $categorie . '</span> : '; } echo utf8_encode(stripslashes($titre)) . '</h3>'; echo '<p class="publi">Annonce publiée le ' . datefr($date) . '</p>'; echo '<p>' . substr(utf8_encode(stripslashes($texte)), 0, 200) . ' <a href="pa-form.php?pa=' . $id_annonce . '">...<br />'; echo 'Modifier l\'annonce</a>'; // Suppression de l'annonce sur le site prover uniquement, à réactiver quand la gestion des petites annocnes sera effective partout. Supprime uniquement la liaison site <-> annonce // echo ' | <a href="pa-suppr.php?pa='.$id_annonce.'&suppr='.$id_site.'" onClick="return confirm(\'Supprimer l\\\'annonce << '.utf8_encode(stripslashes($titre)).' >> de prover.fr ?\nCette action est irreversible\');">Supprimer l\'annonce</a>'; // Suppression définitive de l'annonce, il est impossible de la récupérer echo ' | <a href="pa-suppr.php?pa=' . $id_annonce . '&suppr=0" onClick="return confirm(\'Supprimer l\\\'annonce << ' . utf8_encode(stripslashes($titre)) . ' >> ?\\nCette action est irreversible\');">Supprimer l\'annonce sur tous les sites</a>'; echo '</p>'; echo '</div>'; } }
//récupération des activités $reqactivite = $bdd->query("SELECT DISTINCT Nom,Tarif,DateAnimation,LieuRDV,NomOrganisateur FROM Inscription as i join Animation as a on a.ID_AN=i.ID_AN where i.ID_C ='" . $ID_C . "' and Annulation!='Oui' ORDER BY Nom;"); echo "Liste des activités pour : {$Prenom} {$Nom} "; while ($donnee = $reqactivite->fetch()) { ?> <tr> <td><b><?php echo $donnee['Nom']; ?> </b></td> <td><?php echo $donnee['Tarif']; ?> €</td> <td><?php echo $date = datefr($donnee['DateAnimation']); ?> </td> <td><?php echo $donnee['LieuRDV']; ?> </td> <td><?php echo $donnee['NomOrganisateur']; ?> </td> </tr> <?php } ?> </table>
" /> <table id="btn-plan-cdt"> <tr> <td ><input type="submit" name="prec" value="<<" class="bt50" /></td> <td><input type="submit" name="quit" id="quit" value="" class="bt-exit" /></td> <td ><input type="submit" name="suiv" value=">>" class="bt50" /> </td> </tr> </table> <table id="plan-cdt" cellpadding="1" cellspacing="1"> <thead> <tr><th> <img src="../images/livre.gif" alt="." /> </th> <?php // Affichage des jours et dates de la semaine en haut du tableau"j-M-Y", for ($i = 0; $i <= 5; $i++) { $TS = $Lundi + $i * 86400; echo '<td colspan="2"> ' . LeJour($TS) . "<br />" . datefr($TS) . "</td>\n"; } ?> </tr> </thead> <tbody> <?php $horaire = array("M1<br />", "M2<br />", "M3<br />", "M4<br />", "M5<br />", "S1<br />", "S2<br />", "S3<br />", "S4<br />", "S5<br />"); for ($h = 0; $h <= 9; $h++) { if (in_array(substr($horaire[$h], 0, 2), $cren_off)) { echo '<tr><td class="mi-jour" colspan="13"></td></tr>'; continue; } //Affichage de la designation des creneaux horaires echo "<tr><th>" . $horaire[$h] . date('G:i', $deb[$h]) . "-" . date('G:i', $fin[$h]) . "</th>\n"; //Affichage du contenu des creneaux horaires
<td><p style='color: <?php echo $color; ?> ;'><?php echo $donnee['Nom']; ?> </p></td> <td><p style='color: <?php echo $color; ?> ;'><?php echo $donnee['Prenom']; ?> </p></td> <td><p style='color: <?php echo $color; ?> ;'><?php echo $date = datefr($donnee['DateDeNaissance']); ?> </p></td> </tr> <?php } ?> </table> </div> </body> </html>
</p> <?php } else { echo $donnee['Prenom']; } ?> </td> <td><?php echo $donnee['TelPortable']; ?> </td> <td><?php echo $donnee['AdresseMail']; ?> </td> <td><?php echo $date = datefr($donnee['DateInscription']); ?> </td> <td><?php echo $donnee['transport']; ?> </td> <td><?php echo $donnee['MoyenPaiement']; ?> </td> <td><?php echo $donnee['Prix']; ?> </td> <td></td>
</div> <?php // $query="select * from actus a, categories_formations c where a.droite=1 and date_debut>= now() and a.categories_formations_id_categorie<9 and a.categories_formations_id_categorie=c.id_categorie order by a.date_debut"; $query = "select * from actus a, categories_formations c where a.droite=1 and date_debut>= now() and a.categories_formations_id_categorie<9 and a.categories_formations_id_categorie=c.id_categorie"; $result = mysql_query($query) or die("<p>Echec select<br>" . mysql_error() . "</p>"); while ($line = mysql_fetch_assoc($result)) { extract($line, EXTR_OVERWRITE); echo '<article class="blocimg ' . $classe_css . ' span-7 last">'; echo '<p><a href="pdf/' . $pdf_formation . '" title="' . $photo_droite_alt . '"><img src="img/actus/' . $photo_droite . '" alt="' . $photo_droite_alt . '" width="365" /><br />'; echo '<span class="titreformation">CERFAV | PROVER : ' . utf8_encode($titre_actu) . '</span><br />'; if ($date_debut == $date_fin or $date_fin == '') { $txt_date = datefr($date_debut); } else { $txt_date = datefr($date_debut) . ' au ' . datefr($date_fin); } echo 'Date : ' . $txt_date . ' - Tarif : ' . $tarif_formation . ' €</a></p>'; echo '</article>'; } ?> <article class="telechargement span-7 last"> <div class="logo">Cerfav | Prover qualifié OPQF & agréé CIR</div> <div class="logoimg1 span-7 last"> <div class="logoimg span-4"><a href="http://www.isqualification.com/" target="blank"><img src="img/opqf.jpg" height="65" alt="OPQF" /></a></div> <div class="logoimg span-3 last"><a href="http://www.enseignementsup-recherche.gouv.fr/pid24835/credit-impot-recherche.html" target="blank"><img src="img/logo-credit-impot-R.png" alt="Crédit Impôt Recherche" height="65" /></a></div> </div> </article>
<?php // echo '<p>pa = '.$_POST['pa'].'</p>'; // print_r($_GET); //$link2 = mysql_connect("$host", "annonces", "pgd8kst6") or die("Impossible de se connecter"); //$link2 = mysql_connect("cerfavidverre.mysql.db", "cerfavidverre", "vHnnxX4JMdsz") or die("Impossible de se connecter"); // OVH //mysql_select_db("annonces") or die("Erreur connexion Annonces"); $query = "select * from annonces where id_annonce='" . $_GET['pa'] . "'"; $result = mysql_query($query) or die("<p>Echec select<br>" . mysql_error() . "</p>"); while ($line = mysql_fetch_assoc($result)) { extract($line, EXTR_OVERWRITE); $query2 = "select * from annonces_categories where id_cat='{$id_cat}'"; $result2 = mysql_query($query2) or die("<p>Echec select<br>" . mysql_error() . "</p>"); while ($line2 = mysql_fetch_assoc($result2)) { $categorie = $line2['categorie']; } // echo '<h2></h2>'; echo '<div class="span-14 last annonce">'; echo '<h2>' . $categorie . ' : ' . utf8_encode(stripslashes($titre)) . '</h2>'; echo '<p class="publi">Annonce publiée le ' . datefr($date) . '</p>'; echo '<p>' . utf8_encode(stripslashes(nl2br($texte))) . '</p>'; if ($pj != '') { echo '<p><a href="pdf/annonces/' . $pj . '">Télécharger la pièce jointe</a></p>'; } echo '<p>'; if ($nom != '') { echo utf8_encode(stripslashes($nom)) . ' ' . utf8_encode(stripslashes($prenom)) . '<br/>'; } if ($rs != '') { echo utf8_encode($rs) . '<br/>'; }
} else { $class = ""; $classpan = "label label-success"; } //infos de l'atelier if ($row["statut_atelier"] == 2) { $info = "<small class=\"badge bg-blue\" data-toggle=\"tooltip\" title=\"Cet atelier a été cloturé, rdv aux archives pour modifier les présences\"><i class=\"fa fa-info\"></i></small>"; } elseif ($row["statut_atelier"] == 0 and strtotime($row["date_atelier"]) < strtotime(date('Y-m-d'))) { $info = "<small class=\"badge bg-blue\" data-toggle=\"tooltip\" title=\"Cet atelier n'a pas encore été cloturé, veuillez valider les présences rapidement\"><i class=\"fa fa-info\"></i></small>"; } else { $info = ""; } if ($row["nbplace_atelier"] - $nbplace < 0) { $nbplace = 0; } echo "<tr class=" . $class . "> \n\t\t\t\t\t <td>" . datefr($row["date_atelier"]) . "</td>\n\t\t\t\t\t <td>" . $row["heure_atelier"] . "</td>\n\t\t\t\t\t "; // en cas d'atelier cloturé aucun acces possible -> archives ! if ($row["statut_atelier"] > 1) { echo "<td>" . $rowsujet["label_atelier"] . " "; } else { echo " <td><a href=\"index.php?a=13&b=1&idatelier=" . $row["id_atelier"] . "\" data-toggle=\"tooltip\" title=\"Inscrire un adherent\">" . $rowsujet["label_atelier"] . "</a>"; } //Ajout mention "complet" if ($row["nbplace_atelier"] - $nbplace == 0) { echo " <b>COMPLET</b>"; } echo "</td>\n\t\t\t\t\t <td>" . $lieu . "</td>\n\t\t\t\t\t <td>" . $nbplace . " / " . $row["nbplace_atelier"] . "</td>\n\t\t\t\t\t\n\t\t\t\t\t <td>" . $enattente . "</td>\n\t\t\t\t\t <td><span class=\"" . $classpan . "\">" . $stateAtelier[$row["statut_atelier"]] . "</span></td>\n\t\t\t\t\t <td>" . getUserName($row["anim_atelier"]) . "</td>\n\t\t\t\t\t <td>" . $info . ""; if ($row["statut_atelier"] <= 1) { echo "<a href=\"index.php?a=14&idatelier=" . $row["id_atelier"] . "\"><button type=\"button\" class=\"btn bg-green btn-sm\" data-toggle=\"tooltip\" title=\"Modifier la programmation\"><i class=\"fa fa-edit\"></i></button></a>\n\t\t\t\t\t\t <a href=\"index.php?a=14&m=4&idatelier=" . $row["id_atelier"] . "\"><button type=\"button\" class=\"btn bg-red btn-sm\" data-toggle=\"tooltip\" title=\"Déprogrammer\"><i class=\"fa fa-trash-o\"></i></button></a>"; } echo "</td></tr>";
?> </td> <td><?php echo $donnee['AdresseMail']; ?> </td> <td><?php echo $donnee['TelFixe']; ?> </td> <td><?php echo $donnee['TelPortable']; ?> </td> <td><?php echo $date = datefr($dateUS); ?> </td> <td><?php echo $donnee['DatePremiere']; ?> </td> </tr> <?php } } ?> </table> </div> </body> </html>
</p></b> <?php } else { ?> <b> <?php echo $donnee['Prenom']; ?> </b> <?php } ?> </td> <td><?php echo $donnee['AdresseMail']; ?> </td> <th><?php echo $date = datefr($donnee['Date']); ?> </td> <td><a href="affichage_par.php?Nom=<?php echo $donnee['Nom'] . "&Prenom=" . $donnee['Prenom']; ?> " title="Afficher la listes des activités" value="Afficher"><img src="../Ressources/Images/aff.png" alt= "Afficher" id="aff"></a></td> </tr> <?php } ?> </table> </div> </body> </html>
<?php include "Header.php"; include "Double.php"; echo double(19) . "<br/>"; echo half(60) . "<br/>"; echo datefr("2015-10-05") . "<br/>"; echo dateus("05/10/2015") . "<br/>"; $tnombres = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); print_r(array_filter($tnombres, "pair")); print_r(array_filter($tnombres, "impair")); include "Footer.php";
function GereCommentaire2($ajout, $domaine, $note1, $note2, $utilisateur, $droitmin, $cejour, $cemoment) { // Gestion des deux commentaires possibles selon les droits. if ($ajout != '') { // Il y a un commentaire if ($droitmin) { $note2 = '[' . datefr($cejour) . '(' . $cemoment . '):' . $utilisateur . '] ' . $ajout . '\\r' . $note2; } else { $note1 = '[' . datefr($cejour) . '(' . $cemoment . '):' . $utilisateur . '] ' . $ajout . '\\r' . $note1; } } // On génère le bout de texte à insérer dans les requêtes if ($droitmin) { // les habilités peuvent modifier les deux commentaires. Les autres un seul. return $domaine . "_note1='{$note1}', " . $domaine . "_note2='{$note2}' "; } else { return $domaine . "_note1='{$note1}' "; } }
</td></tr> <tr><td>Statut : </td><td><?php echo $StatutAdherent; ?> </td></tr> <tr><td>Connaissance d'AVF : </td><td><?php echo $ConnaissanceAVF; ?> </td></tr> <tr><td>Raison d'arrivée : </td><td><?php echo $RaisonArrive; ?> </td></tr> <tr><td>Date d'adhésion : </td><td><?php if ($data['Date'] != '') { echo $date = datefr($Date); } ?> </td></tr> <tr><td>Prix de l'adhésion : </td><td><?php echo $Prix; ?> </td></tr> <tr><td>Méthode de Paiement : </td><td><?php echo $MoyenPaiement; ?> </td></tr> <tr><td>Validation du paiement : </td><td><?php echo $VerifPaiement; ?> </td></tr>
$texte = utf8_encode($texte); $photo_haut_alt = utf8_encode($photo_haut_alt); if ($photo_haut == '') { $photo_haut = 'formations-cerfav-prover.jpg'; } if ($date_debut != '') { if ($date_debut == $date_fin or $date_fin == '') { $txt_date = 'Le ' . datefr($date_debut) . '<br />'; } else { $mois_debut = $date_debut[5] . $date_debut[6]; $mois_fin = $date_fin[5] . $date_fin[6]; $jour_debut = $date_debut[8] . $date_debut[9]; if ($mois_debut == $mois_fin) { $txt_date = 'Du ' . $jour_debut . ' au ' . datefr($date_fin) . '<br />'; } else { $txt_date = 'Du ' . datefr($date_debut) . ' au ' . datefr($date_fin) . '<br />'; } } } else { $txt_date = ''; } echo '<article class="actus">'; // echo '<div class="actus">'; echo '<div class="span-15">'; echo '<img src="img/actus/' . $photo_haut . '" alt="' . $photo_haut_alt . '" width="550" height="234" />'; echo '</div>'; echo '<div class="span-7 last">'; echo '<h2>' . $titre_actu . '</h2>'; echo '<p>' . $texte . '<br />'; if ($categories_formations_id_categorie < 9) { echo $txt_date;