<th width=80% colspan=2>Objet </th> <?php if (!$conf['lock_wishlist']) { ?> <th colspan=2> </th> <?php } ?> </tr> <?php $k = 1; foreach ($wish as $w) { $o = $objet[$w['id_objet']]; echo "\r\n\t\t\t\t<tr " . ($k % 2 ? '' : 'class=odd') . " style=height:40px>\r\n\t\t\t\t\t<td style=font-size:10px>" . ($w['poids'] + 1) . "\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t" . ($o['img'] ? "<img src=" . $o['img'] . " width=30px> " : ' ') . "\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<a href=drops.php?action=obj&id_objet=" . $o['id_objet'] . ">" . $o['objet_nom'] . "</a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\tdepuis le " . aff_date($w['wish_date'], 5) . "\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t" . (!$conf['lock_wishlist'] ? "\r\n\t\t\t\t\t<td align=center>\r\n\t\t\t\t\t\t<a href=wishlist.php?id_objet=" . $o['id_objet'] . "&up><img src=images/up.gif></a><br><a href=wishlist.php?id_objet=" . $o['id_objet'] . "&down><img src=images/down.gif></a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<a href=wishlist.php?del=" . $o['id_objet'] . "><img src=images/del.gif></a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t" : '') . "\r\n\t\t\t\t<tr>\r\n\t\t\t"; $k++; } ?> <?php if (!$conf['lock_wishlist']) { ?> <tr> <td colspan=4 align=right> <select name=add_objet> <option value=0>Choisir l'objet souhaité</option> <?php foreach ($objet_list as $o) { echo "<option value=" . $o['id_objet'] . ">" . $o['objet_nom'] . "</option>"; } ?>
$sort_ar = array('nom', 'classe'); $sort_nb = intval($_REQUEST['sort']); $sort = $sort_ar[$sort_nb]; $d_ = mysql_query("\r\n\t\t\t\t\tSELECT L.id_inst, D.dispo, D.dispo_date, L.is_lead current_lead,J.rank is_leader,L.id_leader, J.*, B.id_joueur blacklisted\r\n\t\t\t\t\tFROM (" . prefix('joueurs') . " J)\r\n\t\t\t\t\tLEFT JOIN " . prefix('liens') . " L \r\n\t\t\t\t\tON L.id_joueur=J.id_joueur AND L.id_inst='{$id_inst}'\r\n\t\t\t\t\tLEFT JOIN " . prefix('dispo') . " D\r\n\t\t\t\t\tON D.id_joueur=J.id_joueur AND D.id_inst='{$id_inst}'\r\n\t\t\t\t\tLEFT JOIN " . prefix('blacklist') . " B\r\n\t\t\t\t\tON B.id_joueur=J.id_joueur\r\n\t\t\t\t\tWHERE J.inactive='0'\r\n\t\t\t\t\tORDER BY {$sort}\r\n\t\t\t\t\t") or die(mysql_error()); $mygroup = array(); $taken = array(); $joueur = array(); while ($d = mysql_fetch_assoc($d_)) { $joueur[] = $d; if ($d['id_leader'] == $id) { $mygroup[$d['id_joueur']] = $d; } $taken[$d['id_joueur']] = $d['id_inst'] || $d['is_leader'] && !$conf['group_multi_lead'] ? 1 : 0; } include 'header.php'; echo "<big>Gestion du groupe pour l'instance <a href=details.php?id_inst={$id_inst}>" . strtoupper($inst['inst_nom']) . "</a> organisée le " . aff_date($inst['date']) . "</big>"; echo $replace_leader ? "<br><big>Groupe de <font style=color:red>{$replace_leader}</font></big><br><br>" : '<br><br>'; echo "\r\n\t<table style=width:400px;margin-left:50px cellspacing=0>\r\n\t\t<tr>\r\n\t\t\t<th colspan=2>\r\n\t\t\t\tGroupe actuel (" . count($mygroup) . " membres)\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t"; foreach ($mygroup as $m) { echo "\r\n\t\t<tr>\r\n\t\t\t<td>\r\n\t\t\t\t" . $m['nom'] . "\t\t\t\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t" . $m['classe'] . "\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t"; } ?> </table> <br><br> <table style=width:400px;margin-left:50px cellspacing=0> <form action=gestion.php method=POST> <?php echo $rank >= 3 && isset($_REQUEST['id']) ? "<input type=hidden name=id value=" . $id . ">" : ''; ?> <input type=hidden name=id_inst value='<?php echo $id_inst;
$tmp4_ = mysql_query("\r\n\t\t\tSELECT count(*)\r\n\t\t\tFROM " . prefix('dispo') . " D\r\n\t\t\tLEFT JOIN " . prefix('liens') . " L ON D.id_inst=L.id_inst AND D.id_joueur=L.id_joueur\r\n\t\t\tWHERE D.id_inst='" . $d['id_inst'] . "' AND (dispo='4') AND id_leader IS NULL\r\n\t\t\t") or die("Erreur mysql - index.php:232 : " . mysql_error()); $tmp4 = mysql_fetch_row($tmp4_); //On stock dans la liste des instances $d['count'] = $tmp[0]; $d['count_dispo'] = intval($tmp2[0]); $d['count_nc'] = intval($tmp3[0]); $d['count_res'] = intval($tmp4[0]); $instances[] = $d; } //En tête de la page include 'header.php'; //Corp de la page echo "\r\n\t<big>Historique des Instances faites par la guilde, " . $base['display'] . "</big> - <small><a href=index.php?ref=futur>(voir la liste des Instances prévues)</a></small>\r\n\t<table cellspacing=0 style=margin-left:5%>\r\n\t\t<tr>\r\n\t\t\t<th>\r\n\t\t\t\t" . $lang['instance'] . "\r\n\t\t\t</th>\r\n\t\t\t<th>\r\n\t\t\t\t" . $lang['type'] . "\r\n\t\t\t</th>\t\t\r\n\t\t\t<th>\r\n\t\t\t\t" . $lang['date'] . "\r\n\t\t\t</th>\r\n\t\t\t<th>\r\n\t\t\t\t" . $lang['organisateur'] . "\r\n\t\t\t</th>\r\n\t\t\t<th style=text-align:right>\r\n\t\t\t\t" . $lang['selected_players'] . "\r\n\t\t\t</th>\r\n\t\t\t<th style=text-align:right>\r\n\t\t\t\tDispo(s) (+ N.C. + Rés.)\r\n\t\t\t</th>\r\n\t\t\t" . ($rank ? "\r\n\t\t\t\t<form action=add_instance.php>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\t<input type=submit value='" . $lang['new_instance'] . "' style=margin-left:25>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t</form>\r\n\t\t\t" : '') . "\r\n\t\t</tr>\r\n\t"; $i = 0; foreach ($instances as $inst) { echo "\r\n\t\t<tr " . ($inst['date'] < date("YmdHis", time()) ? 'class=finished' : ($i % 2 ? 'class=odd' : '')) . ">\r\n\t\t\t<td>\r\n\t\t\t\t<a href=details.php?id_inst=" . $inst['id_inst'] . ">" . $inst['inst_nom'] . "</a>\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t" . $inst_type[$inst['inst_type']] . "\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t" . aff_date($inst['date']) . "\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t" . $inst['nom'] . "\r\n\t\t\t</td>\r\n\t\t\t<td align=right>\r\n\t\t\t\t" . $inst['count'] . "\r\n\t\t\t</td>\r\n\t\t\t<td align=right>\r\n\t\t\t\t<font style=color:green>" . $inst['count_dispo'] . "</font> <font style=color:orange>(+ " . $inst['count_nc'] . ")</font> <font style=color:blue>(+ " . $inst['count_res'] . ")</font>\r\n\t\t\t</td>\r\n\t\t\t<td></td>\r\n\t\t</tr>\r\n\t"; $i++; } echo "</table>"; ?> <table style=border:0px;width=150px;margin-left:5%> <tr> <?php if ($rank >= 3) { ?> <form action=add_instance.php> <td colspan=2> <input type=submit value='<?php echo $lang['new_instance']; ?>
exit; } //En-tête de page include 'header.php'; ?> <big><?php echo $action == 'edit' ? 'Edition du ' : ''; ?> Message relatif à l'instance <a href=details.php?id_inst=<?php echo $id_inst; ?> ><?php echo strtoupper($inst['inst_nom']); ?> </a> organisée le <?php echo aff_date($inst['date']); ?> </big><br><br> <table style=width:600px;> <form action=add_message.php?id_inst=<?php echo $id_inst; ?> method=POST> <tr> <th style=width:20%>Titre</th> <td align=center><input name=titre type=text value="<?php echo $edit['mess_titre']; ?> "></td> </tr> <tr>
foreach ($butin as $b) { echo "\r\n\t\t\t\t<tr " . ($i % 2 ? 'class=odd' : '') . " " . ($b['wished'] ? 'style=background-color:#ff8080' : '') . ">\r\n\t\t\t\t\t<td><a href=drops.php?action=obj&id_objet=" . $b['real_id'] . ">" . $b['obj_nom'] . "</aS></td>\r\n\t\t\t\t\t<td><a href=details.php?id_inst=" . $b['id_inst'] . ">" . $b['inst_nom'] . "</a> le " . aff_date($b['date']) . "</td>\r\n\t\t\t\t\t<td><a href=\"http://thottbot.com/i" . $b['real_id'] . "\" target=_blank>T</a> |\r\n\t\t\t\t\t\t<a href=\"http://fr.wowhead.com/?item=" . $b['real_id'] . "\" target=_blank>W</a> |\r\n\t\t\t\t\t\t<a href=\"http://wow.allakhazam.com/db/item.html?witem=" . $b['real_id'] . ";source=live;locale=frFR\" target=_blank>A</a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>"; $i++; } ?> </table> <?php } ?> <br> <big>Historique</big> <table style=width:700px; cellspacing=0> <?php $i = 0; foreach ($passif as $p) { echo "\r\n\t\t\t\t<tr " . ($i % 2 ? 'class=odd' : '') . ">\r\n\t\t\t\t\t<td>" . ($p['date'] < date("YmdHis", time()) ? 'A participé au' : 'Prévu pour') . "</td>\r\n\t\t\t\t\t<td><a href=details.php?id_inst=" . $p['id_inst'] . ">" . $p['inst_nom'] . "</a></td>\r\n\t\t\t\t\t<td>du " . aff_date($p['date']) . "</td>\r\n\t\t\t\t\t<td>sous les ordres de <a href=info_player.php?player=" . $chef[$links[$p['id_inst']]]['id_joueur'] . ">" . $chef[$links[$p['id_inst']]]['nom'] . "</a></td>\r\n\t\t\t\t</tr>"; $i++; } ?> </table> <br> </td> <td style=width:20%;> <?php if ($wish[0] && $conf['limit_wishlist']) { ?> <table style=width:100%;font-size:10px; class=wishlist cellspacing=0 cellpadding=0> <tr> <th colspan=2>Wishlist</th> </tr> <?php
?> ><img border=0 src=<?php echo $root; ?> /images/arrow.gif></a></th> <th>Liens</th> <?php if ($rank >= 3) { echo "<th> </th>"; } ?> </tr> <?php $i = 0; foreach ($drop as $d) { echo "\r\n\t\t\t\t\t<tr " . ($i % 2 ? 'class=odd' : '') . ">\r\n\t\t\t\t\t\t<td><a href=details.php?id_inst=" . $d['id_inst'] . ">" . $d['inst_nom'] . "</a> le " . aff_date($d['date']) . "</td>\r\n\t\t\t\t\t\t<td>" . ($rank ? "<a href=info_player.php?player=" . $d['id_joueur'] . ">" : '') . "" . $d['nom'] . "" . ($rank ? "</a>" : '') . "</td>\r\n\t\t\t\t\t\t<td><a href=drops.php?action=obj&id_objet=" . $d['real_id'] . ">" . $d['obj_nom'] . "</a></td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<a href=\"http://thottbot.com/i" . $d['real_id'] . "\" target=_blank>T</a> |\r\n\t\t\t\t\t\t\t<a href=\"http://fr.wowhead.com/?item=" . $d['real_id'] . "\" target=_blank>W</a> |\r\n\t\t\t\t\t\t\t<a href=\"http://wow.allakhazam.com/db/item.html?witem=" . $d['real_id'] . ";source=live;locale=frFR\" target=_blank>A</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t" . ($rank >= 3 ? "<td align=center><a href=drops.php?edit=" . $d['id_drop'] . "&action=add><img src=" . $root . "/images/edit.gif></a> <a href=drops.php?del=" . $d['id_drop'] . "&action=del><img src=" . $root . "/images/del.gif></td>" : '') . "\r\n\t\t\t\t\t</tr>"; $i++; } ?> <tr> <td> <form action=drops.php method=POST> <input type=submit value=Ajouter> <input type=hidden name=action value=add> </form> </td> </tr> </table> <?php //Pied de page include 'footer.php';
?> <big>Disponibilité, <?php echo $base['display']; ?> </big><br><br> <table style=width:500px cellspacing=0> <form action=dispo.php method=POST> <tr> <th style=width:30%>Instance</th> <th style=width:43%>Date</th> <th>Disponibilité</th> </tr> <?php $k = 0; foreach ($instances as $i) { echo "\r\n\t\t\t\t<tr " . ($k % 2 ? 'class=odd' : '') . ">\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t" . ($rank ? $i['inst_nom'] : "Instance du") . "\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\tle " . aff_date($i['date']) . "\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=center>\r\n\t\t\t\t\t\t<select name='dispo[" . $i['id'] . "]' style=width:90%>\r\n\t\t\t\t\t"; for ($j = 0; $j < count($dispo); $j++) { echo "<option value='" . $j . "' " . ($i['dispo'] == $j ? 'SELECTED' : '') . ">" . $dispo[$j] . "</option>"; } echo "\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t<tr>"; $k++; } ?> <tr> <td colspan=2> </td> <td align=center><input type=submit value=Valider style=width:90%></td> </tr> </form> </table> <?php //Pied de page
echo "<th> </th>"; } ?> </tr> <?php $i = 0; foreach ($butin as $b) { echo "\r\n\t\t\t<tr " . ($i % 2 ? 'class=odd' : '') . ">\r\n\t\t\t\t<td><a href=" . $info_player . "player=" . $b['id_joueur'] . ">" . $b['nom'] . "</a></td>\r\n\t\t\t\t<td><a href=" . $details . "id_inst=" . $b['id_inst'] . ">" . $b['inst_nom'] . "</a> le " . aff_date($b['date']) . "</td>\r\n\t\t\t\t<td align=center>"; if ($rank >= 3) { echo "<a href=drops.php?edit=" . $b['id_drop'] . "&action=add><img src=" . $root . "/images/edit.gif></a>"; } echo "\r\n\t\t\t\t</td>\r\n\t\t\t</tr>"; $i++; } ?> </table> <?php } if ($wishlist[0]) { ?> <br> <big>Dans la wishlist de</big> <table style=width:500px; cellspacing=0> <?php $i = 0; foreach ($wishlist as $w) { echo "\r\n\t\t\t<tr " . ($i % 2 ? 'class=odd' : '') . " " . ($w['got_it'] ? 'style=background-color:#ff8080' : '') . ">\r\n\t\t\t\t<td>" . ($w['poids'] + 1) . "</td>\r\n\t\t\t\t<td><a href=" . $info_player . "player=" . $w['id_joueur'] . ">" . $w['nom'] . "</a></td>\r\n\t\t\t\t<td>depuis le " . aff_date($w['wish_date'], 5) . "</td>\r\n\t\t\t</tr>"; $i++; } echo "</table>"; }
?> /images/arrow.gif></a> </th> </tr> <?php $i = 0; foreach ($joueur as $j) { echo "\r\n\t\t\t<tr " . ($i % 2 ? 'style=background-color:#cee8ce' : '') . ">\r\n\t\t\t\t<td style=height:22px;> <b><a href=view.php?db=" . $db . "&player=" . $j['id_joueur'] . ">" . $j['nom'] . "</a></b>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> " . $j['classe'] . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> " . $j['race'] . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> " . $j['guilde'] . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> " . ($j['harmonise'] ? "<img src={$root}/images/valid.gif>" : "<img src={$root}/images/invalid.gif>") . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> " . ($j['onyxia'] ? "<img src={$root}/images/valid.gif>" : "<img src={$root}/images/invalid.gif>") . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> " . ($j['blackwing'] ? "<img src={$root}/images/valid.gif>" : "<img src={$root}/images/invalid.gif>") . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> <b>" . $j['loot'] . "</b>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> <b>" . $j['runs'] . "</b>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td> <b>" . $j['dkp'] . "</b>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t"; $i++; } ?> </table> <?php } else { $d_ = mysql_query("SELECT * FROM (" . prefix('instances') . " I, " . prefix('joueurs') . " J) WHERE I.inst_orga=J.id_joueur ORDER BY -date") or die(mysql_error()); $instances = array(); while ($d = mysql_fetch_assoc($d_)) { $tmp = mysql_fetch_row(mysql_query("SELECT count(*) FROM " . prefix('liens') . " WHERE id_inst='" . $d['id_inst'] . "'")); $d['count'] = $tmp[0]; $instances[] = $d; } //INSTANCES DE LA ZONE echo "\r\n\t<div align=center>\r\n\t\r\n\t<big><b>" . count($instances) . "</b> Instances :</big>\r\n\t\r\n\t<table cellspacing=0 style=width:1000px>\r\n\t\t<tr>\r\n\t\t\t<th>\r\n\t\t\t\tInstance\r\n\t\t\t</th>\r\n\t\t\t<th>\r\n\t\t\t\tDate\r\n\t\t\t</th>\r\n\t\t\t<th>\r\n\t\t\t\tOrganisateur\r\n\t\t\t</th>\r\n\t\t\t<th style=text-align:right>\r\n\t\t\t\tJoueurs confirmés\r\n\t\t\t</th>\r\n\t\t\t<th style=text-align:right>\r\n\t\t\t\tDKP\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t"; $i = 0; foreach ($instances as $inst) { echo "\r\n\t\t\t<tr " . ($inst['date'] < date("YmdHis", time()) ? 'class=finished' : ($i % 2 ? 'class=odd' : '')) . ">\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<a href=view.php?id_inst=" . $inst['id_inst'] . "&db={$db}>" . $inst['inst_nom'] . "</a>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t" . aff_date($inst['date']) . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t" . $inst['nom'] . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td align=right>\r\n\t\t\t\t\t" . $inst['count'] . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td align=right>\r\n\t\t\t\t\t" . $inst['dkp'] . "\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t"; $i++; } echo "</table>"; } include 'footer.php';
function open_file($file_name) { global $g_fp, $file_type, $dbbase, $f_nm; if ($file_type == 1) { $g_fp = gzopen($file_name, "wb9"); } else { $g_fp = fopen($file_name, "w"); } $f_nm[] = $file_name; $data = ""; $data .= "##\n"; $data .= "## NFM hack.ru creator \n"; $data .= "##-------------------------\n"; $data .= "## Date:" . aff_date() . "\n"; $data .= "## Base:{$dbbase} \n"; $data .= "##-------------------------\n\n"; write_file($data); unset($data); }
</th> <th style=width:250px>Titre </th> <th>Réponses </th> <th>Poster </th> <th>Dernier Message </th> <th style=width:75px>Date </th> </tr> <?php $i = 0; foreach ($mess as $m) { echo "\r\n\t\t\t\t\t\t\t<tr " . ($i % 2 ? 'class=odd' : '') . ">\r\n\t\t\t\t\t\t\t\t<td>" . (array_search($id, $read[$m['id_file']]) === false ? '<img src=images/unread.gif>' : '<img src=images/read.gif>') . "\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td><a href='forum.php?action=view&view=" . $m['id_file'] . "'>" . $m['titre'] . "</a>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td align=center><b>" . $answer[$m['id_file']] . "</b>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td><a href='info_player.php?player=" . $m['id_joueur'] . "'>" . $m['nom'] . "</a>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td><a href='info_player.php?player=" . $m['last_reply_poster_id'] . "'>" . $m['last_reply_poster'] . "</a>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td>" . aff_date($m['date'], 1) . "\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t"; $i++; } ?> <form action=forum.php?action=post method=POST> <tr> <td colspan=5 align=left style='border-top:1px solid green'> <input type=submit value="Nouveau Message" style=width:150px;> </td> </tr> </form> </table> <?php include 'footer.php'; break; }
$d_ = mysql_query("\r\n\t\t\t\t\tSELECT M.mail_date as sent, J.nom, J.id_joueur, J.mail, L.id_leader as playing\r\n\t\t\t\t\tFROM (" . prefix('joueurs') . " J) \r\n\t\t\t\t\tLEFT JOIN " . prefix('liens') . " L ON L.id_leader = '" . $grp . "' AND J.id_joueur=L.id_joueur AND L.id_inst='" . $id_inst . "'\r\n\t\t\t\t\tLEFT JOIN " . prefix('mails') . " M ON J.id_joueur=M.id_joueur AND M.id_lead='" . $grp . "' AND M.id_inst='" . $id_inst . "'\r\n\t\t\t\t\tWHERE inactive='0' AND mail!=''\r\n\t\t\t\t\tORDER BY J.nom\r\n\t\t\t\t") or die("Erreur mysql - details.php:675 : " . mysql_error()); } else { $d_ = mysql_query("\r\n\t\t\t\t\tSELECT M.mail_date as sent, J.nom, J.id_joueur, J.mail, L.id_leader as playing\r\n\t\t\t\t\tFROM (" . prefix('joueurs') . " J) \r\n\t\t\t\t\tLEFT JOIN " . prefix('liens') . " L ON J.id_joueur=L.id_joueur AND L.id_inst='" . $id_inst . "'\r\n\t\t\t\t\tLEFT JOIN " . prefix('mails') . " M ON J.id_joueur=M.id_joueur AND M.id_inst='" . $id_inst . "'\r\n\t\t\t\t\tWHERE inactive='0' AND mail!=''\r\n\t\t\t\t\tORDER BY J.nom\r\n\t\t\t\t") or die("Erreur mysql - details.php:686 : " . mysql_error()); } while ($d = mysql_fetch_assoc($d_)) { $gg = array(); if ($d['playing']) { if ($group10[$d['playing']]['leader']) { $gg[] = '<b>' . $joueur10[$group10[$d['playing']]['leader']]['nom'] . '</b>'; } foreach ($group10[$d['playing']]['players'] as $g) { $gg[] = $joueur10[$g]['nom']; } } $str = array('%leader', '%instance', '%date', '%group'); $replace = array($group10[$d['playing']]['real_leader_name'], $inst['inst_nom'], aff_date($inst['date']), implode(', ', $gg)); if ($d['sent'] || $d['playing']) { if ($d['sent'] && !$d['playing']) { //Envoie mail d'annulation $d['status'] = 'Mail d\'annulation envoyé'; $d['img'] = 'invalid.gif'; $message = str_replace($str, $replace, $lang['mail_tpl_invalid_core']); $message = preg_replace("#(?<!\r)\n#si", "\r\n", $message); $title = str_replace($str, $replace, $lang['mail_tpl_invalid_title']); mail($d['mail'], $title, $message, $lang['mail_headers']); mysql_query("DELETE FROM " . prefix('mails') . " WHERE id_joueur='" . $d['id_joueur'] . "' AND id_inst='" . $id_inst . "'") or die("Erreur mysql - details.php:735 : " . mysql_error()); } elseif (!$d['sent'] && $d['playing']) { //Envoie mail de selection $d['status'] = 'Mail de sélection en court d\'envoi'; $d['img'] = 'unread.gif'; $message = str_replace($str, $replace, $lang['mail_tpl_valid_core']);