J'aurais besoin d'un service, je viens de créer une asso avec des potes, et j'ai mis en place un systeme d'inscritpion pour des tournois.
Le résultat se fait sous forme de tableau
exemple :
Nom Pseudo Date d'inscription
jean durant toto la date
paul dupont tata la date
eric plan titi la date
mais j'aimerai rajouter le numéro de la ligne au fur et à mesure
exemple
N° Nom Pseudo Date d'inscription
1 jean durant toto la date
2 paul dupont tata la date
3 eric plan titi la date
Voilà le code ou se trouve le résultat du
function displayRegistrations(&$row) {
global $database, $mosConfig_live_site, $mosConfig_lang, $eSess;
// query for people already registered
$query = "SELECT * FROM #__events_registrations ";
$query .= "WHERE session_id='".$row->session_id."' AND cancel_date='0000-00-00 00:00:00' ";
$query .= "ORDER BY registration_date ASC";
$database->setQuery($query);
$registrants = $database->loadObjectList();
if (count($registrants) > 0) {
echo "<h4>" . _ESESS_REG_LIST . "</h4>";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#CC0000\">";
echo "<tr><td bgcolor=\"#CCCCCC\" width=\"50%\"><b>Nom</b></td>";
echo "<td bgcolor=\"#CCCCCC\" width=\"50%\"><b>Pseudo</b></td></tr>";
echo "</table>";
foreach ($registrants as $registrant) {
if ($eSess["cbIntegrated"] && $eSess["showAvatar"]) {
// Load the avatar picture. For guests, display the appropriate no_picture file...
if ($registrant->userid) {
$query = "SELECT avatar FROM #__comprofiler WHERE user_id='".$registrant->userid."' AND avatarapproved=1";
$database->setQuery( $query );
$avatarFileName = $database->loadObjectList();
if ($avatarFileName[0]->avatar) {
/*
* Some photos may be from the gallery, while others may be user submitted
*/
if (strcmp("gallery", substr($avatarFileName[0]->avatar, 0, 7))) {
$avatarImgPath = $mosConfig_live_site . "/images/comprofiler/tn" . $avatarFileName[0]->avatar;
} else {
$avatarImgPath = $mosConfig_live_site . "/images/comprofiler/" . $avatarFileName[0]->avatar;
}
} else {
$avatarImgPath = $mosConfig_live_site . "/components/com_comprofiler/images/" . $mosConfig_lang . "/tnnophoto.jpg";
}
} else {
$avatarImgPath = $mosConfig_live_site . "/components/com_comprofiler/images/" . $mosConfig_lang . "/tnnophoto.jpg";
}
echo "<img src=\"" . $avatarImgPath . "\" alt=\"\" align=\"left\" />";
}
// Display User Details
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#CC0000\">";
echo "<tr><td bgcolor=\"#FFFFFF\" width=\"50%\">";
echo $registrant->fullname . "";
echo "</td><td bgcolor=\"#FFFFFF\" width=\"50%\">";
echo $registrant->pseudo . "";
echo "</td></tr>";
echo "</table>";
merci à vous
en haut à gauche de ce sujet.