Файл: region_clean/fight.php
Строк: 91
<?php
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once "start.php";
require_once "sid.php";
header("Cache-Control: no-cache");
if ($ver == "wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
require_once "inc.php";
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require_once "version.php";
$toUrl = isset($rm) ? $ses.'&rm='.(int)$rm.'&ref='.$ref.'&' : '&ref='.$ref.'&';
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="chatmail" title="Тренажерный зал">n
<p align="left">n";
}else{
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Тренажерный зал</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
include 'class/navigator.php';
$mod = isset($_GET['mod']) ? $_GET['mod'] : NULL;
switch($_GET['mod']) {
//Список разделов
default:
echo '<div class="c4">Бойцовский клуб</div><br/>
» <a href="fight.php?mod=hands_feet&'.$toUrl.'">Удары руками и ногами</a> <br/>
» <a href="fight.php?mod=weapons&'.$toUrl.'">Удары оружием</a> <br/>
» <a href="fight.php?mod=shop_weapons&'.$toUrl.'">Покупка оружия</a> <br/>';
break;
//Удары руками и ногами
case 'hands_feet':
echo '<div align="center"><b>Удары руками и ногами</b></div>';
$file = file('data/bk/hands_feet.dat');
$count = count($file);
$n = new navigator($count, 5, 'fight.php?mod=hands_feet&'.$toUrl.'&');
for($i=$n->start; $i<$n->end; $i++) {
$ex = explode('|::|', $file[$i]);
echo '
!'.$ex[0].'<br />
Сила удара до: '.$ex[1].'<hr />';
}
echo '» <a href="fight.php?'.$toUrl.'&">Назад</a>';
break;
//Удары оружием
case 'weapons':
echo '<div align="center"><b>Удары оружием</b></div>';
$file = file('data/bk/weapons.dat');
$count = count($file);
$n = new navigator($count, 5, 'trainers.php?mod=weapons&'.$toUrl.'&');
for($i=$n->start; $i<$n->end; $i++) {
$ex = explode('|::|', $file[$i]);
echo '
Команда: !'.$ex[0].'[<small>ник_юзера</small>]<br />
Сила удара до: '.$ex[1].'<hr />';
}
echo '» <a href="fight.php?'.$toUrl.'&">Назад</a>';
break;
//Покупка оружия
case 'shop_weapons':
echo '<div align="center"><b>Покупка оружия</b></div>';
$file = file('data/bk/weapons.dat');
$count = count($file);
$n = new navigator($count, 5, 'fight.php?mod=shop_weapons&'.$toUrl.'&');
for($i=$n->start; $i<$n->end; $i++) {
$ex = explode('|::|', $file[$i]);
echo '
Команда: !'.$ex[0].'<br />
Прибавит к силе до: '.$ex[1].'<br />
Цена: '.$ex[2].'<hr />';
}
echo '» <a href="fight.php?'.$toUrl.'&">Назад</a>';
break;
}
echo '
<br/><div class = "d1">
<a href="chat.php?'.$toUrl.'">В чат</a><br/>
<a href="enter.php?'.$toUrl.'">Прихожая</a><br/>
</div>';
include_once "foot.php";
?>