Файл: transformerss/aliko4.php
Строк: 234
<style>
.alertos {
padding: 8px 0px 8px 0px;
color: #b94a48;
margin-bottom: 8px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: #f2dede;
border: 1px solid #eed3d7;
-webkit-border-radius: 2px;
-moz-border-radius: 4px;
border-radius: 4px;
width: 375px;
margin-top: 5px;
}
.alertvos {
padding: 8px 0px 8px 0px;
color: #328426;
margin-bottom: 8px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: #C4E6C1;
border: 1px solid #A4C3A1;
-webkit-border-radius: 2px;
-moz-border-radius: 4px;
border-radius: 4px;
width: 375px;
margin-top: 5px;
}
.alertstart{
padding: 8px 0px 8px 0px;
margin-bottom: 8px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
color: #3a87ad;
background-color: #d9edf7;
border: 1px solid #bce8f1;
-webkit-border-radius: 2px;
-moz-border-radius: 4px;
border-radius: 4px;
width: 375px;
margin-top: 5px;
}
</style>
<?php
# Старт сессии
@session_start();
# Константа для Include
define("CONST_RUFUS", true);
# Автоподгрузка классов
function __autoload($name){ include("classes/_class.".$name.".php");}
# Класс конфига
$config = new config;
# Функции
$func = new func;
# База данных
$db = new db($config->HostDB, $config->UserDB, $config->PassDB, $config->BaseDB);
$user = intval($_POST["text"]);
$stavka = intval($_POST['stavka']);
# Настройки цены игры
$cenaigri = 1000;
$db->Query("SELECT * FROM db_users_b WHERE id = '$user' LIMIT 1");
$us_data = $db->FetchArray();
$log = $us_data['user'];
$dat = time();
if($user == $_SESSION['user_id']) {
if($us_data['money_b'] >= $cenaigri ) {
$rand = rand(1, 9);
}else echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_netdeneg;</script></center>";
}else echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_start;</script></center>";
$lsb = time();
if($rand == 1) {
$win = 1;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_sigaret;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("UPDATE db_users_b SET money_b = money_b + '1600' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '1600 Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/qashel/kadr.gif'></center>";
}elseif($rand == 2) {
$win = 0;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_progr;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '$cenaigri Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/eee.gif'></center>";
}elseif($rand == 3) {
$win = 1;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_sigaret;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("UPDATE db_users_b SET money_b = money_b + '1600' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '1600 Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/qashel/kadr.gif'></center>";
}elseif($rand == 4) {
$win = 1;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_piva;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("UPDATE db_users_b SET money_b = money_b + '1800' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '1800 Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/harpac/kadr.gif'></center>";
}elseif($rand == 5) {
$win = 0;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_progr;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '$cenaigri Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/eee.gif'></center>";
}elseif($rand == 6) {
$win = 1;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_arax;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("UPDATE db_users_b SET money_b = money_b + '2000' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '2000 Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/harpac/kadr.gif'></center>";
}elseif($rand == 7) {
$win = 2;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_knik;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("UPDATE db_users_b SET money_b = money_b + '$cenaigri' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '$cenaigri Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/vayy.gif'></center>";
}elseif($rand == 8) {
$win = 0;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_progr;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '$cenaigri Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/eee.gif'></center>";
}elseif($rand == 9) {
$win = 0;
$cenaigri;
echo "<center><script>document.getElementById('div_for_insertbarik').innerHTML = about_progr;</script></center>";
$db->Query("UPDATE db_users_b SET money_b = money_b - '$cenaigri' WHERE id = '$user'");
$db->Query("INSERT INTO db_aliko (login, sum, date, win) VALUES ('$log', '$cenaigri Серебро', '$dat', '$win')");
echo "<center><img src='/alikoimg/eee.gif'></center>";
}
?>