Workshop Nosevol#3, 7-9 avril 2014
Du lundi 7 au mercredi 9 avril 2014, Campus de Beaulieu, Rennes
function minmaj($chaine) {
$sString=$chaine;
$sString = str_replace ('-', '¿ ', mb_strtolower($chaine, 'UTF-8'));
$sString = ucwords ($sString);//Pour ceux qui à l'origine sont précédés par des '-'
$sString = str_replace ('¿ ', '-', $sString);
return $sString;
}
mysql_connect("mysql-1.univ-rennes1.fr","vis_databaseanum","9ex7mIckZ") or die("Echec de connexion au serveur");
mysql_query("use databaseanum");
$query="select * from NOSEVOL3_BDO order by nomBDO";
$result=mysql_query($query);
$numrows = mysql_numrows($result);
$query1="SELECT COUNT(nomBDO) FROM `NOSEVOL3_BDO` WHERE `REPAS1BDO` = 'oui'";
$result1=mysql_query($query1);
/*$num1 = mysql_result($result1);*/
$num1 = mysql_result($result1,0,0);
$query2="SELECT * FROM `NOSEVOL3_BDO` WHERE `REPAS2BDO` = 'oui'";
$result2=mysql_query($query2);
$num2 = mysql_numrows($result2);
$query3="SELECT * FROM `NOSEVOL3_BDO` WHERE `REPAS3BDO` = 'oui'";
$result3=mysql_query($query3);
$num3 = mysql_numrows($result3);
$query4="SELECT * FROM `NOSEVOL3_BDO` WHERE `REPAS4BDO` = 'oui'";
$result4=mysql_query($query4);
$num4 = mysql_numrows($result4);
$query5="SELECT * FROM `NOSEVOL3_BDO` WHERE `NUIT1BDO` = 'oui'";
$result5=mysql_query($query5);
$num5 = mysql_numrows($result5);
$query6="SELECT * FROM `NOSEVOL3_BDO` WHERE `NUIT2BDO` = 'oui'";
$result6=mysql_query($query6);
$num6 = mysql_numrows($result6);
echo "Liste des participants : ".$numrows." inscrits
\n";
echo "\n";
echo "
Nom |
Prénom |
Labo |
Email |
Déjeuner 7 |
Déjeuner 8 |
Dîner 8 |
Déjeuner 9 |
Nuit 7 |
Nuit 8 | ";
echo "
\n";
$type="pair";
for ($i=0;$i<$numrows;$i++)
{if ($type=="impair")
$type="pair";
else
$type="impair";
$nomAFF = minmaj((trim(mysql_result($result,$i,"nomBDO"))));
$prenomAFF = (minmaj((trim(mysql_result($result,$i,"prenomBDO")))));
/* $labo = utf8_encode(trim(mysql_result($result,$i,"labo"))); */
$laboAFF = trim(mysql_result($result,$i,"laboBDO"));
$emailAFF = trim(mysql_result($result,$i,"emailBDO"));
$emailAFF = str_replace("@","[at]",$emailAFF);
/* $tel = trim(mysql_result($result,$i,"tel")); */
/* $comment = trim(mysql_result($result,$i,"commentaire")); */
$repas1AFF = trim(mysql_result($result,$i,"REPAS1BDO"));
$repas2AFF = trim(mysql_result($result,$i,"REPAS2BDO"));
$repas3AFF = trim(mysql_result($result,$i,"REPAS3BDO"));
$repas4AFF = trim(mysql_result($result,$i,"REPAS4BDO"));
$NUIT1AFF = trim(mysql_result($result,$i,"NUIT1BDO"));
$NUIT2AFF = trim(mysql_result($result,$i,"NUIT2BDO"));
echo " \n";
echo " ".$nomAFF." | \n";
echo " ".$prenomAFF." | \n";
echo " ".$laboAFF." | \n";
echo " ".$emailAFF." | \n";
echo " ".$repas1AFF." | \n";
echo " ".$repas2AFF." | \n";
echo " ".$repas3AFF." | \n";
echo " ".$repas4AFF." | \n";
echo " ".$NUIT1AFF." | \n";
echo " ".$NUIT2AFF." | \n";
echo "
\n";
}
echo " Nb 'oui' | | | |
".$num1." |
".$num2." |
".$num3." |
".$num4." |
".$num5." |
".$num6." | ";
echo "
\n";
echo "
\n";
echo "
\n";
?>
Retour au programme