2018-01-28 16:40:49 +00:00
|
|
|
<?
|
|
|
|
$_GET['page'] = (int)$_GET['page'];
|
|
|
|
$_REQUEST['log'] = (int)$_REQUEST['log'];
|
|
|
|
?>
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<link rel=stylesheet type="text/css" href="css/main.css">
|
|
|
|
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
|
|
|
<META Http-Equiv=Cache-Control Content=no-cache>
|
|
|
|
<meta http-equiv=PRAGMA content=NO-CACHE>
|
|
|
|
<META Http-Equiv=Expires Content=0>
|
|
|
|
<title>Бойцовский Клуб Возрождение : Лог боя #<?=$_REQUEST['log'];?></title>
|
|
|
|
</HEAD>
|
|
|
|
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor=e2e0e0>
|
|
|
|
<H3>Лог поединка</H3>
|
|
|
|
<FORM METHOD=GET ACTION="logs.php">
|
|
|
|
<INPUT TYPE=hidden name=page value="<?=$_GET['page']?>">
|
|
|
|
<INPUT TYPE=hidden name=log value="<?=$_REQUEST['log']?>">
|
|
|
|
<?
|
2020-09-30 12:30:00 +00:00
|
|
|
require_once "functions.php";
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
|
|
$data = mysql_fetch_array(mysql_query ("SELECT * FROM `battle` WHERE `id` = '".$_REQUEST['log']."' LIMIT 1"));
|
|
|
|
$log = file("backup/logs/battle".$_REQUEST['log'].".txt");
|
|
|
|
|
|
|
|
if($_GET['stat'] != '1') {
|
|
|
|
echo "<form method=get><input type=hidden name='log' value='".(int)$_GET['log']."'><input type=hidden name='stat' value='1'><input type=submit value='Статистика боя'></form>";
|
|
|
|
|
|
|
|
if ($data['type'] == 10) {
|
|
|
|
$rr = "<IMG SRC=\"i/fighttype6.gif\" WIDTH=20 HEIGHT=20 ALT=\"Кровавый поединок\"> (поединок в башне смерти)";
|
|
|
|
} elseif($data['blood'] && ($data['type'] == 5 || $data['type'] == 4)) {
|
|
|
|
$rr = "<IMG SRC=\"i/fighttype5.gif\" WIDTH=20 HEIGHT=20 ALT=\"кулачный бой\"><IMG SRC=\"i/fighttype6.gif\" WIDTH=20 HEIGHT=20 ALT=\"Кровавый поединок\"> (кровавый кулачный поединок)";
|
|
|
|
} elseif($data['blood'] && ($data['type'] == 2 || $data['type'] == 3 || $data['type'] == 6)) {
|
|
|
|
$rr = "<IMG SRC=\"i/fighttype6.gif\" WIDTH=20 HEIGHT=20 ALT=\"Кровавый поединок\"> (кровавый поединок)";
|
|
|
|
} elseif($data['type'] == 5 || $data['type'] == 4) {
|
|
|
|
$rr = "<IMG SRC=\"i/fighttype4.gif\" WIDTH=20 HEIGHT=20 ALT=\"кулачный бой\"> (кулачный поединок)";
|
|
|
|
} elseif($data['type'] == 3 || $data['type'] == 2) {
|
|
|
|
$rr = "<IMG SRC=\"i/fighttype3.gif\" WIDTH=20 HEIGHT=20 ALT=\"групповой бой\"> (групповой поединок)";
|
|
|
|
} elseif($data['type'] == 1) {
|
|
|
|
$rr = "<IMG SRC=\"i/fighttype1.gif\" WIDTH=20 HEIGHT=20 ALT=\"физический бой\"> (физический поединок)";
|
|
|
|
}
|
|
|
|
|
|
|
|
$t1 = explode(";", $data['t1']);
|
|
|
|
$t2 = explode(";", $data['t2']);
|
|
|
|
|
|
|
|
if($data['win'] == 3) {
|
|
|
|
$battle = unserialize($data['teams']);
|
|
|
|
|
|
|
|
foreach($t1 as $k => $v) {
|
|
|
|
if(in_array($v, array_keys($battle))) {
|
|
|
|
++$i;
|
|
|
|
if($i > 1) { $cc = ', '; } else { $cc = ''; }
|
2020-08-27 12:31:35 +00:00
|
|
|
$ffs .= $cc.Nick::id($v)->battleShort('B1');
|
2018-01-28 16:40:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
|
|
|
$ffs .= ' <i>против</i> ';
|
|
|
|
foreach ($t2 as $k => $v) {
|
|
|
|
if(in_array($v, array_keys($battle))) {
|
|
|
|
++$i;
|
|
|
|
if($i > 1) { $cc = ', '; } else { $cc = ''; }
|
2020-08-27 12:31:35 +00:00
|
|
|
$ffs .= $cc.Nick::id($v)->battleShort('B1');
|
2018-01-28 16:40:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
$i = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$countall = count($t1)+count($t2);
|
|
|
|
if($countall > 70) {
|
|
|
|
echo "<h3>Эпическая битва!</h3>";
|
|
|
|
} elseif($countall > 50) {
|
|
|
|
echo "<h3>Эпохальная битва!</h3>";
|
|
|
|
} elseif($countall > 30) {
|
|
|
|
echo "<h3>Великая битва!</h3>";
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<form method=\"GET\" action=\"logs.php\"><input type=\"hidden\" name=\"page\" value=\"".$_GET['page']."\" /><input type=\"hidden\" name=\"log\" value=\"".$_REQUEST['log']."\" /><input type=\"submit\" name=\"analiz2\" value=\"Обновить\" /> </form>Тип боя: ";
|
|
|
|
echo $rr;
|
|
|
|
?>
|
|
|
|
|
|
|
|
Страницы:
|
|
|
|
<?
|
|
|
|
$log = explode("<BR>", $log[0]);
|
|
|
|
$all = count($log)-1;
|
|
|
|
$pgs = $all/50;
|
|
|
|
for ($i=0;$i<=$pgs;++$i) {
|
|
|
|
if ($_GET['page']==$i) {
|
|
|
|
echo ' <a href="?log=',$_GET['log'],'&page=',$i,'"><font color=#8f0000>',($i+1),'</font></a> ';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo ' <a href="?log=',$_GET['log'],'&page=',$i,'">',($i+1),'</a> ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//print_r($log);
|
|
|
|
?><HR><?
|
|
|
|
$start = 50*$_GET['page'];
|
|
|
|
if(50*$_GET['page']+50 <= $all) {
|
|
|
|
$stop = 50*$_GET['page']+50;
|
|
|
|
} else {
|
|
|
|
$stop = 50*$_GET['page']+($all-50*$_GET['page'])-1;
|
|
|
|
}
|
|
|
|
//echo $stop;
|
|
|
|
for($i=$start;$i<=$stop;$i++) {
|
|
|
|
echo $log[$i]."<BR>";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<HR>
|
|
|
|
<?
|
|
|
|
echo "<center>".$ffs."</center><HR>";
|
|
|
|
?>
|
|
|
|
<FORM METHOD=GET ACTION="logs.php">
|
|
|
|
<INPUT TYPE=hidden name=page value="<?=$_GET['page']?>" />
|
|
|
|
<INPUT TYPE=hidden name=log value="<?=$_REQUEST['log']?>" />
|
|
|
|
|
|
|
|
<INPUT TYPE=submit name=analiz2 value="Обновить">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
Страницы:
|
|
|
|
<?
|
|
|
|
for ($i=0;$i<=$pgs;++$i) {
|
|
|
|
if ($_GET['page']==$i) {
|
|
|
|
echo ' <a href="?log=',$_GET['log'],'&page=',$i,'"><font color=#8f0000>',($i+1),'</font></a> ';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo ' <a href="?log=',$_GET['log'],'&page=',$i,'">',($i+1),'</a> ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo "<br><br><form method=get><input type=hidden name='log' value='".(int)$_GET['log']."'><input type=hidden name='stat' value='1'><input type=submit value='Статистика боя'></form>";
|
|
|
|
}
|
|
|
|
else { echo "<form method=get><input type=hidden name='log' value='".(int)$_GET['log']."'><input type=submit value='Лог боя'></form>";
|
|
|
|
echo "Статистика временно недоступна ...<br />";
|
|
|
|
#include('stat_battle.php');
|
|
|
|
echo "<br><form method=get><input type=hidden name='log' value='".(int)$_GET['log']."'><input type=submit value='Лог боя'></form>";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</FORM>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|