3853 lines
174 KiB
PHP
3853 lines
174 KiB
PHP
|
<?
|
|||
|
if(!defined('GAME')) { die(); }
|
|||
|
|
|||
|
class Balancer
|
|||
|
{
|
|||
|
public static function balance($items, $key)
|
|||
|
{
|
|||
|
$result = array();
|
|||
|
|
|||
|
$maxWeight = floor(self::sum($items, $key) / 2);
|
|||
|
|
|||
|
$numItems = count($items);
|
|||
|
|
|||
|
$sack = self::buildSack($numItems, $maxWeight);
|
|||
|
|
|||
|
for ($n = 1; $n <= $numItems; $n++)
|
|||
|
{
|
|||
|
// loop all items
|
|||
|
for ($weight = 1; $weight <= $maxWeight; $weight++)
|
|||
|
{
|
|||
|
$a = $sack[$n - 1][$weight]['value'];
|
|||
|
$b = null;
|
|||
|
$value = $items[$n - 1][$key];
|
|||
|
if ($value <= $weight)
|
|||
|
{
|
|||
|
$b = $value + $sack[$n - 1][$weight - $value]['value'];
|
|||
|
}
|
|||
|
$sack[$n][$weight]['value'] = ($b === null ? $a : max($a, $b));
|
|||
|
$sack[$n][$weight]['take'] = ($b === null ? false : $b > $a);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
$setA = array();
|
|||
|
$setB = array();
|
|||
|
|
|||
|
for ($n = $numItems, $weight = $maxWeight; $n > 0; $n--)
|
|||
|
{
|
|||
|
$item = $items[$n - 1];
|
|||
|
$value = $item[$key];
|
|||
|
if ($sack[$n][$weight]['take'])
|
|||
|
{
|
|||
|
$setA[] = $item;
|
|||
|
$weight = $weight - $value;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$setB[] = $item;
|
|||
|
$weight = $weight - $value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
return array($setA, $setB);
|
|||
|
}
|
|||
|
|
|||
|
protected static function sum($items, $key)
|
|||
|
{
|
|||
|
$sum = 0;
|
|||
|
foreach ($items as $item)
|
|||
|
{
|
|||
|
$sum += $item[$key];
|
|||
|
}
|
|||
|
return $sum;
|
|||
|
}
|
|||
|
|
|||
|
protected static function buildSack($width, $height)
|
|||
|
{
|
|||
|
$sack = array();
|
|||
|
for ($x = 0; $x <= $width; $x++)
|
|||
|
{
|
|||
|
$sack[$x] = array();
|
|||
|
for ($y = 0; $y <= $height; $y++) {
|
|||
|
$sack[$x][$y] = array(
|
|||
|
'value' => 0,
|
|||
|
'take' => false
|
|||
|
);
|
|||
|
}
|
|||
|
}
|
|||
|
return $sack;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
unset($_POST['kingfight'],$_POST['nobot'],$_POST['mut_clever']);
|
|||
|
|
|||
|
session_start();
|
|||
|
|
|||
|
function add_effn($uid,$id)
|
|||
|
{
|
|||
|
$g = array(0=>0,1=>'');
|
|||
|
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_main` WHERE `id2` = "'.$id.'" LIMIT 1'));
|
|||
|
if(isset($eff['id2']))
|
|||
|
{
|
|||
|
$n = $eff['mname'];
|
|||
|
$d = $eff['mdata'];
|
|||
|
$ins = mysql_query('INSERT INTO `eff_users` (`overType`,`id_eff`,`uid`,`name`,`timeUse`,`data`) VALUES ("'.$eff['oneType'].'","'.$eff['id2'].'","'.$uid.'","'.$n.'","'.time().'","'.$d.'")');
|
|||
|
if($ins)
|
|||
|
{
|
|||
|
$g[0] = 1;
|
|||
|
$g[1] = '...';
|
|||
|
}
|
|||
|
}
|
|||
|
return $g;
|
|||
|
}
|
|||
|
|
|||
|
//if( $u->info['id'] == 1008000 || $u->info['admin'] > 0 || $u->stats['silver'] > 0 ) {
|
|||
|
$u->info['no_zv_key'] = true;
|
|||
|
//}
|
|||
|
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "'.$u->info['align'].'" LIMIT 1'));
|
|||
|
if(isset($_POST['code21'])) { }
|
|||
|
|
|||
|
if(isset($_GET['del_z_time']) && $_GET['del_z_time'] != NULL) {
|
|||
|
$zay = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `id` = "'.$u->info['zv'].'" AND `creator` = "'.$u->info['id'].'" AND `start` = 0 AND `cancel` = 0 AND `btl_id` = 0 ORDER BY `id` DESC LIMIT 1'));
|
|||
|
if(isset($zay['id']) && $zay['priz'] == 0) {
|
|||
|
$colls = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$zay['id'].'"'));
|
|||
|
$cs = $colls[0];
|
|||
|
if(isset($zay['id'])) {
|
|||
|
if($u->info['zv'] == $zay['id'] && ($zay['creator'] == $u->info['id'])) {
|
|||
|
if($cs == 1) {
|
|||
|
mysql_query('UPDATE `stats` SET `zv` = 0 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('DELETE FROM `zayvki` WHERE `id` = "'.$zay['id'].'" LIMIT 1');
|
|||
|
$test_s = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...';
|
|||
|
} else {
|
|||
|
$test_s = '<27><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
} else {
|
|||
|
$test_s = '<27><> <20><> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> , <20><><EFBFBD><EFBFBD> <20><> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
} else {
|
|||
|
$test_s = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
class zayvki {
|
|||
|
public $zv_see,$error,$z1n = array(4=>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',5=>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),$z2n = array(4=>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',5=>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
|||
|
public function testTravm() {
|
|||
|
global $u;
|
|||
|
$r = 0;
|
|||
|
$tr_pl = mysql_fetch_array(mysql_query('SELECT `id`,`v1` FROM `eff_users` WHERE `id_eff` = 4 AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" ORDER BY `v1` DESC LIMIT 1'));
|
|||
|
if( isset($tr_pl['id']) ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if( $tr_pl['v1'] == 1 ) {
|
|||
|
//<2F><><EFBFBD> <20><>
|
|||
|
}elseif( $tr_pl['v1'] == 2 ) {
|
|||
|
$r = 1;
|
|||
|
}elseif( $tr_pl['v1'] == 3 ) {
|
|||
|
$r = 2;
|
|||
|
}
|
|||
|
}
|
|||
|
return $r;
|
|||
|
}
|
|||
|
|
|||
|
public function test()
|
|||
|
{
|
|||
|
global $code,$c,$u;
|
|||
|
|
|||
|
if( $u->info['zv'] > 0 ) {
|
|||
|
$test_zv = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `id` = "'.$u->info['zv'].'" LIMIT 1'));
|
|||
|
if(!isset($test_zv['id'])) {
|
|||
|
$u->info['zv'] = 0;
|
|||
|
}else{
|
|||
|
if( $test_zv['cancel'] > 0 || $test_zv['btl_id'] > 0 ) {
|
|||
|
$u->info['zv'] = 0;
|
|||
|
}
|
|||
|
if( $test_zv['time'] < time() - 3600 ) {
|
|||
|
$u->info['zv'] = 0;
|
|||
|
}
|
|||
|
}
|
|||
|
if( $u->info['zv'] == 0 ) {
|
|||
|
mysql_query('UPDATE `stats` SET `zv` = 0 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$sp = mysql_query('SELECT * FROM `turnirs` WHERE `status` != "-1"');
|
|||
|
while($pl = mysql_fetch_array($sp)) {
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if($pl['status'] == 0 && $pl['time'] > time() ) {
|
|||
|
if( floor(($pl['time']-time())/60) <= 2 && $pl['chat'] > 0 ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <20><><EFBFBD>.
|
|||
|
//$r = '<font color=red><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</b> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</font> ';
|
|||
|
//mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','".$r."','".time()."','6','0')");
|
|||
|
mysql_query('UPDATE `turnirs` SET `chat` = "0" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
}elseif( floor(($pl['time']-time())/60) <= 5 && $pl['chat'] > 1 ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 <20><><EFBFBD>.
|
|||
|
$r = '<font color=red><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</b> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 <20><><EFBFBD><EFBFBD><EFBFBD>.</font> ';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','".$r."','".time()."','6','0')");
|
|||
|
mysql_query('UPDATE `turnirs` SET `chat` = "1" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
}elseif( floor(($pl['time']-time())/60) <= 10 && $pl['chat'] > 2 ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 10 <20><><EFBFBD>.
|
|||
|
$r = '<font color=red><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</b> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 10 <20><><EFBFBD><EFBFBD><EFBFBD>.</font> ';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','".$r."','".time()."','6','0')");
|
|||
|
mysql_query('UPDATE `turnirs` SET `chat` = "2" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
}elseif( floor(($pl['time']-time())/60) <= 15 && $pl['chat'] > 3 ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 15 <20><><EFBFBD>.
|
|||
|
$r = '<font color=red><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</b> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 15 <20><><EFBFBD><EFBFBD><EFBFBD>.</font> ';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','".$r."','".time()."','6','0')");
|
|||
|
mysql_query('UPDATE `turnirs` SET `chat` = "3" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
}
|
|||
|
if($pl['status'] == 0 && $pl['time'] < time()) {
|
|||
|
if($pl['users_in'] > 1) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query('UPDATE `turnirs` SET `time` = "'.(time() + $pl['time3']).'",`status` = "1" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
//mysql_query('UPDATE `users` SET `inTurnirnew` = "0" WHERE `inTurnirnew` = "'.$pl['id'].'"');
|
|||
|
|
|||
|
$usp = mysql_query('SELECT * FROM `users` WHERE `inTurnirnew` = "'.$pl['id'].'" LIMIT '.$pl['users_in']);
|
|||
|
while($ur = mysql_fetch_array($usp))
|
|||
|
{
|
|||
|
mysql_query('INSERT INTO `users` (`login`,`room`,`name`,`sex`,`level`,`inTurnirnew`,`bithday`,`activ`) VALUES ("'.$ur['login'].'","318","'.$ur['name'].'","'.$ur['sex'].'","'.$t['level'].'","'.$pl['id'].'","01.01.2001","0")');
|
|||
|
$uri = mysql_insert_id();
|
|||
|
mysql_query('INSERT INTO `users_turnirs` (`uid`,`bot`,`turnir`) VALUES ("'.$ur['id'].'","'.$uri.'","'.$pl['id'].'")');
|
|||
|
$zid = 0;
|
|||
|
$x1 = 0;
|
|||
|
$y1 = 0;
|
|||
|
mysql_query('INSERT INTO `stats` (`upLevel`,`dnow`,`id`,`stats`,`exp`,`ability`,`skills`,`x`,`y`) VALUES ("98","'.$zid.'","'.$uri.'","s1=3|s2=3|s3=3|s4=3|s5=0|s6=0|rinv=40|m9=5|m6=10","0","0","0",'.$x1.','.$y1.')');
|
|||
|
mysql_query('UPDATE `users` SET `inUser` = "'.$uri.'" WHERE `id` = "'.$ur['id'].'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query('UPDATE `turnirs` SET `time` = "'.(time() + $pl['time2']).'",`users_in` = "0" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `users` SET `inTurnirnew` = "0" WHERE `inTurnirnew` = "'.$pl['id'].'"');
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$sp = mysql_query('SELECT * FROM `zayvki` AS `z` WHERE /*`z`.`city` = "'.$u->info['city'].'" AND*/ `z`.`btl_id` = "0" AND `z`.`cancel` = "0" AND `z`.`start` = "0" AND (`z`.`razdel` = 4 OR `z`.`razdel` = 5) ORDER BY `z`.`id` DESC LIMIT 22');
|
|||
|
while($pl = mysql_fetch_array($sp))
|
|||
|
{
|
|||
|
$uz = mysql_query('SELECT `u`.`sex`,`u`.`id`,`u`.`login`,`u`.`align`,`u`.`clan`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`online`,`u`.`level`,`u`.`battle`,`u`.`money`,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$pl['id'].'"');
|
|||
|
$tm1 = array();
|
|||
|
$tm2 = array();
|
|||
|
$i = array();
|
|||
|
$toChat = '';
|
|||
|
$toChat2 = '';
|
|||
|
$toWhere = '';
|
|||
|
while($t = mysql_fetch_array($uz))
|
|||
|
{
|
|||
|
if(!isset(${'tm'.$t['team']})){ ${'tm'.$t['team']} = array(); }
|
|||
|
if(!isset($i[$t['team']])){ $i[$t['team']] = 0; }
|
|||
|
${'tm'.$t['team']}[$i[$t['team']]] = $t;
|
|||
|
$toChat .= ''.$t['login'].',';
|
|||
|
$toWhere .= 'OR `id` = "'.$t['id'].'" ';
|
|||
|
if($pl['razdel'] == 5 && $pl['time_start']-180 < time()-$pl['time'] && $pl['send'] == 0) {
|
|||
|
$toChat2 .= ''.$u->microLogin2($t).', ';
|
|||
|
}
|
|||
|
$i[$t['team']]++;
|
|||
|
}
|
|||
|
//
|
|||
|
/*if($pl['razdel'] == 5 && $pl['time_start']-180 < time()-$pl['time'] && $pl['send'] == 0) {
|
|||
|
if( $toChat2 != '' ) {
|
|||
|
$toChat2 = rtrim($toChat2,', ');
|
|||
|
$text = '<font color=red ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!</font> ( '.$toChat2.' ) ('.$pl['min_lvl_1'].'-'.$pl['max_lvl_1'].') <img src=https://img.new-combats.com/i/fighttype'.$pl['type'].'.gif width=20 height=20 > <font color=grey > <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <b>3.0</b> <20><><EFBFBD>., <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3 <20><><EFBFBD>.</font>';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES (
|
|||
|
'1','".$zv['city']."','','','','".$text."','".time()."','6','0')");
|
|||
|
}
|
|||
|
mysql_query('UPDATE `zayvki` SET `send` = 1 WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
}*/
|
|||
|
//
|
|||
|
|
|||
|
if( $pl['razdel'] == 5 ) {
|
|||
|
$col_p = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$pl['id'].'"'));
|
|||
|
$cols = $col_p[0];
|
|||
|
if( $cols >= $pl['maxplayers'] ) {
|
|||
|
$pl['time_start'] = time()-$pl['time']-1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if($pl['time_start'] < time()-$pl['time'] || ($pl['razdel']==4 && $i[1]>=$pl['tm1max'] && $i[2]>=$pl['tm2max']))
|
|||
|
{
|
|||
|
$toChat = rtrim($toChat,',');
|
|||
|
$toWhere = ltrim($toWhere,'OR ');
|
|||
|
if($pl['razdel']==4)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if(!isset($i[1]) || !isset($i[2]) || (!isset($i[3]) && $pl['teams'] == 3))
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$this->cancelGroup($pl,$toChat);
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$this->startBattle($pl['id'],$toChat.'|-|'.$toWhere);
|
|||
|
}
|
|||
|
}elseif($pl['razdel']==5)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//
|
|||
|
$i = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$pl['id'].'" LIMIT 1'));
|
|||
|
if($i[0] < 4 && ($i[0] < 2 || $pl['fastfight'] == 0))
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$this->cancelGroup($pl,$toChat);
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$this->startBattle($pl['id'],$toChat.'|-|'.$toWhere);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public function testCronZv()
|
|||
|
{
|
|||
|
global $code,$c,$u;
|
|||
|
|
|||
|
$back_test = false;
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$sp = mysql_query('SELECT * FROM `turnirs` WHERE `status` != "-1"');
|
|||
|
while($pl = mysql_fetch_array($sp)) {
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if($pl['status'] == 0 && $pl['time'] < time()) {
|
|||
|
if($pl['users_in'] > 1) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query('UPDATE `turnirs` SET `time` = "'.(time() + $pl['time3']).'",`status` = "1" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
//mysql_query('UPDATE `users` SET `inTurnirnew` = "0" WHERE `inTurnirnew` = "'.$pl['id'].'"');
|
|||
|
|
|||
|
$usp = mysql_query('SELECT * FROM `users` WHERE `inTurnirnew` = "'.$pl['id'].'" LIMIT '.$pl['users_in']);
|
|||
|
while($ur = mysql_fetch_array($usp))
|
|||
|
{
|
|||
|
mysql_query('INSERT INTO `users` (`login`,`room`,`name`,`sex`,`level`,`inTurnirnew`,`bithday`,`activ`) VALUES ("'.$ur['login'].'","318","'.$ur['name'].'","'.$ur['sex'].'","'.$t['level'].'","'.$pl['id'].'","01.01.2001","0")');
|
|||
|
$uri = mysql_insert_id();
|
|||
|
mysql_query('INSERT INTO `users_turnirs` (`uid`,`bot`,`turnir`) VALUES ("'.$ur['id'].'","'.$uri.'","'.$pl['id'].'")');
|
|||
|
$zid = 0;
|
|||
|
$x1 = 0;
|
|||
|
$y1 = 0;
|
|||
|
mysql_query('INSERT INTO `stats` (`upLevel`,`dnow`,`id`,`stats`,`exp`,`ability`,`skills`,`x`,`y`) VALUES ("98","'.$zid.'","'.$uri.'","s1=3|s2=3|s3=3|s4=3|s5=0|s6=0|rinv=40|m9=5|m6=10","0","0","0",'.$x1.','.$y1.')');
|
|||
|
mysql_query('UPDATE `users` SET `inUser` = "'.$uri.'" WHERE `id` = "'.$ur['id'].'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query('UPDATE `turnirs` SET `time` = "'.(time() + $pl['time2']).'",`users_in` = "0" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `users` SET `inTurnirnew` = "0" WHERE `inTurnirnew` = "'.$pl['id'].'"');
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$sp = mysql_query('SELECT * FROM `zayvki` AS `z` WHERE `z`.`btl_id` = "0" AND `z`.`cancel` = "0" AND `z`.`start` = "0" AND (`z`.`razdel` = 4 OR `z`.`razdel` = 5) ORDER BY `z`.`id` DESC LIMIT 1000');
|
|||
|
while($pl = mysql_fetch_array($sp))
|
|||
|
{
|
|||
|
$uz = mysql_query('SELECT `u`.`sex`,`u`.`id`,`u`.`login`,`u`.`align`,`u`.`clan`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`online`,`u`.`level`,`u`.`battle`,`u`.`money`,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$pl['id'].'"');
|
|||
|
$tm1 = array();
|
|||
|
$tm2 = array();
|
|||
|
$i = array();
|
|||
|
$toChat = '';
|
|||
|
$toWhere = '';
|
|||
|
while($t = mysql_fetch_array($uz))
|
|||
|
{
|
|||
|
if(!isset(${'tm'.$t['team']})){ ${'tm'.$t['team']} = array(); }
|
|||
|
if(!isset($i[$t['team']])){ $i[$t['team']] = 0; }
|
|||
|
${'tm'.$t['team']}[$i[$t['team']]] = $t;
|
|||
|
$toChat .= ''.$t['login'].',';
|
|||
|
$toWhere .= 'OR `id` = "'.$t['id'].'" ';
|
|||
|
$i[$t['team']]++;
|
|||
|
}
|
|||
|
if($pl['time_start'] <= time()-$pl['time'] || ($pl['razdel']==4 && $i[1]>=$pl['tm1max'] && $i[2]>=$pl['tm2max']))
|
|||
|
{
|
|||
|
$toChat = rtrim($toChat,',');
|
|||
|
$toWhere = ltrim($toWhere,'OR ');
|
|||
|
if($pl['razdel']==4)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if(!isset($i[1]) || !isset($i[2]))
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$this->cancelGroup($pl,$toChat);
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$this->startBattle($pl['id'],$toChat.'|-|'.$toWhere);
|
|||
|
}
|
|||
|
}elseif($pl['razdel']==5)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$i = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$pl['id'].'" LIMIT 1'));
|
|||
|
if($i[0] < 4 && ($pl['fastfight'] == 0 || $i[0] < 2))
|
|||
|
{
|
|||
|
$rcf = mysql_fetch_array(mysql_query('SELECT `id`,`btl_cof` FROM `stats` WHERE `zv` = "'.$pl['id'].'" ORDER BY `btl_cof` DESC LIMIT 1'));
|
|||
|
$rcf = $rcf['btl_cof'];
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$lvl_btl_exp = array(
|
|||
|
0 => 0,
|
|||
|
1 => 110,
|
|||
|
2 => 420,
|
|||
|
3 => 1300,
|
|||
|
4 => 2500,
|
|||
|
5 => 5000,
|
|||
|
6 => 12500,
|
|||
|
7 => 30000,
|
|||
|
8 => 300000,
|
|||
|
9 => 3000000,
|
|||
|
10 => 10000000,
|
|||
|
11 => 52000000,
|
|||
|
12 => 63000000,
|
|||
|
13 => 182000000,
|
|||
|
14 => 212000000,
|
|||
|
15 => 352000000,
|
|||
|
16 => 504000000,
|
|||
|
17 => 1187000000,
|
|||
|
18 => 2455000000,
|
|||
|
19 => 4387000000,
|
|||
|
20 => 6355000000,
|
|||
|
21 =>15500000000,
|
|||
|
22 =>755500000000
|
|||
|
);
|
|||
|
$bot_users = array();
|
|||
|
|
|||
|
if( $pl['min_lvl_1'] <= 8 && $pl['max_lvl_1'] <= 8 && $pl['nobot'] == 0) {
|
|||
|
$bsp = mysql_query('SELECT
|
|||
|
`u`.`id`,
|
|||
|
`u`.`login`,
|
|||
|
`u`.`level`,
|
|||
|
`s`.`stats`,
|
|||
|
`u`.`cityreg`,
|
|||
|
`u`.`sex`,
|
|||
|
`u`.`obraz`,
|
|||
|
`s`.`upLevel`,
|
|||
|
`s`.`priems`,
|
|||
|
`s`.`btl_cof`
|
|||
|
FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`exp` >= '.$lvl_btl_exp[$pl['min_lvl_1']].' AND `s`.`exp` < '.$lvl_btl_exp[$pl['max_lvl_1']+1].' AND `s`.`bot` = "0" ORDER BY `s`.`btl_cof` DESC LIMIT 50');
|
|||
|
while( $bpl = mysql_fetch_array($bsp) ) {
|
|||
|
$bot_users[] = $bpl;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
$mincs = 4;
|
|||
|
if( $pl['fastfight'] > 0 ) {
|
|||
|
$mincs = 2;
|
|||
|
}
|
|||
|
|
|||
|
if( count($bot_users) == 0 ) {
|
|||
|
if($i[0] < 4 && ($pl['fastfight'] == 0 || $i[0] < 2)) {
|
|||
|
$text = ' <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. ('.$pl['id'].': '.count($bot_users).' '.$lvl_btl_exp[$pl['min_lvl_1']].'-'.$lvl_btl_exp[$pl['max_lvl_1']+1].')';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$zv['city']."','','','LEL','".$text."','".time()."','6','0')");
|
|||
|
$this->cancelGroup($pl,$toChat);
|
|||
|
}
|
|||
|
}else{
|
|||
|
$j = 0; $k = 0;
|
|||
|
$bot_users_new = array();
|
|||
|
while( $j < $mincs-$i[0] ) {
|
|||
|
$botlg = $bot_users[rand(0,count($bot_users)-1)];
|
|||
|
$j++;
|
|||
|
$clone = array(
|
|||
|
'id' => $botlg['id'],
|
|||
|
'login' => '<27><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> '.$j.')',
|
|||
|
'level' => $botlg['level'],
|
|||
|
'city' => $pl['city'],
|
|||
|
'cityreg' => $pl['city'],
|
|||
|
'name' => '<27><><EFBFBD><EFBFBD>',
|
|||
|
'sex' => $botlg['sex'],
|
|||
|
'deviz' => '',
|
|||
|
'hobby' => '',
|
|||
|
'time_reg' => time(),
|
|||
|
'obraz' => $botlg['obraz'],
|
|||
|
'stats' => $botlg['stats'],
|
|||
|
'upLevel' => $botlg['upLevel'],
|
|||
|
'priems' => $botlg['priems'],
|
|||
|
'loclon' => true
|
|||
|
);
|
|||
|
$bot = $u->addNewbot(1,NULL,$clone,NULL,true);
|
|||
|
if( $bot > 0 ) {
|
|||
|
mysql_query('UPDATE `stats` SET `btl_cof` = "'.$botlg['btl_cof'].'",`zv` = "'.$pl['id'].'",`hpNow` = "100000",`mpNow` = "100000" WHERE `id` = "'.$bot.'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `users` SET `room` = "303",`battle` = "0" WHERE `id` = "'.$bot.'" LIMIT 1');
|
|||
|
$k++;
|
|||
|
}
|
|||
|
}
|
|||
|
unset($bot_users,$bpl,$bsp,$bot);
|
|||
|
//$this->cancelGroup($pl,$toChat);
|
|||
|
if( $k+$i[0] >= 4 || ($pl['fastfight'] == 0 || $k+$i[0] >= 2) ) {
|
|||
|
$back_test = true;
|
|||
|
//$this->startBattle($pl['id'],$toChat.'|-|'.$toWhere);
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$this->startBattle($pl['id'],$toChat.'|-|'.$toWhere);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if( $back_test == true ) {
|
|||
|
$this->testCronZv();
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public function userInfo()
|
|||
|
{
|
|||
|
global $u,$c;
|
|||
|
$r = '';
|
|||
|
if($u->stats['mpAll']>0)
|
|||
|
{
|
|||
|
$pm = $u->stats['mpNow']/$u->stats['mpAll']*100;
|
|||
|
}
|
|||
|
$ph = $u->stats['hpNow']/$u->stats['hpAll']*100;
|
|||
|
$dp = '';
|
|||
|
if($u->stats['mpAll']<=0)
|
|||
|
{
|
|||
|
$dp = 'margin-top:13px;';
|
|||
|
}
|
|||
|
$r .= '<table border="0" cellspacing="0" cellpadding="0" height="20">
|
|||
|
<tr><td valign="middle"> <font>'.$u->microLogin($u->info['id'],1).'</font> </td>
|
|||
|
<td valign="middle" width="120">
|
|||
|
<div style="position:relative;'.$dp.'"><div id="vhp'.($u->info['id']).'" title="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>" align="left" class="seehp" style="position:absolute; top:-10px; width:120px; height:10px; z-index:12;"> '.floor($u->stats['hpNow']).'/'.$u->stats['hpAll'].'</div>
|
|||
|
<div title="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>" class="hpborder" style="position:absolute; top:-10px; width:120px; height:9px; z-index:13;"><img src="https://img.new-combats.com/1x1.gif" height="9" width="1"></div>
|
|||
|
<div class="hp_3 senohp" style="height:9px; width:'.floor(120/100*$ph).'px; position:absolute; top:-10px; z-index:11;" id="lhp'.($u->info['id']).'"><img src="https://img.new-combats.com/1x1.gif" height="9" width="1"></div>
|
|||
|
<div title="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>" class="hp_none" style="position:absolute; top:-10px; width:120px; height:10px; z-index:10;"><img src="https://img.new-combats.com/1x1.gif" height="10"></div>
|
|||
|
';
|
|||
|
|
|||
|
if($u->stats['mpAll']>0)
|
|||
|
{
|
|||
|
$r .= '<div id="vmp'.($u->info['id']).'" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" align="left" class="seemp" style="position:absolute; top:0px; width:120px; height:10px; z-index:12;"> '.floor($u->stats['mpNow']).'/'.$u->stats['mpAll'].'</div>
|
|||
|
<div title="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" class="hpborder" style="position:absolute; top:0px; width:120px; height:9px; z-index:13;"><img src="https://img.new-combats.com/1x1.gif" height="9" width="1"></div>
|
|||
|
<div class="hp_mp senohp" style="height:9px; position:absolute; top:0px; width:'.floor(120/100*$pm).'px; z-index:11;" id="lmp'.($u->info['id']).'"><img src="https://img.new-combats.com/1x1.gif" height="9" width="1"></div>
|
|||
|
<div title="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" class="hp_none" style="position:absolute; top:0px; width:120px; height:10px; z-index:10;"></div>';
|
|||
|
}
|
|||
|
$r .= '</div></td></tr></table>';
|
|||
|
unset($stt,$ph,$pm);
|
|||
|
return $r;
|
|||
|
}
|
|||
|
|
|||
|
public function cancelGroup($zv,$uids)
|
|||
|
{
|
|||
|
global $u;
|
|||
|
|
|||
|
if( $zv['priz'] > 0 ) {
|
|||
|
$sp = mysql_query('SELECT `id` FROM `stats` WHERE `zv` = "'.$zv['id'].'"');
|
|||
|
}
|
|||
|
$upd = mysql_query('UPDATE `stats` SET `zv` = "0" WHERE `zv` = "'.$zv['id'].'"');
|
|||
|
if($upd)
|
|||
|
{
|
|||
|
$upd = mysql_query('UPDATE `zayvki` SET `cancel` = "'.time().'" WHERE `id` = "'.$zv['id'].'"');
|
|||
|
if($upd && $uids != '')
|
|||
|
{
|
|||
|
if( $zv['priz'] > 0 ) {
|
|||
|
while( $pl = mysql_fetch_array($sp) ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if( $zv['type'] == 33 ) //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
$pld = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `inUser` = "'.$pl['id'].'"'));
|
|||
|
if (isset($pld['id']))
|
|||
|
{
|
|||
|
mysql_query('UPDATE `users` SET `inUser` = "0" WHERE `id` = "'.$pld['id'].'" LIMIT 1');
|
|||
|
$u->addItem(4754,$pld['id'],'');
|
|||
|
$uids=$pld['id'];
|
|||
|
mysql_query('DELETE FROM `users` WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
mysql_query('DELETE FROM `stats` WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$pl['id'].'" LIMIT 100');
|
|||
|
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$pl['id'].'" LIMIT 100');
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$u->addItem(4754,$pl['id'],'');
|
|||
|
}
|
|||
|
}
|
|||
|
$text = ' <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28>1)';
|
|||
|
}else{
|
|||
|
$text = ' <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$zv['city']."','','','".$uids."','".$text."','".time()."','6','0')");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public function add()
|
|||
|
{
|
|||
|
global $u,$c,$code;
|
|||
|
if(isset($_GET['r']) && $u->info['inTurnirnew']==0)
|
|||
|
{
|
|||
|
$r = round(intval($_GET['r']));
|
|||
|
if($r>=1 && $r<=5)
|
|||
|
{
|
|||
|
$az = 1;
|
|||
|
if($r==1 && $u->info['level']>0){ $az = 0; $this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;)'; }
|
|||
|
if(($r==2 || $r==3) && $u->info['level']<1){ $az = 0; $this->error = '<27><> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;)'; }
|
|||
|
if(($r==4 || $r==5) && $u->info['level']<2){ $az = 0; $this->error = '<27> '.$this->z1n[$r].' <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.'; }
|
|||
|
if(!isset($_POST['stavkakredit'])){ $_POST['stavkakredit'] = 0; }
|
|||
|
$money = (int)($_POST['stavkakredit']*100);
|
|||
|
$money = round(($money/100),2);
|
|||
|
|
|||
|
if( $this->testTravm() == 1 && $_POST['k'] != 1 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>.';
|
|||
|
$az = 0;
|
|||
|
}elseif( $this->testTravm() == 2 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
$az = 0;
|
|||
|
}elseif($u->info['hpNow']<$u->stats['hpAll']/100*30 && ($r>=1 || $r<=3)) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
} elseif($r==3 && $money>0 && $u->info['level']<4) {
|
|||
|
$this->error = '<27><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 4-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
} elseif($r==3 && $money<0.5 && $money>0) {
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0.50 <20><>.';
|
|||
|
$az = 0;
|
|||
|
} elseif($r==3 && $money>30) {
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 30.00 <20><>.';
|
|||
|
$az = 0;
|
|||
|
} elseif($r==3 && $money>$u->info['money']) {
|
|||
|
$this->error = '<27> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
}
|
|||
|
if($u->info['zv']>0){ $az = 0; $this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.'; }
|
|||
|
if($az==1)
|
|||
|
{
|
|||
|
$nz = array();
|
|||
|
$nz['city'] = $u->info['city'];
|
|||
|
$nz['creator'] = $u->info['id'];
|
|||
|
$nz['type'] = 0;
|
|||
|
if($_POST['k']==1){ $nz['type'] = 1; }
|
|||
|
if($_POST['k']==2){ $nz['type'] = 6; $nz['travmaChance'] = 100; }
|
|||
|
$_POST['timeout'] = round(intval(mysql_real_escape_string($_POST['timeout'])));
|
|||
|
if($_POST['timeout']==1 || $_POST['timeout']==2 || $_POST['timeout']==3 || $_POST['timeout']==4 || $_POST['timeout']==5)
|
|||
|
{
|
|||
|
$nz['timeout'] = $_POST['timeout']*60;
|
|||
|
}else{
|
|||
|
$nz['timeout'] = 3*60;
|
|||
|
}
|
|||
|
if($r==3)
|
|||
|
{
|
|||
|
if($_POST['onlyfor']!='')
|
|||
|
{
|
|||
|
$nz['withUser'] = mysql_real_escape_string($_POST['onlyfor']);
|
|||
|
}
|
|||
|
}
|
|||
|
$nz['razdel'] = $r;
|
|||
|
$nz['time_start'] = 0;
|
|||
|
$nz['min_lvl_1'] = 0;
|
|||
|
$nz['min_lvl_2'] = 0;
|
|||
|
$nz['max_lvl_1'] = 21;
|
|||
|
$nz['max_lvl_2'] = 21;
|
|||
|
$nz['tm1max'] = 0;
|
|||
|
$nz['tm2max'] = 0;
|
|||
|
$nz['invise'] = 0;
|
|||
|
$nz['money'] = 0;
|
|||
|
$nz['comment'] = '';
|
|||
|
$nz['tm1'] = 0;
|
|||
|
$nz['tm2'] = 0;
|
|||
|
$nz['otmorozok'] = 0;
|
|||
|
$gad = 1;
|
|||
|
if($r==3)
|
|||
|
{
|
|||
|
$nz['money'] = $money;
|
|||
|
}
|
|||
|
if($r==5 && $u->info['level']>1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
if($_POST['startime2'])
|
|||
|
{
|
|||
|
$nz['time_start'] = (int)$_POST['startime2'];
|
|||
|
$nz['comment'] = substr($_POST['cmt'], 0, 40);
|
|||
|
$nz['comment'] = str_replace('"','"',$nz['comment']);
|
|||
|
$nz['comment'] = htmlspecialchars($nz['comment'],NULL,'cp1251');
|
|||
|
if($nz['time_start']!=180 && $nz['time_start']!=300 && $nz['time_start']!=600 && $nz['time_start']!=900 && $nz['time_start']!=1200 && $nz['time_start']!=1800)
|
|||
|
{
|
|||
|
$nz['time_start'] = 600;
|
|||
|
}
|
|||
|
|
|||
|
if(isset($_POST['mut_hidden']))
|
|||
|
{
|
|||
|
$nz['invise'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['noinc'])) {
|
|||
|
$nz['noinc'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['fastfight'])) {
|
|||
|
$nz['fastfight'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['otmorozok'])) {
|
|||
|
$nz['otmorozok'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['nobot'])) {
|
|||
|
$nz['nobot'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['kingfight'])) {
|
|||
|
$nz['kingfight'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['arand'])) {
|
|||
|
$nz['arand'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['travma'])) {
|
|||
|
$nz['travmaChance'] = 100;
|
|||
|
}
|
|||
|
if(isset($_POST['noatack'])) {
|
|||
|
$nz['noatack'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['noeff'])) {
|
|||
|
$nz['noeff'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['smert'])) {
|
|||
|
$nz['smert'] = 1;
|
|||
|
}
|
|||
|
if(isset($_POST['noart'])) {
|
|||
|
$nz['noart'] = 1;
|
|||
|
}
|
|||
|
if( $nz['kingfight'] == 1 && $nz['fastfight'] == 1 ) {
|
|||
|
$nz['kingfight'] = 0;
|
|||
|
}
|
|||
|
|
|||
|
$nz['timeout'] = (int)$_POST['timeout'];
|
|||
|
if($nz['timeout']!=1 && $nz['timeout']!=2 && $nz['timeout']!=3 && $nz['timeout']!=4 && $nz['timeout']!=5)
|
|||
|
{
|
|||
|
$nz['timeout'] = 3;
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$lvl = (int)$_POST['levellogin1'];
|
|||
|
if($lvl == 0)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = 2;
|
|||
|
$nz['max_lvl_1'] = 21;
|
|||
|
}elseif($lvl == 3)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = $u->info['level'];
|
|||
|
$nz['max_lvl_1'] = $u->info['level'];
|
|||
|
$nz['min_lvl_2'] = $nz['min_lvl_1'];
|
|||
|
$nz['max_lvl_2'] = $nz['min_lvl_2'];
|
|||
|
}elseif($lvl == 6)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = $u->info['level']-1;
|
|||
|
$nz['max_lvl_2'] = $u->info['level']+1;
|
|||
|
}else{
|
|||
|
$nz['min_lvl_1'] = 2;
|
|||
|
$nz['max_lvl_1'] = 2;
|
|||
|
}
|
|||
|
|
|||
|
if((int)$_POST['k']==1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$nz['type'] = 1;
|
|||
|
}
|
|||
|
if((int)$_POST['k']==2)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$nz['type'] = 6;
|
|||
|
$nz['travmaChance'] = 1;
|
|||
|
}
|
|||
|
$nz['timeout'] = $nz['timeout']*60;
|
|||
|
|
|||
|
$nz['tm1'] = $u->stats['reting'];
|
|||
|
|
|||
|
if( $u->info['no_zv_key'] != true ) {
|
|||
|
if( $_POST['code21'] == 0 || $_POST['code21'] != $_SESSION['code2'] || $_SESSION['code2'] == 0 || !isset($_SESSION['code2']) ) {
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
$gad = 0;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}else{
|
|||
|
$gad = 0; $this->error = '<27><><EFBFBD>-<2D><> <20><> <20><><EFBFBD>...<br>';
|
|||
|
}
|
|||
|
}elseif($r==4 && $u->info['level']>1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
//'Array ( [startime] => 300 [timeout] => 1 [nlogin1] => 11 [levellogin1] => 0 [nlogin2] => 11 [levellogin2] => 0 [k] => 1 [travma] => on [mut_clever] => on [cmt] => <20><><EFBFBD><EFBFBD> [open] => <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>! :) )';
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
if($_POST['startime'])
|
|||
|
{
|
|||
|
$nz['time_start'] = (int)$_POST['startime'];
|
|||
|
$nz['comment'] = substr($_POST['cmt'], 0, 40);
|
|||
|
$nz['comment'] = str_replace('"','"',$nz['comment']);
|
|||
|
if($nz['time_start']!=300 && $nz['time_start']!=600 && $nz['time_start']!=900 && $nz['time_start']!=1200 && $nz['time_start']!=1800)
|
|||
|
{
|
|||
|
$nz['time_start'] = 600;
|
|||
|
}
|
|||
|
|
|||
|
$nz['timeout'] = (int)$_POST['timeout'];
|
|||
|
if($nz['timeout']!=1 && $nz['timeout']!=2 && $nz['timeout']!=3 && $nz['timeout']!=4 && $nz['timeout']!=5)
|
|||
|
{
|
|||
|
$nz['timeout'] = 3;
|
|||
|
}
|
|||
|
|
|||
|
$nz['timeout'] = $nz['timeout']*60;
|
|||
|
|
|||
|
$nz['tm1max'] = (int)$_POST['nlogin1'];
|
|||
|
if($nz['tm1max']<1 || $nz['tm1max']>99)
|
|||
|
{
|
|||
|
$this->error .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>';
|
|||
|
$gad = 0;
|
|||
|
}
|
|||
|
|
|||
|
$nz['tm2max'] = (int)$_POST['nlogin2'];
|
|||
|
if($nz['tm2max']<1 || $nz['tm2max']>99)
|
|||
|
{
|
|||
|
$this->error .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>';
|
|||
|
$gad = 0;
|
|||
|
}
|
|||
|
|
|||
|
if( $this->testTravm() == 1 && $_POST['k'] != 1 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>.';
|
|||
|
$gad = 0;
|
|||
|
}elseif( $this->testTravm() == 2 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
$gad = 0;
|
|||
|
}elseif($nz['tm1max']+$nz['tm2max']<3)
|
|||
|
{
|
|||
|
$this->error .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <20><> 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><br>';
|
|||
|
$gad = 0;
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$lvl = (int)$_POST['levellogin1'];
|
|||
|
if($lvl == 0)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = 2;
|
|||
|
$nz['max_lvl_1'] = 21;
|
|||
|
}elseif($lvl == 1)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = 2;
|
|||
|
$nz['max_lvl_1'] = $u->info['level'];
|
|||
|
}elseif($lvl == 2)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = 2;
|
|||
|
$nz['max_lvl_1'] = $u->info['level']-1;
|
|||
|
}elseif($lvl == 3)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = $u->info['level'];
|
|||
|
$nz['max_lvl_1'] = $u->info['level'];
|
|||
|
}elseif($lvl == 4)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = $u->info['level'];
|
|||
|
$nz['max_lvl_1'] = $u->info['level']+1;
|
|||
|
}elseif($lvl == 5)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = $u->info['level']-1;
|
|||
|
$nz['max_lvl_1'] = $u->info['level'];
|
|||
|
}elseif($lvl == 6)
|
|||
|
{
|
|||
|
$nz['min_lvl_1'] = $u->info['level']-1;
|
|||
|
$nz['max_lvl_1'] = $u->info['level']+1;
|
|||
|
}elseif($lvl == 6){
|
|||
|
$nz['min_lvl_1'] = 99;
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD>-<2D><> <20><> <20><><EFBFBD>...<br>';
|
|||
|
$gad = 0;
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$lvl = (int)$_POST['levellogin2'];
|
|||
|
if($lvl == 0)
|
|||
|
{
|
|||
|
$nz['min_lvl_2'] = 2;
|
|||
|
$nz['max_lvl_2'] = 21;
|
|||
|
}elseif($lvl == 1)
|
|||
|
{
|
|||
|
$nz['min_lvl_2'] = 2;
|
|||
|
$nz['max_lvl_2'] = $u->info['level'];
|
|||
|
}elseif($lvl == 2)
|
|||
|
{
|
|||
|
$nz['min_lvl_2'] = 2;
|
|||
|
$nz['max_lvl_2'] = $u->info['level']-1;
|
|||
|
}elseif($lvl == 3)
|
|||
|
{
|
|||
|
$nz['min_lvl_2'] = $u->info['level'];
|
|||
|
$nz['max_lvl_2'] = $u->info['level'];
|
|||
|
}elseif($lvl == 4)
|
|||
|
{
|
|||
|
$nz['min_lvl_2'] = $u->info['level'];
|
|||
|
$nz['max_lvl_2'] = $u->info['level']+1;
|
|||
|
}elseif($lvl == 5)
|
|||
|
{
|
|||
|
$nz['min_lvl_2'] = $u->info['level']-1;
|
|||
|
$nz['max_lvl_2'] = $u->info['level'];
|
|||
|
}elseif($lvl == 6)
|
|||
|
{
|
|||
|
$nz['min_lvl_2'] = $u->info['level']-1;
|
|||
|
$nz['max_lvl_2'] = $u->info['level']+1;
|
|||
|
}elseif($lvl == 6){
|
|||
|
$nz['min_lvl_2'] = 99;
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD>-<2D><> <20><> <20><><EFBFBD>...<br>';
|
|||
|
$gad = 0;
|
|||
|
}
|
|||
|
|
|||
|
if($nz['min_lvl_1']<2){ $nz['min_lvl_1'] = 2; }
|
|||
|
if($nz['max_lvl_1']>21){ $nz['max_lvl_1'] = 21; }
|
|||
|
if($nz['min_lvl_2']<2){ $nz['min_lvl_2'] = 2; }
|
|||
|
if($nz['max_lvl_2']>21){ $nz['max_lvl_2'] = 21; }
|
|||
|
|
|||
|
if((int)$_POST['k']==1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$nz['type'] = 1;
|
|||
|
}
|
|||
|
if((int)$_POST['k']==2)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$nz['type'] = 6;
|
|||
|
$nz['travmaChance'] = 100;
|
|||
|
}
|
|||
|
|
|||
|
}else{
|
|||
|
$gad = 0;
|
|||
|
$this->error = '<27><><EFBFBD>-<2D><> <20><> <20><><EFBFBD>...<br>';
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
$bt2 = (int)$_POST['bots2'];
|
|||
|
if($bt2!=0 && $r==4 && $u->info['level']>1){ $bt2 = 1; $nz['min_lvl_2'] = $u->info['level']; $nz['max_lvl_2'] = $u->info['level']; $nz['min_lvl_1'] = $u->info['level']; $nz['max_lvl_1'] = $u->info['level']; }else{ $bt2 = 0; }
|
|||
|
/*if( ($u->info['level'] == 8 || $u->info['level'] == 9) && $r == 5 ) {
|
|||
|
$test_zv_lvl = mysql_fetch_array(mysql_query('SELECT `id` FROM `zayvki` WHERE `city` = "'.$u->info['city'].'" AND `cancel` = "0" AND `min_lvl_1` = '.$u->info['level'].' AND `max_lvl_1` = '.$u->info['level'].' AND `btl_id` = 0 AND `razdel` = 5 LIMIT 1'));
|
|||
|
if( isset($test_zv_lvl['id']) ) {
|
|||
|
$gad = 0;
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>.';
|
|||
|
}
|
|||
|
}*/
|
|||
|
//$test_zvl = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `creator` = "'.$u->info['id'].'" AND `start` = 0 AND `cancel` = 0 LIMIT 1'));
|
|||
|
//if(isset($test_zvl['id'])) {
|
|||
|
// $gad = 0;
|
|||
|
// $this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>... <20> '.$test_zvl['id'].'<br>';
|
|||
|
//}
|
|||
|
if($gad==1)
|
|||
|
{
|
|||
|
if(!isset($nz['withUser'])){ $nz['withUser'] = ''; }
|
|||
|
$nz['time_create_zv'] = time();
|
|||
|
if( $nz['razdel'] == 4 || $nz['razdel'] == 5 ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$nz['time_create_zv'] = strtotime(date('d.m.Y H:i',$nz['time_create_zv']).':00',$nz['time_create_zv']);
|
|||
|
}elseif( $nz['razdel'] == 3 ) {
|
|||
|
$nz['noinc'] = 1;
|
|||
|
}
|
|||
|
$nz['teams'] = 2;
|
|||
|
$nz['align1'] = 0;
|
|||
|
$nz['align2'] = 0;
|
|||
|
$nz['align3'] = 0;
|
|||
|
if( isset($_POST['3align']) ) {
|
|||
|
$nz['teams'] = 3;
|
|||
|
$nz['min_lvl_1'] = 2;
|
|||
|
$nz['min_lvl_2'] = 2;
|
|||
|
$nz['max_lvl_1'] = 21;
|
|||
|
$nz['max_lvl_2'] = 21;
|
|||
|
//
|
|||
|
if( floor($u->info['align']) == 3 ) {
|
|||
|
$nz['align1'] = 3;
|
|||
|
$nz['align2'] = 1;
|
|||
|
$nz['align3'] = 7;
|
|||
|
}elseif( floor($u->info['align']) == 7 ) {
|
|||
|
$nz['align1'] = 7;
|
|||
|
$nz['align2'] = 1;
|
|||
|
$nz['align3'] = 3;
|
|||
|
}else{
|
|||
|
$nz['align1'] = 1;
|
|||
|
$nz['align2'] = 3;
|
|||
|
$nz['align3'] = 7;
|
|||
|
}
|
|||
|
//
|
|||
|
}
|
|||
|
//
|
|||
|
if( $nz['razdel'] == 2 && isset($_POST['commentfiz'])) {
|
|||
|
$nz['comment'] = htmlspecialchars($_POST['commentfiz'],NULL,'cp1251');
|
|||
|
}
|
|||
|
//
|
|||
|
if( $nz['razdel'] == 5 ) {
|
|||
|
$nz['maxplayers'] = array(
|
|||
|
6 => 6,
|
|||
|
8 => 8,
|
|||
|
10 => 10,
|
|||
|
12 => 12,
|
|||
|
14 => 14,
|
|||
|
16 => 16,
|
|||
|
18 => 18,
|
|||
|
20 => 20,
|
|||
|
40 => 40
|
|||
|
);
|
|||
|
if(isset($nz['players'][$_POST['players']])) {
|
|||
|
$nz['maxplayers'];
|
|||
|
}else{
|
|||
|
$nz['maxplayers'] = $nz['maxplayers'][$_POST['players']];
|
|||
|
}
|
|||
|
}
|
|||
|
//
|
|||
|
$ins = mysql_query('INSERT INTO `zayvki` (`maxplayers`,`otmorozok`,`align1`,`align2`,`align3`,`teams`,`smert`,`noart`,`noeff`,`noatack`,`arand`,`kingfight`,`nobot`,`fastfight`,`noinc`,`bot1`,`bot2`,`time`,`city`,`creator`,`type`,`time_start`,`timeout`,`min_lvl_1`,`min_lvl_2`,`max_lvl_1`,`max_lvl_2`,`tm1max`,`tm2max`,`travmaChance`,`invise`,`razdel`,`comment`,`money`,`withUser`,`tm1`,`tm2`) VALUES (
|
|||
|
"'.$nz['maxplayers'].'",
|
|||
|
"'.$nz['otmorozok'].'",
|
|||
|
"'.$nz['align1'].'",
|
|||
|
"'.$nz['align2'].'",
|
|||
|
"'.$nz['align3'].'",
|
|||
|
"'.$nz['teams'].'",
|
|||
|
"'.$nz['smert'].'",
|
|||
|
"'.$nz['noart'].'",
|
|||
|
"'.$nz['noeff'].'",
|
|||
|
"'.$nz['noatack'].'",
|
|||
|
"'.$nz['arand'].'",
|
|||
|
"'.$nz['kingfight'].'",
|
|||
|
"'.$nz['nobot'].'",
|
|||
|
"'.$nz['fastfight'].'",
|
|||
|
"'.$nz['noinc'].'",
|
|||
|
"0",
|
|||
|
"'.((int)$bt2).'",
|
|||
|
"'.$nz['time_create_zv'].'",
|
|||
|
"'.$nz['city'].'",
|
|||
|
"'.$nz['creator'].'",
|
|||
|
"'.$nz['type'].'",
|
|||
|
"'.$nz['time_start'].'",
|
|||
|
"'.mysql_real_escape_string($nz['timeout']).'",
|
|||
|
"'.mysql_real_escape_string($nz['min_lvl_1']).'",
|
|||
|
"'.mysql_real_escape_string($nz['min_lvl_2']).'",
|
|||
|
"'.mysql_real_escape_string($nz['max_lvl_1']).'",
|
|||
|
"'.mysql_real_escape_string($nz['max_lvl_2']).'",
|
|||
|
"'.mysql_real_escape_string($nz['tm1max']).'",
|
|||
|
"'.mysql_real_escape_string($nz['tm2max']).'",
|
|||
|
"'.$nz['travmaChance'].'",
|
|||
|
"'.$nz['invise'].'",
|
|||
|
"'.$nz['razdel'].'",
|
|||
|
"'.mysql_real_escape_string($nz['comment']).'",
|
|||
|
"'.mysql_real_escape_string($nz['money']).'",
|
|||
|
"'.$nz['withUser'].'","'.$nz['tm1'].'","'.$nz['tm2'].'")');
|
|||
|
$zid = mysql_insert_id();
|
|||
|
if($ins)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `stats` SET `zv`="'.$zid.'",`team`="1" WHERE `id`="'.$u->info['id'].'" LIMIT 1');
|
|||
|
$u->info['zv'] = $zid;
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}else{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...'.$ins;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
public function addBot()
|
|||
|
{
|
|||
|
global $u,$c,$code;
|
|||
|
/*$trEn = 1;
|
|||
|
|
|||
|
if($u->info['level'] == 0) {
|
|||
|
/*
|
|||
|
14 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
8 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
//$trEn = 0;
|
|||
|
//}elseif($u->info['level'] == 1) {
|
|||
|
/*
|
|||
|
27 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
12 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
//$trEn = 1;
|
|||
|
//}elseif($u->info['level'] == 2) {
|
|||
|
/*
|
|||
|
27 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
12 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
//$trEn = 1;
|
|||
|
//}elseif($u->info['level'] == 3) {
|
|||
|
/*
|
|||
|
27 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
12 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
//$trEn = 1;
|
|||
|
//}elseif($u->info['level'] == 4) {
|
|||
|
/*
|
|||
|
27 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
12 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
//$trEn = 1;
|
|||
|
//}else{
|
|||
|
// $trEn = floor($u->info['level']+(1.25*$u->info['level']));
|
|||
|
//}
|
|||
|
|
|||
|
//if($u->info['level']>5 && $u->info['admin']==0) {
|
|||
|
if(($u->info['level'] <= $c['bot_level'] || $u->info['admin'] > 0) && $u->info['exp'] != 12499) {
|
|||
|
//if($trEn > $u->info['enNow']) {
|
|||
|
$bot = $u->addNewbot($id['id'],NULL,$u->info['id'],NULL,true);
|
|||
|
}else{
|
|||
|
$bot = false;
|
|||
|
}
|
|||
|
if($bot==false)
|
|||
|
{
|
|||
|
//if($trEn > $u->info['enNow']) {
|
|||
|
// $this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '.$trEn.' <20><>., <20> <20><><EFBFBD> ['.floor(0+$u->info['enNow']).'/'.(0+$u->stats['enAll']).']<br>'.
|
|||
|
// '<small><3E><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!</small>';
|
|||
|
//}else{
|
|||
|
$this->error = '<27><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 8 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...<br><3E><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...<br>';
|
|||
|
//}
|
|||
|
}elseif($u->info['hpNow']<$u->stats['hpAll']/100*30 && ($r>=1 || $r<=3))
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
}elseif($u->info['align'] == 2)
|
|||
|
{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
}elseif($bot==false)
|
|||
|
{
|
|||
|
echo '<br><font color=red>Cannot start battle (no prototype "ND0Clone")</font><br>';
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$expB = 0;
|
|||
|
$btl = array('smert' => 0,'noart' => 0,'noeff' => 0,'otmorozok'=>0,'noatack' => 0,'priz' => 0 , 'arand' => 0,'kingfight' => 0,'nobot' => 0,'fastfight' => 0,'players'=>'','timeout'=>60,'type'=>0,'invis'=>0,'noinc'=>0,'travmChance'=>0,'typeBattle'=>0,'addExp'=>$expB,'money'=>0,'money3'=>0);
|
|||
|
$ins = mysql_query('INSERT INTO `battle` (`otmorozok`,`smert`,`noart`,`noeff`,`noatack`,`arand`,`kingfight`,`nobot`,`fastfight`,`clone`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`,`priz`) VALUES (
|
|||
|
"'.$btl['otmorozok'].'",
|
|||
|
"'.$btl['smert'].'",
|
|||
|
"'.$btl['noart'].'",
|
|||
|
"'.$btl['noeff'].'",
|
|||
|
"'.$btl['noatack'].'",
|
|||
|
"'.$btl['arand'].'",
|
|||
|
"'.$btl['kingfight'].'",
|
|||
|
"'.$btl['nobot'].'",
|
|||
|
"'.$btl['fastfight'].'",
|
|||
|
"1",
|
|||
|
"'.$u->info['city'].'",
|
|||
|
"'.time().'",
|
|||
|
"'.$btl['players'].'",
|
|||
|
"'.$btl['timeout'].'",
|
|||
|
"'.$btl['type'].'",
|
|||
|
"'.$btl['invis'].'",
|
|||
|
"'.$btl['noinc'].'",
|
|||
|
"'.$btl['travmChance'].'",
|
|||
|
"'.$btl['typeBattle'].'",
|
|||
|
"'.$btl['addExp'].'",
|
|||
|
"'.$btl['money'].'",
|
|||
|
"'.$btl['priz'].'")');
|
|||
|
if($ins)
|
|||
|
{
|
|||
|
$btl_id = mysql_insert_id();
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$u->info['enNow'] -= $trEn;
|
|||
|
$upd2 = mysql_query('UPDATE `users` SET `battle`="'.$btl_id.'" WHERE `id` = "'.$u->info['id'].'" OR `id` = "'.$bot.'" LIMIT 2');
|
|||
|
mysql_query('UPDATE `stats` SET `team`="1",`enNow` = "'.$u->info['enNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `hpNow` = "'.$u->stats['hpAll'].'",`team`="2" WHERE `id` = "'.$bot.'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
if($btl['type']==1)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$u->info['id'].'" AND `inOdet`!=0');
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$bot.'" AND `inOdet`!=0');
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$u->info['battle'] = $btl_id;
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query("INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('".$u->info['city']."','".$u->info['room']."','".$u->info['login']."','".time()."','11','0','117')");
|
|||
|
die('<script>location="main.php?battle_id='.$btl_id.'";</script>');
|
|||
|
}else{
|
|||
|
$this->error = 'Cannot start battle (no prototype "ABD0Clone")';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
public function addBotClone($uid)
|
|||
|
{
|
|||
|
global $u,$c,$code;
|
|||
|
|
|||
|
//if($u->info['level']>5 && $u->info['admin']==0) {
|
|||
|
if($u->info['online'] > 0) {
|
|||
|
//if($trEn > $u->info['enNow']) {
|
|||
|
$bot = $u->addNewbot($id['id'],NULL,$uid,NULL,false);
|
|||
|
}else{
|
|||
|
$bot = false;
|
|||
|
}
|
|||
|
if($bot==false)
|
|||
|
{
|
|||
|
//if($trEn > $u->info['enNow']) {
|
|||
|
// $this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '.$trEn.' <20><>., <20> <20><><EFBFBD> ['.floor(0+$u->info['enNow']).'/'.(0+$u->stats['enAll']).']<br>'.
|
|||
|
// '<small><3E><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!</small>';
|
|||
|
//}else{
|
|||
|
//$this->error = '<27><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 8 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...<br><3E><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...<br>';
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
//}
|
|||
|
}elseif($u->info['hpNow']<$u->stats['hpAll']/100*30 && ($r>=1 || $r<=3))
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
}elseif($u->info['align'] == 2)
|
|||
|
{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
}elseif($bot==false)
|
|||
|
{
|
|||
|
echo '<br><font color=red>Cannot start battle (no prototype "ND0Clone")</font><br>';
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$expB = 0;
|
|||
|
$btl = array('priz' => 0 , 'smert' => 0,'noart' => 0,'noeff' => 0,'noatack' => 0,'arand' => 0,'kingfight' => 0,'nobot' => 0,'fastfight' => 0,'players'=>'','timeout'=>60,'type'=>0,'invis'=>0,'noinc'=>0,'travmChance'=>0,'typeBattle'=>0,'addExp'=>$expB,'money'=>0,'money3'=>0);
|
|||
|
$ins = mysql_query('INSERT INTO `battle` (`otmorozok`,`priz`,`smert`,`noart`,`noeff`,`noatack`,`arand`,`kingfight`,`nobot`,`fastfight`,`clone`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
|
|||
|
"'.$btl['otmorozok'].'",
|
|||
|
"'.$btl['priz'].'",
|
|||
|
"'.$btl['smert'].'",
|
|||
|
"'.$btl['noart'].'",
|
|||
|
"'.$btl['noeff'].'",
|
|||
|
"'.$btl['noatack'].'",
|
|||
|
"'.$btl['arand'].'",
|
|||
|
"'.$btl['kingfight'].'",
|
|||
|
"'.$btl['nobot'].'",
|
|||
|
"'.$btl['fastfight'].'",
|
|||
|
"1",
|
|||
|
"'.$u->info['city'].'",
|
|||
|
"'.time().'",
|
|||
|
"'.$btl['players'].'",
|
|||
|
"'.$btl['timeout'].'",
|
|||
|
"564",
|
|||
|
"'.$btl['invis'].'",
|
|||
|
"'.$btl['noinc'].'",
|
|||
|
"'.$btl['travmChance'].'",
|
|||
|
"'.$btl['typeBattle'].'",
|
|||
|
"'.$btl['addExp'].'",
|
|||
|
"'.$btl['money'].'")');
|
|||
|
if($ins)
|
|||
|
{
|
|||
|
$btl_id = mysql_insert_id();
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$u->info['enNow'] -= $trEn;
|
|||
|
$upd2 = mysql_query('UPDATE `users` SET `battle`="'.$btl_id.'" WHERE `id` = "'.$u->info['id'].'" OR `id` = "'.$bot.'" LIMIT 2');
|
|||
|
mysql_query('UPDATE `stats` SET `team`="1",`enNow` = "'.$u->info['enNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `team`="2" WHERE `id` = "'.$bot.'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
if($btl['type']==1)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$u->info['id'].'" AND `inOdet`!=0');
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$bot.'" AND `inOdet`!=0');
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$u->info['battle'] = $btl_id;
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query("INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('".$u->info['city']."','".$u->info['room']."','".$u->info['login']."','".time()."','11','0','117')");
|
|||
|
die('<script>location="main.php?battle_id='.$btl_id.'";</script>');
|
|||
|
}else{
|
|||
|
$this->error = 'Cannot start battle (no prototype "ABD0Clone")';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
public function startIzlom($id2,$lvl)
|
|||
|
{
|
|||
|
global $u,$c,$code;
|
|||
|
$lvl = (int)$lvl;
|
|||
|
|
|||
|
if( $lvl == 8 ) {
|
|||
|
/*
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
$bots = array( '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>' );
|
|||
|
}
|
|||
|
|
|||
|
$id2 = rand(0,(count($bots)-1));
|
|||
|
$id = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `login` = "'.$bots[$id2].'" AND `level` <= "'.$u->info['level'].'" AND `pishera` != "" AND `active` = "1" ORDER BY `level` DESC LIMIT 1'));
|
|||
|
$logins_bot = array();
|
|||
|
$bot = $u->addNewbot($id['id'],NULL,NULL,$logins_bot,NULL);
|
|||
|
|
|||
|
if(isset($id['id']) && $bot != false)
|
|||
|
{
|
|||
|
$logins_bot = $bot['logins_bot'];
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$expB = -$bot['expB'];
|
|||
|
$btl = array('priz'=>'','players'=>'','otmorozok'=>0,'timeout'=>60,'type'=>9,'invis'=>0,'noinc'=>0,'travmChance'=>0,'typeBattle'=>0,'addExp'=>$expB,'money'=>0,'izlom'=>(int)$id2,'izlomLvl'=>(int)$lvl);
|
|||
|
$ins = mysql_query('INSERT INTO `battle` (`otmorozok`,`priz`,`smert`,`noart`,`noeff`,`noatack`,`arand`,`kingfight`,`nobot`,`fastfight`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`,`izlom`,`izlomLvl`) VALUES (
|
|||
|
"'.$btl['otmorozok'].'",
|
|||
|
"'.$btl['priz'].'",
|
|||
|
"'.$btl['smert'].'",
|
|||
|
"'.$btl['noart'].'",
|
|||
|
"'.$btl['noeff'].'",
|
|||
|
"'.$btl['noatack'].'",
|
|||
|
"'.$btl['arand'].'",
|
|||
|
"'.$btl['kingfight'].'",
|
|||
|
"'.$btl['nobot'].'",
|
|||
|
"'.$btl['fastfight'].'",
|
|||
|
"'.$u->info['city'].'",
|
|||
|
"'.time().'",
|
|||
|
"'.$btl['players'].'",
|
|||
|
"'.$btl['timeout'].'",
|
|||
|
"'.$btl['type'].'",
|
|||
|
"'.$btl['invis'].'",
|
|||
|
"'.$btl['noinc'].'",
|
|||
|
"'.$btl['travmChance'].'",
|
|||
|
"'.$btl['typeBattle'].'",
|
|||
|
"'.$btl['addExp'].'",
|
|||
|
"'.$btl['money'].'","'.$btl['izlom'].'","'.$btl['izlomLvl'].'")');
|
|||
|
if($ins)
|
|||
|
{
|
|||
|
$btl_id = mysql_insert_id();
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$upd2 = mysql_query('UPDATE `users` SET `battle`="'.$btl_id.'" WHERE `id` = "'.$u->info['id'].'" OR `id` = "'.$bot['id'].'" LIMIT 2');
|
|||
|
mysql_query('UPDATE `stats` SET `team`="1" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `team`="2" WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
if($btl['type']==1)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$u->info['id'].'" AND `inOdet`!=0');
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$bot['id'].'" AND `inOdet`!=0');
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$u->info['battle'] = $btl_id;
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> 2 <20><><EFBFBD><EFBFBD>
|
|||
|
$id2 = rand(0,(count($bots)-1));
|
|||
|
$id = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `login` = "'.$bots[$id2].'" AND `level` <= "'.$u->info['level'].'" AND `pishera` != "" AND `active` = "1" ORDER BY `level` DESC LIMIT 1'));
|
|||
|
$bot = $u->addNewbot($id['id'],NULL,NULL,$logins_bot,NULL);
|
|||
|
if(isset($id['id']) && $bot != false) {
|
|||
|
$logins_bot = $bot['logins_bot'];
|
|||
|
mysql_query('UPDATE `users` SET `battle`="'.$btl_id.'" WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `team`="2" WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
$id2 = rand(0,(count($bots)-1));
|
|||
|
$id = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `login` = "'.$bots[$id2].'" AND `level` <= "'.$u->info['level'].'" AND `pishera` != "" AND `active` = "1" ORDER BY `level` DESC LIMIT 1'));
|
|||
|
$bot = $u->addNewbot($id['id'],NULL,NULL,$logins_bot,NULL);
|
|||
|
if(isset($id['id']) && $bot != false) {
|
|||
|
$logins_bot = $bot['logins_bot'];
|
|||
|
mysql_query('UPDATE `users` SET `battle`="'.$btl_id.'" WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `team`="2" WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query("INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('".$u->info['city']."','".$u->info['room']."','".$u->info['login']."','".time()."','11','0','117')");
|
|||
|
die('<script>location="main.php?battle_id='.$btl_id.'";</script>');
|
|||
|
}else{
|
|||
|
$this->error = 'Cannot start battle (no prototype "ABD0'.$id['id'].'")';
|
|||
|
}
|
|||
|
}else{
|
|||
|
echo '<br><font color=red>Cannot start battle (no prototype "ND0IZ'.$lvl.'")</font><br>';
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public function startBattle($id,$vars = NULL)
|
|||
|
{
|
|||
|
global $c,$code,$u;
|
|||
|
$z = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `id`="'.$id.'" AND `start` = "0" AND `cancel` = "0" AND (`time` > "'.(time()-60*60*2).'" OR `razdel` > 3) LIMIT 1'));
|
|||
|
if ($z['type']==33)
|
|||
|
{
|
|||
|
sleep(5);
|
|||
|
}
|
|||
|
mysql_query('START TRANSACTION');
|
|||
|
mysql_query("LOCK TABLES
|
|||
|
`aaa_monsters` WRITE,
|
|||
|
`actions` WRITE,
|
|||
|
`bank` WRITE,
|
|||
|
|
|||
|
`battle` WRITE,
|
|||
|
`battle_act` WRITE,
|
|||
|
`battle_actions` WRITE,
|
|||
|
`battle_cache` WRITE,
|
|||
|
`battle_end` WRITE,
|
|||
|
`battle_last` WRITE,
|
|||
|
`battle_logs` WRITE,
|
|||
|
`battle_logs_save` WRITE,
|
|||
|
`battle_stat` WRITE,
|
|||
|
`battle_users` WRITE,
|
|||
|
|
|||
|
`bs_actions` WRITE,
|
|||
|
`bs_items` WRITE,
|
|||
|
`bs_items_use` WRITE,
|
|||
|
`bs_logs` WRITE,
|
|||
|
`bs_map` WRITE,
|
|||
|
`bs_statistic` WRITE,
|
|||
|
`bs_trap` WRITE,
|
|||
|
`bs_turnirs` WRITE,
|
|||
|
`bs_zv` WRITE,
|
|||
|
|
|||
|
`clan` WRITE,
|
|||
|
`clan_wars` WRITE,
|
|||
|
|
|||
|
`dungeon_actions` WRITE,
|
|||
|
`dungeon_bots` WRITE,
|
|||
|
`dungeon_items` WRITE,
|
|||
|
`dungeon_map` WRITE,
|
|||
|
`dungeon_now` WRITE,
|
|||
|
`dungeon_zv` WRITE,
|
|||
|
|
|||
|
`eff_main` WRITE,
|
|||
|
`eff_users` WRITE,
|
|||
|
|
|||
|
`items_img` WRITE,
|
|||
|
`items_local` WRITE,
|
|||
|
`items_main` WRITE,
|
|||
|
`items_main_data` WRITE,
|
|||
|
`items_users` WRITE,
|
|||
|
|
|||
|
`izlom` WRITE,
|
|||
|
`izlom_rating` WRITE,
|
|||
|
|
|||
|
`laba_act` WRITE,
|
|||
|
`laba_itm` WRITE,
|
|||
|
`laba_map` WRITE,
|
|||
|
`laba_now` WRITE,
|
|||
|
`laba_obj` WRITE,
|
|||
|
|
|||
|
`levels` WRITE,
|
|||
|
`levels_animal` WRITE,
|
|||
|
|
|||
|
`online` WRITE,
|
|||
|
|
|||
|
`priems` WRITE,
|
|||
|
|
|||
|
`quests` WRITE,
|
|||
|
`reimage` WRITE,
|
|||
|
|
|||
|
`reg` WRITE,
|
|||
|
|
|||
|
`stats` WRITE,
|
|||
|
`test_bot` WRITE,
|
|||
|
`turnirs` WRITE,
|
|||
|
`users` WRITE,
|
|||
|
`users_animal` WRITE,
|
|||
|
`user_ico` WRITE,
|
|||
|
`users_twink` WRITE,
|
|||
|
`zayvki` WRITE;");
|
|||
|
$z = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `id`="'.$id.'" AND `start` = "0" AND `cancel` = "0" AND (`time` > "'.(time()-60*60*2).'" OR `razdel` > 3) LIMIT 1'));
|
|||
|
if(isset($z['id']))
|
|||
|
{
|
|||
|
$vars = explode('|-|',$vars);
|
|||
|
if($z['razdel']>=4 && $z['razdel']<=5)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$btl_id = 0;
|
|||
|
//$txtz = '';
|
|||
|
if($z['razdel']==5)
|
|||
|
{
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//$sp = mysql_query('SELECT `s`.`id`,`s`.`team`,`s`.`upLevel`,`s`.`btl_cof`,`s`.`exp` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`zv` = "'.$z['id'].'" ORDER BY `u`.`online` DESC LIMIT 200');
|
|||
|
|
|||
|
$sp = mysql_query('SELECT `s`.`id`,`s`.`team`,`s`.`upLevel`,`s`.`btl_cof`,`s`.`exp` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`zv` = "'.$z['id'].'" ORDER BY `s`.`btl_cof` DESC LIMIT 200');
|
|||
|
|
|||
|
|
|||
|
$tsr = rand(0,100);
|
|||
|
if($tsr >= 70 && $z['type']!=33)
|
|||
|
{
|
|||
|
|
|||
|
|
|||
|
$ii=-1;
|
|||
|
while($pl = mysql_fetch_array($sp))
|
|||
|
{
|
|||
|
$ii++;
|
|||
|
$pld[$ii]=$pl;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
$yy=$ii;
|
|||
|
$jj=$ii;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> c <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$ii=0;
|
|||
|
$teamA=0;
|
|||
|
$teamAbtlconf=0;
|
|||
|
$teamB=0;
|
|||
|
$teamBbtlconf=0;
|
|||
|
while($yy > -1 )
|
|||
|
{
|
|||
|
|
|||
|
|
|||
|
if ($ii == 0)
|
|||
|
{
|
|||
|
if (isset ($pld[$ii])){
|
|||
|
$teamnew=1;
|
|||
|
$teamAbtlconf=$teamAbtlconf+$pld[$ii]['btl_cof'];
|
|||
|
$teamA++;
|
|||
|
$idi=$ii;
|
|||
|
mysql_query('UPDATE `stats` SET `team` = "'.$teamnew.'" WHERE `id` = "'.$pld[$idi]['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
$ii++;
|
|||
|
}
|
|||
|
elseif($teamAbtlconf<=$teamBbtlconf)
|
|||
|
{
|
|||
|
if (isset ($pld[$ii])){
|
|||
|
$teamnew=1;
|
|||
|
$teamAbtlconf=$teamAbtlconf+$pld[$ii]['btl_cof'];
|
|||
|
$teamA++;
|
|||
|
$idi=$ii;
|
|||
|
mysql_query('UPDATE `stats` SET `team` = "'.$teamnew.'" WHERE `id` = "'.$pld[$idi]['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
$ii++;
|
|||
|
}
|
|||
|
elseif($teamAbtlconf>$teamBbtlconf && ($teamB-$teamA) <= 0)
|
|||
|
{
|
|||
|
if (isset ($pld[$ii])){
|
|||
|
$teamnew=2;
|
|||
|
$teamBbtlconf=$teamBbtlconf+$pld[$ii]['btl_cof'];
|
|||
|
$teamB++;
|
|||
|
$idi=$ii;
|
|||
|
mysql_query('UPDATE `stats` SET `team` = "'.$teamnew.'" WHERE `id` = "'.$pld[$idi]['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
$ii++;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
if (isset ($pld[$ii])){
|
|||
|
$teamnew=1;
|
|||
|
$teamAbtlconf=$teamAbtlconf+$pld[$jj]['btl_cof'];
|
|||
|
$teamA++;
|
|||
|
$idi=$jj;
|
|||
|
mysql_query('UPDATE `stats` SET `team` = "'.$teamnew.'" WHERE `id` = "'.$pld[$idi]['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
$jj--;
|
|||
|
}
|
|||
|
|
|||
|
$yy--;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
else
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$balansteamA=0;
|
|||
|
$balansteamB=0;
|
|||
|
while($pl = mysql_fetch_array($sp))
|
|||
|
{
|
|||
|
|
|||
|
$teamnew=rand(1,2);
|
|||
|
|
|||
|
if ($balansteamA != $balansteamB)
|
|||
|
{
|
|||
|
if ($balansteamA > $balansteamB) {$teamnew=2;} else {$teamnew=1;};
|
|||
|
};
|
|||
|
|
|||
|
mysql_query('UPDATE `stats` SET `team` = "'.$teamnew.'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
if ($teamnew==1){$balansteamA+=1;}else{$balansteamB+=1;};
|
|||
|
};
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
unset($sp,$pl);
|
|||
|
//
|
|||
|
}
|
|||
|
|
|||
|
//mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$u->info['city']."','','','','[battle_type[".$z['razdel']."]]".$txtz."','".time()."','6','0')");
|
|||
|
|
|||
|
$btl = array(
|
|||
|
'otmorozok' => $z['otmorozok'],
|
|||
|
'priz' => $z['priz'],'smert' => $z['smert'],'noart' => $z['noart'],'noeff' => $z['noeff'],'noatack' => $z['noatack'],'arand' => $z['arand'],'kingfight' => $z['kingfight'],
|
|||
|
'players'=>'','timeout'=>$z['timeout'],'type'=>$z['type'],'travmChance'=>$z['travmChance'],'invis'=>$z['invise'],'noinc'=>0,'typeBattle'=>0,'addExp'=>$z['exp'],'money'=>0,'money3'=>0);
|
|||
|
//<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$ins = mysql_query('INSERT INTO `battle` (`otmorozok`,`priz`,`smert`,`noart`,`noeff`,`noatack`,`arand`,`kingfight`,`nobot`,`fastfight`,`razdel`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
|
|||
|
"'.$z['otmorozok'].'",
|
|||
|
"'.$z['priz'].'",
|
|||
|
"'.$z['smert'].'",
|
|||
|
"'.$z['noart'].'",
|
|||
|
"'.$z['noeff'].'",
|
|||
|
"'.$z['noatack'].'",
|
|||
|
"'.$z['arand'].'",
|
|||
|
"'.$z['kingfight'].'",
|
|||
|
"'.$z['nobot'].'",
|
|||
|
"'.$z['fastfight'].'",
|
|||
|
"'.$z['razdel'].'",
|
|||
|
"'.$z['city'].'",
|
|||
|
"'.time().'",
|
|||
|
"'.mysql_real_escape_string($btl['players']).'",
|
|||
|
"'.mysql_real_escape_string($btl['timeout']).'",
|
|||
|
"'.mysql_real_escape_string($btl['type']).'",
|
|||
|
"'.mysql_real_escape_string($btl['invis']).'",
|
|||
|
"'.mysql_real_escape_string($btl['noinc']).'",
|
|||
|
"'.mysql_real_escape_string($z['travmChance']).'",
|
|||
|
"'.mysql_real_escape_string($btl['typeBattle']).'",
|
|||
|
"'.mysql_real_escape_string($btl['addExp']).'",
|
|||
|
"'.mysql_real_escape_string($btl['money']).'")');
|
|||
|
$btl_id = mysql_insert_id();
|
|||
|
if($btl_id>0)
|
|||
|
{
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
if($z['type']==1) {
|
|||
|
$sp = mysql_query('SELECT `id` FROM `stats` WHERE `zv` = "'.$z['id'].'"');
|
|||
|
while($pl = mysql_fetch_array($sp)) {
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$pl['id'].'" AND `inOdet`!=0');
|
|||
|
}
|
|||
|
}elseif($z['type']==51) { //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$sp = mysql_query('SELECT `id` FROM `stats` WHERE `zv` = "'.$z['id'].'"');
|
|||
|
while($pl = mysql_fetch_array($sp)) {
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$pl['id'].'" AND `2price` > 0');
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$upd1 = mysql_query('UPDATE `stats` SET `zv`="0" WHERE `zv` = "'.$z['id'].'"');
|
|||
|
$upd2 = mysql_query('UPDATE `users` SET `battle`="'.$btl_id.'" WHERE '.$vars[1].'');
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$upd = mysql_query('UPDATE `zayvki` SET `start` = "'.time().'",`btl_id` = "'.$btl_id.'" WHERE `id` = "'.$z['id'].'" LIMIT 1');
|
|||
|
$u->info['battle'] = $btl_id;
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query("INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('".$u->info['city']."','-1','".$vars[0]."','".time()."','11','0','117')");
|
|||
|
/*
|
|||
|
die('<script>location="main.php?battle_id='.$btl_id.'";</script>');
|
|||
|
*/
|
|||
|
}
|
|||
|
}elseif($z['razdel']>=1 && $z['razdel']<=3)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PvP
|
|||
|
if($u->info['team']==1 && $u->info['zv']==$z['id'])
|
|||
|
{
|
|||
|
$zu = mysql_fetch_array(mysql_query('SELECT * FROM `stats` WHERE `zv`="'.$z['id'].'" AND `team` = "2" LIMIT 1'));
|
|||
|
if(isset($zu['id']))
|
|||
|
{
|
|||
|
$uz = mysql_fetch_array(mysql_query('SELECT `login`,`money` FROM `users` WHERE `id`="'.$zu['id'].'" LIMIT 1'));
|
|||
|
if($zu['clone'] > 0) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$bot = $u->addNewbot(1,NULL,$zu['clone'],NULL,true);
|
|||
|
if($bot > 0) {
|
|||
|
mysql_query('DELETE FROM `users` WHERE `id` = "'.$zu['id'].'" LIMIT 1');
|
|||
|
mysql_query('DELETE FROM `stats` WHERE `id` = "'.$zu['id'].'" LIMIT 1');
|
|||
|
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$zu['id'].'" LIMIT 100');
|
|||
|
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$zu['id'].'" LIMIT 100');
|
|||
|
|
|||
|
mysql_query('UPDATE `stats` SET `zv` = "'.$z['id'].'",`team` = 2 WHERE `id` = "'.$bot.'" LIMIT 1');
|
|||
|
|
|||
|
$zu = mysql_fetch_array(mysql_query('SELECT * FROM `stats` WHERE `zv`="'.$z['id'].'" AND `team` = "2" LIMIT 1'));
|
|||
|
$uz = mysql_fetch_array(mysql_query('SELECT `login`,`money` FROM `users` WHERE `id`="'.$zu['id'].'" LIMIT 1'));
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$btl_id = 0;
|
|||
|
if($uz['money']<$z['money'] || $u->info['money']<$z['money'])
|
|||
|
{
|
|||
|
$z['money'] = 0;
|
|||
|
}
|
|||
|
$btl = array('otmorozok' => $z['otmorozok'],'players'=>'','timeout'=>$z['timeout'],'type'=>$z['type'],'travmChance'=>$z['travmChance'],'invis'=>0,'noinc'=>0,'typeBattle'=>0,'addExp'=>0,'money'=>round($z['money'],2),'money3'=>0);
|
|||
|
$ins = mysql_query('INSERT INTO `battle` (`otmorozok`,`smert`,`noart`,`noeff`,`noatack`,`arand`,`kingfight`,`nobot`,`fastfight`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
|
|||
|
"'.mysql_real_escape_string($btl['otmorozok']).'",
|
|||
|
"'.mysql_real_escape_string($btl['smert']).'",
|
|||
|
"'.mysql_real_escape_string($btl['noart']).'",
|
|||
|
"'.mysql_real_escape_string($btl['noeff']).'",
|
|||
|
"'.mysql_real_escape_string($btl['noatack']).'",
|
|||
|
"'.mysql_real_escape_string($btl['arand']).'",
|
|||
|
"'.mysql_real_escape_string($btl['kingfight']).'",
|
|||
|
"'.mysql_real_escape_string($btl['nobot']).'",
|
|||
|
"'.mysql_real_escape_string($btl['fastfight']).'",
|
|||
|
"'.$u->info['city'].'",
|
|||
|
"'.time().'",
|
|||
|
"'.mysql_real_escape_string($btl['players']).'",
|
|||
|
"'.mysql_real_escape_string($btl['timeout']).'",
|
|||
|
"'.mysql_real_escape_string($btl['type']).'",
|
|||
|
"'.mysql_real_escape_string($btl['invis']).'",
|
|||
|
"'.mysql_real_escape_string($btl['noinc']).'",
|
|||
|
"'.mysql_real_escape_string($btl['travmChance']).'",
|
|||
|
"'.mysql_real_escape_string($btl['typeBattle']).'",
|
|||
|
"'.mysql_real_escape_string($btl['addExp']).'",
|
|||
|
"'.mysql_real_escape_string($btl['money']).'")');
|
|||
|
$btl_id = mysql_insert_id();
|
|||
|
if($ins)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$upd1 = mysql_query('UPDATE `stats` SET `zv`="0" WHERE `zv` = "'.$z['id'].'" LIMIT 2');
|
|||
|
$upd2 = mysql_query('UPDATE `users` SET `battle`="'.$btl_id.'" WHERE `id` = "'.$u->info['id'].'" OR `id` = "'.$zu['id'].'" LIMIT 2');
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
if($z['type']==1) {
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$u->info['id'].'" AND `inOdet`!=0');
|
|||
|
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "'.$zu['id'].'" AND `inOdet`!=0');
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$upd = mysql_query('UPDATE `zayvki` SET `start` = "'.time().'",`btl_id` = "'.$btl_id.'" WHERE `id` = "'.$z['id'].'" LIMIT 1');
|
|||
|
|
|||
|
$u->info['battle'] = $btl_id;
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query("INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('".$u->info['city']."','".$u->info['room']."','".$uz['login']."','".time()."','11','0','117')");
|
|||
|
die('<script>location="main.php?battle_id='.$btl_id.'";</script>');
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
mysql_query('UNLOCK TABLES');
|
|||
|
mysql_query('COMMIT');
|
|||
|
}
|
|||
|
|
|||
|
public function cancelzv()
|
|||
|
{
|
|||
|
global $u,$c,$code,$zi;
|
|||
|
if(isset($_GET['cancelzv'],$zi['id']) && $zi['razdel']>=1 && $zi['razdel']<=3)
|
|||
|
{
|
|||
|
$enemy = mysql_fetch_array(mysql_query('SELECT `u`.*,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$zi['id'].'" AND `st`.`team` = "2" LIMIT 1'));
|
|||
|
if(isset($enemy['id']))
|
|||
|
{
|
|||
|
if($zi['razdel']>=1 && $zi['razdel']<=3)
|
|||
|
{
|
|||
|
if($u->info['team']==1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>
|
|||
|
$upd = mysql_query('UPDATE `stats` SET `zv` = "0",`team`="0" WHERE `id` = "'.$enemy['id'].'" LIMIT 1');
|
|||
|
if($upd)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `users` SET `otk` = (`otk` + 1) WHERE `id` = "'.$zi['id'].'" LIMIT 1');
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$enemy['login'].' <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>
|
|||
|
$sa = '';
|
|||
|
if($u->info['sex']==2)
|
|||
|
{
|
|||
|
$sa = '<27>';
|
|||
|
}
|
|||
|
$text = ' [login:'.$u->info['login'].'] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$sa.' <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$enemy['city']."','','','".$enemy['login']."','".$text."','".time()."','6','0')");
|
|||
|
}
|
|||
|
}elseif($u->info['id']==$enemy['id'] && $zi['start']==0)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>
|
|||
|
$upd = mysql_query('UPDATE `stats` SET `zv` = "0",`team`="0" WHERE `id` = "'.$enemy['id'].'" LIMIT 1');
|
|||
|
if($upd)
|
|||
|
{
|
|||
|
$uz = mysql_fetch_array(mysql_query('SELECT `u`.`sex`,`u`.`login`,`u`.`city`,`u`.`room`,`u`.`id`,`st`.`zv`,`st`.`team` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$zi['id'].'" AND `st`.`team` = "1" LIMIT 1'));
|
|||
|
if(isset($uz['id']))
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>.';
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>
|
|||
|
$sa = '';
|
|||
|
if($u->info['sex']==2)
|
|||
|
{
|
|||
|
$sa = '<27>';
|
|||
|
}
|
|||
|
$text = ' [login:'.$u->info['login'].'] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$sa.' <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>.';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$uz['city']."','','','".$uz['login']."','".$text."','".time()."','6','0')");
|
|||
|
}
|
|||
|
$u->info['zv'] = 0;
|
|||
|
$u->info['team'] = 0;
|
|||
|
}
|
|||
|
}
|
|||
|
if($enemy['bot'] == 1) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> , <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mysql_query('DELETE FROM `users` WHERE `id` = "'.$enemy['id'].'" LIMIT 1');
|
|||
|
mysql_query('DELETE FROM `stats` WHERE `id` = "'.$enemy['id'].'" LIMIT 1');
|
|||
|
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$enemy['id'].'" LIMIT 100');
|
|||
|
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$enemy['id'].'" LIMIT 100');
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
if($zi['razdel']>=1 && $zi['razdel']<=3 && $u->info['team']==1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>
|
|||
|
$upd = mysql_query('UPDATE `zayvki` SET `cancel` = "'.time().'" WHERE `id` = "'.$zi['id'].'" LIMIT 1');
|
|||
|
if($upd)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `stats` SET `zv` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
$zi = false;
|
|||
|
$u->info['zv'] = 0;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public function see()
|
|||
|
{
|
|||
|
global $u,$c,$code,$zi,$cron;
|
|||
|
if(isset($_GET['r']) && ((!isset($_GET['new_group']) && !isset($_POST['groupClick'])) || isset($zi['id'])) )
|
|||
|
{
|
|||
|
$r = round(intval($_GET['r']));
|
|||
|
if(($r>=1 && $r<=5) || $r==8)
|
|||
|
{
|
|||
|
$this->zv_see = 1;
|
|||
|
if($u->room['FR']==0 && $u->room['zvsee']==0)
|
|||
|
{
|
|||
|
echo '<br><br><br><b><font color="black"><center><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD></center></font></b>'; $this->zv_see = 0;
|
|||
|
}elseif($r==1 && $u->info['level']>0)
|
|||
|
{
|
|||
|
echo '<br><br><br><b><font color="black"><center><3E><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;)</center></font></b>'; $this->zv_see = 0;
|
|||
|
}elseif($r>1 && $r<6 && $u->info['level']<1)
|
|||
|
{
|
|||
|
echo '<br><br><br><b><font color="black"><center><3E><> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;)</center></font></b>'; $this->zv_see = 0;
|
|||
|
}elseif($r>3 && $r<6 && $u->info['level']<2)
|
|||
|
{
|
|||
|
echo '<br><br><br><b><font color="black"><center><3E> '.$this->z1n[$r].' <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</center></font></b>'; $this->zv_see = 0;
|
|||
|
}elseif($r==1 && $u->info['level']>0)
|
|||
|
{
|
|||
|
echo '<br><br><br><b><font color="black"><center><3E><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;)</center></font></b>'; $this->zv_see = 0;
|
|||
|
}elseif($r==8 && $u->info['level'] < 1)
|
|||
|
{
|
|||
|
echo '<br><br><br><b><font color="black"><center><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</center></font></b>'; $this->zv_see = 0;
|
|||
|
}elseif($u->info['zv']>0 && $u->info['battle']==0 && $r != 8)
|
|||
|
{
|
|||
|
if($zi['razdel']==1 || $zi['razdel']==2 || $zi['razdel']==3)
|
|||
|
{
|
|||
|
echo '
|
|||
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|||
|
<tr>
|
|||
|
<td valign="top">';
|
|||
|
|
|||
|
if($u->info['team']==1)
|
|||
|
{
|
|||
|
$uz = mysql_fetch_array(mysql_query('SELECT `u`.`sex`,`u`.`id`,`u`.`login`,`u`.`align`,`u`.`clan`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`online`,`u`.`level`,`u`.`battle`,`u`.`money`,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$zi['id'].'" AND `st`.`team`="2" LIMIT 1'));
|
|||
|
if(!isset($uz['id']))
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
echo '<div style="float:left;"><div style="float:left;"><3E><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <INPUT class="btn btn-danger" onClick="location=\'main.php?zayvka=1&r='.$_GET['r'].'&rnd='.$code.'&cancelzv\';" TYPE=submit name=close value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"></div>';
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$sa = '';
|
|||
|
if($uz['sex']==2)
|
|||
|
{
|
|||
|
$sa = '<27>';
|
|||
|
}
|
|||
|
echo '<script> zv_Priem = '.(0+$uz['id']).';</script><font color="red"><b><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$sa.' '.$ca.'</font></b> '.$u->microLogin($uz['id'],1).'</a><font color="red"><b> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>? </b></font><INPUT class="btn btn-success" onClick="location=\'main.php?zayvka=1&r='.$_GET['r'].'&rnd='.$code.'&startBattle\';" TYPE=submit name=close value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"> <INPUT class="btn btn-danger" onClick="location=\'main.php?zayvka=1&r='.$_GET['r'].'&rnd='.$code.'&cancelzv\';" TYPE=submit name=close value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$uz = mysql_fetch_array(mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`align`,`u`.`clan`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`online`,`u`.`level`,`u`.`battle`,`u`.`money`,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$zi['id'].'" AND `st`.`team`="1" LIMIT 1'));
|
|||
|
if(isset($uz['id']))
|
|||
|
{
|
|||
|
echo '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> '.$u->microLogin($uz['id'],1).' <INPUT class="btn" onClick="location=\'main.php?zayvka=1&r='.$_GET['r'].'&rnd='.$code.'&cancelzv\';" TYPE=submit name=close value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}else{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
echo '</td>
|
|||
|
<td align="right" valign="top">
|
|||
|
<!-- <div style="float:right;"><INPUT class="btn" onClick="location=\'main.php?zayvka&r='.$_GET['r'].'&rnd='.$code.'\';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"></div> -->
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table></div>';
|
|||
|
}else{
|
|||
|
$tm_start = floor(($zi['time']+$zi['time_start']-time())/6)/10;
|
|||
|
$tm_start = $this->rzv($tm_start);
|
|||
|
echo '<!-- <div style="float:right;"><INPUT class="btn" onClick="location=\'main.php?zayvka&r='.$_GET['r'].'&rnd='.$code.'\';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"></div> -->
|
|||
|
<b><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$this->z2n[$zi['razdel']].' <EFBFBD><EFBFBD><EFBFBD></b>';
|
|||
|
$sv0 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$zi['id'].'" LIMIT 100'));
|
|||
|
/*if($sv0[0] <= 1)
|
|||
|
{
|
|||
|
if(isset($_GET['cancelzvnow']))
|
|||
|
{
|
|||
|
echo ' <b><font color="red"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></font></b>';
|
|||
|
mysql_query('UPDATE `zayvki` SET `cancel` = "'.time().'" WHERE `id` = "'.$u->info['zv'].'" LIMIT 1');
|
|||
|
$u->info['zv'] = 0;
|
|||
|
mysql_query('UPDATE `stats` SET `zv` = "0",`team` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
}else{
|
|||
|
echo ' <a href="main.php?zayvka&r='.$_GET['r'].'&cancelzvnow&rnd='.$code.'" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>';
|
|||
|
}
|
|||
|
}*/
|
|||
|
unset($sv0);
|
|||
|
echo '<br><3E><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> '.$tm_start.' <20><><EFBFBD>.';
|
|||
|
}
|
|||
|
}elseif($r==8) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
$ttur = array(
|
|||
|
0 => '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>!',
|
|||
|
1 => '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>!',
|
|||
|
2 => '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>!'
|
|||
|
);
|
|||
|
|
|||
|
if(isset($_POST['trn1']) && $u->room['zvsee']==0) {
|
|||
|
if($u->info['inTurnirnew'] == 0) {
|
|||
|
$totr = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "'.mysql_real_escape_string($_POST['trn1']).'" AND `status` = "0" LIMIT 1'));
|
|||
|
if(isset($totr['id'])) {
|
|||
|
mysql_query('UPDATE `users` SET `inTurnirnew` = "'.$totr['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `turnirs` SET `users_in` = `users_in` + 1 WHERE `id` = "'.$totr['id'].'" LIMIT 1');
|
|||
|
$u->info['inTurnirnew'] = $totr['id'];
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
} else {
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}elseif(isset($_GET['cancel13']) && $u->room['zvsee']==0) {
|
|||
|
if($u->info['inTurnirnew'] > 0) {
|
|||
|
$totr = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "'.mysql_real_escape_string($u->info['inTurnirnew']).'" AND `status` = "0" LIMIT 1'));
|
|||
|
if(isset($totr['id'])) {
|
|||
|
mysql_query('UPDATE `users` SET `inTurnirnew` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `turnirs` SET `users_in` = `users_in` - 1 LIMIT 1');
|
|||
|
$u->info['inTurnirnew'] = 0;
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
$dv = '';
|
|||
|
$trse = '';
|
|||
|
|
|||
|
if($u->info['inTurnirnew'] > 0) {
|
|||
|
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "'.$u->info['inTurnirnew'].'" LIMIT 1'));
|
|||
|
if(!isset($pl['id'])) {
|
|||
|
mysql_query('UPDATE `users` SET `inTurnirnew` = "0" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
echo '<27><><EFBFBD>-<2D><> <20><> <20><><EFBFBD>... <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}else{
|
|||
|
$dv = '<b><u><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ['.$pl['users_in'].']</u></b>:<br>';
|
|||
|
$spu = mysql_query('SELECT `u`.`id`,`u`.`align`,`u`.`login`,`u`.`clan`,`u`.`level`,`u`.`city`,`u`.`online`,`u`.`sex`,`u`.`cityreg`,`u`.`palpro`,`u`.`invis` FROM `users` AS `u` WHERE `u`.`inTurnirnew` = "'.$pl['id'].'" LIMIT '.$pl['users_in']);
|
|||
|
$i = 1;
|
|||
|
while($plu = mysql_fetch_array($spu)) {
|
|||
|
$dv .= '<div style="padding:3px;">'.$i.'. '.$u->microLogin($plu,2).'</div>';
|
|||
|
$i++;
|
|||
|
}
|
|||
|
echo '
|
|||
|
<script type="text/javascript">
|
|||
|
function MM_jumpMenu(targ,selObj,restore){ //v3.0
|
|||
|
eval("location=\'"+selObj.options[selObj.selectedIndex].value+"\'");
|
|||
|
if (restore) selObj.selectedIndex=0;
|
|||
|
}
|
|||
|
</script>
|
|||
|
<FORM style="margin:0px; padding:0px; border:0px;" METHOD=\'POST\' ACTION=\'main.php?zayvka=1&r='.$r.'&rnd='.$code.'\'>
|
|||
|
<input type="hidden" name="add_new_zv" id="add_new_zv" value="'.floor(time()/3).'" />
|
|||
|
<TABLE width=100% cellspacing=0 cellpadding=0>
|
|||
|
<TR>
|
|||
|
<TD valign=top>
|
|||
|
<font color="red"><b>'.$this->error.'</b></font>
|
|||
|
<div style="border-bottom:#b2b2b2 solid 1px;padding:5px;">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$u->timeOut($pl['time']-time()).' <INPUT class="btn" onClick="location=\'main.php?zayvka&r=8&cancel13&tlvl='.$pl['level'].'&rnd='.$code.'\';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">
|
|||
|
</div>
|
|||
|
<div style="border-bottom:#b2b2b2 solid 1px;padding:5px;margin-bottom:5px;">
|
|||
|
'.$dv.'
|
|||
|
</div>
|
|||
|
</TD>
|
|||
|
<TD align=right valign=top> <!-- <INPUT class="btn" onClick="location=\'main.php?zayvka&r='.$_GET['r'].'&tlvl='.$tlvl.'&rnd='.$code.'\';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"> --></TD>
|
|||
|
</TR>
|
|||
|
</TABLE>
|
|||
|
</FORM>';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$tlvl = 4;
|
|||
|
$i = 4;
|
|||
|
$trnmz = array(4=>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',5=>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',6=>'<27><><EFBFBD>.\<5C><><EFBFBD>.');
|
|||
|
while($i <= 6) {
|
|||
|
if($_GET['tlvl'] == $i) {
|
|||
|
$trse .= '<option value="https://new-combats.com/main.php?zayvka&r=8&tlvl='.$i.'" selected="selected">'.$trnmz[$i].'</option>';
|
|||
|
$tlvl = $i;
|
|||
|
}else{
|
|||
|
$trse .= '<option value="https://new-combats.com/main.php?zayvka&r=8&tlvl='.$i.'">'.$trnmz[$i].'</option>';
|
|||
|
}
|
|||
|
$i++;
|
|||
|
}
|
|||
|
$prb = '<INPUT class="btn" TYPE="submit" name=open value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
echo '<style>.zvnkj { padding:5px; }</style>';
|
|||
|
$sp = mysql_query('SELECT * FROM `turnirs` WHERE `status` = "0" AND `level` = "'.$tlvl.'"');
|
|||
|
$j = 0;
|
|||
|
while($pl = mysql_fetch_array($sp)) {
|
|||
|
$j++;
|
|||
|
$dinf = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> '.$u->timeOut($pl['time']-time()).'';
|
|||
|
$dv .= '<label><div class="zvnkj">';
|
|||
|
if($u->room['zvsee']==0) {
|
|||
|
$dv .= '<input type="radio" name="trn1" id="trn1_'.$j.'" value="'.$pl['id'].'">';
|
|||
|
}
|
|||
|
$dv .= ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '.$pl['users_in'].' <20><><EFBFBD>. | '.$dinf.'</div></label>';
|
|||
|
}
|
|||
|
if($dv == '') {
|
|||
|
$dv = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>...';
|
|||
|
}
|
|||
|
echo '
|
|||
|
<script type="text/javascript">
|
|||
|
function MM_jumpMenu(targ,selObj,restore){ //v3.0
|
|||
|
eval("location=\'"+selObj.options[selObj.selectedIndex].value+"\'");
|
|||
|
if (restore) selObj.selectedIndex=0;
|
|||
|
}
|
|||
|
</script>
|
|||
|
<FORM style="margin:0px; padding:0px; border:0px;" METHOD=\'POST\' ACTION=\'main.php?zayvka=1&r='.$r.'&rnd='.$code.'\'>
|
|||
|
<input type="hidden" name="add_new_zv" id="add_new_zv" value="'.floor(time()/3).'" />
|
|||
|
<TABLE width=100% cellspacing=0 cellpadding=0>
|
|||
|
<TR>
|
|||
|
<TD valign=top>
|
|||
|
<font color="red"><b>'.$this->error.'</b></font>
|
|||
|
<div style="border-bottom:#b2b2b2 solid 1px;padding:5px;">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
|||
|
<SELECT NAME=turlevel onChange="MM_jumpMenu(null,this,0)">
|
|||
|
'.$trse.'
|
|||
|
</SELECT>
|
|||
|
'.$prb.'
|
|||
|
</div>
|
|||
|
<div style="border-bottom:#b2b2b2 solid 1px;padding:5px;margin-bottom:5px;">
|
|||
|
'.$dv.'
|
|||
|
</div>
|
|||
|
'.$prb.'
|
|||
|
</TD>
|
|||
|
<TD align=right valign=top><!-- <INPUT class="btn" onClick="location=\'main.php?zayvka&r='.$_GET['r'].'&tlvl='.$tlvl.'&rnd='.$code.'\';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"> --></TD>
|
|||
|
</TR>
|
|||
|
</TABLE>
|
|||
|
</FORM>';
|
|||
|
}
|
|||
|
}elseif($r==1 || $r==2 || $r==3)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$zi = array(1=>'<27><><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.',2=>'<27><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.',3=>'<27><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.');
|
|||
|
$dv = '';
|
|||
|
if($u->room['zvsee']==0) {
|
|||
|
if($r==3) {
|
|||
|
$dv = '<br><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<INPUT TYPE=text NAME=onlyfor maxlength=30 size=12>
|
|||
|
<BR>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<INPUT TYPE=text NAME=stavkakredit size=6 maxlength=10> <INPUT class="btn" TYPE=submit name=open value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}else{
|
|||
|
if($u->info['level'] <= $c['bot_level'])
|
|||
|
{
|
|||
|
$dv = '<b><font color="green"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> '.($c['bot_level']+1).'-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</font></b> <INPUT class="btn btn-inverse" onClick="location=\'main.php?zayvka=1&r='.$_GET['r'].'&bot='.$u->info['nextAct'].'\';" TYPE=button name=clone value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}else{
|
|||
|
$dv = '';
|
|||
|
if( $u->info['admin'] > 0 ) {
|
|||
|
$dv .= ' <b><font color="green"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> '.($c['bot_level']+1).'-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</font></b> <INPUT class="btn btn-inverse" onClick="location=\'main.php?zayvka=1&r='.$_GET['r'].'&bot='.$u->info['nextAct'].'\';" TYPE=button name=clone value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
|
|||
|
if ($u->info['level']<9)
|
|||
|
{
|
|||
|
$tstw=' <20><><EFBFBD> <b>8</b> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$tstw='<input type="text" value="" name="commentfiz" id="commentfiz" style="width:244px; padding:3px;">';
|
|||
|
}
|
|||
|
$dv .= '<br>
|
|||
|
<div>
|
|||
|
<div style="padding-top:5px;">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> '.$tstw.'
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div style="padding-top:5px;"><INPUT class="btn" TYPE=submit name=open value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"></div>';
|
|||
|
//if($u->info['level'] <= 9 || $u->info['admin']>0 /*|| ($u->stats['silver']>0 && $u->info['level']<8) || ($u->stats['silver'] >= 2 && $u->info['level']<9)*/ )
|
|||
|
//if( $u->info['admin'] > 0 ) {
|
|||
|
// $dv .= ' <INPUT class="btn" onClick="console_clonelogin();" TYPE=button name=clone value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> (<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)">';
|
|||
|
//}
|
|||
|
}
|
|||
|
if( $u->info['admin'] > 0 ) {
|
|||
|
|
|||
|
if( isset($_GET['adminbotatack']) ) {
|
|||
|
$bot_atack = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `id` = "'.mysql_real_escape_string($_GET['adminbotatack']).'" LIMIT 1'));
|
|||
|
if( isset($bot_atack['id']) ) {
|
|||
|
$logins_bot = array();
|
|||
|
$k = $u->addNewbot($bot_atack['id'],NULL,NULL,$logins_bot);
|
|||
|
if( isset($k['id']) ) {
|
|||
|
$expB = 0;
|
|||
|
$btl = array(
|
|||
|
'players'=>'',
|
|||
|
'timeout'=>180,
|
|||
|
'type'=>0,
|
|||
|
'invis'=>0,
|
|||
|
'noinc'=>0,
|
|||
|
'travmChance'=>0,
|
|||
|
'typeBattle'=>0,
|
|||
|
'addExp'=>$expB,
|
|||
|
'money'=>0
|
|||
|
);
|
|||
|
|
|||
|
$ins = mysql_query('INSERT INTO `battle` (`dungeon`,`dn_id`,`x`,`y`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
|
|||
|
"0",
|
|||
|
"0",
|
|||
|
"0",
|
|||
|
"0",
|
|||
|
"'.$u->info['city'].'",
|
|||
|
"'.time().'",
|
|||
|
"'.$btl['players'].'",
|
|||
|
"'.$btl['timeout'].'",
|
|||
|
"'.$btl['type'].'",
|
|||
|
"'.$btl['invis'].'",
|
|||
|
"'.$btl['noinc'].'",
|
|||
|
"'.$btl['travmChance'].'",
|
|||
|
"'.$btl['typeBattle'].'",
|
|||
|
"'.$btl['addExp'].'",
|
|||
|
"'.$btl['money'].'")');
|
|||
|
$btl_id = mysql_insert_id();
|
|||
|
mysql_query('UPDATE `users` SET `battle` = "'.$btl_id.'" WHERE `id` = "'.$k['id'].'" OR `id` = "'.$u->info['id'].'" LIMIT 2');
|
|||
|
mysql_query('UPDATE `stats` SET `team` = "2" WHERE `id` = "'.$k['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `team` = "1" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
//header('location: main.php');
|
|||
|
//die();
|
|||
|
die('<script>top.frames[\'main\'].location = "main.php";</script>');
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
$dv .= '<script type="text/javascript">
|
|||
|
function MM_jumpMenu(targ,selObj,restore){ //v3.0
|
|||
|
eval("location=\'main.php?zayvka=1&r=2&rnd=1&adminbotatack="+selObj.options[selObj.selectedIndex].value+"\'");
|
|||
|
if (restore) selObj.selectedIndex=0;
|
|||
|
}
|
|||
|
</script><form name="form55" id="form55">';
|
|||
|
|
|||
|
$dv .= '<hr><3E><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <select style="font-size:12px;" onChange="MM_jumpMenu(\'parent\',this,0)" name="botadminatack"><option value="0">------ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ------</option>';
|
|||
|
|
|||
|
$sp_m = mysql_query('SELECT * FROM `test_bot` WHERE `pishera` != 0 ORDER BY `id` ASC');
|
|||
|
while($pl_m = mysql_fetch_array($sp_m) ) {
|
|||
|
$dv .= '<option value="'.$pl_m['id'].'">'.$pl_m['id'].' [ '.$pl_m['align'].' ] - '.$pl_m['login'].' ['.$pl_m['level'].'] '.$pl_m['pishera'].'</option>';
|
|||
|
}
|
|||
|
$dv .= '</select></form>';
|
|||
|
}
|
|||
|
}
|
|||
|
if($u->info['level'] > $c['bot_level']) {
|
|||
|
$dv = '<FIELDSET id="hidezv1" style="display:none; border-color:#FFF; width:100%;">
|
|||
|
<LEGEND><B style="color:#8f0000"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD></B> </LEGEND><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<SELECT NAME=timeout style="padding:3px;">
|
|||
|
<OPTION value=1>1 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<OPTION value=2>2 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<OPTION value=3 SELECTED>3 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<OPTION value=4>4 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<OPTION value=5>5 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
</SELECT>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<SELECT NAME=k>
|
|||
|
<OPTION value=0><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION value=1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION value=2><font color=red><b><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></font></b>
|
|||
|
</SELECT>'.$dv.'</FIELDSET><div id="hidezv1_btn"><INPUT class="btn" onclick="openfizrmk();" TYPE=button name=open value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>"></div>';
|
|||
|
}
|
|||
|
|
|||
|
echo '
|
|||
|
<FORM style="margin:0px; padding:0px; border:0px;" METHOD=\'POST\' ACTION=\'main.php?zayvka=1&r='.$r.'&rnd='.$code.'\'>
|
|||
|
<input type="hidden" name="add_new_zv" id="add_new_zv" value="'.floor(time()/3).'" />
|
|||
|
<TABLE width=100% cellspacing=0 cellpadding=0>
|
|||
|
<TR>
|
|||
|
<TD valign=top><!--'.$zi[$r].'<BR>-->
|
|||
|
<table cellspacing=0 cellpadding=0>
|
|||
|
<tr>
|
|||
|
<td>
|
|||
|
'.$dv.'
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table></TD>
|
|||
|
<TD align=right valign=top><!-- <INPUT class="btn" onClick="location=\'main.php?zayvka&r='.$_GET['r'].'&rnd='.$code.'\';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"> --></TD>
|
|||
|
</TR>
|
|||
|
</TABLE>
|
|||
|
</FORM>';
|
|||
|
}
|
|||
|
}elseif($r==4)
|
|||
|
{
|
|||
|
if($u->room['zvsee']==0) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
echo '<span id="hidezv1_btn"><INPUT class="btn" onClick="openfizrmk();" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>" style="margin:3px;"></span>
|
|||
|
<!-- <INPUT class="btn" onClick="location=\'main.php?zayvka&r='.$_GET['r'].'&rnd='.$code.'&sort=\'+document.all.value+\'\';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" style="float:right;"> -->';
|
|||
|
?>
|
|||
|
<FIELDSET id="hidezv1" style="display:none; border-color:#FFF; width:500px;">
|
|||
|
<LEGEND><B style="color:#8f0000"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD></B> </LEGEND>
|
|||
|
<!--<div style="float:right;">
|
|||
|
<INPUT class="btn" onClick="location='main.php?zayvka&r=<? echo $_GET['r']; ?>&rnd=<? echo $code; ?>';" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">
|
|||
|
</div>-->
|
|||
|
<form method="post" action="main.php?zayvka&r=<? echo $_GET['r']; ?>&add_group&rnd=<? echo $code; ?>">
|
|||
|
<table>
|
|||
|
<tr>
|
|||
|
<td>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<select style="padding:2px;" name="startime">
|
|||
|
<option value="300">5 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="600">10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<!--<option value="900">15 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="1200">20 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="1800">30 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>-->
|
|||
|
</select>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<select style="padding:2px;" name="timeout">
|
|||
|
<option value="1">1 <EFBFBD><EFBFBD><EFBFBD>.</option>
|
|||
|
<option value="2">2 <EFBFBD><EFBFBD><EFBFBD>.</option>
|
|||
|
<option value="3">3 <EFBFBD><EFBFBD><EFBFBD>.</option>
|
|||
|
<!--<option value="4">4 <EFBFBD><EFBFBD><EFBFBD>.</option>
|
|||
|
<option value="5">5 <EFBFBD><EFBFBD><EFBFBD>.</option>-->
|
|||
|
</select>
|
|||
|
<br />
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<input style="padding:2px;" type="text" name="nlogin1" size="3" maxlength="2" /> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <select style="padding:2px;" name="levellogin1">
|
|||
|
<option value="0"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="1"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="2"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="3"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="4"><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="5"><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="6"><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> +/- 1 </option>
|
|||
|
<option value="99"><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="98"><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
</select>
|
|||
|
<br />
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<input style="padding:2px;" type="text" name="nlogin2" size="3" maxlength="2" />
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<select style="padding:2px;" name="levellogin2">
|
|||
|
<option value="0"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="1"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="2"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="3"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="4"><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="5"><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="6"><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> +/- 1 </option>
|
|||
|
<option value="99"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
<option value="98"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </option>
|
|||
|
</select>
|
|||
|
<br />
|
|||
|
<input type="checkbox" name="travma" />
|
|||
|
<label for="travma"><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <font class="dsc">(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)</font></label><br />
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<? if ($u->info['level']<9)
|
|||
|
{?> <20><><EFBFBD> <b>8</b> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<? }else{?>
|
|||
|
<input type="text" style="padding:2px;" name="cmt" maxlength="40" size="40" />
|
|||
|
<? }?>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td align="left"><input class="btn" type="submit" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" name="open" />
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</form>
|
|||
|
</FIELDSET>
|
|||
|
<?
|
|||
|
}
|
|||
|
}elseif($r==5)
|
|||
|
{
|
|||
|
if($u->room['zvsee']==0) {
|
|||
|
echo '<div id="hidezv1_btn"><INPUT class="btn" onClick="openfizrmk();" TYPE=button name=tmp value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>" style="margin:3px;"></div>
|
|||
|
<!-- <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <b><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></b> <a href="https://events.new-combats.com/?page_id=1&paged=&st=25" target="_blank"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>.<br> -->
|
|||
|
<form action="main.php?zayvka=1&r='.$_GET['r'].'&start_haot&rnd='.$code.'" method="post" style="margin:0px; padding:0px;">
|
|||
|
<div style="display:none; width:600px;" id="hidezv1">
|
|||
|
<br>
|
|||
|
<FIELDSET style="border-color:#FFF;">
|
|||
|
<LEGEND><strong style="color:#8f0000"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD></strong> </LEGEND>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<SELECT name="startime2">
|
|||
|
<OPTION selected value="180">3 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION value="300">5 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<!-- <OPTION value="900">10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION value="900">15 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION value="1200">20 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION value="1800">30 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></OPTION>-->
|
|||
|
</SELECT>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<SELECT name="timeout">
|
|||
|
<OPTION selected value="1">1 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<!--<OPTION value="2">2 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<OPTION value="3">3 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<OPTION value="4">4 <EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
<OPTION value="5">5 <EFBFBD><EFBFBD><EFBFBD>.</OPTION>-->
|
|||
|
</SELECT>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<SELECT name="players">
|
|||
|
<OPTION selected value="6">6</OPTION>
|
|||
|
<OPTION value="8">8</OPTION>
|
|||
|
<OPTION value="10">10</OPTION>
|
|||
|
<OPTION value="12">12</OPTION>
|
|||
|
<!--<OPTION value="14">14</OPTION>
|
|||
|
<OPTION value="16">16</OPTION>
|
|||
|
<OPTION value="18">18</OPTION>
|
|||
|
<OPTION value="20">20</OPTION>
|
|||
|
<OPTION value="40">40</OPTION>-->
|
|||
|
</SELECT>
|
|||
|
<BR>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|||
|
<SELECT name="levellogin1">
|
|||
|
<OPTION value="0"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION selected value="3"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<OPTION value="6"><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> +/- 1</OPTION>
|
|||
|
</SELECT>
|
|||
|
<BR>
|
|||
|
<BR>
|
|||
|
<INPUT type="checkbox" name="travma">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <font color="#777">(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)</font><BR>
|
|||
|
<!--<INPUT type="checkbox" name="mut_clever"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<BR>-->
|
|||
|
<!--<INPUT type="checkbox" name="noart">-->
|
|||
|
<!--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<BR>-->
|
|||
|
<INPUT type="checkbox" name="noatack"> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <font color="#777">(<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)</font><BR>
|
|||
|
<INPUT type="checkbox" name="noeff">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><BR>
|
|||
|
<!--<INPUT type="checkbox" name="kingfight"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<b><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></b>)<BR>-->
|
|||
|
<!--<INPUT type="checkbox" name="nobot"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><BR>-->
|
|||
|
<!--<INPUT type="checkbox" name="fastfight">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<BR>-->
|
|||
|
<!--<INPUT type="checkbox" name="arand"> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><BR>-->
|
|||
|
';
|
|||
|
if( date('m') == 12 || date('m') == 1 || date('m') == 2 ) {
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//echo '<INPUT type="checkbox" name="otmorozok"> <img src="https://img.new-combats.com/snow.gif" width="12" height="12"> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, +1.00 <20><>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<BR>';
|
|||
|
}
|
|||
|
if( $u->info['no_zv_key'] != true ) {
|
|||
|
echo '<img src="https://new-combats.com/show_reg_img/security2.php?id='.time().'" width="70" height="20"> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <input style="width:40px;" type="text" value="" name="code21">';
|
|||
|
}
|
|||
|
/*echo '<INPUT type="checkbox" name="mut_hidden">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>. +5% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD>
|
|||
|
<BR>';*/
|
|||
|
|
|||
|
if ($u->info['level']<9)
|
|||
|
{
|
|||
|
$tstw=' <20><><EFBFBD> <b>8</b> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$tstw='<INPUT maxLength="40" size="40" name="cmt">';
|
|||
|
}
|
|||
|
echo'
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> '.$tstw.'
|
|||
|
<BR><INPUT class="btn" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" type="submit" name="open">
|
|||
|
</FIELDSET>
|
|||
|
</DIV>
|
|||
|
</div></form>';
|
|||
|
}
|
|||
|
}
|
|||
|
}elseif($r==6)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$x = 1;
|
|||
|
$html = '';
|
|||
|
$p = 0;
|
|||
|
$_GET['from'] = round((int)$_GET['from']);
|
|||
|
if($_GET['from']>1 && $_GET['from']<50)
|
|||
|
{
|
|||
|
$p = $_GET['from']-1;
|
|||
|
}
|
|||
|
$xx = mysql_num_rows(mysql_query('SELECT `id` FROM `battle` WHERE `type` != 329 AND /*`city` = "'.$u->info['city'].'" AND*/ `team_win` = "-1" AND `time_over` = "0" AND `start1` > 0'));
|
|||
|
$px = $p*15;
|
|||
|
if($p>ceil($xx/15))
|
|||
|
{
|
|||
|
$p = ceil($xx/15);
|
|||
|
}
|
|||
|
$sp = mysql_query('SELECT * FROM `battle` WHERE `type` != 329 AND /*`city` = "'.$u->info['city'].'" AND */`team_win` = "-1" AND `time_over` = "0" AND `start1` > 0 ORDER BY `time_start` DESC LIMIT '.((int)$px).',15');
|
|||
|
while($pl = mysql_fetch_array($sp))
|
|||
|
{
|
|||
|
//<SPAN style=\'color: red; font-weight: bold;\'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></SPAN>
|
|||
|
$tm = ''; $tmu = array(); $tms = array();
|
|||
|
$spi = mysql_query('SELECT `u`.`login`,`st`.`id`,`st`.`team`,`u`.`id` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`battle` = "'.$pl['id'].'"');
|
|||
|
while($pli = mysql_fetch_array($spi))
|
|||
|
{
|
|||
|
if(!isset($tmu[$pli['team']]))
|
|||
|
{
|
|||
|
$tms[count($tms)] = $pli['team'];
|
|||
|
}
|
|||
|
$tmu[$pli['team']][count($tmu[$pli['team']])] = $pli['id'];
|
|||
|
}
|
|||
|
$i = 0;
|
|||
|
while($i<count($tms))
|
|||
|
{
|
|||
|
$tmsu = '';
|
|||
|
$j = 0;
|
|||
|
while($j<count($tmu[$tms[$j]]))
|
|||
|
{
|
|||
|
if($tmu[$tms[$i]][$j]>0)
|
|||
|
{
|
|||
|
$tmsu .= $u->microLogin($tmu[$tms[$i]][$j],1).', ';
|
|||
|
}
|
|||
|
$j++;
|
|||
|
}
|
|||
|
$tmsu = rtrim($tmsu,', ');
|
|||
|
$tm .= $tmsu;
|
|||
|
if($i+1!=count($tms))
|
|||
|
{
|
|||
|
$tm .= ' <SPAN style=\'color: red; font-weight: bold;\'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></SPAN> ';
|
|||
|
}
|
|||
|
$i++;
|
|||
|
}
|
|||
|
if( $tm != '' ) {
|
|||
|
$html .= ($p+$x).'. <font class=date>'.date('d.m.y H:i',$pl['time_start']).'</font> '.$tm.' <IMG SRC="https://img.new-combats.com/i/fighttype'.$pl['typeBattle'].'.gif" WIDTH=20 HEIGHT=20 ALT="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>"> <A HREF="logs.php?log='.$pl['id'].'&rnd='.$code.'" target=_blank><3E><></A><BR>';
|
|||
|
}
|
|||
|
$x++;
|
|||
|
}
|
|||
|
?>
|
|||
|
<table width="100%" cellspacing="0" cellpadding="0">
|
|||
|
<tr>
|
|||
|
<td valign="top" align="center"><h3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <?=date('d.m.Y');?> (<28><><EFBFBD><EFBFBD><EFBFBD> <?=$xx;?>)</h3></td>
|
|||
|
<td valign="top" align="right"><!-- <input class="btn" type="submit" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" onClick="" name="tklogs" /> --></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<? if($html==''){ echo '<div align="center"><3E> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>...</div>'; }else{ echo '<div>'.$html.'</div>'; } ?>
|
|||
|
<TABLE width=100% cellspacing=0 cellpadding=0><TR>
|
|||
|
<TD align=left><? if($p>0 && $xx>15){ ?><A HREF="?zayvka=1&r=6&from=<?=($p-1);?>"><3E><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></A><? } ?> </TD>
|
|||
|
<TD align=right><? if($p*15-$xx>0){ ?><A HREF="?zayvka=1&r=6&from=<?=($p+1);?>"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><></A><? } ?> </TD>
|
|||
|
</TR></TABLE>
|
|||
|
<?
|
|||
|
}elseif($r==7)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$btl = '';
|
|||
|
$dt = time();
|
|||
|
if(isset($_GET['logs2']))
|
|||
|
{
|
|||
|
$dt = round((int)$_GET['logs2']);
|
|||
|
}
|
|||
|
$dt = strtotime(date('d F Y',$dt).' 00:00:00');
|
|||
|
$slogin = $u->info['login'];
|
|||
|
if(isset($_GET['filter']))
|
|||
|
{
|
|||
|
$slogin = $_GET['filter'];
|
|||
|
}
|
|||
|
if(isset($_POST['filter']))
|
|||
|
{
|
|||
|
$slogin = $_POST['filter'];
|
|||
|
}
|
|||
|
$slogin = str_replace('"','',$slogin);
|
|||
|
$slogin = str_replace("'",'',$slogin);
|
|||
|
$slogin = str_replace('\\','',$slogin);
|
|||
|
$see = '<TABLE width=100% cellspacing=0 cellpadding=0><TR>
|
|||
|
<TD valign=top> <A HREF="?filter='.$slogin.'&zayvka=1&r=7&logs2='.($dt-86400).'"><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD></A></TD>
|
|||
|
<TD valign=top align=center><H3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> '.date('d.m.Y',$dt).'</H3></TD>
|
|||
|
<TD valign=top align=right><A HREF="?filter='.$slogin.'&zayvka=1&r=7&logs2='.($dt+86400).'"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD></A> </TD>
|
|||
|
</TR><TR><TD colspan=3 align=center>
|
|||
|
<form method="POST" action="main.php?zayvka=1&r=7&rnd='.$code.'">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <INPUT TYPE=text NAME=filter value="'.$slogin.'"> <EFBFBD><EFBFBD> <INPUT TYPE=text NAME=logs size=12 value="'.date('d.m.Y',$dt).'"> <INPUT class="btn" TYPE=submit value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!">
|
|||
|
</form>
|
|||
|
</TD>
|
|||
|
</TR></TABLE>';
|
|||
|
$usr = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`level`,`city` FROM `users` WHERE `login` = "'.mysql_real_escape_string($slogin).'" LIMIT 1'));
|
|||
|
if(isset($usr['id']))
|
|||
|
{
|
|||
|
$tms = $dt;
|
|||
|
$tmf = $dt+86400;
|
|||
|
$sp = mysql_query('SELECT * FROM `battle_last` WHERE `time` >= '.$tms.' AND `time` < '.$tmf.' AND `uid` = "'.$usr['id'].'" ORDER BY `id` DESC');
|
|||
|
$j = 1;
|
|||
|
$jk = 0;
|
|||
|
$btl_lst = array();
|
|||
|
while($pl = mysql_fetch_array($sp))
|
|||
|
{
|
|||
|
$b = mysql_fetch_array(mysql_query('SELECT * FROM `battle_end` WHERE `battle_id` = "'.$pl['battle_id'].'" LIMIT 1'));
|
|||
|
$tm = '';
|
|||
|
if( isset($btl_lst[$b['id']]) ) {
|
|||
|
|
|||
|
}elseif(isset($b['id']))
|
|||
|
{
|
|||
|
$tms = array(); $ts = array();
|
|||
|
$spi = mysql_query('SELECT * FROM `battle_last` WHERE `battle_id` = "'.$pl['battle_id'].'"');
|
|||
|
while($pli = mysql_fetch_array($spi))
|
|||
|
{
|
|||
|
if(!isset($tms[$pli['team']]))
|
|||
|
{
|
|||
|
$ts[count($ts)] = $pli['team'];
|
|||
|
}
|
|||
|
$tms[$pli['team']][count($tms[$pli['team']])] = $pli;
|
|||
|
}
|
|||
|
$k = 0;
|
|||
|
while($k<count($ts))
|
|||
|
{
|
|||
|
$g = $ts[$k];
|
|||
|
$h = 0;
|
|||
|
$tm2 = '';
|
|||
|
while($h<count($tms[$g]))
|
|||
|
{
|
|||
|
if($tms[$g][$h]['uid']>0)
|
|||
|
{
|
|||
|
if($tms[$g][$h]['align']>0)
|
|||
|
{
|
|||
|
$tm2 .= '<img src="https://img.new-combats.com/i/align/align'.$tms[$g][$h]['align'].'.gif">';
|
|||
|
}
|
|||
|
$tm2 .= '<b>'.$tms[$g][$h]['login'].'</b> ['.$tms[$g][$h]['lvl'].']<a href="info/'.$tms[$g][$h]['uid'].'" target="_blank"><img src="https://img.new-combats.com/i/inf_capitalcity.gif"></a>, ';
|
|||
|
}
|
|||
|
$h++;
|
|||
|
}
|
|||
|
$tm2 = rtrim($tm2,', ');
|
|||
|
$btlg = mysql_fetch_array(mysql_query('SELECT `id`,`team_win` FROM `battle` WHERE `id` = "'.$pl['battle_id'].'" LIMIT 1'));
|
|||
|
if(isset($btlg['id']) && $g == $btlg['team_win']) {
|
|||
|
$tm2 .= ' <img width="20" height="20" src="https://img.new-combats.com/i/flag.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"> ';
|
|||
|
}
|
|||
|
$tm .= $tm2;
|
|||
|
if($k+1<count($ts) && $tm2!='' && $ts[$k+1]>0)
|
|||
|
{
|
|||
|
$tm .= ' <font color=red><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></b></font> ';
|
|||
|
}
|
|||
|
$k++;
|
|||
|
}
|
|||
|
}
|
|||
|
if( !isset($btl_lst[$b['id']]) ) {
|
|||
|
$btl_lst[$b['id']] = true;
|
|||
|
if($tm == '')
|
|||
|
{
|
|||
|
$tm = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
$jk++;
|
|||
|
$btl .= $jk.'. <font class=date>'.date('d.m.y H:i',$pl['time']).'</font> '.$tm.' <A HREF="logs.php?log='.$pl['battle_id'].'&rnd='.$code.'" target=_blank><3E><></A><br>';
|
|||
|
}
|
|||
|
$j++;
|
|||
|
}
|
|||
|
}
|
|||
|
if($btl=='')
|
|||
|
{
|
|||
|
$see .= '<CENTER><BR><BR><B><3E> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...</B><BR><BR><BR></CENTER><HR><BR>';
|
|||
|
}else{
|
|||
|
$see .= $btl;
|
|||
|
}
|
|||
|
|
|||
|
echo $see;
|
|||
|
}else{
|
|||
|
if((!isset($_GET['new_group']) && !isset($_POST['groupClick'])) || isset($zi['id']))
|
|||
|
{
|
|||
|
echo '<BR><BR><CENTER><B><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></B></CENTER>';
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
if((!isset($_GET['new_group']) && !isset($_POST['groupClick'])) || isset($zi['id']))
|
|||
|
{
|
|||
|
echo '<BR><BR><CENTER><B><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></B></CENTER>';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public function rzv($v)
|
|||
|
{
|
|||
|
$v = explode('.',$v);
|
|||
|
if(!isset($v[1]))
|
|||
|
{
|
|||
|
$v = $v[0].'.0';
|
|||
|
}else{
|
|||
|
$v = $v[0].'.'.$v[1];
|
|||
|
}
|
|||
|
return $v;
|
|||
|
}
|
|||
|
|
|||
|
public function rzInfo($id)
|
|||
|
{
|
|||
|
global $u;
|
|||
|
$r = '';
|
|||
|
$w = mysql_num_rows(mysql_query('SELECT * FROM `zayvki` WHERE `time` > '.(time()-7200).' /*AND `city` = "'.$u->info['city'].'"*/ AND `cancel` = "0" AND `start` = "0" AND `razdel` = "'.$id.'" AND (`min_lvl_1` <= '.$u->info['level'].' OR `min_lvl_2` <= '.$u->info['level'].') AND (`max_lvl_1` >= '.$u->info['level'].' OR `max_lvl_2` >= '.$u->info['level'].')'));
|
|||
|
if($w>0)
|
|||
|
{
|
|||
|
$r = ' <small><font color="grey">('.$w.')</font></small>';
|
|||
|
}
|
|||
|
return $r;
|
|||
|
}
|
|||
|
|
|||
|
public function testzvu($id,$tm,$bt)
|
|||
|
{
|
|||
|
$r = 0;
|
|||
|
if($bt==0)
|
|||
|
{
|
|||
|
$r = mysql_num_rows(mysql_query('SELECT `id` FROM `stats` WHERE `zv` = "'.$id.'" AND `team` = "'.$tm.'"'));
|
|||
|
}else{
|
|||
|
$r = mysql_num_rows(mysql_query('SELECT `id` FROM `stats` WHERE `zv` = "'.$id.'" AND `team` = "'.$tm.'" AND `bot` = "2"'));
|
|||
|
}
|
|||
|
return $r;
|
|||
|
}
|
|||
|
|
|||
|
public function seeZv()
|
|||
|
{
|
|||
|
global $u,$c,$code,$zi;
|
|||
|
if(isset($_GET['r']) && $this->zv_see==1)
|
|||
|
{
|
|||
|
$r = round(intval($_GET['r']));
|
|||
|
if($r>=1 && $r<=5)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$i = 0;
|
|||
|
$cl = mysql_query('SELECT * FROM `zayvki` WHERE `razdel` = "'.mysql_real_escape_string($r).'" AND `start` = "0" AND `cancel` = "0" AND `time` > "'.(time()-60*60*2).'" /*AND `city` = "'.$u->info['city'].'"*/ ORDER BY `id` DESC');
|
|||
|
$zvb = '';
|
|||
|
if($r==4 || $r==5)
|
|||
|
{
|
|||
|
/*echo '<table cellspacing="0" cellpadding="0" align="right"><tr><td>
|
|||
|
<FIELDSET><LEGEND><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></LEGEND>
|
|||
|
<INPUT TYPE=radio ID=A1 name="all" value=0 checked> <LABEL FOR=A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></LABEL><BR>
|
|||
|
<INPUT TYPE=radio ID=A2 name="all" value=1> <LABEL FOR=A2><EFBFBD><EFBFBD><EFBFBD></LABEL>
|
|||
|
</FIELDSET>
|
|||
|
</td></tr></table><br>';*/
|
|||
|
}
|
|||
|
while($pl = mysql_fetch_array($cl))
|
|||
|
{
|
|||
|
if($pl['razdel']==5)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if ($pl['type']==33)
|
|||
|
{
|
|||
|
//if( $u->info['admin'] == 1 )
|
|||
|
//{
|
|||
|
if( $pl['min_lvl_1'] < 2 ) {
|
|||
|
$pl['min_lvl_1'] = 2;
|
|||
|
}
|
|||
|
if( $pl['max_lvl_1'] > 21 ) {
|
|||
|
$pl['max_lvl_1'] = 21;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$tm = '';
|
|||
|
$tmStart = floor(($pl['time']+$pl['time_start']-time())/6)/10;
|
|||
|
//if( $u->info['admin'] > 0 ) {
|
|||
|
if((($pl['time']+$pl['time_start'])/10) != (int)(($pl['time']+$pl['time_start'])/10)) {
|
|||
|
$pl['time'] = ceil($pl['time']/60)*60;
|
|||
|
mysql_query('UPDATE `zayvki` SET `time` = "'.$pl['time'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
//}
|
|||
|
$tmStart = $this->rzv($tmStart);
|
|||
|
|
|||
|
$users = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`u`.`admin`,`st`.`team` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `st`.`zv` = "'.$pl['id'].'"');
|
|||
|
$col_p = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$pl['id'].'"'));
|
|||
|
$cols = $col_p[0];
|
|||
|
while($s = mysql_fetch_array($users))
|
|||
|
{
|
|||
|
$tm .= $u->microLogin($s['id'],1).', ';
|
|||
|
}
|
|||
|
|
|||
|
$rad = '';
|
|||
|
|
|||
|
$tm = rtrim($tm,', ');
|
|||
|
|
|||
|
if(!isset($zi['id']) && $u->room['zvsee'] == 0 && $u->info['inTurnirnew'] == 0) {
|
|||
|
$rad = '<input type="radio" name="btl_go" id="btl_go'.$pl['id'].'" value="'.$pl['id'].'"> ';
|
|||
|
}
|
|||
|
|
|||
|
$n1tv = '';
|
|||
|
$unvs = '';
|
|||
|
if($pl['invise']==1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$tm = '<i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i>';
|
|||
|
$unvs = 0;
|
|||
|
|
|||
|
$usrszv = '';
|
|||
|
//if( $u->info['admin'] > 0 ) {
|
|||
|
$spzm = mysql_query('SELECT `id`,`team` FROM `stats` WHERE `zv` = "'.$pl['id'].'" AND `id` != "'.$pl['creator'].'"');
|
|||
|
while( $plzm = mysql_fetch_array($spzm) ) {
|
|||
|
if($u->info['admin'] > 0 || ($u->info['align'] > 1 && $u->info['align'] < 2) || ($u->info['align'] > 3 && $u->info['align'] < 4) ) {
|
|||
|
$usrszv .= ','.$u->microLogin($plzm['id'],1).'';
|
|||
|
}
|
|||
|
$unvs++;
|
|||
|
}
|
|||
|
//}
|
|||
|
$tm = '<font color=grey><span style="color:maroon">'.$u->microLogin($pl['creator'],1).'</span>'.$usrszv.'</font> - '.$tm;
|
|||
|
|
|||
|
$unvs = ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '.(1+$unvs).' <20><><EFBFBD>. ';
|
|||
|
$n1tv = ' <img src="https://img.new-combats.com/i/fighttypehidden0.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
//
|
|||
|
if( $pl['kingfight'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/king.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if($pl['travmaChance'] == 100 ){
|
|||
|
$n1tv .= '<img src="https://img.new-combats.com/fighttype6.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['noatack'] == 1 ) {
|
|||
|
//$n1tv .= ' <img src="https://img.new-combats.com/closefight.gif" title="<22> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/i/fighttypehidden0.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['nobot'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/nobot.gif" title="<22> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['fastfight'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/fastfight.gif" title="<22><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['noeff'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/svitok4.png" width="20" height="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['arand'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/random.png" width="20" height="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['noart'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/noart.png" width="20" height="20" title="<22><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['otmorozok'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/snow.gif" width="20" height="20" title="<22> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
//
|
|||
|
if($pl['comment'] != '') {
|
|||
|
$dl = '';
|
|||
|
if(($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom']==0) {
|
|||
|
$dl .= ' (<a href="main.php?zayvka=1&r=5&delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>)'; if(isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
|
|||
|
mysql_query('UPDATE `zayvki` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
$pl['dcom'] = $u->info['id'];
|
|||
|
}
|
|||
|
}
|
|||
|
if($pl['dcom'] > 0) { $dl = '<font color="grey"><i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i></font>'; }
|
|||
|
if($pl['dcom'] > 0) {
|
|||
|
if($moder['boi'] == 1 || $u->info['admin'] > 0) {
|
|||
|
$pl['comment'] = '[ <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <font color="red">'.$pl['comment'].'</font>] ';
|
|||
|
} else {
|
|||
|
$pl['comment'] = '';
|
|||
|
}
|
|||
|
}
|
|||
|
$zv_comm = ' '.$pl['comment'].''.$dl.' ';
|
|||
|
} else {
|
|||
|
$zv_comm = '';
|
|||
|
}
|
|||
|
if( $pl['priz'] == 1 ) {
|
|||
|
$imn = '';
|
|||
|
if( $pl['min_lvl_1'] == 10 ) {
|
|||
|
$imn .= ' <20><>. Jora Kardan';
|
|||
|
}
|
|||
|
$zv_comm = ' <a href="https://new-combats.com/n/567/" target="_blank"><span style="color:#e65700;" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "><b>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$imn.')</b></span></a>';
|
|||
|
}
|
|||
|
if($r == 5 && ($pl['creator'] == $u->info['id']) && $cols < 2 && $pl['priz'] == 0) {
|
|||
|
$del_q = ' <a href="main.php?zayvka=1&r=5&del_z_time='.$pl['id'].'&rnd='.$code.'"><img src="https://img.new-combats.com/i/clear.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" /></a>';
|
|||
|
} else {
|
|||
|
$del_q = '';
|
|||
|
}
|
|||
|
$lvldt = '';
|
|||
|
if( $pl['min_lvl_1'] != $pl['max_lvl_2'] ) {
|
|||
|
$lvldt .= ''.$pl['min_lvl_1'].'-'.$pl['max_lvl_2'].' <20><>. ';
|
|||
|
}else{
|
|||
|
$lvldt .= ''.$pl['min_lvl_1'].' <20><>. ';
|
|||
|
}
|
|||
|
$lvldt .= (0+$cols).'/'.$pl['maxplayers'].'';
|
|||
|
$zvb .= ''.$rad.'<font class="date">'.date('H:i',$pl['time']).'</font> <font color="green"><b><i>('.$lvldt.')</i></b></font> <20><><EFBFBD> <20><><EFBFBD>: <IMG SRC="https://img.new-combats.com/i/fighttype'.$pl['type'].'.gif" WIDTH="20" HEIGHT="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>">'.$n1tv.' (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <b>'.($pl['timeout']/60).' <20><><EFBFBD>.</b>) <b>'.$zv_comm.'</b> <font class="dsc"><i><font color="green">('.$unvs.'<27><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <B>'.$tmStart.'</B> <20><><EFBFBD>.)</font> </font></i> '.$mon.' <i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</i> '.$tm.' '.$del_q.'<br />';
|
|||
|
|
|||
|
//}
|
|||
|
//else {}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
if( $pl['min_lvl_1'] < 2 ) {
|
|||
|
$pl['min_lvl_1'] = 2;
|
|||
|
}
|
|||
|
if( $pl['max_lvl_1'] > 21 ) {
|
|||
|
$pl['max_lvl_1'] = 21;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$tm = '';
|
|||
|
$tmStart = floor(($pl['time']+$pl['time_start']-time())/6)/10;
|
|||
|
//if( $u->info['admin'] > 0 ) {
|
|||
|
if((($pl['time']+$pl['time_start'])/10) != (int)(($pl['time']+$pl['time_start'])/10)) {
|
|||
|
$pl['time'] = ceil($pl['time']/60)*60;
|
|||
|
mysql_query('UPDATE `zayvki` SET `time` = "'.$pl['time'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
}
|
|||
|
//}
|
|||
|
$tmStart = $this->rzv($tmStart);
|
|||
|
|
|||
|
$users = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`u`.`admin`,`st`.`team` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `st`.`zv` = "'.$pl['id'].'"');
|
|||
|
$col_p = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$pl['id'].'"'));
|
|||
|
$cols = $col_p[0];
|
|||
|
while($s = mysql_fetch_array($users))
|
|||
|
{
|
|||
|
$tm .= $u->microLogin($s['id'],1).', ';
|
|||
|
}
|
|||
|
|
|||
|
$rad = '';
|
|||
|
|
|||
|
$tm = rtrim($tm,', ');
|
|||
|
|
|||
|
if(!isset($zi['id']) && $u->room['zvsee'] == 0 && $u->info['inTurnirnew'] == 0) {
|
|||
|
$rad = '<input type="radio" name="btl_go" id="btl_go'.$pl['id'].'" value="'.$pl['id'].'"> ';
|
|||
|
}
|
|||
|
|
|||
|
$n1tv = '';
|
|||
|
$unvs = '';
|
|||
|
if($pl['invise']==1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$tm = '<i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i>';
|
|||
|
$unvs = 0;
|
|||
|
|
|||
|
$usrszv = '';
|
|||
|
//if( $u->info['admin'] > 0 ) {
|
|||
|
$spzm = mysql_query('SELECT `id`,`team` FROM `stats` WHERE `zv` = "'.$pl['id'].'" AND `id` != "'.$pl['creator'].'"');
|
|||
|
while( $plzm = mysql_fetch_array($spzm) ) {
|
|||
|
if($u->info['admin'] > 0 || ($u->info['align'] > 1 && $u->info['align'] < 2) || ($u->info['align'] > 3 && $u->info['align'] < 4) ) {
|
|||
|
$usrszv .= ','.$u->microLogin($plzm['id'],1).'';
|
|||
|
}
|
|||
|
$unvs++;
|
|||
|
}
|
|||
|
//}
|
|||
|
$tm = '<font color=grey><span style="color:maroon">'.$u->microLogin($pl['creator'],1).'</span>'.$usrszv.'</font> - '.$tm;
|
|||
|
|
|||
|
$unvs = ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '.(1+$unvs).' <20><><EFBFBD>. ';
|
|||
|
$n1tv = ' <img src="https://img.new-combats.com/i/fighttypehidden0.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
//
|
|||
|
if( $pl['kingfight'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/king.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if($pl['travmaChance'] == 100 ){
|
|||
|
$n1tv .= '<img src="https://img.new-combats.com/fighttype6.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['noatack'] == 1 ) {
|
|||
|
//$n1tv .= ' <img src="https://img.new-combats.com/closefight.gif" title="<22> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/i/fighttypehidden0.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['nobot'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/nobot.gif" title="<22> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['fastfight'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/fastfight.gif" title="<22><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['noeff'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/svitok4.png" width="20" height="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['arand'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/random.png" width="20" height="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['noart'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/noart.png" width="20" height="20" title="<22><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
if( $pl['otmorozok'] == 1 ) {
|
|||
|
$n1tv .= ' <img src="https://img.new-combats.com/snow.gif" width="20" height="20" title="<22> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">';
|
|||
|
}
|
|||
|
//
|
|||
|
if($pl['comment'] != '') {
|
|||
|
$dl = '';
|
|||
|
if(($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom']==0) {
|
|||
|
$dl .= ' (<a href="main.php?zayvka=1&r=5&delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>)'; if(isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
|
|||
|
mysql_query('UPDATE `zayvki` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
$pl['dcom'] = $u->info['id'];
|
|||
|
}
|
|||
|
}
|
|||
|
if($pl['dcom'] > 0) { $dl = '<font color="grey"><i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i></font>'; }
|
|||
|
if($pl['dcom'] > 0) {
|
|||
|
if($moder['boi'] == 1 || $u->info['admin'] > 0) {
|
|||
|
$pl['comment'] = '[ <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <font color="red">'.$pl['comment'].'</font>] ';
|
|||
|
} else {
|
|||
|
$pl['comment'] = '';
|
|||
|
}
|
|||
|
}
|
|||
|
$zv_comm = ' '.$pl['comment'].''.$dl.' ';
|
|||
|
} else {
|
|||
|
$zv_comm = '';
|
|||
|
}
|
|||
|
if( $pl['priz'] == 1 ) {
|
|||
|
$imn = '';
|
|||
|
if( $pl['min_lvl_1'] == 10 ) {
|
|||
|
$imn .= ' <20><>. Jora Kardan';
|
|||
|
}
|
|||
|
$zv_comm = ' <a href="https://new-combats.com/n/567/" target="_blank"><span style="color:#e65700;" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "><b>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$imn.')</b></span></a>';
|
|||
|
}
|
|||
|
if($r == 5 && ($pl['creator'] == $u->info['id']) && $cols < 2 && $pl['priz'] == 0) {
|
|||
|
$del_q = ' <a href="main.php?zayvka=1&r=5&del_z_time='.$pl['id'].'&rnd='.$code.'"><img src="https://img.new-combats.com/i/clear.gif" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" /></a>';
|
|||
|
} else {
|
|||
|
$del_q = '';
|
|||
|
}
|
|||
|
$lvldt = '';
|
|||
|
if( $pl['min_lvl_1'] != $pl['max_lvl_2'] ) {
|
|||
|
$lvldt .= ''.$pl['min_lvl_1'].'-'.$pl['max_lvl_2'].' <20><>. ';
|
|||
|
}else{
|
|||
|
$lvldt .= ''.$pl['min_lvl_1'].' <20><>. ';
|
|||
|
}
|
|||
|
$lvldt .= (0+$cols).'/'.$pl['maxplayers'].'';
|
|||
|
$zvb .= ''.$rad.'<font class="date">'.date('H:i',$pl['time']).'</font> <font color="green"><b><i>('.$lvldt.')</i></b></font> <20><><EFBFBD> <20><><EFBFBD>: <IMG SRC="https://img.new-combats.com/i/fighttype'.$pl['type'].'.gif" WIDTH="20" HEIGHT="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>">'.$n1tv.' (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <b>'.($pl['timeout']/60).' <20><><EFBFBD>.</b>) <b>'.$zv_comm.'</b> <font class="dsc"><i><font color="green">('.$unvs.'<27><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <B>'.$tmStart.'</B> <20><><EFBFBD>.)</font> </font></i> '.$mon.' <i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</i> '.$tm.' '.$del_q.'<br />';
|
|||
|
|
|||
|
}
|
|||
|
} elseif($pl['razdel']==4)
|
|||
|
{
|
|||
|
if( $pl['min_lvl_1'] < 2 ) {
|
|||
|
$pl['min_lvl_1'] = 2;
|
|||
|
}
|
|||
|
if( $pl['max_lvl_1'] > 21 ) {
|
|||
|
$pl['max_lvl_1'] = 21;
|
|||
|
}
|
|||
|
if( $pl['min_lvl_2'] < 2 ) {
|
|||
|
$pl['min_lvl_2'] = 2;
|
|||
|
}
|
|||
|
if( $pl['max_lvl_2'] > 21 ) {
|
|||
|
$pl['max_lvl_2'] = 21;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
$tm1 = '';
|
|||
|
$tm2 = '';
|
|||
|
$tmStart = floor(($pl['time']+$pl['time_start']-time())/6)/10;
|
|||
|
$tmStart = $this->rzv($tmStart);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$xx2 = $this->testzvu($pl['id'],2,0);
|
|||
|
if($pl['bot2']>0 && $xx2 < $pl['tm2max'])
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$spb = mysql_query('SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `st`.`bot` = 3 AND `u`.`level` = "'.$pl['min_lvl_2'].'" AND `u`.`battle` = 0 AND `st`.`zv` = 0 LIMIT 100');
|
|||
|
$logins_bot = array();
|
|||
|
while($plb = mysql_fetch_array($spb))
|
|||
|
{
|
|||
|
if($xx2 < $pl['tm2max'] && rand(0,10000)<5000 && rand(0,10000)>5000)
|
|||
|
{
|
|||
|
$bt = $u->addNewbot(0,'',$plb['id']);
|
|||
|
$logins_bot = $bt['logins_bot'];
|
|||
|
if($bt>0)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `stats` SET `zv` = "'.$pl['id'].'",`team` = "2" WHERE `id` = "'.$bt.'" LIMIT 1');
|
|||
|
$xx2++;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
unset($plb,$spb,$logins_bot,$bt);
|
|||
|
}
|
|||
|
unset($xx2);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$users = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`u`.`admin`,`st`.`team` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `st`.`zv` = "'.$pl['id'].'"');
|
|||
|
$tmc = array();
|
|||
|
while($s = mysql_fetch_array($users))
|
|||
|
{
|
|||
|
${'tm'.$s['team']} .= $u->microLogin($s['id'],1).', ';
|
|||
|
$tmc[$s['team']]++;
|
|||
|
}
|
|||
|
|
|||
|
if($tm1=='')
|
|||
|
{
|
|||
|
$tm2 = '<font color="#777"><i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i></font>';
|
|||
|
}else{
|
|||
|
$tm1 = rtrim($tm1,', ');
|
|||
|
}
|
|||
|
|
|||
|
if($tm2=='')
|
|||
|
{
|
|||
|
$tm2 = '<font color="#777"><i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i></font>';
|
|||
|
}else{
|
|||
|
$tm2 = rtrim($tm2,', ');
|
|||
|
}
|
|||
|
//
|
|||
|
if( $pl['teams'] == 3 ) {
|
|||
|
if($tm3=='')
|
|||
|
{
|
|||
|
$tm2 = '<font color="#777"><i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i></font>';
|
|||
|
}else{
|
|||
|
$tm3 = rtrim($tm3,', ');
|
|||
|
}
|
|||
|
|
|||
|
$ttl1 = '';
|
|||
|
$ttl2 = '';
|
|||
|
$ttl3 = '';
|
|||
|
|
|||
|
if( $pl['align1'] == 3 ) { $ttl1 = '<27><><EFBFBD><EFBFBD>';
|
|||
|
}elseif( $pl['align1'] == 7 ) { $ttl1 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'; }else{
|
|||
|
$ttl1 = '<27><><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
if( $pl['align2'] == 3 ) { $ttl2 = '<27><><EFBFBD><EFBFBD>';
|
|||
|
}elseif( $pl['align2'] == 7 ) { $ttl2 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'; }else{
|
|||
|
$ttl2 = '<27><><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
if( $pl['align3'] == 3 ) { $ttl3 = '<27><><EFBFBD><EFBFBD>';
|
|||
|
}elseif( $pl['align3'] == 7 ) { $ttl3 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'; }else{
|
|||
|
$ttl3 = '<27><><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
|
|||
|
$tm1 = '<img src="https://img.new-combats.com/i/align/align'.$pl['align1'].'.gif"> '.$ttl1.': ' . $tm1;
|
|||
|
$tm2 = '<img src="https://img.new-combats.com/i/align/align'.$pl['align2'].'.gif"> '.$ttl2.': ' . $tm2;
|
|||
|
$tm3 = '<img src="https://img.new-combats.com/i/align/align'.$pl['align3'].'.gif"> '.$ttl3.': ' . $tm3;
|
|||
|
|
|||
|
}
|
|||
|
//
|
|||
|
$rad = '';
|
|||
|
if(!isset($zi['id']) && $u->room['zvsee']==0)
|
|||
|
{
|
|||
|
$rad = '<input type="radio" name="groupClick" id="groupClick" value="'.$pl['id'].'"> ';
|
|||
|
}
|
|||
|
if($pl['comment']!=''){
|
|||
|
$dl = '';
|
|||
|
if(($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom']==0) {
|
|||
|
$dl .= ' (<a href="main.php?zayvka=1&r=4&delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>)'; if(isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
|
|||
|
mysql_query('UPDATE `zayvki` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
|||
|
$pl['dcom'] = $u->info['id'];
|
|||
|
}
|
|||
|
}
|
|||
|
if($pl['dcom'] > 0) { $dl = '<font color="grey"><i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i></font>'; }
|
|||
|
if($pl['dcom'] > 0) {
|
|||
|
if($moder['boi'] == 1 || $u->info['admin'] > 0) {
|
|||
|
$pl['comment'] = '[ <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <font color="red">'.$pl['comment'].'</font>] ';
|
|||
|
} else {
|
|||
|
$pl['comment'] = '';
|
|||
|
}
|
|||
|
}
|
|||
|
$zv_comm = ''.$pl['comment'].''.$dl.'';
|
|||
|
}else{$zv_comm='';}
|
|||
|
if( $pl['teams'] == 3 ) {
|
|||
|
$zv_comm .= ' <a href="https://new-combats.com/lib/turnir-sklonnostei/" target="_blank"><span style="color:#543666;" title="<22> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>."><b>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)</b></span></a>';
|
|||
|
}
|
|||
|
//$zvb .= ''.$rad.'<font class="date">'.date('H:i',$pl['time']).'</font> <i>(<font color=green>'.(0+$tmc[1]).'/<B>'.$pl['tm1max'].'</font></b>)<b></i> (</b>'.$pl['min_lvl_1'].'-'.$pl['max_lvl_1'].'<b>) <20><> </b><font title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" color=green>'.(0+$tmc[2]).'/<b>'.$pl['tm2max'].'</font> (</b>'.$pl['min_lvl_2'].'-'.$pl['max_lvl_2'].'<b>)';
|
|||
|
|
|||
|
|
|||
|
$zvb .= ''.$rad.'<font class="date">'.date('H:i',$pl['time']).'</font> ';
|
|||
|
//
|
|||
|
$zvb .= '(<font color=green>'.(0+$tmc[1]).'/<b>'.$pl['tm1max'].'</b></font>)';
|
|||
|
$zvb .= ' '.$tm1;
|
|||
|
$zvb .= ' <font color="green"><b><i>(';
|
|||
|
if( $pl['min_lvl_1'] == $pl['max_lvl_1'] ) {
|
|||
|
$zvb .= $pl['min_lvl_1'];
|
|||
|
}else{
|
|||
|
$zvb .= $pl['min_lvl_1'].'-'.$pl['max_lvl_1'];
|
|||
|
}
|
|||
|
$zvb .= ' <20><>.)</i></b></font>';
|
|||
|
//
|
|||
|
$zvb .= ' <i><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i> ';
|
|||
|
//
|
|||
|
$zvb .= '(<font color=green>'.(0+$tmc[2]).'/<b>'.$pl['tm2max'].'</b></font>)';
|
|||
|
$zvb .= ' '.$tm2;
|
|||
|
$zvb .= ' <font color="green"><b><i>(';
|
|||
|
if( $pl['min_lvl_2'] == $pl['max_lvl_2'] ) {
|
|||
|
$zvb .= $pl['min_lvl_2'];
|
|||
|
}else{
|
|||
|
$zvb .= $pl['min_lvl_2'].'-'.$pl['max_lvl_2'];
|
|||
|
}
|
|||
|
$zvb .= ' <20><>.)</i></b></font>';
|
|||
|
//
|
|||
|
$zvb .= ' <20><><EFBFBD> <20><><EFBFBD>: <IMG SRC="https://img.new-combats.com/i/fighttype'.$pl['type'].'.gif" WIDTH="20" HEIGHT="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>"> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <b>'.($pl['timeout']/60).' <20><><EFBFBD>.</b>) ';
|
|||
|
$zvb .= ' <b>'.$zv_comm.'</b> ';
|
|||
|
$zvb .= ' <font color="green"><i>(<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <b>'.$tmStart.'</b>)</i></font> '.$mon.'<BR>';
|
|||
|
//
|
|||
|
//$zvb .= ' <IMG SRC="https://img.new-combats.com/i/fighttype'.$pl['type'].'.gif" WIDTH="20" HEIGHT="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>"> <font class="dsc"><i><3E><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <B>'.$tmStart.'</B> <20><><EFBFBD>., <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.($pl['timeout']/60).' <20><><EFBFBD>. '.$zv_comm.'</font></i>'.$mon.'<BR>';
|
|||
|
|
|||
|
/*if( $pl['teams'] == 3 ) {
|
|||
|
$zvb .= ' <20><> '.$pl['tm2max'].' (</b>'.$pl['min_lvl_2'].'-'.$pl['max_lvl_2'].'<b>)';
|
|||
|
}
|
|||
|
$zvb .= '</B> ('.$tm1.') <font class="dsc"><i><span style=\'color:red; font-weight:bold;\'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></span></font></i> ('.$tm2.')';
|
|||
|
if( $pl['teams'] == 3 ) {
|
|||
|
$zvb .= ' <font class="dsc"><i><span style=\'color:red; font-weight:bold;\'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></span></font></i> ('.$tm3.')';
|
|||
|
}*/
|
|||
|
|
|||
|
//$zvb .= ' <IMG SRC="https://img.new-combats.com/i/fighttype'.$pl['type'].'.gif" WIDTH="20" HEIGHT="20" title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>"> <font class="dsc"><i><3E><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <B>'.$tmStart.'</B> <20><><EFBFBD>., <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.($pl['timeout']/60).' <20><><EFBFBD>. '.$zv_comm.'</font></i>'.$mon.'<BR>';
|
|||
|
}elseif($pl['razdel']>=1 && $pl['razdel']<=3)
|
|||
|
{
|
|||
|
$uz = mysql_fetch_array(mysql_query('SELECT `u`.`banned`,`u`.`id`,`u`.`login`,`u`.`align`,`u`.`clan`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`online`,`u`.`level`,`u`.`battle`,`u`.`money`,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$pl['id'].'" AND `st`.`team`="1" LIMIT 1'));
|
|||
|
if(isset($uz['id']))
|
|||
|
{
|
|||
|
$uze = mysql_fetch_array(mysql_query('SELECT `u`.*,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$pl['id'].'" AND `st`.`team` = "2" LIMIT 1'));
|
|||
|
$d1 = '';
|
|||
|
if($uz['id']==$u->info['id'] || $uze['id']==$u->info['id'] || $u->info['level'] <= $c['bot_level'])
|
|||
|
{
|
|||
|
$d1 = 'disabled="disabled"';
|
|||
|
}
|
|||
|
//if($uz['clan'] == $u->info['clan'] && $u->info['clan'] != 0) { $d1 = 'disabled="disabled"'; }
|
|||
|
if(!isset($uze['id']) || $u->info['zv'] == $pl['id'])
|
|||
|
{
|
|||
|
$enm = '';
|
|||
|
|
|||
|
if(isset($uze['id']))
|
|||
|
{
|
|||
|
$enm = ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$u->microLogin($uze['id'],1).'';
|
|||
|
}
|
|||
|
if($uz['banned']>0)
|
|||
|
{
|
|||
|
$pl['id'] = 0;
|
|||
|
$d1 = 'disabled="disabled"';
|
|||
|
$zvb .= '<span style="text-decoration:line-through;">';
|
|||
|
}
|
|||
|
$dp1 = '';
|
|||
|
if($pl['money']>0)
|
|||
|
{
|
|||
|
$dp1 = ' <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <b>'.$u->round2($pl['money']).' <20><>.</b>';
|
|||
|
}
|
|||
|
if($u->room['zvsee'] == 0) {
|
|||
|
$zvb .= '<input name="btl_go" '.$d1.' type="radio" value="'.$pl['id'].'" />';
|
|||
|
}
|
|||
|
$mbcom = '';
|
|||
|
if( $pl['comment'] != '' ) {
|
|||
|
$mbcom = ' <b>'.$pl['comment'].'</b>';
|
|||
|
}
|
|||
|
$zvb .= '<font class="date">'.date('H:i',$pl['time']).'</font> '.$u->microLogin($uz['id'],1).' '.$enm.' <20><><EFBFBD> <20><><EFBFBD>: <img src="https://img.new-combats.com/i/fighttype'.($pl['type']).'.gif"> ( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <b>'.round($pl['timeout']/60).' <20><><EFBFBD>.</b>'.$dp1.' '.$mon.')'.$mbcom.'<br>';
|
|||
|
if($uz['banned']>0) { $zvb .= '</span>'; }
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
$i++;
|
|||
|
}
|
|||
|
if($i==0)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
if($u->room['zvsee'] > 0) {
|
|||
|
echo '<br><br><br><div align="center"><b><3E> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></b></div>';
|
|||
|
}
|
|||
|
}else{
|
|||
|
if(!isset($zi['id']) && $u->room['zvsee']==0)
|
|||
|
{
|
|||
|
if($_GET['r'] == 5) {
|
|||
|
if( $u->info['no_zv_key'] != true ) {
|
|||
|
|
|||
|
echo '<div style="float:left;"><form method="post" style="margin:0px;padding:0px;" action="main.php?zayvka=1&r='.$r.'&rnd='.$code.'"><br>
|
|||
|
<img src="https://new-combats.com/show_reg_img/security2.php?id='.time().'" width="70" height="20"> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <input style="width:40px;" type="text" value="" name="code21">
|
|||
|
<input class="btn" name="" type="submit" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" /><br>'.$zvb.' <img src="https://new-combats.com/show_reg_img/security2.php?id='.time().'" width="70" height="20"> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <input style="width:40px;" type="text" value="" name="code22">
|
|||
|
<input class="btn" style="margin-top:1px;" type="submit" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" />
|
|||
|
</form></div>';
|
|||
|
|
|||
|
}else{
|
|||
|
echo '<div style="float:left;"><form method="post" style="margin:0px;padding:0px;" action="main.php?zayvka=1&r='.$r.'&rnd='.$code.'"><br>
|
|||
|
<input class="btn" name="" type="submit" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" /><br>'.$zvb.'
|
|||
|
<input class="btn" style="margin-top:1px;" type="submit" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" /></form></div>';
|
|||
|
}
|
|||
|
}else{
|
|||
|
if( $zvb != '' && $u->info['level'] > $c['bot_level'] ) {
|
|||
|
echo '<div style="float:left;"><form method="post" style="margin:0px;padding:0px;" action="main.php?zayvka=1&r='.$r.'&rnd='.$code.'"><br><input class="btn" name="" type="submit" value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>" /><br>'.$zvb.'<input class="btn" style="margin-top:1px;" type="submit" value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>" /></form></div>';
|
|||
|
}else{
|
|||
|
echo '<div style="float:left;">'.$zvb.'</div>';
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
echo $zvb;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public function go($id)
|
|||
|
{
|
|||
|
global $u,$c,$code,$zi,$filter;
|
|||
|
if(!isset($zi['id']))
|
|||
|
{
|
|||
|
if($u->info['battle']==0 && $u->info['inTurnirnew']==0)
|
|||
|
{
|
|||
|
$z = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `id`="'.mysql_real_escape_string(intval($id)).'" /*AND `city` = "'.$u->info['city'].'"*/ AND `start` = "0" AND `cancel` = "0" AND `time` > "'.(time()-60*60*2).'" LIMIT 1'));
|
|||
|
if(isset($z['id']))
|
|||
|
{
|
|||
|
if($z['razdel']>=1 && $z['razdel']<=3)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$uz1 = mysql_fetch_array(mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`align`,`u`.`clan`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`online`,`u`.`level`,`u`.`battle`,`u`.`money`,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$z['id'].'" AND `st`.`team`="1" LIMIT 1'));
|
|||
|
if(isset($uz1['id']))
|
|||
|
{
|
|||
|
$uz2 = mysql_fetch_array(mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`align`,`u`.`clan`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`online`,`u`.`level`,`u`.`battle`,`u`.`money`,`st`.* FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv`="'.$z['id'].'" AND `st`.`team`="2" LIMIT 1'));
|
|||
|
if( $this->testTravm() == 1 && $z['type'] != 1 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>.';
|
|||
|
$az = 0;
|
|||
|
}elseif( $this->testTravm() == 2 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
$az = 0;
|
|||
|
}elseif($u->info['hpNow']<$u->stats['hpAll']/100*30 && ($z['razdel']>=1 || $z['razdel']<=3)) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>';
|
|||
|
$az = 0;
|
|||
|
} elseif($uz1['clan']==$u->info['clan'] && $u->info['clan']!=0 && $u->info['admin'] == 0 && true == false) {
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
} elseif($z['withUser']!='' && $filter->mystr($u->info['login'])!=$filter->mystr($z['withUser']) && $z['razdel']==3) {
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
} elseif($z['money'] > 0 && $z['money'] > $u->info['money']) {
|
|||
|
$this->error = '<27> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($u->stats['hpNow']<ceil($u->stats['hpMax']/100*30))
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif(!isset($uz2['id']))
|
|||
|
{
|
|||
|
$upd = mysql_query('UPDATE `stats` SET `zv` = "'.$z['id'].'",`team` = "2" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
if($upd)
|
|||
|
{
|
|||
|
$ca = '';
|
|||
|
if($uz1['clan']!=0)
|
|||
|
{
|
|||
|
$pc = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id`="'.$uz1['clan'].'" LIMIT 1'));
|
|||
|
if(isset($pc['id']))
|
|||
|
{
|
|||
|
$pc['img'] = $pc['name_mini'].'.gif';
|
|||
|
$ca = '<img title="'.$pc['name'].'" src="https://img.new-combats.com/i/clan/'.$pc['name_mini'].'.gif">';
|
|||
|
}
|
|||
|
}
|
|||
|
if($uz1['align']!=0)
|
|||
|
{
|
|||
|
$ca = '<img src="https://img.new-combats.com/i/align/align'.$uz1['align'].'.gif">'.$ca;
|
|||
|
}
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> '.$ca.' '.$uz1['login'].' ['.$uz1['level'].']<a href="info/'.$uz1['id'].'" target="_blank"><img src="https://img.new-combats.com/i/inf_capitalcity.gif"></a>';
|
|||
|
$sa = '';
|
|||
|
if($u->info['sex']==2)
|
|||
|
{
|
|||
|
$sa = '<27>';
|
|||
|
}
|
|||
|
$text = ' [login:'.$u->info['login'].'] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$sa.' <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>.[reflesh_main_zv_priem:'.$u->info['id'].']';
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$uz1['city']."','','','".$uz1['login']."','".$text."','".time()."','6','0')");
|
|||
|
$zi = $z;
|
|||
|
$u->info['zv'] = $z['id'];
|
|||
|
$u->info['team'] = 2;
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>.';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}elseif($z['razdel']==4 && $u->info['level']>1)
|
|||
|
{
|
|||
|
$tm = 0;
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if(isset($_GET['tm1']))
|
|||
|
{
|
|||
|
$tm = 1;
|
|||
|
}elseif(isset($_GET['tm2']))
|
|||
|
{
|
|||
|
$tm = 2;
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>';
|
|||
|
}
|
|||
|
|
|||
|
if($tm!=0)
|
|||
|
{
|
|||
|
$t1 = $tm;
|
|||
|
$t2 = 1;
|
|||
|
$tmmax = 0;
|
|||
|
if($tm==1){ $t2 = 2; }
|
|||
|
$cl111 = mysql_query('SELECT `u`.`clan`,`st`.`team`,`st`.`id`,`st`.`zv` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`zv` = "'.$z['id'].'" LIMIT 200');
|
|||
|
$cln = 0;
|
|||
|
while($pc111 = mysql_fetch_array($cl111))
|
|||
|
{
|
|||
|
if($pc111['clan']==$u->info['clan'] && $u->info['clan']!=0 && $pc111['team']==$t2)
|
|||
|
{
|
|||
|
$cln++;
|
|||
|
}
|
|||
|
if($pc111['team']==$t1)
|
|||
|
{
|
|||
|
$tmmax++;
|
|||
|
}
|
|||
|
}
|
|||
|
if($cln>0)
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($z['bot2']==1 && $t1==2) {
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
} elseif($z['money3'] > 0 && $z['money3'] > $u->info['money3']) {
|
|||
|
$this->error = '<27> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
} elseif(($z['money'] > 0 || $z['money3'] > 0) && $u->info['level'] < 4) {
|
|||
|
$this->error = '<27><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 4-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($z['tm'.$t1.'max']>$tmmax)
|
|||
|
{
|
|||
|
if($z['min_lvl_'.$t1]>$u->info['level'] || $z['max_lvl_'.$t1]<$u->info['level'])
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$z['min_lvl_'.$t1].' - '.$z['max_lvl_'.$t1].' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($u->stats['hpNow']<ceil($u->stats['hpMax']/100*30))
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}else{
|
|||
|
$upd = mysql_query('UPDATE `stats` SET `zv` = "'.$z['id'].'",`team` = "'.mysql_real_escape_string((int)$t1).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
if(!$upd)
|
|||
|
{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...';
|
|||
|
}else{
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>...';
|
|||
|
$zi = $z;
|
|||
|
$u->info['zv'] = $z['id'];
|
|||
|
$u->info['team'] = mysql_real_escape_string((int)$t1);
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ('.($z['tm'.$t1.'max']-$tmmax).')';
|
|||
|
}
|
|||
|
}
|
|||
|
}elseif($z['razdel']==5 && $u->info['level']>1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$col_p = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$z['id'].'"'));
|
|||
|
$cols = $col_p[0];
|
|||
|
if( $cols >= $z['maxplayers'] ) {
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!';
|
|||
|
}elseif( $this->testTravm() == 1 && $z['k'] != 1 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>.';
|
|||
|
}elseif( $this->testTravm() == 2 ) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}elseif( $u->info['no_zv_key'] != true && (!isset($_SESSION['code2']) || $_SESSION['code2'] < 1 || ($_POST['code21'] != $_SESSION['code2'] && $_POST['code22'] != $_SESSION['code2'])) )
|
|||
|
{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($z['min_lvl_1']>$u->info['level'] || $z['max_lvl_1']<$u->info['level'])
|
|||
|
{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$z['min_lvl_1'].' - '.$z['max_lvl_1'].' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($u->stats['hpNow']<ceil($u->stats['hpMax']/100*30)) {
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
} elseif($z['money'] > 0 && $u->info['level'] < 4) {
|
|||
|
$this->error = '<27><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 4-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}else{
|
|||
|
$t1 = 0;
|
|||
|
|
|||
|
if ($z['type']==33)
|
|||
|
{
|
|||
|
|
|||
|
//============================================================================================= <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mysql_query('INSERT INTO `users` (`name`,`align`,`real`,`login`,`host_reg`,`pass`,`ip`,`ipreg`,`city`,`cityreg`,`room`,`timereg`,
|
|||
|
`activ`,`mail`,`bithday`,`sex`,`fnq`,`battle`,`design`,`molch2`,`level`
|
|||
|
) VALUES (
|
|||
|
"'.$u->info['name'].'",
|
|||
|
"'.$u->info['align'].'",
|
|||
|
"1",
|
|||
|
"'.$u->info['login'].'",
|
|||
|
"0",
|
|||
|
"'.$u->info['pass'].'",
|
|||
|
"'.mysql_real_escape_string(IP).'",
|
|||
|
"'.mysql_real_escape_string(IP).'",
|
|||
|
"capitalcity",
|
|||
|
"capitalcity",
|
|||
|
"422",
|
|||
|
"'.time().'",
|
|||
|
"0",
|
|||
|
"haot@new-combats.com",
|
|||
|
"01.01.1980",
|
|||
|
"'.$u->info['sex'].'",
|
|||
|
"0",
|
|||
|
"0",
|
|||
|
"1",
|
|||
|
"'.mysql_real_escape_string(time()+86400).'",
|
|||
|
"8"
|
|||
|
)');
|
|||
|
|
|||
|
$uidb = mysql_insert_id();
|
|||
|
|
|||
|
mysql_query('UPDATE `users` SET `inUser` = "'.$uidb.'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$sellclass=rand(1,6);
|
|||
|
if ($sellclass==1)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 1
|
|||
|
$us = add_effn($uidb,8); // <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,20); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uidb."','s1=21|s2=31|s3=16|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=10|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)");
|
|||
|
$re =$u->addItem(525,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "525" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(539,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "539" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(523,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "523" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(523,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "523" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(290,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "290" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(541,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "541" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(633,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "633" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(647,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "647" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(680,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "680" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(685,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(685,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(685,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(1151,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1151" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(707,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "707" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(712,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "712" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `priems`="193|8|217|221|6|213|14|220|141|232|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id`="'.$uidb.'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
elseif ($sellclass==2)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 2
|
|||
|
$us = add_effn($uidb,7); // <20><><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,20); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uidb."','s1=24|s2=20|s3=24|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=9|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)");
|
|||
|
$re =$u->addItem(527,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "527" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(537,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "537" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(567,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "567" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(723,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "723" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(291,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(544,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "544" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(626,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "626" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(651,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "651" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(683,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "683" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(686,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(686,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(686,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(706,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "706" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(708,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "708" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(717,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "717" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `priems`="193|204|221|138|9|188|240|215|147|232|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id`="'.$uidb.'" LIMIT 1');
|
|||
|
//193|204|221|138|9|188|240|215|147|232|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
|
|||
|
}
|
|||
|
elseif ($sellclass==3)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 3
|
|||
|
$us = add_effn($uidb,1); // <20><><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,20); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uidb."','s1=42|s2=3|s3=3|s4=50|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=9|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)");
|
|||
|
$re =$u->addItem(533,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "533" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(536,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "536" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(558,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "558" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(722,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "722" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(291,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(545,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "545" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(628,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "628" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(654,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "654" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(684,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "684" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(689,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(689,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(689,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(700,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "700" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(710,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "710" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(718,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "718" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `priems`="11|204|233|226|45|14|139|221|6|232|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id`="'.$uidb.'" LIMIT 1');
|
|||
|
|
|||
|
}
|
|||
|
elseif ($sellclass==4)
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 4
|
|||
|
$us = add_effn($uidb,1); // <20><><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,20); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uidb."','s1=43|s2=15|s3=15|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=10|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)");
|
|||
|
$re =$u->addItem(528,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "528" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(538,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "538" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(552,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "552" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(552,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "552" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(291,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(543,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "543" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(627,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "627" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(653,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "653" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(681,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "681" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(687,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(687,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(687,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(320,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "320" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(709,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "709" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(716,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "716" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
mysql_query('UPDATE `stats` SET `priems`="193|139|49|14|6|217|221|204|147|45|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id`="'.$uidb.'" LIMIT 1');
|
|||
|
//193|139|49|14|6|217|221|204|147|45|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
|
|||
|
}
|
|||
|
elseif ($sellclass==5)
|
|||
|
{
|
|||
|
//<2F> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 5
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,9); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,32); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,54); // <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,439); // <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uidb."','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=0|mg4=6|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)");
|
|||
|
$re =$u->addItem(531,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(534,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(1026,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(291,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(548,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(629,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(699,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "699" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(711,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(714,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
///------- <20><><EFBFBD>
|
|||
|
$re =$u->addItem(657,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "657" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(674,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "674" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(692,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(692,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(692,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
///----
|
|||
|
mysql_query('UPDATE `stats` SET `priems`="208|117|170|44|113|128|122|249|246|147|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id`="'.$uidb.'" LIMIT 1');
|
|||
|
//208|117|170|44|113|253|122|249|246|147|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
|
|||
|
}
|
|||
|
elseif ($sellclass==6)
|
|||
|
{
|
|||
|
//<2F> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,9); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,32); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,53); // <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,439); // <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uidb."','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=6|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)");
|
|||
|
$re =$u->addItem(531,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(534,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(1026,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(291,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(548,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(629,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(699,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "699" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(711,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(714,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
///------- <20><><EFBFBD>
|
|||
|
$re =$u->addItem(658,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "658" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(675,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "675" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
|
|||
|
$re =$u->addItem(693,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(693,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$re =$u->addItem(693,$uidb);
|
|||
|
mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
$price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1'));
|
|||
|
mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1');
|
|||
|
///----
|
|||
|
mysql_query('UPDATE `stats` SET `priems`="208|93|98|260|39|263|257|104|30|147|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id`="'.$uidb.'" LIMIT 1');
|
|||
|
//208|93|98|260|39|287|257|104|261|147|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
|
|||
|
}
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
$us = add_effn($uidb,37);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,38);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,283);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,25);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$us = add_effn($uidb,296);//<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> +6
|
|||
|
//$us = add_effn($uidb,472);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mysql_query('UPDATE `users` SET `money` = -3000 , `money2` = 0 WHERE `id` = "'.$uidb.'" LIMIT 1');
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$hpclon=mysql_fetch_array(mysql_query('SELECT `hpAll`,`mpAll` FROM `stats` WHERE `id` = "'.$uidb.'" LIMIT 1'));
|
|||
|
mysql_query('UPDATE `stats` SET `hpNow` = "'.$hpclon['hpAll'].'" `mpNow` = "'.$hpclon['mpAll'].'" WHERE `id` = "'.$uidb.'" LIMIT 1');
|
|||
|
$u->info['id']=$uidb;
|
|||
|
//=============================================================================================
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> 8<><38> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
echo '<script>location="main.php?battle_id='.$btl_id.'";</script>';
|
|||
|
}
|
|||
|
|
|||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
/*if($z['tm1'] > $z['tm2'])
|
|||
|
{
|
|||
|
$t1 = 2;
|
|||
|
}elseif($z['tm1'] < $z['tm2'])
|
|||
|
{
|
|||
|
$t1 = 1;
|
|||
|
}else{
|
|||
|
$t1 = rand(1,2);
|
|||
|
}*/
|
|||
|
|
|||
|
/*
|
|||
|
$tmtest1 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$z['id'].'" AND `team` = 1 LIMIT 1'));
|
|||
|
$tmtest2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$z['id'].'" AND `team` = 2 LIMIT 1'));
|
|||
|
|
|||
|
if( $t1 == 1 && $tmtest1[0]-2 > $tmtest2[0] ) {
|
|||
|
$t1 = 2;
|
|||
|
}elseif( $t1 == 2 && $tmtest2[0]-2 > $tmtest1[0] ) {
|
|||
|
$t1 = 1;
|
|||
|
}
|
|||
|
*/
|
|||
|
|
|||
|
if($z['invise']==1)
|
|||
|
{
|
|||
|
$nxtID = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$z['id'].'"'));
|
|||
|
$nxtID = $nxtID[0];
|
|||
|
//$u->info['login2'] = '<27><><EFBFBD><EFBFBD> ('.($nxtID+1).')';
|
|||
|
$u->info['login2'] = '';
|
|||
|
}else{
|
|||
|
$u->info['login2'] = '';
|
|||
|
}
|
|||
|
|
|||
|
$blnc = $u->stats['reting'];
|
|||
|
|
|||
|
$z['tm'.$t1] += $blnc;
|
|||
|
|
|||
|
$upd = mysql_query('UPDATE `stats` SET `zv` = "'.$z['id'].'",`team` = "'.$t1.'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
if(!$upd)
|
|||
|
{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...';
|
|||
|
}else{
|
|||
|
mysql_query('UPDATE `users` SET `login2` = "'.$u->info['login2'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `zayvki` SET `tm1` = "'.$z['tm1'].'", `tm2` = "'.$z['tm2'].'" WHERE `id` = "'.$z['id'].'" LIMIT 1');
|
|||
|
$this->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>...';
|
|||
|
$zi = $z;
|
|||
|
$u->info['zv'] = $z['id'];
|
|||
|
$u->info['team'] = mysql_real_escape_string((int)$t1);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
$this->error = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
$zv = new zayvki;
|
|||
|
$zv->test(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
?>
|