Файл: LinkMod/LinkSnow.php
Строк: 166
<?php
if(isset($_GET['Final'])){
echo '
<div class="feedbackPanel textshadow">
<div class="whiteBoldLink textshadow center">Ты занял '.$snow['mesto'].' место.</div>
<div>
Награда:
</div>
+<span class="title"><span class="expirience nobr textshadow">
<img height="16" width="16" src="images/icons/level.png"> <span>'.$snow['plus_rating'].'</span>
</span></span>
+<span><span class="money nobr textshadow">
<img width="16" height="16" src="images/icons/ruby.png" alt=""/>
<span>'.$snow['plus_rubies'].'</span></span></span>
<div class="pt12">
<a class="btn" href="?LinkSnow">Продолжить</a>
</div>
</div>
</div>';
}
if(isset($_GET['LinkStart'])){
$rubies = rand(1,10);
/////////////////////////
$taty = rand(10,100);
if(isset($user['dom_exp']))$dom = (($taty/100)*$user['dom_exp']);else$dom = 1;
if(isset($user['dom_bone']))$bone = (($taty/100)*$user['bone_exp']);else$bone = 1;
$rat_user = $taty+$dom+$bone;
/////////////////////////
if($snow['col'] == 0){
mysql_query("UPDATE `mystyle_snow` SET `plus_rubies` = '$rubies', `plus_rating` = '$rat_user', `rating` = '".($snow['rating']+$taty)."', `time` = '".($time+1800)."', `col` = '".($snow['col']+3)."' WHERE `user` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `mystyle_user` SET `ruby` = '".($user['ruby']+$rubies)."', `rating` = '".($user['rating']+$rat_user)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `mystyle_game3` SET `col2` = '0', `col` = '3' WHERE `user` = '$user[id]' LIMIT 1");
if($ver3['col2'] == $ver3['col']){
mysql_query("UPDATE `mystyle_zadaniya_user` SET `type` = 'yes' WHERE `limit` = '3' AND `user` = '".$user['id']."'");
}else{
$stc = 1;
mysql_query("UPDATE `mystyle_zadaniya_user` SET `col2` = '".($ver3['col2']+$stc)."' WHERE `limit` = '3' AND `user` = '".$user['id']."'");
}
header("Location: ?LinkSnow&Final");
exit;
}elseif($snow['time'] < $time){
if($snow['list'] == 1){
mysql_query("UPDATE `mystyle_snow` SET `time` = '$time', `rating` = '".($snow['rating']+$taty)."', `time` = '".($time+600)."', `list` = '".($snow['list']+4)."', `col` = '".($snow['col']-1)."' WHERE `user` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `mystyle_game3` SET `col2` = '".($user_v3['col2']+1)."' WHERE `user` = '$user[id]' LIMIT 1");
}else{
mysql_query("UPDATE `mystyle_snow` SET `rating` = '".($snow['rating']+$taty)."', `list` = '".($snow['list']-1)."' WHERE `user` = '$user[id]' LIMIT 1");
}
}else{
}///time
header("Location: ?LinkSnow");
exit;
}
if($snow['col'] == 1)$name = 'Финал';
if($snow['col'] == 2)$name = 'Выборочный финал';
if($snow['col'] == 3)$name = 'Начало';
if($snow['col'] == 0)$name = 'Обшмонать карманы';
echo '<div class="whiteBoldLink textshadow center pt12 pb6">Драка, '.$name.'</div>';
echo '<div class="body feedbackPanel textshadow">
Сейчас ты на <strong><span>'.$snow['mesto'].'</span></strong> месте.
</div>';
if($snow['col'] == 0){
echo '<a class="btnm center whiteBoldLink" href="?LinkSnow&LinkStart">
<span>Шмонать карман</span>
</a>';
}elseif($snow['time'] < time()){
if($snow['list'] == 5){
echo '<a class="btnm center whiteBoldLink" href="?LinkSnow&LinkStart">
<span>Бить с ноги</span>
</a>';
}elseif($snow['list'] == 4){
echo '<a class="btnm center whiteBoldLink" href="?LinkSnow&LinkStart">
<span>Ударить в ухо</span>
</a>';
}elseif($snow['list'] == 3){
echo '<a class="btnm center whiteBoldLink" href="?LinkSnow&LinkStart">
<span>Ударить с колена</span>
</a>';
}elseif($snow['list'] == 2){
echo '<a class="btnm center whiteBoldLink" href="?LinkSnow&LinkStart">
<span>Достать нож</span>
</a>';
}elseif($snow['list'] == 1){
echo '<a class="btnm center whiteBoldLink" href="?LinkSnow&LinkStart">
<span>Пырануть ножом</span>
</a>';
}}else{
echo '<a class="btnm center whiteBoldLink" href="index.php?">
<span>Драка через '.time_left($snow['time']-$time).'</span>
</a>';
}
echo '<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">';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_snow` ORDER BY `rating` DESC"),0);
if ($k_post==0)
{
echo "Пусто!";
}
$k_page=k_page($k_post,$user['set']);
$page=page($k_page);
$start=$user['set']*$page-$user['set'];
$q=mysql_query("SELECT * FROM `mystyle_snow` ORDER BY `rating` DESC LIMIT $start, $user[set]");
echo '<ul>';
while($post=mysql_fetch_array($q))
{
$sr = $start+1;
if($post['user'] == $user['id']){
mysql_query("UPDATE `mystyle_snow` SET `mesto` = '$sr' WHERE `user` = '$user[id]' LIMIT 1");
}else{
}
echo '<tr class="blueSecColor textshadow">
<td>'.$sr.'</td>
<td>
<span class="nobr">';
if($post['user'] == $user['id']){
echo '<b>'.users($post['user']).'</b>';
}else{
echo ''.users($post['user']).'';
}
echo '</span>
</td>
<td>';
if($post['rating']){
echo ''.$post['rating'].'';
}else{ echo '0'; }
echo '</td>
</tr>';
$start++;
}
echo '</table></div></div></div>';
echo '<div class="center pt12 pb18">';
if ($k_page>1)str("?LinkSnow&",$k_page,$page);
echo '</div></div></div>';
?>