Файл: test.zfarm.mobi/mystylefutboll/linkreg.php
Строк: 38
<?php
/////////////////////////
/*
Author MyStyle ZomBi.Biz
Год 2013 Права предоставлены автору Шехову Виталию Александровичу
http://vk.com/online_user
*/
/////////////////////////
what(0, 'futboll');
$user_fut = mysql_query("SELECT * FROM `mystyle_futboll` WHERE `user` = '".$user['id']."'");
while($boll=mysql_fetch_array($user_fut))
{
header("Location: ./?futbollcommand");
exit;
}
if(isset($_GET['start']) && num($_GET['start'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_shop_futboll` WHERE `id` = '".num($_GET['start'])."'"),0)!=0){
$fer = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_shop_futboll` WHERE `id` = '".num($_GET['start'])."'"));
$need=$fer['money'];
if($user['ruby']>=$need){
///////// Лог Пользователя ///// By MyStyle
$time_log = $time+2; /// На 2 сек
$text = 'Команда куплена.';
mysql_query("INSERT INTO `mystyle_futboll` SET `flag` = '".$fer['flag']."', `user` = '".$user['id']."', `name_club` = '".$fer['name']."', `date` = '".$time."'");
$post=mysql_insert_id();
$cash = $user['ruby']-$fer['money'];
update_user('id_futboll',$post);
update_user('ruby',$cash);
header("Location: ?futbollcommand");
exit;
}else{
err_ruby($need-$user['ruby']);
}
}
echo '<div class="feedbackPanel">Регистрация футбольной команды.</div><div>
<div><table class="center pt6 pb6" style="margin:0 auto; width: 80%;">
<tr class="whiteBoldLink textshadow">
<td>Флаг</td>
<td>Цена</td>
<td>Купить</td>
</tr><tr class="blueSecColor textshadow">';
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_shop_futboll`"),0);
if ($k_post==0){
}
$k_page=k_page($k_post,$user['set']);
$page=page($k_page);
$start=$user['set']*$page-$user['set'];
$q=mysql_query("SELECT * FROM `mystyle_shop_futboll` LIMIT $start, $user[set]");
echo '<ul>';
while($post=mysql_fetch_array($q))
{
$sr = $start+1;
echo '<tr class="blueSecColor textshadow">
<td><img width="35" height="35" src="images/futboll/'.$post['flag'].'.png" alt="" /></td>
<td><span class="money nobr textshadow"> <span>'.$post['name'].'</span></td>
<td><span class="money nobr textshadow"><img width="16" height="16" src="images/zombi/cash.png" alt=""/> <span>'.$post['money'].'</span></td>
<td><a class="btnp" href="?linkregfutboll&start='.$post['id'].'">Купить</a><br /><br /></td>
</tr>';
$start++;
}
echo '</table></div></div></div>';
?>