Example #1
0
            $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;
Example #2
0
}
// 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 . '&note=0') . '"><img src="areabb/images/vote/0.gif" border="0" width="20"></a>';
    $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '&note=1') . '"><img src="areabb/images/vote/1.gif" border="0" width="20"></a>';
    $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '&note=2') . '"><img src="areabb/images/vote/2.gif" border="0" width="20"></a>';
    $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '&note=3') . '"><img src="areabb/images/vote/3.gif" border="0" width="20"></a>';
    $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '&note=4') . '"><img src="areabb/images/vote/4.gif" border="0" width="20"></a>';
    $noter .= '<a href="' . append_sid(NOM_GAME . '.' . $phpEx . '?gid=' . $partie->gid . '&note=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');