Beispiel #1
0
    $n = !$n;
    $team1 = "";
    $team2 = "";
    $cr = $res["creator"];
    $vaxt = $res["date"];
    $battle_type = $res["type"];
    $battle_img = "<img src='img/battletype/" . (in_array($battle_type, $krov) ? "3.gif' border=0 alt='Кровавый бой'" : "1.gif' border=0 alt='Бой с оружием'") . ">";
    $sql = "(SELECT users.login, users.id, users.level, users.dealer, users.orden,users.admin_level, users.clan_short, users.clan, users.remote_ip, users.battle as bat_id, t.team FROM users,(SELECT player, team FROM teams WHERE battle_id={$cr}) as t WHERE login=t.player)\n\t\tUNION  (SELECT proto.bot_name, users.id, users.level, users.dealer, users.orden,users.admin_level, users.clan_short, users.clan, users.remote_ip, proto.battle_id as bat_id ,proto.team FROM users,(SELECT prototype, team, battle_id, bot_name FROM bot_temp,(SELECT id FROM battles WHERE creator_id={$cr}) as bat WHERE battle_id=bat.id and zver=0)as proto WHERE users.login=proto.prototype)\n\t\tUNION  (SELECT proto.bot_name, zver.id, zver.level, zver.dealer, zver.orden,zver.admin_level, zver.clan_short, zver.clan, zver.remote_ip, proto.battle_id as bat_id ,proto.team FROM zver,(SELECT prototype, team, battle_id, bot_name FROM bot_temp,(SELECT id FROM battles WHERE creator_id={$cr}) as bat WHERE battle_id=bat.id and zver=1)as proto WHERE zver.id=proto.prototype)";
    $team = mysql_query($sql);
    while ($result = mysql_fetch_array($team)) {
        $player = "<script>drwfl('" . $result['login'] . "','" . $result['id'] . "','" . $result['level'] . "','" . $result['dealer'] . "','" . $result['orden'] . "','" . $result['admin_level'] . "','" . $result['clan_short'] . "','" . $result['clan'] . "');</script>" . ($admin ? " <small><font color=gray>(" . ($result['remote_ip'] ? $result['remote_ip'] : "none") . ")</font></small>" : "");
        if ($cr == $result['id']) {
            $player = "<u>" . $player . "</u>";
        }
        if ($result['team'] == 1) {
            $team1 .= $comma1 . $player;
            $comma1 = ", ";
        } else {
            $team2 .= $comma2 . $player;
            $comma2 = ", ";
        }
        $bid = $result['bat_id'];
    }
    $comma1 = "";
    $comma2 = "";
    mysql_free_result($team);
    echo "<tr class='" . ($n ? 'l0' : 'l1') . "'><td nowrap valign=top>" . $vaxt . "<br><small><b>Тип боя:</b> <u>" . boy_type($battle_type) . "</small></td><td width=100%> {$team1} против {$team2} &nbsp; &nbsp;{$battle_img} <a href='log.php?log=" . $bid . "' class=us2 target='_blank'>»»</a></td></tr>";
}
mysql_free_result($battle);
echo "</table>";
mysql_close();
Beispiel #2
0
            while ($T_LISTD = mysql_fetch_array($LIST_TEAM)) {
                if ($my_orden == 1 || $my_orden == 6) {
                    $ip = $T_LISTD["ip"];
                    $ip_t = "(<i>ip: <small>{$ip}</small></i>)";
                } else {
                    $ip_t = "";
                }
                if ($T_LISTD['team'] == 1) {
                    $team1 .= ($counts1 > 0 ? ", " : "") . "<script>lrb('" . $T_LISTD['login'] . "','" . $T_LISTD['level'] . "','" . $T_LISTD['dealer'] . "','" . $T_LISTD['orden'] . "','" . $T_LISTD['admin_level'] . "','" . $T_LISTD['clan_short'] . "','" . $T_LISTD['clan'] . "','p1');</script> {$ip_t}";
                    $counts1++;
                } else {
                    $team2 .= ($counts2 > 0 ? ", " : "") . "<script>lrb('" . $T_LISTD['login'] . "','" . $T_LISTD['level'] . "','" . $T_LISTD['dealer'] . "','" . $T_LISTD['orden'] . "','" . $T_LISTD['admin_level'] . "','" . $T_LISTD['clan_short'] . "','" . $T_LISTD['clan'] . "','p2');</script> {$ip_t}";
                    $counts2++;
                }
            }
            echo "<tr class='" . ($n ? 'l0' : 'l1') . "'><td valign=top><b>{$i}</b>. </td><td nowrap valign=top>" . $vaxt . "<br><small><b>Тип боя:</b> <u>" . boy_type($btype) . "</small></td><td width=100%>{$team1} {$win1} <SPAN style='color: red; font-weight: bold; '>против</SPAN> {$team2} {$win2} <a href='log.php?log={$bid}&tmp=" . md5(time()) . "' class=us2 target='_blank'>»»</a></td></tr>";
        }
        echo "</table>";
    }
}
//------------IP SCAN-----------------------------------------------
/*if(!empty($_POST['scan']))
{
	if (($my_orden == 1 && $adminsite >= 5) || ($my_orden == 6 && $adminsite >= 3))
	{
		$count_ip=0;
		$txt_="SELECT team_history.*,bat.date,bat.win FROM team_history LEFT JOIN battles bat on bat.id=team_history.battle_id WHERE login='******'";
		$sql=mysql_query($txt_);
		while($res=mysql_fetch_array($sql))
		{
			$vaxt=$res["date"];	
Beispiel #3
0
    }
}
if ($counts >= 50) {
    echo "<h3>Легендарный бой</h3>";
}
if ($win == 0) {
    $count_all = mysql_fetch_Array(mysql_query("SELECT count(*) FROM teams WHERE battle_id=" . $creator));
    echo "В бою: <b>" . $count_all[0] . "</b> человек";
}
if ($win != 0) {
    $w = "Победа за <img src='img/index/win.gif'> <span class={$span}>{$winner}</span>";
} else {
    $w = "Ничья";
}
$s_t = $status == "finished" ? "Поединок завершен. " . $w : "Поединок идет...";
echo "<br><table cellspacing=0 cellpadding=0><tr><td width=100%>Дата проведения поединка: <b>" . $DATA["date"] . "</b></td><td align=right nowrap><b>Тип боя:</b> <u>" . boy_type($btype) . "</u></td></tr></table><BR>{$s_t}<BR><BR>";
if ($_GET["p"] == "all") {
    $from = 0;
    $to = $total_results;
}
for ($i = $from; $i < $to; $i++) {
    echo $text[$i] . "<SCRIPT>dv();</SCRIPT>\n";
}
if ($status != "finished") {
    $fighters1 = "";
    $fighters2 = "";
    $sql_fighters = "(SELECT \tlogin,\n\t\t\t\t\tid,\n\t\t\t\t\tlevel,\n\t\t\t\t\torden,\n\t\t\t\t\tadmin_level,\n\t\t\t\t\tdealer,\n\t\t\t\t\tclan_short,\n\t\t\t\t\tclan,\n\t\t\t\t\thp,\n\t\t\t\t\thp_all,\n\t\t\t\t\tteam\n\t\t\t\t\tFROM users,(SELECT player,team FROM teams WHERE battle_id={$creator}) as us WHERE users.login=us.player and users.hp>0)\n\t\t\tUNION (SELECT \tbot.bot_name,\n\t\t\t\t\tid,\n\t\t\t\t\tlevel,\n\t\t\t\t\torden,\n\t\t\t\t\tadmin_level,\n\t\t\t\t\tdealer,\n\t\t\t\t\tclan_short,\n\t\t\t\t\tclan,\n\t\t\t\t\tbot.hp,\n\t\t\t\t\tbot.hp_all,\n\t\t\t\t\tteam\n\t\t\t\t\tFROM users,(SELECT bot_name,hp,hp_all,team,prototype FROM bot_temp WHERE battle_id={$bid} and zver=0) as bot WHERE users.login=bot.prototype and bot.hp>0)\n\t\t\tUNION (SELECT \tbot.bot_name,\n\t\t\t\t\tzver.id,\n\t\t\t\t\tzver.level,\n\t\t\t\t\tzver.orden,\n\t\t\t\t\tzver.admin_level,\n\t\t\t\t\tzver.dealer,\n\t\t\t\t\tzver.clan_short,\n\t\t\t\t\tzver.clan,\n\t\t\t\t\tbot.hp,\n\t\t\t\t\tbot.hp_all,\n\t\t\t\t\tbot.team\n\t\t\t\t\tFROM zver,(SELECT bot_name,hp,hp_all,team,prototype FROM bot_temp WHERE battle_id={$bid} and zver=1) as bot WHERE zver.id=bot.prototype and bot.hp>0)\n\t";
    $counts1 = 0;
    $counts2 = 0;
    $battle_units = mysql_query($sql_fighters);
    while ($ss = mysql_fetch_array($battle_units)) {