2023-03-31 18:42:06 +00:00
< ? php
2022-06-06 21:30:34 +00:00
if ( ! defined ( 'GAME' )) { die (); }
//onmouseup="top.chat.inObj = trnLogin;"
if ( ! isset ( $u -> tfer [ 'id' ])) {
?>
< script type = " text/javascript " src = " js/jquery.js " ></ script >
2023-03-31 16:54:33 +00:00
< form method = " post " action = " main.php?transfer&rnd=<?= $code ; ?> " onmouseup = " $ ( document ).ready(function() { top.chat.inObj = top.frames['main'].document.getElementById('trnLogin'); $ ('#trnLogin').focus(); }); " >
2022-06-06 21:30:34 +00:00
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td width = " 110 " align = " right " >& nbsp ; </ td >
2023-01-10 16:29:32 +00:00
< td align = " center " > Передача предметов / кредитов другому игроку </ td >
2023-03-31 16:54:33 +00:00
< td width = " 110 " align = " right " >< input type = " button " onClick = " location='main.php?rnd=<?= $code ; ?>'; " name = " button " class = " btn " id = " button " value = " Вернуться " ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ table >
2023-03-31 18:42:06 +00:00
< ? php
2022-06-06 21:30:34 +00:00
if ( $u -> error != '' ) {
echo '<b><font color="red">' . $u -> error . '</font></b>' ;
}
?>
< p >& nbsp ; </ p >
< div class = " unos " id = " unos " >
< table border = " 0 " align = " center " cellpadding = " 0 " style = " border:1px solid #a5a5a5 " cellspacing = " 0 " >
< tr >
< td id = " LoginLayer " valign = " top " colspan = " 2 " >< table width = " 300 " border = " 0 " align = " center " cellpadding = " 2 " cellspacing = " 0 " bgcolor = " #d4d2d2 " >
< tbody >
< tr >
2023-01-10 16:29:32 +00:00
< td bgcolor = " #a5a5a5 " align = " center " >< strong > Укажите логин персонажа :</ strong ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
< tr >
< td align = " center " >< input id = " trnLogin " type = " text " style = " width: 95%; " name = " trnLogin " value = " " />
2023-01-10 16:29:32 +00:00
< div align = " center " >< small style = " font-size:10px; " > ( можно щелкнуть по логину в чате ) </ small ></ div >
2022-06-06 21:30:34 +00:00
</ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td bgcolor = " #a5a5a5 " align = " center " >< strong > Пояснение </ strong ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
< tr >
< td align = " center " >< textarea style = " width:95%; " name = " textarea " ></ textarea >
2023-01-10 16:29:32 +00:00
< div align = " center " >< small style = " font-size:10px; " > Максимальное число знаков : 200 </ small ></ div >
2022-06-06 21:30:34 +00:00
</ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td bgcolor = " #a5a5a5 " align = " center " >< button class = " btn " > Отправить приглашение </ button ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ tbody >
</ table ></ td >
</ tr >
</ table >
</ div >
</ form >
2023-03-31 18:42:06 +00:00
< ? php
2022-06-06 21:30:34 +00:00
} elseif ( $u -> tfer [ 'cancel1' ] == 0 && $u -> tfer [ 'cancel2' ] == 0 )
{
$rtdf = 1 ;
if ( $u -> tfer [ 'uid2' ] == $u -> info [ 'id' ])
{
$rtdf = 2 ;
}
if ( $u -> tfer [ 'r' . $rtdf ] != 0 && $u -> tfer [ 'r' . $rtdf ] == $u -> tfer [ 'r0' ])
{
$u -> tfer [ 'r' . $rtdf ] = 0 ;
$u -> tfer [ 'good1' ] = 0 ;
$u -> tfer [ 'good2' ] = 0 ;
mysql_query ( 'UPDATE `transfers` SET `r' . $rtdf . '` = "0", `good1`="0",`good2`="0" WHERE `id` = "' . $u -> tfer [ 'id' ] . '" LIMIT 1' );
unset ( $rtdf );
}
2023-01-10 16:29:32 +00:00
/* echo '[Передача]<br>Присутствие: ' ;
2022-06-06 21:30:34 +00:00
if ( $u -> tfer [ 'start1' ] > 0 )
{
2023-01-10 16:29:32 +00:00
echo ' [U1: Присутствует]' ;
2022-06-06 21:30:34 +00:00
}
if ( $u -> tfer [ 'start2' ] > 0 )
{
2023-01-10 16:29:32 +00:00
echo ' [U2: Присутствует]' ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
echo '<br>Состояние: ' ;
2022-06-06 21:30:34 +00:00
if ( $u -> tfer [ 'good1' ] > 0 )
{
2023-01-10 16:29:32 +00:00
echo ' [U1: Согласен]' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
echo ' [U1: Ожидание]' ;
2022-06-06 21:30:34 +00:00
}
if ( $u -> tfer [ 'good2' ] > 0 )
{
2023-01-10 16:29:32 +00:00
echo ' [U2: Согласен]' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
echo ' [U2: Ожидание]' ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
echo '<br><a href="main.php?transfer&exit_transfer=' . $code . '">Выйти из передачи</a>' ;
2022-06-06 21:30:34 +00:00
*/
$az = array ( 1 => 1 , 2 => 2 );
if ( $u -> tfer [ 'uid2' ] == $u -> info [ 'id' ])
{
$az = array ( 1 => 2 , 2 => 1 );
}
$tu = array (
2023-11-30 22:51:17 +00:00
1 => $u -> getLogin ( $u -> tfer [ 'uid' . $az [ 1 ]]),
2 => $u -> getLogin ( $u -> tfer [ 'uid' . $az [ 2 ]])
2022-06-06 21:30:34 +00:00
);
?>
< style >
. tfitm1 {
background - color : #c7c7c7;
border - bottom : 1 px solid #909090;
padding : 3 px ;
}
. tfitm2 {
background - color : #d5d5d5;
border - bottom : 1 px solid #909090;
padding : 3 px ;
}
. tfii {
margin : 3 px ;
max - width : 30 px
}
. tfid {
border - left : 1 px solid #FAFAFA;
}
. clr {
float : right ;
cursor : pointer ;
}
</ style >
2023-03-31 18:30:14 +00:00
< script src = " /js/jquery.js " type = " text/javascript " ></ script >
2022-06-06 21:30:34 +00:00
< script >
function gorazdel ( id )
{
if ( $ ( '#invmn' + id ) . attr ( 'id' ) == 'invmn' + id )
{
var i = 1 ;
while ( i <= 6 )
{
$ ( '#invmn' + i ) . css ({ 'background' : '#D4D2D2' });
$ ( '#inv' + i ) . css ({ 'display' : 'none' });
i ++ ;
}
$ ( '#inv' + id ) . css ({ 'display' : '' });
$ ( '#invmn' + id ) . css ({ 'background' : '#A5A5A5' });
}
}
var lastref = 0 ;
var fststart = 1 ;
var lastref2 = 0 ;
function refleshNow ( idd )
{
if ( lastref == 0 )
{
$ . post ( 'transfer.php' ,{ id : idd , money : $ ( '#money2' ) . val ()}, function ( data ){ $ ( " #refleshInv " ) . html ( data );});
lastref = 1 ;
if ( fststart == 1 )
{
fststart = 0 ;
setInterval ( 'refleshNow("minireflesh");' , 7500 );
}
} else {
setTimeout ( 'lastref=0;' , 1000 );
}
}
function s2g ()
{
$ ( '#s2g1' ) . css ({
'background-color' : '#c0c0c5' ,
'color' : '' ,
'border-bottom-color' : '#909090'
});
$ ( '#s2g2' ) . css ({
'background-color' : '#D0D0D5' ,
'color' : ''
});
}
function refmoney ( m1 , m2 )
{
$ ( '#money1' ) . html ( '<b>' + m1 + '</b>' );
2023-03-31 16:54:33 +00:00
if ( m2 >< ? = $u -> info [ 'money' ]; ?> )
2022-06-06 21:30:34 +00:00
{
2023-03-31 16:54:33 +00:00
m2 = < ? = $u -> info [ 'money' ]; ?> ;
2022-06-06 21:30:34 +00:00
}
$ ( '#money2' ) . val ( m2 );
}
function saleitem ( idd , v )
{
if ( lastref2 == 0 )
{
$ . post ( 'transfer.php' ,{ id : 'sale' , money : $ ( '#money2' ) . val (), itemid : idd , saletype : v }, function ( data ){ $ ( " #refleshInv " ) . html ( data );});
lastref2 = 1 ;
setTimeout ( 'lastref2=0;' , 350 );
} else {
setTimeout ( 'lastref2=0;' , 250 );
}
}
function cancelitm ( idd )
{
if ( lastref2 == 0 )
{
$ . post ( 'transfer.php' ,{ id : 'sale' , money : $ ( '#money2' ) . val (), cancelid : idd }, function ( data ){ $ ( " #refleshInv " ) . html ( data );});
lastref2 = 1 ;
setTimeout ( 'lastref2=0;' , 350 );
} else {
setTimeout ( 'lastref2=0;' , 250 );
}
}
function clickBtn2 ()
{
$ . post ( 'transfer.php' ,{ id : 'sale' , money : $ ( '#money2' ) . val (), cancel2 : 'true' }, function ( data ){ $ ( " #refleshInv " ) . html ( data );});
}
function clickBtn1 ()
{
$ . post ( 'transfer.php' ,{ id : 'sale' , money : $ ( '#money2' ) . val (), start2 : 'true' }, function ( data ){ $ ( " #refleshInv " ) . html ( data );});
}
</ script >
< div id = " refleshInv " style = " display:; " ></ div >
< table width = " 100% " height = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td height = " 30 " >< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td width = " 110 " align = " right " >& nbsp ; </ td >
2023-03-31 16:54:33 +00:00
< td align = " center " > Передача предметов / кредитов между < ? = $tu [ 1 ] . ' и ' . $tu [ 2 ]; ?> </td>
< td width = " 110 " align = " right " >< input type = " button " onclick = " location='main.php?transfer&exit_transfer&rnd=<?= $code ; ?>'; " name = " button2 " id = " button2 " value = " Вернуться " /></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ table ></ td >
</ tr >
< tr >
< td valign = " top " >
< table width = " 100% " height = " 100% " border = " 0 " cellspacing = " 2 " cellpadding = " 0 " >
< tr >
< td valign = " top " >
< table width = " 100% " style = " border:1px solid #909090; " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
2023-03-31 18:30:14 +00:00
< td id = " s2g1 " style = " color:#BABABA;background-color:#DCDCDE; border-bottom:1px solid #D0D0D5; border-right:1px solid #909090; " >< span style = " border-bottom:1px solid #909090; " >< img id = " gd1 " style = " float:right;display:none; " width = " 13 " height = " 13 " src = " //img.new-combats.tech/i/ready.gif " title = " Персонаж готов к обмену " /></ span >& nbsp ; < ? = $tu [ 2 ]; ?> отдаёт:<br /> <span id="money1"><b>0</b>.<small><i>00</i></small></span> кр.</td>
< td width = " 50% " bgcolor = " #c0c0c5 " style = " border-bottom:1px solid #909090; " >< img style = " float:right;display:none; " width = " 13 " height = " 13 " id = " gd2 " src = " //img.new-combats.tech/i/ready.gif " title = " Персонаж готов к обмену " />& nbsp ; Вы отдаёте :< br />& nbsp ; < input id = " money2 " name = " money2 " type = " text " style = " width:37px; " value = " 0.00 " /> кр . из < b >< ? = $u -> info [ 'money' ]; ?> </b></td>
2022-06-06 21:30:34 +00:00
</ tr >
< tr >
< td valign = " top " id = " s2g2 " style = " background-color:#EEEEEE; border-right:1px solid #909090; " >& nbsp ; </ td >
< td valign = " top " bgcolor = " #D0D0D5 " id = " s2g3 " >& nbsp ; </ td >
</ tr >
</ table >
< table width = " 100% " style = " border-left:1px solid #909090;border-right:1px solid #909090;border-bottom:1px solid #909090; " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
2023-01-10 16:29:32 +00:00
< td align = " center " valign = " top " bgcolor = " #D0D0D5 " >< button id = " btn1 " onClick = " clickBtn1(); " > Готов к обмену </ button > & nbsp ; < button id = " btn2 " onClick = " clickBtn2(); " > Отмена </ button ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ table >
</ td >
< td width = " 50% " valign = " top " >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td bgcolor = " #d4d2d2 " >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 3 " >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 25% " id = " invmn1 " onclick = " gorazdel(1); " align = " center " style = " background-color:#A5A5A5; " >< a href = " # " > Обмундирование </ a ></ td >
< td width = " 25% " id = " invmn2 " onclick = " gorazdel(2); " align = " center " >< a href = " # " > Заклятия </ a ></ td >
< td width = " 25% " id = " invmn3 " onclick = " gorazdel(3); " align = " center " >< a href = " # " > Эликсиры </ a ></ td >
< td width = " 25% " id = " invmn4 " onclick = " gorazdel(4); " align = " center " >< a href = " # " > Прочее </ a ></ td >
< td width = " 25% " id = " invmn6 " onclick = " gorazdel(6); " align = " center " >< a href = " # " > Руны </ a ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ table >
</ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td align = " center " bgcolor = " #a5a5a5 " >< strong > Рюкзак ( масса : 0 / 0 , предметов : 0 ) </ strong ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
< tr >
< td bgcolor = " #D4D2D2 " style = " border:1px solid #a5a5a5; " >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " id = " inv1 " ></ table >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " id = " inv2 " style = " display:none; " ></ table >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " id = " inv3 " style = " display:none; " ></ table >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " id = " inv4 " style = " display:none; " ></ table >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " id = " inv6 " style = " display:none; " ></ table >
</ td >
</ tr >
</ table >
</ td >
</ tr >
</ table >
</ td >
</ tr >
</ table >
< script > refleshNow ( 'reflesh' ); </ script >
2023-03-31 18:42:06 +00:00
< ? php
2022-06-06 21:30:34 +00:00
} else {
if ( $u -> tfer [ 'uid1' ] == $u -> info [ 'id' ])
{
mysql_query ( 'UPDATE `transfers` SET `finish1` = "0" WHERE `id` = "' . $u -> tfer [ 'id' ] . '" LIMIT 1' );
} elseif ( $u -> tfer [ 'uid2' ] == $u -> info [ 'id' ])
{
mysql_query ( 'UPDATE `transfers` SET `finish2` = "0" WHERE `id` = "' . $u -> tfer [ 'id' ] . '" LIMIT 1' );
}
?>
2023-01-10 16:29:32 +00:00
{ отображаем лог передач }
2023-03-31 16:54:33 +00:00
< ? php } ?>
< div align = " right " >< ? = $c [ 'counters' ]; ?> </div>