Фиксим мелкие ошибки.
This commit is contained in:
parent
c41f36644c
commit
d82a2e3103
@ -100,14 +100,9 @@ class BotPriemLogic
|
||||
return true;
|
||||
}
|
||||
|
||||
private static function usePriem($id, $on = null)
|
||||
private static function usePriem($id)
|
||||
{
|
||||
$go_txt = '&usepriem=' . $id;
|
||||
if ($on != '') {
|
||||
$on = str_replace(' ', '%20', $on);
|
||||
$go_txt .= '&useon=' . $on;
|
||||
}
|
||||
BotLogic::inuser_go_btl(BotLogic::$bot, $go_txt);
|
||||
BotLogic::inuser_go_btl(BotLogic::$bot, '&usepriem=' . $id);
|
||||
}
|
||||
|
||||
//Ставка на опережение
|
||||
@ -328,13 +323,13 @@ class BotPriemLogic
|
||||
}
|
||||
|
||||
|
||||
private static function hp()
|
||||
private static function hp(): float
|
||||
{
|
||||
return round((BotLogic::$st['hpNow'] / BotLogic::$st['hpAll'] * 100), 2);
|
||||
}
|
||||
|
||||
//Тест на возможность использования
|
||||
private static function testpriem($pl)
|
||||
private static function testpriem($pl): int
|
||||
{
|
||||
global $u;
|
||||
$notr = 0;
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,14 +7,14 @@ class Config
|
||||
private static self $instance;
|
||||
private function __construct()
|
||||
{
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
// error_reporting(E_ALL ^ E_NOTICE);
|
||||
|
||||
ini_set('display_errors', 'Off');
|
||||
ini_set('date.timezone', 'Europe/Moscow');
|
||||
// ini_set('display_errors', 'Off');
|
||||
// ini_set('date.timezone', 'Europe/Moscow');
|
||||
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
header('Pragma: no-cache');
|
||||
header('Expires: 0');
|
||||
// header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
// header('Pragma: no-cache');
|
||||
// header('Expires: 0');
|
||||
}
|
||||
|
||||
public static function get(?string $key = null)
|
||||
|
@ -2,10 +2,16 @@
|
||||
|
||||
class Dialog
|
||||
{
|
||||
private $info;
|
||||
public $dText = '', $aText = '', $youInfo = '', $botInfo = '', $title = '', $p = 1, $pg = 1;
|
||||
private array $info;
|
||||
public string $dText = '';
|
||||
public string $aText = '';
|
||||
public string $youInfo = '';
|
||||
public string $botInfo = '';
|
||||
public string $title = '';
|
||||
public int $p = 1;
|
||||
public int $pg = 1;
|
||||
|
||||
public function trnObj($x, $j)
|
||||
public function trnObj($x, $j): array
|
||||
{
|
||||
$i = floor($x / $j);
|
||||
return [0 => $i, 1 => $x - ($i * $j)];
|
||||
|
@ -11,7 +11,7 @@ class Filter
|
||||
}
|
||||
//
|
||||
//Смайлики
|
||||
private $sm = ["laugh" => 1, "fingal" => 1, "eek" => 1, "smoke" => 1, "hi" => 1, "bye" => 1, "king" => 1, "king2" => 1, "boks2" => 1, "boks" => 1, "gent" => 1, "lady" => 1, "tongue" => 1, "smil" => 1, "rotate" => 1, "ponder" => 1, "bow" => 1, "angel" => 1, "angel2" => 1, "hello" => 1, "dont" => 1, "idea" => 1, "mol" => 1, "super" => 1, "beer" => 1, "drink" => 1, "baby" => 1, "tongue2" => 1, "sword" => 1, "agree" => 1, "loveya" => 1, "kiss" => 1, "kiss2" => 1, "kiss3" => 1, "kiss4" => 1, "rose" => 1, "love" => 1, "love2" => 1, "confused" => 1, "yes" => 1, "no" => 1, "shuffle" => 1, "nono" => 1, "maniac" => 1, "privet" => 1, "ok" => 1, "ninja" => 1, "pif" => 1, "smash" => 1, "alien" => 1, "pirate" => 1, "gun" => 1, "trup" => 1, "mdr" => 1, "sneeze" => 1, "mad" => 1, "friday" => 1, "cry" => 1, "grust" => 1, "rupor" => 1, "fie" => 1, "nnn" => 1, "row" => 1, "red" => 1, "lick" => 1, "help" => 1, "wink" => 1, "jeer" => 1, "tease" => 1, "nunu" => 1, "inv" => 1, "duel" => 1, "susel" => 1, "nun" => 1, "kruger" => 1, "flowers" => 1, "horse" => 1, "hug" => 1, "str" => 1, "alch" => 1, "pal" => 1, "mag" => 1, "sniper" => 1, "vamp" => 1, "doc" => 1, "doc2" => 1, "sharp" => 1, "naem" => 1, "naem2" => 1, "naem3" => 1, "invis" => 1, "chtoza" => 1, "beggar" => 1, "sorry" => 1, "sorry2" => 1, "creator" => 1, "grace" => 1, "dustman" => 1, "carreat" => 1, "lordhaos" => 1, "ura" => 1, "elix" => 1, "dedmoroz" => 1, "snegur" => 1, "showng" => 1, "superng" => 1, "podz" => 1, "sten" => 1, "devil" => 1, "cat" => 1, "owl" => 1, "lightfly" => 1, "snowfight" => 1, "rocket" => 1, "ball" => 1, "smile" => 1, "fuck" => 1];
|
||||
private array $sm = ["laugh" => 1, "fingal" => 1, "eek" => 1, "smoke" => 1, "hi" => 1, "bye" => 1, "king" => 1, "king2" => 1, "boks2" => 1, "boks" => 1, "gent" => 1, "lady" => 1, "tongue" => 1, "smil" => 1, "rotate" => 1, "ponder" => 1, "bow" => 1, "angel" => 1, "angel2" => 1, "hello" => 1, "dont" => 1, "idea" => 1, "mol" => 1, "super" => 1, "beer" => 1, "drink" => 1, "baby" => 1, "tongue2" => 1, "sword" => 1, "agree" => 1, "loveya" => 1, "kiss" => 1, "kiss2" => 1, "kiss3" => 1, "kiss4" => 1, "rose" => 1, "love" => 1, "love2" => 1, "confused" => 1, "yes" => 1, "no" => 1, "shuffle" => 1, "nono" => 1, "maniac" => 1, "privet" => 1, "ok" => 1, "ninja" => 1, "pif" => 1, "smash" => 1, "alien" => 1, "pirate" => 1, "gun" => 1, "trup" => 1, "mdr" => 1, "sneeze" => 1, "mad" => 1, "friday" => 1, "cry" => 1, "grust" => 1, "rupor" => 1, "fie" => 1, "nnn" => 1, "row" => 1, "red" => 1, "lick" => 1, "help" => 1, "wink" => 1, "jeer" => 1, "tease" => 1, "nunu" => 1, "inv" => 1, "duel" => 1, "susel" => 1, "nun" => 1, "kruger" => 1, "flowers" => 1, "horse" => 1, "hug" => 1, "str" => 1, "alch" => 1, "pal" => 1, "mag" => 1, "sniper" => 1, "vamp" => 1, "doc" => 1, "doc2" => 1, "sharp" => 1, "naem" => 1, "naem2" => 1, "naem3" => 1, "invis" => 1, "chtoza" => 1, "beggar" => 1, "sorry" => 1, "sorry2" => 1, "creator" => 1, "grace" => 1, "dustman" => 1, "carreat" => 1, "lordhaos" => 1, "ura" => 1, "elix" => 1, "dedmoroz" => 1, "snegur" => 1, "showng" => 1, "superng" => 1, "podz" => 1, "sten" => 1, "devil" => 1, "cat" => 1, "owl" => 1, "lightfly" => 1, "snowfight" => 1, "rocket" => 1, "ball" => 1, "smile" => 1, "fuck" => 1];
|
||||
|
||||
public function e($t)
|
||||
{
|
||||
@ -48,7 +48,7 @@ class Filter
|
||||
}
|
||||
}
|
||||
|
||||
public function mystr($string)
|
||||
public function mystr($string): string
|
||||
{
|
||||
$str = strtolower($string);
|
||||
if (strtolower('S') != 's') {
|
||||
@ -90,57 +90,22 @@ class Filter
|
||||
/* фильтр */
|
||||
$spam = mysql_fetch_array(mysql_query('SELECT * FROM `spam_word` WHERE `id` = 1 LIMIT 1'));
|
||||
$spam = $spam['data'];
|
||||
//
|
||||
$testEN = preg_replace('/[^A-z]*/i', '', $txt);
|
||||
$testEN2 = $txt;
|
||||
|
||||
$testEN2 = str_replace('"', '', $testEN2);
|
||||
$testEN2 = str_replace(' ', '', $testEN2);
|
||||
$testEN2 = str_replace('а', 'a', $testEN2);
|
||||
$testEN2 = str_replace('б', 'b', $testEN2);
|
||||
$testEN2 = str_replace('с', 'c', $testEN2);
|
||||
$testEN2 = str_replace('в', 'b', $testEN2);
|
||||
$testEN2 = str_replace('е', 'e', $testEN2);
|
||||
$testEN2 = str_replace('т', 't', $testEN2);
|
||||
$testEN2 = str_replace('о', 'o', $testEN2);
|
||||
$testEN2 = str_replace('р', 'p', $testEN2);
|
||||
$testEN2 = str_replace('м', 'm', $testEN2);
|
||||
$testEN2 = str_replace('н', 'h', $testEN2);
|
||||
$testEN2 = str_replace('у', 'y', $testEN2);
|
||||
$testEN2 = str_replace('к', 'k', $testEN2);
|
||||
$testEN2 = str_replace('и', 'u', $testEN2);
|
||||
$testEN2 = str_replace('х', 'x', $testEN2);
|
||||
$testEN2 = str_replace('я', '9', $testEN2);
|
||||
$testEN2 = str_replace('()', 'o', $testEN2);
|
||||
$testEN2 = str_replace('0', 'o', $testEN2);
|
||||
$testEN2 = preg_replace('/[^A-z]*/i', '', $testEN2);
|
||||
$testEN = preg_replace('/[^A-z]*/i', '', $txt);
|
||||
$testRU = preg_replace('/[^А-я]*/i', '', $txt);
|
||||
|
||||
$testRU2 = $txt;
|
||||
$testRU2 = str_replace('a', 'а', $testRU2);
|
||||
$testRU2 = str_replace('b', 'б', $testRU2);
|
||||
$testRU2 = str_replace('c', 'с', $testRU2);
|
||||
$testRU2 = str_replace('b', 'в', $testRU2);
|
||||
$testRU2 = str_replace('e', 'е', $testRU2);
|
||||
$testRU2 = str_replace('t', 'т', $testRU2);
|
||||
$testRU2 = str_replace('o', 'о', $testRU2);
|
||||
$testRU2 = str_replace('p', 'р', $testRU2);
|
||||
$testRU2 = str_replace('m', 'м', $testRU2);
|
||||
$testRU2 = str_replace('h', 'н', $testRU2);
|
||||
$testRU2 = str_replace('y', 'у', $testRU2);
|
||||
$testRU2 = str_replace('k', 'к', $testRU2);
|
||||
$testRU2 = str_replace('x', 'х', $testRU2);
|
||||
$testRU2 = str_replace('u', 'и', $testRU2);
|
||||
$testRU2 = str_replace('()', 'о', $testRU2);
|
||||
$testRU2 = str_replace('0', 'о', $testRU2);
|
||||
$testRU2 = preg_replace('/[^А-я]*/i', ' ', $testRU2);
|
||||
$testRU2 = preg_replace('/[^А-Я]*/i', ' ', $testRU2);
|
||||
$i = 0;
|
||||
$spe = explode('|', $spam);
|
||||
while ($i <= count($spe)) {
|
||||
if (isset($spe[$i]) && $spe[$i] != '' && $spe[$i] != 'new-combats.com' && (stristr(
|
||||
$testEN, $spe[$i]
|
||||
) || stristr($testRU, $spe[$i]))) {
|
||||
if (
|
||||
isset($spe[$i]) &&
|
||||
$spe[$i] != '' &&
|
||||
$spe[$i] != 'new-combats.tech' &&
|
||||
(
|
||||
stristr($testEN, $spe[$i]) ||
|
||||
stristr($testRU, $spe[$i])
|
||||
)
|
||||
) {
|
||||
$nospam .= '%' . $spe[$i];
|
||||
}
|
||||
$i++;
|
||||
|
@ -9,15 +9,15 @@
|
||||
|
||||
class Uploader
|
||||
{
|
||||
private $width = ['min' => 0, 'max' => 0];
|
||||
private $height = ['min' => 0, 'max' => 0];
|
||||
private $maxFileSizeMb;
|
||||
private $savePath;
|
||||
private $extensions = 'jpg|png|jpeg|gif';
|
||||
private $extMatches = [];
|
||||
private $FILE;
|
||||
private array $width = ['min' => 0, 'max' => 0];
|
||||
private array $height = ['min' => 0, 'max' => 0];
|
||||
private int $maxFileSizeMb;
|
||||
private string $savePath;
|
||||
private string $extensions = 'jpg|png|jpeg|gif';
|
||||
private array $extMatches = [];
|
||||
private array $FILE;
|
||||
private $cnm;
|
||||
public static $error;
|
||||
public static string $error;
|
||||
|
||||
public function __construct($name, $cnm = null)
|
||||
{
|
||||
@ -29,22 +29,22 @@ class Uploader
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $max
|
||||
* @param int $min
|
||||
* @param int $max
|
||||
* @param int|null $min
|
||||
* @return void
|
||||
*/
|
||||
public function setWidth($max, $min = null)
|
||||
public function setWidth(int $max, ?int $min = null)
|
||||
{
|
||||
$this->width['min'] = is_null($min) ? $max : $min;
|
||||
$this->width['max'] = $max;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $max
|
||||
* @param int $min
|
||||
* @param int $max
|
||||
* @param int|null $min
|
||||
* @return void
|
||||
*/
|
||||
public function setHeight($max, $min = null)
|
||||
public function setHeight(int $max, ?int $min = null)
|
||||
{
|
||||
$this->height['min'] = is_null($min) ? $max : $min;
|
||||
$this->height['max'] = $max;
|
||||
@ -63,7 +63,7 @@ class Uploader
|
||||
* @param string $path путь от корня до конечной папки без открывающего слеша.
|
||||
* @return void
|
||||
*/
|
||||
public function setSavePath($path)
|
||||
public function setSavePath(string $path)
|
||||
{
|
||||
$this->savePath = $_SERVER['DOCUMENT_ROOT'] . '/' . $path;
|
||||
}
|
||||
@ -90,15 +90,15 @@ class Uploader
|
||||
* @param int $height
|
||||
* @return void
|
||||
*/
|
||||
public function setDimensions($width, $height)
|
||||
public function setDimensions(int $width, int $height)
|
||||
{
|
||||
$this->setWidth($width);
|
||||
$this->setHeight($height);
|
||||
}
|
||||
|
||||
private function hasNormalDimensions()
|
||||
private function hasNormalDimensions(): bool
|
||||
{
|
||||
list($width, $height) = getimagesize($this->FILE['tmp_name']);
|
||||
[$width, $height] = getimagesize($this->FILE['tmp_name']);
|
||||
if (!$width || !$height) {
|
||||
self::$error = 'Не подтянулись размеры файла.';
|
||||
return false;
|
||||
@ -118,7 +118,7 @@ class Uploader
|
||||
return true;
|
||||
}
|
||||
|
||||
private function hasNormalFileSize()
|
||||
private function hasNormalFileSize(): bool
|
||||
{
|
||||
if (!$this->maxFileSizeMb) {
|
||||
$this->setMaxFileSize(2);
|
||||
@ -130,7 +130,7 @@ class Uploader
|
||||
return true;
|
||||
}
|
||||
|
||||
private function hasNormalType()
|
||||
private function hasNormalType(): bool
|
||||
{
|
||||
if (
|
||||
!preg_match('/\.(' . $this->extensions . ')$/i', $this->FILE['name'], $this->extMatches) ||
|
||||
@ -142,7 +142,7 @@ class Uploader
|
||||
return true;
|
||||
}
|
||||
|
||||
private function hasNormalFilePath()
|
||||
private function hasNormalFilePath(): bool
|
||||
{
|
||||
if (!$this->savePath || !is_dir($this->savePath)) {
|
||||
self::$error = 'Ошибка загрузки: нет такой папки.';
|
||||
@ -167,7 +167,7 @@ class Uploader
|
||||
return [$fn2, $fn, $this->savePath . $fn];
|
||||
}
|
||||
|
||||
function saveimg()
|
||||
public function saveimg()
|
||||
{
|
||||
return $this->hasNormalFilePath() &&
|
||||
$this->hasNormalDimensions() &&
|
||||
|
@ -4,7 +4,7 @@ if (!defined('GAME')) {
|
||||
}
|
||||
|
||||
$db = [
|
||||
's' => 'localhost', // server
|
||||
's' => 'db', // server
|
||||
'd' => 'game_production', // database
|
||||
'u' => 'prod1', // user
|
||||
'p' => 'Bz@fGaZjFU2206Ua' // password
|
||||
|
@ -1,10 +0,0 @@
|
||||
date.timezone=Europe/Moscow
|
||||
|
||||
allow_url_fopen = On
|
||||
session.auto_start=On
|
||||
allow_url_include = On
|
||||
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = Off
|
||||
error_log = /home/newcom1/error_log
|
1527
buttons.php
1527
buttons.php
File diff suppressed because it is too large
Load Diff
@ -1,394 +0,0 @@
|
||||
<?php
|
||||
session_start();
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if( !isset( $_GET['otdel'] ) || ( $_GET['otdel']<1 && $_GET['otdel']>6 ) ) {
|
||||
$_GET['otdel'] = 1; // Если раздел не указан.
|
||||
$_GET['paged'] = $_SESSION['paged'] = 0;
|
||||
}
|
||||
|
||||
if( isset($_GET['otdel']) ) {
|
||||
if( !isset($_GET['paged']) && (isset($_GET['use_pid']) || isset($_GET['sid']) || isset($_GET['oid']) || isset($_GET['usecopr']) || isset($_GET['delcop'])) ) {
|
||||
$_GET['paged'] = $_SESSION['paged']; // use item and load old paging
|
||||
} elseif(isset($_GET['paged']) && $_GET['paged']!='') {
|
||||
$_SESSION['paged'] = $_GET['paged']; // Задаем новую страницу.
|
||||
} elseif(isset($_SESSION['paged']) && $_SESSION['paged']!='' && $_SESSION['otdel']==$_GET['otdel']) {
|
||||
$_GET['paged'] = $_SESSION['paged']; // Если страница уже имеется в сессии, возвращаем её в текущую.
|
||||
} else {
|
||||
$_GET['paged'] = $_SESSION['paged'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['otdel'] = $_GET['otdel']; // для отладки.
|
||||
|
||||
if( isset($_GET['delcop']) ) {
|
||||
mysql_query('DELETE FROM `complects_priem` WHERE `id` = "'.mysql_real_escape_string($_GET['delcop']).'" AND `uid` = "'.$u->info['id'].'" LIMIT 1');
|
||||
} elseif( isset($_GET['usecopr']) ) {
|
||||
$cpr = mysql_fetch_array(mysql_query('SELECT * FROM `complects_priem` WHERE `id` = "'.mysql_real_escape_string($_GET['usecopr']).'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
|
||||
if( isset($cpr['id']) ) {
|
||||
$u->info['priems'] = $cpr['priems'];
|
||||
mysql_query('UPDATE `stats` SET `priems` = "'.mysql_real_escape_string($cpr['priems']).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
|
||||
//сохраняем комплект
|
||||
if( isset($_POST['compname']) ) {
|
||||
$_POST['compname'] = htmlspecialchars($_POST['compname'],NULL);
|
||||
$_POST['compname'] = str_replace("'",'',$_POST['compname']);
|
||||
$_POST['compname'] = str_replace('"','',$_POST['compname']);
|
||||
$ptst = str_replace(' ','',$_POST['compname']);
|
||||
if( $ptst!='' ) {
|
||||
//Добавляем комплект
|
||||
$ptst = '';
|
||||
$sp = mysql_query('SELECT `inOdet`,`id` FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` > 0 AND `inShop` = "0" ORDER BY `inOdet` ASC LIMIT 250');
|
||||
while ( $pl = mysql_fetch_array($sp) ) {
|
||||
$ptst .= $pl['inOdet'].'='.$pl['id'].'|';
|
||||
}
|
||||
$tcm = mysql_fetch_array(mysql_query('SELECT * FROM `save_com` WHERE `uid` = "'.$u->info['id'].'" AND `name` = "'.mysql_real_escape_string($_POST['compname']).'" AND `delete` = "0" LIMIT 1'));
|
||||
if( !isset($tcm['id']) ) {
|
||||
//добавляем новый комплект
|
||||
$ins = mysql_query('INSERT INTO `save_com` (`uid`,`time`,`name`,`val`,`type`) VALUES ("'.$u->info['id'].'","'.time().'","'.mysql_real_escape_string($_POST['compname']).'","'.$ptst.'","0")');
|
||||
if($ins) {
|
||||
$u->error = 'Комплект "'.$_POST['compname'].'" был успешно сохранен';
|
||||
} else {
|
||||
$u->error = 'Не удалось сохранить комплект по техническим причинам';
|
||||
}
|
||||
}else{
|
||||
//изменяем существующий
|
||||
$ins = mysql_query('UPDATE `save_com` SET `val` = "'.$ptst.'" WHERE `id` = "'.$tcm['id'].'" LIMIT 1');
|
||||
if($ins)
|
||||
{
|
||||
$u->error = 'Комплект "'.$_POST['compname'].'" был успешно изменен';
|
||||
}else{
|
||||
$u->error = 'Не удалось изменить комплект по техническим причинам';
|
||||
}
|
||||
}
|
||||
unset($ptst,$tcm,$inc);
|
||||
}
|
||||
}elseif(isset($_GET['delc1'])) {
|
||||
$cmpl = mysql_query('UPDATE `save_com` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id` = "'.mysql_real_escape_string($_GET['delc1']).'" LIMIT 1');
|
||||
if($cmpl)
|
||||
{
|
||||
$u->error = 'Комплект был успешно удален';
|
||||
}
|
||||
}
|
||||
$filt='`iu`.`lastUPD` DESC';
|
||||
if(isset($_GET['boxsort'])){
|
||||
switch($_GET['boxsort']){
|
||||
case'name':
|
||||
$filt='`im`.`name` ASC';
|
||||
break;
|
||||
case'cost':
|
||||
$filt='`im`.`price2` DESC, `im`.`price1` DESC';
|
||||
break;
|
||||
case'type':
|
||||
$filt='`im`.`inslot`';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$pc = 200;
|
||||
$pg = round((int)@$_GET['paged']);
|
||||
$pxc = $pg*$pc;
|
||||
$nlim = '';
|
||||
$pgs = mysql_fetch_array(mysql_query('SELECT COUNT(`iu`.`id`) FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON `im`.`id` = `iu`.`item_id` WHERE `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inRazdel`="'.mysql_real_escape_string($_GET['otdel']).'" ORDER BY '.$filt.' LIMIT 1'));
|
||||
$pgs = $pgs[0];
|
||||
$page_look = '';
|
||||
$inventorySortBox = '<div id="inventorySortBox">
|
||||
Сортировка: <br/>
|
||||
<input type="button" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&boxsort=name&otdel=' . intval($_GET['otdel']) . '\');" value="названию" />
|
||||
<input type="button" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&boxsort=cost&otdel=' . intval($_GET['otdel']) . '\');" value="цене" />
|
||||
<input type="button" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&boxsort=type&otdel=' . intval($_GET['otdel']) . '\');" value="типу" />
|
||||
</div>';
|
||||
|
||||
if(isset($_SESSION['paged']))$page_look = '<!-- PAGED SEE '.round((int)@$_SESSION['paged']).'-->'; else $page_look = '<!-- PAGED '.$_SESSION['paged'].' -->';
|
||||
if($pgs > $pc) {
|
||||
$nlim = ' LIMIT '.$pxc.' , '.$pc.'';
|
||||
$page_look .= '<div style="padding:0px;">';
|
||||
$page_look .= 'Страницы: ';
|
||||
$i = 1;
|
||||
echo '<style>.pgdas { display:inline-block;background-color:#dadada; padding:2px 4px 1px 4px; font-size:12px;} .pgdas1 { display:inline-block;background-color:#a5a5a5; padding:2px 4px 1px 4px; font-size:12px;}
|
||||
.pgdas { background: #dadada;background: -moz-linear-gradient(top, #dadada 50%, #a5a5a5 99%);background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,#dadada), color-stop(99%,#a5a5a5));background: -webkit-linear-gradient(top, #dadada 50%,#a5a5a5 99%);background: -o-linear-gradient(top, #dadada 50%,#a5a5a5 99%);background: -ms-linear-gradient(top, #dadada 50%,#a5a5a5 99%);background: linear-gradient(to bottom, #dadada 50%,#a5a5a5 99%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#dadada\', endColorstr=\'#a5a5a5\',GradientType=0 );
|
||||
}
|
||||
.pgdas1 { background: #a5a5a5; }
|
||||
</style>';
|
||||
while($i <= ceil($pgs/$pc)) {
|
||||
if($i-1 == $pg) {
|
||||
$sep = 1;
|
||||
}else{
|
||||
$sep = '';
|
||||
}
|
||||
$page_look .= '<a class="pgdas'.$sep.'" href="javascript:void(0);" onclick="inventoryAjax(\'main.php?paged='.($i-1).'&inv&mAjax=true&otdel='.round($_GET['otdel']).'\');">'.$i.'</a> ';
|
||||
$i++;
|
||||
}
|
||||
$page_look .= '</div>';
|
||||
}
|
||||
$filt='`lastUPD` DESC';
|
||||
if(isset($_GET['boxsort'])){
|
||||
switch($_GET['boxsort']){
|
||||
case'name':
|
||||
$filt='`name` ASC';
|
||||
break;
|
||||
case'cost':
|
||||
$filt='`price2` DESC, `price1` DESC';
|
||||
break;
|
||||
case'type':
|
||||
$filt='`inslot`';
|
||||
break;
|
||||
}
|
||||
}
|
||||
$itmAll = $itmAllSee = '';
|
||||
if( isset($_GET['boxsort']) && $_GET['otdel']==5 ) {
|
||||
if($_POST['subfilter']) {
|
||||
$itmAll = $u->genInv(1,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `name` LIKE "%'.addcslashes(mysql_real_escape_string($_POST['filter']), '%_').'%" ORDER by `name` ASC');
|
||||
}
|
||||
} else {
|
||||
$itmAll = $u->genInv(1,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inRazdel`="'.mysql_real_escape_string($_GET['otdel']).'" ORDER BY '.$filt.''.$nlim);
|
||||
}
|
||||
|
||||
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ПУСТО</td></tr>';
|
||||
if($itmAll[0] > 0)
|
||||
$itmAllSee = $itmAll[2];
|
||||
|
||||
$showItems = '<table width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top"><table style="border-left: 1px solid #A5A5A5; border-right: 1px solid #A5A5A5;" width="100%" cellspacing="0" cellpadding="5" bgcolor="#c8c8c8">
|
||||
<tr>
|
||||
<td width="20%" ' . (($_GET['otdel'] != 1) ? 'style="border-bottom: 1px solid #A5A5A5;"' : 'style="border-right: 1px solid #A5A5A5;"') .' align=center bgcolor="' . (($_GET['otdel'] == 1) ? '#dadada' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=1&rn=1.1\');">Обмундирование</a></td>
|
||||
<td width="20%" ' . (($_GET['otdel'] != 2) ? 'style="border-bottom: 1px solid #A5A5A5;"' : 'style="border-left: 1px solid #A5A5A5; border-right: 1px solid #A5A5A5;"') .' align=center bgcolor="' . (($_GET['otdel'] == 2) ? '#dadada' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=2&rn=2.1\');">Заклятия</a></td>
|
||||
<td width="20%" ' . (($_GET['otdel'] != 3) ? 'style="border-bottom: 1px solid #A5A5A5;"' : 'style="border-left: 1px solid #A5A5A5; border-right: 1px solid #A5A5A5;"') .' align=center bgcolor="' . (($_GET['otdel'] == 3) ? '#dadada' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=3&rn=3.1\');">Эликсиры</a></td>
|
||||
<td width="20%" ' . (($_GET['otdel'] != 6) ? 'style="border-bottom: 1px solid #A5A5A5;"' : 'style="border-left: 1px solid #A5A5A5; border-right: 1px solid #A5A5A5;"') .' align=center bgcolor="' . (($_GET['otdel'] == 6) ? '#dadada' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=6&rn=6.1\');">Руны</a></td>
|
||||
<td width="20%" ' . (($_GET['otdel'] != 4) ? 'style="border-bottom: 1px solid #A5A5A5;"' : 'style="border-left: 1px solid #A5A5A5;" ') .' align=center bgcolor="' . (($_GET['otdel'] == 4) ? '#dadada' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=4&rn=4.1\');">Прочее</a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" ><table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-top:0px; border-left: 1px solid #A5A5A5; border-right: 1px solid #A5A5A5;" bgcolor="#dadada">
|
||||
<tr>
|
||||
<td align="left" valign="middle" style="color:#2b2c2c; height: 18px;font-size:12px; padding-left:4px;"><b>масса:' . (0+$u->aves['now']) . ' / ' . $u->aves['max'] . ' <!--, предметов: ' . $u->aves['items'] . '--></b></td>
|
||||
<td align="center" valign="middle" style="color:#2b2c2c; font-size:12px">' . $page_look . '</td>
|
||||
<td align="right" valign="middle" style="color:#2b2c2c; font-size:12px; position:relative;">
|
||||
<form id="line_filter" style="display:inline;" onsubmit="return false;" prc_adsf="true">
|
||||
Поиск по имени: <div style="display:inline-block; position:relative; ">
|
||||
<input type="text" id="inpFilterName" placeholder="Введите название предмета..." autofocus="autofocus" size="44" autocomplete="off">
|
||||
<img style="position:absolute; cursor:pointer; right: 2px; top: 3px; width: 12px; height: 12px;" onclick="document.getElementById(\'inpFilterName\').value=\'\';" title="Убрать фильтр (клавиша Esc)" src="//img.new-combats.tech/i/clear.gif">
|
||||
<input type="submit" style="display: none" id="inpFilterName_submit" value="Фильтр" onclick="return false">
|
||||
<div class="autocomplete-suggestions" style="position: absolute; display: none;top: 15px; left:0px; margin:0px auto; right: 0px; font-size:12px; font-family: Tahoma; max-height: 300px; z-index: 9999;"></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<input type="button" onclick="inventorySort(this);" style="margin:0px 2px;" value="Сортировка" />
|
||||
'.$inventorySortBox.'
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="center">
|
||||
<div style="height:350px; border-bottom: 1px solid #A5A5A5;border-top: 1px solid #A5A5A5; overflow-y:scroll; overflow-x: hidden;" id="itmAllSee"><table width="100%" border="0" cellspacing="1" align="center" cellpadding="0" bgcolor="#A5A5A5">' . (( $u->info['invBlock'] == 0 ) ? $itmAllSee : '<div align="center" style="padding:10px;background-color:#A5A5A5;"><form method="post" action="main.php?inv=1&otdel='.$_GET['otdel'].'&relockinvent"><b>Рюкзак закрыт.</b><br><img title="Замок для рюкзака" src="//img.new-combats.tech/i/items/box_lock.gif"> Введите пароль: <input id="relockInv" name="relockInv" type="password"><input type="submit" value="Открыть"></form></div>' ) . '</table></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<script language="JavaScript">
|
||||
if($.cookie(\'invFilterByName\')) $("#ShowInventory").hide();
|
||||
$(document).ready(function (){ $("#ShowInventory").show(); });
|
||||
</script>
|
||||
';
|
||||
if(isset($_GET['mAjax'])){
|
||||
exit($showItems);
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript" src="js/jquery.1.11.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.cookie.1.4.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.autocomplete.js"></script>
|
||||
<script>
|
||||
$.cookie('invFilterByName','');
|
||||
$(document).ready(function () {
|
||||
var inv_names = [];
|
||||
$('a.inv_name').each(function(){ if($.inArray($(this).text(), inv_names)<0) inv_names.push($(this).text()); });
|
||||
$('#inpFilterName').autocomplete({
|
||||
lookup:inv_names,
|
||||
onSelect: invFilterByName
|
||||
});
|
||||
|
||||
$('#inpFilterName').focus();
|
||||
$(document).keyup(function (e) {if (e.which == 13)invFilterByName(); if (e.which == 27) { $('#textSearch').click(); } });
|
||||
$('#line_filter').submit(function (){
|
||||
$('#inpFilterName_submit').trigger('click');
|
||||
});
|
||||
function invFilterByName(){
|
||||
$.cookie('invFilterByName', '');
|
||||
var val = $('#inpFilterName').val();
|
||||
if (val == '') $("a.inv_name").parent().parent().stop().show();
|
||||
else {
|
||||
$.cookie('invFilterByName', val);
|
||||
$("a.inv_name:not(:contains('" + val + "'))").parents('.item').stop().css('background-color', '').hide();
|
||||
$("a.inv_name:contains('" + val + "')").parents('.item').stop().show();
|
||||
}
|
||||
}
|
||||
|
||||
invFilterByNameTimer=null;
|
||||
$('#line_filter').click(function ()
|
||||
{
|
||||
window.clearInterval(invFilterByNameTimer);
|
||||
if($('#inpFilterName').val()=='')invFilterByName();
|
||||
else invFilterByNameTimer=setTimeout(invFilterByName, 200);
|
||||
|
||||
return false;
|
||||
});
|
||||
$('#inpFilterName').keyup(function (e){
|
||||
$('#inpFilterName_submit').trigger('click');
|
||||
});
|
||||
if ($.cookie('invFilterByName')) {
|
||||
$('#inpFilterName').val($.cookie('invFilterByName'));
|
||||
invFilterByName();
|
||||
}
|
||||
if ($.cookie('invFilterByName')) {
|
||||
$('#inpFilterName').val($.cookie('invFilterByName'));
|
||||
invFilterByName();
|
||||
}
|
||||
});
|
||||
|
||||
jQuery.expr[":"].contains = function (elem, i, match, array)
|
||||
{
|
||||
return (elem.textContent || elem.innerText || jQuery.text(elem) || "").toLowerCase().indexOf(match[3].toLowerCase()) >= 0;
|
||||
}
|
||||
|
||||
function inventorySort(e){
|
||||
if ( $('#inventorySortBox').css('display') =='none') {
|
||||
$('#inventorySortBox').show();
|
||||
$(e).addClass('focus');
|
||||
} else {
|
||||
$('#inventorySortBox').hide();
|
||||
$(e).removeClass('focus');
|
||||
}
|
||||
}
|
||||
function inventoryHeight() {
|
||||
var height = $('#itmAll').height();
|
||||
var heW = $(window).height();
|
||||
heW = heW-148; // 1060
|
||||
height = height-120; // 462
|
||||
var heMax = $("#itmAllSee").children('table').height();
|
||||
if (heMax > height) {
|
||||
if (heW > height) {
|
||||
$("#itmAllSee").height(heW);
|
||||
} else {
|
||||
$("#itmAllSee").height(height);
|
||||
}
|
||||
} else {
|
||||
$("#itmAllSee").height(heMax);
|
||||
}
|
||||
}
|
||||
$(window).ready(function(){
|
||||
inventoryHeight();
|
||||
});
|
||||
$(window).resize(function(){
|
||||
inventoryHeight();
|
||||
});
|
||||
|
||||
function inventoryAjax(url){
|
||||
$('#ShowInventory').html('<div align="center" style="padding:10px;background-color:#A5A5A5;"><b>Загрузка...</b></div>');
|
||||
$.ajax({
|
||||
url: url,
|
||||
cache: false,
|
||||
dataType: 'html',
|
||||
success: function (html) {
|
||||
$('#ShowInventory').html(html);
|
||||
inventoryHeight();
|
||||
}
|
||||
});
|
||||
}
|
||||
function seetext(id) {
|
||||
var id = document.getElementById('close_text_itm'+id);
|
||||
if(id.style.display == 'none') {
|
||||
id.style.display = '';
|
||||
}else{
|
||||
id.style.display = 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div style="z-index: 2; position: relative; width:100%; display:table; box-sizing: border-box; margin: 0px; padding: 0px 5px 3px 5px; -webkit-box-shadow: 0px 4px 6px -3px rgba(0, 0, 0, 0.6); -moz-box-shadow: 0px 4px 6px -3px rgba(0, 0, 0, 0.6); box-shadow: 0px 4px 6px -4px rgba(0, 0, 0, 0.6);">
|
||||
<div style="display:table-cell;"><!-- Кнопки возврата и другие--></div>
|
||||
<div style="display:table-cell; text-align: right;">
|
||||
<?php
|
||||
if($u->info['animal'] != 0) {
|
||||
echo '<input class="btnnew" type="button" onclick="top.frames[\'main\'].location=\'main.php?pet=1&rnd='.$code.'\'" value="Зверь" />';
|
||||
}
|
||||
?><input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?skills&side=1&rn=<?= $code; ?>'" value="Умения" /><?php
|
||||
if ($u->info['inTurnir'] == 0) { ?><input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?obraz&rnd=<?= $code; ?>'" value="Образ" /><?php }
|
||||
$gl = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `reimage` WHERE ((`uid` = "'.$u->info['id'].'" AND `clan` = "0") OR `clan` = "'.$u->info['clan'].'") AND `good` > 0 AND `bad` = "0" LIMIT 1'));
|
||||
if($gl[0] > 0) { ?><input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?galery&rnd=<?= $code; ?>'" value="Галерея" /><?php } unset($gl);
|
||||
if ($u->info['inTurnir'] == 0) { ?><input class="btnnew2" type="button" onclick="location.href='main.php?referals'" value="Наставничество" /><?php }
|
||||
?><input class="btnnew" type="button" onclick="top.frames['main'].location='main.php'" value="Вернуться" />
|
||||
<!--
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?anketa&rn=<?= $code; ?>'" value="Анкета" />
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?act_trf=1&rn=<?= $code; ?>'" value="Отчет о переводах" />
|
||||
<input class="btnnew" type="button" style="font-weight:bold;" value="Безопасность" onclick="top.frames['main'].location='main.php?security&rn=<?= $code; ?>'" />
|
||||
<input class="btnnew" type="button" style="background-color:#A9AFC0" onClick="alert('Раздел отсутствует');" value="Подсказки" />
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="250" valign="top" align="right"><div style="padding-top: 6px;" align="center"><?php $usee = $u->getInfoPers($u->info['id'],0,0,1); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; }
|
||||
if($u->info['level']>1 && $u->info['inTurnir'] == 0) {
|
||||
$priem = new Priems();
|
||||
$priem->seeMy(1);
|
||||
}
|
||||
if( $u->info['inTurnir'] > 0 ) {
|
||||
echo '<center><a href="/main.php?inv&remitem&otdel='.round((int)$_GET['otdel']).'">Снять все</a></center>';
|
||||
}
|
||||
echo '<br>'.$u->info_remont();
|
||||
if( $u->info['inTurnir'] == 0 ) {
|
||||
/*$bns = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `aaa_bonus` WHERE `uid` = "'.$u->info['id'].'" AND `time` > '.time().' LIMIT 1'));
|
||||
if(isset($bns['id'])) {
|
||||
$bns2 = 'через '.$u->timeOut($bns['time']-time());
|
||||
$bns1 = '0';
|
||||
$bns3 = '';
|
||||
}else{
|
||||
$bns2 = '';
|
||||
$bns1 = '';
|
||||
$bns3 = ' onclick="location.href=\'main.php?inv=1&takebns='.$u->info['nextAct'].'\'"';
|
||||
}
|
||||
if(isset($_GET['takebns']) && $u->newAct($_GET['takebns'])==true && !isset($bns['id'])) {
|
||||
$u->takeBonus();
|
||||
$bns2 = '<div style="width:112px" align="center">через '.$u->timeOut( 2 * 3600 ).'</div>';
|
||||
$bns1 = '0';
|
||||
$bns3 = '';
|
||||
}
|
||||
?>
|
||||
<div align="center">
|
||||
<div class="on2gb"<?=$bns3?>>
|
||||
<div class="on1gb<?=$bns1?>">
|
||||
<small class="on1gbt<?=$bns1?>"><?=$bns2?></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?*/
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div align="left"><?= $c['counters']; ?></div>
|
||||
</td>
|
||||
<td width="242" valign="top" align="left"><?php if( $u->info['inTurnir'] == 0) { include('stats_inv.php'); } else { include('stats_inv2.php'); } ?></td>
|
||||
<td valign="top" id="itmAll">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" noresize="noresize">
|
||||
<?php if( $u->error != '' ) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="min-height:18px;padding:2px 4px; border: 1px solid #A5A5A5; border-top:0px;"><font color="#FF0000"><b><?= $u->error; ?></b></font></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td id="ShowInventory"><?= $showItems; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -1,269 +0,0 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(!isset($_GET['otdel']) || ($_GET['otdel']!=1 && $_GET['otdel']!=2 && $_GET['otdel']!=3 && $_GET['otdel']!=4 && $_GET['otdel']!=5 && $_GET['otdel']!=6))
|
||||
{
|
||||
$_GET['otdel'] = 1; // Если раздел не указан.
|
||||
$_GET['paged'] = $_SESSION['paged'] = 0;
|
||||
}
|
||||
|
||||
if(isset($_GET['otdel'])){
|
||||
if(!isset($_GET['paged']) && (isset($_GET['use_pid']) || isset($_GET['sid']) || isset($_GET['oid']) || isset($_GET['usecopr']) || isset($_GET['delcop']))){
|
||||
$_GET['paged'] = $_SESSION['paged']; // use item and load old paging
|
||||
}
|
||||
elseif(isset($_GET['paged']) && $_GET['paged']!='')
|
||||
{
|
||||
$_SESSION['paged'] = $_GET['paged']; // Задаем новую страницу.
|
||||
}
|
||||
elseif(isset($_SESSION['paged']) && $_SESSION['paged']!='' && $_SESSION['otdel']==$_GET['otdel'])
|
||||
{
|
||||
$_GET['paged'] = $_SESSION['paged']; // Если страница уже имеется в сессии, возвращаем её в текущую.
|
||||
}
|
||||
else
|
||||
{
|
||||
$_GET['paged'] = $_SESSION['paged'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['otdel'] = $_GET['otdel']; // для отладки.
|
||||
|
||||
if(isset($_GET['delcop'])) {
|
||||
mysql_query('DELETE FROM `complects_priem` WHERE `id` = "'.mysql_real_escape_string($_GET['delcop']).'" AND `uid` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}elseif(isset($_GET['usecopr'])) {
|
||||
$cpr = mysql_fetch_array(mysql_query('SELECT * FROM `complects_priem` WHERE `id` = "'.mysql_real_escape_string($_GET['usecopr']).'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
|
||||
if(isset($cpr['id'])) {
|
||||
$u->info['priems'] = $cpr['priems'];
|
||||
mysql_query('UPDATE `stats` SET `priems` = "'.mysql_real_escape_string($cpr['priems']).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
|
||||
//сохраняем комплект
|
||||
if(isset($_POST['compname']))
|
||||
{
|
||||
$_POST['compname'] = htmlspecialchars($_POST['compname']);
|
||||
$_POST['compname'] = str_replace("'",'',$_POST['compname']);
|
||||
$_POST['compname'] = str_replace('"','',$_POST['compname']);
|
||||
$ptst = str_replace(' ','',$_POST['compname']);
|
||||
if($ptst!='')
|
||||
{
|
||||
//Добавляем комплект
|
||||
$ptst = '';
|
||||
$sp = mysql_query('SELECT `inOdet`,`id` FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` > 0 AND `inShop` = "0" ORDER BY `inOdet` ASC LIMIT 250');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$ptst .= $pl['inOdet'].'='.$pl['id'].'|';
|
||||
}
|
||||
$tcm = mysql_fetch_array(mysql_query('SELECT * FROM `save_com` WHERE `uid` = "'.$u->info['id'].'" AND `name` = "'.mysql_real_escape_string($_POST['compname']).'" AND `delete` = "0" LIMIT 1'));
|
||||
if(!isset($tcm['id']))
|
||||
{
|
||||
//добавляем новый комплект
|
||||
$ins = mysql_query('INSERT INTO `save_com` (`uid`,`time`,`name`,`val`,`type`) VALUES ("'.$u->info['id'].'","'.time().'","'.mysql_real_escape_string($_POST['compname']).'","'.$ptst.'","0")');
|
||||
if($ins)
|
||||
{
|
||||
$u->error = 'Комплект "'.$_POST['compname'].'" был успешно сохранен';
|
||||
}else{
|
||||
$u->error = 'Не удалось сохранить комплект по техническим причинам';
|
||||
}
|
||||
}else{
|
||||
//изменяем существующий
|
||||
$ins = mysql_query('UPDATE `save_com` SET `val` = "'.$ptst.'" WHERE `id` = "'.$tcm['id'].'" LIMIT 1');
|
||||
if($ins)
|
||||
{
|
||||
$u->error = 'Комплект "'.$_POST['compname'].'" был успешно изменен';
|
||||
}else{
|
||||
$u->error = 'Не удалось изменить комплект по техническим причинам';
|
||||
}
|
||||
}
|
||||
unset($ptst,$tcm,$inc);
|
||||
}
|
||||
}elseif(isset($_GET['delc1']))
|
||||
{
|
||||
$cmpl = mysql_query('UPDATE `save_com` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id` = "'.mysql_real_escape_string($_GET['delc1']).'" LIMIT 1');
|
||||
if($cmpl)
|
||||
{
|
||||
$u->error = 'Комплект был успешно удален';
|
||||
}
|
||||
}
|
||||
$filt='`iu`.`lastUPD` DESC';
|
||||
if(isset($_GET['boxsort'])){
|
||||
switch($_GET['boxsort']){
|
||||
case'name':
|
||||
$filt='`im`.`name` ASC';
|
||||
break;
|
||||
case'cost':
|
||||
$filt='`im`.`price2` DESC, `im`.`price1` DESC';
|
||||
break;
|
||||
case'type':
|
||||
$filt='`im`.`inslot`';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$pc = 20;
|
||||
$pg = round((int)@$_GET['paged']);
|
||||
$pxc = $pg*$pc;
|
||||
$nlim = '';
|
||||
$pgs = mysql_fetch_array(mysql_query('SELECT COUNT(`iu`.`id`) FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON `im`.`id` = `iu`.`item_id` WHERE `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inRazdel`="'.mysql_real_escape_string($_GET['otdel']).'" ORDER BY '.$filt.' LIMIT 1'));
|
||||
$pgs = $pgs[0];
|
||||
$page_look = '';
|
||||
|
||||
|
||||
|
||||
if(isset($_SESSION['paged']))$page_look = '<!-- PAGED SEE '.round((int)@$_SESSION['paged']).'-->'; else $page_look = '<!-- PAGED '.$_SESSION['paged'].' -->';
|
||||
if($pgs > $pc) {
|
||||
$nlim = ' LIMIT '.$pxc.' , '.$pc.'';
|
||||
$page_look .= '<table border=0 cellpadding=0 cellspacing=0 width=100% bgcolor="#A5A5A5"><tr><td width=99% align=center>';
|
||||
$page_look .= '<div style="padding:10px;">';
|
||||
$page_look .= 'Страницы: ';
|
||||
$i = 1;
|
||||
echo '<style>.pgdas { display:inline-block;background-color:#AEAEAE; padding:3px 7px 3px 7px; } .pgdas1 { display:inline-block;background-color:#EAEAEA; padding:3px 7px 3px 7px; }</style>';
|
||||
while($i <= ceil($pgs/$pc)) {
|
||||
if($i-1 == $pg) {
|
||||
$sep = 1;
|
||||
}else{
|
||||
$sep = '';
|
||||
}
|
||||
$page_look .= '<a class="pgdas'.$sep.'" href="javascript:void(0);" onclick="inventoryAjax(\'main.php?paged='.($i-1).'&inv&mAjax=true&otdel='.round($_GET['otdel']).'\');">'.$i.'</a> ';
|
||||
$i++;
|
||||
}
|
||||
$page_look .= '</div>';
|
||||
$page_look .= '<td nowrap> </td></tr></table>';
|
||||
}
|
||||
$itmAll = $itmAllSee = '';
|
||||
if(isset($_GET['boxsort']) && $_GET['otdel']==5) {
|
||||
if($_POST['subfilter']) {
|
||||
$itmAll = $u->genInv(1,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `name` LIKE "%'.addcslashes(mysql_real_escape_string($_POST['filter']), '%_').'%" ORDER by `name` ASC');
|
||||
}
|
||||
}else{
|
||||
$itmAll = $u->genInv(1,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inRazdel`="'.mysql_real_escape_string($_GET['otdel']).'" ORDER BY '.$filt.''.$nlim);
|
||||
}
|
||||
|
||||
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ПУСТО</td></tr>';
|
||||
if($itmAll[0] > 0)
|
||||
$itmAllSee = $itmAll[2];
|
||||
|
||||
$showItems = '<table width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top"><table width="100%" cellspacing="0" cellpadding="5" bgcolor="#c7c7c7">
|
||||
<tr>
|
||||
<td width="20%" align=center bgcolor="' . (($_GET['otdel'] == 1) ? '#A5A5A5' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=1&rn=1.1\');">Обмундирование</a></td>
|
||||
<td width="20%" align=center bgcolor="' . (($_GET['otdel'] == 2) ? '#A5A5A5' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=2&rn=2.1\');">Заклятия</a></td>
|
||||
<td width="20%" align=center bgcolor="' . (($_GET['otdel'] == 3) ? '#A5A5A5' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=3&rn=3.1\');">Эликсиры</a></td>
|
||||
<td width="20%" align=center bgcolor="' . (($_GET['otdel'] == 6) ? '#A5A5A5' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=6&rn=6.1\');">Руны</a></td>
|
||||
<td width="20%" align=center bgcolor="' . (($_GET['otdel'] == 4) ? '#A5A5A5' : '' ) .'"><a href="javascript:void(0);" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&otdel=4&rn=4.1\');">Прочее</a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#A5A5A5">
|
||||
<tr>
|
||||
<td width="99%" align="center"><b>Рюкзак (масса:' . (0+$u->aves['now']) . ' / ' . $u->aves['max'] . ', предметов: ' . $u->aves['items'] . ')</b>
|
||||
</tr>
|
||||
</table>' . $page_look . '</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="center"><table width="100%" border="0" cellspacing="1" align="center" cellpadding="0" bgcolor="#A5A5A5">' . (( $u->info['invBlock'] == 0 ) ? $itmAllSee : '<div align="center" style="padding:10px;background-color:#A5A5A5;"><form method="post" action="main.php?inv=1&otdel='.$_GET['otdel'].'&relockinvent"><b>Рюкзак закрыт.</b><br><img title="Замок для рюкзака" src="//img.new-combats.tech/i/items/box_lock.gif"> Введите пароль: <input id="relockInv" name="relockInv" type="password"><input type="submit" value="Открыть"></form></div>' ) . '</table>
|
||||
<table width="100%" bgcolor="#A5A5A5">
|
||||
<tr>
|
||||
<td align="left"> Выровнять по
|
||||
<input type="button" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&boxsort=name&otdel=' . intval($_GET['otdel']) . '\');" value="названию" />
|
||||
<input type="button" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&boxsort=cost&otdel=' . intval($_GET['otdel']) . '\');" value="цене" />
|
||||
<input type="button" onclick="inventoryAjax(\'main.php?inv=1&mAjax=true&boxsort=type&otdel=' . intval($_GET['otdel']) . '\');" value="типу" /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>';
|
||||
if(isset($_GET['mAjax'])){
|
||||
exit($showItems);
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script>
|
||||
function inventoryAjax(url){
|
||||
$('#ShowInventory').html('<div align="center" style="padding:10px;background-color:#A5A5A5;"><b>Загрузка...</b></div>');
|
||||
$.ajax({
|
||||
url: url,
|
||||
cache: false,
|
||||
dataType: 'html',
|
||||
success: function (html) {
|
||||
$('#ShowInventory').html(html);
|
||||
}
|
||||
});
|
||||
}
|
||||
function seetext(id) {
|
||||
var id = document.getElementById('close_text_itm'+id);
|
||||
if(id.style.display == 'none') {
|
||||
id.style.display = '';
|
||||
}else{
|
||||
id.style.display = 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="250" valign="top" align="right"><div align="center"><?php $usee = $u->getInfoPers($u->info['id'],0,0,1); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; }
|
||||
if($u->info['level']>1 && $u->info['inTurnir'] == 0)
|
||||
{
|
||||
$priem = new Priems();
|
||||
$priem->seeMy(1);
|
||||
}
|
||||
if( $u->info['inTurnir'] > 0 ) {
|
||||
echo '<center><a href="/main.php?inv&remitem&otdel='.round((int)$_GET['otdel']).'">Снять все</a></center>';
|
||||
}
|
||||
echo '<br>'.$u->info_remont();
|
||||
|
||||
?>
|
||||
</div></td>
|
||||
<td width="242" valign="top" align="left"><?php if( $u->info['inTurnir'] == 0) { include('stats_inv.php'); }else{ include('stats_inv2.php'); } ?></td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" noresize="noresize">
|
||||
<?php if( $u->error != '' ) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="min-height:18px;padding-left:0px;"><font color="#FF0000"><b><?= $u->error; ?></b></font></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td width="60%" height="45" align="right" valign="top">
|
||||
<?php
|
||||
if($u->info['animal'] != 0)
|
||||
{
|
||||
echo ' <input class="btnnew" type="button" onclick="top.frames[\'main\'].location=\'main.php?pet=1&rnd='.$code.'\'" value="Зверь" />';
|
||||
}
|
||||
?>
|
||||
<?php if ($u->info['inTurnir'] == 0) { ?>
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?obraz&rnd=<?= $code; ?>'" value="Образ" />
|
||||
<?php } ?>
|
||||
<?php
|
||||
$gl = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `reimage` WHERE ((`uid` = "'.$u->info['id'].'" AND `clan` = "0") OR `clan` = "'.$u->info['clan'].'") AND `good` > 0 AND `bad` = "0" LIMIT 1'));
|
||||
if($gl[0] > 0) { ?>
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?galery&rnd=<?= $code; ?>'" value="Галерея" />
|
||||
<?php } unset($gl); ?>
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?skills&side=1&rn=<?= $code; ?>'" value="Умения" />
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?anketa&rn=<?= $code; ?>'" value="Анкета" />
|
||||
<?php if ($u->info['inTurnir'] == 0) { ?>
|
||||
<input class="btnnew2" style="background-color:#A9AFC0" type="button" onclick="location.href='main.php?referals'" value="Наставничество" />
|
||||
<?php } ?>
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php?act_trf=1&rn=<?= $code; ?>'" value="Отчет о переводах" />
|
||||
<input class="btnnew" type="button" style="font-weight:bold;" value="Безопасность" onclick="top.frames['main'].location='main.php?security&rn=<?= $code; ?>'" />
|
||||
<input class="btnnew" type="button" style="background-color:#A9AFC0" onClick="alert('Раздел отсутствует');" value="Подсказки" />
|
||||
|
||||
<input class="btnnew" type="button" onclick="top.frames['main'].location='main.php'" value="Вернуться" /> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="ShowInventory"><?= $showItems; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div align="right"><?= $c['counters']; ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -1,4 +1,4 @@
|
||||
<script language="JavaScript">
|
||||
<script>
|
||||
var elem = document.getElementById("se-pre-con");
|
||||
elem.parentNode.removeChild(elem);
|
||||
</script>
|
||||
@ -7,10 +7,8 @@
|
||||
|
||||
use Core\Database;
|
||||
|
||||
if (!defined('GAME_VERSION')) {
|
||||
require_once '_incl_data/autoload.php';
|
||||
}
|
||||
session_start();
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
@ -20,23 +18,31 @@ $u->info['marker'] = 'inv';
|
||||
if (isset($_SESSION['otdel']) && !isset($_GET['otdel']) && !isset($_GET['paged'])) {
|
||||
$_GET['otdel'] = $_SESSION['otdel'];
|
||||
$_GET['paged'] = $_SESSION['paged'];
|
||||
} elseif (!isset($_GET['otdel']) || ($_GET['otdel'] < 1 && $_GET['otdel'] > 6)) {
|
||||
} elseif (!isset($_GET['otdel']) || ($_GET['otdel'] < 1 || $_GET['otdel'] > 6)) {
|
||||
$_GET['otdel'] = 1; // Если раздел не указан.
|
||||
$_GET['paged'] = $_SESSION['paged'] = 0;
|
||||
}
|
||||
|
||||
if (isset($_GET['otdel'])) {
|
||||
if (!isset($_GET['paged']) && (isset($_GET['use_pid']) || isset($_GET['sid']) || isset($_GET['oid']) || isset($_GET['usecopr']) || isset($_GET['delcop']))) {
|
||||
$_GET['paged'] = $_SESSION['paged']; // use item and load old paging
|
||||
} elseif (isset($_GET['paged']) && $_GET['paged'] != '') {
|
||||
$_SESSION['paged'] = $_GET['paged']; // Задаем новую страницу.
|
||||
} elseif (isset($_SESSION['paged']) && $_SESSION['paged'] != '' && $_SESSION['otdel'] == $_GET['otdel']) {
|
||||
$_GET['paged'] = $_SESSION['paged']; // Если страница уже имеется в сессии, возвращаем её в текущую.
|
||||
} else {
|
||||
$_GET['paged'] = $_SESSION['paged'] = 0;
|
||||
}
|
||||
if (
|
||||
!isset($_GET['paged']) &&
|
||||
(
|
||||
isset($_GET['use_pid']) ||
|
||||
isset($_GET['sid']) ||
|
||||
isset($_GET['oid']) ||
|
||||
isset($_GET['usecopr']) ||
|
||||
isset($_GET['delcop'])
|
||||
)
|
||||
) {
|
||||
$_GET['paged'] = $_SESSION['paged']; // use item and load old paging
|
||||
} elseif (!empty($_GET['paged'])) {
|
||||
$_SESSION['paged'] = $_GET['paged']; // Задаем новую страницу.
|
||||
} elseif (!empty($_SESSION['paged']) && $_SESSION['otdel'] == $_GET['otdel']) {
|
||||
$_GET['paged'] = $_SESSION['paged']; // Если страница уже имеется в сессии, возвращаем её в текущую.
|
||||
} else {
|
||||
$_GET['paged'] = $_SESSION['paged'] = 0;
|
||||
}
|
||||
|
||||
|
||||
$_SESSION['otdel'] = $_GET['otdel']; // для отладки.
|
||||
|
||||
if (isset($_GET['delcop'])) {
|
||||
|
@ -1628,7 +1628,7 @@ $tma = '';
|
||||
<fieldset style="width: 100%">
|
||||
<legend><b>Выбранные приемы</b></legend>
|
||||
<input type="button" class="btn" value="Запомнить набор" onclick="top.savePriems(); return false;" >
|
||||
<input type="button" class="btn" value="Очистить слоты" onclick="window.location.href = '/main.php?skills=1&rz=4&all=<?= $_GET[all] ?>&clear_abil=1'; return false;">
|
||||
<input type="button" class="btn" value="Очистить слоты" onclick="window.location.href = '/main.php?skills=1&rz=4&all=<?= $_GET['all'] ?>&clear_abil=1'; return false;">
|
||||
|
||||
<?php $priem->seeMy(1); ?>
|
||||
</fieldset>
|
||||
|
@ -2,26 +2,7 @@
|
||||
if(!defined('GAME')) { die(); }
|
||||
|
||||
if($u->room['file'] == 'dungeon_enter_all') {
|
||||
|
||||
/*if( date('H') >= 22 && date('H') <= 24 ) {
|
||||
|
||||
if($u->info['align'] >= 1 && $u->info['align'] < 2) {
|
||||
$room = 220;
|
||||
}elseif($u->info['align'] >= 3 && $u->info['align'] < 4){
|
||||
$room = 2;
|
||||
}elseif($u->info['align']==7) {
|
||||
$room = 5;
|
||||
}else{
|
||||
$room = 4;
|
||||
}
|
||||
if($_GET['GoBattle']=='1') {
|
||||
mysql_query('UPDATE `users` SET `room` = "'.$room.'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}
|
||||
?>
|
||||
<div style="position:absolute; left:700px; top:150px;"><INPUT TYPE=button value="Пройти в зал для поединков!" class="btn btn-danger" style="width: 500px" onclick="location='main.php?GoBattle=1'"></div>
|
||||
<?php
|
||||
die('<center><h3>Подземелья закрыты с 22:00 до 00:00</center></h3>');
|
||||
}*/
|
||||
$error = ''; // Собираем ошибки.
|
||||
$dungeonGroupList = ''; // Сюда помещаем список Групп.
|
||||
$dungeonGo = 1; // По умолчанию, мы идем в пещеру.
|
||||
@ -89,9 +70,7 @@ if(isset($dungeon_timeout['id'])) // Кто-то передумал и не по
|
||||
if( isset( $_GET['start'] ) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1 ) {
|
||||
$ig = 1;
|
||||
if( $ig > 0 ){ //перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh'.$dun,'');
|
||||
|
||||
//
|
||||
|
||||
$dungeon['room'] = 321;
|
||||
$dungeon['id'] = $zv['dun'];
|
||||
//
|
||||
@ -1213,9 +1192,7 @@ onclick="if (confirm('Сдать все чеки (<?=$chk[0]?> шт.) наход
|
||||
}
|
||||
}else{
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(60*60*2-time()+$dungeon_timeout['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
//if( $dungeon['id'] == 104 ) {
|
||||
//echo '<hr>Вы можете посетить подземелье без ожидания: <button onClick="if(confirm(\'Вы уверены что хотите заплатить '.($u->info['level'] * 5).' зубов?\')){ location.href = \'/main.php?freego=1\'; }" class="btnnew">Снять задержку за '.$u->zuby(($u->info['level'] * 5),1).'</button>';
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user