diff --git a/classes/fbattle.php b/classes/fbattle.php
deleted file mode 100644
index 7a31cd0..0000000
--- a/classes/fbattle.php
+++ /dev/null
@@ -1,470 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ';
-
-
-
-
-
- if($enemy == 0){
- // проверяем на вшивость
- if(!$fbattle->battle) {
- if($user['battle']) { $ll = $user['battle'];} else { $ll = $_POST['batl']; }
- if(!$ll)
- {
- $ll_r=mysql_fetch_array(mysql_query("SELECT `id` FROM `battle` WHERE (`t1` LIKE '%{$user['id']}%' || `t2` LIKE '%{$user['id']}%') AND `win` = '3' LIMIT 1"));
- $ll=$ll_r['id'];
- }
- $data = @mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id` = {$ll} LIMIT 1"));
- $damage = unserialize($data['damage']);
- $exp = unserialize($data['exp']);
- if(empty($damage[$user['id']])) { $damage[$user['id']] = 0; }
- if($user['caveleader'] > 0 || $user['laba'] > 0) {
- $rep = floor($damage[$user['id']]/300);
- if($rep <= 0) {
- $rep = 0;
- }
- $ads = '. Репутации: '.$rep.' ед.';
- } else {
- $rep = 0;
- $ads = '.';
- }
-
- echo '
Бой закончен! Всего вами нанесено урона '.$damage[$user['id']].' HP. Получено опыта '.(int)$exp[$user['id']].' ('.check_proc($user['id']).'%)'.$ads.'
';
- }
- } else {
-?>
-
-
- }
-if($fbattle->battle) {
-?>
-
-
-
-foreach($fbattle->t1 as $k => $v) {
- if(in_array($v, array_keys($fbattle->battle))) {
- ++$i;
- if($i > 1) { $cc = ', '; } else { $cc = ''; }
- $ffs .= $cc.nick4($v, "B1");
- $zz .= "private [".nick7($v)."] ";
- }
-}
-
-$i = 0;
-?>
-
-=$ffs?>
- против
-
-$ffs = ''; $zz = '';
-foreach($fbattle->t2 as $k => $v) {
- if(in_array($v, array_keys($fbattle->battle))) {
- ++$i;
- if($i > 1) { $cc = ', '; } else { $cc = ''; }
- $ffs .= $cc.nick4($v, "B2");
- $zz .= "private [".nick7($v)."] ";
- }
-}
-$i = 0;
-?>
-
-=$ffs?>
-
-На данный момент вами нанесено урона:
=(int)$fbattle->damage[$user['id']]?> HP.
- if(!$user['in_tower']) { ?>
-
(Бой идет с таймаутом =$fbattle->battle_data['timeout']?> мин.)
- } ?>
-
-
-
-} else {
- echo "
";
-}
-
-if($user['battle']) { $ll = $user['battle']; } elseif($_REQUEST['batl']) { $ll = $_REQUEST['batl']; } else { $ll = $_SESSION['batl']; }
-
-if(!$ll) {
- $ll_r = mysql_fetch_array(mysql_query("SELECT `id` FROM `battle` WHERE (`t1` LIKE '%{$user['id']}%' OR `t2` LIKE '%{$user['id']}%') AND `win` = 3 LIMIT 1"));
- $ll = $ll_r['id'];
-}
-
-$fs = filesize("backup/logs/battle".$ll.".txt");
-$fh = fopen("backup/logs/battle".$ll.".txt", "r");
-fseek($fh, -4256, SEEK_END);
-$log[0] = fread($fh, 4256);
-fclose($fh);
-$log = explode("
", $log[0]);
-$ic = count($log)-2;
-
-if($fs >= 4256) {
- $max = 1;
-} else {
- $max = 0;
-}
-
-for($i = $ic; $i >= 0+$max; --$i) {
- if(eregi("
", $log[$i])) {
- $log[$i] = str_replace("
", "", $log[$i]);
- $log[$i] = $log[$i]."
";
- }
- if(eregi(">".$user['login']."", $log[$i])) {
- $log[$i] = str_replace("", "", $log[$i]);
- }
- if($ll != 0) {
- if(eregi("
", $log[$i])) {
- echo $log[$i];
- } else {
- echo $log[$i]."
";
- }
- }
-}
-unset($ic);
-
-if($max == 1) {
-?>
-Полную версию лога боя, смотрите здесь»
-
- } ?>
-
-
-
-
-
-
-if($fbattle->return == 1) {
- echo showinf_pers($fbattle->enemy, 1, 1);
-} else {
- if($fbattle->battle_data['type'] == 4 || $fbattle->battle_data['type'] == 5) {
- $a = array(6, 16);
- echo "";
- } elseif($fbattle->return > 1) {
- echo "";
- } elseif($exp[$user['id']] > 0) {
- echo "";
- } else {
- echo "";
- }
-}
-
-if($fbattle->needrefresh) {
- header("Location: fbattle.php?".time());
-}
-
-if($fbattle->battle_data['needbb']) {
- foreach($fbattle->battle as $k => $v) {
- if($k > _BOTSEPARATOR_) {
- foreach($v as $k2 => $v2) {
- if($k2 < _BOTSEPARATOR_) continue;
- $hp_1 = mysql_fetch_array(mysql_query('SELECT `hp` FROM `bots` WHERE `id` = "'.$k.'" LIMIT 1'));
- $hp_2 = mysql_fetch_array(mysql_query('SELECT `hp` FROM `bots` WHERE `id` = "'.$k2.'" LIMIT 1'));
- if($fbattle->battle[$k][$k2][0] && $fbattle->battle[$k2][$k][0] && $hp_1['hp'] > 0 && $hp_2['hp'] > 0 && time()-$fbattle->battle[$k][$k2][2] > 1 && time()-$fbattle->battle[$k2][$k][2] > 1) {
- $at_1 = $fbattle->battle[$k][$k2][0];
- $def_1 = $fbattle->battle[$k][$k2][1];
- $at_2 = $fbattle->battle[$k2][$k][0];
- $def_2 = $fbattle->battle[$k2][$k][1];
- $fbattle->makechange($k, $k2, $at_1, $at_2, $def_1, $def_2);
- $fbattle->write_log();
- $fbattle->battle[$k][$k2] = array(0, 0, time());
- $fbattle->battle[$k2][$k] = array(0, 0, time());
- $fbattle->needupdate = 1;
- }
- }
- }
- }
- if($fbattle->needupdate) {
- $fbattle->UpdateBattle();
- }
-}
-
-?>
- |
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cron.php b/cronjobs/cron.php
similarity index 99%
rename from cron.php
rename to cronjobs/cron.php
index 09f799b..ddd3f56 100644
--- a/cron.php
+++ b/cronjobs/cron.php
@@ -1,6 +1,12 @@
+ * Project name: Battles-Game
+ */
+
+include_once "../config.php";
+include_once "../functions.php";
$tm = time();
##########
diff --git a/cron2.php b/cronjobs/cron2.php
similarity index 99%
rename from cron2.php
rename to cronjobs/cron2.php
index fb82376..760ec25 100644
--- a/cron2.php
+++ b/cronjobs/cron2.php
@@ -1,4 +1,10 @@
+ * Project name: Battles-Game
+ */
+
/* cron file */
//error_reporting(E_ALL);
//ini_set("display_errors", 1);
@@ -290,7 +296,7 @@ mysql_query("update `variables` set `value`='".$times."' where `var`='xaot_creat
if($turnirstart['bs_art'] == 0){
AddChatSystem ('Приглашаем всех желающих на турнир в Башню Смерти! Турнир начинается через 15 минут');
}elseif($turnirstart['bs_art'] == 1){
- AddChatSystem ('Приглашаем всех желающих на турнир в Артовую Башню Смерти! Турнир начинается через 15 минут');
+ AddChatSystem ('Приглашаем всех желающих на турнир в Артовую Башню Смерти! Турнир начинается через 15 минут');
}
diff --git a/cron_bots.php b/cronjobs/cron_bots.php
similarity index 100%
rename from cron_bots.php
rename to cronjobs/cron_bots.php
diff --git a/cron_bots__battle.php b/cronjobs/cron_bots__battle.php
similarity index 99%
rename from cron_bots__battle.php
rename to cronjobs/cron_bots__battle.php
index 7b0dca9..ed5f6a4 100644
--- a/cron_bots__battle.php
+++ b/cronjobs/cron_bots__battle.php
@@ -1,4 +1,10 @@
+ * Project name: Battles-Game
+ */
+
include('config.php');
include('functions.php');
include('cave/cave_bots.php');
@@ -576,9 +582,9 @@ class fbattle {
}
if($flag == 1) {
- $rr = implode(", ", $nks1)." и ".implode(", ", $nks2);
+ $rr = implode(", ", $nks1). " и " .implode(", ", $nks2);
} elseif($flag == 2) {
- $rr = implode(", ", $nks1)." и ".implode(", ", $nks2)."";
+ $rr = implode(", ", $nks1)." и ".implode(", ", $nks2). "";
} else {
$rr = implode(", ", $nks1)." и ".implode(", ", $nks2)."";
}
diff --git a/cron_bots_battle.php b/cronjobs/cron_bots_battle.php
similarity index 99%
rename from cron_bots_battle.php
rename to cronjobs/cron_bots_battle.php
index 7b0dca9..ed5f6a4 100644
--- a/cron_bots_battle.php
+++ b/cronjobs/cron_bots_battle.php
@@ -1,4 +1,10 @@
+ * Project name: Battles-Game
+ */
+
include('config.php');
include('functions.php');
include('cave/cave_bots.php');
@@ -576,9 +582,9 @@ class fbattle {
}
if($flag == 1) {
- $rr = implode(", ", $nks1)." и ".implode(", ", $nks2);
+ $rr = implode(", ", $nks1). " и " .implode(", ", $nks2);
} elseif($flag == 2) {
- $rr = implode(", ", $nks1)." и ".implode(", ", $nks2)."";
+ $rr = implode(", ", $nks1)." и ".implode(", ", $nks2). "";
} else {
$rr = implode(", ", $nks1)." и ".implode(", ", $nks2)."";
}
diff --git a/cron_bs.php b/cronjobs/cron_bs.php
similarity index 100%
rename from cron_bs.php
rename to cronjobs/cron_bs.php
diff --git a/cron_test.php b/cronjobs/cron_test.php
similarity index 100%
rename from cron_test.php
rename to cronjobs/cron_test.php
diff --git a/cron_zv.php b/cronjobs/cron_zv.php
similarity index 100%
rename from cron_zv.php
rename to cronjobs/cron_zv.php
diff --git a/fight.php b/fight.php
index c6ae993..db74738 100644
--- a/fight.php
+++ b/fight.php
@@ -1,4 +1,4 @@
-
+
-
+ clearc();
} ?>
-
+
+
+
+