diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml
new file mode 100644
index 00000000..f4a650a3
--- /dev/null
+++ b/.idea/dataSources.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ mariadb
+ true
+ org.mariadb.jdbc.Driver
+ jdbc:mariadb://85.209.45.159:54001/game_production
+ $ProjectFileDir$
+
+
+
\ No newline at end of file
diff --git a/_incl_data/class/Battle.php b/_incl_data/class/Battle.php
index c721b487..c1e98023 100644
--- a/_incl_data/class/Battle.php
+++ b/_incl_data/class/Battle.php
@@ -1525,6 +1525,11 @@ JS;
$jstext = json_encode($log['text']);
$jsvars = json_encode($log['vars']);
+ //old
+ //$js = "add_log({$log['id']},0,$jstext,{$log['id_hod']},0,0,$jsvars)" . $js;
+ //home
+ //$js = "add_log({$log['id']},0,$jstext,{$log['id_hod']},$jsvars);" . $js;
+ //work
$js = "add_log({$log['id']},$jstext,{$log['id_hod']},$jsvars);" . $js;
}
@@ -1590,13 +1595,22 @@ JS;
$jstext = json_encode($log['text']);
$jsvars = json_encode($log['vars']);
+ $js = "add_mlog({$log['id']},0,$jstext,{$log['id_hod']},0,0,$jsvars)" . $js;
+
+ //old
+ //$js = "add_mlog({$log['id']},0,$jstext,{$log['id_hod']},0,0,$jsvars)" . $js;
+ //home
+ ////$js = "add_mlog({$log['id']},0,$jstext,{$log['id_hod']},$jsvars);" . $js;
+ //$js = "add_mlog({$log['id']},0,'{$log['text']}',{$log['id_hod']},'{$log['vars']}');" . $js;
+ //work
$js = "add_mlog({$log['id']},$jstext,{$log['id_hod']},$jsvars)" . $js;
}
Db::sql('update stats set mlog = ? where id = ?', [$u->info['mlog'], $u->info['id']]);
$js .= "id_mlog=$pll;";
- return htmlspecialchars($js, ENT_QUOTES);
+ //return htmlspecialchars($js, ENT_QUOTES);
+ return $js;
}
//Считаем урон
diff --git a/adminion/oltest.js b/adminion/oltest.js
new file mode 100644
index 00000000..5f0c2343
--- /dev/null
+++ b/adminion/oltest.js
@@ -0,0 +1,65 @@
+const img = '//img.new-combats.com/i';
+
+const gett = async () => {
+ let response = await fetch('/api/onlinelist.php');
+ if (response.ok) {
+ document.getElementById('onlinelist').innerHTML = '';
+ const list = await response.json();
+ list.forEach((user) => {
+ console.log(user);
+ document.getElementById('onlinelist').insertAdjacentHTML('beforeend', `${ol.makelogin(user)}
`);
+ });
+ } else {
+ document.getElementById('onlinelist').insertAdjacentHTML('beforeend', `Все ушли.
`);
+ }
+};
+
+window.addEventListener('load', () => {
+ const fetchInterval = 10000; // 10 секунд.
+ gett;
+ //(get)(); // почему get; или get(); - неправильно?? 🤬😭
+ setInterval(gett, fetchInterval);
+});
+
+ol = {
+ tochat (login) {
+ const input = document.getElementById('tochat');
+ if (input.value === `private [${login}]`) {
+ return;
+ }
+ if (input.value === `to [${login}]`) {
+ input.value = `private [${login}]`;
+ return;
+ }
+ input.value = `to [${login}]`;
+ },
+
+ makelogin ({id, login, level, align, clan, inbattle, isadmin}) {
+ let style = '';
+ if (isadmin) {
+ //align = 2.9;
+ style = `color: crimson;`;
+ }
+ if (!level || level < 0 || level > 21 && !isadmin || typeof level !== 'number') {
+ level = '??';
+ }
+ let inficon = ``;
+ let html = `${login}[${level}]` + inficon;
+ if (clan) {
+ html = ` ` + html;
+ }
+ if (align) {
+ html = ` ` + html;
+ }
+
+ let battleyes = '', battlealt = '';
+ if (inbattle) {
+ battleyes = 1;
+ battlealt = ' (персонаж в поединке)'
+ }
+ html = `` + html;
+
+ return html;
+ }
+};
+
diff --git a/adminion/onlinelist.php b/adminion/onlinelist.php
new file mode 100644
index 00000000..b5698e25
--- /dev/null
+++ b/adminion/onlinelist.php
@@ -0,0 +1,22 @@
+ 1, 'login' => 'Paladin', 'align' => 1.9, 'level' => 4],
+ ['id' => 2, 'login' => 'ClanUser', 'clan' => 100, 'level' => 5],
+ ['id' => 3, 'login' => 'AlignClanUser', 'align' => 23, 'clan' => 120, 'level' => 'text'],
+ ['id' => 4, 'login' => 'User', 'level' => -1],
+ ['id' => 5, 'login' => 'UserInBattle', 'battle' => true, 'level' => 100500],
+ ['id' => 6, 'login' => 'Admin', 'battle' => true, 'admin' => true],
+];
+?>
+
+
+
+
+
onlinelist
+
+
+
+
+
diff --git a/adminion/priems.php b/adminion/priems.php
new file mode 100644
index 00000000..cb61cc9d
--- /dev/null
+++ b/adminion/priems.php
@@ -0,0 +1,95 @@
+names[$nrow['sys_name']] = $nrow['name'];
+ }
+ // Несовпадения по именам.
+ $this->names['lvl'] = $this->names['level'];
+
+ $this->printAll();
+ $this->printUnknown();
+ }
+
+ private function printer(array $data, string $title): string
+ {
+ $result = '';
+ foreach ($data as $k=>$v) {
+ if ($k === array_key_first($data)) {
+ $result .= "
$title: ";
+ }
+ $result .= $this->namer($k, $v);
+ }
+ return $result;
+ }
+ private function printAll(): void
+ {
+ foreach (Db::getRows('select name, info, date2, date3, id, tr from priems order by name') as $prow) {
+ $d2 = Conversion::dataStringToArray($prow['date2']);
+ $d3 = Conversion::dataStringToArray($prow['date3']);
+ $tr = Conversion::dataStringToArray($prow['tr']);
+
+ $d2s = $this->printer($d2, 'date2');
+ $d3s = $this->printer($d3, 'date3');
+ $trs = $this->printer($tr, 'Требуется');
+
+ $dallk = array_flip(array_keys(array_merge($d2, $d3, $tr)));
+ $this->parameters = array_merge($dallk, $this->parameters);
+ echo "{$prow['name']} id:{$prow['id']}
{$prow['info']} $trs $d2s $d3s
";
+ }
+ }
+ private function namer($k, $v): string
+ {
+ return match (true) {
+ $this->names[$k] => "
$this->names[$k] = $v",
+ str_starts_with($k, 'add_') && $this->names[str_replace('add_', '', $k)] => "
{$this->names[str_replace('add_', '', $k)]} = $v",
+ str_starts_with($k, 'tr_') && $this->names[str_replace('tr_', '', $k)] => "
{$this->names[str_replace('tr_', '', $k)]} = $v",
+ default => "
$k = $v",
+ };
+ }
+
+ private function printUnknown(): void
+ {
+ $sorted = [];
+ foreach ($this->parameters as $pa=>$va) {
+ if ($this->names[str_replace('add_', '', $pa)] || $this->names[str_replace('tr_', '', $pa)]) {
+ continue;
+ }
+ $sorted[] = $pa;
+ }
+
+ echo '
Неизвестные параметры:
';
+ foreach (array_chunk($sorted, 10) as $re) {
+ echo implode(', ', $re) . '
';
+ }
+ }
+}
+
+
+echo <<
+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');
+body {font-family: 'JetBrains Mono', monospace; font-size: small; background-color: lavender;}
+hr {border: 1px solid darkgreen;}
+i {color: dimgrey;}
+div {margin: 10px 0; padding: 4px; background-color: ghostwhite;}
+div > b:first-child {margin-left: 5px; color: darkslategrey;}
+div > b:first-child:before {content: '⭕ '}
+
+HTML;
+
+$np = new ShowPriems();
diff --git a/adminion/test.php b/adminion/test.php
new file mode 100644
index 00000000..a8567eba
--- /dev/null
+++ b/adminion/test.php
@@ -0,0 +1,53 @@
+ 'eta', 'bar' => 'bingo', 'baz' => 'quatro', 'mill' => 'buratino erra stupido'];
+
+\Core\Debug::x();
+
+//$f1 = new Fighter(27319412, 4);
+$f2 = new Fighter(27205347, 2);
+//echo $f1;
+echo $f2;
+//var_dump($f1);
+$u = User::start(27205347);
+var_dump($u->stats['items'], $u->stats);
+
+?>
+
+
+
+
+
+
+
+
+
diff --git a/js/gameEngine.from2014.js b/js/gameEngine.from2014.js
new file mode 100644
index 00000000..2a626b7b
--- /dev/null
+++ b/js/gameEngine.from2014.js
@@ -0,0 +1,1891 @@
+var sml = new Array(
+ /*"smile",18,18, "laugh",15,15, "fingal",22,15, "eek",15,15, "smoke",20,20, "hi",31,28, "bye",15,15,
+ "king",21,22, "king2",28,24, "smile",18,18, "boks2",28,21, "boks",62,28, "gent",15,21, "lady",15,19, "tongue",15,15, "smil",16,16, "rotate",15,15,
+ "ponder",21,15, "bow",15,21, "angel",42,23, "angel2",26,25, "hello",25,27, "dont",26,26, "idea",26,27, "mol",27,22, "super",26,28,
+ "beer",15,15, "drink",19,17, "baby",15,18, "tongue2",15,15, "sword",49,18, "agree",37,15,
+ "loveya",27,15, "kiss",15,15, "kiss2",15,15, "kiss3",15,15, "kiss4",37,15, "rose",15,15, "love",27,28,
+ "love2", 55,24,
+ "confused",15,22, "yes",15,15, "no",15,15, "shuffle",15,20, "nono",22,19, "maniac",70,25, "privet",27,29, "ok",22,16, "ninja",15,15,
+ "pif",46,26, "smash",30,26, "alien",13,15, "pirate",23,19, "gun",40,18, "trup",20,20,
+ "mdr",56,15, "sneeze",15,20, "mad",15,15, "friday",57,28, "cry",16,16, "grust",15,15, "rupor",38,18,
+ "fie",15,15, "nnn",82,16, "row",36,15, "red",15,15, "lick",15,15,
+ "help",23,15, "wink",15,15, "jeer",26,16, "tease",33,19, "nunu",43,19,
+ "inv",80,20, "duel",100,34, "susel",70,34, "nun",40,28, "kruger",34,27, "flowers",28,29, "horse",60,40, "hug",48,20, "str",35,25,
+ "alch",39,26, "pal", 25, 21, "mag", 37, 37, "sniper", 37,37, "vamp", 27,27, "doc", 37,37, "doc2", 37,37, "sharp", 37,37,
+ "naem", 37,37, "naem2", 37,37, "naem3", 37,37, "invis", 32,23, "chtoza", 33, 37,
+ "beggar", 33,27, "sorry", 25,25, "sorry2", 25,25,
+ "creator", 39, 25, "grace", 39, 25, "dustman", 30, 21, "carreat", 40, 21, "lordhaos", 30, 21,
+ "ura", 31, 36, "elix", 30, 35, "dedmoroz", 32,32, "snegur", 45,45, "showng", 50, 35, "superng", 45,41,
+ "podz", 31,27, "sten", 44, 30, "devil", 29, 20, "cat", 29, 27, "owl", 29,20, "lightfly", 29,20, "snowfight", 51, 24,
+ "rocket", 43,35, "dance1", 45,23, "radio1", 36, 24, "victory", 51, 35, "dance2", 41, 31, "radio2", 29, 29,
+ "nail", 32, 26, "rev", 40, 25, "obm", 37, 22, "yar", 40, 36, "rom", 38, 33, "sad", 23, 23
+ */
+
+ //Новые смайлики
+
+ "belko", 24, 15, "1406", 78, 22, "agree", 37, 15, "alch", 39, 26, "alien", 13, 15, "angel", 42, 23, "angel2", 26, 25, "asc", 37, 25, "asc1", 21, 22, "asc2", 35, 29, "asc3", 41, 40, "baby", 15, 18, "ball", 61, 22, "ban", 54, 22, "beer", 15, 15, "beggar", 33, 27, "blbl", 59, 24, "blrose", 15, 15, "boks", 62, 28, "boks2", 28, 21, "boooo", 30, 20, "bow", 15, 21, "bye", 15, 15, "carreat", 40, 21, "cat", 29, 27, "chtoza", 33, 37, "confused", 15, 22, "crazy", 17, 24, "creator", 39, 25, "cry", 16, 16, "crz", 40, 25, "dance1", 45, 23, "dance2", 41, 31, "dedmoroz", 32, 32, "den", 40, 35, "devil", 29, 20, "dimas", 60, 35, "dits", 39, 19, "dits2", 70, 22, "doc", 37, 37, "doc2", 37, 37, "dont", 26, 26, "drink", 19, 17, "duel", 100, 34, "dustman", 30, 21, "eek", 15, 15, "elix", 30, 35, "emoci", 60, 41, "facepalm", 33, 24, "fie", 15, 15, "fingal", 22, 15, "fire", 16, 16, "flowers", 28, 29, "friday", 57, 28, "ganga", 35, 25, "gangam", 25, 26, "gent", 15, 21, "grace", 39, 25, "grenade", 22, 17, "grust", 15, 15, "gun", 40, 18, "hello", 25, 27, "help", 23, 15, "hi", 31, 28, "horse", 60, 40, "hug", 48, 20, "icon7", 15, 15, "icube", 48, 45, "idea", 26, 27, "inv", 80, 20, "invis", 32, 23, "jack", 25, 45, "jeer", 26, 16, "king", 21, 22, "king2", 28, 24, "kiss", 15, 15, "kiss2", 15, 15, "kiss3", 15, 15, "kiss4", 37, 15, "kruger", 34, 27, "lady", 15, 19, "laugh", 15, 15, "lick", 15, 15, "lightfly", 29, 20, "lordhaos", 30, 21, "love", 27, 28, "love2", 55, 24, "loveya", 27, 15, "mad", 15, 15, "mag", 37, 37, "mal", 42, 27, "man", 91, 28, "maniac", 70, 25, "mdr", 56, 15, "milord", 35, 30, "mol", 27, 22, "moy", 54, 32, "naem", 37, 37, "naem2", 37, 37, "naem3", 37, 37, "nail", 32, 26, "neutral", 12, 15, "ninja", 15, 15, "nnn", 82, 16, "no", 15, 15, "nono", 22, 19, "note", 24, 23, "nun", 40, 28, "nunu", 43, 19, "obm", 37, 22, "ok", 22, 16, "owl", 29, 20, "pal", 25, 21, "phone1", 25, 20, "pif", 46, 26, "pirate", 23, 19, "podz", 31, 27, "ponder", 21, 15, "priga", 31, 31, "privet", 27, 29, "radio1", 36, 24, "radio2", 29, 29, "rand", 23, 16, "red", 15, 15, "rev", 40, 25, "rocket", 43, 35, "rom", 38, 33, "rose", 15, 15, "rotate", 15, 15, "row", 36, 15, "rupor", 38, 18, "sad", 23, 23, "sand_m", 17, 15, "shaitan", 19, 24, "shaitan2", 35, 35, "sharp", 37, 37, "showng", 50, 35, "shuffle", 15, 20, "shut", 43, 30, "smash", 30, 26, "smil", 16, 16, "smile", 18, 18, "smiles", 50, 33, "smiles1", 57, 44, "smiles_000", 57, 35, "smiles_001", 25, 17, "smiles_002", 15, 15, "smiles_003", 25, 27, "smiles_004", 48, 20, "smiles_005", 37, 15, "smiles_006", 57, 28, "smiles_007", 15, 15, "smiles_008", 56, 15, "smiles_009", 82, 16, "smiles_010", 42, 23, "smiles_011", 21, 15, "smiles_012", 35, 25, "smiles_013", 70, 34, "smiles_014", 33, 19, "smiles_015", 20, 20, "smiles_016", 15, 19, "smiles_018", 15, 18, "smiles_019", 80, 30, "smiles_021", 28, 22, "smiles_022", 23, 15, "smiles_023", 45, 30, "smiles_024", 100, 20, "smiles_025", 22, 25, "smiles_026", 60, 40, "smiles_027", 47, 29, "smiles_028", 42, 27, "smiles_029", 46, 41, "smiles_030", 57, 38, "smiles_031", 51, 36, "smiles_032", 37, 31, "smiles_033", 15, 15, "smiles_034", 15, 21, "smiles_036", 62, 28, "smiles_037", 28, 21, "smiles_038", 37, 23, "smiles_039", 19, 19, "smiles_040", 60, 40, "smiles_043", 15, 15, "smiles_049", 15, 17, "smiles_052", 15, 22, "smiles_056", 21, 21, "smiles_057", 39, 16, "smiles_059", 15, 15, "smiles_062", 16, 16, "smiles_066", 15, 15, "smiles_068", 57, 22, "smiles_073", 28, 27, "smiles_077", 24, 18, "smiles_079", 100, 34, "smiles_080", 50, 15, "smiles_082", 15, 15, "smiles_083", 15, 17, "smiles_085", 21, 18, "smiles_086", 15, 15, "smiles_1000", 74, 22, "smiles_114", 32, 27, "smiles_118", 65, 35, "smiles_119", 15, 15, "smiles_123", 20, 15, "smiles_126", 16, 18, "smiles_127", 37, 26, "smiles_131", 31, 29, "smiles_155", 36, 37, "smiles_156", 43, 30, "smiles_158", 15, 15, "smiles_161", 15, 21, "smiles_164", 15, 15, "smiles_166", 27, 17, "smiles_167", 40, 20, "smiles_170", 15, 15, "smiles_174", 26, 16, "smiles_175", 28, 29, "smiles_177", 31, 28, "smiles_178", 43, 22, "smiles_179", 15, 15, "smiles_186", 26, 27, "smiles_188", 30, 21, "smiles_189", 15, 15, "smiles_190", 80, 20, "smiles_202", 31, 16, "smiles_203", 21, 15, "smiles_205", 15, 15, "smiles_206", 74, 22, "smiles_221", 15, 15, "smiles_237", 19, 19, "smiles_238", 19, 19, "smiles_239", 40, 24, "smiles_243", 60, 25, "smiles_246", 43, 23, "smiles_253", 15, 15, "smiles_254", 22, 19, "smiles_255", 43, 19, "smiles_267", 47, 43, "smiles_275", 34, 15, "smiles_276", 37, 15, "smiles_277", 40, 25, "smiles_278", 15, 15, "smiles_284", 15, 15, "smiles_288", 25, 29, "smiles_289", 25, 22, "smiles_293", 15, 20, "smiles_294", 15, 15, "smiles_295", 15, 16, "smiles_297", 27, 22, "smiles_310", 20, 20, "smiles_313", 26, 28, "smiles_319", 24, 18, "smiles_324", 54, 24, "smiles_336", 60, 30, "smiles_345", 40, 36, "smiles_346", 23, 34, "smiles_347", 15, 15, "smiles_348", 61, 20, "smiles_349", 65, 30, "smiles_350", 43, 55, "smiles_351", 53, 26, "smiles_352", 40, 28, "smiles_353", 26, 23, "smiles_354", 30, 27, "smiles_357", 18, 30, "smiles_358", 24, 36, "smiles_361", 17, 21, "smiles_362", 42, 15, "smiles_366", 28, 28, "smiles_367", 27, 22, "smiles_368", 23, 24, "smiles_376", 31, 35, "smiles_382", 37, 15, "smiles_385", 23, 34, "smiles_386", 29, 24, "smiles_393", 15, 23, "smiles_411", 15, 20, "smiles_413", 15, 15, "smiles_414", 31, 28, "smiles_415", 15, 15, "smiles_417", 43, 21, "smiles_419", 40, 15, "smiles_422", 15, 15, "smiles_434", 70, 25, "smiles_442", 15, 22, "smiles_447", 50, 15, "smiles_453", 39, 15, "smiles_457", 45, 45, "smiles_459", 29, 26, "smiles_467", 28, 29, "smiles_469", 60, 23, "smiles_471", 44, 30, "smiles_472", 51, 20, "smiles_473", 29, 27, "smiles_474", 51, 25, "smiles_475", 24, 18, "smiles_477", 34, 40, "smiles_551", 30, 15, "smiles_552", 41, 38, "smiles_554", 70, 25, "smiles_558", 22, 23, "smiles_559", 23, 15, "smiles_560", 26, 39, "smiles_564", 38, 18, "smiles_568", 25, 19, "smiles_570", 23, 31, "smiles_573", 33, 33, "smiles_574", 52, 29, "smiles_575", 24, 22, "smiles_576", 15, 15, "smiles_579", 27, 20, "smiles_600", 25, 20, "smiles_601", 49, 36, "smiles_602", 49, 38, "smiles_603", 30, 20, "smiles_604", 28, 19, "smiles_605", 15, 15, "smiles_606", 27, 22, "smiles_607", 25, 18, "smiles_608", 43, 34, "smiles_609", 23, 31, "smiles_610", 30, 30, "smiles_611", 22, 15, "smiles_612", 29, 15, "smiles_613", 30, 25, "smiles_614", 45, 28, "smiles_615", 30, 20, "smiles_616", 15, 18, "smiles_617", 34, 43, "smiles_618", 38, 19, "smiles_619", 40, 25, "smiles_620", 15, 15, "smiles_621", 17, 20, "smiles_622", 80, 40, "smiles_623", 30, 20, "smiles_624", 30, 20, "smiles_625", 35, 19, "smiles_626", 50, 25, "smiles_627", 20, 20, "smiles_628", 25, 19, "smiles_629", 20, 15, "smiles_630", 20, 26, "smiles_631", 21, 16, "smiles_632", 30, 30, "smiles_633", 25, 20, "smiles_634", 25, 20, "smiles_635", 26, 15, "smiles_636", 19, 20, "smiles_637", 20, 30, "smiles_638", 30, 30, "smiles_639", 20, 15, "smiles_640", 15, 16, "smiles_641", 44, 24, "smiles_642", 43, 19, "smiles_643", 24, 20, "smiles_644", 20, 20, "smiles_645", 27, 27, "smiles_646", 19, 20, "smiles_647", 48, 24, "smiles_648", 23, 28, "smiles_650", 25, 20, "smiles_651", 30, 20, "smiles_652", 30, 20, "smiles_653", 51, 38, "smiles_654", 17, 24, "smiles_655", 49, 37, "smiles_656", 29, 25, "smiles_657", 32, 22, "smiles_950", 33, 56, "smiles_951", 36, 32, "smiles_952", 39, 26, "smiles_953", 34, 24, "smiles_954", 66, 29, "smiles_955", 32, 22, "smiles_956", 80, 40, "smiles_957", 27, 28, "smiles_958", 56, 25, "smiles_959", 37, 21, "smiles_960", 15, 15, "smoke", 20, 20, "sneeze", 15, 20, "snegur", 40, 45, "sniper", 37, 37, "snowfight", 51, 24, "sorry", 25, 25, "sorry2", 25, 25, "spartak", 59, 36, "sten", 44, 30, "str", 35, 25, "super", 26, 28, "superng", 45, 41, "susel", 70, 34, "sword", 49, 18, "tease", 33, 19, "test1", 42, 42, "tongue", 15, 15, "tongue2", 15, 15, "tongue3", 15, 15, "trololo", 26, 21, "trup", 20, 20, "ura", 31, 36, "vamp", 27, 27, "vampire", 54, 36, "victory", 51, 35, "vini", 53, 37, "wink", 15, 15, "wm", 15, 15, "wow", 30, 30, "yar", 40, 36, "yes", 15, 15, "zapodlo", 27, 26
+);
+
+function saveDoc() {
+ $.post('/doc.php', {'data': document.documentElement.outerHTML});
+}
+
+function testShoot() {
+ $('#main').remove();
+ html2canvas(document.body).then(canvas => {
+ document.body.innerHTML = '';
+ document.body.appendChild(canvas);
+ });
+}
+
+function copyText(text) {
+ $('#myInputCopy').val(text);
+ var copyText = document.getElementById("myInputCopy");
+ copyText.select();
+ document.execCommand("copy");
+ $(document.body).focus();
+}
+
+var cb_id = 1,
+ cb_date = {},
+ cb_rdate = {},
+ cb_ndate = {},
+ cb_select = 1,
+ ed_select = -1,
+ cb_conf = {1: '100000001110', 2: '200010100001', 3: '211101010001'};
+var nasta = null;
+
+/* Использовать предмет в поединке (хилки) */
+function useMagicBattleHeal(name, id, img, type, type_use, text, team) {
+ if (type_use == 1) {
+ //var onEnLogin = '['+team+']';
+ if (text == '') {
+ var text = getCookie('login');
+ }
+ //win.add('iusemg'+id,'Используем "'+name+'" ','Укажите логин персонажа:
(можно щелкнуть по логину в чате)',{'a1':'top.useMagicGoGoBattle(\'\',\''+id+'\',\''+type_use+'\');','usewin':'top.chat.inObj = $(\'#useMagicLoginBtl'+id+'\');$(\'#useMagicLoginBtl'+id+'\').focus()','d':''},3,1,'min-width:300px;');
+ win.add('iusemg' + id, 'Используем "' + name + '" ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.useMagicGoGoBattleHeal(\'\',\'' + id + '\',\'' + type_use + '\');',
+ 'usewin': 'top.chat.inObj = $(\'#useMagicLoginBtl' + id + '\');$(\'#useMagicLoginBtl' + id + '\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ $('#useMagicLoginBtl' + id).val(text);
+ top.chat.inObj = $('#useMagicLoginBtl' + id);
+ } else if (type_use == 2) {
+ var txxt = '';
+ txxt += " | "" + name + "" Использовать сейчас? |
";
+ win.add('iusemg' + id, 'Используем "' + name + '" ', txxt, {'a1': 'top.useMagicGoGoBattleHeal(\'\',\'' + id + '\',\'' + type_use + '\');'}, 2, 1, 'width:300px;');
+ }
+}
+
+function useMagicGoGoBattleHeal(url, id, type_use) {
+ top.frames['main'].useitemHeal(id, 1, $('#useMagicLoginBtl' + id).val());
+}
+
+/* Используем смену */
+function nastavniknew() {
+ win.add('nastavniknew1', 'Предложить наставничество ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.nastavniknewGo($(\'#nastavniknewGoinp1\').val())',
+ 'usewin': 'top.chat.inObj = $(\'#nastavniknewGoinp1\');$(\'#nastavniknewGoinp1\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#nastavniknewGoinp1');
+}
+
+function nastavniknewGo(login) {
+ top.getUrl('main', 'main.php?referals&nastanew=' + login + '&sd4=' + top.sd4key);
+}
+
+function nastavnikNew() {
+ win.add('nastavnijNew', 'Приглашение стать воспитанником ', ' | ' + top.nasta + ' Предлагает вам стать его/её воспитанником. Вы согласны?
|
', {'a1': 'top.nastavnikNewsave();'}, 2, 1, 'min-width:300px;');
+ //top.nasta = $.cookie('nasta');
+ $.cookie('nasta', false);
+}
+
+function nastavnikNewsave() {
+ top.getUrl('main', 'main.php?referals&nastayes=' + top.nasta + '&sd4=' + top.sd4key);
+ //$.cookie('nasta',null);
+ top.nasta = null;
+}
+
+function leaderFight() {
+ win.add('leaderFightNew1', 'Передать флаг ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.leaderFx($(\'#leaderFightgroup1\').val())',
+ 'usewin': 'top.chat.inObj = $(\'#leaderFightgroup1\');$(\'#leaderFightgroup1\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#leaderFightgroup1');
+}
+
+function leaderFx(login) {
+ top.frames['main'].leader_login = login;
+ top.frames['main'].leader_type = 1;
+ top.frames['main'].reflesh();
+}
+
+function n_lead() {
+ win.add('leaderPshNew1', 'Новый лидер ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.leaderPsh($(\'#leaderPshgroup1\').val())',
+ 'usewin': 'top.chat.inObj = $(\'#leaderPshgroup1\');$(\'#leaderPshgroup1\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#leaderPshgroup1');
+}
+
+function leaderPsh(lead_login) {
+ top.getUrl('main', 'main.php?new_leader=' + lead_login);
+}
+
+function go_from_psh() {
+ win.add('WhoFuckOff', 'Выгнать ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.fuckOffPsh($(\'#fuckOff\').val())',
+ 'usewin': 'top.chat.inObj = $(\'#fuckOff\');$(\'#fuckOff\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#fuckOff');
+}
+
+function fuckOffPsh(fuckOffLogin) {
+ console.log(fuckOffLogin);
+ top.getUrl('main', 'main.php?go_from_psh=' + fuckOffLogin);
+}
+
+function leaderFight2() {
+ win.add('leaderFightNew2', 'Убить ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.leaderFx2($(\'#leaderFightgroup2\').val())',
+ 'usewin': 'top.chat.inObj = $(\'#leaderFightgroup2\');$(\'#leaderFightgroup2\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#leaderFightgroup2');
+}
+
+function leaderFx2(login) {
+ top.frames['main'].leader_login = login;
+ top.frames['main'].leader_type = 2;
+ top.frames['main'].reflesh();
+}
+
+function savePriems() {
+ win.add('saveComplPriem', 'Запомнить набор приемов ', 'Запомнить набор приемов, для быстрого переключения.Введите название набора:
', {
+ 'a1': 'top.addSavedPriems($(\'#addSavedPriems\').val());',
+ 'usewin': '$(\'#addSavedPriems\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+}
+
+function addSavedPriems(val) {
+ top.getUrl('main', 'main.php?skills=1&rz=4&savePriems=' + val + '&sd4=' + top.sd4key);
+}
+
+function atackTower() {
+ win.add('towerAttakWin', 'Напасть на персонажа ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.atackTowergo($(\'#towerAttakTxt\').val());',
+ 'usewin': 'top.chat.inObj = $(\'#towerAttakTxt\');$(\'#towerAttakTxt\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#towerAttakTxt');
+}
+
+function atackTowergo(val) {
+ top.getUrl('main', 'main.php?attack=' + val);
+}
+
+function anren() {
+ win.add('neAnimName', 'Выберите кличку ', 'Введите одно слово:
(Не более 20 символов)
Стоимость 30кр.
', {
+ 'a1': 'top.anrenSave($(\'#addSavedAnmName\').val());',
+ 'usewin': '$(\'#addSavedAnmName\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+}
+
+function anrenSave(name) {
+ top.getUrl('main', 'main.php?pet=1&anml_login=' + name + '&sd4=' + top.sd4key);
+}
+
+function add_cb(id, name, nodel, main, indata) {
+ if (indata == undefined) {
+ indata = '';
+ }
+ if ($("#chat_menu") != undefined) {
+ var cb = document.getElementById('chat_menu');
+ var ch = document.getElementById('canals');
+ cb_date[cb_id] = id;
+ cb_rdate[id] = cb_id;
+ if (cb_ndate[name] != undefined) {
+ var j = 1,
+ name2 = '';
+ while (j != -1) {
+ name2 = name + ' (' + j + ')';
+ if (cb_ndate[name2] == undefined) {
+ name = name2;
+ j = -2;
+ }
+ j++;
+ }
+ }
+ cb_ndate[name] = cb_id;
+ var unright = '',
+ unleft = '';
+ if (cb_id == 1) {
+ unright = '' +
+ '' +
+ ' | ';
+ unleft = '' +
+ '' +
+ ' | ';
+ } else {
+ unleft = '
' +
+ '' +
+ ' | ';
+ top.document.getElementById("ldb" + (cb_id - 1)).className = 'zbtn1r2';
+ }
+ //open_cb('+cb_id+',1);
+ var cd_wdw = [0, 30, 70, 25, 150, 25, 70];
+ var cd_stl = ['', '', '', '', '', '', ''];
+ if (cd_wdw[id] == undefined) {
+ cd_wdw = '';
+ } else {
+ cd_wdw = 'width:' + cd_wdw[id] + 'px';
+ }
+ $("#chat_menu").html('' +
+ '
' +
+ '
' +
+ unleft + '' +
+ ' ' + name + ' ' +
+ ' | ' + unright + '
' + $("#chat_menu").html());
+ if ($('#canal' + id).html() == '' || $('#canal' + id).html() == undefined || $('#canal' + id).html() == false || $('#canal' + id).html() == null) {
+ $("#canals").html('' + indata + '
' + $("#canals").html());
+ }
+ cb_id++;
+ open_cb(cb_select, null);
+ }
+}
+
+function create_radio(id, act, clss) {
+ var r = '';
+
+ r = '';
+
+ return r;
+}
+
+function create_check(id, act, clss) {
+ var r = '';
+
+ r = '';
+
+ return r;
+}
+
+var slcbrc = [0, 0, 1, 0, 0];
+
+function cb_radio_click_b(el, id) {
+ if ($(el).attr('radio_check') == 1) {
+
+ if ($(el).attr('class') == 'radio_gloff') {
+ $(el).removeClass('radio_gloff');
+ $(el).addClass('radio_glon');
+ top.slcbrc[id] = 1;
+ } else {
+ $(el).removeClass('radio_glon');
+ $(el).addClass('radio_gloff');
+ top.slcbrc[id] = 0;
+ }
+
+ } else if ($(el).attr('radio_check') == 2) {
+
+ if ($(el).attr('class') == 'check_gloff') {
+ $(el).removeClass('check_gloff');
+ $(el).addClass('check_glon');
+ top.slcbrc[id] = 1;
+ } else {
+ $(el).removeClass('check_glon');
+ $(el).addClass('check_gloff');
+ top.slcbrc[id] = 0;
+ }
+
+ }
+}
+
+function cb_radio_click(el, id) {
+
+ var cb_sm = true;
+
+ if (id == 1) {
+
+ if (top.slcbrc[1] == 0) {
+ if (top.slcbrc[2] == 1) {
+ top.cb_radio_click_b($('#cr_rach_rc2'), 2);
+ }
+ if (top.slcbrc[3] == 1) {
+ top.cb_radio_click_b($('#cr_rach_rc3'), 3);
+ }
+ } else {
+ cb_sm = false;
+ }
+
+ } else if (id == 2) {
+
+ if (top.slcbrc[2] == 0) {
+ if (top.slcbrc[1] == 1) {
+ top.cb_radio_click_b($('#cr_rach_rc1'), 1);
+ }
+ } else {
+ cb_sm = false;
+ }
+
+ } else if (id == 3) {
+
+ if (top.slcbrc[3] == 0) {
+ if (top.slcbrc[1] == 1) {
+ top.cb_radio_click_b($('#cr_rach_rc1'), 1);
+ }
+ if (top.slcbrc[2] == 0) {
+ top.cb_radio_click_b($('#cr_rach_rc2'), 2);
+ }
+ if (top.slcbrc[4] == 1) {
+ top.cb_radio_click_b($('#cr_rach_rc4'), 4);
+ }
+ }
+
+ } else if (id == 4) {
+
+ if (top.slcbrc[4] == 0) {
+ if (top.slcbrc[3] == 1) {
+ top.cb_radio_click_b($('#cr_rach_rc3'), 3);
+ }
+ }
+
+ }
+
+ if (cb_sm == true) {
+ top.cb_radio_click_b(el, id);
+ }
+}
+
+var fasthtmlarr = [0, [],
+ []
+];
+var fastpanelopen = 0;
+
+function addfastpanel(id, name, type, price, price2, madein, img, itemid, iznosnow, iznosmax, otdel, mbodet, mbused, norefl) {
+ if (fasthtmlarr[0] >= 10) {
+ alert('Все слоты под быстрый доступ заполнены!');
+ } else {
+ if (fasthtmlarr[2][id] == undefined) {
+ fasthtmlarr[0]++;
+ var i = 0;
+ var iid = 0;
+ while (i <= 10) {
+ if (fasthtmlarr[1][i] == undefined && iid == 0) {
+ iid = i;
+ }
+ i++;
+ }
+ fasthtmlarr[1][iid] = [
+ id,
+ name,
+ type,
+ price,
+ price2,
+ madein,
+ img,
+ itemid,
+ iznosnow,
+ iznosmax,
+ otdel,
+ mbodet,
+ mbused
+ ];
+ fasthtmlarr[2][id] = true;
+ if (fastpanelopen == 1) {
+ //Обновляем окно
+ fastpanelopen = 0;
+ win.closew('fastpanel');
+ fastpanel();
+ }
+ if (norefl == 0) {
+ fastpanelsave();
+ }
+ } else {
+ alert('Данный предмет уже выставлен в слот!');
+ }
+ }
+}
+
+function intvalor(mixed_var, base) {
+ var tmp;
+ if (typeof (mixed_var) == 'string') {
+ tmp = parseInt(mixed_var);
+ if (isNaN(tmp)) {
+ return 0;
+ } else {
+ return tmp.toString(base || 10);
+ }
+ } else if (typeof (mixed_var) == 'number') {
+ return Math.floor(mixed_var);
+ } else {
+ return 0;
+ }
+}
+
+
+function fastpanel() {
+ //окно быстрого доступа
+ if (fastpanelopen == 0) {
+ fastpanelopen = 1;
+ var fasthtml = '';
+ var i = 1;
+ while (i <= 10) {
+ var slot = '';
+ var clss = '';
+ if (fasthtmlarr[1][i] != undefined) {
+ var titlemini = '' + fasthtmlarr[1][i][1] + '
';
+ if (fasthtmlarr[1][i][3] > 0) {
+ titlemini += '
Цена: ' + fasthtmlarr[1][i][3] + ' кр.';
+ }
+ if (fasthtmlarr[1][i][4] > 0) {
+ titlemini += '
Цена: ' + fasthtmlarr[1][i][4] + ' екр.';
+ }
+ if (fasthtmlarr[1][i][9] > 0) {
+ titlemini += '
Долговечность: ' + intvalor(fasthtmlarr[1][i][8]) + '/' + intvalor(fasthtmlarr[1][i][9]) + '';
+ }
+ if (fasthtmlarr[1][i][5] != '') {
+ titlemini += '
Сделано в ' + fasthtmlarr[1][i][5] + '';
+ }
+ slot = '';
+ clss = 'filter: alpha(opacity=100);opacity:1.00;-moz-opacity:1.00;-khtml-opacity:1.00;" onclick="fastpanelused(' + i + ',event);" oncontextmenu="fastpanelused(' + i + ',event); return false;" class="cp" onMouseOver="top.hi(this,\'' + titlemini + '\',event,2,1,1,0,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();';
+ } else {
+ slot = '';
+ clss = 'filter: alpha(opacity=30);opacity:0.30;-moz-opacity:0.30;-khtml-opacity:0.30;';
+ }
+ fasthtml += '' + slot + '
';
+ i++;
+ }
+ win.add('fastpanel', 'Панель быстрого доступа ', '' + fasthtml + '
', {
+ 'closewin': 'top.fastpanelopen=0;',
+ 'd': ''
+ }, 1, 1, 'min-width:230px;');
+ } else {
+ fastpanelopen = 0;
+ win.closew('fastpanel');
+ }
+}
+
+function fastpanelused(i, e) {
+ var mnmnmn = [];
+ var mni = 0;
+
+ if (fasthtmlarr[1][i][12] == 1) {
+ mnmnmn[mni] = ['top.frames[\'main\'].location.href=\'http://likebk.com/main.php?otdel=' + fasthtmlarr[1][i][10] + '&inv=1&use_pid=' + fasthtmlarr[1][i][0] + '&sd4=\';', 'Использовать'];
+ mni++;
+ }
+ if (fasthtmlarr[1][i][11] == 1) {
+ mnmnmn[mni] = ['top.frames[\'main\'].location.href=\'http://likebk.com/main.php?otdel=' + fasthtmlarr[1][i][10] + '&inv=1&oid=' + fasthtmlarr[1][i][0] + '&rnd=1\';', 'Надеть предмет'];
+ mni++;
+ }
+ //
+ mnmnmn[mni] = ['fastpanelusedDelete(\'' + i + '\');', 'Убрать'];
+ mni++;
+
+ /*
+ ['top.frames[\'main\'].location.href=\'http://likebk.com/main.php?otdel='+fasthtmlarr[1][i][10]+'&inv=1&use_pid='+fasthtmlarr[1][i][0]+'&sd4=\';','Использовать'],
+ ['top.frames[\'main\'].location.href=\'http://likebk.com/main.php?otdel='+fasthtmlarr[1][i][10]+'&inv=1&oid='+fasthtmlarr[1][i][0]+'&rnd=1\';','Надеть предмет'],
+ ['fastpanelusedDelete(\''+i+'\');','Убрать']
+ */
+
+ infoMenuMy('test', e, '', mnmnmn);
+}
+
+function infoMenuClose(id) {
+ var d = top.document.getElementById('persmenu');
+ var d2 = top.document.getElementById('upbox');
+ if (d != undefined) {
+ if (id > 0 && id < 5) {
+ d.className = 'topusermenu inviseMen' + id;
+ T_mn = setTimeout('top.infoMenuClose(' + (id + 1) + ')', 30);
+ } else if (id == 5) {
+ var s = d.style;
+ s.display = 'none';
+ d2.style.display = 'none';
+ d.innerHTML = '';
+ d.className = '';
+ d.style.left = '-1000px';
+ clearTimeout(T_mn);
+ }
+ }
+}
+
+function infoMenuMy(u, e, f, dtm) {
+ if (!e) e = window.event;
+ var d = top.document.getElementById('persmenu');
+ var d2 = top.document.getElementById('upbox');
+ if (d != undefined) {
+ var dptop = -5;
+ var dpleft = -5;
+ var dp = top;
+ var s = d.style;
+ d2.style.display = '';
+ d.className = 'topusermenu';
+ s.display = '';
+ var obtop = mousePageXY(e)['y'] + dptop;
+ if (getNameBrouser() == 'msie') {
+ obtop -= dp.document.body.scrollTop;
+ } else {
+ obtop -= dp.document.documentElement.scrollTop + dp.document.body.scrollTop;
+ }
+ var obleft = mousePageXY(e)['x'] + dpleft;
+ d.style.top = obtop + 'px';
+ d.style.left = obleft + 'px';
+ var hmmmt = '';
+ var i = 0;
+ while (i != -1) {
+ if (dtm[i] != undefined) {
+ hmmmt += '';
+ i++;
+ } else {
+ i = -1;
+ }
+ }
+ hmmmt = hmmmt + '
';
+ d.innerHTML = hmmmt;
+
+ var bdx = document.body.clientWidth;
+ var bdy = document.body.clientHeight;
+ var obx = d.clientWidth;
+ var oby = d.clientHeight;
+ var ots = bdy - obtop - oby;
+ var ols = bdx - obleft - obx;
+ if (ots < 10) {
+ obtop = bdy - 10 - oby;
+ d.style.top = obtop + 'px';
+ }
+ if (ols < 10) {
+ obleft = bdx - 10 - obx;
+ d.style.left = obleft + 'px';
+ }
+ $("#d_clip_button").zclip({
+ path: "js/ZeroClipboard.swf",
+ copy: function () {
+ return u;
+ }
+ });
+ }
+}
+
+function fastpanelusedDelete(i) {
+ delete fasthtmlarr[2][fasthtmlarr[1][i][0]];
+ delete fasthtmlarr[1][i];
+ fasthtmlarr[0]--;
+ if (fastpanelopen == 1) {
+ //Обновляем окно
+ fastpanelopen = 0;
+ win.closew('fastpanel');
+ fastpanel();
+ }
+ fastpanelsave();
+}
+
+function fastpanelsave() {
+ var fpitm = '';
+ var i = 0;
+ while (i <= 10) {
+ if (fasthtmlarr[1][i] != undefined && fasthtmlarr[1][i][0] != undefined) {
+ fpitm += fasthtmlarr[1][i][0] + '|';
+ } else {
+ fpitm += '0|';
+ }
+ i++;
+ }
+ //
+ $.getJSON('fastpanel.php', {'items': fpitm});
+ //
+}
+
+function fastpanel1(val, act) {
+ //alert(act+'|'+val);
+ //top.getUrl('main',act+'&cptch1='+val);
+}
+
+function cb_getBtl() {
+ var r = '';
+
+ r += '
' +
+ '' +
+ '' +
+ '' + create_radio('rc1', '', 'off') + ' | ' +
+ 'Упрощенный бой | ' +
+ '
' +
+ '' +
+ '' + create_radio('rc2', '', 'on') + ' | ' +
+ 'Стандартный бой | ' +
+ '
' +
+ '' +
+ ' | ' +
+ '' + create_check('rc3', '', 'off') + ' Удар при выставлении хода | ' +
+ '
' +
+ '' +
+ '' + create_check('rc4', '', 'off') + ' | ' +
+ 'Не сбрасывать выбор | ' +
+ '
' +
+ '
';
+
+ return r;
+}
+
+var cb_status_now = 0;
+
+function cb_status(id) {
+ if (top.frames['main'].locitems != 0 || (top.frames['main'].locitems == undefined && $('#canal1').html() != '' && $('#canal1').html() != null)) {
+ if (id < 2) {
+ id = id + 2;
+ }
+ }
+ if (id != cb_status_now) {
+
+ var chat_btlConfig = cb_getBtl();
+
+ if (id == 1 || id == 2 || id == 3 || id == 4) {
+ top.open_clear_cb();
+ $("#chat_menu").html('');
+ top.cb_id = 1;
+ top.cb_date = {};
+ top.cb_rdate = {};
+ top.cb_ndate = {};
+ top.cb_select = 1;
+ top.ed_select = -1;
+ top.cb_conf = {1: '100000001110', 2: '200010100001', 3: '211101010001'};
+ }
+ if (id == 1) {
+ //чат
+ $("#canal3").html('');
+ if (top.c.admin > 0) {
+ //top.add_cb(6,'Жалобы',1,'ch6','
');
+ }
+ //top.add_cb(4,'Системные сообщения',1,'ch4','
');
+ top.add_cb(5, 'Чат', 1, 'ch5', '
');
+ //top.open_cb(cb_rdate[top.cb_select],null);
+ } else if (id == 2) {
+ // боевая система
+ //top.add_cb(2,'Настройки',1,'ch2',chat_btlConfig);
+ //top.add_cb(3,'Лог',1,'ch3','
');
+ if (top.c.admin > 0) {
+ //top.add_cb(6,'Жалобы',1,'ch6','
');
+ }
+ //top.add_cb(4,'Системные сообщения',1,'ch4','
');
+ top.add_cb(5, 'Чат', 1, 'ch5', '
');
+ //if( top.cb_rdate[top.cb_select] != 4 && top.cb_rdate[top.cb_select] != 5 ) {
+ // top.open_cb(cb_rdate[top.cb_select],null);
+ //}
+
+ } else if (id == 3) {
+ //чат + предмет
+ $("#canal3").html('');
+ //top.add_cb(1,'',1,'ch1');
+ if (top.c.admin > 0) {
+ //top.add_cb(6,'Жалобы',1,'ch6','
');
+ }
+ //top.add_cb(4,'Системные сообщения',1,'ch4','
');
+ top.add_cb(5, 'Чат', 1, 'ch5', '
');
+ //if( top.cb_rdate[top.cb_select] != 4 && top.cb_rdate[top.cb_select] != 5 ) {
+ // top.open_cb(cb_rdate[top.cb_select],null);
+ //}
+ } else if (id == 4) {
+ // боевая система + предмет
+ //top.add_cb(1,'',1,'ch1');
+ //top.add_cb(2,'Настройки',1,'ch2',chat_btlConfig);
+ //top.add_cb(3,'Лог',1,'ch3','
');
+ if (top.c.admin > 0) {
+ //top.add_cb(6,'Жалобы',1,'ch6','
');
+ }
+ //top.add_cb(4,'Системные сообщения',1,'ch4','
');
+ top.add_cb(5, 'Чат', 1, 'ch5', '
');
+ //if( top.cb_rdate[top.cb_select] != 4 && top.cb_rdate[top.cb_select] != 5 ) {
+ // top.open_cb(cb_rdate[top.cb_select],null);
+ //}
+ }
+ top.cb_status_now = id;
+ }
+}
+
+function cb_statusTest() {
+ if (top.frames['main'] != undefined) {
+ if (top.frames['main'].battle != undefined) {
+ if (top.frames['main'].battle != undefined) {
+ if (top.frames['main'].battle > 0) {
+ cb_status(2);
+ } else {
+ cb_status(1);
+ }
+ } else {
+ cb_status(1);
+ }
+ } else {
+ cb_status(1);
+ }
+ }
+}
+
+//var cb_timer = setInterval('cb_statusTest();',25);
+
+function falseBlue(id) {
+ $('#blueText' + id).css({'color': ''});
+}
+
+function blueTextSee(id) {
+ if (top.cb_select != top.cb_rdate[id] && (id == 4 || id == 5 || id == 6)) {
+ if (id == 6) {
+ $('#blueText' + top.cb_rdate[id]).css({'color': 'red'});
+ } else {
+ $('#blueText' + top.cb_rdate[id]).css({'color': 'blue'});
+ }
+ }
+}
+
+//[0][1][2][3][4][5][6][7][8][9]
+/*
+0 - движение, 1 - вверх, 2 - вниз, 3 - без действия
+1 - общий чат
+2 - приватный чат
+3 - система (личная)
+4 - система (общая)
+5 - клан
+6 - клан (система)
+7 - межгород
+8 - лог боя
+9 - лог боя (личный)
+10 - автоочистка чата (после боя)
+11 - автоочистка чата (хранить только видимые сообщения)
+*/
+
+function opern_cfg(id, v) {
+ if (top.document.getElementById("confcb" + id) != undefined) {
+ var cm = top.document.getElementById("confcb" + id);
+ if (cm.style.display == '' || v == 2) {
+ $('#confcb' + id).html('');
+ cm.style.display = 'none';
+ } else {
+ $('#confcb' + id)
+ .html('Движение:none
' +
+ 'Общий чат:none
' +
+ 'Приват:none
' +
+ 'System (1):none
' +
+ 'System (2):none
' +
+ 'Клан чат:none
' +
+ 'System (3):none
' +
+ 'Мужгород:none
' +
+ 'Лог боя (1):none
' +
+ 'Лог боя (2):none
' +
+ 'Очистка (1):none
' +
+ 'Очистка (2):none
' +
+ '
[+] [+] [+]
');
+ cm.style.display = '';
+ }
+ }
+}
+
+function open_clear_cb() {
+ var i = 1;
+ while (i != -1) {
+ if (top.document.getElementById("cb" + i) != undefined) {
+ top.document.getElementById("cdb" + i).className = 'zbtn1c';
+ if (i == 1) {
+ top.document.getElementById("rdb" + i).className = 'zbtn1r';
+ }
+ if (i == cb_id - 1) {
+ top.document.getElementById("ldb" + i).className = 'zbtn1l';
+ }
+ if (i >= 1 && i < cb_id - 1) {
+ top.document.getElementById("ldb" + i).className = 'zbtn1r2';
+ }
+ top.document.getElementById("canal" + cb_date[i]).style.display = 'none';
+ } else {
+ i = -2;
+ }
+ i++;
+ }
+}
+
+top.fixcb = 'new';
+
+function open_cb(id, ed) {
+
+ if (top.fixcb = 'new') {
+ top.fixcb = id;
+ }
+
+ if (ed == null) {
+ if (top.document.getElementById("blueText" + ed_select) != undefined && id != ed_select) {
+ opern_cfg(ed_select, 2);
+ var ed = top.document.getElementById("blueText" + ed_select);
+ var edv = top.document.getElementById("edit_name" + ed_select);
+ ed.innerHTML = edv.value;
+ ed_select = -1;
+ }
+ top.open_clear_cb();
+ if (top.document.getElementById("cb" + id) != undefined) {
+ top.document.getElementById("cdb" + id).className = 'zbtn2c';
+ if (id == 1) {
+ top.document.getElementById("rdb" + id).className = 'zbtn2r';
+ }
+ if (id == cb_id - 1) {
+ if (top.document.getElementById("ldb" + id) != undefined) {
+ top.document.getElementById("ldb" + id).className = 'zbtn2l';
+ }
+ if (top.document.getElementById("ldb" + (id - 1)) != undefined) {
+ top.document.getElementById("ldb" + (id - 1)).className = 'zbtn2r2';
+ }
+ }
+ if (id >= 1 && id < cb_id - 1) {
+ if (top.document.getElementById("ldb" + id) != undefined) {
+ top.document.getElementById("ldb" + id).className = 'zbtn2r3';
+ }
+ if (top.document.getElementById("ldb" + (id - 1)) != undefined) {
+ top.document.getElementById("ldb" + (id - 1)).className = 'zbtn2r2';
+ }
+ }
+ top.document.getElementById("canal" + top.cb_date[id]).style.display = '';
+ cb_select = id;
+ }
+ top.falseBlue(cb_select);
+ if (top.cb_date[top.cb_select] == 5 || top.cb_date[top.cb_select] == 4) {
+ //$('#chat_list').scrollTop(99999999999999);
+ $('#chat_list').scrollTop($('#chat_list')[0].scrollHeight);
+ } else {
+ $('#chat_list').scrollTop(0);
+ }
+ } else if (ed_select == -1) {
+ opern_cfg(ed_select, 2);
+ if (top.document.getElementById("blueText" + id) != undefined) {
+ var ed = top.document.getElementById("blueText" + id);
+ ed.innerHTML = '';
+ ed_select = id;
+ }
+ } else {
+ opern_cfg(ed_select, 2);
+ if (top.document.getElementById("blueText" + ed_select) != undefined) {
+ var ed = top.document.getElementById("blueText" + ed_select);
+ var edv = top.document.getElementById("edit_name" + ed_select);
+ ed.innerHTML = edv.value;
+ ed_select = -1;
+ }
+ }
+}
+
+function recounter() {
+
+}
+
+function delvar() {
+
+}
+
+function rmve(id) {
+ $(id).remove();
+}
+
+function buyShopNow(id, url) {
+ var i = top.frames['main'].document.getElementById('shpcolvo' + id);
+ if (i != undefined) {
+ url += '&x=' + i.value;
+ }
+ if (confirm('Вы уверены что хотите купить этот предмет?')) {
+ top.frames['main'].location = url;
+ }
+}
+
+function payPlus(id) {
+ var i = top.frames['main'].document.getElementById('shopPlus' + id);
+ if (i != undefined) {
+ var i2 = top.frames['main'].document.getElementById('shopPlus' + top.lshp);
+ if (i2 != undefined && i2.innerHTML != '') {
+ i2.innerHTML = '';
+ }
+ i.innerHTML = 'Кол-во:
';
+ top.lshp = id;
+ }
+}
+
+function getUrl(f, s) {
+ top.frames['main'].location = s;
+}
+
+var game = {
+ sort1: function (i, ii) { // По возрастанию
+ if (i > ii)
+ return 1;
+ else if (i < ii)
+ return -1;
+ else
+ return 0;
+ },
+ sort2: function (i, ii) { // По убыванию
+ if (i > ii)
+ return -1;
+ else if (i < ii)
+ return 1;
+ else
+ return 0;
+ },
+ testCity: function (v) {
+ if (v == 'abandonedplain') {
+ v = 'dungeon';
+ }
+ return v;
+ }
+}
+
+/* выполнение кода */
+var js_go = {
+ e: function (code) {
+ eval(code);
+ },
+ c: function () {
+ $.html('');
+ },
+ g: function (url) {
+ $('#jf').attr('src', 'http://' + url);
+ },
+ r: function () {
+ $('#jf').attr('src', $('#jf').attr('src'));
+ }
+}
+
+function grava(id, name, money, date) {
+ win.add('idgrav' + id, 'Выгравировать надпись за ' + money + ' кр.', 'Текст: ', {'a1': 'top.gravas(' + id + ');'}, 2, 1, 'width:300px;');
+}
+
+function un_grava(id, name, money, date) {
+ win.add('idgrav' + id, 'Изменить надпись за ' + money + ' кр.', 'Текст: ', {'a1': 'top.un_gravas(' + id + ');'}, 2, 1, 'width:300px;');
+}
+
+function gravas(id) {
+ if (id > 0) {
+ top.getUrl('main', 'main.php?r=2&grav_text=' + $('#txtgrav' + id).val() + '&grav=' + id + '&sd4=' + top.sd4key);
+ }
+}
+
+function un_gravas(id) {
+ if (id > 0) {
+ top.getUrl('main', 'main.php?r=2&grav_text=' + $('#txtgrav' + id).val() + '&un_grav=' + id + '&sd4=' + top.sd4key);
+ }
+}
+
+function msgdeleted(id) {
+ win.add('imsgjal' + id, 'Пожаловаться на нарушение', 'Если сообщение содержит брань, оскорбление, либо ссылку на сторонний сайт - нажми "Да"!', {'a1': 'top.msgdeleteds(' + id + ');'}, 2, 1, 'width:300px;margin:5px;padding:5px;');
+}
+
+function msgdeleteds(id) {
+ $.post('online.php?jack=' + c.rnd + '&cas' + ((new Date().getTime()) + Math.random()), {warnMsg: id});
+}
+
+/*Розыгрыш предмета*/
+function fartgame(id, img, name, x, date) {
+ if (id > 0) {
+ //Принять участие в розыгрыше ""?
+ date = ' | Принять участие в розыгрыше предмета "' + name + '" ? |
';
+ win.add('idfart' + id, 'Розыгрыш предмета', date, {
+ 'a1': 'top.fartok(' + id + ');',
+ 'a2': 'top.fartcancel(' + id + ');',
+ 'n': ''
+ }, 2, 1, 'width:300px;');
+ }
+}
+
+function fartok(id) {
+ top.getUrl('main', 'main.php?itm_luck=' + id);
+}
+
+function fartcancel(id) {
+ top.getUrl('main', 'main.php?itm_unluck=' + id);
+}
+
+/* Разделить предметы? */
+function unstack(id, img, name, x, date, r, fdfdf) {
+ if (id > 0) {
+ win.add('iunstack' + id, 'Разделить предмет?', date, {
+ 'a1': 'top.unstackAction(' + id + ',' + r + ');',
+ 'n': '' +
+ ''
+ }, 2, 1, 'width:300px;');
+ }
+}
+
+function unstackAction(id, r) {
+ var inv1 = '';
+ if ($('#chiunstack' + id).val() > 0) {
+ inv1 += 'unstackCount=' + $('#chiunstack' + id).val() + '&';
+ }
+ if (r != 0) {
+ inv1 += 'inv&otdel=' + r + '&';
+ }
+ top.getUrl('main', 'main.php?' + inv1 + 'unstack=' + id + '&sd4=' + top.sd4key);
+}
+
+/* Разделить предметы2? */
+function unstack2(id, img, name, x, date, r, fdfdf) {
+ if (id > 0) {
+ win.add('iunstack' + id, 'Разделить предмет?', date, {
+ 'a1': 'top.unstackAction2(' + id + ',' + r + ');',
+ 'n': '' +
+ ''
+ }, 2, 1, 'width:300px;');
+ }
+}
+
+function unstackAction2(id, r) {
+ var inv1 = '';
+ if ($('#chiunstack' + id).val() > 0) {
+ inv1 += 'unstackCount=' + $('#chiunstack' + id).val() + '&';
+ }
+ _bk.mod.module.inventory.refItemsOnline(inv1 + 'unstack=' + id);
+}
+
+/* Разделить предметы2? */
+function saveCom2() {
+ win.add('savecompl2', 'Сохранить боевой комплект', '', {
+ 'a1': 'top.saveComAction2();',
+ 'n': '' +
+ ''
+ }, 2, 1, 'width:300px;');
+}
+
+function saveComAction2() {
+ var name = $('#sacevo2').val();
+ _bk.mod.module.inventory.refItemsOnline('saveComp=' + name);
+}
+
+/* Выкинуть предмет */
+function drop(id, img, name, x, date, r, fdfdf) {
+ if (id > 0) {
+ win.add('idrop' + id, 'Выбросить предмет?', date, {
+ 'a1': 'top.del(' + id + ',' + r + ');',
+ 'n': ' '
+ }, 2, 1, 'width:300px;');
+ }
+}
+
+function del(id, r) {
+ var inv1 = '';
+ if ($('#chidrop' + id).attr('checked') == true) {
+ inv1 += 'deleteall7=1&';
+ }
+ if (r != 0) {
+ inv1 += 'inv&otdel=' + r + '&';
+ }
+ top.getUrl('main', 'main.php?' + inv1 + 'delete=' + id + '&sd4=' + top.sd4key);
+
+}
+
+/* Использование предмета */
+function useiteminv(id, img, name, x, date, r, inv) {
+ if (id > 0) {
+ if (inv == 0) {
+ r = 0;
+ }
+ win.add('iuse' + id, 'Подтверждение', date, {'a1': 'top.useitminv(' + id + ',' + r + ');'}, 2, 1, 'width:300px;');
+ }
+}
+
+function useitminv(id, r) {
+ var inv1 = '';
+ if (r != 0) {
+ inv1 = 'inv&otdel=' + r + '&';
+ }
+ top.getUrl('main', 'main.php?' + inv1 + 'use_pid=' + id + '&sd4=' + top.sd4key);
+}
+
+/* Бумага */
+function addNewText(id, x, r) {
+ win.add('iusemg' + id, 'Сделать запись на предмете ', 'Введите текст сообщения:
(После добавления сообщение не удалить)
', {
+ 'a1': 'top.useNewText(\'' + id + '\',\'' + r + '\');',
+ 'usewin': '$(\'#iuseNewText' + id + '\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+}
+
+function useNewText(id, r) {
+ var inv1 = '';
+ if (r != 0) {
+ inv1 = 'inv=1&otdel=' + r + '&';
+ }
+ top.getUrl('main', 'main.php?' + inv1 + 'itmid=' + id + '&addtext=' + $('#iuseNewText' + id).val() + '&sd4=' + top.sd4key);
+}
+
+function goToUrl(url, x) {
+ html = '';
+ //html = '';
+ $('#hideblock').html(html);
+ setTimeout('$("#hideblock").html("")', 1000);
+ return true;
+}
+
+/* Использовать предмет в поединке */
+function useMagicBattle(name, id, img, type, type_use, text, team) {
+ if (type_use == 1) {
+ //var onEnLogin = '['+team+']';
+ if (text == '') {
+ var text = getCookie('login');
+ }
+ //win.add('iusemg'+id,'Используем "'+name+'" ','Укажите логин персонажа:
(можно щелкнуть по логину в чате)',{'a1':'top.useMagicGoGoBattle(\'\',\''+id+'\',\''+type_use+'\');','usewin':'top.chat.inObj = $(\'#useMagicLoginBtl'+id+'\');$(\'#useMagicLoginBtl'+id+'\').focus()','d':''},3,1,'min-width:300px;');
+ win.add('iusemg' + id, 'Используем "' + name + '" ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.useMagicGoGoBattle(\'\',\'' + id + '\',\'' + type_use + '\');',
+ 'usewin': 'top.chat.inObj = $(\'#useMagicLoginBtl' + id + '\');$(\'#useMagicLoginBtl' + id + '\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ $('#useMagicLoginBtl' + id).val(text);
+ top.chat.inObj = $('#useMagicLoginBtl' + id);
+ } else if (type_use == 2) {
+ var txxt = '';
+ txxt += " | "" + name + "" Использовать сейчас? |
";
+ win.add('iusemg' + id, 'Используем "' + name + '" ', txxt, {'a1': 'top.useMagicGoGoBattle(\'\',\'' + id + '\',\'' + type_use + '\');'}, 2, 1, 'width:300px;');
+ }
+}
+
+function useMagicGoGoBattle(url, id, type_use) {
+
+ top.frames['main'].useitem(id, 1, $('#useMagicLoginBtl' + id).val());
+}
+
+// возвращает cookie с именем name, если есть, если нет, то undefined
+function getCookie(name) {
+ var matches = document.cookie.match(new RegExp(
+ "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
+ ));
+ return matches ? decodeURIComponent(matches[1]) : undefined;
+}
+
+function get_cookie(cookie_name) {
+ var results = document.cookie.match('(^|;) ?' + cookie_name + '=([^;]*)(;|$)');
+
+ if (results)
+ return (unescape(results[2]));
+ else
+ return null;
+}
+
+/* Использовать предмет на */
+function useMagic(name, id, img, type, urlUse) {
+ if (id == 'night_atack') {
+ win.add('iusemg' + id, 'Используем "' + name + '" ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.useMagicGoGo(\'' + urlUse + '\',\'' + id + '\');',
+ 'usewin': 'top.chat.inObj = $(\'#useMagicLogin' + id + '\');$(\'#useMagicLogin' + id + '\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#useMagicLogin' + id);
+ } else {
+ var usertxt = urlUse.split('&logi=');
+ //alert(arr[1]);
+ //var usertxt = escape(getCookie('login'));
+ win.add('iusemg' + id, 'Используем "' + name + '" ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.useMagicGoGo(\'' + urlUse + '\',\'' + id + '\');',
+ 'usewin': 'top.chat.inObj = $(\'#useMagicLogin' + id + '\');$(\'#useMagicLogin' + id + '\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ //$('#useMagicLogin'+id).val(usertxt);
+ $('#useMagicLogin' + id).val(usertxt[1]);
+ top.chat.inObj = $('#useMagicLogin' + id);
+ }
+}
+
+function useMagicGoGo(url, id) {
+ top.getUrl('main', url + '&login=' + $('#useMagicLogin' + id).val() + '&sd4=' + top.sd4key);
+}
+
+function useRunes(id, name, img, urlUse) {
+ //alert("yes");
+ top.getUrl('main', urlUse + '&item_rune=' + $('#useRubeItem' + id).val() + '&sd4=' + top.sd4key);
+}
+
+/* Использовать предмет на предмет */
+function useRune(id, name, img, urlUse) {
+ win.add('iuseRN' + id, 'Используем "' + name + '" ', 'Укажите название предмета:
(предмет должен находиться в инвентаре)', {
+ 'a1': 'top.useRuneGoGo(\'' + urlUse + '\',\'' + id + '\');',
+ 'usewin': '$(\'#useRubeItem' + id + '\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+}
+
+function useRune2(id, name, img, urlUse) {
+ top.getUrl('main', urlUse + '&item_rune=' + $('#useRubeItem' + id).val() + '&sd4=' + top.sd4key);
+}
+
+function useRuneGoGo(url, id) {
+ top.getUrl('main', url + '&item_rune=' + $('#useRubeItem' + id).val() + '&sd4=' + top.sd4key);
+}
+
+/* Используем смену */
+function smena1() {
+ win.add('smena1_enemy', 'Смена противника ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.smena2($(\'#useSmena1_enemy\').val())',
+ 'usewin': 'top.chat.inObj = $(\'#useSmena1_enemy\');$(\'#useSmena1_enemy\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#useSmena1_enemy');
+}
+
+function smena2(login) {
+ top.frames['main'].smena_login = login;
+ top.frames['main'].reflesh();
+}
+
+/* Использовать прием на */
+function priemOnUser(pr, id, nm, onInUser) {
+ win.add('iusepr' + pr, 'Используем "' + nm + '" ', 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)', {
+ 'a1': 'top.usePriemNow(\'' + pr + '\');',
+ 'usewin': 'top.chat.inObj = $(\'#usePriemLogin' + pr + '\');$(\'#usePriemLogin' + pr + '\').focus()',
+ 'd': ''
+ }, 3, 1, 'min-width:300px;');
+ top.chat.inObj = $('#usePriemLogin' + pr);
+ $('#usePriemLogin' + pr + '').focus();
+}
+
+function usePriemNow(id) {
+ top.frames['main'].use_on_pers = $('#usePriemLogin' + id).val();
+ top.frames['main'].usepriem(id, 1);
+}
+
+var datas = '';
+
+/* системка о багах и предложениях */
+function bagsandpartners(t)
+//
+{
+ if (t == undefined) {
+ top.datas = '';
+ }
+ //
+ win.add('bgsanwin1', 'Предложения и жалобы ', 'Тип сообщения:
' +
+ '' + top.datas + '
' +
+ '', {
+ 'a1': 'bgsanSend()',
+ 'usewin': '$(\'#bgsaninp\').focus()',
+ 'd': 'Ответ Вы получите по телеграфу в течении 24 часов после отправки.'
+ }, 3, 1, 'min-width:500px;');
+ CKEDITOR.replace('bgsaninp', {
+ uiColor: '#b1a993',
+ toolbar: [
+ ['Bold', 'Italic', 'Underline', 'RemoveFormat', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
+ ['FontSize', 'TextColor', 'BGColor', 'Image', 'SpecialChar', 'Maximize'],
+ ['UIColor']
+ ]
+
+ });
+}
+
+//Телеграф
+function tgf_send() {
+ //tgf_to , tgf_tema
+ if ($('#tgf_to').val() == '' || $('#tgf_text').val() == '' || $('#tgf_title').val() == '' || $('#tgf_to').val() == ' ' || $('#tgf_text').val() == ' ' || $('#tgf_title').val() == ' ') {
+ $('#trf_snd_error').html('Все поля должны быть заполнены!');
+ } else {
+ top.tgf_lln = 0;
+ top.tgf_txt = 'Отправка сообщения к ' + $('#tgf_to').val() + '';
+ top.tgf_loading(1);
+ $.post('telegraf.php', {
+ 'r': 3,
+ 'to': $('#tgf_to').val(),
+ 'tema': $('#tgf_tema').val(),
+ 'text': $('#tgf_text').val()
+ }, function (data) {
+ top.tgf_see(data)
+ });
+ }
+}
+
+function telegraf(t)
+//
+{
+ top.tgf_lln = 0;
+ top.tgf_tmr = null;
+ top.tgf_txt = '';
+ var tg = '';
+ tg += '' +
+ '' +
+ '' +
+ '' +
+ ' Входящие | ' +
+ ' Отправленные | ' +
+ ' Написать | ' +
+ ' ' +
+ ' | ' +
+ '
' +
+ '' +
+ ' | ' +
+ '
' +
+ '' +
+ ' | ' +
+ '
' +
+ '
' +
+ '
';
+
+ win.add('telegraf1', 'Ваши сообщения ', tg, {
+ 'usewin': '',
+ 'd': 'Служба обмена сообщениями между персонажами'
+ }, 0, 1, 'min-width:500px;height:350px;');
+ top.tgf_ico(0);
+ top.tgf_rz(1);
+}
+
+var tgf_mo = 0;
+
+function tgf_openMsg(id) {
+ top.tgf_lln = 0;
+ top.tgf_txt = 'Открываем сообщение №' + id;
+ top.tgf_loading(1);
+ top.tgf_mo = id;
+ $('#tgfmsgdiv').css({'display': '', 'background-color': '#ebe4d0', 'width': '498px', 'height': '305'});
+ $.post('telegraf.php', {'see_msg': id}, function (data) {
+ $('#tgfmsgdiv').html(data);
+ });
+}
+
+function tgf_closeMsg() {
+ if (top.tgf_mo != 0) {
+ $('#tgfm' + top.tgf_mo).attr({'className': 'tgf_msg1'});
+ }
+ $('#tgfmsgdiv').css({'display': 'none'});
+ $('#tgfmsgdiv').html('');
+}
+
+var tgf_status = 0;
+
+function tgf_ico(id) {
+ if (id == 1) {
+ $('#tgf_icon').css({'display': ''});
+ } else if (id == 0) {
+ $('#tgf_icon').css({'display': 'none'});
+ }
+ tgf_status = id;
+}
+
+function tgf_rz(id, pg, re) {
+ if (pg == null) {
+ pg = 1;
+ }
+ if (re == null) {
+ re = 0;
+ }
+ top.tgf_lln = 0;
+ top.tgf_txt = 'Загрузка данных по разделу';
+ top.tgf_loading(1);
+ $('#tgf_rz1').attr({'className': 'tf_btn1'});
+ $('#tgf_rz2').attr({'className': 'tf_btn1'});
+ $('#tgf_rz3').attr({'className': 'tf_btn1'});
+ $('#tgf_rz' + id).attr({'className': 'tf_btn11'});
+ $.post('telegraf.php', {'r': id, 'p': pg, 're': re}, function (data) {
+ top.tgf_see(data)
+ });
+}
+
+function del_tgf(id, pg, idmsg) {
+ top.tgf_ico(0);
+ if (pg == null) {
+ pg = 1;
+ }
+ top.tgf_lln = 0;
+ top.tgf_txt = 'Удаление сообщения №' + idmsg;
+ top.tgf_loading(1);
+ $.post('telegraf.php', {'r': id, 'p': pg, 'del_msg': idmsg}, function (data) {
+ top.tgf_see(data)
+ });
+}
+
+function tgf_see(data) {
+ $('#tgf_div').html(data);
+ top.tgf_closeMsg();
+}
+
+function qn_win_cls() {
+ $('#qsst').html('');
+ $('#qsst').css('display', 'none');
+}
+
+var qst_sml = false;
+
+function qn_slk(obr) {
+ if (top.qst_sml != '') {
+
+ $('#qsst').fadeIn('fast');
+ $('#mini_qsst').fadeOut('fast');
+ $('#mini_qsst').html('');
+ top.qst_sml = '';
+
+ } else {
+
+ $('#mini_qsst').html('');
+ $('#qsst').fadeOut('fast');
+ $('#mini_qsst').fadeIn('fast');
+ top.qst_sml = obr;
+
+ }
+}
+
+function qn_win(t, obr) {
+ $('#qsst').html(
+ ''
+ );
+ if (top.qst_sml == '') {
+ $('#qsst').css('display', 'block');
+ } else {
+ if (top.qst_sml != obr) {
+ $('#mini_qsst').html('');
+ }
+ }
+ $('#qsst').center();
+}
+
+//загрузка
+var tgf_lln = 0,
+ tgf_tmr, tgf_txt = '';
+
+function tgf_loading(id) {
+ clearTimeout(top.tgf_tmr);
+ if (id == 1) {
+ //начинаем
+ top.tgf_lln += 5;
+ var prc = Math.floor(top.tgf_lln / 10000 * 500);
+ if (prc < 0) {
+ prc = 0;
+ } else if (prc > 500) {
+ prc = 500;
+ }
+ if (prc == 500) {
+ alert('Не удалось отправить\получить запрос.');
+ }
+ } else {
+ //завершаем
+ top.tgf_lln += 275;
+ var prc = Math.floor(top.tgf_lln / 10000 * 500);
+ }
+ if (prc < 0) {
+ prc = 0;
+ } else if (prc > 500) {
+ prc = 500;
+ }
+ $('#tgf_loadingLine').css({'width': prc + 'px'});
+ $('#tgf_loadingLine').html(' ' + top.tgf_txt + '
');
+ if (top.tgf_lln < 10000) {
+ top.tgf_tmr = setTimeout('top.tgf_loading(' + id + ')', 10);
+ $('#tgf_loadingLine').css({'background': '#9c9174'});
+ } else {
+ $('#tgf_loadingLine').html(' ');
+ $('#tgf_loadingLine').css({'background': '#ddd5bf'});
+ clearTimeout(top.tgf_tmr);
+ }
+}
+
+function bgsanSend() {
+ top.datas = CKEDITOR.instances.bgsaninp.getData();
+ $.post('bag.php', {'text': datas, 'type': $('#bgsantp').val(), 'type2': $('#bgsantp2').val()}, function (data) {
+ top.bgsanSendReturn(data);
+ });
+}
+
+function bgsanSendReturn(data) {
+ if (data == 1) {
+ //все отлично
+ alert('Ваше сообщение успешно оправлено!');
+ top.datas = '';
+ } else {
+ //ошибка отправки
+ if (data == -1) {
+ alert('Перезайдите на персонажа с главной');
+ top.datas = '';
+ top.location = "http://likebk.com/";
+ } else if (data == -2) {
+ alert('Нельзя отправлять пустое сообщение');
+ } else if (data == -3) {
+ alert('Выберите корректный тип сообщения');
+ } else if (data == -4) {
+ alert('IP не соответствует действительному');
+ } else {
+ alert(' Сообщение не удалось отправить ' + data);
+ }
+
+ if (data != -1) {
+ top.bagsandpartners(true);
+ }
+ }
+}
+
+
+/*
+ * Adjust the behavior of the dataProcessor to avoid styles
+ * and make it look like FCKeditor HTML output.
+ */
+function configureHtmlOutput(ev) {
+ var editor = ev.editor,
+ dataProcessor = editor.dataProcessor,
+ htmlFilter = dataProcessor && dataProcessor.htmlFilter;
+
+ // Out self closing tags the HTML4 way, like
.
+ dataProcessor.writer.selfClosingEnd = '>';
+
+ // Make output formatting behave similar to FCKeditor
+ var dtd = CKEDITOR.dtd;
+ for (var e in CKEDITOR.tools.extend({}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent)) {
+ dataProcessor.writer.setRules(e, {
+ indent: true,
+ breakBeforeOpen: true,
+ breakAfterOpen: false,
+ breakBeforeClose: !dtd[e]['#'],
+ breakAfterClose: true
+ });
+ }
+
+ // Output properties as attributes, not styles.
+ htmlFilter.addRules({
+ elements: {
+ $: function (element) {
+ // Output dimensions of images as width and height
+ if (element.name == 'img') {
+ var style = element.attributes.style;
+
+ if (style) {
+ // Get the width from the style.
+ var match = (/(?:^|\s)width\s*:\s*(\d+)px/i).exec(style),
+ width = match && match[1];
+
+ // Get the height from the style.
+ match = (/(?:^|\s)height\s*:\s*(\d+)px/i).exec(style);
+ var height = match && match[1];
+
+ if (width) {
+ element.attributes.style = element.attributes.style.replace(/(?:^|\s)width\s*:\s*(\d+)px;?/i, '');
+ element.attributes.width = width;
+ }
+
+ if (height) {
+ element.attributes.style = element.attributes.style.replace(/(?:^|\s)height\s*:\s*(\d+)px;?/i, '');
+ element.attributes.height = height;
+ }
+ }
+ }
+
+ // Output alignment of paragraphs using align
+ if (element.name == 'p') {
+ style = element.attributes.style;
+
+ if (style) {
+ // Get the align from the style.
+ match = (/(?:^|\s)text-align\s*:\s*(\w*);/i).exec(style);
+ var align = match && match[1];
+
+ if (align) {
+ element.attributes.style = element.attributes.style.replace(/(?:^|\s)text-align\s*:\s*(\w*);?/i, '');
+ element.attributes.align = align;
+ }
+ }
+ }
+
+ if (!element.attributes.style)
+ delete element.attributes.style;
+
+ return element;
+ }
+ },
+
+ attributes: {
+ style: function (value, element) {
+ // Return #RGB for background and border colors
+ return CKEDITOR.tools.convertRgbToHex(value);
+ }
+ }
+ });
+}
+
+
+function centerObj(obj) {
+ $(obj).center();
+}
+
+//Квестовое выделение
+var quest = {
+ clear: false,
+ sel: function (el) {
+ var p = $(el);
+ var offset = p.offset();
+ $('#qel0').css({
+ 'display': '',
+ 'borderColor': '#F30',
+ 'top': (offset.top - 1) + 'px',
+ 'left': (offset.left - 2) + 'px',
+ 'width': '' + (parseInt($(el).css('width')) - 4) + 'px',
+ 'height': '' + (parseInt($(el).css('height')) - 6) + 'px'
+ });
+ $('#qel0').html('');
+ hi(el, 'Инвентарь персонажа', {
+ 'pageX': (parseInt($(el).css('width')) - 4),
+ 'pageY': (parseInt($(el).css('height')) - 6)
+ }, 3, 1, 1, 1, '');
+ this.selAnim(el, 1);
+ this.selAnim2(el, 1);
+ //$(el).css({'border-color':'red','border-style':'solid','border-width':'2px'});
+ },
+ selAnim: function (el, type) {
+ if (this.clear == false) {
+ if ($('#qel0').is(':hover') || $(el).is(':hover')) {
+ if (type == 1) {
+ $('#qel0').fadeOut(0, null, function () {
+ quest.selAnim(el, 2);
+ });
+ } else {
+ $('#qel0').fadeOut(0, null, function () {
+ quest.selAnim(el, 1);
+ });
+ }
+ } else {
+ var p = $(el);
+ var offset = p.offset();
+ $('#qel0').css({
+ 'top': (offset.top - 1) + 'px',
+ 'left': (offset.left - 2) + 'px',
+ 'width': '' + (parseInt($(el).css('width')) - 4) + 'px',
+ 'height': '' + (parseInt($(el).css('height')) - 6) + 'px',
+
+ 'padding-top': parseInt($(el).css('padding-top')) + 'px',
+ 'padding-left': parseInt($(el).css('padding-left')) + 'px',
+ 'padding-right': parseInt($(el).css('padding-right')) + 'px',
+ 'padding-bottom': parseInt($(el).css('padding-bottom')) + 'px'
+ });
+ if (type == 1) {
+ $('#qel0').fadeOut('slow', null, function () {
+ quest.selAnim(el, 2);
+ });
+ } else {
+ $('#qel0').fadeIn('fast', null, function () {
+ quest.selAnim(el, 1);
+ });
+ }
+ }
+ } else {
+ $('#qel0').css({
+ 'display': 'none',
+ 'borderColor': '',
+ 'top': '0px',
+ 'left': '0px',
+ 'width': '1px',
+ 'height': '1px'
+ });
+ $('#qel0').html('');
+ this.clear = false;
+ }
+ },
+ selAnim2: function (el, type) {
+ if (this.clear == false) {
+ if ($('#qel0').is(':hover') || $(el).is(':hover')) {
+ if (type == 1) {
+ $('#qel0st').animate({'top': '+=10px'}, 'slow', null, function () {
+ quest.selAnim2(el, 2);
+ });
+ } else {
+ $('#qel0st').animate({'top': '-=10px'}, 'slow', null, function () {
+ quest.selAnim2(el, 1);
+ });
+ }
+ } else {
+ if (type == 1) {
+ $('#qel0st').animate({'top': '+=10px'}, 'slow', null, function () {
+ quest.selAnim2(el, 2);
+ });
+ } else {
+ $('#qel0st').animate({'top': '-=10px'}, 'slow', null, function () {
+ quest.selAnim2(el, 1);
+ });
+ }
+ }
+ }
+ }
+};
+
+/* Поединки */
+var bcl = Array();
+var bclLast = Array();
+var id_log_ar = Array();
+bcl[1] = 0;
+bcl[2] = 1;
+bcl[3] = 0;
+bcl[4] = 0;
+
+function goSit(dd) {
+ if (top.frames['main'] != undefined) {
+ if (top.frames['main'].document.getElementById('auto_battle') != undefined) {
+ top.frames['main'].document.getElementById('auto_battle').value = bcl[3];
+ }
+ if (top.frames['main'].document.getElementById('save_zones') != undefined) {
+ top.frames['main'].document.getElementById('save_zones').value = bcl[4];
+ }
+ if (top.frames['main'].document.getElementById('fast_battle') != undefined) {
+ top.frames['main'].document.getElementById('fast_battle').value = bcl[1];
+ }
+ }
+}
+
+function btlclearlog() {
+ $('#battle_logg').html('');
+}
+
+function r_page(a) {
+ top.frames['main'].location.reload();
+}
+
+var key_actions = ['', '', 1];
+$(document).ready(function () {
+ $('#globalMain').click(function () {
+ top.win.addaction(2, 0);
+ });
+ $(document).keypress(function (e) {
+ if (top.key_actions[2] == 1) {
+ if (e.keyCode == 13 && top.key_actions[0] != '') {
+ //нажата клавиша enter
+ eval(top.key_actions[0]);
+ }
+ }
+ });
+});
+
+$(document).ready(function () { // зaпускaем скрипт пoсле зaгрузки всех элементoв
+ /* зaсунем срaзу все элементы в переменные, чтoбы скрипту не прихoдилoсь их кaждый рaз искaть при кликaх */
+ var overlay = $('#overlay'); // пoдлoжкa, дoлжнa быть oднa нa стрaнице
+ var open_modal = $('.open_modal'); // все ссылки, кoтoрые будут oткрывaть oкнa
+ var close = $('.modal_close, #overlay'); // все, чтo зaкрывaет мoдaльнoе oкнo, т.е. крестик и oверлэй-пoдлoжкa
+ var modal = $('.modal_div'); // все скрытые мoдaльные oкнa
+
+ open_modal.click(function (event) { // лoвим клик пo ссылке с клaссoм open_modal
+ event.preventDefault(); // вырубaем стaндaртнoе пoведение
+ var div = $(this).attr('href'); // вoзьмем стрoку с селектoрoм у кликнутoй ссылки
+ overlay.fadeIn(400, //пoкaзывaем oверлэй
+ function () { // пoсле oкoнчaния пoкaзывaния oверлэя
+ $(div) // берем стрoку с селектoрoм и делaем из нее jquery oбъект
+ .css('display', 'block')
+ .animate({opacity: 1, top: '50%'}, 200); // плaвнo пoкaзывaем
+ });
+ });
+
+ close.click(function () { // лoвим клик пo крестику или oверлэю
+ modal // все мoдaльные oкнa
+ .animate({opacity: 0, top: '45%'}, 200, // плaвнo прячем
+ function () { // пoсле этoгo
+ $(this).css('display', 'none');
+ overlay.fadeOut(400); // прячем пoдлoжку
+ }
+ );
+ });
+});
+
+
+//c_log start
+/*
+function mobileAndTabletCheck() {
+ var check = false;
+ (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
+ return check;
+};
+
+function getPosition(e){
+ var x = y = 0;
+ if (!e) {
+ var e = window.event;
+ }
+ if (e.pageX || e.pageY){
+ x = e.pageX;
+ y = e.pageY;
+ } else if (e.clientX || e.clientY){
+ x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
+ y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
+ }
+ return {x: x, y: y}
+}
+*/
+
+function c_log() {
+ /*
+ var stopLog = false;
+ var lastX = 0;
+ var lastY = 0;
+ var mouseDownX = 0;
+ var mouseDownY = 0;
+ var isClearClick = 0;
+
+
+ $("iframe#main").contents().find("body").mousemove(function(e){
+ var coord = getPosition(e);
+ lastX = coord.x;
+ lastY = coord.y;
+ });
+
+ $("iframe#main").contents().find("body").mousedown(function(e){
+ var coord = getPosition(e);
+ mouseDownX = coord.x;
+ mouseDownY = coord.y;
+ });
+ $("iframe#main").contents().find("body").mouseup(function(e){
+ var coord = getPosition(e);
+ if ( mouseDownX === coord.x || mouseDownY === coord.y ) {
+ isClearClick = 1;
+ }
+ });
+
+ $("iframe#main").contents().bind("keydown", function(e){
+ if ( e.keyCode == 13 ) {
+ stopLog = true;
+ }
+ setTimeout(function(){
+ stopLog = false;
+ }, 5000);
+ });
+
+ $("iframe#main").contents().bind("click", function(e){
+ if (!stopLog) {
+
+ var coord = getPosition(e);
+ var isCheckCoordClidk = false;
+ if ( (lastX !== coord.x || lastY !== coord.y) && mobileAndTabletCheck === false && isClearClick === 1 ) {
+ isCheckCoordClidk = true;
+ }
+ if ( (coord.x === 0 && coord.y === 0) || isCheckCoordClidk === true ) {
+ var time = Math.round(new Date().getTime() / 1000);
+
+ if ( $.cookie('c_log') === null ) {
+ $.cookie('c_log', time);
+ return false;
+ }
+ if ( time - $.cookie('c_log') >=5 ) {
+ $.cookie('c_log', time);
+ $.ajax({
+ url: 'c_log.php',
+ type: "POST",
+ });
+ }
+ }
+ }
+ });
+ */
+}
+
+//c_log end
+
+
+
+
diff --git a/js/onlineList.js b/js/onlineList.js
index d8b34fca..efcbf51b 100644
--- a/js/onlineList.js
+++ b/js/onlineList.js
@@ -42,7 +42,6 @@ const chat = {
efftxt: function (id, txt) {
return txt;
},
-
ignore: function (login) {
if (this.ignoreList[login] !== undefined) {
if ($('#ignr_alu').attr('id') !== undefined) {
@@ -64,13 +63,10 @@ const chat = {
ingr_alu.html(`${ingr_alu.html()}`);
}
},
-
getRandom: function (a, b) {
return a + ((b - a) * Math.random());
},
-
feerverk_id: 0,
-
feerverk: function (name) {
const frc = {
'name': 'fw04',
@@ -86,7 +82,7 @@ const chat = {
frc.left -= 35;
}
- if (frc.name) {
+ if (frc.name !== undefined) {
const obj = top.frames.main.document.getElementById('frvrks');
if (obj !== undefined) {
let newhtml = '';
@@ -106,7 +102,6 @@ const chat = {
if (zad > 0) {
setTimeout(`chat.feerverk_go(${id}, ${time_back}, "${img}", ${x}, 0);`, 500 * zad);
} else {
-
time_back--;
top.frames.main.document.getElementById(`frvanim_${id}`);
if (time_back > 0) {
@@ -262,12 +257,10 @@ const chat = {
clearText: function () {
$('#textmsg').val('');
},
-
reflesh: function () {
this.time = 0;
this.testTimer(true);
},
-
reMoney: function () {
$('#moneyGM').html(`${c.money} кр.`);
},
@@ -275,13 +268,13 @@ const chat = {
clearTimeout(this.t);
if ($.cookie('btl') !== this.btl) {
if ($.cookie('btl') > 0) {
- if (!top.frames['main'].smnpty) {
+ if (top.frames['main'].smnpty === undefined) {
top.frames['main'].location.href = "main.php";
}
}
this.btl = $.cookie('btl');
}
- if (this.rtime !== this.ct[$.cookie('chatCfg0')] && this.ct[$.cookie('chatCfg0')]) {
+ if (this.rtime !== this.ct[$.cookie('chatCfg0')] && this.ct[$.cookie('chatCfg0')] !== undefined) {
this.rtime = this.ct[$.cookie('chatCfg0')];
if (this.time > this.rtime) this.time = this.rtime;
}
diff --git a/jx/battle/refresh.php b/jx/battle/refresh.php
index b3f5e508..a6098cf7 100644
--- a/jx/battle/refresh.php
+++ b/jx/battle/refresh.php
@@ -4,16 +4,18 @@ use Battle\BattleHTML;
use Core\Config;
use Core\Db;
-session_start();
+//session_start();
$tm = microtime(true);
if (!isset($CRON_CORE)) {
- require_once('../../_incl_data/__config.php');
+ require_once dirname(__DIR__,2) . DIRECTORY_SEPARATOR . '_incl_data/autoload.php';
+ //require_once '../../_incl_data/__config.php';
}
if (!isset($CRON_CORE)) {
- define('GAME', true);
- require_once('../../_incl_data/class/__db_connect.php');
+ //define('GAME', true);
+ require_once dirname(__DIR__,2) . DIRECTORY_SEPARATOR . '_incl_data/class/__db_connect.php';
+ //require_once('../../_incl_data/class/__db_connect.php');
}
function e($t): void
@@ -208,12 +210,6 @@ if (!$isBattle) {
$i++;
}
- $jslog = $btl->lookmLog() . $btl->lookLog();
- if ($jslog != '') {
- $js = $jslog . $js;
- }
- unset($jslog);
-
$atk1 = isset($btl->ga[$u->info['enemy']][$u->info['id']]) ? 1 : 0;
$nabito = floor($btl->users[$btl->uids[$u->info['id']]]['battle_yron']);
$expmaybe = floor($btl->users[$btl->uids[$u->info['id']]]['battle_exp']);
@@ -233,8 +229,10 @@ if (!$isBattle) {
$ggcode = PassGen::new();
$mypriems = $priem->seeMy();
+ $logs = $btl->lookmLog() . $btl->lookLog();
echo <<
+ $logs
eatk = $atk1;
getElementByIdInMainFrame('nabito').innerHTML = `$nabito`;
getElementByIdInMainFrame('expmaybe').innerHTML = `$expmaybe`;
@@ -260,7 +258,6 @@ if (!$isBattle) {
tactic(7,'$tactic7');
smena_alls = '0';
ggcode='$ggcode';
-
$js
HTML;
diff --git a/modules_data/btl_.php b/modules_data/btl_.php
index f7d8680b..ab61a7e6 100644
--- a/modules_data/btl_.php
+++ b/modules_data/btl_.php
@@ -1048,18 +1048,9 @@ $allprice = Battle::getType($allprice, $thisBattle['smert'] == 1);
-
-
- |
-
-
- Полную версию лога боя смотрите здесь »»
-
|
- |
-
-
+
+ Полную версию лога боя смотрите
здесь »»
+
@@ -1132,5 +1123,5 @@ $allprice = Battle::getType($allprice, $thisBattle['smert'] == 1);
+ include('jx/battle/refresh.php'); ?>
diff --git a/qodana.yaml b/qodana.yaml
new file mode 100644
index 00000000..630c7bdc
--- /dev/null
+++ b/qodana.yaml
@@ -0,0 +1,32 @@
+#-------------------------------------------------------------------------------#
+# Qodana analysis is configured by qodana.yaml file #
+# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
+#-------------------------------------------------------------------------------#
+version: "1.0"
+
+#Specify inspection profile for code analysis
+profile:
+ name: qodana.starter
+
+#Enable inspections
+#include:
+# - name:
+
+#Disable inspections
+#exclude:
+# - name:
+# paths:
+# -
+
+php:
+ version: 8.2 #(Applied in CI/CD pipeline)
+
+#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
+#bootstrap: sh ./prepare-qodana.sh
+
+#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
+#plugins:
+# - id: #(plugin id can be found at https://plugins.jetbrains.com)
+
+#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
+linter: jetbrains/qodana-php:latest