2022-06-06 21:30:34 +00:00
< ?
if ( ! defined ( 'GAME' ))
{
die ();
}
if ( $u -> room [ 'file' ] == 'karcer' )
{
if ( isset ( $_GET [ 'karcer_back' ])) {
if ( $u -> info [ 'jail' ] > time () ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Вы не можете выйти из карцера раньше срока' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
//выпускаем
2022-06-06 21:30:34 +00:00
$upd = mysql_query ( 'UPDATE `users` SET `jail` = "0", `room`="9", `city`="capitalcity" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
if ( $upd )
{
mysql_query ( 'UPDATE `items_users` SET `delete` = "0" WHERE `uid` = ' . $u -> info [ 'id' ] . ' AND `delete` = "1357908642"' );
2023-01-10 16:29:32 +00:00
$u -> error = 'Вы успешно вышли из тюрьмы' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
$u -> error = 'Н е удалось использовать данное заклятие' ;
2022-06-06 21:30:34 +00:00
}
}
}
function shtraf ( $stime )
{
$shkr = $stime - time ();
$shkr = ceil ( $shkr / 86400 ) * 1000 ;
if ( $shkr > 25000 ){ $shkr = 25000 ;};
return $shkr ;
}
if ( isset ( $_GET [ 'payshtraf' ])) {
if ( shtraf ( $u -> info [ 'jail' ]) != $_GET [ 'payshtraf' ]) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Н е шали!!!' ;
2022-06-06 21:30:34 +00:00
} elseif ( shtraf ( $u -> info [ 'jail' ]) <= $u -> info [ 'money' ])
{
2023-01-10 16:29:32 +00:00
//выпускаем
2022-06-06 21:30:34 +00:00
$upd = mysql_query ( 'UPDATE `users` SET `jail` = "0", `room`="9", `city`="capitalcity" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
if ( $upd )
{
$u -> info [ 'money' ] = $u -> info [ 'money' ] - shtraf ( $u -> info [ 'jail' ]);
$u -> info [ 'jail' ] = 0 ;
mysql_query ( 'UPDATE `users` SET `money` = "' . $u -> info [ 'money' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `users` SET `jail` = "0", `room`="9", `city`="capitalcity" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `items_users` SET `delete` = "0" WHERE `uid` = ' . $u -> info [ 'id' ] . ' AND `delete` = "1357908642"' );
2023-01-10 16:29:32 +00:00
$u -> error = date ( 'd.m.Y H:i' , time ()) . ' Вы успешно оплатили штраф ' . $_GET [ 'payshtraf' ] . ' и вышли из тюрьмы' ;
$u -> addDelo ( 3 , $u -> info [ 'id' ], 'Оплачен штраф: ' . $_GET [ 'payshtraf' ] . ' кр. и выпущен на свободу.' , time (), $u -> info [ 'city' ], 'Prison.System' , 0 , 0 , $u -> bank [ 'id' ]);
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
$u -> error = 'Что то пошло не так' ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
} else { $u -> error = 'Н е хватает средств!' ;}
2022-06-06 21:30:34 +00:00
}
if ( isset ( $_GET [ 'ekrobmen' ])) {
if ( $_GET [ 'ekrobmen' ] != 4 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Н е шали!!!' ;
2022-06-06 21:30:34 +00:00
} elseif ( $u -> info [ 'money2' ] >= 4 )
{
$u -> info [ 'money2' ] = $u -> info [ 'money2' ] - 4 ;
$u -> info [ 'money' ] = $u -> info [ 'money' ] + 1000 ;
mysql_query ( 'UPDATE `users` SET `money` = "' . $u -> info [ 'money' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `users` SET `money2` = "' . $u -> info [ 'money2' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
$ekrran = rand ( 1 , 5 );
if ( $ekrran == 1 )
{
2023-01-10 16:29:32 +00:00
$u -> error = date ( 'd.m.Y H:i' , time ()) . ' Вы успешно обменяли 4 екр. на 1000 кр. Охранник остался весьма доволен.' ;
2022-06-06 21:30:34 +00:00
} elseif ( $ekrran == 2 )
{
2023-01-10 16:29:32 +00:00
$u -> error = date ( 'd.m.Y H:i' , time ()) . ' Вы успешно обменяли 4 екр. на 1000 кр. Охранник принес вам поесть.' ;
2022-06-06 21:30:34 +00:00
} elseif ( $ekrran == 3 )
{
2023-01-10 16:29:32 +00:00
$u -> error = date ( 'd.m.Y H:i' , time ()) . ' Вы успешно обменяли 4 екр. на 1000 кр. Охранник подмигнул вам.' ;
2022-06-06 21:30:34 +00:00
} elseif ( $ekrran == 4 )
{
2023-01-10 16:29:32 +00:00
$u -> error = date ( 'd.m.Y H:i' , time ()) . ' Вы успешно обменяли 4 екр. на 1000 кр. Охранник пытался отвертеться но вы добились своего.' ;
2022-06-06 21:30:34 +00:00
} elseif ( $ekrran == 5 )
{
2023-01-10 16:29:32 +00:00
$u -> error = date ( 'd.m.Y H:i' , time ()) . ' Вы успешно обменяли 4 екр. на 1000 кр. Охранник запил но на следующий день принес вам кр.' ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
$u -> addDelo ( 3 , $u -> info [ 'id' ], 'Обмен 4 екр на 1000 кр.' , time (), $u -> info [ 'city' ], 'Prison.System' , 0 , 0 , $u -> bank [ 'id' ]);
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
} else { $u -> error = 'Н е хватает средств!' ;}
2022-06-06 21:30:34 +00:00
}
?>
< style type = " text/css " >
. pH3 { COLOR : #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; }
</ style >
< table width = " 100% " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td valign = " top " >< div align = " center " class = " pH3 " >< ? = $u -> room [ 'name' ] ?> </div>
< br />
< font color = red >< b >< ? = $u -> error ?> </b></font><br />
2023-03-31 16:54:33 +00:00
< ? php if ( $u -> info [ 'jail' ] > time () ) { ?>
2023-01-10 16:29:32 +00:00
Вы заточены в карцере до < ? = date ( 'd.m.Y H:i' , $u -> info [ 'jail' ]) ?> <br>
Освобождение возможно при условии оплаты Штрафа :
2022-06-06 21:30:34 +00:00
< ?
if ( shtraf ( $u -> info [ 'jail' ]) > $u -> info [ 'money' ] && $u -> info [ 'jail' ] > 0 )
{
2023-01-10 16:29:32 +00:00
echo " <font color=red><b> " . shtraf ( $u -> info [ 'jail' ]) . " </b></font> кр. У вас есть: " . $u -> info [ 'money' ] . " кр. " ;
2022-06-06 21:30:34 +00:00
?>
2023-03-31 16:54:33 +00:00
< FORM action = " main.php?payshtraf=<?= shtraf( $u->info ['jail']); ?> " method = " POST " >
2023-01-10 16:29:32 +00:00
< INPUT class = " btn btn-success " TYPE = " submit " disabled value = " Оплатить " >& nbspН е до с та то чно средств !
2022-06-06 21:30:34 +00:00
</ FORM >
2023-01-10 16:29:32 +00:00
< br > Можно обменять у охранника 4 екр на 1000 кредов у вас есть < ? echo $u -> info [ 'money2' ]; ?> кр.
2022-06-06 21:30:34 +00:00
< FORM action = " main.php?ekrobmen=4 " method = " POST " >
2023-01-10 16:29:32 +00:00
< INPUT class = " btn btn-success " TYPE = " submit " value = " Обменять " >
2022-06-06 21:30:34 +00:00
</ FORM >
< ?
}
else
{
2023-01-10 16:29:32 +00:00
echo " <font color=gren><b> " . shtraf ( $u -> info [ 'jail' ]) . " </b></font> кр. " ;
2022-06-06 21:30:34 +00:00
?>
2023-03-31 16:54:33 +00:00
< FORM action = " main.php?payshtraf=<?= shtraf( $u->info ['jail']); ?> " method = " POST " >
2023-01-10 16:29:32 +00:00
< INPUT class = " btn btn-success " TYPE = " submit " value = " Оплатить " >
2022-06-06 21:30:34 +00:00
</ FORM >
< ?
}
} ?>
</ td >
< td width = " 280 " valign = " top " >< table align = " right " cellpadding = " 0 " cellspacing = " 0 " >
< tr >
< td width = " 100% " >& nbsp ; </ td >
< td >< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " >
< tr align = " right " valign = " top " >
< td ><!-- -->
2023-03-31 16:54:33 +00:00
< ? = $goLis ; ?>
2022-06-06 21:30:34 +00:00
<!-- -->
< table border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td nowrap = " nowrap " >< table width = " 100% " border = " 0 " cellpadding = " 0 " cellspacing = " 1 " bgcolor = " #DEDEDE " >
< tr >
< td bgcolor = " #D3D3D3 " >< img src = " https://img.new-combats.com/i/move/links.gif " width = " 9 " height = " 7 " /></ td >
2023-01-10 16:29:32 +00:00
< td bgcolor = " #D3D3D3 " nowrap = " nowrap " >< a href = " # " id = " greyText " class = " menutop " onclick = " location='main.php?karcer_back=1'; " > Выйти из карцера </ a ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ table >
</ td >
</ tr >
</ table >
</ td >
</ tr >
</ table >
</ td >
</ tr >
</ table >
< div >< br />
< p >& nbsp ; </ p >
< p > < br />
< br />
</ p >
</ div ></ td >
</ tr >
</ table >
< ?
}
?>