untracking unused-files

This commit is contained in:
lopar 2018-03-30 22:54:18 +03:00
parent b12d9702a9
commit ad1b7049a0
58 changed files with 0 additions and 7018 deletions

View File

@ -1,188 +0,0 @@
#!/usr/bin/php
<?php
include("../config.php");
include("../functions.php");
$data = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_turnir` WHERE `active` = TRUE"));
$starttime = time();
while(1) {
$ls = mysql_fetch_array(mysql_query("SELECT COUNT(`id`), SUM(`bot`) FROM `users` WHERE `in_tower` = 1"));
while(($ls[0]-$ls[1]) < 2 || $arch['room'] < 500) {
$test = mysql_fetch_array(mysql_query("SELECT 1"));
if($test[1] != 1) {
include("../config.php");
}
$data = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_turnir` WHERE `active` = TRUE"));
$starttime = time();
$ls = mysql_fetch_array(mysql_query("SELECT COUNT(`id`), SUM(`bot`) FROM `users` WHERE `in_tower` = 1"));
$arch = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '233' LIMIT 1"));
exec('echo "'.date("Y-m-d H:i:s").'[WAIT] waiting for tournir" > /var/log/arch.log');
sleep(5);
}
$arch = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '233' LIMIT 1"));
$arha = mysql_fetch_array(mysql_query("SELECT * FROM `bots` WHERE `prototype` = '233' LIMIT 1"));
$user = $arch;
$rhar = array("501" => array (20,0,502,505,0),"502" => array (15,0,0,0,501),"503" => array (15,0,0,507,0),"504" => array (15,0,0,508,0),"505" => array (20,501,0,510,0),"506" => array (15,0,507,511,0),"507" => array (15,503,508,0,506),"508" => array (25,504,0,513,507),"509" => array (20,0,0,515,0),"510" => array (20,505,511,0,0),"511" => array (20,506,0,0,510),"512" => array (30,0,513,519,0),"513" => array (25,508,514,0,512),"514" => array (20,0,0,0,513),"515" => array (20,509,0,522,0),"516" => array (25,0,517,523,0),"517" => array (25,0,518,0,516),"518" => array (35,0,519,525,517),"519" => array (35,512,520,526,518),"520" => array (35,0,521,0,519),"521" => array (15,0,0,528,0),"522" => array (20,515,0,529,0),"523" => array (15,516,0,530,0),"524" => array (20,0,525,531,0),"525" => array (35,518,526,532,524),"526" => array (40,519,527,533,525),"527" => array (35,0,0,0,526),"528" => array (15,521,529,535,0),"529" => array (20,522,0,0,528),"530" => array (20,523,531,537,0),"531" => array (35,524,0,538,530),"532" => array (20,525,533,539,0),"533" => array (20,526,534,540,532),"534" => array (15,0,0,0,533),"535" => array (20,528,0,541,0),"536" => array (20,0,537,0,535),"537" => array (35,530,0,543,536),"538" => array (20,531,0,544,0),"539" => array (20,532,0,545,0),"540" => array (15,533,0,546,0),"541" => array (20,535,542,547,0),"542" => array (15,0,543,0,541),"543" => array (40,537,544,549,542),"544" => array (40,538,545,550,543),"545" => array (40,539,0,551,544),"546" => array (15,540,0,552,0),"547" => array (20,541,548,553,0),"548" => array (20,0,549,0,547),"549" => array (35,543,550,0,548),"550" => array (40,544,551,554,549),"551" => array (40,545,0,555,550),"552" => array (15,546,0,556,0),"553" => array (20,547,0,557,0),"554" => array (20,550,555,0,0),"555" => array (35,551,0,0,554),"556" => array (15,552,0,559,0),"557" => array (15,553,0,0,0),"558" => array (20,0,559,0,0),"559" => array (20,556,560,0,558),"560" => array (20,0,0,0,559));
$nextroom = mt_rand(1, 4);
if(time()-$movetime >= $rhar[$arch['room']][0] && $rhar[$arch['room']][$nextroom] > 0 && !$arha['battle']) {
$movetime = time();
$list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '".$arch['room']."' AND `in_tower` = 1");
while($u = mysql_fetch_array($list)) {
addchp('<font color=red>Внимание!</font> <b>Архивариус</b> отправился в <b>'.$rooms[$rhar[$arch['room']][$nextroom]].'</b>.', '{[]}'.$u['login'].'{[]}');
}
$arch['room'] = $rhar[$arch['room']][$nextroom];
$list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '".$arch['room']."' AND `in_tower` = 1");
while($u = mysql_fetch_array($list)) {
addchp('<font color=red>Внимание!</font> <b>Архивариус</b> вошел в комнату.', '{[]}'.$u['login'].'{[]}');
}
#exec("echo \"".date("Y-m-d H:i:s")."[MOVE] ".$arch['room']."\" >> /var/log/arch.log");
mysql_query("UPDATE `users`, `online` SET `users`.`room` = '".$arch['room']."', `online`.`room` = '".$arch['room']."' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '233'");
}
$d = mysql_fetch_array(mysql_query("SELECT SUM(`massa`) FROM `inventory` WHERE `owner` = '233' AND `dressed` = 0"));
if($d[0] < $arch['sila']*4 && !$arha['battle']) {
$objs = mysql_query("SELECT * FROM `deztow_items` WHERE `name` != 'Чек на предьявителя' AND `room` = '".$arch['room']."' LIMIT 1");
while($obj = mysql_fetch_array($objs)) {
mysql_query("DELETE FROM `deztow_items` WHERE `id` = '".$obj['id']."' LIMIT 1");
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '".$obj['iteam_id']."' LIMIT 1"));
mysql_query("INSERT INTO `inventory` (`prototype`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`maxdur`,`isrep`,`gsila`,`glovk`,`ginta`,`gintel`,`ghp`,`gnoj`,`gtopor`,`gdubina`,`gmech`,`gfire`,`gwater`,`gair`,`gearth`,`glight`,`ggray`,`gdark`,`needident`,`nsila`,`nlovk`,`ninta`,`nintel`,`nmudra`,`nvinos`,`nnoj`,`ntopor`,`ndubina`,`nmech`,`nfire`,`nwater`,`nair`,`nearth`,`nlight`,`ngray`,`ndark`,`mfkrit`,`mfakrit`,`mfuvorot`,`mfauvorot`,`bron1`,`bron2`,`bron3`,`bron4`,`maxu`,`minu`,`magic`,`nlevel`,`nalign`,`dategoden`,`goden`,`otdel`,`gmp`,`gmeshok`,`encicl`,`artefact`,`koll`) VALUES ('{$dress['id']}','233','{$dress['name']}','{$dress['type']}',{$dress['massa']},{$dress['cost']},'{$dress['img']}',{$dress['maxdur']},{$dress['isrep']},'{$dress['gsila']}','{$dress['glovk']}','{$dress['ginta']}','{$dress['gintel']}','{$dress['ghp']}','{$dress['gnoj']}','{$dress['gtopor']}','{$dress['gdubina']}','{$dress['gmech']}','{$dress['gfire']}','{$dress['gwater']}','{$dress['gair']}','{$dress['gearth']}','{$dress['glight']}','{$dress['ggray']}','{$dress['gdark']}','{$dress['needident']}','{$dress['nsila']}','{$dress['nlovk']}','{$dress['ninta']}','{$dress['nintel']}','{$dress['nmudra']}','{$dress['nvinos']}','{$dress['nnoj']}','{$dress['ntopor']}','{$dress['ndubina']}','{$dress['nmech']}','{$dress['nfire']}','{$dress['nwater']}','{$dress['nair']}','{$dress['nearth']}','{$dress['nlight']}','{$dress['ngray']}','{$dress['ndark']}','{$dress['mfkrit']}','{$dress['mfakrit']}','{$dress['mfuvorot']}','{$dress['mfauvorot']}','{$dress['bron1']}','{$dress['bron2']}','{$dress['bron3']}','{$dress['bron4']}','{$dress['maxu']}','{$dress['minu']}','{$dress['magic']}','{$dress['nlevel']}','{$dress['nalign']}','".(($dress['goden'])?($dress['goden']*24*60*60+time()):"")."','{$dress['goden']}','{$dress['razdel']}','{$dress['gmp']}','{$dress['gmeshok']}','{$dress['encicl']}','{$dress['artefact']}','{$dress[koll]}')");
$iid = mysql_insert_id();
$ncost = $dress['cost'];
$nal = $dress['nalign'];
$nid = $dress['id'];
switch($dress['type']) {
case 1: $slot1 = 'sergi'; break;
case 2: $slot1 = 'kulon'; break;
case 3: $slot1 = 'weap'; break;
case 4: $slot1 = 'bron'; break;
case 5: $slot1 = 'r1'; break;
case 6: $slot1 = 'r2'; break;
case 7: $slot1 = 'r3'; break;
case 8: $slot1 = 'helm'; break;
case 9: $slot1 = 'perchi'; break;
case 10: $slot1 = 'shit'; break;
case 11: $slot1 = 'boots'; break;
}
$dress = mysql_fetch_array(mysql_query("SELECT `cost` FROM `inventory` WHERE `id` = '".$arch[$slot1]."' LIMIT 1"));
if($dress[0] < $ncost && $nal == 0) {
dressitem2($iid);
}
}
}
$pay = mysql_fetch_array(mysql_query("SELECT `present` FROM `inventory` WHERE `owner` = 233 AND `name` = 'Чек на предьявителя';"));
if($pay && !$arha['battle']) {
mysql_query("DELETE FROM `inventory` WHERE `owner` = 233 AND `name` = 'Чек на предьявителя';");
$us = mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `login` = '".$pay[0]."' LIMIT 1;"));
if(rand(1,2)==1) {
mysql_query("UPDATE `users` SET `money` = `money`+400 WHERE `login` = '".$pay[0]."';");
addchp ('<font color=red>Внимание!</font> <B>Архивариус</B> передал вам <B>400.00 кр</B>. ','{[]}'.$pay[0].'{[]}');
exec("echo \"[PAYMENT] obnal to ".$us['id']."\" >> /var/log/arch.log");
mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."<span class=date>".date("d.m.y H:i")."</span> ".nick::id($us['id'])->full(1)." обналичил чек на <B>400 кр.</B><BR>".'\') WHERE `active` = TRUE');
} else {
mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."<span class=date>".date("d.m.y H:i")."</span> ".nick::id(233)->full(1)." в ярости накинулся на ".nick::id($us['id'])->full(1).".<BR>".'\') WHERE `active` = TRUE');
// начинаем бой
mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('Архивариус','233','','".$arch['hp']."');");
$bot = mysql_insert_id();
$teams = array();
$teams[$bot][$jert['id']] = array(0,0,time());
$teams[$jert['id']][$bot] = array(0,0,time());
$sv = array(3,5,7,10);
mysql_query("INSERT INTO `battle` (
`id`,`coment`,`teams`,`timeout`,`type`,`status`,`t1`,`t2`,`to1`,`to2`)
VALUES
(NULL,'','".serialize($teams)."','".$sv[rand(0,3)]."','10','0','".$bot."','".$jert['id']."','".time()."','".time()."')");
}
$id = mysql_insert_id();
mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1;");
mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1;");
// создаем лог
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
//chmod("/backup/logs/battle".$id.".txt",766);
chown ("../backup/logs/battle".$id.".txt" , "www-data" );
chgrp ("../backup/logs/battle".$id.".txt" , "www-data" );
exec("echo \"".date("Y-m-d H:i:s")."[PAYMENT] aggression to ".$jert['id']."\" >> /var/log/arch.log");
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id` = {$jert['id']}");
mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."<span class=date>".date("d.m.y H:i")."</span> ".nick::id($bot)->full(1)." напал на ".nick::id($jert['id'])->full(1)." завязался <a href=\"logs.php?log={$id}\" target=_blank>бой »»</a><BR>".'\') WHERE `active` = TRUE');
$archa['battle'] = $id;
}
// нападаем на юзверей
if(($starttime+180) <= time() AND !$arha['battle']) {
$jert = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `room` = '".$arch['room']."' AND `in_tower`=1 AND `id`<>233 LIMIT 1;"));
//print_r($jert);
if($jert['hp'] > 0 && ($jert['id']!=233)) {
if($jert['battle'] > 0) {
// вмешиваемся
mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('Архивариус','233','','".$arch['hp']."');");
$bot = mysql_insert_id();
$bd = mysql_fetch_array(mysql_query ('SELECT * FROM `battle` WHERE `id` = '.$jert['battle'].' LIMIT 1;'));
$battle = unserialize($bd['teams']);
$ak = array_keys($battle[$jert['id']]);
$battle[$bot] = $battle[$ak[0]];
foreach($battle[$bot] as $k => $v) {
$battle[$k][$bot] = array(0,0,time());
}
$t1 = explode(";",$bd['t1']);
// проставляем кто-где
if (in_array ($jert['id'],$t1)) {
$ttt = 2;
} else {
$ttt = 1;
}
addlog($jert['battle'],'<span class=date>'.date("H:i").'</span> '.nick5($bot,"B".$ttt).' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
exec("echo \"".date("Y-m-d H:i:s")."[AGRESSION] in battle to ".$jert['id']."\" >> /var/log/arch.log");
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'`=CONCAT(`t'.$ttt.'`,\';'.$bot.'\') WHERE `id` = '.$jert['battle'].' ;');
mysql_query("UPDATE bots SET `battle` =".$jert['battle']." WHERE `id`= ".$bot);
mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."<span class=date>".date("d.m.y H:i")."</span> ".nick::id($bot)->full(1)." вмешался в поединок <a href=\"logs.php?log={$jert['battle']}\" target=_blank>»»</a><BR>".'\') WHERE `active` = TRUE;');
}else
{
// начинаем бой
mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('Архивариус','233','','".$arch['hp']."');");
$bot = mysql_insert_id();
$teams = array();
$teams[$bot][$jert['id']] = array(0,0,time());
$teams[$jert['id']][$bot] = array(0,0,time());
$sv = array(3,5,7,10);
//$tou = array_rand($sv,1);
exec("echo \"".date("Y-m-d H:i:s")."[AGRESSION] to ".$jert['id']."\" >> /var/log/arch.log");
mysql_query("INSERT INTO `battle`
(
`id`,`coment`,`teams`,`timeout`,`type`,`status`,`t1`,`t2`,`to1`,`to2`
)
VALUES
(
NULL,'','".serialize($teams)."','".$sv[rand(0,3)]."','10','0','".$bot."','".$jert['id']."','".time()."','".time()."'
)");
$id = mysql_insert_id();
// апдейтим врага
mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1;");
mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1;");
// создаем лог
$rr = "<b>".nick::id($bot)->full(1)."</b> и <b>".nick::id($jert['id'])->full(1)."</b>";
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
//chmod("/backup/logs/battle".$id.".txt",766);
chown ("../backup/logs/battle".$id.".txt" , "www-data" );
chgrp ("../backup/logs/battle".$id.".txt" , "www-data" );
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id` = {$jert['id']}");
mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."<span class=date>".date("d.m.y H:i")."</span> ".nick::id($bot)->full(1)." напал на ".nick::id($jert['id'])->full(1)." завязался <a href=\"logs.php?log={$id}\" target=_blank>бой »»</a><BR>".'\') WHERE `active` = TRUE');
}
}
}
sleep(5);
}
?>

View File

@ -1,101 +0,0 @@
<pre>
<?
//error_reporting(E_ALL);
ini_set("display_errors", 1);
/*
function moon_phase($year,$month,$day) {
if ($month == 1) --$day;
else if ($month == 2) $day += 30;
else
{
$day += 28 + ($month-2)*3059/100;
// adjust for leap years
if (!($year & 3)) ++$day;
if (($year%100) == 0) --$day;
}
$g = ($year-1900)%19 + 1;
$e = (11*$g + 18) % 30;
if (($e == 25 && $g > 11) || $e == 24) $e++;
if ((((($e + $day)*6+11)%177)/22 & 7) == 4) {
return true;
}
}
echo moon_phase(date("Y"),date("m"),date("d"));
*/
include "config.php";
include "functions.php";
//if($_GET['rep']) {
// $d = mysql_fetch_array(mysql_query("SELECT * from inventory where owner=0 AND `id`=".$_GET['rep']));
// $dd = mysql_fetch_array(mysql_query("SELECT * FROM `delo` WHERE `text` LIKE '%".$d['id']."%'ORDER BY `id` DESC LIMIT 1"));
// mysql_query("UPDATE inventory SET owner='".$dd['pers']."' WHERE `id`='".$_GET['rep']."';");
//}
//$data = mysql_query("SELECT * from inventory where `owner`='0' OR `owner`=''");
//while($d = mysql_fetch_array($data)) {
// $dd = mysql_fetch_array(mysql_query("SELECT * FROM `delo` WHERE `text` LIKE '%".$d['id']."%'ORDER BY `id` DESC LIMIT 1"));
// echo $d['id']." ".$d['name']." ".$dd['pers']." ".$dd['text']." <a href='?rep=".$d['id']."'>Вернуть ".nick7($dd['pers'])."</a><BR>";
//}
//settravma(2);
// exec("../daemons/arch.php");
$exps = array(
"20" => array (15),
"45" => array (16),
"75" => array (17),
"110" => array (18),
"160" => array (21),
"215" => array (22),
"280" => array (23),
"350" => array (24),
"410" => array (25),
"530" => array (28),
"670" => array (29),
"830" => array (30),
"950" => array (31),
"1100" => array (32),
"1300" => array (33),
"1450" => array (36),
"1650" => array (37),
"1850" => array (38),
"2050" => array (39),
"2200" => array (40),
"2500" => array (41),
"2900" => array (46),
"3350" => array (47),
"3800" => array (48),
"4200" => array (49),
"4600" => array (50),
"5000" => array (51),
"6000" => array (54),
"7000" => array (55),
"8000" => array (56),
"9000" => array (57),
"10000" => array (58),
"11000" => array (59),
"12000" => array (60),
"12500" => array (61),
"14000" => array (64),
"15500" => array (65),
"17000" => array (66),
"19000" => array (67),
"21000" => array (68),
"23000" => array (69),
"27000" => array (70),
"30000" => array (71),
"60000" => array (76),
"75000" => array (77),
"150000" => array (78),
"175000" => array (79) );
echo "<pre>";
$ss = mysql_query("select `id`,`nextup`,`level` FROM `users` WHERE `level` > 0 AND `level` < 8 AND id='6490';");
while($ssd=mysql_fetch_array($ss)) {
undressall($ssd['id']);
mysql_query( "UPDATE `users` SET `sila`='3',`lovk`='3',`inta`='3',`vinos`='".(3+$ssd['level'])."',`intel`='0',`stats` = ".($exps[$ssd['nextup']][0]-12)." WHERE `id`='".$ssd['id']."';"); // ,$ssd['nextup'],"
}
?>

View File

@ -1,55 +0,0 @@
<?
session_start();
if(!isset($_SESSION['uid'])) { die('User not found'); }
include('../config.php');
include('../functions.php');
$bank = mysql_fetch_array(mysql_query('SELECT `id`, `ekr` FROM `bank` WHERE `owner` = "'.$user['id'].'" AND `id` = "'.mysql_real_escape_string($_POST['bid']).'" LIMIT 1'));
$usid = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['log']).'" LIMIT 1'));
$_POST['log'] = iconv("utf-8", "utf-8", $_POST['log']);
if($_POST['user'] && !isset($_POST['true'])) {
if($_POST['bid']) {
if(isset($bank['id'])) {
if($bank['ekr'] >= 25) {
if($_POST['log'] != null) {
if(strtoupper($_POST['log']) == strtoupper("невидимка") || strtoupper($_POST['log']) == strtoupper("мусорщик") || strtoupper($_POST['log']) == strtoupper("мироздатель") || strtoupper($_POST['log']) == strtoupper("архивариус") || strtoupper($_POST['log']) == strtoupper("Благодать") || strtoupper($_POST['log']) == strtoupper("Merlin") || strtoupper($_POST['log']) == strtoupper("Коментатор")) {
echo '<b style=\'color: Red;\'>Регистрация персонажа с ником <b>'.$_POST['log'].'</b> запрещена!</b><br />';
} elseif(strlen($_POST['log']) < 3 || strlen($_POST['log']) > 20 || !preg_match("/^[a-zA-Zа-яА-Я0-9][a-zA-Zа-яА-Я0-9_ -]+[a-zA-Zа-яА-Я0-9]$/", $_POST['log']) || preg_match("/__/", $_POST['log']) || preg_match("/--/", $_POST['log']) || preg_match("/ /", $_POST['log']) || preg_match("/(.)\\1\\1\\1/", $_POST['log'])) {
echo "<b style='color: Red;'>Логин может содержать от 3 до 20 символов, и состоять только из букв русского или английского алфавита, цифр, символов '_', '-' и пробела. <br />Логин не может начинаться или заканчиваться символами '_', '-' или пробелом<br />Также в логине не должно присутствовать подряд более 1 символа '_' или '-' и более 1 пробела, а также более 3-х других одинаковых символов.</b><br />".$_POST['log'];
} elseif(preg_match("[a-zA-Z]", $_POST['log']) && preg_match("[а-яА-Я]", $_POST['log'])) {
echo "<b style='color: Red;'>Логин не может содержать одновременно буквы русского и латинского алфавитов!</b><br />";
} else {
if(!isset($usid['id'])) {
echo 'good';
} else {
echo '<b style=\'color: Red;\'>Данный логин занят ...</b>';
}
}
} else {
echo '<b style=\'color: Red;\'>Введите логин ...</b>';
}
} else {
echo '<b style=\'color: Red;\'>Недостаточно средств ...</b>';
}
} else {
echo '<b style=\'color: Red;\'>Банк не найден ...</b>';
}
} else {
echo '<b style=\'color: Red;\'>Missing params. Code: 02.</b>';
}
} else {
echo '<b style=\'color: Red;\'>Missing params. Code: 01.</b>';
}
if($_POST['true'] == '1') {
if($bank['ekr'] >= 25) {
mysql_query('UPDATE `users` SET `login` = "'.mysql_real_escape_string($_POST['log']).'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
$bank['ekr'] -= 25;
mysql_query('UPDATE `bank` SET `ekr` = "'.$bank['ekr'].'" WHERE `id` = "'.$bank['id'].'" LIMIT 1');
echo 'Ваш логин успешно изменен ...';
} else {
echo 'Err';
}
echo 'Тест логин';
}

View File

@ -1,162 +0,0 @@
<?php
session_start();
if(!isset($_SESSION['uid'])) { header('Location: ../../index.php'); exit(); }
include('../../config.php');
include('../../functions.php');
$clan_acces = array(
1 => array(0, 'Просмотр событий клана'),
2 => array(0, 'Создание событий клана'),
3 => array(0, 'Просмотр хранилища'),
4 => array(0, 'Использование вещей из хранилища'),
5 => array(0, 'Изъятие предметов из хранилища'),
6 => array(0, 'Просмотр казны и списка игроков, пополнявших казну'),
7 => array(0, 'Пополнение казны'),
8 => array(0, 'Использование казны'),
9 => array(0, 'Прием в клан'),
10 => array(0, 'Изгнание из клана'),
11 => array(0, 'Редактирование информации о клане')
);
if($user['klan'] == '') { header('Location: ../../main.php'); exit(); }
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `money`, `ekr`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$user['klan'].'" LIMIT 1'));
$err = '';
if($user['clan_prava'] != 'glava') {
$utitl = mysql_fetch_array(mysql_query('SELECT * FROM `clan_tituls` WHERE `id` = "'.$user['clan_prava'].'" LIMIT 1'));
if(!isset($utitl['id'])) {
$utitl = mysql_fetch_array(mysql_query('SELECT * FROM `clan_tituls` WHERE `id` = 2 LIMIT 1'));
}
} else {
$utitl = mysql_fetch_array(mysql_query('SELECT * FROM `clan_tituls` WHERE `id` = 1 LIMIT 1'));
}
if(isset($utitl['id'])) {
$i = 1;
while($i < count($clan_acces)) {
if($utitl['prava'][$i] > 0) {
$clan_acces[$i][0] = 1;
}
$i++;
}
}
if($_GET['addcredits']) {
if($clan_acces[7][0] == 1) {
if($user['money'] >= $_GET['sums'] && $_GET['sums'] > 0) {
if(isset($_GET['comment']) && $_GET['comment'] != '') {
$user['money'] -= (int)$_GET['sums'];
$clan['money'] += (int)$_GET['sums'];
$text = mysql_real_escape_string(iconv("utf-8", "utf-8", $_GET['comment']));
mysql_query('UPDATE `users` SET `money` = "'.$user['money'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
mysql_query('UPDATE `clans` SET `money` = "'.$clan['money'].'" WHERE `id` = "'.$clan['id'].'" LIMIT 1');
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"".$user['login']."\" Пополнил казну клана: ($clan[name] / $clan[id]) на сумму: ".(int)$_GET['sums']." кр. С пометкой : $text', '1', '".time()."')");
mysql_query('INSERT INTO `clan_log` (`clan_id`, `user_id`, `time`, `type`, `suma`, `comment`) VALUES ("'.$clan['id'].'", "'.$user['id'].'", "'.time().'", "1", "'.(int)$_GET['sums'].'", "'.$text.'")');
$err = '<b style="color: Red;">Казна пополненна на '.(int)$_GET['sums'].' кр.</b>';
} else {
$err = '<b style="color: Red;">Введите комментарий</b>';
}
} elseif($_GET['sums'] <= 0) {
$err = '<b style="color: Red;">Введите сумму</b>';
} else {
$err = '<b style="color: Red;">Недостаточно средств</b>';
}
} else {
$err = '<b style="color: Red;">У Вас нет прав на выполнение данной операции</b>';
}
}
if($_GET['addecredits']) {
if($clan_acces[7][0] == 1) {
if(isset($banks['id'])) {
if($banks['ekr'] >= (int)$_GET['sums'] && $_GET['sums'] > 0) {
if(isset($_GET['comment']) && $_GET['comment'] != '') {
$banks['ekr'] -= (int)$_GET['sums'];
$clan['ekr'] += (int)$_GET['sums'];
$text = mysql_real_escape_string(iconv("utf-8", "utf-8", $_GET['comment']));
mysql_query('UPDATE `bank` SET `ekr` = "'.$banks['ekr'].'" WHERE `id` = "'.$banks['id'].'" LIMIT 1');
mysql_query('UPDATE `clans` SET `ekr` = "'.$clan['ekr'].'" WHERE `id` = "'.$clan['id'].'" LIMIT 1');
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"".$user['login']."\" Пополнил казну клана: ($clan[name] / $clan[id]) на сумму: ".(int)$_GET['sums']." екр, со счёта : $banks[id]. С пометкой : $text', '1', '".time()."')");
mysql_query('INSERT INTO `clan_log` (`clan_id`, `user_id`, `time`, `type`, `suma`, `comment`) VALUES ("'.$clan['id'].'", "'.$user['id'].'", "'.time().'", "2", "'.(int)$_GET['sums'].'", "'.$text.'")');
$err = '<b style="color: Red;">Казна пополненна на '.(int)$_GET['sums'].' eкр.</b>';
} else {
$err = '<b style="color: Red;">Введите комментарий</b>';
}
} elseif($_GET['sums'] <= 0) {
$err = '<b style="color: Red;">Введите сумму</b>';
} else {
$err = '<b style="color: Red;">Недостаточно средств</b>';
}
} else {
$err = '<b style="color: Red;">Авторизируйтесь в банковском счету</b>';
}
} else {
$err = '<b style="color: Red;">У Вас нет прав на выполнение данной операции</b>';
}
}
function form_pay($us, $clan) {
global $clan_acces $banks;
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `level`, `money` FROM `users` WHERE `id` = "'.$us.'" LIMIT 1'));
$r = '';
if($clan_acces[7][0] == 1) {
$r .= 'У Вас в наличии : <b>'.$user['money'].'</b> .кр<br />';
$r .= '<a href="javascript: void(0);" onclick="addCredits();">Пополнить (кредиты)</a><br />';
if(isset($banks['id'])) {
$r .= '<br />Счёт #'.$banks['id'].': <b>'.$banks['cr'].'</b> .кр и <b>'.$banks['ekr'].'</b> .екр<br />';
$r .= '<a href="javascript: void(0);" onclick="addeCredits();">Пополнить (еврокредиты)</a>';
} else {
$r .= '<br />Авторизируйтесь в банке через Инвентарь';
}
}
return $r;
}
?>
<script>
function proverka(input) {
input.value = input.value.replace(/[^\d]/g, '');
}
function addCredits() {
new miDialog({title : 'Пополнить казну кредитами'}, {addcredits : 1}, function() {
document.location = '/__modules/clan_panel.php?razdel=kazna&'+$.param(this.data);
},
$('<div>Комментарий</div>').append(miDialog._simpleInput({name : 'comment'})).append('<div>Сумма</div>').append(miDialog._oneInput({name : 'sums', onkeyup : 'return proverka(this);', onchange : 'return proverka(this);', value : '0'})), {width : 280});
}
function addeCredits() {
new miDialog({title : 'Пополнить казну еврокредитами'}, {addecredits : 1}, function() {
document.location = '/__modules/clan_panel.php?razdel=kazna&'+$.param(this.data);
},
$('<div>Комментарий</div>').append(miDialog._simpleInput({name : 'comment'})).append('<div>Сумма</div>').append(miDialog._oneInput({name : 'sums', onkeyup : 'return proverka(this);', onchange : 'return proverka(this);', value : '0'})), {width : 280});
}
</script>
<table width="100%" border="0">
<tbody>
<tr>
<td align="center">
<table valign="top" align="center" width="100%">
<tbody>
<tr>
<td><br />
<center><br />
<?php if($err != '') { echo $err.'<br />'; } ?>
<b>Клановая казна: <font color="#339900"><?=$clan['money']; ?></font> кр, <font color="#339900"><?=$clan['ekr']; ?></font> екр.</b><br /><br />
<fieldset style="width: 300px; height: 100px;">
<legend align="center"><b>Пополнить казну:</b></legend>
<?php if($clan_acces[7][0] == 1) { echo form_pay($user['id'], $clan['id']); } else { echo '<b>Вы не можете пополнять казну</b>'; } ?>
</fieldset>
<?php if($clan_acces[6][0] == 1) { ?>
<a href="http://capitalcity.old-dark.ru/clan_log.php?act=caznalog&clan=<?=$clan['id'];?>&hash=<?=md5($user['id'].'|'.$user['login']);?>" target="_blank">Просмотр действий с казной</a>
<? } ?>
</center>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

View File

@ -1,18 +0,0 @@
<?php
$errors = array();
$form_data = array();
if(empty($_POST['user'])) $errors['name'] = 'Вы кто?';
if(empty($_POST['hash'])) $errors['name'] = 'Где потеряли Hash?';
if(empty($_POST['sorted'])) $errors['name'] = 'Не понимаю кого искать ...';
if(!empty($errors)) {
$form_data['success'] = false;
$form_data['errors'] = $errors;
} else {
$form_data['success'] = true;
$form_data['posted'] = 'Great';
}
echo json_encode($form_data);
?>

View File

@ -1,125 +0,0 @@
<?php
/**
* Created by PhpStorm.
* User: lopiu
* Date: 29.01.2018
* Time: 21:34
* Перенос содержимого файла по причине невозможности переминования старого без рефакторинга.
*/
session_start();
if(!isset($_SESSION['uid'])) { header('Location: ../../index.php'); exit(); }
include('../../config.php');
include('../../functions.php');
if($user['klan'] == '') { header('Location: ../../main.php'); exit(); }
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$user['klan'].'" LIMIT 1'));
if($clan['recruits'] > 0) {
$recrut = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$clan['recruits'].'" LIMIT 1'));
}
function show_klan_members($pl) {
global $rooms;
$r = '';
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$pl.'" LIMIT 1'));
if(isset($clan['id'])) {
$sp = mysql_query('SELECT `id`, `login`, `invis`, `align`, `level`, `status`, `room`, (SELECT `id` FROM `online` WHERE `date` >= "'.(time()-60).'" AND `id` = `users`.`id`) AS `online` FROM `users` WHERE `klan` = "'.$pl.'" ORDER BY `level` DESC');
while($us = mysql_fetch_array($sp)) {
if($us['online'] > 0 && $us['invis'] == 0) {
$r .= '<a href="javascript: top.AddToPrivate(\''.nick::id($us['id'])->short().'\', top.CtrlPress)" target="refreshed"><img src="../../i/lock.gif" width="20" height="15" /></a>';
} else {
$r .= '<font style=\'color: Grey;\'><img src="../../i/offline.gif" width="20" height="15" /></font>';
}
$r .= ' <img src=\'../../i/align_'.$us['align'].'.gif\' /> <img src=\'../../i/klan/'.ClanImage($pl).'.gif\' /> <b>'.$us['login'].'</b> ['.$us['level'].'] ';
$r .= '<a href=\'../../inf.php?id='.$us['id'].'\' target=\'_blank\'><img src=\'../../i/inf.gif\' /></a>';
$r .= $us['status']?" - ".$us['status']:" - Нет звания";
if($us['online'] > 0 && $us['invis'] == 0) {
$r .= ' - <i>'.$rooms[$us['room']].'</i>';
}
$r .= '<br />';
}
} else {
$r = 'Клан не найден ..';
}
return $r;
}
?>
<table>
<tbody>
<tr>
<td colspan="3" valign="top" align="center">
<center>
<h3>
<img src="../..//i/align_<?=$clan['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" />
<b><?=$clan['short']; ?></b>
<br />
Клан-основа - <img src="../../i/align_<?=$clan['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" />
<b><?=$clan['name']?></b>
<br />
<? if($clan['recruits'] > 0) { ?>
Клан-рекрут - <img src="../../i/align_<?=$recrut['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($recrut['id']); ?>.gif" />
<b><?=$recrut['name']?></b>
<? } ?>
</h3>
</center>
</td>
</tr>
<tr>
<td valign="top">
<fieldset>
<legend><b>Каналы чата: </b></legend>
<table border="0">
<tbody>
<tr align="left">
<td width="30">&nbsp;</td>
<td align="left">
<font color="#850404">
<b><a href="#" onclick="top.AddToPrivate('klan', top.CtrlPress)" target="refreshed"><img src="../../i/lock.gif" width="20" height="15" /></a> klan - <img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" /><?=$clan['name']; ?> <br /></b>
</font>
</td>
<td width="30">&nbsp;</td>
</tr>
<tr>
<td></td>
<td height="10"></td>
<td></td>
</tr>
</tbody>
</table>
</fieldset>
<fieldset>
<legend><b>Клановые реликты:</b></legend>
<table border="0">
<tbody>
<tr>
<td width="500" align="left">В разработке</td>
</tr>
</tbody>
</table>
</fieldset>
</td>
<td width="25">&nbsp;</td>
<td valign="top" align="center">
<fieldset>
<legend><b>Состав клана: </b></legend>
<table>
<tbody>
<tr>
<td align="left">
<h3>CapitalCity</h3>
<? echo show_klan_members($clan['id']); ?>
</td>
</tr>
</tbody>
</table>
</fieldset>
</td>
</tr>
</tbody>
</table>

View File

@ -1,105 +0,0 @@
<?
session_start();
if(!isset($_SESSION['uid'])) { header('Location: ../index.php'); exit(); }
include('../config.php');
include('../functions.php');
$user ='';
if($user['klan'] == '') { header('Location: ../main.php'); exit(); }
if(!isset($_SESSION['razdel_panel'])) { $_SESSION['razdel_panel'] = 'main'; }
if($_GET['razdel']) {
switch ($_GET['razdel']) {
case "main": $_SESSION['razdel_panel'] = 'main'; break;
case "kazna": $_SESSION['razdel_panel'] = 'kazna'; break;
case "arsenal": $_SESSION['razdel_panel'] = 'arsenal'; break;
case "wars": $_SESSION['razdel_panel'] = 'wars'; break;
case "message": $_SESSION['razdel_panel'] = 'message'; break;
case "castle": $_SESSION['razdel_panel'] = 'castle'; break;
case "maintains": $_SESSION['razdel_panel'] = 'maintains'; break;
default: $_SESSION['razdel_panel'] = 'razdel_panel'; break;
}
}
?>
<html>
<head>
<title>404</title>
<link rel="stylesheet" type="text/css" href="../css/main.css" />
<script src="../js/jquery-1.7.2.min.js"></script>
<script src="../js/jquery.simplemodal.js"></script>
<script src="../js/jquery.ui.js?100"></script>
<script src="../js/mi.js"></script>
<link rel="stylesheet" href="../css/bkstyle.css?101" />
<link rel="stylesheet" href="../css/mi.css" />
<style>
.m { background: #99CCCC; text-align: center; }
.s { background: #BBDDDD; text-align: center; }
.s2 { background: #C0D6D4; text-align: center; }
a.menu { font-weight: bold; font-size: 8pt; color:#959595; text-decoration: none; text-align: center; }
a.menu2 { font-weight: bold; font-size: 8pt; color: #8F0000; text-decoration: none; text-align: center; }
a.menu:hover { font-weight:bold; font-size: 8pt; color: #8F0000; text-decoration: none; text-align: center; }
.menu22 { font-weight: bold; font-size: 8pt; color: #003388; text-decoration: none; text-align: center; }
.menu221 { background-color: #A5A5A5; text-align: center; }
.menu222 { font-weight: bold; font-size: 8pt; color: #000000; text-decoration: none; }
.body {margin: 5px; background: #D7D7D7}
</style>
</head>
<body>
<table width="100%">
<tbody>
<tr>
<td align="right">
<input type="button" onclick="location.href='../main.php';" value="Вернуться" />
</td>
</tr>
<tr>
<td width="100%" valign="top" align="center">
<table border="0" width="956">
<tbody>
<tr>
<td width="956" style="background-image: url(../i/clan_panel/menu_bg33.jpg); background-repeat: no-repeat">
<table border="0" cellpadding="4" cellspacing="3">
<tbody>
<tr height="38">
<td width="15">&nbsp;</td>
<td align="center" width="127" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'main') { echo "2"; }?>" href="?razdel=main">Главная</a></td>
<td align="center" width="127" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'kazna') { echo "2"; }?>" href="?razdel=kazna">Казна</a></td>
<!-- <td align="center" width="140" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'arsenal') { echo "2"; }?>" href="klan_arsenal.php">Арсенал</a></td> -->
<td align="center" width="143" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'wars') { echo "2"; }?>" href="?razdel=wars">Войны и враги</a></td>
<td align="center" width="140" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'message') { echo "2"; }?>" href="?razdel=message">Сообщения</a></td>
<!-- <td align="center" width="132" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'castle') { echo "2"; }?>" href="klan_castles.php">Замки</a></td> -->
<td align="center" width="122" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'maintains') { echo "2"; }?>" href="?razdel=maintains">Управление</a></td>
<td width="5">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table border="0" width="1100">
<tbody>
<tr>
<td>
<table width="100%" border="0">
<tbody>
<tr>
<td align="center">
<? include('clan_modules/'.$_SESSION['razdel_panel'].'.php'); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,74 +0,0 @@
<?php
session_start();
if(!isset($_SESSION['uid'])) { die(); }
include("../config.php");
include("../functions.php");
if(!isset($user['id']) || ($user['align'] <= 1.7 && $user['align'] > 2 && $user['align'] != '2.99')) {
exit();
}
function nics($id) {
$user = mysql_fetch_array(mysql_query("SELECT `id`, `align`, `level`, `login`, `klan` FROM `users` WHERE `id` = '{$id}' LIMIT 1"));
if(isset($user['id'])) {
$mm .= '<img src=\'i/align_'.($user['align'] > 0 ? $user['align']:0).'.gif\' />';
if($user['klan'] > 0) {
$mm .= '<img title=\''.ClanImage($user['klan']).'\' src=\'i/klan/'.ClanImage($user['klan']).'.gif\' />';
}
$mm .= '<b>'.$user['login'].'</b> ['.$user['level'].']<a href=inf.php?'.$user['id'].' target=_blank><img src=i/inf.gif width=12 height=11 /></a>';
}
return $mm;
}
$action = isset($_GET["act"]) ? $_GET["act"] : "";
$fid = isset($_GET["fid"]) ? $_GET["fid"] : "";
$page = isset($_GET["page"]) ? $_GET["page"] : 0;
if(!empty($fid)) {
$txt = mysql_fetch_array(mysql_query('SELECT `id`, `text` FROM `forum` WHERE `id` = "'.$fid.'" LIMIT 1'));
}
if($action == "edit" && !empty($fid)) {
$output = "<div style='display: none;'><div class='contact-top'></div><div class='contact-content'>
<h1 class='contact-title'>Редактирование сообщения :</h1>
<div class='contact-loading' style='display: none;'></div>
<div class='contact-message' style='display: none;'></div>
<form action='#' style='display: none;'>";
$output .= "<textarea id='contact-message' class='contact-input' name='message' cols='40' rows='4' tabindex='1004' style=\"margin: 4px; height: 409px; width: 944px; max-height: 409px; max-width: 944px;\">".$txt['text']."</textarea><br />";
$output .= "<label>&nbsp;</label><span style=\"float: left;\">
<input type=\"hidden\" name=\"fids\" value=\"$fid\" />
<input type=\"hidden\" name=\"page\" value=\"$page\" />
<button type='submit' class='contact-send contact-button' tabindex='1006'>Сохранить</button>
<button type='submit' class='contact-cancel contact-button simplemodal-close' tabindex='1007'>Отмена</button>
</span>
<br />
</form>
</div>
<div class='contact-bottom'></div></div>";
echo $output;
} elseif($action == "send") {
$txt = iconv('UTF-8', 'utf-8', $_GET['message']);
$us = nics($user['id']);
$txt .= '<br /><b style=\'color: Red;\'>Откредактировал :</b> '.$us;
$forum = mysql_fetch_array(mysql_query('SELECT `id`, `parent` FROM `forum` WHERE `id` = "'.$_GET['fids'].'" LIMIT 1'));
if($forum['parent'] <= 100) {
$forum['parent'] = $_GET['fids'];
} else {
$forum['parent'] = $forum['parent'];
}
$top = mysql_fetch_array(mysql_query('SELECT `id`, `parent` FROM `forum` WHERE `id` = "'.$forum['parent'].'" LIMIT 1'));
$loc = mysql_fetch_array(mysql_query('SELECT `id` FROM `forum` WHERE `id` = "'.$top['parent'].'" AND `type` = 1 LIMIT 1'));
mysql_query('UPDATE `forum` SET `text` = "'.$txt.'" WHERE `id` = "'.$_GET['fids'].'" LIMIT 1');
echo 'Изменения вступили в силу. Обновляю.';
echo '<script>location.href="forum.php?topic='.$forum['parent'].'&konftop='.$loc['id'].'&page='.$_GET['page'].'";</script>';
} else {
exit();
}
exit;
?>

View File

@ -1,274 +0,0 @@
<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
session_start();
if (!($_SESSION['uid'] >0)) header("Location: index.php");
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
$user['prof3_lvl'] = $user['prof3_level'];
if($user['prof3_lvl'] == 0) {
$user['prof3_lvl'] = 1;
}
function timeOut($ttm) {
$out = '';
$time_still = $ttm;
$tmp = floor($time_still/2592000);
$id=0;
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." мес. ";}
$time_still = $time_still-$tmp*2592000;
}
$tmp = floor($time_still/86400);
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." дн. ";}
$time_still = $time_still-$tmp*86400;
}
$tmp = floor($time_still/3600);
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." ч. ";}
$time_still = $time_still-$tmp*3600;
}
$tmp = floor($time_still/60);
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." мин. ";}
}
if($out=='')
{
if($time_still<0)
{
$time_still = 0;
}
$out = $time_still.' сек.';
}
return $out;
}
if(isset($_POST['login_deal']) && ( $user['prof3'] + $user['prof3_lvl'] * 86400 * 30 > time() )) {
if($_POST['login_deal'] == $user['login']) {
$error = 'Нельзя предложить наставничество самому себе ;)';
}else{
$user2 = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['login_deal']).'" LIMIT 1'));
if(isset($user2['id'])) {
$deal = mysql_fetch_array(mysql_query('SELECT `id` FROM `deal` WHERE `uid1` = "'.$user['id'].'" AND `uid2` = "'.$user2['id'].'" AND `finish` > "'.time().'" AND `status` = 0 AND `type` = 1 LIMIT 1'));
if(isset($deal['id'])) {
$error = 'Вы уже подали предложение стать вашим наставником персонажу &quot;'.htmlspecialchars($_POST['login_deal'],NULL,'cp1251').'&quot;.';
}else{
$deal = mysql_fetch_array(mysql_query('SELECT `id` FROM `deal` WHERE `uid2` = "'.$user2['id'].'" AND `status` = 1 AND `type` = 1 LIMIT 1'));
if(isset($deal['id'])) {
$error = 'У персонажа &quot;'.htmlspecialchars($_POST['login_deal'],NULL,'cp1251').'&quot; уже есть наставник!';
}else{
$deal = mysql_fetch_array(mysql_query('SELECT `id`,`finish` FROM `deal` WHERE `uid1` = "'.$user['id'].'" AND `uid2` = "'.$user2['id'].'" AND `status` = 2 AND `type` = 1 AND `finish` > "'.time().'" LIMIT 1'));
if(isset($deal['id'])) {
$error = 'Персонаж &quot;'.htmlspecialchars($_POST['login_deal'],NULL,'cp1251').'&quot; отказался от ваших услуг! Попробуйте через '.timeOut($deal['finish']-time()).', возможно игрок передумает ;)';
}else{
$error = 'Вы предложили &quot;'.htmlspecialchars($_POST['login_deal'],NULL,'cp1251').'&quot; стать вашим учеником! Ожидайте подтверждения!';
mysql_query('INSERT INTO `deal` (
`uid1`,`uid2`,`type`,`status`,`start`,`finish`
) VALUES (
"'.$user['id'].'","'.$user2['id'].'","1","0","'.time().'","'.(time() + 7200).'"
)');
}
}
}
}else{
$error = 'Персонаж с логином &quot;'.htmlspecialchars($_POST['login_deal'],NULL,'cp1251').'&quot; не найден.';
}
}
}elseif(isset($_GET['d'])) {
$deal = mysql_fetch_array(mysql_query('SELECT * FROM `deal` WHERE `id` = "'.mysql_real_escape_string($_GET['d']).'" AND `uid2` = "'.$user['id'].'" AND `finish` > "'.time().'" AND `status` = 0 LIMIT 1'));
if(isset($deal['id'])) {
if(isset($_GET['yes'])) {
$error = 'Вы успешно согласились на сделку!';
mysql_query('UPDATE `deal` SET `status` = "1" WHERE `id` = "'.$deal['id'].'" LIMIT 1');
}elseif(isset($_GET['no'])) {
$error = 'Вы успешно отказались от сделки!';
mysql_query('UPDATE `deal` SET `status` = "2" WHERE `id` = "'.$deal['id'].'" LIMIT 1');
}
}else{
$error = 'Сделка не найдена!';
}
}elseif(isset($_GET['un'])) {
$deal = mysql_fetch_array(mysql_query('SELECT * FROM `deal` WHERE `id` = "'.mysql_real_escape_string($_GET['un']).'" AND `uid2` = "'.$user['id'].'" AND `status` = 1 AND `type` = 1 LIMIT 1'));
if(isset($deal['id'])) {
$error = 'Вы успешно отказались от наставничества!';
mysql_query('UPDATE `deal` SET `status` = "2" WHERE `id` = "'.$deal['id'].'" LIMIT 1');
}else{
$error = 'Сделка не найдена!';
}
}elseif(isset($_GET['un2']) && ( $user['prof3'] + $user['prof3_lvl'] * 86400 * 30 > time() )) {
$deal = mysql_fetch_array(mysql_query('SELECT * FROM `deal` WHERE `id` = "'.mysql_real_escape_string($_GET['un2']).'" AND `uid1` = "'.$user['id'].'" AND `status` = 1 AND `type` = 1 LIMIT 1'));
if(isset($deal['id'])) {
$error = 'Вы успешно отказались от ученика!';
mysql_query('UPDATE `deal` SET `status` = "2" WHERE `id` = "'.$deal['id'].'" LIMIT 1');
}else{
$error = 'Сделка не найдена!';
}
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>old-dark :: Сделки</title>
<link rel=stylesheet type="text/css" href="css/main.css">
<script language="JavaScript" src="js/jquery.min.js"></script>
</head>
<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor=#eeeeee style="background: rgb(226, 224, 224);">
<h3>Сделки \ Наставничество</h3>
<br><br>
<div align="center"><font color="red"><?=$error?></font></div><br>
<br>
<div style="position:absolute;top:10px; right:10px;">
<input type="button" onClick="location.href='/deal.php';" value="Обновить">
<input type="button" onClick="location.href='/main.php';" value="Вернуться">
</div>
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="0" style="border:1px solid #000;">
<tr style="color:#FFF;">
<td width="70" align="center" valign="middle" bgcolor="#666666" style="border-right:1px solid #000;">Действие</td>
<td align="center" valign="middle" bgcolor="#666666" style="border-right:1px solid #000;">Предмет сделки</td>
<td width="200" align="center" valign="middle" bgcolor="#666666" style="border-right:1px solid #000;">Кто предложил</td>
<td width="200" align="center" valign="middle" bgcolor="#666666">Оставшееся время</td>
</tr>
<?
$i = 0;
$sp = mysql_query('SELECT * FROM `deal` WHERE `uid2` = "'.$user['id'].'" AND `finish` > "'.time().'" AND `status` = 0');
while( $pl = mysql_fetch_array($sp) ) {
//
$txt = '';
if( $pl['type'] == 1 ) {
$txt = 'Стать учеником';
}
//
$time = $pl['finish']-time();
$time = timeOut($time);
//
$user2 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid1'].'" LIMIT 1'));
//
$see = 1;
if(isset($_GET['d']) && $_GET['d'] == $pl['id'] && (isset($_GET['yes']) || isset($_GET['no']))) {
$see = 0;
}
if( $see == 1 ) {
?>
<tr>
<td align="center" style="border-right:1px solid #000;border-top:1px solid #000;"><a href="/deal.php?d=<?=$pl['id']?>&yes">Да</a> \ <a href="/deal.php?d=<?=$pl['id']?>&no">Нет</a></td>
<td align="center" style="border-right:1px solid #000;border-top:1px solid #000;"><?=$txt?></td>
<td align="center" style="border-right:1px solid #000;border-top:1px solid #000;"><?=$user2['login']. '' .$user2['id']. '&nbsp;<a href="/inf.php?EXTERNAL_FRAGMENT" target="_blank"><img width="12" height="11" src="http://capitalcity.old-dark.ru/i/inf.gif"></a>' ?></td>
<td align="center" style="border-top:1px solid #000;"><?=$time?></td>
</tr>
<?
$i++;
}
} ?>
</table>
<? if( $i == 0 ) { ?>
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="0" style="border-left:1px solid #000;border-right:1px solid #000;border-bottom:1px solid #000;">
<tr>
<td align="center" style="border-top:1px solid #000;">Нет сделок</td>
</tr>
</table>
<? } ?>
<p>&nbsp;</p>
<h3>Наставничество</h3>
<?
if( $user['prof3'] + $user['prof3_lvl'] * 86400 * 30 > time() ) {
//
$denast = mysql_fetch_array(mysql_query('SELECT * FROM `deal` WHERE `uid2` = "'.$user['id'].'" AND `type` = 1 AND `status` = 1 LIMIT 1'));
$nast = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$denast['uid1'].'" LIMIT 1'));
//
$html = '';
$i = 0;
$sp = mysql_query('SELECT * FROM `deal` WHERE `uid1` = "'.$user['id'].'" AND `status` = 1 AND `type` = 1');
while( $pl = mysql_fetch_array($sp) ) {
$user2 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid2'].'" LIMIT 1'));
if(isset($user2['id'])) {
$html .= ' <tr>
<td align="right" style="border-top:1px solid #000;">&nbsp;'.($i+1).'.&nbsp;</td>
<td align="left" style="border-top:1px solid #000;"><b>'.$user2['login'].'</b> ['.$user2['level'].']<a href="/inf.php?'.$user2['id'].'" target="_blank"><img width="12" height="11" src="http://capitalcity.old-dark.ru/i/inf.gif"></a>'.
'<small> обучается с '.date('d.m.Y H:i',$pl['start']).'</small>'.
'&nbsp;<small>(<a href="/deal.php?un2='.$pl['id'].'">отказаться</a>)</small>'.
'</td>
</tr>';
$i++;
}
}
//
$lvl = 0;
$exp = 0;
if( $i < 10 ) {
$lvl = 0;
$exp = 10;
}elseif( $i < 15 ) {
$lvl = 1;
$exp = 15;
}elseif( $i < 25 ) {
$lvl = 2;
$exp = 25;
}else{
$lvl = 3;
$exp = '--';
}
//
?>
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="0" style="border:1px solid #000;">
<tr>
<td width="200" align="center" style="border-right:1px solid #000;border-top:1px solid #000;">Ваш наставник</td>
<td align="left" style="border-top:1px solid #000;"><?
if(isset($nast['id'])) {
echo '<b>'.$nast['login'].'</b>&nbsp;<a href="/inf.php?'.$nast['id'].'" target="_blank"><img width="12" height="11" src="http://capitalcity.old-dark.ru/i/inf.gif"></a>';
echo ' <small>(<a href="/deal.php?un='.$denast['id'].'">отказаться</a>)</small>';
}else{
echo 'Нет';
}
?></td>
</tr>
<tr>
<td align="center" style="border-right:1px solid #000;border-top:1px solid #000;">Уровень наставничества</td>
<td align="left" style="border-top:1px solid #000;"><?=$lvl?></td>
</tr>
<tr>
<td align="center" style="border-right:1px solid #000;border-top:1px solid #000;">Опыт наставничества</td>
<td align="left" style="border-top:1px solid #000;"><?=$i?> / <?=$exp?></td>
</tr>
<tr>
<td align="center" style="border-right:1px solid #000;border-top:1px solid #000;">Срок действия лицензии</td>
<td align="left" style="border-top:1px solid #000;">до <?=date('d.m.Y H:i', $user['prof3'] + 86400*30*$user['prof3_lvl'] )?> <small style="color:#666">(Продлевается в Академмии на Торговой ул.)</small></td>
</tr>
<tr>
<td align="center" style="border-right:1px solid #000;border-top:1px solid #000;">Ваши ученики (<?=$i?> чел.):</td>
<td align="left" style="border-top:1px solid #000;">
<form method="post" action="/deal.php">
Введите логин ученика: <input style="width:174px;" type="text" value="" name="login_deal">&nbsp;<input type="submit" value="Предложить наставничество">
</form>
</td>
</tr>
<?=$html?>
</table>
<?
}else{
if($user['prof3'] > 0 ) {
echo '<center><br><br>У вас закончилась лицензия Наставника, продлите её в Академии!</center>';
}else{
echo '<center><br><br>У вас нет лицензия Наставника, приобретите её в Академии!</center>';
}
}?>
</body>
</html>

View File

@ -1,94 +0,0 @@
<?
include('../config.php');
function sums($val, $proc) {
$r = 0;
$flor = (int)$val/100;
$pl = $flor*$proc;
$r += $pl;
return $r;
}
if($_POST['item']) {
if($_POST['user']) {
if($_POST['hash']) {
$uid = (int)$_POST['user'];
$arr = array(
7 => array('cost' => 2000, 'ghp' => 8, 'stat' => 1, 'bron' => 1, 'mf' => 7, 'mindur' => 30, 'minu' => 1, 'maxu' => 1),
8 => array('cost' => 3000, 'ghp' => 10, 'stat' => 1, 'bron' => 1, 'mf' => 10, 'mindur' => 40, 'minu' => 2, 'maxu' => 2),
9 => array('cost' => 7000, 'ghp' => 12, 'stat' => 1, 'bron' => 1, 'mf' => 13, 'mindur' => 50, 'minu' => 3, 'maxu' => 3),
10 => array('cost' => 10000, 'ghp' => 14, 'stat' => 1, 'bron' => 1, 'mf' => 16, 'mindur' => 60, 'minu' => 4, 'maxu' => 4),
11 => array('cost' => 15000, 'ghp' => 16, 'stat' => 1, 'bron' => 1, 'mf' => 19, 'mindur' => 70, 'minu' => 5, 'maxu' => 5),
12 => array('cost' => 36000, 'ghp' => 18, 'stat' => 1, 'bron' => 1, 'mf' => 22, 'mindur' => 80, 'minu' => 6, 'maxu' => 6)
);
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `doblest` FROM `users` WHERE `id` = "'.mysql_real_escape_string($uid).'" LIMIT 1'));
$salt = md5($user['login'].'|'.$user['id']);
if(isset($user['id'])) {
if($_POST['hash'] == $salt) {
$it = (int)$_POST['item'];
$item = mysql_fetch_array(mysql_query('SELECT * FROM `inventory` WHERE `owner` = "'.$user['id'].'" AND `id` = "'.mysql_real_escape_string($it).'" AND `point` > 0 AND `dressed` = 0 LIMIT 1'));
if(isset($item['id']) && ($item['nlevel'] <= 13 && $item['nlevel'] >= 7)) {
$level = $item['nlevel']-1;
if($user['doblest'] >= $arr[$level]['cost']) {
$user['doblest'] -= $arr[$level]['cost'];
mysql_query('UPDATE `users` SET `doblest` = "'.$user['doblest'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
if($item['type'] != 3) {
$item['ghp'] -= $arr[$level]['ghp'];
if($item['bron1'] > 0) { $item['bron1'] -= 1; }
if($item['bron2'] > 0) { $item['bron2'] -= 1; }
if($item['bron3'] > 0) { $item['bron3'] -= 1; }
if($item['bron4'] > 0) { $item['bron4'] -= 1; }
if($item['mfkrit'] > 0) { $item['mfkrit'] -= sums($item['mfkrit'], $arr[$level]['mf']); }
if($item['mfakrit'] > 0) { $item['mfakrit'] -= sums($item['mfakrit'], $arr[$level]['mf']); }
if($item['mfuvorot'] > 0) { $item['mfuvorot'] -= sums($item['mfuvorot'], $arr[$level]['mf']); }
if($item['mfauvorot'] > 0) { $item['mfauvorot'] -= sums($item['mfauvorot'], $arr[$level]['mf']); }
if($item['gsila'] > 0) { $item['gsila'] -= $arr[$level]['stat']; }
if($item['glovk'] > 0) { $item['glovk'] -= $arr[$level]['stat']; }
if($item['ginta'] > 0) { $item['ginta'] -= $arr[$level]['stat']; }
if($item['gintel'] > 0) { $item['gintel'] -= $arr[$level]['stat']; }
}
if($item['type'] == 3) {
$item['minu'] -= $arr[$level]['minu']; $item['maxu'] -= $arr[$level]['minu'];
}
$item['nlevel'] -= 1;
if($item['nsila'] > 0) { $item['nsila'] -= 1; }
if($item['nlovk'] > 0) { $item['nlovk'] -= 1; }
if($item['ninta'] > 0) { $item['ninta'] -= 1; }
if($item['nvinos'] > 0) { $item['nvinos'] -= 1; }
if($item['nintel'] > 0) { $item['nintel'] -= 1; }
if($item['nnoj'] > 0) { $item['nnoj'] -= 1; }
if($item['ntopor'] > 0) { $item['ntopor'] -= 1; }
if($item['ndubina'] > 0) { $item['ndubina'] -= 1; }
if($item['nmech'] > 0) { $item['nmech'] -= 1; }
mysql_query('UPDATE `inventory` SET `nlevel` = "'.$item['nlevel'].'", `ghp` = "'.$item['ghp'].'", `bron1` = "'.$item['bron1'].'", `bron2` = "'.$item['bron2'].'", `bron3` = "'.$item['bron3'].'", `bron4` = "'.$item['bron4'].'", `mfkrit` = "'.$item['mfkrit'].'", `mfakrit` = "'.$item['mfakrit'].'", `mfuvorot` = "'.$item['mfuvorot'].'", `mfauvorot` = "'.$item['mfauvorot'].'", `gsila` = "'.$item['gsila'].'", `glovk` = "'.$item['glovk'].'", `ginta` = "'.$item['ginta'].'", `gintel` = "'.$item['gintel'].'", `minu` = "'.$item['minu'].'", `maxu` = "'.$item['maxu'].'", `nsila` = "'.$item['nsila'].'", `nlovk` = "'.$item['nlovk'].'", `ninta` = "'.$item['ninta'].'", `nvinos` = "'.$item['nvinos'].'", `nintel` = "'.$item['nintel'].'", `nnoj` = "'.$item['nnoj'].'", `ntopor` = "'.$item['ntopor'].'", `ndubina` = "'.$item['ndubina'].'", `nmech` = "'.$item['nmech'].'", `maxdur` = "'.$item['maxdur'].'", `duration` = "'.$item['duration'].'" WHERE `id` = "'.$item['id'].'" LIMIT 1');
###
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"".$user['login']."\" понизил уровень предмета: \"".$item['name']."\" id:(".$item['id'].") [$item[duration]/".$item['maxdur']."] за ".$arr[$level]['cost']." реп, до уровня $item[nlevel].', 1, '".time()."')");
###
echo 'success';
} else {
echo 'Недостаточно репутации для операции ...';
}
} else {
echo 'Предмет не найден ... ['.$item['id'].' | '.$item['nlevel'].']';
}
} else {
echo 'Утеря параметров. Код ошибки: 1001001.';
}
} else {
echo 'А вы кто ???';
}
} else {
echo 'Утерян параметр #hash# ...';
}
} else {
echo 'А вы кто ???';
}
} else {
echo 'Выберите предмет!';
}
?>

View File

@ -1,87 +0,0 @@
<?
ini_set("display_errors", 1);
error_reporting(E_ALL ^ E_NOTICE);
if(!@$start_dir) { $start_dir = '/tmp/backup/battle/'; }
function select_ff($name, $key = '*') {
global $start_dir;
if(file_exists($start_dir.$name)) {
$lines = file($start_dir.$name);
foreach($lines as $k => $v) {
$kv = explode('@=||=@', $v);
if($key == '*') {
$arr[$kv[0]] = $kv[1];
} elseif ($kv[0] == $key) {
$arr = $kv[1];
}
}
return $arr;
} else {
return false;
}
}
function select_line_to_file($name, $query, $key = '*') {
global $start_dir;
$r = mysql_fetch_assoc(mysql_query($query));
if($key != '*') {
if(file_exists($start_dir.$name)) {
$oldl = ($start_dir.$name);
foreach($oldl as $k => $v) {
$kv = explode('@=||=@', $v);
$oldv[$kv[0]]=$kv[1];
}
}
}
$nf = fopen($start_dir.$name, 'w');
if($key != '*') {
$found = false;
foreach($oldv as $k => $v) {
if($k == $key) {
$found = true;
$v = $r[$k];
}
fputs($nf, $k."@=||=@".$v."@=||=@\n");
}
if($found == false) {
fwrite($nf,$key."@=||=@".$r[$key]."@=||=@\n");
}
} else {
foreach($r as $k => $v) {
fwrite($nf,$k."@=||=@".$v."@=||=@\n");
}
}
fclose($nf);
return $r;
}
function update_file($name, $key, $val, $inc = false) {
global $start_dir;
$ex = file_exists($start_dir.$name);
if($ex) {
$oldl = ($start_dir.$name);
foreach($oldl as $k => $v) {
$kv = explode('@=||=@', $v);
$oldv[$kv[0]] = $kv[1];
}
}
if($ex || $inc == false) {
$nf = fopen($start_dir.$name, 'w');
$found = false;
if(is_array($oldv))
foreach($oldv as $k => $v) {
if($k == $key) {
$found = true;
$v = $inc == false ? $val:$v+$val;
}
fputs($nf,$k."@=||=@".$v."@=||=@\n");
}
if($found == false) {
fwrite($nf,$key."@=||=@".$val."@=||=@\n");
}
fclose($nf);
return "OK";
}
return false;
}
?>

View File

@ -1,339 +0,0 @@
<?
include('../config.php');
function add_trv($id) {
$user = mysql_fetch_array(mysql_query("SELECT `align`, `level` FROM `users` WHERE `id` = '{$id}' LIMIT 1"));
$travmalist = array("пробитый череп","разрыв селезенки","смещение позвонков","открытый перелом руки","открытый перелом <вырезано цензурой>","излом носоглотки","непонятные, но множественные травмы","сильное внутреннее кровотечение","раздробленная коленная чашечка","перелом шеи","смещение позвонков","открытый перелом ключицы","перелом позвоночника","вывих позвоночника","сотрясение третьей степени");
$zz = mt_rand(1, 3); $s = 0; $l = 0; $i = 0;
switch($zz) {
case 1: $s = ($user['level'] + 3)*3; break;
case 2: $l = ($user['level'] + 3)*3; break;
case 3: $i = ($user['level'] + 3)*3; break;
}
$trv = $travmalist[mt_rand(0, count($travmalist)-1)];
$time = 60*15;
mysql_query("INSERT INTO `effects` (`owner`, `name`, `time`, `type`, `sila`, `lovk`, `inta`, `vinos`) values ('".$id."', 'Травма &quot;".$trv."&quot;', ".(time()+$time).", '14', '".$s."', '".$l."', '".$i."', '0')");
mysql_query("UPDATE `users` SET `sila` = (`sila`-'".$s."'), `lovk` = (`lovk`-'".$l."'), `inta` = (`inta`-'".$i."') WHERE `id` = '".$id."' LIMIT 1");
}
function paginate_function($item_per_page, $current_page, $total_records, $total_pages) {
$pagination = '';
if($total_pages > 0 && $total_pages != 1 && $current_page <= $total_pages) {
$pagination .= '<ul class="pagination">Страницы: ';
$right_links = $current_page + 3;
$previous = $current_page - 3;
$next = $current_page + 1;
$first_link = true;
if($current_page > 1) {
$previous_link = ($previous == 0) ? 1 : $previous;
$pagination .= '<li class="first"><a href="javascript: void(0);" data-page="1">&laquo;</a></li>';
for($i = ($current_page-2); $i < $current_page; $i++) {
if($i > 0) {
$pagination .= '<li><a href="javascript: void(0);" data-page="'.$i.'">'.$i.'</a></li>';
}
}
$first_link = false;
}
if($first_link) {
$pagination .= '<li class="first active">'.$current_page.'</li>';
} elseif($current_page == $total_pages) {
$pagination .= '<li class="last active">'.$current_page.'</li>';
} else {
$pagination .= '<li class="active">'.$current_page.'</li>';
}
for($i = $current_page+1; $i < $right_links ; $i++) {
if($i <= $total_pages) {
$pagination .= '<li><a href="javascript: void(0);" data-page="'.$i.'">'.$i.'</a></li>';
}
}
if($current_page < $total_pages){
$next_link = ($i > $total_pages)? $total_pages : $i;
$pagination .= '<li class="last"><a href="javascript: void(0);" data-page="'.$total_pages.'">&raquo;</a></li>';
}
$pagination .= '</ul>';
}
return $pagination;
}
function login($uid) {
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align`, `level`, `klan` FROM `users` WHERE `id` = "'.mysql_real_escape_string($uid).'" LIMIT 1'));
if(isset($user['id'])) {
$align_img = '<img src="i/align_'.($user['align']?$user['align']:0).'.gif" /> ';
if($user['klan'] != '') {
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `name` FROM `clans` WHERE `id` = "'.$user['klan'].'" LIMIT 1'));
$clan_img = '<img title="'.$clan['name'].'" src="i/klan/'.$clan['name'].'.gif" /> ';
} else {
$clan_img = '';
}
$r = $align_img.$clan_img.' <b>'.$user['login'].' ['.$user['level'].']</b><a href="http://capitalcity.old-dark.ru/inf.php?id='.$user['id'].'" target="_blank"><img src="http://capitalcity.old-dark.ru/i/inf.gif" /></a>';
} else {
$r = 'Невидимка';
}
return $r;
}
function load_winers($sum, $hash) {
if($sum > 0) {
$limit = 'LIMIT '.(int)$sum;
} else {
$limit = '';
}
$r = '<center>Список, кому удалось достать монетки :';
$r .= '<table width="50%" border="1" style="border-collapse: collapse; border: 1px solid #b0b0b0;"><tbody><tr><td style="padding-left: 5px;">Кто</td><td style="text-align: center;">Раз</td><td style="text-align: center;">Когда</td><td style="text-align: center;">Всего кр.</td></tr>';
$sp = mysql_query('SELECT `id`, `usid`, `money`, `time`, `count` FROM `fountain_game` ORDER BY `id` DESC '.$limit.'');
while($pl = mysql_fetch_array($sp)) {
$us = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `id` = "'.$pl['usid'].'" LIMIT 1'));
$tm = date('d.m.y h:i:s', $pl['time']);
if($i == 0) {
$i = 1; $color = '#eeeeee';
} else {
$i = 0; $color = '#e7e7e7';
}
$user = login($us['id']);
$r .= '<tr bgcolor="'.$color.'"><td style="padding-left: 5px;">'.$user.'</td><td style="text-align: center;">'.$pl['count'].'</td><td style="text-align: center;">'.$tm.'</td><td style="text-align: center;">'.$pl['money'].'</td></tr>';
}
$r .= '</tbody></table>';
$r .= '<div id="fullwinnerslistlinkbox"><table><tbody><tr><td align="center" valign="middle"><font face="monospace" size="4">v</font><a href="javascript: void(0)" onclick="$(\'#monetWinnersBox\').load(\'/ajax/fontan_luck.php?do=load_winers&hash='.$hash.'&allList=1\', function(){ $(\'#fullwinnerslistlinkbox\').remove(); })">полный список</a><font face="monospace" size="4">v</font></td></tr></tbody></table></div></center>';
unset($pl, $us, $tm, $user);
return $r;
}
function send_wish($hash, $text, $uid) {
if(isset($uid) && $uid > 0) {
if(isset($text)) {
if(strlen($text) < 5) {
echo "<script>growl('Внимание', 'Red', 'Не менее 5 букв в Желании');</script>";
} elseif(strlen($text) > 50) {
echo "<script>growl('Внимание', 'Red', 'Не более 50 букв в Желании');</script>";
} else {
$us = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `level`, `align` FROM `users` WHERE `id` = "'.(int)$uid.'" LIMIT 1'));
if(isset($us['id'])) {
if(md5($us['login'].'|'.$us['id']) == $hash) {
$txt = mysql_real_escape_string($text);
if(iconv("utf-8", "utf-8", $txt) != '') {
$addText = iconv("utf-8", "utf-8", $txt);
}
mysql_query('INSERT INTO `fontan_wish` (`uid`, `time`, `wish`) VALUES ("'.$us['id'].'", "'.time().'", "'.$addText.'")');
echo "<script>growl('Внимание', 'Red', 'Ваше желание записано!'); $('#wishFormBox').toggle(); load_wishs(1);</script>";
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
}
} else {
echo "<script>growl('Внимание', 'Red', 'Введите текст Желания');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
}
function cureHps($hash, $uid) {
if(isset($uid) && $uid > 0) {
$us = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align`, `level`, `hp`, `maxhp` FROM `users` WHERE `id` = "'.(int)$uid.'" LIMIT 1'));
if(isset($us['id'])) {
if(md5($us['login'].'|'.$us['id']) == $hash) {
if(($us['level'] <= 7 || $us['align'] == 2.99) && $us['hp'] < $us['maxhp']) {
$us['hp'] = $us['maxhp'];
mysql_query('UPDATE `users` SET `hp` = "'.$us['hp'].'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
echo "<script>growl('Внимание', 'Red', 'Вы, Испили Водички.');</script>";
} elseif($us['hp'] == $us['maxhp']) {
echo "<script>growl('Внимание', 'Red', 'Ваши силы и так полны.');</script>";
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не можете Испить Водички, уровень слишком высок');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
}
function giveCoin($hash, $uid) {
if(isset($uid) && $uid > 0) {
$us = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align`, `level`, `money` FROM `users` WHERE `id` = "'.(int)$uid.'" LIMIT 1'));
if(isset($us['id'])) {
if(md5($us['login'].'|'.$us['id']) == $hash) {
if($us['money'] >= 1) {
$us['money'] -= 1;
mysql_query('UPDATE `users` SET `money` = "'.$us['money'].'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
$f = mysql_fetch_array(mysql_query('SELECT `value` FROM `variables` WHERE `var` = "fontan_jackpot" LIMIT 1'));
$f['value'] += 1;
mysql_query('UPDATE `variables` SET `value` = "'.$f['value'].'" WHERE `var` = "fontan_jackpot" LIMIT 1');
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$us['id']}', '\"".$us['login']."\" бросил монетку в фонтан.', 1, '".time()."')");
echo "<script>growl('Внимание', 'Red', 'Вы бросили монетку в Фонтан.<br />Монет в фонтане : $f[value] шт.');</script>";
echo "<script>howMuch();</script>";
} else {
echo "<script>growl('Внимание', 'Red', 'Недостаточно средств');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
}
function loadWishs($p, $uid, $hash) {
$admin = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align` FROM `users` WHERE `id` = "'.$uid.'" LIMIT 1'));
$acces = false; $adimg = '';
if(isset($admin['id'])) {
if($admin['align'] != 2.99) {
$acces = false;
} else {
if(md5($admin['login'].'|'.$admin['id']) == $hash) {
$acces = true;
} else {
$acces = false;
}
}
}
$pgs = mysql_fetch_array(mysql_query("SELECT COUNT(`id`) FROM `fontan_wish`"));
$item_per_page = 15;
$allPages = ceil($pgs[0]/$item_per_page);
$page_position = (($p-1) * $item_per_page);
echo '<table border="0" style="border-collapse: collapse; border: 1px solid #b0b0b0;" width="100%"><tbody>';
$w = mysql_query("SELECT `id`, `uid`, `time`, `wish` FROM `fontan_wish` ORDER BY `id` DESC LIMIT $page_position, $item_per_page");
while($pl = mysql_fetch_array($w)) {
if($i == 0) {
$i = 1; $color = '#eeeeee';
} else {
$i = 0; $color = '#e7e7e7';
}
if($acces == true) {
$adimg = '<img src="i/clear.gif" id="'.$pl['id'].'" class="deleted" /> ';
}
$user = login($pl['uid']);
echo '<tr bgcolor="'.$color.'"><td>'.$adimg.$user.'</td><td>'.$pl['wish'].'</td></tr>';
}
echo '</tbody></table>';
echo '<br />'.paginate_function($item_per_page, $p, $pgs[0], $allPages);
unset($pl, $user);
}
function howMuch() {
$f = mysql_fetch_array(mysql_query('SELECT `value` FROM `variables` WHERE `var` = "fontan_jackpot" LIMIT 1'));
echo $f['value'];
}
function tryGet($hash, $uid) {
if(isset($hash)) {
if($uid > 0) {
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `money` FROM `users` WHERE `id` = "'.(int)$uid.'" LIMIT 1'));
if(isset($user['id'])) {
if(md5($user['login'].'|'.$user['id']) == $hash) {
$travm = mysql_fetch_array(mysql_query('SELECT `id` FROM `effects` WHERE (`type` = "13" OR `type` = "14") AND `owner` = "'.$user['id'].'" LIMIT 1'));
if(isset($travm['id'])) {
echo "<script>growl('Внимание', 'Red', 'Вы травмированы<br />Воздержитесь от попыток достать монетки.');</script>";
} else {
$rand = mt_rand(80, 100); $r = mt_rand(0, 100);
$jackpot = mysql_fetch_array(mysql_query('SELECT `value` FROM `variables` WHERE `var` = "fontan_jackpot" LIMIT 1'));
$last = mysql_fetch_array(mysql_query('SELECT `id`, `usid`, `money`, `time`, `count` FROM `fountain_game` WHERE `usid` = "'.$user['id'].'" LIMIT 1'));
if($jackpot['value'] > 0) {
if($r == $rand) {
$user['money'] += $jackpot['value'];
mysql_query('UPDATE `users` SET `money` = "'.$user['money'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
mysql_query('UPDATE `variables` SET `value` = 0 WHERE `var` = "fontan_jackpot" LIMIT 1');
if(isset($last['id'])) {
$last['money'] += $jackpot['value']; $last['time'] = time(); $last['count'] += 1;
mysql_query('UPDATE `fountain_game` SET `money` = "'.$last['money'].'", `time` = "'.$last['time'].'", `count` = "'.$last['count'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
} else {
mysql_query('INSERT INTO `fountain_game` (`usid`, `time`, `money`, `count`) VALUES ("'.$user['id'].'", "'.time().'", "'.$jackpot['value'].'", "1")');
}
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"".$user['login']."\" достал монетки из фонтана [$jackpot[value]] кр.', 1, '".time()."')");
echo "<script>growl('Внимание', 'Red', 'Вы достали монетки со дна!');</script>";
echo "<script>howMuch(); load_winers();</script>";
echo mysql_error();
} else {
add_trv($user['id']);
echo "<script>growl('Внимание', 'Red', 'Вам не далось достать монетки. Вы были травмированы.');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Фонтан пуст.');</script>";
}
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
}
function deleteWishs($id, $uid, $hash) {
if($id > 0) {
if($uid > 0) {
if(isset($hash)) {
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align` FROM `users` WHERE `id` = "'.(int)$uid.'" LIMIT 1'));
if(isset($user['id'])) {
if($user['align'] == 2.99) {
if(md5($user['login'].'|'.$user['id']) == $hash) {
$text = mysql_fetch_array(mysql_query('SELECT `id` FROM `fontan_wish` WHERE `id` = "'.(int)$id.'" LIMIT 1'));
if(isset($text['id'])) {
mysql_query('DELETE FROM `fontan_wish` WHERE `id` = "'.$text['id'].'" LIMIT 1');
echo "<script>growl('Внимание', 'Red', 'Удаленно'); load_wishs(1);</script>";
} else {
echo "<script>growl('Внимание', 'Red', 'Что удаляем?');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Недостаточно прав');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Вы не авторизированы');</script>";
}
} else {
echo "<script>growl('Внимание', 'Red', 'Что удаляем?');</script>";
}
}
if($_GET['do'] == 'load_winers' && $_GET['allList'] == 0) {
echo load_winers(5, $_GET['hash']);
} elseif($_GET['do'] == 'load_winers' && $_GET['allList'] == 1) {
echo load_winers(0, $_GET['hash']);
} elseif($_GET['do'] == 'showPanel') {
echo '<div id="wishFormBox" style="display: block;"><div style="overflow: hidden; margin: 6px 0;"><small>Не более 50 символов. Монетка тоже бросится</small><br />Я желаю : <input type="text" name="tekst" id="tekst" maxlength="50" size="50"><input type="button" onclick="if($(\'#tekst\').val()!=\'\'){wish($(\'#tekst\').val());}" value="Пусть сбудется!" /></div></div>';
} elseif($_GET['do'] == 'wish') {
echo send_wish($_GET['hash'], $_GET['tekst'], (int)$_GET['uid']);
} elseif($_GET['do'] == 'cureHps') {
echo cureHps($_GET['hash'], (int)$_GET['uid']);
} elseif($_GET['do'] == 'giveCoin') {
echo giveCoin($_GET['hash'], (int)$_GET['uid']);
} elseif($_GET['do'] == 'loadWishs') {
echo loadWishs((int)$_GET['page'], (int)$_GET['uid'], $_GET['hash']);
} elseif($_GET['do'] == 'howMuch') {
echo howMuch();
} elseif($_GET['do'] == 'tryGet') {
echo tryGet($_GET['hash'], (int)$_GET['uid']);
} elseif($_GET['do'] == 'deleteWishs') {
echo deleteWishs((int)$_GET['id'], (int)$_GET['uid'], $_GET['hash']);
}

View File

@ -1,563 +0,0 @@
<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
function er($e) {
global $c;
die('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="ru"><title>Произошла ошибка</title></head><body text="#FFFFFF"><p><font color=black>Произошла ошибка: <pre>'.$e.'</pre><b><p><a href="//capitalcity.old-dark.ru/">Назад</b></a><hr /><p align="right">(&copy;) <a href="//capitalcity.old-dark.ru/">Бойцовский Клуб Возрождение</a></p></body></html>');
}
session_start();
header('Content-type: text/html; charset=utf-8');
include('config.php');
include('functions.php');
if(!isset($user['id'])){
er('Возникла проблема с определением id персонажа<br />Авторизируйтесь с главной страницы.');
}
/*
if($user['online'] < time()-60) {
$filter->setOnline($user['online'], $user['id'], 0);
mysql_query("UPDATE `users` SET `online` = '".time()."', `timeMain` = '".time()."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
*/
$code = mt_rand(1, 99999999);
if($user['align'] == 2.99) {
$admin = 1;
} else {
$admin = 0;
}
$user['login'] = iconv("utf-8", "utf-8", $user['login']);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "//www.w3.org/TR/html4/frameset.dtd">
<html xmlns="//www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title>Бойцовский Клуб Возрождение</title>
<meta name="author" content="The Kite Runner"/>
<noscript><meta http-equiv="refresh" content="0; URL=/badbrowser.html" /></noscript>
<link href="//img.capitalcity.old-dark.ru/css/main.css" rel="stylesheet" type="text/css" />
<link href="//img.capitalcity.old-dark.ru/css/clu0b.css" rel="stylesheet" type="text/css" />
<script>
var c = {
noEr:0,
noErTmr:0,
url:'capitalcity.old-dark.ru',
img:'img.capitalcity.old-dark.ru',
uid:<?=(0+$user['id']);?>,
login:'<?=$user['login'];?>',
city:'capitalcity',
lvl:<?=$user['level'];?>,
rnd:'<?=$code;?>',
filter:0,
time:<?=time();?>,
pl:0,
align:<?=$user['align'];?>,
clan:'<?=$user['clan'];?>',
admin:<?=$admin;?>,
sound:0,
money:<?=$user['money'];?>,
room:<?=$user['room'];?>
}, sd4key = "", lafstReg = {},enterUse = 0;
function ctest(city) {
if(city != c['city']) {
top.location = 'game_main.php';
}
}
function testKey(event) {
if(event.keyCode == 10 || event.keyCode == 13) {
if(top.enterUse == 0) {
chat.subSend(); top.enterUse = 1; setTimeout('top.enterUse = 0',1000);
}
}
}
setInterval('c.time++', 1000);
var rnd = Math.random();
var delay = 12;
var redHP = 0.33;
var yellowHP = 0.66;
var TimerOn = -1;
var tkHP, maxHP;
function setHP(value, max) {
tkHP = value; maxHP = max;
if(TimerOn >= 0) {
clearTimeout(TimerOn);
TimerOn = -1;
}
setHPlocal();
}
function setHPlocal() {
if(tkHP > maxHP) {
tkHP = maxHP;
}
var sz1 = Math.round((149/maxHP)*tkHP);
var sz2 = 150 - sz1;
if(top.frames['main'].document.all("HP")) {
top.frames['main'].document.HP1.width = sz1;
top.frames['main'].document.HP2.width = sz2;
if(tkHP/maxHP < redHP) {
top.frames['main'].document.HP1.src = 'i/1red.gif';
} else {
if(tkHP/maxHP < yellowHP) {
top.frames['main'].document.HP1.src = 'i/1yellow.gif';
} else {
top.frames['main'].document.HP1.src = 'i/1green.gif';
}
}
var s = top.frames['main'].document.all("HP").innerHTML;
top.frames['main'].document.all("HP").innerHTML = s.substring(0, s.lastIndexOf(':')+1) + Math.round(tkHP)+"/"+maxHP;
}
tkHP = (tkHP+(maxHP/100));
if(tkHP < maxHP) {
TimerOn = setTimeout('setHPlocal()', delay*1000);
} else {
TimerOn = -1;
}
}
</script>
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script>
$.ajaxSetup({ cache: false });
$(window).error(function() {
return true;
});
var iusrno = {};
function ignoreUser(u) {
if(iusrno[u] == undefined || iusrno[u] == 0) {
$('#main').attr({'src':'main.php?friends=1&ignore=' + u + ''});
} else {
$('#main').attr({'src':'main.php?friends=1&ignore=' + u + ''});
}
}
</script>
<script type="text/javascript" src="js/main/jqueryrotate.js"></script>
<script type="text/javascript" src="js/main/jquery.zclip.js"></script>
<script type="text/javascript" src="js/main/jquery.cookie.js"></script>
<script type="text/javascript" src="js/main/title.js"></script>
<script type="text/javascript" src="js/main/gameEngine.js?<?=time()?>"></script>
<script type="text/javascript" src="js/main/interface.js"></script>
<script type="text/javascript" src="js/main/onlineList.js?<?=time()?>"></script>
<script type="text/javascript" src="js/main/jquery-fireHint.js"></script>
<script type="text/javascript" src="js/main/swiffy.min.js"></script>
<script type="text/javascript" src="js/main/swiffy/clock.js?hours=<?=date("H")?>&minutes=<?=date("i")?>&sec=<?=date("s")?>"></script>
<style type="text/css">
.woman a { color: #C33; }
.woman a:hover { color: #ff0000; }
img { vertical-align: bottom; }
.qel0 { dispaly: none; position:absolute; z-index:100000; border:4px solid #f5cc50; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; }
</style>
</head>
<body onload="bodyLoaded()">
<div class="qel0" id="qel0" style="display: none;"></div>
<noscript><center>Рвашем браузере отсутствует поодержка <b>javascript</b></center></noscript>
<style>
.CSSteam0 { font-weight: bold; cursor:pointer; }
.CSSteam1 { font-weight: bold; color: #6666CC; cursor:pointer; }
.CSSteam2 { font-weight: bold; color: #B06A00; cursor:pointer; }
.CSSteam3 { font-weight: bold; color: #269088; cursor:pointer; }
.CSSteam4 { font-weight: bold; color: #A0AF20; cursor:pointer; }
.CSSteam5 { font-weight: bold; color: #0F79D3; cursor:pointer; }
.CSSteam6 { font-weight: bold; color: #D85E23; cursor:pointer; }
.CSSteam7 { font-weight: bold; color: #5C832F; cursor:pointer; }
.CSSteam8 { font-weight: bold; color: #842B61; cursor:pointer; }
.CSSteam9 { font-weight: bold; color: navy; cursor:pointer; }
.CSSvs { font-weight: bold; }
.buttons:hover { background-color:#EFEFEF; }
.buttons:active { color:#777777; }
.buttons { background-color:#E9E9E9; }
.menutop2{color:#003366;} .menutop2:hover{
color:#446B93;
}
.klan { font-weight:bold; color: green; background-color: #99FFCC;}
.redColor {
color: #FF0000;
font-weight: bold;
}
.borderWhite {
border: 1px solid #f2f0f0;
}
.date21 {
font-family: Courier;
font-size: 8pt;
text-decoration:underline;
font-weight:normal;
color: #007000;
background-color: #00FFAA
}
.zoneCh_no {
float:left;
overflow:hidden;
height: 18px;
width: 18px;
}
.inpBtl {
color: #000000;
text-decoration: none;
background-color: #ECE9D8;
border: 1px solid #000000;
}
.zoneCh_yes {
float:left;
overflow:hidden;
height: 18px;
width: 18px;
background-color: #A9AFB1;
}
body {
background-color: #e8e8e8;
}
.st1222 {
font-size: 18px;
color: #990000;
font-weight: bold;
}
.crop {
float:left;
overflow:hidden;
height: 18px;
width: 18px;
}
.radio_off {
margin-left:0px;
}
.radio_on {
margin-left:-18px;
}
.battle_hod_style {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #AEAEAE;
}
.zbtn1l{ width:9px; height:18px; background: url(/tab.png) 0px 0px repeat-x;}
.zbtn1r { width:9px; height:18px; background: url(/tab.png) -18px 0px repeat-x;}
.zbtn1r2 { width:9px; height:18px; background: url(/tab.png) 18px 0px repeat-x;}
.zbtn2l{ width:9px; height:18px; background: url(/tab.png) -36px 0px repeat-x;}
.zbtn2r { width:9px; height:18px; background: url(/tab.png) -54px 0px repeat-x;}
.zbtn2r2 { width:9px; height:18px; background: url(/tab.png) -90px 0px repeat-x;}
.zbtn2r3 { width:9px; height:18px; background: url(/tab.png) 54px 0px repeat-x;}
.zbtn1c{ background-color: #808080; border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; border-top-color: #000000; border-bottom-color: #000000; color: #FFFFFF; cursor:default; padding-left:5px; padding-right:5px; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif;}
.zbtn2c{
background-color: #D5D2C9;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #000000;
color: #000000;
cursor:default;
padding-left:5px;
padding-right:5px;
FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif;
font-weight: bold;
}
</style>
<script>
if(window.top !== window.self) {
document.write = "";
window.top.location = window.self.location;
setTimeout(function() {
document.body.innerHTML = 'Ошибка доступа.';
}, 500);
window.self.onload = function(evt) {
document.body.innerHTML = 'Ошибка доступа.';
};
}
function cc(el) {
$(window).resize(function() {
$(el).css({position : 'absolute', left : ($(document).width() - $(el).outerWidth())/2, top : ($(document).height() - $(el).outerHeight())/2});
});
$(window).resize();
}
</script>
<style>
#qsst {
position:absolute;
z-index:10000000;
cursor:default;
display:none;
top:50px;
left:50px;
}
#onbon {
position:absolute;
z-index:100;
cursor:default;
display:none;
bottom:30px;
left:18px;
}
#mini_qsst {
position:absolute;
z-index:100;
cursor:default;
display:none;
bottom:10px;
right:18px;
}
#mini_sms {
position:absolute;
z-index:100;
cursor:default;
display:none;
bottom:10px;
right:18px;
}
</style>
<div id="qsst"></div>
<div id="ttl" class="ttl_css" style="display:none;z-index:1111;"></div>
<div id="nfml" style="display:none;position:absolute;"></div>
<div id="persmenu" style="display:none;z-index:1110;"></div>
<div id="windows" style="position:absolute;z-index:1101;"></div>
<div id="wupbox" onmouseup="win.WstopDrag()" onmousemove="win.WmoveDrag(event)" onselectstart="return false"></div>
<div id="actionDiv" style="position: absolute;"></div>
<div id="reline1" onselectstart="return false">
<img src="//img.capitalcity.old-dark.ru/1x1.gif" width="9" height="4" style="float:left; display:block; position:absolute; background-image:url(//img.capitalcity.old-dark.ru/i/lite/_top_24.gif);" />
<img src="//img.capitalcity.old-dark.ru/1x1.gif" width="10" height="4" style="float:right; display:block; background-image:url(//img.capitalcity.old-dark.ru/i/lite/_top_28.gif);" />
</div>
<div id="reline2" onselectstart="return false"></div>
<div id="upbox" onselectstart="return false"></div>
<div style="position:absolute; top:0; left:0; height:37px; width:100%;" onselectstart="return false">
<div style="background: url(//img.capitalcity.old-dark.ru/i/lite/capitalcity/top_lite_cap_11.gif) repeat-x bottom; ">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: url(//img.capitalcity.old-dark.ru/i/lite/top_lite_cap_03.gif) repeat-x top; ">
<tr>
<td align="left"><img src="//img.capitalcity.old-dark.ru/i/lite/capitalcity/top_lite_cap_01.gif" height="14" class="db" /></td>
<td align="right" class="main_text" style="position: relative"><table cellspacing="0" cellpadding="0" border="0" width="490">
<tr valign="bottom" align="center">
<td width="31" height="14"><img class="db" height="14" src="//img.capitalcity.old-dark.ru/i/lite/mennu112_06_lite.gif" width="31" /></td>
<td align="center"><table height="14" cellspacing="0" cellpadding="0" width="100%" background="//img.capitalcity.old-dark.ru/i/lite/mennu112_06.gif" border="0">
<tr align="middle">
<td id="el1" class="main_text" onClick="this.style.backgroundColor='#404040'; this.style.color='#FFFFFF'; showtable('1');" align="center">Знания</td>
<td width="1"><img class="db" height="11" src="//img.capitalcity.old-dark.ru/i/lite/mennu112_09.gif" width="1" /></td>
<td id="el2" class="main_text" onClick="this.style.backgroundColor='#404040'; this.style.color='#FFFFFF'; showtable('2');" align="center">Общение</td>
<td width="1"><img class="db" height="11" src="//img.capitalcity.old-dark.ru/i/lite/mennu112_09.gif" width="1" /></td>
<td id="el3" class="main_text" onClick="this.style.backgroundColor='#404040'; this.style.color='#FFFFFF'; showtable('3');" align="center">Безопасность</td>
<td width="1"><img class="db" height="11" src="//img.capitalcity.old-dark.ru/i/lite/mennu112_09.gif" width="1" /></td>
<td id="el4" class="main_text" onClick="this.style.backgroundColor='#404040'; this.style.color='#FFFFFF'; showtable('4');" style="background:#404040; color:#FFFFFF;" align="center">Персонаж</td>
<td width="1"><img class="db" height="11" src="//img.capitalcity.old-dark.ru/i/lite/mennu112_09.gif" width="1" /></td>
<td id="el5" class="main_text" onClick="if(confirm('Выйти из игры?')) { top.location = '/game_main.php?exit&rnd=<?=$code?>'; }" align="center">Выход&nbsp;</td>
</tr>
</table></td>
<td width="38"><img class="db" height="14" src="//img.capitalcity.old-dark.ru/i/lite/mennu112_04_lite.gif" width="37" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left"><img style="display:block; float:left;" src="//img.capitalcity.old-dark.ru/i/lite/top_lite_cap_07.gif" width="15" height="17" /><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/capitalcity/top_lite_cap_08.gif" height="17" /></td>
<td align="right">
<table cellspacing="0" cellpadding="0" width="490" style="background-image:url(//img.capitalcity.old-dark.ru/i/lite/top_lite_cap_15.gif);" border="0">
<tr>
<td align="right" class="menutop"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20"><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/top_lite_13.gif" width="20" height="17" /></td>
<td align="right" valign="top" background="//img.capitalcity.old-dark.ru/i/lite/top_lite_low_15.gif" style="font-size:10px;">
<span style="display: none;" id="menu1"> <a href="//www.istbk.ru/encicl/law.html" target="_blank" class="menutop">Законы</a> | Соглашения | <a href="//www.istbk.ru/encicl" target="_blank" class="menutop">Библиотека</a>| <a href="/ratings_users.htm" target="_blank" class="menutop">Рейтинг</a>&nbsp;</span>
<span style="display: none;" id="menu2"><a onClick="top.telegraf(); return false" href="javascript:void(0)" target="_blank" class="menutop"> Телеграммы </a> | <a href="//events.capitalcity.old-dark.ru" target="_blank" class="menutop"> Новости </a> | <a href="//capitalcity.old-dark.ru/forum.php" target="_blank" class="menutop"> Форум </a> &nbsp;</span>
<span style="display: none;" id="menu3"> <a href="../main.php?act_sec=1" target="main" class="menutop">Отчеты</a> | <a href="../main.php?security&rnd=<?=$code;?>" target="main" class="menutop">Смена пароля</a>&nbsp;</span>
<span style="display:;" id="menu4"><a href="/main.php?edit=1&rn=<?=$code;?>" target="main" class="menutop">Инвентарь</a> | <a href="/main.php?skills=1&side=5" target="main" class="menutop">Умения</a> | <a href="/main.php?act_trf=1" target="main" class="menutop">Отчеты о переводах</a> | <a href="/main.php?zayvka=1" target="main" class="menutop">Поединки</a> | <a href="/main.php?anketa=1" target="main" class="menutop">Анкета</a>&nbsp;</span>
</td>
<td width="22"><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/top_lite_18.gif" width="22" height="17" /></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15" height="6"><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/_lit_20.gif" width="15" height="6" /></td>
<td background="//img.capitalcity.old-dark.ru/i/lite/_top_20s.gif"><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/capitalcity/cap_lit_21.gif" width="79" height="6" /></td>
<td width="24" height="6"><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/_lit_27.gif" width="24" height="6" /></td>
</tr>
</table>
<!-- -->
</div>
<table id="globalMain" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="31" width="9" bgcolor="#D6D6D6"></td>
<td height="31" bgcolor="#D6D6D6">&nbsp;</td>
<td height="31" width="12" bgcolor="#D6D6D6"></td>
</tr>
<tr>
<td bgcolor="#D6D6D6" background="//img.capitalcity.old-dark.ru/i/lite/_top_24.gif"></td>
<td valign="top" bgcolor="#e2e0e0" id="main_td">
<div id="touchmain" style="margin-top: 3px;">
<iframe id="main" name="main" src="../main.php" frameborder="0" style="display:block;padding-top:0px;padding:0;margin:0;width:100%;border:0;" scrolling="auto"></iframe>
</div>
</td>
<td bgcolor="#D6D6D6" background="//img.capitalcity.old-dark.ru/i/lite/_top_28.gif"></td>
</tr>
<tr>
<td bgcolor="#D6D6D6" background="//img.capitalcity.old-dark.ru/i/lite/_top_24.gif"></td>
<td id="chat" valign="top" height="30%" bgcolor="#eeeeee">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" style="border-top:1px solid #CCCCCC">
<tr>
<td valign="top" id="chat_block" style="position:relative;display:block;border-top:1px solid #808080">
<div id="mini_qsst" onClick="top.qn_slk()" style="cursor: pointer"></div>
<div id="onbon"></div>
<div id="chat_menus" unselectable="on" onselectstart="return false;" style="position:absolute; right:0px; top:3px; padding-right:20px; height:18px; text-align:right; white-space:nowrap;">
<!-- -->
<table border="0" style="margin-top:-3px;" align="right" cellpadding="0" cellspacing="0">
<tr>
<td>
<div id="chat_menu" style="text-align: right; white-space: nowrap;"></div>
</td>
<td style="display: none;" id="scroll_none" width="3"></td>
</tr>
</table>
<!-- -->
</div>
<div id="ttSmiles" onselectstart="return false" style="display:none;z-index:1100;">
<div id="smilesDiv">Загрузка смайликов</div>
<div align="center"><button onClick="chat.lookSmiles()">Закрыть</button></div>
</div>
<div id="chat_list" style="cursor:default;">
<div id="canals">
</div>
</div>
</td>
<td width="260" valign="top" bgcolor="#faf2f2" style="border-left: 2px solid #CCCCCC; border-top: 1px solid #808080" id="online">
<div id="online_list" style="cursor: default;">
<div align="center" style="margin-top:5px;"><input type="button" id="robtn" onclick="chat.reflesh()" value="Обновить" /></div>
<font class="db" style="padding:0px 0 8px 0;font-size: 10pt; color:#8f0000;"><b id="roomName"></b></font>
<div id="onlist"></div>
<div style="border-top:#cac2c2 solid 1px;padding:5px;margin-top:5px;">
<div><label><input type="checkbox" value="1" <? if($user['level'] < 8 ) { ?>checked<? } ?> id="autoRefOnline">Обновлять автомат.</label></div>
</div>
</div>
</td>
</tr>
</table>
</td>
<td bgcolor="#D6D6D6" background="//img.capitalcity.old-dark.ru/i/lite/_top_28.gif"></td>
</tr>
<tr>
<td height="30" valign="bottom"><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/bkf_l_r1_02.gif" width="9" height="30"></td>
<td height="30" bgcolor="#E9E9E9" background="//img.capitalcity.old-dark.ru/i/buttons/chat_bg.gif">
<table width="100%" height="26" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30"><img class="db" src="//img.capitalcity.old-dark.ru/b___.gif" width="30" height="30" title="Чат"></td>
<td <? if($_COOKIE['chatCfg11'] < 1) { echo 'style="display: none;" '; } ?>width="100" align="center" id="globalMode"><div style="border:1px solid #CCCCCC;background-color:#EAEAEA;color:#717171;padding:2px; width:90%;"><small id="moneyGM"><?=$user['money']?> РєСЂ.</small></div></td>
<td><input onmouseup="top.chat.inObj=undefined;" type="text" name="textmsg" id="textmsg" maxlength="240" onKeyPress="top.testKey(event)" style="width:100%;font-size:9pt;margin-bottom:2px;" /></td>
<td width="6">&nbsp;</td>
<td width="30"><img onClick="chat.subSend();" src="//img.capitalcity.old-dark.ru/1x1.gif" class="db cp chatBtn2_1"></td>
<td width="5">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1" height="1" id="Sound" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="flash/Sound2.1.swf" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="wmode" value="transparent" />
<embed src="flash/Sound2.1.swf" quality="high" scale="noscale" wmode="transparent" width="1" height="1" name="Sound" id="Sound2" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" />
</object>
</td>
<td width="30"><img onClick="chat.clear();" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn3.gif"></td>
<td width="30"><img onClick="chat.filterMsg();" id="chbtn1" src="//img.capitalcity.old-dark.ru/1x1.gif" class="db cp chatBtn1_1"></td>
<td width="30"><img onClick="chat.systemMsg();" id="chbtn4" src="//img.capitalcity.old-dark.ru/1x1.gif" class="db cp chatBtn4_<? if(isset($_COOKIE['citySys']) && $_COOKIE['citySys']==1){ echo 2; }else{ echo 1; } ?>"></td>
<td width="30"><img id="chbtn6" onClick="chat.translitChat()" src="//img.capitalcity.old-dark.ru/1x1.gif" class="db cp chatBtn6_1"></td>
<td width="30"><img id="chbtn7" onClick="chat.soundChat()" src="//img.capitalcity.old-dark.ru/1x1.gif" class="db cp chatBtn7_1"></td>
<td width="5">&nbsp;</td>
<td width="30"><img id="chbtn8" class="db cp chatBtn8_1" onClick="chat.lookSmiles()" src="//img.capitalcity.old-dark.ru/1x1.gif"></td>
<td width="16" bgcolor="#BAB7B3"><img src="//img.capitalcity.old-dark.ru/i/buttons/chat_explode.gif" width="16" height="30" class="db" /></td>
<td width="30"><img width="30" height="30" id="qel1" onclick="top.getUrl('main','main.php?inv=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn13.gif"></td>
<? if($user['level']>3){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?transfer=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn16.gif"></td>
<? } if($user['level']>0){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?alh=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn9.gif"></td>
<? } if($admin == 1) {?>
<td width="30"><img onClick="top.getUrl('main','main.php?alhp=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn20.gif"></td>
<?} if($user['align']>=1 && $user['align']<2 ){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?light=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn15.gif"></td>
<? } if($user['align']>=3 && $user['align']<4){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?dark=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn10.gif"></td>
<? } if($user['vip']>time() || $u->stats['silver']>0){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?vip=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn17.gif"></td>
<? } if($user['level']>0){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?friends=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn12.gif"></td>
<? } if($user['level']>=0){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?notepad=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/b_notepad.gif"></td>
<? } if($user['level']>-1){ ?>
<? } if($user['klan'] != '' || ($user['align']>1 && $user['align']<2)){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?clan=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn14.gif"></td>
<? } if($admin > 0){ ?>
<td width="30"><img onClick="top.getUrl('main','main.php?admin=1&rnd='+c.rnd);" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn19.gif"></td>
<? } ?>
<td width="30"><img onClick="if(confirm('Выйти из игры?')){ top.location = '/buttons.php?exit&rnd=<?=$code?>'; }" class="db cp" src="//img.capitalcity.old-dark.ru/i/buttons/chatBtn11.gif"></td>
<td width="70">
<div id="header-fallback" style="display:none;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="70" height="25">
<param name="movie" value="flash/clock.swf?hours=<?=date("H")?>&amp;minutes=<?=date("i")?>&amp;sec=<?=date("s")?>">
<param name="quality" value="high">
<embed src="flash/clock.swf?hours=<?=date("H")?>&minutes=<?=date("i")?>&sec=<?=date("s")?>" quality="high" pluginspage="//www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="70" height="25"></embed>
</object>
</div>
<div id="swiffycontainer" style="width: 70px; height: 26px"></div>
</td>
</tr>
</table>
</td>
<td height="30" align="right" bgcolor="#D6D6D6"><img class="db" src="//img.capitalcity.old-dark.ru/i/lite/bkf_l_r1_06.gif" width="9" height="30"></td>
</tr>
<tr>
<td height="5" bgcolor="#D6D6D6" style="background:url(//img.capitalcity.old-dark.ru/sand_mid_31.png);"></td>
<td height="5" bgcolor="#D6D6D6" style="background:url(//img.capitalcity.old-dark.ru/sand_mid_31.png);"><!-- iFrames zone --></td>
<td height="5" bgcolor="#D6D6D6" style="background:url(//img.capitalcity.old-dark.ru/sand_mid_31.png);"></td>
</tr>
</table>
<script>
$(window).load(function(){
if(!jQuery.support.leadingWhitespace) {
$('#swiffycontainer').hide();
$('#header-fallback').show();
} else {
window.history.replaceState('', 'Бойцовский Клуб Возрождение', '?hours=<?=date("H")?>&minutes=<?=date("i")?>&sec=<?=date("s")?>');
var stage = new swiffy.Stage(document.getElementById('swiffycontainer'), swiffyobject);
stage.start();
window.history.replaceState('', 'Бойцовский Клуб Возрождение', 'game_main.php');
}
});
startEngine(); chat.testTimer(false);
<?
echo 'top.frames[\'main\'].locitems = 1; parent.$(\'#canal1\').html(\'\'); top.ctest("capitalcity"); top.sd4key = ""; var battle = '.(0+$user['battle']).';';
?>
</script>
</body>
</html>

View File

@ -1,121 +0,0 @@
<?php // #!/usr/bin/php
// демон, запускающий волны
$names = array("Слуга хаоса","Котельщик","Надсмотрищик","Кожекрылый","Валькирия","Грешная Душа","Падший Ангел","Падший Ангел","Дьявол");
$bots = array(79,80,81,82,83,84,85,86,87);
$shema = array ( "79" => 4,
"80" => 4,
"81" => 2,
"82" => 2,
"83" => 2,
"84" => 1,
"85" => 1,
"86" => 1,
"87" => 1,
);
// подключаем конфиг
// include "../connect.php";
// подключаем функции
// include "../functions.php";
// циклим демона
// while(1) {
// итерация
// есть ли конект с базой
$test = mysql_fetch_array(mysql_query("SELECT 1;"));
if($test[1]!=1) {
// include "../connect.php";
}
// выбираем все походы
$pohs = mysql_query("SELECT `owner`,`volna`,`id` FROM `hellround_pohod` WHERE `end` = 0;");
while ($poh = mysql_fetch_array($pohs)) {
// проверяем на живность
$u = mysql_fetch_array(mysql_query("SELECT `hp` FROM `users` WHERE `id` = '".$poh['owner']."' LIMIT 1;"));
if($u['hp'] <= 0) {
// удаляем ресурсы
mysql_query("DELETE FROM `inventory` WHERE `owner` = '".$poh['owner']."' AND `bs` = 1;");
mysql_query("UPDATE `hellround_pohod` SET `end` = 1, `date_out` = NOW( ) WHERE `id` = ".$poh['id']." AND `end` = 0;");
addchp ('<font color=red>Внимание!</font> Вы погибли в противостоянии хаосу...<BR>\'; top.frames[\'main\'].location=\'main.php\'; var z = \' ','{[]}'.nick::id($poh['owner'])->short().'{[]}');
echo "USER: ".$poh['owner']." live trip.\n";
} else
{
// забираем последний бой, может пора запускать волну?
$last_a = mysql_fetch_array(mysql_query("SELECT `id` FROM `battle` WHERE `t1` = '".$poh['owner']."' AND `win` = 3 ORDER by `id` DESC LIMIT 1;"));
$last_b = mysql_fetch_array(mysql_query("SELECT `to1` FROM `battle` WHERE `t1` = '".$poh['owner']."' AND `win` <> 3 ORDER by `id` DESC LIMIT 1;"));
$last_b = $last_b[0];
$last_a = $last_a[0];
// echo $last_a." ".$last_b." ".$poh['owner']."\n";
// проверяем, запускаем ботов
if ((time()-$last_b) >= 60 && $last_a == 0) {
// если прошло больше минуты, стартуем волну
$nextvolna = $poh['volna']+1;
$bot[1] = $shema[$bots[0]]*$nextvolna;
$bot[2] = $shema[$bots[1]]*$nextvolna;
$bot[3] = $shema[$bots[2]]*$nextvolna;
if ($nextvolna >= 10) {
$bot[4] = $shema[$bots[3]]*$nextvolna;
$bot[5] = $shema[$bots[4]]*$nextvolna;
$bot[6] = $shema[$bots[5]]*$nextvolna;
}
if ($nextvolna >= 25) {
$bot[7] = $shema[$bots[6]]*$nextvolna;
$bot[8] = $shema[$bots[7]]*$nextvolna;
$bot[9] = $shema[$bots[8]]*$nextvolna;
}
// делаем массив с айдишниками ботов
for($n = 1; $n <= 9; $n++) {
for($i = 1; $i <= (int)$bot[$n]; $i++){
$botz = mysql_fetch_array(mysql_query("SELECT `maxhp`,`id` FROM `users` WHERE `id` = '".$bots[$n-1]."' LIMIT 1;"));
mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('".$names[$n]." (проекция ".($i).")','".$bots[$n-1]."','','".$botz['maxhp']."');");
$botz = mysql_insert_id();
$enemys[] = $botz;
}
}
// array of teams
$teams = array();
foreach($enemys as $v) {
$teams[$poh['owner']][$v] = array(0,0,time());
$teams[$v][$poh['owner']] = array(0,0,time());
}
// запись о битве
mysql_query("INSERT INTO `battle`
(
`id`,`coment`,`teams`,`timeout`,`type`,`status`,`t1`,`t2`,`to1`,`to2`
)
VALUES
(
NULL,'','".serialize($teams)."','3','1','0','".$poh['owner']."','".implode(";",$enemys)."','".time()."','".time()."'
)");
$id = mysql_insert_id();
// апдейтим бота
foreach($enemys as $v) {
mysql_query("UPDATE `bots` SET `battle` = ".$id." WHERE `id` = ".$v." LIMIT 1;");
}
// создаем лог
//$rr = "<b>".nick3($user['id'])."</b> и <b>".nick3($bot)."</b>";
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда <b>".nick::id($poh['owner'])->full(1)."</b> вышел на битву с Адом... <BR>");
chown ("backup/logs/battle".$id.".txt" , "www-data" );
chgrp ("backup/logs/battle".$id.".txt" , "www-data" );
mysql_query("UPDATE users SET `battle` =".$id.",`zayavka`=0 WHERE `id`= ".$poh['owner'].";");
addchp ('<font color=red>Внимание!</font> Новое пришествие...<BR>\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ','{[]}'.nick::id($poh['owner'])->short().'{[]}');
mysql_query("UPDATE `hellround_pohod` SET `volna`=`volna`+1 WHERE `id` = ".$poh['id']." LIMIT 1;");
echo "USER: ".$poh['owner']." New wave.\n";
}
}
// задержка
sleep(5);
}
// }
?>

View File

@ -1,22 +0,0 @@
<?php
include('../config.php');
function form_rate($level) {
$r = '<b>По уровням : </b>';
for($i = 7; $i <= 13; $i++) {
if($level == $i) {
$r .= ' <b>['.$i.']</b>';
} else {
$r .= ' <a href="javascript: void(0);" id="'.$i.'">['.$i.']</a>';
}
}
$r .= '<ol>';
$sp = mysql_query('SELECT `groups`.*, `winers`.* FROM `group_wins` AS `grou WHERE `level` = "'.(int)$level.'" ORDER BY `id` DESC LIMIT 10');
$r .= '</ol>';
$r .= '<script>$("#levelCheck").text('.$level.');</script>';
return $r;
}
if($_GET['level'] >= 7 && $_GET['level'] <= 13) echo form_rate((int)$_GET['level']);
$r .= '<li><span class="date">04.02.16 06:00</span> - Победитель : Отряд «Winers ['.$level.']», в составе: <b>The Kite Runner</b>, <b>Costa</b>, <b>Rallo Tabs</b> <a>«История Турнира»</a></li>';

View File

@ -1,6 +0,0 @@
DirectoryIndex index.php
RewriteEngine Off
<Files>
Order Deny,Allow
Deny from all
</Files>

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},
ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g)){var m=d;d=g;g=m}var k=[];d=d||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(arguments.callee,100)},0)},
null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",
[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit();return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",
c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);l.resolve()}else setTimeout(arguments.callee,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,k).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var m=
this,k=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});k.push(f.promise());return!0}return g.call(b,d)});if(k.length){var b=new a.Deferred;a.when.apply(this,k).done(function(){b.resolveWith(m)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery);

View File

@ -1,182 +0,0 @@
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* This file was added automatically by CKEditor builder.
* You may re-use it at any time to build CKEditor again.
*
* If you would like to build CKEditor online again
* (for example to upgrade), visit one the following links:
*
* (1) http://ckeditor.com/builder
* Visit online builder to build CKEditor from scratch.
*
* (2) http://ckeditor.com/builder/9112f95de78a7f2c3576c61a29c8fc5b
* Visit online builder to build CKEditor, starting with the same setup as before.
*
* (3) http://ckeditor.com/builder/download/9112f95de78a7f2c3576c61a29c8fc5b
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
*
* NOTE:
* This file is not used by CKEditor, you may remove it.
* Changing this file will not change your CKEditor configuration.
*/
var CKBUILDER_CONFIG = {
skin: 'moono',
preset: 'full',
ignore: [
'.bender',
'bender.js',
'bender-err.log',
'bender-out.log',
'dev',
'.DS_Store',
'.editorconfig',
'.gitattributes',
'.gitignore',
'gruntfile.js',
'.idea',
'.jscsrc',
'.jshintignore',
'.jshintrc',
'less',
'.mailmap',
'node_modules',
'package.json',
'README.md',
'tests'
],
plugins : {
'a11yhelp' : 1,
'about' : 1,
'basicstyles' : 1,
'bidi' : 1,
'blockquote' : 1,
'clipboard' : 1,
'colorbutton' : 1,
'colordialog' : 1,
'contextmenu' : 1,
'dialogadvtab' : 1,
'div' : 1,
'elementspath' : 1,
'enterkey' : 1,
'entities' : 1,
'filebrowser' : 1,
'find' : 1,
'flash' : 1,
'floatingspace' : 1,
'font' : 1,
'format' : 1,
'forms' : 1,
'horizontalrule' : 1,
'htmlwriter' : 1,
'iframe' : 1,
'image' : 1,
'indentblock' : 1,
'indentlist' : 1,
'justify' : 1,
'language' : 1,
'link' : 1,
'list' : 1,
'liststyle' : 1,
'magicline' : 1,
'maximize' : 1,
'newpage' : 1,
'pagebreak' : 1,
'pastefromword' : 1,
'pastetext' : 1,
'preview' : 1,
'print' : 1,
'removeformat' : 1,
'resize' : 1,
'save' : 1,
'scayt' : 1,
'selectall' : 1,
'showblocks' : 1,
'showborders' : 1,
'smiley' : 1,
'sourcearea' : 1,
'specialchar' : 1,
'stylescombo' : 1,
'tab' : 1,
'table' : 1,
'tabletools' : 1,
'templates' : 1,
'toolbar' : 1,
'undo' : 1,
'wsc' : 1,
'wysiwygarea' : 1
},
languages : {
'af' : 1,
'ar' : 1,
'bg' : 1,
'bn' : 1,
'bs' : 1,
'ca' : 1,
'cs' : 1,
'cy' : 1,
'da' : 1,
'de' : 1,
'de-ch' : 1,
'el' : 1,
'en' : 1,
'en-au' : 1,
'en-ca' : 1,
'en-gb' : 1,
'eo' : 1,
'es' : 1,
'et' : 1,
'eu' : 1,
'fa' : 1,
'fi' : 1,
'fo' : 1,
'fr' : 1,
'fr-ca' : 1,
'gl' : 1,
'gu' : 1,
'he' : 1,
'hi' : 1,
'hr' : 1,
'hu' : 1,
'id' : 1,
'is' : 1,
'it' : 1,
'ja' : 1,
'ka' : 1,
'km' : 1,
'ko' : 1,
'ku' : 1,
'lt' : 1,
'lv' : 1,
'mk' : 1,
'mn' : 1,
'ms' : 1,
'nb' : 1,
'nl' : 1,
'no' : 1,
'pl' : 1,
'pt' : 1,
'pt-br' : 1,
'ro' : 1,
'ru' : 1,
'si' : 1,
'sk' : 1,
'sl' : 1,
'sq' : 1,
'sr' : 1,
'sr-latn' : 1,
'sv' : 1,
'th' : 1,
'tr' : 1,
'tt' : 1,
'ug' : 1,
'uk' : 1,
'vi' : 1,
'zh' : 1,
'zh-cn' : 1
}
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
};

View File

@ -1,135 +0,0 @@
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
body
{
/* Font */
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
font-size: 12px;
/* Text color */
color: #333;
/* Remove the background color to make it transparent */
background-color: #fff;
margin: 20px;
}
.cke_editable
{
font-size: 13px;
line-height: 1.6;
/* Fix for missing scrollbars with RTL texts. (#10488) */
word-wrap: break-word;
}
blockquote
{
font-style: italic;
font-family: Georgia, Times, "Times New Roman", serif;
padding: 2px 0;
border-style: solid;
border-color: #ccc;
border-width: 0;
}
.cke_contents_ltr blockquote
{
padding-left: 20px;
padding-right: 8px;
border-left-width: 5px;
}
.cke_contents_rtl blockquote
{
padding-left: 8px;
padding-right: 20px;
border-right-width: 5px;
}
a
{
color: #0782C1;
}
ol,ul,dl
{
/* IE7: reset rtl list margin. (#7334) */
*margin-right: 0px;
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
padding: 0 40px;
}
h1,h2,h3,h4,h5,h6
{
font-weight: normal;
line-height: 1.2;
}
hr
{
border: 0px;
border-top: 1px solid #ccc;
}
img.right
{
border: 1px solid #ccc;
float: right;
margin-left: 15px;
padding: 5px;
}
img.left
{
border: 1px solid #ccc;
float: left;
margin-right: 15px;
padding: 5px;
}
pre
{
white-space: pre-wrap; /* CSS 2.1 */
word-wrap: break-word; /* IE7 */
-moz-tab-size: 4;
tab-size: 4;
}
.marker
{
background-color: Yellow;
}
span[lang]
{
font-style: italic;
}
figure
{
text-align: center;
border: solid 1px #ccc;
border-radius: 2px;
background: rgba(0,0,0,0.05);
padding: 10px;
margin: 10px 20px;
display: inline-block;
}
figure > figcaption
{
text-align: center;
display: block; /* For IE8 */
}
a > img {
padding: 1px;
margin: 1px;
border: none;
outline: 1px solid #0782C1;
}

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="style.css" server="5.9.111.5" local="130400375101478901" remote="130398057600000000" Dst="0" />
</dwsync>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,47 +0,0 @@
BODY {
BACKGROUND-COLOR: #636562; MARGIN: 0px;
FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif;
font-size:12px;
}
A:link {
COLOR: #5b3e33; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A:visited {
COLOR: #633525; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A:active {
COLOR: #77684d; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A:hover {
COLOR: #000000; TEXT-DECORATION: underline
}
.style6 {
COLOR: #000000
}
li {
color:#000000;
text-decoration:none;
/*font-family:Georgia, "Times New Roman", Times, serif;*/
FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif;
font-size:12px;
}
ul {
color:#000000;
text-decoration:none;
/*font-family:Georgia, "Times New Roman", Times, serif;*/
FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif;
font-size:12px;
}
.head {
color:#660000;
font-size:18px;
font-family:Verdana, Arial, Helvetica, sans-serif;
}
.content {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:13px;
}

View File

@ -1 +0,0 @@
<center><b>Летописец опять потерял свои свитки..</b></center>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,95 +0,0 @@
<?
include('../config.php');
function sums($val, $proc) {
$r = 0;
$flor = (int)$val/100;
$pl = $flor*$proc;
$r += $pl;
return $r;
}
if($_POST['item']) {
if($_POST['user']) {
if($_POST['hash']) {
$uid = (int)$_POST['user'];
$arr = array(
8 => array('cost' => 1500, 'ghp' => 8, 'stat' => 1, 'bron' => 1, 'mf' => 7, 'mindur' => 30, 'minu' => 1, 'maxu' => 1),
9 => array('cost' => 3500, 'ghp' => 10, 'stat' => 1, 'bron' => 1, 'mf' => 10, 'mindur' => 40, 'minu' => 2, 'maxu' => 2),
10 => array('cost' => 5000, 'ghp' => 12, 'stat' => 1, 'bron' => 1, 'mf' => 13, 'mindur' => 50, 'minu' => 3, 'maxu' => 3),
11 => array('cost' => 7500, 'ghp' => 14, 'stat' => 1, 'bron' => 1, 'mf' => 16, 'mindur' => 60, 'minu' => 4, 'maxu' => 4),
12 => array('cost' => 9000, 'ghp' => 16, 'stat' => 1, 'bron' => 1, 'mf' => 19, 'mindur' => 70, 'minu' => 5, 'maxu' => 5),
13 => array('cost' => 18000, 'ghp' => 18, 'stat' => 1, 'bron' => 1, 'mf' => 22, 'mindur' => 80, 'minu' => 6, 'maxu' => 6)
);
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `doblest` FROM `users` WHERE `id` = "'.mysql_real_escape_string($uid).'" LIMIT 1'));
$salt = md5($user['login'].'|'.$user['id']);
if(isset($user['id'])) {
if($_POST['hash'] == $salt) {
$it = (int)$_POST['item'];
$item = mysql_fetch_array(mysql_query('SELECT * FROM `inventory` WHERE `owner` = "'.$user['id'].'" AND `id` = "'.mysql_real_escape_string($it).'" AND `point` > 0 AND `dressed` = 0 LIMIT 1'));
if(isset($item['id']) && ($item['nlevel'] >= 7 && $item['nlevel'] <= 13)) {
$level = $item['nlevel']+1;
if($user['doblest'] >= $arr[$level]['cost']) {
$user['doblest'] -= $arr[$level]['cost'];
mysql_query('UPDATE `users` SET `doblest` = "'.$user['doblest'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
if($item['type'] != 3) {
$item['ghp'] += $arr[$level]['ghp'];
if($item['bron1'] > 0) { $item['bron1'] += 1; }
if($item['bron2'] > 0) { $item['bron2'] += 1; }
if($item['bron3'] > 0) { $item['bron3'] += 1; }
if($item['bron4'] > 0) { $item['bron4'] += 1; }
if($item['mfkrit'] > 0) { $item['mfkrit'] += sums($item['mfkrit'], $arr[$level]['mf']); }
if($item['mfakrit'] > 0) { $item['mfakrit'] += sums($item['mfakrit'], $arr[$level]['mf']); }
if($item['mfuvorot'] > 0) { $item['mfuvorot'] += sums($item['mfuvorot'], $arr[$level]['mf']); }
if($item['mfauvorot'] > 0) { $item['mfauvorot'] += sums($item['mfauvorot'], $arr[$level]['mf']); }
if($item['gsila'] > 0) { $item['gsila'] += $arr[$level]['stat']; }
if($item['glovk'] > 0) { $item['glovk'] += $arr[$level]['stat']; }
if($item['ginta'] > 0) { $item['ginta'] += $arr[$level]['stat']; }
if($item['gintel'] > 0) { $item['gintel'] += $arr[$level]['stat']; }
}
if($item['type'] == 3) {
$item['minu'] += $arr[$level]['minu']; $item['maxu'] += $arr[$level]['minu'];
}
$item['nlevel'] += 1;
if($item['nsila'] > 0) { $item['nsila'] += 1; }
if($item['nlovk'] > 0) { $item['nlovk'] += 1; }
if($item['ninta'] > 0) { $item['ninta'] += 1; }
if($item['nvinos'] > 0) { $item['nvinos'] += 1; }
if($item['nintel'] > 0) { $item['nintel'] += 1; }
if($item['nnoj'] > 0) { $item['nnoj'] += 1; }
if($item['ntopor'] > 0) { $item['ntopor'] += 1; }
if($item['ndubina'] > 0) { $item['ndubina'] += 1; }
if($item['nmech'] > 0) { $item['nmech'] += 1; }
if($item['maxdur'] < $arr[$level]['mindur']) { $item['maxdur'] = $arr[$level]['mindur']; $item['duration'] = 0; }
mysql_query('UPDATE `inventory` SET `nlevel` = "'.$item['nlevel'].'", `ghp` = "'.$item['ghp'].'", `bron1` = "'.$item['bron1'].'", `bron2` = "'.$item['bron2'].'", `bron3` = "'.$item['bron3'].'", `bron4` = "'.$item['bron4'].'", `mfkrit` = "'.$item['mfkrit'].'", `mfakrit` = "'.$item['mfakrit'].'", `mfuvorot` = "'.$item['mfuvorot'].'", `mfauvorot` = "'.$item['mfauvorot'].'", `gsila` = "'.$item['gsila'].'", `glovk` = "'.$item['glovk'].'", `ginta` = "'.$item['ginta'].'", `gintel` = "'.$item['gintel'].'", `minu` = "'.$item['minu'].'", `maxu` = "'.$item['maxu'].'", `nsila` = "'.$item['nsila'].'", `nlovk` = "'.$item['nlovk'].'", `ninta` = "'.$item['ninta'].'", `nvinos` = "'.$item['nvinos'].'", `nintel` = "'.$item['nintel'].'", `nnoj` = "'.$item['nnoj'].'", `ntopor` = "'.$item['ntopor'].'", `ndubina` = "'.$item['ndubina'].'", `nmech` = "'.$item['nmech'].'", `maxdur` = "'.$item['maxdur'].'", `duration` = "'.$item['duration'].'" WHERE `id` = "'.$item['id'].'" LIMIT 1');
###
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"".$user['login']."\" улучшил предмет: \"".$item['name']."\" id:(".$item['id'].") [$item[duration]/".$item['maxdur']."] за ".$arr[$level]['cost']." реп, до уровня $item[nlevel].', 1, '".time()."')");
###
echo 'success';
} else {
echo 'Недостаточно репутации для операции ...';
}
} else {
echo 'Предмет не найден ...';
}
} else {
echo 'Утеря параметров. Код ошибки: 1001001.';
}
} else {
echo 'А вы кто ???';
}
} else {
echo 'Утерян параметр #hash# ...';
}
} else {
echo 'А вы кто ???';
}
} else {
echo 'Выберите предмет!';
}
?>