2018-01-28 16:40:49 +00:00
< ? php
ob_start ( " ob_gzhandler " );
session_start ();
$errkom = '' ;
2018-03-02 14:33:58 +00:00
if ( ! isset ( $_SESSION [ 'uid' ])) {
header ( " Location: index.php " );
}
2018-01-28 16:40:49 +00:00
include ( " config.php " );
include ( " functions.php " );
$tmaz = time ();
2018-03-03 20:56:05 +00:00
db :: c () -> query ( 'UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i' , time (), $user [ 'id' ]);
if ( $user [ 'battle' ] != 0 ) {
2018-03-02 14:33:58 +00:00
header ( 'location: fbattle.php' );
die ();
}
2018-01-28 16:40:49 +00:00
2018-07-02 15:35:25 +00:00
/// fixme заводить переменную равную нулю и целую функцию, чтобы прибавить к нулю значение? исправить!
function sum_mf ( $u )
{
$t = 0 ;
$r = mysql_fetch_array ( mysql_query ( 'SELECT SUM(`add_proc_mf`) AS `mf` FROM `inventory` WHERE `owner` = "' . $u . '" AND `dressed` = "1" AND `add_proc_mf` > 0' ));
$r = $t + $r [ 'mf' ];
return $r ;
}
function sum_dmg ( $u )
{
$t = 0 ;
$r = mysql_fetch_array ( mysql_query ( 'SELECT SUM(`add_proc_uron`) AS `mf` FROM `inventory` WHERE `owner` = "' . $u . '" AND `dressed` = "1" AND `add_proc_uron` > 0' ));
$r = $t + $r [ 'mf' ];
return $r ;
}
function sum_bron ( $u )
{
$t = 0 ;
$r = mysql_fetch_array ( mysql_query ( 'SELECT SUM(`add_proc_bron`) AS `mf` FROM `inventory` WHERE `owner` = "' . $u . '" AND `dressed` = "1" AND `add_proc_bron` > 0' ));
$r = $t + $r [ 'mf' ];
return $r ;
}
function bron_ads ( $a1 , $a2 , $a3 , $a4 , $col )
{
return array ( 'a1' => round (( $a1 / 100 ) * $col ), 'a2' => round (( $a2 / 100 ) * $col ), 'a3' => round (( $a3 / 100 ) * $col ), 'a4' => round (( $a4 / 100 ) * $col ));
}
function max_mf ()
{
$r = '' ;
$mfs = countmf ();
if (( $mfs [ 'fkrit' ] > $mfs [ 'fakrit' ]) && ( $mfs [ 'fkrit' ] > $mfs [ 'fuvorot' ]) && ( $mfs [ 'fkrit' ] > $mfs [ 'fauvorot' ])) {
$r = 'fkrit' ;
} elseif (( $mfs [ 'fakrit' ] > $mfs [ 'fkrit' ]) && ( $mfs [ 'fakrit' ] > $mfs [ 'fuvorot' ]) && ( $mfs [ 'fakrit' ] > $mfs [ 'fauvorot' ])) {
$r = 'fakrit' ;
} elseif (( $mfs [ 'fuvorot' ] > $mfs [ 'fkrit' ]) && ( $mfs [ 'fuvorot' ] > $mfs [ 'fakrit' ]) && ( $mfs [ 'fuvorot' ] > $mfs [ 'fauvorot' ])) {
$r = 'fuvorot' ;
} elseif (( $mfs [ 'fauvorot' ] > $mfs [ 'fkrit' ]) && ( $mfs [ 'fauvorot' ] > $mfs [ 'fakrit' ]) && ( $mfs [ 'fauvorot' ] > $mfs [ 'fuvorot' ])) {
$r = 'fauvorot' ;
}
return $r ;
}
function stack ( $it_id )
{
global $user ;
$it_id = ( int ) $it_id ;
$stack = mysql_query ( " SELECT * FROM `inventory` WHERE `id` = ' " . $it_id . " ' AND `owner` = " . $user [ 'id' ] . " LIMIT 1 " );
if ( mysql_num_rows ( $stack ) == 1 ) {
$stack = mysql_fetch_array ( $stack );
$similar = mysql_fetch_array ( mysql_query ( " SELECT SUM(`koll`) FROM `inventory` WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` != ' " . $stack [ 'id' ] . " ' AND `name` = ' " . $stack [ 'name' ] . " ' AND `present` = ' " . $stack [ 'present' ] . " ' AND `duration` = ' " . $stack [ 'duration' ] . " ' AND `maxdur` = ' " . $stack [ 'maxdur' ] . " ' AND `laba` = ' " . $stack [ 'laba' ] . " ' AND `gmeshok` = ' " . $stack [ 'gmeshok' ] . " ' AND `dressed` = 0 AND `goden` = 0 AND `setsale` = 0 AND `koll` >= 1 AND `isrep` = ' " . $stack [ 'isrep' ] . " ' AND FORMAT(`cost`/`koll`, 2) = FORMAT( " . ( $stack [ 'cost' ] / $stack [ 'koll' ]) . " , 2) AND FORMAT(`point`/`koll`, 2) = FORMAT( " . ( $stack [ 'point' ] / $stack [ 'koll' ]) . " , 2) AND FORMAT(`bcost`/`koll`, 2) = FORMAT( " . ( $stack [ 'bcost' ] / $stack [ 'koll' ]) . " , 2) " ));
if ( $similar [ 0 ] >= 1 ) {
mysql_query ( " UPDATE `inventory` SET `cost` = (`cost`+`cost`/`koll`* " . $similar [ 0 ] . " ), `point` = (`point`+`point`/`koll`* " . $similar [ 0 ] . " ), `bcost` = (`bcost`+`bcost`/`koll`* " . $similar [ 0 ] . " ), `massa` = (`massa`+`massa`/`koll`* " . $similar [ 0 ] . " ), `koll` = (`koll`+ " . $similar [ 0 ] . " ), `gmeshok` = (`gmeshok`+`gmeshok`* " . $similar [ 0 ] . " ) WHERE `id` = ' " . $stack [ 'id' ] . " ' LIMIT 1 " );
mysql_query ( " DELETE FROM `inventory` WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` != ' " . $stack [ 'id' ] . " ' AND `name` = ' " . $stack [ 'name' ] . " ' AND `present` = ' " . $stack [ 'present' ] . " ' AND `duration` = ' " . $stack [ 'duration' ] . " ' AND `maxdur` = ' " . $stack [ 'maxdur' ] . " ' AND `dressed` = 0 AND `goden` = 0 AND `koll` >= 1 AND `setsale` = 0 AND `gmeshok` = ' " . $stack [ 'gmeshok' ] . " ' AND `laba` = ' " . $stack [ 'laba' ] . " ' AND `isrep` = ' " . $stack [ 'isrep' ] . " ' AND FORMAT(`cost`/`koll`, 2)=FORMAT( " . $stack [ 'cost' ] / $stack [ 'koll' ] . " , 2) AND FORMAT(`point`/`koll`, 2) = FORMAT( " . ( $stack [ 'point' ] / $stack [ 'koll' ]) . " , 2) AND FORMAT(`bcost`/`koll`, 2) = FORMAT( " . ( $stack [ 'bcost' ] / $stack [ 'koll' ]) . " , 2) " );
}
}
}
function unstack ( $it_id , $it_count )
{
global $user ;
$it_id = ( int ) $it_id ;
$it_count = ( int ) $it_count ;
$it_count = abs ( $it_count );
$dress = mysql_fetch_array ( mysql_query ( " SELECT * FROM `inventory` WHERE `owner` = " . $user [ 'id' ] . " AND `id` = ' " . mysql_real_escape_string ( $it_id ) . " ' LIMIT 1 " ));
$prototype = mysql_fetch_array ( mysql_query ( 'SELECT `id`, `gmeshok` FROM `shop` WHERE `id` = "' . $dress [ 'prototype' ] . '" LIMIT 1' ));
if ( isset ( $dress [ 'id' ])) {
if ( $it_count <= $dress [ 'koll' ] && $it_count > 0 ) {
if ( $dress [ 'koll' ] == $it_count ) {
mysql_query ( 'DELETE FROM `inventory` WHERE `id` = "' . $dress [ 'id' ] . '" AND `owner` = "' . $user [ 'id' ] . '" LIMIT 1' );
} else {
if ( $dress [ 'gmeshok' ] > 0 ) {
$sqla = " , `gmeshok` = `gmeshok`- " . $prototype [ 'gmeshok' ];
} else {
$sqla = " " ;
}
mysql_query ( " UPDATE `inventory` SET `cost` = (`cost`-`cost`/`koll`* " . $it_count . " ), `point` = (`point`-`point`/`koll`* " . $it_count . " ), `bcost` = (`bcost`-`bcost`/`koll`* " . $it_count . " ), `massa` = (`massa`-`massa`/`koll`* " . $it_count . " ), `koll` = (`koll`- " . $it_count . " ) $sqla WHERE `id` = ' $dress[id] ' AND `owner` = ' $user[id] ' LIMIT 1 " );
}
mysql_query ( " INSERT INTO `inventory` (`name`, `upgrade`, `modif`, `podgon`, `duration`, `maxdur`, `cost`, `bcost`, `point`, `nlevel`, `nsila`, `nlovk`, `ninta`, `nvinos`, `nintel`, `nmudra`, `nnoj`, `ntopor`, `ndubina`, `nmech`, `nalign`, `minu`, `maxu`, `gsila`, `glovk`, `ginta`, `gintel`, `ghp`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot`, `gnoj`, `gtopor`, `gdubina`, `gmech`, `img`, `text`, `owner`, `dressed`, `bron1`, `bron2`, `bron3`, `bron4`, `dategoden`, `magic`, `type`, `present`, `sharped`, `massa`, `goden`, `needident`, `nfire`, `nwater`, `nair`, `nearth`, `nlight`, `ngray`, `ndark`, `gfire`, `gwater`, `gair`, `gearth`, `glight`, `ggray`, `gdark`, `free_bron`, `free_stat`, `free_mf`, `letter`, `isrep`, `update`, `setsale`, `prototype`, `otdel`, `bs`, `gmp`, `includemagic`, `includemagicdex`, `includemagicmax`, `includemagicname`, `includemagicuses`, `includemagiccost`, `gmeshok`, `tradesale`, `podzem`, `x_mis`, `artefact`, `destinyinv`, `encicl`, `foronetrip`, `koll`) VALUES (' " . $dress [ 'name' ] . " ', ' " . $dress [ 'upgrade' ] . " ', ' " . $dress [ 'modif' ] . " ', ' " . $dress [ 'podgon' ] . " ', ' " . $dress [ 'duration' ] . " ', ' " . $dress [ 'maxdur' ] . " ', ' " . ( $dress [ 'cost' ] / $dress [ 'koll' ] * $it_count ) . " ', ' " . ( $dress [ 'bcost' ] / $dress [ 'koll' ] * $it_count ) . " ', ' " . ( $dress [ 'point' ] / $dress [ 'koll' ] * $it_count ) . " ', ' " . $dress [ 'nlevel' ] . " ', ' " . $dress [ 'nsila' ] . " ', ' " . $dress [ 'nlovk' ] . " ', ' " . $dress [ 'ninta' ] . " ', ' " . $dress [ 'nvinos' ] . " ', ' " . $dress [ 'nintel' ] . " ', ' " . $dress [ 'nmudra' ] . " ', ' " . $dress [ 'nnoj' ] . " ', ' " . $dress [ 'ntopor' ] . " ', ' " . $dress [ 'ndubina' ] . " ', ' " . $dress [ 'nmech' ] . " ', ' " . $dress [ 'nalign' ] . " ', ' " . $dress [ 'minu' ] . " ', ' " . $dress [ 'maxu' ] . " ', ' " . $dress [ 'gsila' ] . " ', ' " . $dress [ 'glovk' ] . " ', ' " . $dress [ 'ginta' ] . " ', ' " . $dress [ 'gintel' ] . " ', ' " . $dress [ 'ghp' ] . " ', ' " . $dress [ 'mfkrit' ] . " ', ' " . $dress [ 'mfakrit' ] . " ', ' " . $dress [ 'mfuvorot' ] . " ', ' " . $dress [ 'mfauvorot' ] . " ', ' " . $dress [ 'gnoj' ] . " ', ' " . $dress [ 'gtopor' ] . " ', ' " . $dress [ 'gdubina' ] . " ', ' " . $dress [ 'gmech' ] . " ', ' " . $dress [ 'img' ] . " ', ' " . $dress [ 'text' ] . " ', ' " . $dress [ 'owner' ] . " ', ' " . $dress [ 'dressed' ] . " ', ' " . $dress [ 'bron1' ] . " ', ' " . $dress [ 'bron2' ] . " ', ' " . $dress [ 'bron3' ] . " ', ' " . $dress [ 'bron4' ] . " ', ' " . $dress [ 'dategoden' ] . " ', ' " . $dress [ 'magic' ] . " ', ' " . $dress [ 'type' ] . " ', ' " . $dress [ 'present' ] . " ', ' " . $dress [ 'sharped' ] . " ', ' " . ( $dress [ 'massa' ] / $dress [ 'koll' ] * $it_count ) . " ', ' " . $dress [ 'goden' ] . " ', ' " . $dress [ 'needident' ] . " ', ' " . $dress [ 'nfire' ] . " ', ' " . $dress [ 'nwater' ] . " ', ' " . $dress [ 'nair' ] . " ', ' " . $dress [ 'nearth' ] . " ', ' " . $dress [ 'nlight' ] . " ', ' " . $dress [ 'ngray' ] . " ', ' " . $dress [ 'ndark' ] . " ', ' " . $dress [ 'gfire' ] . " ', ' " . $dress [ 'gwater' ] . " ', ' " . $dress [ 'gair' ] . " ', ' " . $dress [ 'gearth' ] . " ', ' " . $dress [ 'glight' ] . " ', ' " . $dress [ 'ggray' ] . " ', ' " . $dress [ 'gdark' ] . " ', ' " . $dress [ 'free_bron' ] . " ', ' " . $dress [ 'free_bron' ] . " ', ' " . $dress [ 'free_mf' ] . " ', ' " . $dress [ 'letter' ] . " ', ' " . $dress [ 'isrep' ] . " ', ' " . $dress [ 'update' ] . " ', ' " . $dress [ 'setsale' ] . " ', ' " . $dress [ 'prototype' ] . " ', ' " . $dress [ 'otdel' ] . " ', ' " . $dress [ 'bs' ] . " ', ' " . $dress [ 'gmp' ] . " ', ' " . $dress [ 'includemagic' ] . " ', ' " . $dress [ 'includemagicdex' ] . " ', ' " . $dress [ 'includemagicmax' ] . " ', ' " . $dress [ 'includemagicname' ] . " ', ' " . $dress [ 'ggrincludemagicusesay' ] . " ', ' " . $dress [ 'includemagiccost' ] . " ', ' " . ( $dress [ 'gmeshok' ] / $dress [ 'koll' ] * $it_count ) . " ', ' " . $dress [ 'tradesale' ] . " ', ' " . $dress [ 'podzem' ] . " ', ' " . $dress [ 'x_mis' ] . " ', ' " . $dress [ 'artefact' ] . " ', ' " . $dress [ 'destinyinv' ] . " ', ' " . $dress [ 'encicl' ] . " ', ' " . $dress [ 'foronetrip' ] . " ', ' " . $it_count . " ') " );
return mysql_insert_id ();
}
}
}
function del_efs ( $uid , $id , $type )
{
global $user ;
$arr = [ 2 , 3 , 4 , 5 , 8 , 10 , 11 , 12 , 13 , 14 , 20 ];
if ( $uid == $user [ 'id' ]) {
if ( $id != null ) {
if ( ! in_array ( $type , $arr )) {
db :: c () -> query ( 'DELETE FROM `effects` WHERE `owner` = ?i AND `id` = ?i' , $uid , $id );
if ( $type == 1022 ) {
db :: c () -> query ( 'UPDATE `users` SET `invis` = ?i WHERE `id` = ?i' , 0 , $uid );
$user [ 'invis' ] = 0 ;
}
err ( 'Эффект удалён.' );
} else {
err ( 'Данный эффект нельзя удалить.' );
}
}
}
}
function countmf ()
{ //TODO пересчитать модификаторы
global $user ;
function GetWeaponType ( $idwep )
{
if ( $idwep == 0 || $idwep == null || $idwep == '' ) {
return " kulak " ;
}
2018-11-01 16:18:35 +00:00
$wep = db :: c () -> query ( 'SELECT `otdel`, `minu` FROM `inventory` WHERE `id` = ?i' , $idwep ) -> fetch_row ();
2018-07-02 15:35:25 +00:00
if ( $wep [ 0 ] == '1' ) {
return " noj " ;
} elseif ( $wep [ 0 ] == '12' ) {
return " dubina " ;
} elseif ( $wep [ 0 ] == '11' ) {
return " topor " ;
} elseif ( $wep [ 0 ] == '13' ) {
return " mech " ;
} elseif ( $wep [ 1 ] > 0 ) {
return " buket " ;
} else {
return " kulak " ;
}
}
2018-11-01 16:18:35 +00:00
$zo = db :: c () -> query ( 'SELECT `id` FROM `effects` WHERE `type` = 201 AND `owner` = ?i' , $user [ 'id' ]) -> fetch_row ();
$sokr = db :: c () -> query ( 'SELECT `id` FROM `effects` WHERE `type` = 202 AND `owner` = ?i' , $user [ 'id' ]) -> fetch_row ();
2018-07-02 15:35:25 +00:00
if ( isset ( $sokr [ 0 ])) {
$bmfud += 5 ;
} else {
$bmfud = 0 ;
}
if ( isset ( $zo [ 0 ]) > 0 ) {
$bmfbron += 25 ;
} else {
$bmfbron = 0 ;
}
$mf = array ();
2018-11-01 16:18:35 +00:00
$user_dress = db :: c () -> query ( 'SELECT SUM(`minu`), SUM(`maxu`), SUM(`mfkrit`), SUM(`mfakrit`), SUM(`mfuvorot`), SUM(`mfauvorot`), SUM(`bron1`), SUM(`bron2`), SUM(`bron3`), SUM(`bron4`) FROM `inventory` WHERE `dressed` = 1 AND `owner` = ?i' , $user [ 'id' ]) -> fetch_row ();
2018-07-02 15:35:25 +00:00
$user_dress [ 6 ] = $bmfbron ;
$user_dress [ 7 ] = $bmfbron ;
$user_dress [ 8 ] = $bmfbron ;
$user_dress [ 9 ] = $bmfbron ;
$user_dress [ 6 ] += $user [ 'ubron1' ];
$user_dress [ 7 ] += $user [ 'ubron2' ];
$user_dress [ 8 ] += $user [ 'ubron3' ];
$user_dress [ 9 ] += $user [ 'ubron4' ];
$mykrit = $user_dress [ 2 ] + ( $user [ 'inta' ] * 2.95 );
$myakrit = $user_dress [ 3 ] + ( $user [ 'inta' ] * 2.75 );
$myuvorot = $user_dress [ 4 ] + ( $user [ 'lovk' ] * 5 );
$myauvorot = $user_dress [ 5 ] + ( $user [ 'lovk' ] * 4 );
$mf [ 'me' ] = array ( 'udar' => ( floor ( $user [ 'sila' ] / 3 ) + 1 + $user_dress [ 0 ]), 'maxudar' => ( floor ( $user [ 'sila' ] / 3 ) + 4 + $user_dress [ 1 ]));
if ( $mf [ 'me' ][ 'udar' ] < 0 ) {
$mf [ 'me' ][ 'udar' ] = 0 ;
}
$weap_b = 0 ;
switch ( GetWeaponType ( $user [ 'weap' ])) {
case " noj " :
$weap_b += $user [ 'noj' ];
break ;
case " dubina " :
$weap_b += $user [ 'dubina' ];
break ;
case " topor " :
$weap_b += $user [ 'topor' ];
break ;
case " mech " :
$weap_b += $user [ 'mec' ];
break ;
}
return array ( 'minu' => $mf [ 'me' ][ 'udar' ] + $bmfud + $weap_b , 'maxu' => $mf [ 'me' ][ 'maxudar' ] + $bmfud + $weap_b , 'fkrit' => round ( $mykrit , 0 ), 'fakrit' => round ( $myakrit , 0 ), 'fuvorot' => round ( $myuvorot , 0 ), 'fauvorot' => round ( $myauvorot , 0 ), 'bron1' => $user_dress [ 6 ], 'bron2' => $user_dress [ 7 ], 'bron3' => $user_dress [ 8 ], 'bron4' => $user_dress [ 9 ]);
}
// одеть предмет
function dressitem ( $id )
{
global $user ;
2018-11-01 16:18:35 +00:00
$item = db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `duration` < `maxdur` AND `id` = ?i AND `owner` = ?i AND `dressed` = 0' , $id , $user [ 'id' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
switch ( $item [ 'type' ]) {
case 1 :
$slot1 = 'sergi' ;
break ;
case 2 :
$slot1 = 'kulon' ;
break ;
case 3 :
$slot1 = 'weap' ;
break ;
case 4 :
$slot1 = 'bron' ;
break ;
case 5 :
$slot1 = 'r1' ;
break ;
case 6 :
$slot1 = 'r2' ;
break ;
case 7 :
$slot1 = 'r3' ;
break ;
case 8 :
$slot1 = 'helm' ;
break ;
case 9 :
$slot1 = 'perchi' ;
break ;
case 10 :
$slot1 = 'shit' ;
break ;
case 11 :
$slot1 = 'boots' ;
break ;
case 12 :
$slot1 = 'm1' ;
break ;
case 22 :
$slot1 = 'rybax' ;
break ;
case 23 :
$slot1 = 'plaw' ;
break ;
case 24 :
$slot1 = 'rune_1' ;
break ;
case 25 :
$slot1 = 'rune_2' ;
break ;
case 26 :
$slot1 = 'rune_3' ;
break ;
}
if ( $item [ 'type' ] == 5 ) {
if ( ! $user [ 'r1' ]) {
$slot1 = 'r1' ;
} elseif ( ! $user [ 'r2' ]) {
$slot1 = 'r2' ;
} elseif ( ! $user [ 'r3' ]) {
$slot1 = 'r3' ;
} else {
$slot1 = 'r1' ;
dropitem ( 5 );
}
} elseif ( $item [ 'type' ] == 24 ) {
if ( ! $user [ 'rune_1' ]) {
$slot1 = 'rune_1' ;
} elseif ( ! $user [ 'rune_2' ]) {
$slot1 = 'rune_2' ;
} elseif ( ! $user [ 'rune_3' ]) {
$slot1 = 'rune_3' ;
} else {
$slot1 = 'rune_1' ;
dropitem ( 24 );
}
} elseif ( $item [ 'type' ] == 12 ) {
if ( ! $user [ 'm1' ]) {
$slot1 = 'm1' ;
} elseif ( ! $user [ 'm2' ]) {
$slot1 = 'm2' ;
} elseif ( ! $user [ 'm3' ]) {
$slot1 = 'm3' ;
} elseif ( ! $user [ 'm4' ]) {
$slot1 = 'm4' ;
} elseif ( ! $user [ 'm5' ]) {
$slot1 = 'm5' ;
} elseif ( ! $user [ 'm6' ]) {
$slot1 = 'm6' ;
} elseif ( ! $user [ 'm7' ]) {
$slot1 = 'm7' ;
} elseif ( ! $user [ 'm8' ]) {
$slot1 = 'm8' ;
} elseif ( ! $user [ 'm9' ]) {
$slot1 = 'm9' ;
} elseif ( ! $user [ 'm10' ]) {
$slot1 = 'm10' ;
} else {
$slot1 = 'm1' ;
dropitem ( 12 );
}
} else {
dropitem ( $item [ 'type' ]);
}
$al = '(1 = 1)' ;
if ( $item [ 'nalign' ] > 0 ) {
if ( $item [ 'nalign' ] == 1.1 ) {
if (( $user [ 'align' ] == 6 || ( $user [ 'align' ] > 1 && $user [ 'align' ] < 2 ))) {
$al = '(1 = 1)' ;
} else {
$al = '(1 = 2)' ;
}
}
}
if ( ! ( $item [ 'type' ] == 12 && $user [ 'level' ] < 4 )) {
2018-11-01 16:18:35 +00:00
if ( db :: c () -> query ( 'UPDATE `users` AS `u`, `inventory` AS `i` SET `u`.?f = ?i, `i`.`dressed` = 1, `u`.`sila` = `u`.`sila` + `i`.`gsila`, `u`.`lovk` = `u`.`lovk` + `i`.`glovk`, `u`.`inta` = `u`.`inta` + `i`.`ginta`, `u`.`intel` = `u`.`intel` + `i`.`gintel`, `u`.`maxhp` = `u`.`maxhp` + `i`.`ghp`, `u`.`noj` = `u`.`noj` + `i`.`gnoj`, `u`.`topor` = `u`.`topor` + `i`.`gtopor`, `u`.`dubina` = `u`.`dubina` + `i`.`gdubina`, `u`.`mec` = `u`.`mec` + `i`.`gmech`, `u`.`mfire` = `u`.`mfire` + `i`.`gfire`, `u`.`mwater` = `u`.`mwater` + `i`.`gwater`, `u`.`mair` = `u`.`mair` + `i`.`gair`, `u`.`mearth` = `u`.`mearth` + `i`.`gearth`, `u`.`mlight` = `u`.`mlight` + `i`.`glight`, `u`.`mgray` = `u`.`mgray` + `i`.`ggray`, `u`.`mdark` = `u`.`mdark` + `i`.`gdark`, `u`.`ubron1` = `u`.`ubron1` + `i`.`bron1`, `u`.`ubron2` = `u`.`ubron2` + `i`.`bron2`, `u`.`ubron3` = `u`.`ubron3` + `i`.`bron3`, `u`.`ubron4` = `u`.`ubron4` + `i`.`bron4`, `u`.`fkrit` = `u`.`fkrit` + `i`.`mfkrit`, `u`.`fakrit` = `u`.`fakrit` + `i`.`mfakrit`, `u`.`fuvorot` = `u`.`fuvorot` + `i`.`mfuvorot`, `u`.`fauvorot` = `u`.`fauvorot` + `i`.`mfauvorot`, `u`.`uminu` = `u`.`uminu` + `i`.`minu`, `u`.`umaxu` = `u`.`umaxu` + `i`.`maxu` WHERE `i`.`needident` = 0 AND `i`.`id` = ?i AND `i`.`dressed` = 0 AND `i`.owner = ?i AND (20 + `u`.`sila`) >= `i`.`nsila` AND (20 + `u`.`lovk`) >= `i`.`nlovk` AND (20 + `u`.`inta`) >= `i`.`ninta` AND `u`.`vinos` >= `i`.`nvinos` AND (20 + `u`.`intel`) >= `i`.`nintel` AND `u`.`mudra` >= `i`.`nmudra` AND `u`.`level` >= `i`.`nlevel` AND (("?s" OR (?i = `i`.`nalign`)) OR (`i`.`nalign` = 0)) AND `u`.`noj` >= `i`.`nnoj` AND `u`.`topor` >= `i`.`ntopor` AND `u`.`dubina` >= `i`.`ndubina` AND `u`.`mec` >= `i`.`nmech` AND `u`.`mfire` >= `i`.`nfire` AND `u`.`mwater` >= `i`.`nwater` AND `u`.`mair` >= `i`.`nair` AND `u`.`mearth` >= `i`.`nearth` AND `u`.`mlight` >= `i`.`nlight` AND `u`.`mgray` >= `i`.`ngray` AND `u`.`mdark` >= `i`.`ndark` AND `i`.`setsale` = 0 AND `u`.`id` = ?i' , $slot1 , $id , $id , $user [ 'id' ], $al , $user [ 'align' ], $user [ 'id' ]))
2018-07-02 15:35:25 +00:00
$user [ $slot1 ] = $item [ 'id' ];
return true ;
}
}
/**
* Отображение персонажа в main . php
* @ param $id
*/
function showpersinv ( $id )
{
$user = db :: c () -> query ( 'SELECT * FROM `users` WHERE `id` = ?i' , $id ) -> fetch_assoc ();
$dressed = [];
2018-11-01 16:44:20 +00:00
$r = db :: c () -> query ( ' SELECT * FROM `inventory` WHERE
`id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR
`id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR
`id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR `id` = ? i OR
`id` = ? i ' ,
$user [ 'helm' ], $user [ 'weap' ], $user [ 'plaw' ], $user [ 'bron' ], $user [ 'rybax' ], $user [ 'belt' ],
$user [ 'sergi' ], $user [ 'kulon' ], $user [ 'r1' ], $user [ 'r2' ], $user [ 'r3' ], $user [ 'perchi' ],
$user [ 'shit' ], $user [ 'leg' ], $user [ 'boots' ], $user [ 'm1' ], $user [ 'm2' ], $user [ 'm3' ], $user [ 'm4' ],
$user [ 'm5' ], $user [ 'm6' ], $user [ 'm7' ], $user [ 'm8' ], $user [ 'm9' ], $user [ 'm10' ]);
while ( $rec = $r -> fetch_assoc ()) {
2018-07-02 15:35:25 +00:00
$dressed [ $rec [ 'id' ]] = $rec ;
}
?>
< CENTER >
2018-11-01 16:44:20 +00:00
< img src = " i/align_<?= ( $user['align'] > 0 ? $user['align'] : " 0 " ) ?>.gif " >
2018-11-01 17:11:58 +00:00
< img src = " i/klan/<?= ClanImage( $user['klan'] ) ?>.gif " >
2018-07-02 15:35:25 +00:00
< B >< ? = $user [ 'login' ] ?> </B> [<?= $user['level'] ?>]
2018-11-01 16:44:20 +00:00
< a href = inf . php ? < ? = $user [ 'login' ] ?> target=_blank><IMG SRC=i/inf.gif ALT="Инф. о <?= $user['login'] ?>"></a>
2018-07-02 15:35:25 +00:00
< TABLE cellspacing = 0 cellpadding = 0 >
< tr >
< TD colspan = 3 width = 100 %>
< ? = setHP ( $user [ 'hp' ], $user [ 'maxhp' ], 1 ); ?>
</ td >
</ tr >
< ?
if ( $user [ 'level' ] > 3 ) { ?>
< TR >
< TD colspan = 3 >
< ? // TODO Сделать один запрос из десяти!
if ( $user [ 'm1' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm1' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=12"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm2' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm2' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=13"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm3' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm3' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=14"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm4' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm4' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=15"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm5' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm5' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=16"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
?>
</ TD >
</ TR >
< TR >
< TD colspan = 3 >
< ?
if ( $user [ 'm6' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm6' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=17"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm7' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm7' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=18"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm8' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm8' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=19"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm9' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm9' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=20"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
if ( $user [ 'm10' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'm10' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br />Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ];
echo '<a href="?edit=1&drop=21"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=40 height=25></a>' ;
} else {
$mess = '<b>Пустой слот магия</b>' ;
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>' ;
}
?>
</ TD >
</ TR >
< ?
} ?>
< TR >
< TD width = 62 valign = top >
< TABLE width = 100 % cellspacing = 0 cellpadding = 0 >
< TR >
< TD >< ? php
if ( $user [ 'sergi' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'sergi' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=1"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=60 height=20></a>' ;
} else {
echo '<img src="i/w1.gif" width=60 height=20 class=\'tooltip\' title=\'<b>Пустой слот Серьги</b>\' />' ;
}
?> </TD>
</ TR >
< TR >
< TD >< ? php
if ( $user [ 'kulon' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'kulon' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=2"><img src="i/sh/' . $dress [ 'img' ] . '" width=60 height=20 class=\'tooltip\' title=\'' . $mess . '\'></a>' ;
} else {
echo '<img src="i/w2.gif" width=60 height=20 class=\'tooltip\' title=\'<b>Пустой слот Ожерелье</b>\' />' ;
}
?> </TD>
</ TR >
< TR >
< TD >< ? php
if ( $user [ 'weap' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'weap' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=3"><img src="i/sh/' . $dress [ 'img' ] . '" width=60 height=60 class=\'tooltip\' title=\'' . $mess . '\'></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w3.gif" width=60 height=60 title=\'<b>Пустой слот Оружие</b>\' />' ;
}
?> </TD>
</ TR >
< TR >
< TD >< ? php
if ( $user [ 'bron' ] > 0 || $user [ 'rybax' ] > 0 || $user [ 'plaw' ] > 0 ) {
if ( $user [ 'plaw' ]) {
$d = $user [ 'plaw' ];
$n = 23 ;
} elseif ( $user [ 'bron' ]) {
$d = $user [ 'bron' ];
$n = 4 ;
} elseif ( $user [ 'rybax' ]) {
$d = $user [ 'rybax' ];
$n = 22 ;
}
$dress = $dressed [ $d ];
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=' . $n . '"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=60 height=80></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w4.gif" width=60 height=80 title=\'<b>Пустой слот Броня</b>\' />' ;
}
?> </TD>
</ TR >
< TR >
< TD >
< TABLE cellspacing = 0 cellpadding = 0 >
< tr >
< td >< ? php
if ( $user [ 'r1' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'r1' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=5"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=20 height=20></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title=\'<b>Пустой слот Кольцо</b>\' />' ;
}
?> </td>
< td >< ? php
if ( $user [ 'r2' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'r2' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a class=\'tooltip\' title=\'' . $mess . '\' href="?edit=1&drop=6"><img src="i/sh/' . $dress [ 'img' ] . '" width=20 height=20></a>' ;
} else {
echo '<img src="i/w6.gif" width=20 height=20 class=\'tooltip\' title=\'<b>Пустой слот Кольцо</b>\' />' ;
}
?> </td>
< td >< ? php
if ( $user [ 'r3' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'r3' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=7"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=20 height=20></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title=\'<b>Пустой слот Кольцо</b>\' />' ;
}
?> </td>
</ tr >
</ TABLE >
</ TD >
</ TR >
</ TABLE >
</ TD >
< TD valign = top >< img src = " i/shadow/<?= $user['shadow'] ?> " width = 76 height = 209
alt = " <?= $user['login'] ?> " ></ TD >
< TD width = 62 valign = top >
< TABLE width = 100 % cellspacing = 0 cellpadding = 0 >
< TR >
< TD >< ? php
if ( $user [ 'helm' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'helm' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=8"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=60 height=60></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w9.gif" width=60 height=60 title=\'<b>Пустой слот Шлем</b>\' />' ;
}
?> </TD>
</ TR >
< TR >
< TD >< ? php
if ( $user [ 'perchi' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'perchi' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=9"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=60 height=40></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w11.gif" width=60 height=40 title=\'<b>Пустой слот Перчатки</b>\' />' ;
}
?> </TD>
</ TR >
< TR >
< TD >< ? php
if ( $user [ 'shit' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'shit' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = 'Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '' ;
echo '<a href="?edit=1&drop=10"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=60 height=60></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w10.gif" width=60 height=60 title=\'<b>Пустой слот Щит</b>\' />' ;
}
?> </TD>
</ TR >
< TR >
< TD >< ? php
if
( $user [ 'boots' ] > 0 ) {
2018-11-01 16:44:20 +00:00
$dress = db :: c () -> query ( 'SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i' , $user [ 'boots' ]) -> fetch_assoc ();
2018-07-02 15:35:25 +00:00
$mess = '<span style="min-width: 350px;">Снять <b>' . $dress [ 'name' ] . '</b><br>Прочность ' . $dress [ 'duration' ] . '/' . $dress [ 'maxdur' ] . '</span>' ;
echo '<a href="?edit=1&drop=11"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress [ 'img' ] . '" width=60 height=40></a>' ;
} else {
echo '<img class=\'tooltip\' src="i/w12.gif" width=60 height=40 title=\'<b>Пустой слот Обувь</b>\' />' ;
}
?> </TD>
</ TR >
</ TABLE >
</ TD >
</ TR >
</ TABLE >
< table cellspacing = " 0 " cellpadding = " 0 " border = " 0 "
style = " background: url('http://i.oldbk.com/i/runes_slots.jpg') no-repeat center bottom; " >
< tbody >
< tr >
< td width = " 59 " height = " 48 " align = " right " >< ? echo show_rune ( 1 , $user [ 'id' ], 1 ); ?> </td>
< td width = " 74 " height = " 48 " align = " center " >< ? echo show_rune ( 2 , $user [ 'id' ], 1 ); ?> </td>
< td width = " 57 " height = " 48 " align = " left " >< ? echo show_rune ( 3 , $user [ 'id' ], 1 ); ?> </td>
</ tr >
</ tbody >
</ table >
</ CENTER > < ? php
}
2018-03-02 14:33:58 +00:00
function updstats ()
{
global $user ;
2018-11-01 16:44:20 +00:00
$u1 = db :: c () -> query ( ' SELECT
`sila` , `lovk` , `inta` , `intel` , `noj` , `mec` , `topor` , `dubina` ,
`mfire` , `mwater` , `mair` , `mearth` , `mlight` , `mgray` , `mdark` , `hp` , `maxhp`
FROM `users` WHERE `id` = ? i ',$user[' id ' ]) -> fetch_assoc ();
2018-03-02 14:33:58 +00:00
foreach ( $u1 as $k => $v ) {
$user [ $k ] = $v ;
}
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( ! isset ( $_SESSION [ 'stackall' ])) {
$_SESSION [ 'stackall' ] = true ;
2018-01-28 16:40:49 +00:00
}
2018-03-23 21:47:46 +00:00
if ( isset ( $_GET [ 'stackall' ])) {
2018-03-02 14:33:58 +00:00
$_SESSION [ 'stackall' ] = ( $_SESSION [ 'stackall' ] ? false : true );
/*
2018-01-28 16:40:49 +00:00
$rec = mysql_query ( " SELECT `id` FROM `inventory` WHERE `owner` = ' $user[id] ' AND `setsale` = 0 AND `koll` >= 1 ORDER BY `id` DESC " );
while ( $pl = mysql_fetch_array ( $rec )) {
if ( isset ( $pl [ 'id' ])) {
stack ( $pl [ 'id' ]);
echo '<b style=\'margin-left: 15px; color: Red;\'>В с е прошло успешно ...</b>' ;
}
unset ( $pl , $rec );
}
*/
}
2018-03-23 21:47:46 +00:00
if ( isset ( $_GET [ " stack " ])) {
2018-03-02 14:33:58 +00:00
$_GET [ " stack " ] = ( int ) $_GET [ " stack " ];
2018-11-01 16:44:20 +00:00
$rec = db :: c () -> query ( 'SELECT `id` FROM `inventory` WHERE `id` = ?i AND `owner` = ?i AND `setsale` = 0' , $_GET [ 'stack' ], $user [ 'id' ]) -> fetch_assoc ();
2018-03-02 14:33:58 +00:00
if ( isset ( $rec [ 'id' ])) {
stack ( $rec [ 'id' ]);
unset ( $rec );
}
2018-01-28 16:40:49 +00:00
}
2018-03-23 21:47:46 +00:00
if ( isset ( $_GET [ 'unstack' ])) {
2018-03-02 14:33:58 +00:00
unstack (( int ) $_GET [ 'unstack' ], ( int ) $_POST [ " qty " ]);
}
2018-03-23 20:36:35 +00:00
function setShadow ( $image )
{
global $user ;
$shadows = [
2018-03-30 20:21:35 +00:00
'm01' , 'm02' , 'm03' , 'm04' , 'm05' , 'm06' , 'm07' , 'm08' , 'm09' , 'm10' ,
'f01' , 'f02' , 'f03' , 'f04' , 'f05' , 'f06' , 'f07' , 'f08' , 'f09' , 'f10' ,
2018-03-23 20:36:35 +00:00
'person'
];
2018-03-30 20:21:35 +00:00
if ( in_array ( $image , $shadows )) {
2018-03-23 20:36:35 +00:00
$i = $image . '.png' ;
db :: c () -> query ( 'UPDATE `users` SET `shadow` = "?s" WHERE `id` = ?i' , $i , $user [ 'id' ]);
} else err ( 'Ошибка!' );
2018-01-28 16:40:49 +00:00
}
2018-03-30 20:21:35 +00:00
$obraz = filter_input ( INPUT_GET , 'obraz' );
2018-03-23 20:36:35 +00:00
if ( $obraz && ( $user [ 'shadow' ] == 'g0.gif' || $user [ 'shadow' ] == 'man0.gif' )) {
setShadow ( $obraz );
}
2018-01-28 16:40:49 +00:00
2018-03-23 21:47:46 +00:00
if ( isset ( $_GET [ 'del' ])) {
if ( $_GET [ 'del' ] == 1 ) {
if ( $_GET [ 'efid' ] > 0 ) {
$pl = mysql_fetch_array ( mysql_query ( 'SELECT `id`, `type` FROM `effects` WHERE `owner` = "' . $user [ 'id' ] . '" AND `id` = "' . ( int ) $_GET [ 'efid' ] . '" LIMIT 1' ));
if ( isset ( $pl [ 'id' ])) {
del_efs ( $user [ 'id' ], $pl [ 'id' ], $pl [ 'type' ]);
} else {
echo '<b style=\'color: Red;\'>Эффект не найден ...</b>' ;
}
2018-03-02 14:33:58 +00:00
}
2018-01-28 16:40:49 +00:00
}
}
2018-03-02 14:33:58 +00:00
if ( isset ( $_GET [ 'modif_bron' ])) {
$brons = $_GET [ 'modif_bron' ];
$ids = $_GET [ 'ids' ];
$cur = mysql_fetch_assoc ( mysql_query ( " SELECT `id`, `free_bron`, `bron1`, `bron2`, `bron3`, `bron4` FROM `inventory` WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` = ' " . mysql_real_escape_string ( $ids ) . " ' LIMIT 1 " ));
if ( isset ( $cur [ 'id' ])) {
if ( $cur [ 'free_bron' ] > 0 && $cur [ $brons ] > 0 ) {
mysql_query ( " UPDATE `inventory` SET `free_bron` = (`free_bron`-1), ` " . $brons . " ` = (` " . $brons . " `+1) WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` = ' " . mysql_real_escape_string ( $ids ) . " ' LIMIT 1 " );
echo " <font color=green><b>Параметр брони увеличен!</b></font> " ;
}
}
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( isset ( $_GET [ 'modif_stat' ])) {
$stats = $_GET [ 'modif_stat' ];
$ids = $_GET [ 'ids' ];
$cur = mysql_fetch_assoc ( mysql_query ( " SELECT `id`, `free_stat`, `gsila`, `glovk`, `ginta`, `gintel` FROM `inventory` WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` = ' " . mysql_real_escape_string ( $ids ) . " ' LIMIT 1 " ));
if ( isset ( $cur [ 'id' ])) {
if ( $cur [ 'free_stat' ] > 0 && $cur [ $stats ] > 0 ) {
mysql_query ( " UPDATE `inventory` SET `free_stat` = (`free_stat`-1), ` " . $stats . " ` = (` " . $stats . " `+1) WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` = ' " . mysql_real_escape_string ( $ids ) . " ' LIMIT 1 " );
echo " <font color=green><b>Параметр увеличен!</b></font> " ;
}
2018-01-28 16:40:49 +00:00
}
}
2018-03-02 14:33:58 +00:00
if ( isset ( $_GET [ 'modif_mf' ])) {
$mfs = $_GET [ 'modif_mf' ];
$ids = $_GET [ 'ids' ];
$cur = mysql_fetch_assoc ( mysql_query ( " SELECT `id`, `free_mf`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot` FROM `inventory` WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` = ' " . mysql_real_escape_string ( $ids ) . " ' LIMIT 1 " ));
if ( isset ( $cur [ 'id' ])) {
if ( $cur [ 'free_mf' ] > 0 && $cur [ $mfs ] > 0 ) {
mysql_query ( " UPDATE `inventory` SET `free_mf` = (`free_mf`-1), ` " . $mfs . " ` = (` " . $mfs . " `+1) WHERE `owner` = ' " . $user [ 'id' ] . " ' AND `id` = ' " . mysql_real_escape_string ( $ids ) . " ' LIMIT 1 " );
echo " <font color=green><b>Параметр увеличен!</b></font> " ;
}
2018-01-28 16:40:49 +00:00
}
}
2018-03-02 21:03:59 +00:00
$d = db :: c () -> query ( 'SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0' , $user [ 'id' ]) -> fetch_assoc ();
2018-03-02 14:33:58 +00:00
if ( $d [ 'summ' ] > get_meshok () && $_GET [ 'got' ]) {
2018-03-02 21:03:59 +00:00
err ( 'У вас переполнен рюкзак, вы не можете передвигаться...' );
2018-03-02 14:33:58 +00:00
$_GET [ 'got' ] = 0 ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 21:03:59 +00:00
$eff = db :: c () -> query ( 'SELECT `id` FROM `effects` WHERE `owner` = ?i AND (`type` = 14 OR `type` = 13) LIMIT 1' , $user [ 'id' ]) -> fetch_assoc ();
2018-03-02 14:33:58 +00:00
if ( isset ( $eff [ 'id' ]) && $_GET [ 'got' ]) {
2018-03-02 21:03:59 +00:00
err ( 'У вас тяжелая травма, вы не можете передвигатся...' );
2018-03-02 14:33:58 +00:00
$_GET [ 'got' ] = 0 ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
function gone_rooms ( $room )
{
2018-03-23 21:09:30 +00:00
global $user ;
$array = [
1 => [], 2 => [], 3 => [], 4 => [],
5 => [ 'min_level' => 1 , 'max_level' => 3 ], 6 => [ 'min_level' => 1 , 'max_level' => 3 ],
7 => [ 'min_level' => 1 , 'max_level' => 3 ], 8 => [ 'min_level' => 4 , 'max_level' => 21 ],
9 => [ 'min_level' => 4 , 'max_level' => 6 ], 10 => [ 'min_level' => 7 , 'max_level' => 9 ],
11 => [ 'min_level' => 10 , 'max_level' => 12 ], 12 => [ 'min_level' => 13 , 'max_level' => 15 ],
13 => [ 'min_level' => 16 , 'max_level' => 19 ], 14 => [ 'min_level' => 19 , 'max_level' => 21 ],
15 => [ 'paladin' => 1 ], 16 => [ 'paladin' => 1 ],
17 => [ 'align' => 3 ], 18 => [ 'align' => 3 ], 19 => [ 'sex' => 2 ],
36 => [ 'align' => 2 ],
54 => [ 'align' => 6 ], 55 => [ 'align' => 6 ], 56 => [ 'align' => 2 ]
];
2018-03-02 14:33:58 +00:00
$error = 0 ;
$param = $array [ $room ];
if ( $room == 57 ) {
err ( " <b>Комнаты не существует...</b> " );
$error = 1 ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( isset ( $param [ 'min_level' ])) {
if ( $user [ 'level' ] < $param [ 'min_level' ]) {
err ( " <b>Вы не можете попасть в эту комнату. Уровень маловат...</b> " );
$error = 1 ;
}
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( isset ( $param [ 'max_level' ])) {
if ( $user [ 'level' ] > $param [ 'max_level' ]) {
err ( " <b>Вы не можете попасть в эту комнату. Уровень высоковат...</b> " );
$error = 1 ;
}
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( isset ( $param [ 'align_int' ])) {
if (( int ) $user [ 'align' ] != $param [ 'align_int' ]) {
err ( " <b>Вы не можете попасть в эту комнату. Склонность не та...</b> " );
$error = 1 ;
}
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( isset ( $param [ 'align' ])) {
if ( $user [ 'align' ] != $param [ 'align' ]) {
err ( " <b>Вы не можете попасть в эту комнату. Склонность не та...</b> " );
$error = 1 ;
}
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( isset ( $param [ 'paladin' ])) {
if ( $user [ 'align' ] <= 1 || $user [ 'align' ] >= 2 ) {
err ( " <b>Вы не можете попасть в эту комнату. Склонность не та...</b> " );
$error = 1 ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
}
if ( $error == 0 OR $user [ 'admin' ] == 1 ) {
2018-03-23 21:09:30 +00:00
db :: c () -> query ( 'UPDATE `users`, `online` SET `users`.`room` = ?i, `online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i' , $room , $room , $user [ 'id' ]);
2018-03-02 14:33:58 +00:00
header ( 'Location: main.php' );
}
2018-01-28 16:40:49 +00:00
}
2018-03-23 21:09:30 +00:00
if ( isset ( $_GET [ 'got' ])) gone_rooms ( $_GET [ 'room' ]);
2018-01-28 16:40:49 +00:00
2018-03-30 20:21:35 +00:00
if ( input :: post ( 'setshadow' )) {
2018-03-02 14:33:58 +00:00
?>
2018-03-30 20:21:35 +00:00
< html >
< head >
2018-03-02 15:31:43 +00:00
< link rel = stylesheet href = " css/main.css " >
< meta charset = " utf-8 " >
2018-03-30 20:21:35 +00:00
</ head >
2018-03-02 15:31:43 +00:00
< body >
2018-03-02 14:33:58 +00:00
< table width = 100 %>
< tr >
2018-03-02 15:31:43 +00:00
< td >< h3 > Выбрать образ персонажа </ h3 ></ td >
2018-03-02 14:33:58 +00:00
< td align = right >< INPUT TYPE = button value = " Вернуться "
onClick = " location.href='main.php?edit=0.467837356797105'; " ></ td >
</ tr >
< tr >
< td align = center style = " color:red; " > Внимание ! Образ персонажа выбирается только один раз .</ td >
</ tr >
</ table >
2018-03-30 20:21:35 +00:00
< table style = " padding:5px; margin:auto; " >
< caption >< b > Общие образы </ b ></ caption >
< tr >
< td >< a href = " ?edit=1&obraz=m1 " >< img src = " i/shadow/m1.gif " ></ a ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m2 " >< img src = " i/shadow/m2.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m3 " >< img src = " i/shadow/m3.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m4 " >< img src = " i/shadow/m4.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m5 " >< img src = " i/shadow/m5.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m6 " >< img src = " i/shadow/m6.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m7 " >< img src = " i/shadow/m7.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m8 " >< img src = " i/shadow/m8.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m9 " >< img src = " i/shadow/m9.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=m10 " >< img src = " i/shadow/m10.gif " ></ a ></ td >
</ tr >
< tr >
< td >< a href = " ?edit=1&obraz=f1 " >< img src = " i/shadow/f1.gif " ></ a ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f2 " >< img src = " i/shadow/f2.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f3 " >< img src = " i/shadow/f3.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f4 " >< img src = " i/shadow/f4.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f5 " >< img src = " i/shadow/f5.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f6 " >< img src = " i/shadow/f6.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f7 " >< img src = " i/shadow/f7.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f8 " >< img src = " i/shadow/f8.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f9 " >< img src = " i/shadow/f9.gif " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=f10 " >< img src = " i/shadow/f10.gif " ></ a ></ td >
</ tr >
</ table >
2018-03-02 14:33:58 +00:00
</ body >
</ html >
< ? php
die ();
}
//
2018-03-30 20:21:35 +00:00
if ( input :: post ( 'setshadowclan' )) {
2018-03-02 14:33:58 +00:00
?>
< HTML >
< HEAD >
2018-03-02 15:31:43 +00:00
< link rel = stylesheet href = " css/main.css " >
< meta charset = " utf-8 " >
2018-03-02 14:33:58 +00:00
</ HEAD >
2018-03-02 15:31:43 +00:00
< body >
2018-03-02 14:33:58 +00:00
< table width = 100 %>
< tr >
2018-03-02 15:31:43 +00:00
< td >< h3 > Выбрать образ персонажа </ h3 ></ td >
2018-03-02 14:33:58 +00:00
< td align = right >< INPUT TYPE = button value = " Вернуться "
onClick = " location.href='main.php?edit=0.467837356797105'; " ></ td >
</ tr >
</ table >
2018-03-30 20:21:35 +00:00
< TABLE style = " padding:5px; margin: auto; " >
< caption >< b > Клановые образы </ b ></ caption >
< tr >
< td >< a href = " ?edit=1&obraz=40 " >< img src = " i/shadow/<?= $shadow['mshadow'] ?> " ></ a ></ td >
< td >< a href = " ?edit=1&obraz=41 " >< img src = " i/shadow/<?= $shadow['wshadow'] ?> " ></ a ></ td >
</ tr >
2018-03-02 14:33:58 +00:00
</ TABLE >
</ body >
</ html >
< ? php
die ();
}
2018-03-30 22:43:30 +00:00
if ( input :: get ( 'setch' )) {
2018-03-23 20:52:57 +00:00
$online = db :: c () -> query ( 'SELECT * FROM `online` WHERE `real_time` >= ?i' , ( time () - 60 ));
while ( $v = $online -> fetch_assoc ()) {
2018-03-02 14:33:58 +00:00
$or [ $v [ 'room' ]] ++ ;
}
?>
2018-03-02 15:31:43 +00:00
2018-03-02 14:33:58 +00:00
< html >
< head >
2018-03-02 15:31:43 +00:00
< link rel = " stylesheet " href = " css/main.css " />
< meta charset = " utf-8 " >
2018-03-02 14:33:58 +00:00
< script >
function inforoom ( room ) {
window . open ( 'ch.php?online=1&room=' + room + '&rms=1' , 'help' , 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes' );
}
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
top . changeroom = < ? = $user [ 'room' ] ?> ;
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
var perm = getCurrentPermission ();
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
if ( perm == 'true' ) {
new Notification ( 'Thenks' );
} else {
Notification . requestPermission ( 'Сайт запрашивает доступ к уведомлениям.' );
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
function getCurrentPermission () {
if ( Notification . permission ) {
return 'true' ;
} else {
return 'false' ;
}
}
2018-03-02 15:31:43 +00:00
</ script >
2018-03-02 14:33:58 +00:00
</ head >
2018-03-30 20:21:35 +00:00
< body id = " body " onload = " <?= topsethp() ?> " >
2018-03-02 14:33:58 +00:00
< div id = " page-wrapper " class = " map-wrapper " >
< div class = " btn-control " >
< div class = " left-text " >
2018-03-30 20:21:35 +00:00
< div class = " nickname-wrapper " >< ? = nick :: id ( $user [ 'id' ]) -> full () ?> </div>
2018-03-02 14:33:58 +00:00
< div class = " text-title " > Карта миров </ div >
2018-03-30 20:21:35 +00:00
< div class = " hint-text " > ( Сейчас в игре : < strong >< ? = $online -> getNumRows () ?> </strong> чел.)</div>
2018-03-02 14:33:58 +00:00
</ div >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
< div class = " button-mid btn " name = " setch " title = " Обновить "
onClick = " location.href='main.php?setch=1&tmp=8455'; " > Обновить
</ div >
< div class = " button-mid btn " name = " combats " title = " Поединки " onClick = " location.href='zayavka.php'; " >< strong > Поединки </ strong >
</ div >
< div class = " button-mid btn " name = " invent " title = " Настройки / инвентарь "
onClick = " location.href='main.php?edit=1'; " > Инвентарь
</ div >
< div class = " button-mid btn " name = " effects " onclick = " location.href='module_quest.php'; " value = " Состояние "
title = " Состояние " > Состояние
</ div >
< div class = " button-dark-mid btn " name = " helps "
onClick = " window.open('help/combats.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes') "
title = " Подсказка " > Подсказка
</ div >
< div class = " button-mid btn " name = " backpage " onClick = " location.href='main.php'; " title = " Вернуться " >
Вернуться
</ div >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
</ div >
< div class = " btn-control " >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
< ? if ( $user [ 'room' ] == 20 ) { ?> <img src="i/flag_position.png" border="0"/><? } ?>
< div class = " button-big btn " name = " backpage " onClick = " location.href='main.php?goto=plo'; "
title = " Выйти на Центральную площадь " > Выйти на Центральную площадь
</ div >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
< div class = " hr_n " ></ div >
< table align = " center " class = " table-list map " cellspacing = " 0 " cellpadding = " 0 " >
< tbody >
< tr >
< td >
< div class = " map-block " >
< div class = " map-block-logo novi4ki " ></ div >
< div class = " map-block-mid novi4ki " >
< div class = " map-block-head " > Комната для новичков 1
< div class = " head-level " > ( Уровень 0 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=1'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 1 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(1, event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 1 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right novi4ki " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo novi4ki " ></ div >
< div class = " map-block-mid novi4ki " >
< div class = " map-block-head " > Комната для новичков 2
< div class = " head-level " > ( Уровень 0 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=2'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 2 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(2, event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 2 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right novi4ki " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo novi4ki " ></ div >
< div class = " map-block-mid novi4ki " >
< div class = " map-block-head " > Комната для новичков 3
< div class = " head-level " > ( Уровень 0 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=3'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 3 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(3,event); " >< img src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 3 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right novi4ki " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo novi4ki " ></ div >
< div class = " map-block-mid novi4ki " >
< div class = " map-block-head " >
Комната для новичков 4
< div class = " head-level " > ( Уровень 0 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=4'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 4 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(4,event); " >< img src = " i/i_2.jpg " ></ a >
< ? if ( $user [ 'room' ] == 4 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right novi4ki " ></ div >
</ div >
</ td >
</ tr >
< tr >
< td >
< div class = " map-block " >
< div class = " map-block-logo voinov " ></ div >
< div class = " map-block-mid voinov " >
< div class = " map-block-head " >
Зал воинов 1
< div class = " head-level " > ( Уровень 1 - 3 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=5'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 5 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(5,event); " >< img src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 5 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right voinov " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo voinov " ></ div >
< div class = " map-block-mid voinov " >
< div class = " map-block-head " >
Зал воинов 2
< div class = " head-level " > ( Уровень 1 - 3 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=6'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 6 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(6,event); " >< img src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 6 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right voinov " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo voinov " ></ div >
< div class = " map-block-mid voinov " >
< div class = " map-block-head " >
Зал воинов 3
< div class = " head-level " > ( Уровень 1 - 3 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=7'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 7 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(7,event); " >< img src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 7 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right voinov " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo torgovij " ></ div >
< div class = " map-block-mid torgovij " >
< div class = " map-block-head " >
Торговый зал
< div class = " head-level " > ( Уровень 4 - 21 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=8'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 8 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(8,event); " >< img src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 8 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right torgovij " ></ div >
</ div >
</ td >
</ tr >
< tr >
< td >
< div class = " map-block " >
< div class = " map-block-logo rycarskij " ></ div >
< div class = " map-block-mid rycarskij " >
< div class = " map-block-head " >
Рыцарский зал
< div class = " head-level " > ( Уровень 4 - 6 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=8'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 9 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(9,event); " >< img src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 9 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right rycarskij " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo bashnja " ></ div >
< div class = " map-block-mid bashnja " >
< div class = " map-block-head " >
Башня рыцарей - магов
< div class = " head-level " > ( Уровень 7 - 9 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=10'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 10 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(10,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 10 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right bashnja " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo koldovskoj " ></ div >
< div class = " map-block-mid koldovskoj " >
< div class = " map-block-head " >
Колдовской мир
< div class = " head-level " > ( Уровень 10 - 12 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=11'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 11 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(11,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 11 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right koldovskoj " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo eduhov " ></ div >
< div class = " map-block-mid eduhov " >
< div class = " map-block-head " >
Этаж духов
< div class = " head-level " > ( Уровень 13 - 15 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=12'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 12 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(12,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 12 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right eduhov " ></ div >
</ div >
</ td >
</ tr >
< tr >
< td >
< div class = " map-block " >
< div class = " map-block-logo astral " ></ div >
< div class = " map-block-mid astral " >
< div class = " map-block-head " >
Астральные этажи
< div class = " head-level " > ( Уровень 16 - 19 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=12'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 13 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(13,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 13 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right astral " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo fire " ></ div >
< div class = " map-block-mid fire " >
< div class = " map-block-head " >
Огненный мир
< div class = " head-level " > ( Уровень 19 - 21 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=14'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 14 ]; ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(14,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 14 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right fire " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo paladinov " ></ div >
< div class = " map-block-mid paladinov " >
< div class = " map-block-head " >
Зал Паладинов
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=15'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 15 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(15,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 15 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right paladinov " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo sovet " ></ div >
< div class = " map-block-mid sovet " >
< div class = " map-block-head " >
Совет Белого Братства
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=16'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 16 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(16,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 16 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right sovet " ></ div >
</ div >
</ td >
</ tr >
< tr >
< td >
< div class = " map-block " >
< div class = " map-block-logo tma " ></ div >
< div class = " map-block-mid tma " >
< div class = " map-block-head " >
Зал Тьмы
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=17'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 17 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(17,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 17 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right tma " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo netral " ></ div >
< div class = " map-block-mid netral " >
< div class = " map-block-head " >
Зал Стихий
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=36'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 36 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(36,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 36 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right netral " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo svet " ></ div >
< div class = " map-block-mid svet " >
< div class = " map-block-head " >
Зал Света
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=54'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 54 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(54,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 54 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right svet " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo buduar " ></ div >
< div class = " map-block-mid buduar " >
< div class = " map-block-head " >
Будуар
< div class = " head-level " > ( Уровень 1 - 21 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=19'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 19 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(19,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 19 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right buduar " ></ div >
</ div >
</ td >
</ tr >
< tr >
< td >
< div class = " map-block " >
< div class = " map-block-logo tma2 " ></ div >
< div class = " map-block-mid tma2 " >
< div class = " map-block-head " >
Царство Тьмы
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=18'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 18 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(18,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 18 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right tma2 " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo netral2 " ></ div >
< div class = " map-block-mid netral2 " >
< div class = " map-block-head " >
Царство Стихий
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=56'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 56 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(56,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 56 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right netral2 " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo svet2 " ></ div >
< div class = " map-block-mid svet2 " >
< div class = " map-block-head " >
Царство Света
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=55'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( < ? = ( int ) $or [ 55 ] ?> )</div>
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(55,event); " >< img
src = " i/i_2.jpg " /></ a >
< ? if ( $user [ 'room' ] == 55 ) { ?> <img src="i/flag_position.png"
border = " 0 " />< ? } ?>
</ div >
</ div >
</ div >
< div class = " map-block-right svet2 " ></ div >
</ div >
</ td >
< td >
< div class = " map-block " >
< div class = " map-block-logo clanwars " ></ div >
< div class = " map-block-mid clanwars " >
< div class = " map-block-head " >
Зал Клановых Войн
< div class = " head-level " > ( Уровень 4 - 21 ) </ div >
</ div >
< div class = " map-block-bottom " >
< div class = " button-mid btn " name = " setch " title = " Войти в комнату "
onclick = " location.href='main.php?setch=1&got=1&room=57'; " > Войти
</ div >
< div class = " room-amount " >& nbsp ;( 0 ) </ div >
< div class = " room-info " >
< a href = " javascript:void(0) " onclick = " inforoom(57, event); " >< img
src = " i/i_2.jpg " /></ a >
</ div >
</ div >
</ div >
< div class = " map-block-right clanwars " ></ div >
</ div >
</ td >
</ tr >
</ tbody >
</ table >
< div class = " hr_n " ></ div >
</ body >
</ html >
< ? php
die ();
}
header ( " Cache-Control: no-cache " );
2018-03-23 21:47:46 +00:00
if ( isset ( $_GET [ 'edit' ])) {
2018-01-28 16:40:49 +00:00
2018-03-23 20:36:35 +00:00
function ups ( $type , $stat , $statName )
{
global $user ;
if ( $user [ $type ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ $type ] >= ( int ) $_POST [ 'stat' ] && ( int ) $_POST [ 'stat' ] > 0 ) {
$user [ $stat ] += ( int ) $_POST [ 'stat' ];
$user [ $type ] -= ( int ) $_POST [ 'stat' ];
db :: c () -> query ( 'UPDATE `users` SET ?f = ?i, ?f = ?i WHERE `id` = ?i' , $stat , $user [ $stat ], $type , $user [ $type ], $user [ 'id' ]);
2018-03-30 20:21:35 +00:00
err ( 'Параметр ' . $statName . ' увеличен на ' . ( int ) $_POST [ 'stat' ] . ' ед.' );
2018-03-23 20:36:35 +00:00
} else err ( 'Ошибка в количестве.' );
}
}
2018-03-02 14:33:58 +00:00
if ( $_GET [ 'ups' ]) {
switch ( $_GET [ 'ups' ]) {
case 11 :
2018-03-30 20:21:35 +00:00
ups ( 'stats' , 'sila' , 'Сила' );
2018-03-23 20:36:35 +00:00
// if ($user['stats'] > 0 && $user['sid'] == $_GET['s4i']) {
// if ($user['stats'] >= (int)$_POST['stat'] && ((int)$_POST['stat'] > 0)) {
// $user['sila'] += (int)$_POST['stat'];
// $user['stats'] -= (int)$_POST['stat'];
// mysql_query("UPDATE `users` SET `sila` = '" . $user['sila'] . "', `stats` = '" . $user['stats'] . "' WHERE `id` = '{$user['id']}' LIMIT 1");
// echo "<b style=\"color: Red;\">Параметр Сила увеличен на " . (int)$_POST['stat'] . " ед.</b>";
// } elseif ((int)$_POST['stat'] <= 0) {
// echo "<b style=\"color: Red;\">Н е верное количество</b>";
// } else {
// echo "<b style=\"color: Red;\">Недостаточно статов</b>";
// }
// }
2018-03-02 14:33:58 +00:00
break ;
case 12 :
2018-03-30 20:21:35 +00:00
ups ( 'stats' , 'lovk' , 'Ловкость' );
2018-03-23 20:36:35 +00:00
// if ($user['stats'] > 0 && $user['sid'] == $_GET['s4i']) {
// if ($user['stats'] >= (int)$_POST['stat'] && ((int)$_POST['stat'] > 0)) {
// $user['lovk'] += (int)$_POST['stat'];
// $user['stats'] -= (int)$_POST['stat'];
// mysql_query("UPDATE `users` SET `lovk` = '" . $user['lovk'] . "', `stats` = '" . $user['stats'] . "' WHERE `id` = '{$user['id']}' LIMIT 1");
// echo "<b style=\"color: Red;\">Параметр Ловкость увеличен на " . (int)$_POST['stat'] . " ед.</b>";
// } elseif ((int)$_POST['stat'] <= 0) {
// echo "<b style=\"color: Red;\">Н е верное количество</b>";
// } else {
// echo "<b style=\"color: Red;\">Недостаточно статов</b>";
// }
// }
2018-03-02 14:33:58 +00:00
break ;
case 13 :
if ( $user [ 'stats' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'stats' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'inta' ] += ( int ) $_POST [ 'stat' ];
$user [ 'stats' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `inta` = ' " . $user [ 'inta' ] . " ', `stats` = ' " . $user [ 'stats' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Интуиция увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно статов</b> " ;
}
}
break ;
case 14 :
if ( $user [ 'stats' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'stats' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'vinos' ] += ( int ) $_POST [ 'stat' ];
$user [ 'stats' ] -= ( int ) $_POST [ 'stat' ];
$user [ 'maxhp' ] += ( int )( $_POST [ 'stat' ] * 6 );
mysql_query ( " UPDATE `users` SET `vinos` = ' " . $user [ 'vinos' ] . " ', `stats` = ' " . $user [ 'stats' ] . " ', `maxhp` = ' " . $user [ 'maxhp' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Выносливость увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно статов</b> " ;
}
}
break ;
case 15 :
if ( $user [ 'stats' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'stats' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'intel' ] += ( int ) $_POST [ 'stat' ];
$user [ 'stats' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `intel` = ' " . $user [ 'intel' ] . " ', `stats` = ' " . $user [ 'stats' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Интеллект увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно статов</b> " ;
}
}
break ;
case 21 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && $user [ 'noj' ] < 10 && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'noj' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `noj` = ' " . $user [ 'noj' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Кастетами увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif ( $user [ 'noj' ] > 9 ) {
echo " <b style= \" color: Red; \" >Достигнут лимит владения</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 22 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && $user [ 'mec' ] < 10 && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mec' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mec` = ' " . $user [ 'mec' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Мечами увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif ( $user [ 'mec' ] > 9 ) {
echo " <b style= \" color: Red; \" >Достигнут лимит владения</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 23 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && $user [ 'dubina' ] < 10 && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'dubina' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `dubina` = ' " . $user [ 'dubina' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Дубинами увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif ( $user [ 'dubina' ] > 9 ) {
echo " <b style= \" color: Red; \" >Достигнут лимит владения</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 24 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && $user [ 'topor' ] < 10 && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'topor' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `topor` = ' " . $user [ 'topor' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение топорами увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif ( $user [ 'topor' ] > 9 ) {
echo " <b style= \" color: Red; \" >Достигнут лимит владения</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 25 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mfire' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mfire` = ' " . $user [ 'mfire' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Магией Огня увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 26 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mwater' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mwater` = ' " . $user [ 'mwater' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Магией Воды увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 27 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mair' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mair` = ' " . $user [ 'mair' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Магией Воздуха увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 28 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mearth' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mearth` = ' " . $user [ 'mearth' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Магией Земли увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 29 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mlight' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mlight` = ' " . $user [ 'mlight' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Магией Света увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 210 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mgray' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mgray` = ' " . $user [ 'mgray' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Серой Магией увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
case 211 :
if ( $user [ 'master' ] > 0 && $user [ 'sid' ] == $_GET [ 's4i' ]) {
if ( $user [ 'master' ] >= ( int ) $_POST [ 'stat' ] && (( int ) $_POST [ 'stat' ] > 0 )) {
$user [ 'mdark' ] += ( int ) $_POST [ 'stat' ];
$user [ 'master' ] -= ( int ) $_POST [ 'stat' ];
mysql_query ( " UPDATE `users` SET `mdark` = ' " . $user [ 'mdark' ] . " ', `master` = ' " . $user [ 'master' ] . " ' WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " );
echo " <b style= \" color: Red; \" >Параметр Владение Магией Тьмы увеличен на " . ( int ) $_POST [ 'stat' ] . " ед.</b> " ;
} elseif (( int ) $_POST [ 'stat' ] <= 0 ) {
echo " <b style= \" color: Red; \" >Н е верное количество</b> " ;
} else {
echo " <b style= \" color: Red; \" >Недостаточно мастерства</b> " ;
}
}
break ;
}
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( @ $_GET [ 'drop' ]) {
dropitem ( $_GET [ 'drop' ]);
updstats ();
}
2018-01-28 16:40:49 +00:00
2018-03-23 20:36:35 +00:00
if ( $_GET [ 'dress' ]) {
2018-03-02 14:33:58 +00:00
$rec = mysql_fetch_array ( mysql_query ( 'SELECT `id`, `koll` FROM `inventory` WHERE `id` = "' . ( int ) $_GET [ 'dress' ] . '" AND `owner` = "' . $user [ 'id' ] . '" LIMIT 1' ));
if ( isset ( $rec [ 'id' ])) {
if ( $rec [ 'koll' ] > 1 ) {
$id = unstack ( $rec [ 'id' ], 1 );
dressitem ( $id );
} else {
dressitem ( $_GET [ 'dress' ]);
}
updstats ();
} else {
echo 'Предмет не найден ...' ;
}
}
2018-01-28 16:40:49 +00:00
2018-03-23 20:36:35 +00:00
if ( $_GET [ 'destruct' ]) {
2018-03-02 14:33:58 +00:00
$dress = mysql_fetch_array ( mysql_query ( " SELECT `id`, `dressed`, `name`, `duration`, `maxdur` FROM `inventory` WHERE `owner` = ' { $user [ 'id' ] } ' AND `id` = ' { $_GET [ 'destruct' ] } ' LIMIT 1 " ));
if ( isset ( $dress [ 'id' ])) {
if ( $dress [ 'dressed' ] == 0 ) {
destructitem ( $dress [ 'id' ]);
mysql_query ( " INSERT INTO `delo` (`id` , `author` ,`pers`, `text`, `type`, `date`) VALUES ('','0',' { $_SESSION [ 'uid' ] } ',' \" " . $user [ 'login' ] . " \" выбросил предмет \" " . $dress [ 'name' ] . " \" id:(cap " . $dress [ 'id' ] . " ) [ " . $dress [ 'duration' ] . " / " . $dress [ 'maxdur' ] . " ] ',1,' " . time () . " '); " );
echo " <div align=right><font color=red><b>Предмет \" " . $dress [ 'name' ] . " \" выброшен.</b></font></div> " ;
} else {
echo " <div align=right><font color=red><b>Сначала снимите предмет...</b></font></div> " ;
}
} else {
echo " <div align=right><font color=red><b>Предмет не найден...</b></font></div> " ;
}
}
2018-01-28 16:40:49 +00:00
2018-03-23 20:36:35 +00:00
if ( $_GET [ 'use' ]) {
2018-03-02 14:33:58 +00:00
$rec = mysql_fetch_array ( mysql_query ( 'SELECT `id`, `koll` FROM `inventory` WHERE `id` = "' . ( int ) $_GET [ 'use' ] . '" AND `owner` = "' . $user [ 'id' ] . '" LIMIT 1' ));
if ( isset ( $rec [ 'id' ])) {
if ( $rec [ 'koll' ] > 1 ) {
$id = unstack ( $rec [ 'id' ], 1 );
usemagic ( $id , $_POST [ 'target' ]);
} else {
usemagic ( $_GET [ 'use' ], $_POST [ 'target' ]);
}
} else {
echo 'Предмет не найден ...' ;
}
}
2018-01-28 16:40:49 +00:00
2018-03-23 20:36:35 +00:00
if ( $_GET [ 'undress' ]) {
2018-03-02 14:33:58 +00:00
undressall ( $user [ 'id' ]);
updstats ();
}
2018-03-23 20:36:35 +00:00
if ( $_GET [ 'delcomplect' ]) {
2018-03-02 14:33:58 +00:00
mysql_query ( " DELETE FROM `komplekt` WHERE `name` = ' " . $_GET [ 'delcomplect' ] . " ' AND `owner` = ' " . $user [ 'id' ] . " '; " );
}
2018-03-23 20:36:35 +00:00
if ( $_GET [ 'complect' ]) {
2018-03-02 14:33:58 +00:00
$hp = $user [ 'hp' ];
undressall ( $user [ 'id' ]);
$_GET [ 'complect' ] = mysql_real_escape_string ( $_GET [ 'complect' ]);
$u_kompl = mysql_fetch_array ( mysql_query ( " SELECT * FROM komplekt where `name` = ' { $_GET [ 'complect' ] } ' AND `owner` = { $user [ 'id' ] } LIMIT 1 " ));
$k_items = array ();
$k_items = explode ( ';' , $u_kompl [ 'items' ]);
foreach ( $k_items as $k_i )
dressitem ( $k_i );
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
mysql_query ( " UPDATE `users` SET `hp` = ' " . $hp . " ' WHERE `id` = ' " . $user [ 'id' ] . " ' LIMIT 1 " );
mysql_query ( " UPDATE `users` SET `hp` = `maxhp` WHERE `hp` > `maxhp` AND `id` = ' " . $user [ 'id' ] . " ' LIMIT 1 " );
$user = mysql_fetch_array ( mysql_query ( " SELECT * FROM `users` WHERE `id` = ' { $user [ 'id' ] } ' LIMIT 1 " ));
}
ref_drop ( $user [ 'id' ]);
2018-01-28 16:40:49 +00:00
2018-03-23 20:36:35 +00:00
if ( $_GET [ 'savecomplect' ]) {
2018-03-02 14:33:58 +00:00
$_GET [ 'savecomplect' ] = trim ( $_GET [ 'savecomplect' ]);
if ( preg_match ( '/[\/\:*?"<>|+%]/' , $_GET [ 'savecomplect' ])) {
echo " <b style= \" color: Red; \" >Вы используете запрещенные символы ...</b> " ;
} else {
$name = mysql_real_escape_string ( $_GET [ 'savecomplect' ]);
$u_all_kompl = mysql_fetch_array ( mysql_query ( " SELECT `id` FROM `komplekt` WHERE `name` = ' { $name } ' AND `owner` = ' { $user [ 'id' ] } ' LIMIT 1 " ));
if ( isset ( $u_all_kompl [ 'id' ])) {
echo " <b style= \" color: Red; \" >Такое название комплекта уже используется ..</b> " ;
} else {
$items = array ();
$odetShmot = mysql_query ( " SELECT `id` FROM `inventory` WHERE `id` = ' " . $user [ 'sergi' ] . " ' OR `id` = ' " . $user [ 'kulon' ] . " ' OR `id` = ' " . $user [ 'perchi' ] . " ' OR `id` = ' " . $user [ 'weap' ] . " ' OR `id` = ' " . $user [ 'bron' ] . " ' OR `id` = ' " . $user [ 'rybax' ] . " ' OR `id` = ' " . $user [ 'r1' ] . " ' OR `id` = ' " . $user [ 'r2' ] . " ' OR `id` = ' " . $user [ 'r3' ] . " ' OR `id` = ' " . $user [ 'helm' ] . " ' OR `id` = ' " . $user [ 'shit' ] . " ' OR `id` = ' " . $user [ 'm1' ] . " ' OR `id` = ' " . $user [ 'm2' ] . " ' OR `id` = ' " . $user [ 'm3' ] . " ' OR `id` = ' " . $user [ 'm4' ] . " ' OR `id` = ' " . $user [ 'm5' ] . " ' OR `id` = ' " . $user [ 'm6' ] . " ' OR `id` = ' " . $user [ 'm7' ] . " ' OR `id` = ' " . $user [ 'm8' ] . " ' OR `id` = ' " . $user [ 'm9' ] . " ' OR `id` = ' " . $user [ 'm10' ] . " ' OR `id` = ' " . $user [ 'boots' ] . " ' OR `id` = ' " . $user [ 'plaw' ] . " ' OR `id` = ' " . $user [ 'rune_1' ] . " ' OR `id` = ' " . $user [ 'rune_2' ] . " ' OR `id` = ' " . $user [ 'rune_3' ] . " ' " );
while ( $res = mysql_fetch_array ( $odetShmot )) {
$items [] = $res [ 'id' ];
}
$t_items = implode ( " ; " , $items );
mysql_query ( " INSERT INTO `komplekt` (`name`, `owner`, `items`) VALUES (' { $name } ', ' { $user [ 'id' ] } ', ' { $t_items } ') " );
echo " <b style= \" color: Red; \" >Комплект { $name } сохранён ...</b> " ;
}
}
}
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
if ( ! in_array ( $_GET [ 'mZeAjax' ], array ( 'mZeInventory' , 'mZeFilter' ))) :
?>
< HTML >
< HEAD >
< meta charset = " utf-8 " >
< link rel = " stylesheet " href = " css/main.css " >
2018-03-30 20:21:35 +00:00
< link rel = " stylesheet " href = " css/newstyle18.css "
" >
2018-03-02 14:33:58 +00:00
< link rel = " stylesheet " href = " css/tooltip.css " />
< link rel = " stylesheet " href = " css/bkstyle.css?101 " />
< link rel = " stylesheet " href = " css/mi.css " />
< script src = " js/jquery.plugins.js " ></ script >
< script src = " js/jquery-1.7.2.min.js " ></ script >
< script src = " js/jquery.simplemodal.js " ></ script >
< script src = " js/jquery.ui.js?100 " ></ script >
< script src = " js/mi.js " ></ script >
< script src = " js/tooltip.js " ></ script >
< script type = " text/javascript " src = " js/funcs.js " ></ script >
< script >
$ ( function () {
$ ( " .tooltip " ) . tipTip ({ maxWidth : " auto " , edgeOffset : 0 , fadeIn : 300 , fadeOut : 500 });
});
function saveComplect () {
new miDialog ({ title : 'Сохранить комплект' }, { edit : 1 }, function () {
document . location = '/main.php?' + $ . param ( this . data );
},
$ ( '<div>Название комплекта :<br /><div style="font-size: smaller;"><b>может содеражать только буквы (англ / р у с с ) и цифры.</b></div></div>' ) . append ( miDialog . _oneInput ({ name : 'savecomplect' })), { width : 250 });
}
var Hint3Name = '' ;
function okno ( title , script , name , coma , errk ) {
var errkom = '' ;
var com = '' ;
if ( errk == 1 ) {
errkom = 'Нельзя использовать символы: /\:*?"<>|+%<br>' ;
com = coma
}
if ( errk == 2 ) {
errkom = 'Такой комплект уже существует<br>' ;
com = coma
}
document . all ( " hint3 " ) . innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>' +
'<form action="' + script + '" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><INPUT TYPE=hidden name=sd4 value="6"><td colspan=2><font color=red>' +
errkom + '</font>введите название предмета</TD></TR><TR><TD width=50% align=right><INPUT TYPE=text NAME="' + name + '" value="' + com + '"></TD><TD width=50%><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>' ;
document . all ( " hint3 " ) . style . visibility = " visible " ;
document . all ( " hint3 " ) . style . left = 100 ;
document . all ( " hint3 " ) . style . top = 100 ;
document . all ( name ) . focus ();
Hint3Name = name ;
}
var delay = 30 , TimerOn = - 1 , tkHP , maxHP , speed = 750 , stLen = 185 , redHP = 0.33 , yellowHP = 0.66 ;
function setHPlocal () {
tkHP > maxHP && ( tkHP = maxHP );
var a = Math . round ( tkHP ) + " / " + maxHP , a = stLen - ( a . length + 2 ) * 7 ,
b = Math . round (( a - 1 ) / maxHP * tkHP );
a -= b ;
HP = document . getElementById ( " hp_value " );
HP1 = document . getElementById ( " HP1 " );
HP2 = document . getElementById ( " HP2 " );
if ( HP ) {
HP1 . width = b , HP2 . width = a , HP1 . src = tkHP / maxHP < redHP ? " i/1red.gif " : tkHP / maxHP < yellowHP ? " i/1yellow.gif " : " i/1green.gif " , HP . innerHTML = Math . round ( tkHP ) + " / " + maxHP ;
}
tkHP += maxHP / 53 / 230 * ( speed / 100 );
TimerOn = tkHP < maxHP ? setTimeout ( " setHPlocal() " , delay * 100 ) : - 1
}
< ? echo topsethp (); ?>
var groupItems = < ? php echo ( $_SESSION [ 'stackall' ] ? 'true' : 'false' ); ?> ;
$ ( document ) . ready ( function () {
$ ( 'a' ) . live ( 'click' , function () {
if ( $ ( this ) . attr ( 'ajax' ) != undefined ) {
var ajaxModule = $ ( this ) . attr ( 'ajax' );
switch ( ajaxModule ) {
case 'mZeInventory' :
$ ( '#mZeInventory' ) . html ( '<div align="center" style="padding:10px;background-color:#d4d2d2;color:grey;"><b>Загрузка...</b></div>' );
$ . ajax ({
url : $ ( this ) . attr ( 'href' ) + '&mZeAjax=' + ajaxModule ,
cache : false ,
dataType : 'html' ,
success : function ( html ) {
$ ( '#mZeInventory' ) . html ( html );
}
});
break ;
case 'mZeFilter' :
if ( groupItems == true ) {
$ ( this ) . html ( 'Группировать предметы' );
groupItems = false ;
} else {
$ ( this ) . html ( 'Разгруппировать предметы' );
groupItems = true ;
}
$ ( '#mZeInventory' ) . html ( '<div align="center" style="padding:10px;background-color:#d4d2d2;color:grey;"><b>Загрузка...</b></div>' );
$ . ajax ({
url : $ ( this ) . attr ( 'href' ) + '&mZeAjax=' + ajaxModule ,
cache : false ,
dataType : 'html' ,
success : function ( html ) {
$ ( '#mZeInventory' ) . html ( html );
}
});
break ;
}
return false ;
}
});
});
</ script >
</ HEAD >
< body >
< div id = hint3 class = ahint ></ div >
< div id = " hint4 " style = " position: absolute; " ></ div >
< div id = " chpassbank " style = " display:none; position:absolute; top:50px; left:250px; " ></ div >
< FORM METHOD = POST ACTION = " main.php?edit=1 " >
< table border = 0 width = 100 % cellspacing = " 0 " cellpadding = " 0 " >
< TR >
< td valign = top align = left width = 250 >< ? showpersinv ( $user [ 'id' ]) ?>
< center >
< a href = 'main.php?edit=1&undress=all' > Снять все </ a >< BR >
< a href = " javascript: void(0); " onclick = " saveComplect(); return false; " > Запомнить комплект </ a >< br />
< ? php if ( $_SESSION [ 'stackall' ]) : ?>
< a href = " /main.php?edit=1&stackall=false " ajax = " mZeFilter " > Разгруппировать предметы </ a >< br />< br />
< ? php else : ?>
< a href = " /main.php?edit=1&stackall=true " ajax = " mZeFilter " > Группировать предметы </ a >< br />< br />
< ? php endif ; ?>
</ center >
< BR >
< table >
< tr >
< td >& nbsp ; </ td >
< td >
< ?
//Выгребаем все комплекты перса
2018-03-30 20:21:35 +00:00
$u_all_kompl = db :: c () -> query ( " SELECT `name` FROM komplekt WHERE `owner` = ?i " , $user [ 'id' ]);
2018-03-30 18:40:55 +00:00
while ( $u_k = $u_all_kompl -> fetch_assoc ()) {
2018-03-02 14:33:58 +00:00
$k_name = $u_k [ 'name' ];
echo " <a onclick= \" if (!confirm('Вы уверены, что хотите удалить комплект?')) { return false; } \" href='main.php?edit=1&delcomplect= " . $k_name . " '>
< img src = 'i/clear.gif' ></ a >
< a href = 'main.php?edit=1&complect=" . $k_name . "' > Надеть \ " " . $k_name . " \" </a><BR> " ;
};
?>
</ td >
</ tr >
</ table >
< table >
< tr >
< td >& nbsp ; </ td >
< td >
< div class = " effectList " style = " padding-top: 15px; max-height: 150px; width: 220px; " >
< ? echo show_eff_inf ( $user [ 'id' ], 2 ); ?>
</ div >
</ td >
</ tr >
</ table >
</ td >
< TD valign = top width = 207 >
< table border = 0 width = 242 >
< tr >
< td >
< BR >
Уровень : < b >< ? = $user [ 'level' ] ?> </b><BR>
2018-06-24 01:18:49 +00:00
Опыт : < b >< ? = $user [ 'exp' ] ?> </b> (<?= $user['nextup'] ?>)<BR>
2018-03-02 14:33:58 +00:00
Побед : < b >< ? = $user [ 'win' ] ?> </b><BR>
Поражений : < b >< ? = $user [ 'lose' ] ?> </b><BR>
Ничьих : < b >< ? = $user [ 'nich' ] ?> </b><BR>
</ span >
Деньги : < b >< ? = $user [ 'money' ] ?> </b> кр.<BR>
Репутация : < b >< ? = $user [ 'doblest' ] ?> </b> реп.<br/>
2018-03-09 18:43:30 +00:00
2018-03-02 14:33:58 +00:00
< SCRIPT src = " /js/main_096_ru2.js " ></ SCRIPT >
< ?
2018-03-09 18:43:30 +00:00
if ( $_GET [ 'is_open' ] && ! is_numeric ( $_GET [ 'is_open' ])) {
2018-03-02 14:33:58 +00:00
unset ( $_GET [ 'is_open' ]);
}
2018-03-09 18:43:30 +00:00
if ( $_GET [ 'bar' ] == 'param' ) {
2018-03-02 14:33:58 +00:00
$_SESSION [ 'param' ] = $_GET [ 'is_open' ];
}
2018-03-09 18:43:30 +00:00
if ( $_GET [ 'bar' ] == 'oryj' ) {
2018-03-02 14:33:58 +00:00
$_SESSION [ 'oryj' ] = $_GET [ 'is_open' ];
}
2018-03-09 18:43:30 +00:00
if ( $_GET [ 'bar' ] == 'modif' ) {
2018-03-02 14:33:58 +00:00
$_SESSION [ 'modif' ] = $_GET [ 'is_open' ];
}
2018-03-09 18:43:30 +00:00
if ( $_GET [ 'bar' ] == 'bron' ) {
2018-03-02 14:33:58 +00:00
$_SESSION [ 'bron' ] = $_GET [ 'is_open' ];
}
2018-03-09 18:43:30 +00:00
if ( $_GET [ 'bar' ] == 'bonus' ) {
2018-03-02 14:33:58 +00:00
$_SESSION [ 'bonus' ] = $_GET [ 'is_open' ];
}
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
?>
< HR >
</ tr >
</ td ></ table >
<!-- Параметры -->
< table border = 0 >
< tr >
< td >
< script > DrawBar ( 'Параметры' , 'param' , < ? if ( $_SESSION [ 'param' ] == 1 ) {
echo " 1 " ;
} else {
echo " 6 " ;
} ?> , '', '');</script>
< ?
2018-03-23 20:36:35 +00:00
if ( $_SESSION [ 'param' ] == 1 ) {
2018-03-02 14:33:58 +00:00
?>
<!-- href = '?up=11&edit=1&s4i=".($user[' sid '])."' -->
Сила : < ? = $user [ 'sila' ] ?> <?= ($user['stats']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Силу', '', 1, '', '', '', '?ups=11&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
Ловкость : < ? = $user [ 'lovk' ] ?> <?= ($user['stats']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Ловкость', '', 1, '', '', '', '?ups=12&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
Интуиция : < ? = $user [ 'inta' ] ?> <?= ($user['stats']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Интуицию', '', 1, '', '', '', '?ups=13&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
Выносливость : < ? = $user [ 'vinos' ] ?> <?= ($user['stats']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Выносливость', '', 1, '', '', '', '?ups=14&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
< ?
echo ( $user [ 'level' ] > 3 ) ? " Интеллект: { $user [ 'intel' ] } " : " " ;
echo ( $user [ 'stats' ] && ( $user [ 'level' ] > 3 )) ? " <img src=i/up.gif onclick= \" stats('Увеличить Интеллект', '', 1, '', '', '', '?ups=15&edit=1&s4i= " . ( $user [ 'sid' ]) . " '); \" > " : " " ;
if ( $user [ 'level' ] > 3 ) echo " <BR> " ?>
<!--< ?
echo ( $user [ 'level' ] > 6 ) ? " Мудрость: { $user [ 'mudra' ] } " : " " ;
echo ( $user [ 'stats' ] && ( $user [ 'level' ] > 6 )) ? " <img src=i/up.gif onclick= \" stats('Увеличить Мудрость', '', 1, '', '', '', '?ups=160&edit=1&s4i= " . ( $user [ 'sid' ]) . " '); \" > " : " " ;
if ( $user [ 'level' ] > 6 ) echo " <BR> " ?> -->
< FONT COLOR = " green " > Возможных увеличений : < ? = $user [ 'stats' ] ?> </FONT>
< ?
}
?>
< ?
$mf = countmf ();
?>
< script > DrawBar ( 'Модификаторы' , 'modif' , < ? if ( $_SESSION [ 'modif' ] == 1 ) {
echo " 1 " ;
} else {
echo " 6 " ;
} ?> , '', '');</script>
< ?
2018-03-23 20:36:35 +00:00
if ( $_SESSION [ 'modif' ] == 1 ) {
2018-03-02 14:33:58 +00:00
$item_mf = mysql_fetch_array ( mysql_query ( 'SELECT `id` FROM `inventory` WHERE `owner` = "' . $user [ 'id' ] . '" AND `dressed` = "1" AND `add_proc_mf` > 0' ));
$item_damage = mysql_fetch_array ( mysql_query ( 'SELECT `id` FROM `inventory` WHERE `owner` = "' . $user [ 'id' ] . '" AND `dressed` = "1" AND `add_proc_uron` > 0' ));
$item_bron = mysql_fetch_array ( mysql_query ( 'SELECT `id` FROM `inventory` WHERE `owner` = "' . $user [ 'id' ] . '" AND `dressed` = "1" AND `add_proc_bron` > 0' ));
if ( isset ( $item_mf [ 'id' ])) {
$max_mf = max_mf ();
$add_mf = sum_mf ( $user [ 'id' ]);
if ( $max_mf == 'fkrit' ) {
$var_mf = round (( $mf [ 'fkrit' ] / 100 ) * $add_mf );
$mf [ 'fkrit' ] += $var_mf ;
} elseif ( $max_mf == 'fakrit' ) {
$var_mf = round (( $mf [ 'fakrit' ] / 100 ) * $add_mf );
$mf [ 'fakrit' ] += $var_mf ;
} elseif ( $max_mf == 'fuvorot' ) {
$var_mf = round (( $mf [ 'fuvorot' ] / 100 ) * $add_mf );
$mf [ 'fuvorot' ] += $var_mf ;
} elseif ( $max_mf == 'fauvorot' ) {
$var_mf = round (( $mf [ 'fauvorot' ] / 100 ) * $add_mf );
$mf [ 'fauvorot' ] += $var_mf ;
}
}
if ( isset ( $item_damage [ 'id' ])) {
$add_dmg = sum_dmg ( $user [ 'id' ]);
$min_dmg = round (( $mf [ 'minu' ] / 100 ) * $add_dmg );
$max_dmg = round (( $mf [ 'maxu' ] / 100 ) * $add_dmg );
}
if ( isset ( $item_bron [ 'id' ])) {
$add_bron = sum_bron ( $user [ 'id' ]);
$var_brons = bron_ads ( $mf [ 'bron1' ], $mf [ 'bron2' ], $mf [ 'bron3' ], $mf [ 'bron4' ], $add_bron );
} else {
$var_brons = array ( 'a1' => 0 , 'a2' => 0 , 'a3' => 0 , 'a4' => 0 );
}
?>
< SPAN title = 'Усредненный по всем типам повреждений для вашего урона, без учета брони и защиты противника.' > Урон : < b >< ? = $mf [ 'minu' ] + $min_dmg ?>
- < ? = $mf [ 'maxu' ] + $max_dmg ?> </b> <? if (isset($item_damage['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_dmg . '%)</span>' ;
} ?> </span><br>
< SPAN title = 'Мф. крит. удара позволяет нанести критический удар, наносящий дополнительные повреждения даже сквозь блок.' > Мф . крит . удара : < ? = $mf [ 'fkrit' ] ?> <? if (isset($item_mf['id']) && $max_mf == 'fkrit') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>' ;
} ?> </span><br>
< SPAN title = 'Мф. против крит. удара снижает вероятность получения крит. удара' > Мф . против крит . удара : < ? = $mf [ 'fakrit' ] ?> <? if (isset($item_mf['id']) && $max_mf == 'fakrit') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>' ;
} ?> </span><br>
< SPAN title = 'Мф. увертывания позволяет вам уклониться от атаки противника, полностью игнорируя е е .' > Мф . увертывания : < ? = $mf [ 'fuvorot' ] ?> <? if (isset($item_mf['id']) && $max_mf == 'fuvorot') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>' ;
} ?> </span><br>
< SPAN title = 'Мф. против увертывания снижает шансы противника уклониться от вашей атаки' > Мф . против увертывания : < ? = $mf [ 'fauvorot' ] ?> <? if (isset($item_mf['id']) && $max_mf == 'fauvorot') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>' ;
} ?> </span><br>
</ span >
< ? } ?>
< script > DrawBar ( 'Мастерство' , 'oryj' , < ? if ( $_SESSION [ 'oryj' ] == 1 ) {
echo " 1 " ;
} else {
echo " 6 " ;
} ?> , '', '');</script>
< ?
2018-03-23 20:36:35 +00:00
if ( $_SESSION [ 'oryj' ] == 1 ) {
2018-03-02 14:33:58 +00:00
?>
< div class = " container " bit = 1 >
< b > Владение оружием :</ b >< br >
ножами и
кастетами : < ? = $user [ 'noj' ] ?> <?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Ножами', '', 1, '', '', '', '?ups=21&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
мечами : < ? = $user [ 'mec' ] ?> <?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Мечами', '', 1, '', '', '', '?ups=22&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
дубинами ,
булавами : < ? = $user [ 'dubina' ] ?> <?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Дубинами', '', 1, '', '', '', '?ups=23&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
топорами и
секирами : < ? = $user [ 'topor' ] ?> <?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Топорами', '', 1, '', '', '', '?ups=24&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
< ?
if ( $user [ 'level' ] > 3 ) { ?>
< b > Владение магией :</ b >< br >
<!-- Стихия огня : < ? = $user [ 'mfire' ] ?> <?= ($user['master']) ? "<a href='?up=25&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>
Стихия воды : < ? = $user [ 'mwater' ] ?> <?= ($user['master']) ? "<a href='?up=26&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>
Стихия воздуха : < ? = $user [ 'mair' ] ?> <?= ($user['master']) ? "<a href='?up=27&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>
Стихия земли : < ? = $user [ 'mearth' ] ?> <?= ($user['master']) ? "<a href='?up=28&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>-->
Серая магия : < ? = $user [ 'mgray' ] ?> <?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Серой Магией', '', 1, '', '', '', '?ups=210&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR >
Магия Тьмы : < ? = $user [ 'mdark' ] ?> <?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Магией Тьмы', '', 1, '', '', '', '?ups=211&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
< BR > < ?
} ?>
< FONT COLOR = " #333399 " > Возможных увеличений : < ? = $user [ 'master' ] ?> </font>
</ div >
< ?
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
}
?>
< script > DrawBar ( 'Броня' , 'bron' , < ? if ( $_SESSION [ 'bron' ] == 1 ) {
echo " 1 " ;
} else {
echo " 6 " ;
} ?> , '', '');</script>
2018-03-23 20:36:35 +00:00
< ? if ( $_SESSION [ 'bron' ] == 1 ) { ?>
2018-03-02 14:33:58 +00:00
Броня головы : < ? = $mf [ 'bron1' ] + $var_brons [ 'a1' ] ?> <? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>' ;
} ?> <BR>
Броня корпуса : < ? = $mf [ 'bron2' ] + $var_brons [ 'a2' ] ?> <? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>' ;
} ?> <BR>
Броня пояса : < ? = $mf [ 'bron3' ] + $var_brons [ 'a3' ] ?> <? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>' ;
} ?> <BR>
Броня ног : < ? = $mf [ 'bron4' ] + $var_brons [ 'a4' ] ?> <? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>' ;
} ?> <BR>
< ? } ?>
< ?
if (( $user [ 'sila' ] >= 25 || $user [ 'lovk' ] >= 25 || $user [ 'inta' ] >= 25 || $user [ 'vinos' ] >= 25 || $user [ 'intel' ] >= 25 ) && $user [ 'level' ] == 25 ) {
?>
< script > DrawBar ( 'Бонусы' , 'bonus' , < ? if ( $_SESSION [ 'bonus' ] == 1 ) {
echo " 1 " ;
} else {
echo " 6 " ;
} ?> , '', '');</script>
< ?
2018-03-23 20:36:35 +00:00
if ( $_SESSION [ 'bonus' ] == 1 ) {
2018-03-02 14:33:58 +00:00
if ( $user [ 'sila' ] >= 25 ) {
$sila [ 'fauvorot' ] = 10 ;
$sila [ 'fakrit' ] = 10 ;
}
if ( $user [ 'sila' ] >= 50 ) {
$sila [ 'fauvorot' ] = 20 ;
$sila [ 'fakrit' ] = 25 ;
}
if ( $user [ 'sila' ] >= 75 ) {
$sila [ 'fauvorot' ] = 30 ;
$sila [ 'fakrit' ] = 40 ;
}
if ( $user [ 'sila' ] >= 100 ) {
$sila [ 'fauvorot' ] = 40 ;
$sila [ 'fakrit' ] = 50 ;
$sila [ 'uminu' ] = 2 ;
$sila [ 'umaxu' ] = 2 ;
}
if ( $user [ 'sila' ] >= 125 ) {
$sila [ 'fauvorot' ] = 60 ;
$sila [ 'fakrit' ] = 75 ;
$sila [ 'uminu' ] = 5 ;
$sila [ 'umaxu' ] = 5 ;
}
if ( $user [ 'sila' ] >= 150 ) {
$sila [ 'fauvorot' ] = 90 ;
$sila [ 'fakrit' ] = 110 ;
$sila [ 'uminu' ] = 8 ;
$sila [ 'umaxu' ] = 8 ;
}
if ( $user [ 'sila' ] >= 175 ) {
$sila [ 'fauvorot' ] = 120 ;
$sila [ 'fakrit' ] = 150 ;
$sila [ 'uminu' ] = 12 ;
$sila [ 'umaxu' ] = 12 ;
}
if ( $user [ 'sila' ] >= 200 ) {
$sila [ 'fauvorot' ] = 150 ;
$sila [ 'fakrit' ] = 200 ;
$sila [ 'uminu' ] = 15 ;
$sila [ 'umaxu' ] = 15 ;
}
if ( $user [ 'lovk' ] >= 25 ) {
$lovk [ 'fuvorot' ] = 10 ;
$lovk [ 'fauvorot' ] = 10 ;
$lovk [ 'fakrit' ] = 20 ;
}
if ( $user [ 'lovk' ] >= 50 ) {
$lovk [ 'fuvorot' ] = 20 ;
$lovk [ 'fauvorot' ] = 25 ;
$lovk [ 'fakrit' ] = 40 ;
}
if ( $user [ 'lovk' ] >= 75 ) {
$lovk [ 'fuvorot' ] = 30 ;
$lovk [ 'fauvorot' ] = 30 ;
$lovk [ 'fakrit' ] = 60 ;
}
if ( $user [ 'lovk' ] >= 100 ) {
$lovk [ 'fuvorot' ] = 40 ;
$lovk [ 'fauvorot' ] = 40 ;
$lovk [ 'fakrit' ] = 75 ;
$lovk [ 'uminu' ] = 5 ;
$lovk [ 'umaxu' ] = 5 ;
}
if ( $user [ 'lovk' ] >= 125 ) {
$lovk [ 'fuvorot' ] = 40 ;
$lovk [ 'fauvorot' ] = 70 ;
$lovk [ 'fakrit' ] = 90 ;
$lovk [ 'uminu' ] = 6 ;
$lovk [ 'umaxu' ] = 6 ;
}
if ( $user [ 'lovk' ] >= 150 ) {
$lovk [ 'fuvorot' ] = 40 ;
$lovk [ 'fauvorot' ] = 150 ;
$lovk [ 'fakrit' ] = 120 ;
$lovk [ 'uminu' ] = 8 ;
$lovk [ 'umaxu' ] = 8 ;
}
if ( $user [ 'lovk' ] >= 175 ) {
$lovk [ 'fuvorot' ] = 40 ;
$lovk [ 'fauvorot' ] = 200 ;
$lovk [ 'fakrit' ] = 140 ;
$lovk [ 'uminu' ] = 10 ;
$lovk [ 'umaxu' ] = 10 ;
}
if ( $user [ 'lovk' ] >= 200 ) {
$lovk [ 'fuvorot' ] = 40 ;
$lovk [ 'fauvorot' ] = 250 ;
$lovk [ 'fakrit' ] = 160 ;
$lovk [ 'uminu' ] = 15 ;
$lovk [ 'umaxu' ] = 15 ;
}
if ( $user [ 'inta' ] >= 25 ) {
$inta [ 'fkrit' ] = 10 ;
$inta [ 'fauvorot' ] = 10 ;
$inta [ 'fakrit' ] = 15 ;
}
if ( $user [ 'inta' ] >= 50 ) {
$inta [ 'fkrit' ] = 25 ;
$inta [ 'fauvorot' ] = 25 ;
$inta [ 'fakrit' ] = 25 ;
}
if ( $user [ 'inta' ] >= 75 ) {
$inta [ 'fkrit' ] = 60 ;
$inta [ 'fauvorot' ] = 30 ;
$inta [ 'fakrit' ] = 30 ;
}
if ( $user [ 'inta' ] >= 100 ) {
$inta [ 'fkrit' ] = 40 ;
$inta [ 'fauvorot' ] = 40 ;
$inta [ 'fakrit' ] = 75 ;
}
if ( $user [ 'inta' ] >= 125 ) {
$inta [ 'fkrit' ] = 40 ;
$inta [ 'fauvorot' ] = 50 ;
$inta [ 'fakrit' ] = 100 ;
$inta [ 'uminu' ] = 1 ;
$inta [ 'umaxu' ] = 1 ;
}
if ( $user [ 'inta' ] >= 150 ) {
$inta [ 'fkrit' ] = 60 ;
$inta [ 'fauvorot' ] = 40 ;
$inta [ 'fakrit' ] = 130 ;
$inta [ 'uminu' ] = 5 ;
$inta [ 'umaxu' ] = 5 ;
}
if ( $user [ 'inta' ] >= 175 ) {
$inta [ 'fkrit' ] = 40 ;
$inta [ 'fauvorot' ] = 80 ;
$inta [ 'fakrit' ] = 170 ;
$inta [ 'uminu' ] = 10 ;
$inta [ 'umaxu' ] = 10 ;
}
if ( $user [ 'inta' ] >= 200 ) {
$inta [ 'fkrit' ] = 40 ;
$inta [ 'fauvorot' ] = 120 ;
$inta [ 'fakrit' ] = 200 ;
$inta [ 'uminu' ] = 15 ;
$inta [ 'umaxu' ] = 15 ;
}
if ( $user [ 'vinos' ] >= 25 ) {
$vinos [ 'fkrit' ] = 10 ;
$vinos [ 'fauvorot' ] = 10 ;
$vinos [ 'fakrit' ] = 15 ;
}
if ( $user [ 'vinos' ] >= 50 ) {
$vinos [ 'fkrit' ] = 25 ;
$vinos [ 'fauvorot' ] = 25 ;
$vinos [ 'fakrit' ] = 25 ;
}
if ( $user [ 'vinos' ] >= 75 ) {
$vinos [ 'fkrit' ] = 60 ;
$vinos [ 'fauvorot' ] = 30 ;
$vinos [ 'fakrit' ] = 30 ;
}
if ( $user [ 'vinos' ] >= 100 ) {
$vinos [ 'fkrit' ] = 40 ;
$vinos [ 'fauvorot' ] = 40 ;
$vinos [ 'fakrit' ] = 75 ;
}
if ( $user [ 'vinos' ] >= 125 ) {
$vinos [ 'fkrit' ] = 40 ;
$vinos [ 'fauvorot' ] = 50 ;
$vinos [ 'fakrit' ] = 100 ;
$vinos [ 'uminu' ] = 1 ;
$vinos [ 'umaxu' ] = 1 ;
}
if ( $user [ 'vinos' ] >= 150 ) {
$vinos [ 'fkrit' ] = 60 ;
$vinos [ 'fauvorot' ] = 40 ;
$vinos [ 'fakrit' ] = 130 ;
$vinos [ 'uminu' ] = 5 ;
$vinos [ 'umaxu' ] = 5 ;
}
if ( $user [ 'vinos' ] >= 175 ) {
$vinos [ 'fkrit' ] = 40 ;
$vinos [ 'fauvorot' ] = 80 ;
$vinos [ 'fakrit' ] = 170 ;
$vinos [ 'uminu' ] = 10 ;
$vinos [ 'umaxu' ] = 10 ;
}
if ( $user [ 'vinos' ] >= 200 ) {
$vinos [ 'fkrit' ] = 40 ;
$vinos [ 'fauvorot' ] = 120 ;
$vinos [ 'fakrit' ] = 200 ;
$vinos [ 'uminu' ] = 15 ;
$vinos [ 'umaxu' ] = 15 ;
}
if ( $user [ 'vinos' ] >= $user [ 'sila' ] && $user [ 'vinos' ] >= $user [ 'lovk' ] && $user [ 'vinos' ] >= $user [ 'inta' ]) {
$i_uminu = $vinos [ 'uminu' ];
$i_fkrit = $vinos [ 'fkrit' ];
$i_fauvorot = $vinos [ 'fauvorot' ];
$i_fakrit = $vinos [ 'fakrit' ];
}
if ( $user [ 'inta' ] >= $user [ 'sila' ] && $user [ 'inta' ] >= $user [ 'lovk' ] && $user [ 'inta' ] >= $user [ 'vinos' ]) {
$i_uminu = $inta [ 'uminu' ];
$i_fkrit = $inta [ 'fkrit' ];
$i_fauvorot = $inta [ 'fauvorot' ];
$i_fakrit = $inta [ 'fakrit' ];
}
if ( $user [ 'lovk' ] >= $user [ 'sila' ] && $user [ 'lovk' ] >= $user [ 'inta' ] && $user [ 'lovk' ] >= $user [ 'vinos' ]) {
$i_uminu = $lovk [ 'uminu' ];
$i_fkrit = $lovk [ 'fkrit' ];
$i_fauvorot = $lovk [ 'fauvorot' ];
$i_fakrit = $lovk [ 'fakrit' ];
}
if ( $user [ 'sila' ] >= $user [ 'lovk' ] && $user [ 'sila' ] >= $user [ 'inta' ] && $user [ 'sila' ] >= $user [ 'vinos' ]) {
$i_uminu = $sila [ 'uminu' ];
$i_fkrit = $sila [ 'fkrit' ];
$i_fauvorot = $sila [ 'fauvorot' ];
$i_fakrit = $sila [ 'fakrit' ];
}
if ( $i_fkrit > 0 ) {
echo " Мф. крит: + " . $i_fkrit . " <br /> " ;
}
if ( $i_fakrit > 0 ) {
echo " Мф. анти крит: + " . $i_fakrit . " <br /> " ;
}
if ( $i_fauvorot > 0 ) {
echo " Мф. анти уворот: + " . $i_fauvorot . " <br /> " ;
}
if ( $i_uminu > 0 ) {
echo " Урон: + " . $i_uminu ;
}
}
}
?>
</ td >
</ tr >
</ table >
</ TD >
<!-- Меню -->
< TD valign = top >
< link rel = " stylesheet " href = " /i/btn.css " type = " text/css " >
< IMG SRC = " http://i.oldbk.com/i/1x1.gif " WIDTH = " 1 " HEIGHT = " 5 " BORDER = 0 ALT = " " >
< div align = right class = " btn-control inventory " >
< FORM METHOD = POST ACTION = " ?edit=1 " name = f1 >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
</ div >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
< TD valign = top >
< link rel = " stylesheet " href = " /i/btn.css " type = " text/css " >
< IMG SRC = " http://i.oldbk.com/i/1x1.gif " WIDTH = " 1 " HEIGHT = " 5 " BORDER = 0 ALT = " " >
< div align = right class = " btn-control inventory " >
< FORM METHOD = POST ACTION = " ?edit=1 " name = f1 >
2018-03-30 22:43:30 +00:00
< ? if ( $user [ 'shadow' ] == '0.gif' ) : ?>
2018-03-02 14:33:58 +00:00
< INPUT class = " button-mid btn " TYPE = " submit " name = " setshadow " value = " Образы " title = " Образы " >
2018-03-30 22:43:30 +00:00
< ? endif ; ?>
2018-03-02 14:33:58 +00:00
< INPUT class = " button-mid btn " TYPE = button name = combats value = " Поединки "
onClick = " location.href='zayavka.php'; " style = " font-weight:bold; " >
< INPUT class = " button-mid btn " TYPE = button name = combats value = " Состояние "
onClick = " location.href='module_quest.php'; " style = " font-weight:bold; " >
< INPUT class = " button-mid btn " TYPE = " button " onClick = " location.href='main.php'; " value = " Вернуться "
title = " Вернуться " >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
</ div >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
< style >
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
. jGrowl . jGrowl - notification , . jGrowl . jGrowl - closer {
border : 2 px groove threedface ;
background : #E6E6E6 !important;
}
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
. jGrowl . jGrowl - notification , . jGrowl div . jGrowl - closer {
margin : 10 px ;
}
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
. jGrowl div . jGrowl - notification {
min - height : 40 px ;
}
2018-01-28 16:40:49 +00:00
2018-03-02 14:33:58 +00:00
. jGrowl . jGrowl - notification , . jGrowl . jGrowl - closer {
background - color : #000;
opacity : . 85 ;
- ms - filter : " progid:DXImageTransform.Microsoft.Alpha(Opacity=85) " ;
filter : progid : DXImageTransform . Microsoft . Alpha ( Opacity = 85 );
zoom : 1 ;
width : 235 px ;
padding : 10 px ;
margin - top : 5 px ;
margin - bottom : 5 px ;
font - family : Tahoma , Arial , Helvetica , sans - serif ;
font - size : 1 em ;
text - align : left ;
display : none ;
- moz - border - radius : 5 px ;
- webkit - border - radius : 5 px ;
}
</ style >
< div id = " jGrowl " class = " top-right jGrowl " >
< div class = " jGrowl-notification " ></ div >
</ div >
< div id = " mZeInventory " >
< ? php endif ; ?>
< ? php
2018-03-30 19:28:22 +00:00
2018-03-30 20:21:35 +00:00
if ( in_array ( input :: get ( 'razdel' ), [ 0 , 1 , 2 , 3 , 4 , 5 ])) $_SESSION [ 'razdel' ] = input :: get ( 'razdel' );
2018-03-02 14:33:58 +00:00
?>
< table border = 0 width = 100 % cellspacing = " 0 " cellpadding = " 0 " bgcolor = " #A5A5A5 " >
< tr >
< td >
< table border = 0 width = 100 % cellspacing = " 0 " cellpadding = " 3 " bgcolor = #d4d2d2>
< tr >
< td align = center bgcolor = " <?= ( $_SESSION['razdel'] == null) ? " #A5A5A6" : "#C7C7C8" ?>"><a
href = " ?edit=1&razdel=0 " ajax = " mZeInventory " > Амуниция </ a ></ td >
< td align = center bgcolor = " <?= ( $_SESSION['razdel'] == 1) ? " #A5A5A6" : "#C7C7C8" ?>"><a
href = " ?edit=1&razdel=1 " ajax = " mZeInventory " > Заклинания </ a ></ td >
< td align = center bgcolor = " <?= ( $_SESSION['razdel'] == 3) ? " #A5A5A6" : "#C7C7C8" ?>"><a
href = " ?edit=1&razdel=3 " ajax = " mZeInventory " > Ресурсы </ a ></ td >
< td align = center bgcolor = " <?= ( $_SESSION['razdel'] == 4) ? " #A5A5A6" : "#C7C7C8" ?>"><a
href = " ?edit=1&razdel=4 " ajax = " mZeInventory " > Подарки </ a ></ td >
< td align = center bgcolor = " <?= ( $_SESSION['razdel'] == 5) ? " #A5A5A6" : "#C7C7C8" ?>"><a
href = " ?edit=1&razdel=5 " ajax = " mZeInventory " > Квестовые вещи </ a ></ td >
< td align = center bgcolor = " <?= ( $_SESSION['razdel'] == 2) ? " #A5A5A6" : "#C7C7C8" ?>"><a
href = " ?edit=1&razdel=2 " ajax = " mZeInventory " > Прочее </ a ></ td >
</ tr >
</ table >
</ td >
</ tr >
< tr >
< td align = center >< B > Рюкзак ( масса : < ? php
2018-11-01 17:11:58 +00:00
$d = db :: c () -> query ( 'SELECT SUM(`massa`) AS `weight`, COUNT(`id`) AS `cnt` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0' , $user [ 'id' ]) -> fetch_assoc ();
echo $d [ 'weight' ];
2018-03-02 14:33:58 +00:00
?> /<?= get_meshok() ?>)</B>
</ td >
</ tr >
< tr >
< td align = center >
< table BORDER = 0 WIDTH = 100 % CELLSPACING = " 1 " CELLPADDING = " 2 " BGCOLOR = " #A5A5A5 " >
< ? php
if ( $_SESSION [ 'razdel' ] == null ) {
2018-11-01 17:11:58 +00:00
$data = db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND (`type` < 12 OR `type` = 22 OR `type` = 23 OR `type` = 24) AND `setsale` = 0 ORDER BY `update` DESC' , $user [ 'id' ]);
2018-03-02 14:33:58 +00:00
}
if ( $_SESSION [ 'razdel' ] == 1 ) {
2018-11-01 17:11:58 +00:00
$data = db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 12 AND `setsale` = 0 ORDER BY `update` DESC' , $user [ 'id' ]);
2018-03-02 14:33:58 +00:00
}
if ( $_SESSION [ 'razdel' ] == 2 ) {
2018-11-01 17:11:58 +00:00
$data = db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND (`type` > 12 OR `type` != 22 OR `type` != 23 OR `type` != 24) AND `setsale` = 0 ORDER BY `update` DESC' , $user [ 'id' ]);
2018-03-02 14:33:58 +00:00
}
if ( $_SESSION [ 'razdel' ] == 3 ) {
2018-11-01 17:11:58 +00:00
$data = db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `type` >= 80 AND `type` <= 89 AND `setsale` = 0 ORDER BY `update` ASC' , $user [ 'id' ]);
2018-03-02 14:33:58 +00:00
}
if ( $_SESSION [ 'razdel' ] == 4 ) {
2018-11-01 17:11:58 +00:00
$data = db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 200 AND `setsale` = 0 ORDER BY `update` ASC' , $user [ 'id' ]);
2018-03-02 14:33:58 +00:00
}
if ( $_SESSION [ 'razdel' ] == 5 ) {
2018-11-01 17:11:58 +00:00
$data = db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 199 AND `setsale` = 0 ORDER BY `update` ASC' , $user [ 'id' ]);
2018-03-02 14:33:58 +00:00
}
$groupNum = array ();
$viewInventory = array ();
$getItems = array ();
2018-11-01 17:11:58 +00:00
while ( $row = $data -> fetch_assoc ()) {
2018-03-02 14:33:58 +00:00
if ( $_SESSION [ 'stackall' ]) {
2018-11-01 17:11:58 +00:00
$itemsCount = ( $row [ 'prototype' ] ? db :: c () -> query ( 'SELECT * FROM `inventory` WHERE `owner` = ?i AND `prototype` = ?i AND `dressed` = 0 AND `setsale` = 0' , $user [ 'id' ], $row [ 'prototype' ]) -> getNumRows () : 1 );
2018-03-02 14:33:58 +00:00
if ( ! isset ( $groupNum [ $row [ 'prototype' ]])) {
$viewInventory [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'header' ] = '<tr bgcolor="#C7C7C7"><td onclick="$(\'#items_' . ( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ]) . '\').slideToggle(\'fast\'); collapse(' . ( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ]) . ');" style="cursor: pointer; overflow: hidden; z-index: 0;">' ;
2018-11-01 17:15:08 +00:00
$viewInventory [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'header' ] .= '➕ <b>' . $row [ 'name' ] . ( $row [ 'upgrade' ] > 0 ? " <font color=blue><b>[ " . $row [ 'upgrade' ] . " ]</b></font> " : " " ) . ' [' . $itemsCount . ']</b>' ;
2018-03-02 14:33:58 +00:00
$viewInventory [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'header' ] .= '</td></tr><tr><td style="padding: 0px;">' ;
$viewInventory [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'header' ] .= '<div id="items_' . ( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ]) . '" style="display: none;"><table width="100%">' ;
}
$viewInventory [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'ids' ][] = $row [ 'id' ];
$groupNum [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'count' ] = $itemsCount ;
$groupNum [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'id' ][] += $row [ 'id' ];
$getItems [ $row [ 'id' ]] = showitem ( $row , null , " edit=1&razdel= $_SESSION[razdel] " , true );
if ( count ( $groupNum [ $row [ 'prototype' ]][ 'id' ]) == $itemsCount || count ( $groupNum [ $row [ 'id' ]][ 'id' ]) == $itemsCount ) {
$viewInventory [( $row [ 'prototype' ] ? $row [ 'prototype' ] : $row [ 'id' ])][ 'fooder' ] = '</table></div></td></tr>' ;
}
} else {
showitem ( $row , null , " edit=1&razdel= $_SESSION[razdel] " );
}
}
if ( $viewInventory and $getItems ) {
foreach ( $viewInventory as $viewCategiryes ) {
echo $viewCategiryes [ 'header' ];
foreach ( $viewCategiryes [ 'ids' ] as $viewItem ) {
echo $getItems [ $viewItem ];
}
echo $viewCategiryes [ 'fooder' ];
}
}
2018-11-01 17:11:58 +00:00
if ( $data -> getNumRows () == 0 ) echo " <tr><td align=center bgcolor=#C7C7C7>Пусто</td></tr> " ;
2018-03-02 14:33:58 +00:00
?>
</ table >
</ td >
</ tr >
</ table >
< ? php if ( ! in_array ( $_GET [ 'mZeAjax' ], array ( 'mZeInventory' , 'mZeFilter' ))) : ?>
</ div >
</ td >
</ form >
</ tr >
</ table >
2018-03-30 18:40:55 +00:00
2018-03-02 14:33:58 +00:00
</ body >
</ html >
< ? php
endif ;
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
//==========================================================================================================
//проверяем соответствие комнаты и скрипта
if ( $user [ 'room' ] == 20 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 21 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 26 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 48 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 51 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 52 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 651 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 2655 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 2601 ) {
header ( 'Location: city.php' );
die ();
}
if ( $user [ 'room' ] == 2701 ) {
header ( 'Location: city.php' );
die ();
}
if ( $user [ 'room' ] == 2702 ) {
header ( 'Location: city.php' );
die ();
}
if ( $user [ 'room' ] == 2111 ) {
header ( 'Location: city.php' );
die ();
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
if ( $user [ 'room' ] == 22 ) {
header ( 'Location: shop.php' );
die ();
}
if ( $user [ 'room' ] == 23 ) {
header ( 'Location: repair.php' );
die ();
}
if ( $user [ 'room' ] == 25 ) {
header ( 'Location: comission.php' );
die ();
}
if ( $user [ 'room' ] == 27 ) {
header ( 'Location: post.php' );
die ();
}
if ( $user [ 'room' ] == 29 ) {
header ( 'Location: bank.php' );
die ();
}
if ( $user [ 'room' ] == 31 ) {
header ( 'Location: tower.php' );
die ();
}
if ( $user [ 'room' ] == 30 ) {
header ( 'Location: klanedit.php' );
die ();
}
if ( $user [ 'room' ] == 34 ) {
header ( 'Location: fshop.php' );
die ();
}
if ( $user [ 'room' ] == 35 ) {
header ( 'Location: krshop.php' );
die ();
}
if ( $user [ 'room' ] == 42 ) {
header ( 'Location: lotery.php' );
die ();
}
if ( $user [ 'room' ] == 43 ) {
header ( 'Location: znahar.php' );
die ();
}
if ( $user [ 'room' ] == 44 ) {
header ( 'Location: new_year.php' );
die ();
}
if ( $user [ 'room' ] == 45 ) {
header ( 'Location: clan_castle.php' );
die ();
}
if ( $user [ 'room' ] == 47 ) {
header ( 'Location: wall_build.php' );
die ();
}
if ( $user [ 'room' ] == 49 ) {
header ( 'Location: dig.php' );
die ();
}
if ( $user [ 'room' ] == 50 ) {
header ( 'Location: ashop.php' );
die ();
}
if ( $user [ 'room' ] == 53 ) {
header ( 'Location: library.php' );
die ();
}
if ( $user [ 'room' ] == 61 ) {
header ( 'Location: akadem.php' );
die ();
}
if ( $user [ 'room' ] == 650 ) {
header ( 'Location: ul_clans.php' );
die ();
}
if ( $user [ 'room' ] == 652 ) {
header ( 'Location: zamok.php' );
die ();
}
if ( $user [ 'room' ] == 223 ) {
header ( 'Location: bench.php' );
die ();
}
if ( $user [ 'room' ] == 222 ) {
header ( 'Location: bench_s.php' );
die ();
}
if ( $user [ 'room' ] == 224 ) {
header ( 'Location: bench_m.php' );
die ();
}
//БС
if ( $user [ 'in_tower' ] == 1 ) {
header ( 'Location: towerin.php' );
die ();
}
//Храм древнх
if ( $user [ 'room' ] == 203 ) {
header ( 'Location: church.php' );
die ();
}
//ЦХ
if ( $user [ 'room' ] == 600 ) {
header ( 'Location: c_haos.php' );
die ();
}
if ( $user [ 'room' ] == 601 ) {
header ( 'Location: c_haos_in.php' );
die ();
}
if ( $user [ 'room' ] == 602 ) {
header ( 'Location: c_park.php' );
die ();
}
if ( $user [ 'room' ] == 603 ) {
header ( 'Location: aren_of_angels.php' );
die ();
}
if ( $user [ 'room' ] == 620 ) {
header ( 'Location: enter_cave.php' );
die ();
}
if ( $user [ 'room' ] == 621 ) {
header ( 'Location: cave.php' );
die ();
}
if ( $user [ 'room' ] == 660 ) {
header ( 'Location: hostel.php' );
die ();
}
if ( $user [ 'room' ] == 661 ) {
header ( 'Location: hostel_room.php' );
die ();
}
if ( $user [ 'room' ] == 662 ) {
header ( 'Location: quest_room.php' );
die ();
}
if ( $user [ 'room' ] == 760 ) {
header ( 'Location: c_forest.php' );
die ();
}
if ( $user [ 'room' ] == 1000 ) {
header ( 'Location: solib/enterbezdna.php' );
die ();
}
if ( $user [ 'room' ] == 1001 ) {
header ( 'Location: solib/dungeon.php' );
die ();
}
if ( $user [ 'room' ] == 1051 ) {
header ( 'Location: lab_enter.php' );
die ();
}
if ( $user [ 'room' ] == 1052 ) {
header ( 'Location: labirint.php' );
die ();
}
if ( $user [ 'room' ] == 402 ) {
header ( 'Location: vxod.php' );
die ();
}
if ( $user [ 'room' ] == 403 ) {
header ( 'Location: canalizaciya.php' );
die ();
}
if ( $user [ 'room' ] == 1053 ) {
header ( 'Location: rep_shop.php' );
die ();
}
if ( $user [ 'room' ] == 1054 ) {
header ( 'Location: fontan_luck.php' );
die ();
}
if ( $user [ 'room' ] == 1055 ) {
header ( 'Location: group_arena.php' );
die ();
}
if ( $user [ 'room' ] == 666 ) {
header ( 'Location: jail.php' );
die ();
}
2018-01-28 16:40:49 +00:00
?>
2018-03-02 14:33:58 +00:00
< HTML >
< HEAD >
2018-03-08 22:14:29 +00:00
< link rel = " stylesheet " href = " css/main.css " >
< link rel = " stylesheet " href = " css/newstyle18.css " >
< link rel = " stylesheet " href = " css/btn.css " >
< meta charset = " utf-8 " >
< link rel = " stylesheet " href = " css/tooltip.css " >
2018-03-30 20:21:35 +00:00
< script src = " js/jquery-1.7.2.min.js " ></ script >
2018-03-02 14:33:58 +00:00
< script src = " js/tooltip.js " ></ script >
< script >
$ ( function () {
$ ( " .tooltip " ) . tipTip ({ maxWidth : " auto " , edgeOffset : 0 , fadeIn : 300 , fadeOut : 500 });
});
</ script >
< script >
var Hint3Name = '' ;
// Заголовок, название скрипта, имя поля с логином
function findlogin ( title , script , name ) {
document . all ( " hint3 " ) . innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>' +
'<form action="' + script + '" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><INPUT TYPE=hidden name=sd4 value="6"><td colspan=2>' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD width=50% align=right><INPUT TYPE=text NAME="' + name + '"></TD><TD width=50%><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>' ;
document . all ( " hint3 " ) . style . visibility = " visible " ;
document . all ( " hint3 " ) . style . left = 100 ;
document . all ( " hint3 " ) . style . top = 100 ;
document . all ( name ) . focus ();
Hint3Name = name ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
// Заголовок, название скрипта, имя поля с шмоткой
function okno ( title , script , name , coma ) {
var errkom = '' ;
//if (coma!='') errkom='Нельзя использовать символы: /\:*?"<>|<br>';
document . all ( " hint3 " ) . innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>' +
'<form action="' + script + '" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><INPUT TYPE=hidden name=sd4 value="6"><td colspan=2><font color=red>' +
errkom + '</font>введите название предмета</TD></TR><TR><TD width=50% align=right><INPUT TYPE=text NAME="' + name + '"></TD><TD width=50%><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>' ;
document . all ( " hint3 " ) . style . visibility = " visible " ;
document . all ( " hint3 " ) . style . left = 100 ;
document . all ( " hint3 " ) . style . top = 100 ;
document . all ( name ) . focus ();
Hint3Name = name ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
function closehint3 () {
document . all ( " hint3 " ) . style . visibility = " hidden " ;
Hint3Name = '' ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
var delay = 30 , TimerOn = - 1 , tkHP , maxHP , speed = 750 , stLen = 185 , redHP = 0.33 , yellowHP = 0.66 ;
function setHP ( a , b , c ) {
tkHP = a ;
maxHP = b ;
TimerOn >= 0 && ( clearTimeout ( TimerOn ), TimerOn = - 1 );
speed = c ;
setHPlocal ()
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
function setHPlocal () {
tkHP > maxHP && ( tkHP = maxHP );
var a = Math . round ( tkHP ) + " / " + maxHP , a = stLen - ( a . length + 2 ) * 7 ,
b = Math . round (( a - 1 ) / maxHP * tkHP );
a -= b ;
HP = document . getElementById ( " hp_value " );
HP1 = document . getElementById ( " HP1 " );
HP2 = document . getElementById ( " HP2 " );
if ( HP ) {
HP1 . width = b , HP2 . width = a , HP1 . src = tkHP / maxHP < redHP ? " i/1red.gif " : tkHP / maxHP < yellowHP ? " i/1yellow.gif " : " i/1green.gif " , HP . innerHTML = Math . round ( tkHP ) + " / " + maxHP ;
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
tkHP += maxHP / 53 / 230 * ( speed / 100 );
TimerOn = tkHP < maxHP ? setTimeout ( " setHPlocal() " , delay * 100 ) : - 1
2018-01-28 16:40:49 +00:00
}
2018-03-02 14:33:58 +00:00
</ script >
2018-01-28 16:40:49 +00:00
</ HEAD >
2018-03-02 14:33:58 +00:00
< body onLoad = " <?= topsethp(); ?> " >
2018-01-28 16:40:49 +00:00
< ? php
2018-03-02 21:07:23 +00:00
$d = db :: c () -> query ( 'SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0' , $user [ 'id' ]) -> fetch_assoc ();
if ( $d [ 'summ' ] > get_meshok () && $_GET [ 'got' ]) {
err ( 'У вас переполнен рюкзак, вы не можете передвигаться...' );
$_GET [ 'got' ] = 0 ;
}
$eff = db :: c () -> query ( 'SELECT `id` FROM `effects` WHERE `owner` = ?i AND (`type` = 14 OR `type` = 13) LIMIT 1' , $user [ 'id' ]) -> fetch_assoc ();
if ( isset ( $eff [ 'id' ]) && $_GET [ 'got' ]) {
err ( 'У вас тяжелая травма, вы не можете передвигатся...' );
$_GET [ 'got' ] = 0 ;
2018-03-02 14:33:58 +00:00
}
2018-03-23 21:47:46 +00:00
if ( isset ( $_GET [ 'goto' ])) {
if ( $_GET [ 'goto' ] == 'plo' ) {
if ( $user [ 'zayavka' ] == 0 ) {
db :: c () -> query ( 'UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i' , $_SESSION [ 'uid' ]);
die ( "
< script >
function cityg (){
location . href = 'city.php' ;
}
setTimeout ( 'cityg' , 5000 );
</ script >
< br >< br >< img style = 'display: block; margin: auto;' src = 'i/ajax-loader.gif' >< br >
< i > Переходим на Центральную площадь ...</ i >
" );
} else {
err ( 'Подали заявку на бой и убегаете из клуба? Нехорошо...' );
}
2018-03-02 14:33:58 +00:00
}
}
2018-03-23 21:47:46 +00:00
if ( isset ( $_GET [ 'use' ])) {
2018-03-02 14:33:58 +00:00
usemagic ( $_GET [ 'use' ], $_POST [ 'target' ]);
}
2018-03-08 21:04:15 +00:00
2018-03-30 20:21:35 +00:00
$online = db :: c () -> query ( 'SELECT 1 FROM `online` WHERE `real_time` >= ?i' , ( time () - 60 ));
2018-03-08 21:04:15 +00:00
2018-01-28 16:40:49 +00:00
?>
< div id = hint3 class = ahint ></ div >
< table width = " 100% " cellspacing = " 0 " cellpadding = " 0 " >
2018-03-02 14:33:58 +00:00
< tr >
< td align = " left " valign = " top " style = " width:250px; " >
2018-03-08 21:53:15 +00:00
< ? php showpersout (); ?>
2018-03-02 14:33:58 +00:00
</ td >
< td >& nbsp ; </ td >
< TD valign = top align = right >
< IMG SRC = 'i/1x1.gif' WIDTH = 1 HEIGHT = 5 >< BR >
< ul class = " btn-control main " >
< li >
< div class = " button-big btn " name = " combats " title = " Поединки " onClick = " location.href='zayavka.php'; " >
< strong > Поединки </ strong ></ div >
</ li >
< li >
< div class = " button-big btn " title = " Настройки / инвентарь "
onClick = " location.href='main.php?edit=1'; " > Настройки / инвентарь
</ div >
</ li >
< li >
< div class = " button-big btn " title = " Состояние " onClick = " location.href='module_quest.php'; " >
Состояние
</ div >
</ li >
< li >
< div class = " button-big btn " title = " Карта миров "
onClick = " location.href='main.php?setch=Карта миров'; " >< strong > Карта миров </ strong ></ div >
</ li >
< li >
< div class = " button-big btn " title = " Выйти на Центральную площадь "
onClick = " location.href='main.php?goto=plo'; " > Выйти на Центральную площадь
</ div >
</ li >
< li >
< div class = " button-big btn " title = " Обновить экран "
onClick = " location.href='main.php?sssetch=Обновить экран'; " > Обновить экран
</ div >
</ li >
</ ul >
</ TD >
</ tr >
2018-01-28 16:40:49 +00:00
</ table >
</ BODY >
</ HTML >