Помощь по скриптам | Вопрос по скрипту
Делаю марса написал покупку за рубины, но больше чем за 2410 не покупает помогите вот скрипт профилей, где идет вся покупка:
<?php
require_once ('system/func.php');
auth(); // Закроем от не авторизованных
# Настройки #
$id = abs(intval($_GET['id']));
if($id)$profile = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '".$id."'"));
else $profile = $user;
# Ошибки #
if(!$profile){
$_SESSION['msg'] == 'Такой игрок не существует';
header('Location: /online?search');
exit();
}
if(isset($_GET['clan_memb']) and $myID != $profile['id'] and $user['clan_rang'] > 2 and $profile['id_clan'] == 0 and $profile['side'] == $user['side']){
mysql_query("INSERT INTO `clan_memb` SET `id_user` = '".text($profile['id'])."', `id_user2` = '".text($myID)."', `login` = '".text($user['login'])."', `id_clan` = '".text($user['id_clan'])."'");
$_SESSION['msg'] = "Заявка отправлена!";
header('Location: ?');
exit();
}
# юзер в клане или нет #
$acpp = mysql_fetch_array(mysql_query("SELECT SUM(angels) FROM `users` WHERE `id_clan` = '".text($profile['id_clan'])."'"));
$pms = ($money_updater[0]*$p);
$clp = $db->query("SELECT * FROM `clans` WHERE `id` = '".$profile['id_clan']."'")->fetch_assoc();
$cst = ($clp['stat']);
$pcms = (($pms*$cst)/100);
$money_sek_angel = ($pms+$pcms);
$mdsec = ($pms+$pcms);
# время в сикундах #
$tat = (tls(time()-$user[tangels]));
# время в секундах #
### Сбросы ####
if(isset($_GET['angl'])){
$id = abs(intval($_GET['angl']));
$title = 'Сброс ангелов?';
require_once ('system/header.php');
echo "<div class='content'></div>";
echo "<div class='bordered'><center>";
echo'<a class="btni" href="?angels" style="margin-top: 3px; width: 140px;"> Да, сбросить</a><br>';
echo "<a href='/profile/' class='grey' data-ajax>Нет, отмена</a>";
echo "</div></center>";
require_once ('system/footer.php');
exit();
}
if(text(isset($_GET['angels']))){
$id = abs(intval($_GET['angels']));
$angels_bonus = ($user['angels_bonus']+1);
$angels = text(ceil(100*sqrt(($money_sek_angel*$tat)/1000000000)));
$gold = text(2);
$money_sek = text(0);
if($money_sek_angel < 100){
$_SESSION['msg'] = "Ваш доход должен быть больше <img width='20' height='20' src='/img/money_36.png'> ".n_f(100)."";
header('Location: /profile/');
exit();
}else{
mysql_query("UPDATE `room_users` SET `level` = '0', `pay_update` =`pay`, `give_money_sek` = '0', `money_sek` = '0' WHERE `id_user` = '".$myID."'");
mysql_query("UPDATE `users` SET `angels_bonus` = '".text($user['angels_bonus']+1)."', `angels` = '".text($user['angels']+$angels)."', `gold` = '".$gold."', `tangels` = '".time()."' WHERE `id` = '".$myID."'");
header('Location: /profile/');
exit();
}
}
if(isset($_GET['angl_ruby'])){
$id = abs(intval($_GET['angl_ruby']));
$title = 'Сброс ангелов?';
require_once ('system/header.php');
echo "<div class='content'></div>";
echo "<div class='bordered'><center>";
echo'<a class="btni" href="?angels_ruby" style="margin-top: 3px; width: 140px;"> Да, за 250 <img src="/img/ruby.png" alt="$" width="20" height="20"></a><br>';
echo "<a href='/profile/' class='grey' data-ajax>Нет, отмена</a>";
echo "</div></center>";
require_once ('system/footer.php');
exit();
}
if(text(isset($_GET['angels_ruby']))){
$id = abs(intval($_GET['angels_ruby']));
$angels_bonus = text($user['angels_bonus']+1);
$angels = text(ceil(100*sqrt(($money_sek_angel*$tat)/1000000000)));
$ruby = 250;
if($user['ruby'] < $ruby){
$_SESSION['msg'] = "Не хватает <img width='20' height='20' src='/img/ruby.png'> ".n_f(($ruby-$user['ruby']))."";
header('Location: /profile/');
exit();
}else{
mysql_query("UPDATE users SET `angels_bonus` = '".text($user['angels_bonus']+1)."', `angels` = '".text($user['angels']+$angels)."', `tangels` = '".time()."', `ruby` = '".text($user['ruby']-$ruby)."' WHERE `id` = '".$myID."'");
$_SESSION['msg'] = 'Вы успешно сбросили бизнес за рубины';
header('Location: /profile/');
exit();
}
}
## dubl
if(isset($_GET['dubl'])){
$id = abs(intval($_GET['dubl']));
if($user['angels'] < ($user['gold_dubl'])){
header('Location: /profile/ ');
exit();
}else{
mysql_query("UPDATE `users` SET `angels` = '".text($user['angels']-$user['gold_dubl'])."', `dubl` = '".text($user['dubl']+1)."', `x2` = '".text($user['x2']*2)."', `gold_dubl` = '".text($user['gold_dubl']*10)."' WHERE (`id` = '".$myID."')");
}
header('Location: /profile/ ');
exit();
}
## dubl end
## Гражданство
if(isset($_GET['g_buy'])){
$id = abs(intval($_GET['g_buy']));
$g_buy = mysql_fetch_assoc(mysql_query("SELECT * FROM `gr` WHERE `id_up` = '".$id."'"));
if($user['g_cena'] < ($dubl['ruby'])){
header('Location: /profile/ ');
exit();
}else{
$g_buy = mysql_fetch_assoc(mysql_query("SELECT * FROM `gr` WHERE `id_up` = '".$id."'"));
mysql_query("UPDATE `users` SET `ruby` = '".text($user['ruby']-$g_buy['g_cena'])."', `g_id` = '".text($user['g_id']+1)."', `g_x2` = '".text($g_buy['g_x2'])."', `g_cena` = '".text($user['g_cena']*2)."' WHERE (`id` = '".$myID."')");
}
header('Location: /profile/ ');
exit();
}
## Гражданство конец
## Переводы ##
if(text(isset($_GET['perevod100']))){
<?php
require_once ('system/func.php');
auth(); // Закроем от не авторизованных
# Настройки #
$id = abs(intval($_GET['id']));
if($id)$profile = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '".$id."'"));
else $profile = $user;
# Ошибки #
if(!$profile){
$_SESSION['msg'] == 'Такой игрок не существует';
header('Location: /online?search');
exit();
}
if(isset($_GET['clan_memb']) and $myID != $profile['id'] and $user['clan_rang'] > 2 and $profile['id_clan'] == 0 and $profile['side'] == $user['side']){
mysql_query("INSERT INTO `clan_memb` SET `id_user` = '".text($profile['id'])."', `id_user2` = '".text($myID)."', `login` = '".text($user['login'])."', `id_clan` = '".text($user['id_clan'])."'");
$_SESSION['msg'] = "Заявка отправлена!";
header('Location: ?');
exit();
}
# юзер в клане или нет #
$acpp = mysql_fetch_array(mysql_query("SELECT SUM(angels) FROM `users` WHERE `id_clan` = '".text($profile['id_clan'])."'"));
$pms = ($money_updater[0]*$p);
$clp = $db->query("SELECT * FROM `clans` WHERE `id` = '".$profile['id_clan']."'")->fetch_assoc();
$cst = ($clp['stat']);
$pcms = (($pms*$cst)/100);
$money_sek_angel = ($pms+$pcms);
$mdsec = ($pms+$pcms);
# время в сикундах #
$tat = (tls(time()-$user[tangels]));
# время в секундах #
### Сбросы ####
if(isset($_GET['angl'])){
$id = abs(intval($_GET['angl']));
$title = 'Сброс ангелов?';
require_once ('system/header.php');
echo "<div class='content'></div>";
echo "<div class='bordered'><center>";
echo'<a class="btni" href="?angels" style="margin-top: 3px; width: 140px;"> Да, сбросить</a><br>';
echo "<a href='/profile/' class='grey' data-ajax>Нет, отмена</a>";
echo "</div></center>";
require_once ('system/footer.php');
exit();
}
if(text(isset($_GET['angels']))){
$id = abs(intval($_GET['angels']));
$angels_bonus = ($user['angels_bonus']+1);
$angels = text(ceil(100*sqrt(($money_sek_angel*$tat)/1000000000)));
$gold = text(2);
$money_sek = text(0);
if($money_sek_angel < 100){
$_SESSION['msg'] = "Ваш доход должен быть больше <img width='20' height='20' src='/img/money_36.png'> ".n_f(100)."";
header('Location: /profile/');
exit();
}else{
mysql_query("UPDATE `room_users` SET `level` = '0', `pay_update` =`pay`, `give_money_sek` = '0', `money_sek` = '0' WHERE `id_user` = '".$myID."'");
mysql_query("UPDATE `users` SET `angels_bonus` = '".text($user['angels_bonus']+1)."', `angels` = '".text($user['angels']+$angels)."', `gold` = '".$gold."', `tangels` = '".time()."' WHERE `id` = '".$myID."'");
header('Location: /profile/');
exit();
}
}
if(isset($_GET['angl_ruby'])){
$id = abs(intval($_GET['angl_ruby']));
$title = 'Сброс ангелов?';
require_once ('system/header.php');
echo "<div class='content'></div>";
echo "<div class='bordered'><center>";
echo'<a class="btni" href="?angels_ruby" style="margin-top: 3px; width: 140px;"> Да, за 250 <img src="/img/ruby.png" alt="$" width="20" height="20"></a><br>';
echo "<a href='/profile/' class='grey' data-ajax>Нет, отмена</a>";
echo "</div></center>";
require_once ('system/footer.php');
exit();
}
if(text(isset($_GET['angels_ruby']))){
$id = abs(intval($_GET['angels_ruby']));
$angels_bonus = text($user['angels_bonus']+1);
$angels = text(ceil(100*sqrt(($money_sek_angel*$tat)/1000000000)));
$ruby = 250;
if($user['ruby'] < $ruby){
$_SESSION['msg'] = "Не хватает <img width='20' height='20' src='/img/ruby.png'> ".n_f(($ruby-$user['ruby']))."";
header('Location: /profile/');
exit();
}else{
mysql_query("UPDATE users SET `angels_bonus` = '".text($user['angels_bonus']+1)."', `angels` = '".text($user['angels']+$angels)."', `tangels` = '".time()."', `ruby` = '".text($user['ruby']-$ruby)."' WHERE `id` = '".$myID."'");
$_SESSION['msg'] = 'Вы успешно сбросили бизнес за рубины';
header('Location: /profile/');
exit();
}
}
## dubl
if(isset($_GET['dubl'])){
$id = abs(intval($_GET['dubl']));
if($user['angels'] < ($user['gold_dubl'])){
header('Location: /profile/ ');
exit();
}else{
mysql_query("UPDATE `users` SET `angels` = '".text($user['angels']-$user['gold_dubl'])."', `dubl` = '".text($user['dubl']+1)."', `x2` = '".text($user['x2']*2)."', `gold_dubl` = '".text($user['gold_dubl']*10)."' WHERE (`id` = '".$myID."')");
}
header('Location: /profile/ ');
exit();
}
## dubl end
## Гражданство
if(isset($_GET['g_buy'])){
$id = abs(intval($_GET['g_buy']));
$g_buy = mysql_fetch_assoc(mysql_query("SELECT * FROM `gr` WHERE `id_up` = '".$id."'"));
if($user['g_cena'] < ($dubl['ruby'])){
header('Location: /profile/ ');
exit();
}else{
$g_buy = mysql_fetch_assoc(mysql_query("SELECT * FROM `gr` WHERE `id_up` = '".$id."'"));
mysql_query("UPDATE `users` SET `ruby` = '".text($user['ruby']-$g_buy['g_cena'])."', `g_id` = '".text($user['g_id']+1)."', `g_x2` = '".text($g_buy['g_x2'])."', `g_cena` = '".text($user['g_cena']*2)."' WHERE (`id` = '".$myID."')");
}
header('Location: /profile/ ');
exit();
}
## Гражданство конец
## Переводы ##
if(text(isset($_GET['perevod100']))){
Вот скрипт который нужно исправить
------
47870_f7083d0f1d8c0cd216d5bd8e7e63b0a1.zip (5.2 Kb)
Скачиваний: 88
------
Скачиваний: 88
336380461 , тваюж маму про слово обменник кода не слышал????
Коляда , с кодом можешь помочь?