Forum » » Version future » » V16 php7 et anciens scripts
Posté : 28 févr. 2019 à 00:40
<?
!include! ("mainfile.php");
!include!("header.php");
$textsize10 = 3; # Grand Titre
$textsize12 = 1; # Texte Lignes
$textcolor10 = "red"; # Grand Titre
$textcolor12 = "black"; # Texte Lignes
echo "<center><font color=\"$textcolor10\" size=\"$textsize10\"><b>$niveau : Les mails des inscrits au CPGD pour la saison en cours</b></font></center>";
echo "<center><font color=\"$textcolor12\" size=\"$textsize10\"><b>ceci pour que vous puissiez la copier dans votre fournisseur mail pour des envois groupés</b></font></center>";
function niveau() {
global $sortby, $list;
$niveauplongee = array ("".translate("All")."", "Préparation Niveau 1","Niveau 1","Niveau 2","Niveau 3","Niveau 4","Niveau 5","Initiateur","MF1","MF2","TIV","Nitrox","VHF");
echo "<table width=\"100%\" border=\"0\"><tr><td width=\"50%\" align=\"center\" valign=\"top\">";
echo "Sélection par niveau :";
$num = count($niveauplongee) - 1;
$counter = 0;
while (list(, $npl) = each($niveauplongee)) {
echo "<a href=\"cpgd_mail.php?niveau=$npl\" class=\"noir\">$npl</a>";
if ( $counter == round($num/1) ) {
echo " <br/> ";
} elseif ( $counter != $num ) {
echo " | ";
}
$counter++;
}
echo "</form>";
echo "</td></tr>";
}
niveau();
$niveau=removeHack(stripslashes(htmlspecialchars($niveau, ENT_QUOTES)));
$sortby=removeHack($sortby);
if (!isset($niveau)) { $niveau = translate("All"); }
if ( $niveau != "".translate("All")."" AND $niveau == "Niveau 1" ){
$where= "where niveau like '".$niveau."%'";
} else if ( $niveau != "".translate("All")."" ) {
$where= "where niveau like '%".$niveau."%'";
} else {
$where= "";
}
echo "<br/><br/>";
echo "<tr><tr>";
echo "<center><table width=\"90%\" border=\"1\"><tr><td width=\"50%\"><font color=\"$textcolor12\" size=\"$textsize10\">";
$res = @mysql_query("SELECT * FROM cpgd_membres $where ORDER BY nom");
$rows = mysql_numrows($res);
$col++;
while ($ligne = mysql_fetch_array($res)) {
$oui = $ligne["oui"];
$email = $ligne["Email"];
if (empty($oui))echo "";
else
{
if (empty($email))echo "";
else echo "$email , ";
}
}
$col++;
echo "</font></td></tr>\n";
echo "</table>";
echo "<br><br>";
echo "</table>";
echo "<br><br>";
!include!("footer.php");
?>
Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=26671&forum=4