game/modules_data/_bukmeker.php

112 lines
4.6 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?
echo "
<script language='JavaScript'>
var elem = document.getElementById('se-pre-con');
elem.parentNode.removeChild(elem);
</script>
";
if(!defined('GAME'))
{
die();
}
if($u->info['bukmeker']<>1 && $u->info['admin']<>1){
die('<center><h4><3E><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!</h4></center>');
}
?>
<script type="text/javascript" language="javascript" src='https://img.new-combats.com/js/commoninf.js'></script>
<style>
.modpow {
background-color:#ddd5bf;
}
.mt {
background-color:#b1a993;
padding-left:10px;
padding-right:10px;
padding-top:5px;
padding-bottom:5px;
}
.md {
padding:10px;
}
</style>
<table align=left><tr><td></td></tr></table><table align=right><tr><td><INPUT TYPE="button" onclick="location.href='main.php?bukmeker=1';" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" class="btn" title="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"> <INPUT TYPE="button" onclick="location.href='main.php';" class="btn" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" title="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"></table>
<center><h4><i><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <?=$u->info['login']?></h4></i></center>
<?
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `bank_table` ORDER BY `time` DESC LIMIT 1'));
$ba = mysql_fetch_array(mysql_query("SELECT * FROM `bank_alh` WHERE `uid` = '".mysql_real_escape_string($u->info['id'])."' LIMIT 1"));
if(isset($ba['id'])) {
?>
<table width=320>
<tr>
<td>
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<b><?=$ba['cr']?></b> <20><>.
<hr />
<form method="post" action="main.php?bukmeker=1">
<?
if(isset($_POST['buy_cr'])) {
$uba = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['buy_cr']).'" LIMIT 1'));
if(isset($uba['login'])) {
echo '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '.$u->microLogin($uba['id'],1).'<br>';
}else{
echo '<font color=red><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</font><hr>';
unset($_POST['buy_cr']);
}
echo '<hr>';
if(isset($uba['login'])) {
$_POST['buk_cr'] = round($_POST['buk_cr'],2);
if(isset($_POST['buk_cr']) && $_POST['buk_cr'] < 1) {
echo '<font color=red><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 1 <20><>.</font><hr>';
unset($_POST['buk_cr']);
}elseif($_POST['buk_cr'] > $ba['cr']) {
echo '<font color=red><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD></font><hr>';
unset($_POST['buk_cr']);
}
if(isset($_POST['buygoodluck'])) {
echo '<script>alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$_POST['buk_cr'].' <20><>!");location.href="main.php?bukmeker=1";</script>';
$ba['cr'] -= $_POST['buk_cr'];
$ba['USD'] += round($_POST['buk_cr']*$ucur,2);
mysql_query('UPDATE `bank_alh` SET `cr` = "'.mysql_real_escape_string($ba['cr']).'",`USD` = "'.mysql_real_escape_string($ba['USD']).'" WHERE `id` = "'.$ba['id'].'" LIMIT 1');
mysql_query('UPDATE `users` SET `money` = `money` + '.mysql_real_escape_string($_POST['buk_cr']).' WHERE `login` = "'.$uba['login'].'" LIMIT 1');
$money = round($_POST['buk_cr']*$pl['cur'],2);
$money = round($money/100*(100-$ba['procent']),2);
}else{
echo '<27><><EFBFBD><EFBFBD><EFBFBD> <20><>.:';
if(!isset($_POST['buk_cr'])) {
echo '&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <input name="buk_cr" style="width:50px;" value="0.00" /> <input class="btn btn-success" value="<22><><EFBFBD><EFBFBD><EFBFBD>" type="submit" /><br>';
}else{
echo ' <b>'.round((int)$_POST['buk_cr'],2).'</b> <20><>.<input name="buk_cr" type="hidden" value="'.$_POST['buk_cr'].'" />';
echo ' &nbsp; <input type="submit" name="buygoodluck" class="btn btn-danger" value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>">';
}
}
}
}
if(isset($_POST['buy_cr'])){ ?><input name="buy_cr" type="hidden" value="<?=$_POST['buy_cr']?>" /> <? }else{ ?><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <input name="buy_cr" style="width:50px;" value="<?=$_POST['buy_cr']?>" /> <input class="btn btn-success" value="<22><><EFBFBD><EFBFBD><EFBFBD>" type="submit" /><? } ?>
</form>
</td>
</tr>
</table>
<?
}
if($u->info['bukmeker']=1 || $u->info['admin']==1){
if (isset($_POST['systemM']) && !empty($_POST['systemM'])){
$r = "<b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</b>";
$r .='<font color=darkgreen><b> '.$_POST['sysMes'].'</b><b></font> [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]</b>';
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','".$r."','".time()."','6','0')");
echo "<br><font color=red><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></b></font>";
}
echo "<br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>:<BR>";
echo " <form action='#' method='POST'>";
echo "<input type='textarea' class='inps' name='sysMes' size='275'>";
echo "<input type='submit' name='systemM' class='btn' value='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'>";
echo "</form>";
}
?>