/*** verification securite ***/ if (eregi("avatar.php", $_SERVER['PHP_SELF'])) { die("You cannot open this page directly"); } $config['avatars_path'] = "images/avatars"; if ($mode == 'J') { //if(!admin_general($s_joueur) && (empty($s_joueur) || $id != $s_joueur)) js_goto("?page=index"); if ($grade['a'] != 'a' && $grade['b'] != 'b' && $grade['j'] != 'j' && ($grade['z'] == '' || $id != $s_joueur)) { js_goto("?page=index"); } /*** recupération des paramètres ***/ $ficheX = joueur($id); $type = "joueurs"; } elseif ($mode == 'E') { //if(!admin_general($s_joueur) && (empty($s_joueur) || !equipe_manager($id,$s_joueur))) js_goto("?page=index"); if (($grade['a'] != 'a' || $grade['b'] != 'b' || $grade['j'] != 'j') && ($grade['z'] == '' || !equipe_manager($id, $s_joueur))) { js_goto("?page=index"); } /*** recupération des paramètres ***/ $ficheX = equipe($id); $type = "equipes"; } else { js_goto("?page=index"); } function check_image_type($type) { switch ($type) { case 'jpeg': case 'pjpeg': case 'jpg': return '.jpg';
echo "<tr><td class=titlefiche>Rcon : </td><td class=textfiche><input type=text size=15 name=rcon value=\"" . stripslashes($serveur->rcon) . "\"></td></tr>"; echo "<tr><td class=titlefiche>{$strPageStats} :</td>"; if (!$serveur->stats) { $serveur->stats = 'http://'; } echo "<td class=textfiche><input type=text name=stats value=\"{$serveur->stats}\" size=40></td></tr>"; echo "<tr><td class=titlefiche>{$strPublierServeurDans} : </td><td class=textfiche>{$strM4} <input type=checkbox style=\"border:0px\" name=insert_m4 value=1> {$strAdminBot} <input type=checkbox style=\"border:0px\" name=insert_ab value=1></td></tr>"; echo "<tr><td class=footerfiche colspan=2 align=center><input type=submit value=\"{$strModifier}\"> </td></tr>"; echo "</table>"; echo "</td></tr>"; echo "</form>"; echo "</table>"; echo "</td></tr></table><br>"; show_consignes($strServeursConsignes); } else { if (!equipe_manager($id_t, $s_joueur)) { js_goto($PHP_SELF); } if ($id_s != '' && $id_s != 0) { $db->select("*"); $db->from("{$dbprefix}serveurs"); $db->where("{$dbprefix}serveurs.id = {$id_s}"); $db->exec(); $serveur = $db->fetch(); echo "<table border=0 cellpadding=0 cellspacing=0 class=bordure2><tr><td>"; echo "<table cellspacing=1 cellpadding=0 border=0>"; echo "<form method=post action=?page=team_serveurs&op=do_modify&id_s={$id_s}&id_t={$id_t}>"; echo "<input type=hidden name=id value={$id}>"; echo "<tr><td class=headerfiche colspan=2>{$strModifierServeur}</td></tr>"; echo "<tr><td>"; echo "<input type=hidden name=id_s value={$id_s}>";
echo "<tr>"; echo "<td class=titlefiche>{$strNom} <font color=red><b>*</b></font> :</td>"; echo "<td class=textfiche><input type=text name=nom maxlength=32></td></tr>"; echo "<tr>"; echo "<td class=titlefiche>{$strTag} <font color=red><b>*</b></font> :</td>"; echo "<td class=textfiche><input type=text name=tag maxlength=16></td>"; echo "</tr>"; echo "<tr><td class=footerfiche align=center colspan=2><input type=submit value={$strAjouter}></td></tr>"; echo "</table>"; echo "</td></tr></table>"; echo "</td></tr></table>"; echo "</form>"; } } else { $equipe = equipe($id); if (equipe_manager($id, $s_joueur)) { $is_manager = 1; } else { $is_manager = 0; } echo "<p class=title>.:: {$strEquipe} {$equipe->tag} - {$equipe->nom} ::.</p>"; echo '<table cellspacing="0" cellpadding="0" border="0">'; echo '<tr><td class="title" align="center">'; echo "<a href=\"?page=equipes{$op_str}§ion=fiche&id={$id}\">{$strFiche}</a> | <a href=\"?page=equipes{$op_str}§ion=membres&id={$id}\">{$strMembres}</a> | <a href=\"?page=equipes{$op_str}§ion=resultats&id={$id}\">{$strResultats}</a>"; echo '</td></tr>'; echo '</table><br>'; if ($section == '') { $all = "ok"; } if ($section == 'fiche' || $all == "ok") { if ($op == 'admin') {
+---------------------------------------------------------------------+ */ // MatchBrowser par JPinchaud - j_pinchaud@yahoo.fr if (eregi("matchs_browser.php", $_SERVER['PHP_SELF'])) { die("You cannot open this page directly"); } $config['download_path'] = "matchs"; $config['download_max_filesize'] = 2000000; /*** upload des fichier ***/ $matchobj = match($match); $upload = 0; $modefichier_tournois = modefichier_tournois($matchobj->tournois); $modeequipe_tournois = modeequipe_tournois($matchobj->tournois); if ($modefichier_tournois != 'N' && ($grade['a'] == 'a' || $grade['b'] == 'b' || $grade['t'] == 't' || $grade['u'] == 'u')) { $upload = 1; } elseif ($modefichier_tournois == 'C' && $modeequipe_tournois == 'E' && (equipe_manager($matchobj->equipe1, $s_joueur) || equipe_manager($matchobj->equipe2, $s_joueur)) && $s_joueur) { $upload = 1; } elseif ($modefichier_tournois == 'C' && $modeequipe_tournois == 'J' && ($matchobj->equipe1 == $s_joueur || $matchobj->equipe2 == $s_joueur) && $s_joueur) { $upload = 1; } elseif ($modefichier_tournois == 'N') { js_goto("?page=index"); } $directory = str_replace(array("..", "//"), "", $directory); $match = str_replace(array("..", "//"), "", $match); function create_dirs($matchs) { global $config; @mkdir($config['download_path'] . "/" . $matchs); @mkdir($config['download_path'] . "/" . "{$matchs}/replays"); @mkdir($config['download_path'] . "/" . "{$matchs}/screenshots"); @mkdir($config['download_path'] . "/" . "{$matchs}/reports");
$nom_participant = "nom_joueur"; $champX = "pseudo"; if ($config['avatar'] == 'J' || $config['avatar'] == 'A') { $avatar_ok = 1; $joueur1 = joueur($match->equipe1); $img1 = $joueur1->avatar_img; $joueur2 = joueur($match->equipe2); $img2 = $joueur2->avatar_img; } } /** type de report **/ $report_type = 0; if ($op == 'report' && $modescore_tournois == 'J') { if ($match->report == 0 && $match->status == 'D') { $report_type = 1; } elseif ($match->report == 1 && equipe_manager($match->equipe2, $s_joueur) && $modeequipe_tournois == 'E' || $match->report == 2 && equipe_manager($match->equipe1, $s_joueur) && $modeequipe_tournois == 'E' || $match->report == 1 && $match->equipe2 == $s_joueur && $modeequipe_tournois == 'J' || $match->report == 2 && $match->equipe1 == $s_joueur && $modeequipe_tournois == 'J') { $report_type = 2; } } if ($op == 'admin') { /** creation de la liste d'equipe participante **/ $db->select("id, {$champX}"); $db->from("{$dbprefix}{$equipesX}, {$dbprefix}participe"); $db->where("{$dbprefix}{$equipesX}.id = {$dbprefix}participe.equipe"); if ($match->type == 'P') { $db->where("poule = {$match->poule}"); } $db->where("status = 'P'"); $db->where("tournois = {$match->tournois}"); $db->order_by("{$champX}"); $res = $db->exec();
function verif_manager($equipe, $joueur) { global $PHP_SELF, $grade; if (empty($joueur) || empty($equipe) || !(equipe_manager($equipe, $joueur) || $garde['a'] != 'a' || $garde['b'] != 'b' || $garde['e'] != 'e' || $garde['j'] != 'j')) { js_goto($PHP_SELF); } }