break; } } // Hop on mets le rang au dessus de l'avatar $poster_rank = ''; $rank_image = ''; if ($row['user_id'] == ANONYMOUS) { } else { if ($row['user_rank']) { for ($j = 0; $j < count($ranksrow); $j++) { if ($row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special']) { $poster_rank = $ranksrow[$j]['rank_title']; $rank_image = $ranksrow[$j]['rank_image'] ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : ''; } } } else { for ($j = 0; $j < count($ranksrow); $j++) { if ($row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special']) { $poster_rank = $ranksrow[$j]['rank_title']; $rank_image = $ranksrow[$j]['rank_image'] ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : ''; } } } } $template->assign_block_vars('commentaires.lignes', array('AUTEUR' => areabb_profile($row['poster_id'], $row['username']), 'RANK' => $poster_rank, 'IMG_RANK' => $rank_image, 'AVATAR' => $poster_avatar, 'DATE' => MySQLDateToExplicitDate(date("Y-m-d-H-i-s", $row['post_time']), 1, 1, 1), 'NEWS' => $message)); } } // On permet de saisir un commentaire ? if ($areabb['news_aff_coms'] == '1') { $template->assign_block_vars('saisir_commentaire', array()); }
$row = $db->sql_fetchrow($result); $sql = 'INSERT INTO ' . BANLIST_TABLE . ' (ban_userid) VALUES (' . $row['user_id'] . ')'; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Impossible de rajouter cette personne à la liste de hack', '', __LINE__, __FILE__, $sql); } break; } } $template->set_filenames(array('body' => 'areabb/mods/games/tpl/arcade_hackgame.tpl')); $sql = 'SELECT id_hack, h.user_id, u.username AS tricheur, u2.username AS modo, h.game_id, game_libelle,game_name, game_pic, date_hack,id_modo, flashtime, realtime, score, type FROM ' . AREABB_HACKGAME_TABLE . ' as h LEFT JOIN ' . USERS_TABLE . ' as u ON (h.user_id = u.user_id) LEFT JOIN ' . USERS_TABLE . ' AS u2 ON ( h.id_modo = u2.user_id ) LEFT JOIN ' . AREABB_GAMES_TABLE . ' as g ON (h.game_id=g.game_id) ORDER BY date_hack DESC'; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Impossible de lister les tentatives de Hack ', '', __LINE__, __FILE__, $sql); } if ($db->sql_numrows($result) == 0) { $template->assign_block_vars('no_tricheurs', array()); } else { while ($row = $db->sql_fetchrow($result)) { // Le jeu en question.. $type = $row['modo'] != '' ? $row['modo'] : ''; $template->assign_block_vars('tricheurs', array('ID_HACK' => $row['id_hack'], 'USERNAME' => $row['tricheur'], 'GAME' => $row['game_libelle'], 'ICONE' => $phpbb_root_path . 'areabb/games/' . $row['game_name'] . '/' . $row['game_pic'], 'DATE' => MySQLDateToExplicitDate(timestamp_to_gmd($row['date_hack']), 0, 1, 0), 'TPS_SRV' => $row['realtime'], 'TPS_FSH' => $row['flashtime'], 'SCORE' => $row['score'], 'TYPE' => $type)); $row['modo'] != '' ? $template->assign_block_vars('tricheurs.modo', array()) : $template->assign_block_vars('tricheurs.robot', array()); } } $template->assign_vars(array('L_HACKGAME_TITLE' => $lang['L_HACKGAME_TITLE'], 'L_HACKGAME_TITLE_EXPLAIN' => $lang['L_HACKGAME_TITLE_EXPLAIN'], 'L_NO_TRICHEUR' => $lang['L_NO_TRICHEUR'], 'L_JOUEUR' => $lang['L_JOUEUR'], 'L_JEU' => $lang['L_JEU'], 'L_DATE_HACK' => $lang['L_DATE_HACK'], 'L_TPS_SRV' => $lang['L_TPS_SRV'], 'L_TPS_FSH' => $lang['L_TPS_FSH'], 'L_SCORE' => $lang['L_SCORE'], 'L_TYPE' => $lang['L_TYPE'], 'L_ACTIONS_HACK' => $lang['L_ACTIONS_HACK'], 'Information' => $lang['Information'], 'I_ROBOT' => $phpbb_root_path . $images['icon_areabb_bots'], 'I_MODO' => $phpbb_root_path . $images['icon_areabb_humains'], 'L_TYPE_ROBOT' => $lang['L_TYPE_ROBOT'], 'L_TYPE_MODO' => $lang['L_TYPE_MODO'], 'L_RETABLIR_SCORE' => $lang['L_RETABLIR_SCORE'], 'L_SUPPRIMER_HACK' => $lang['L_SUPPRIMER_HACK'], 'L_BANNIR' => $lang['L_BANNIR'])); $template->pparse("body"); include $phpbb_root_path . 'admin/page_footer_admin.' . $phpEx;
// Formatage de l'HTML if (!$board_config['allow_html'] || !$userdata['user_allowhtml']) { if ($row['enable_html']) { $message = preg_replace('#(<)([\\/]?.*?)(>)#is', "<\\2>", $message); } } if ($bbcode_uid != '') { $message = $board_config['allow_bbcode'] ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\\:{$bbcode_uid}/si", '', $message); } // Il y a des liens ? $message = make_clickable($message); // Des petits smileys ? if ($board_config['allow_smilies']) { if ($row['enable_smilies']) { $message = smilies_pass($message); } } // On censure les gros mots .. $message = str_replace('\\"', '"', substr(@preg_replace('#(\\>(((?>([^><]+|(?R)))*)\\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1)); $message = str_replace("\n", '<br />', $message); $message = strip_tags($message); // on affiche l'icone de la catégorie ? $icone = $areabb['news_aff_icone'] == 1 ? '<img src="images/forum_icons/' . $row['forum_icon'] . '" alt="' . $row['forum_desc'] . '" border="0" align="right">' : ''; $template->assign_block_vars('news.lignes', array('ICONE' => $icone, 'TITRE' => preg_replace($orig_word, $replacement_word, $row['topic_title']), 'AUTEUR' => areabb_profile($row['topic_poster'], $row['username']), 'SUITE' => append_sid('news.' . $phpEx . '?action=detail&article=' . $row['topic_id']), 'COMS' => $row['topic_replies'], 'VIEWS' => $row['topic_views'], 'DATE' => MySQLDateToExplicitDate(date("Y-m-d", $row['topic_time'])), 'NEWS' => couper_texte($message, $areabb['news_nbre_mots']))); } } } if ($areabb['news_forums'] != '') { $template->assign_block_vars('news_icone', array()); } $template->assign_vars(array('L_PAGINATION' => $lang['L_PAGE_NEWS'], 'L_NO_NEWS' => $lang['L_NO_NEWS'], 'L_NO_NEWS_TITRE' => $page_title, 'L_SUITE' => $lang['Read_Full'], 'LE' => $lang['topic_on'], 'SID' => $userdata['session_id'], 'L_PAR' => $lang['topic_by'], 'I_VIEWS' => $phpbb_root_path . $images['icon_areabb_views'], 'I_COMS' => $phpbb_root_path . $images['icon_areabb_coms'], 'PAGINATION' => pagination_news('action=normal', $max_news, $start)));
} // On a voté ! if (isset($HTTP_GET_VARS['note'])) { $note = eregi_replace('[^0-9]', '', $HTTP_GET_VARS['note']); if ($note <= 5 || $note >= 0) { $partie->ajoute_note($note, $userdata['user_id']); } } // Ce joueur a-t-il déjà voté ? $sql = 'SELECT note FROM ' . AREABB_NOTE . ' WHERE user_id=' . $userdata['user_id'] . ' AND game_id=' . $partie->gid; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Impossible d\\'acceder à la tables des notes", '', __LINE__, __FILE__, $sql); } if (!($row = $db->sql_fetchrow($result))) { $noter = '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '¬e=0') . '"><img src="areabb/images/vote/0.gif" border="0" width="20"></a>'; $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '¬e=1') . '"><img src="areabb/images/vote/1.gif" border="0" width="20"></a>'; $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '¬e=2') . '"><img src="areabb/images/vote/2.gif" border="0" width="20"></a>'; $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '¬e=3') . '"><img src="areabb/images/vote/3.gif" border="0" width="20"></a>'; $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '¬e=4') . '"><img src="areabb/images/vote/4.gif" border="0" width="20"></a>'; $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '¬e=5') . '"><img src="areabb/images/vote/5.gif" border="0" width="20"></a>'; $template->assign_block_vars('noter', array('L_NOTER' => $lang['L_NOTER'], 'NOTER' => $noter)); } $icone_jeu = file_exists('areabb/games/' . $partie->info_jeu['game_name'] . '/' . $partie->info_jeu['game_pic_large']) ? $partie->info_jeu['game_pic_large'] : $partie->info_jeu['game_pic']; $template->assign_vars(array('NOM' => $partie->info_jeu['game_libelle'], 'DATE' => MySQLDateToExplicitDate(timestamp_to_gmd($partie->info_jeu['game_date'])), 'PARTIES' => $partie->info_jeu['game_set'], 'DESC' => $partie->info_jeu['game_desc'], 'ICONE' => 'areabb/games/' . $partie->info_jeu['game_name'] . '/' . $icone_jeu, 'TRICHE' => $triche, 'NOTE' => $partie->info_jeu['note'] . '/5', 'L_NOTE' => $lang['L_NOTE'], 'L_NOM_JEU' => $lang['L_NOM_JEU'], 'L_DATE_AJOUT' => $lang['L_DATE_AJOUT'], 'NBRE_PARTIES' => $lang['NBRE_PARTIES'], 'DESC_JEU' => $lang['DESC_JEU'], 'L_TRICHE' => $lang['L_TRICHE'], 'I_TELECHARGER' => $phpbb_root_path . $images['icon_areabb_pkggz'], 'I_TELECHARGER_ZIP' => $phpbb_root_path . $images['icon_areabb_zip'], 'DOWNLOAD' => $download, 'DOWNLOAD_ZIP' => $download_zip)); if ($areabb['auth_dwld']) { $template->assign_block_vars('download', array()); } $template->assign_var_from_handle('fiche_jeux', 'fiche_jeux');