Файл: Space race/tuning.php
Строк: 183
<?php include_once('classes/check.class.php'); ?>
<?php include_once('header.php'); ?>
<?php if( protectThis("*") ) : ?>
<?php
$viewer_id = $_SESSION['starrace']['user_id'];
$sql=mysql_query("select `godmode`,`speed`, `maxspeed`, `thrust`, `maxthrust`, `bspeed`, `maxbspeed`, `shielddamage`, `maxshielddamage`, `airbrake`, `maxairbrake`, `angularspeed`, `maxangularspeed`, `bonus`, `score` from $dbName.login_users where `user_id`='$viewer_id'");
$result=mysql_fetch_array($sql);
$godmode = $result[godmode];
$speed = $result[speed];
$airbrake = $result[airbrake];
$angularspeed = $result[angularspeed];
$maxangularspeed = $result[maxangularspeed];
$shielddamage = $result[shielddamage];
$bspeed = $result[bspeed];
$thrust = $result[thrust];
$maxspeed = $result[maxspeed];
$maxairbrake = $result[maxairbrake];
$maxshielddamage = $result[maxshielddamage];
$maxbspeed = $result[maxbspeed];
$maxthrust = $result[maxthrust];
$bonus = $result[bonus];
$score = $result[score];
?>
<script>
var viewer_id = "<?php echo $viewer_id; ?>";
</script>
<div >
<center>
<img src="css/title.png" style="width: 30%;margin-top: 10px;transform: translateZ(0);animation: anim 3s ease-in-out infinite;">
<div id="result_id">
<div>
<form method="post" action="upgrade.php" id="formMain">
<div class=="tuning100">
<div class="tuning50">
<span class="rangetitle">СКОРОСТЬ</span> <a <?php if ($bonus < 1 OR $maxspeed >= 15) echo 'style="display:none;"'; ?> href="up.php?up=1"><img class="addbonus" src="css/plus.png"></a>
<div id="rangetext" class="speed"><?php echo $speed; ?></div>
<input type="range" name="speed" id="speed" min="1" max="<?php echo $maxspeed; ?>" step="0.5" value="<?php echo $speed; ?>">
<script>
$('input[id="speed"]').on('change mousemove', function(){
$('.speed').html($(this).val());});
</script>
</div>
<div class="tuning50">
<span class="rangetitle">УСКОРЕНИЕ</span><a <?php if ($bonus < 1 OR $maxbspeed >= 0.95) echo 'style="display:none;"'; ?> href="up.php?up=2"> <img class="addbonus" src="css/plus.png"></a>
<div id="rangetext" class="bspeed"><?php echo $bspeed; ?></div>
<input type="range" name="bspeed" id="bspeed" min="0.05" max="<?php echo $maxbspeed; ?>" step="0.05" value="<?php echo $bspeed; ?>">
<script>
$('input[id="bspeed"]').on('change mousemove', function(){
$('.bspeed').html($(this).val());});
</script>
</div>
<br>
<div class="tuning50">
<span class="rangetitle">ТОРМОЗА </span> <a <?php if ($bonus < 1 OR $maxairbrake >= 0.1) echo 'style="display:none;"'; ?> href="up.php?up=3"> <img class="addbonus" src="css/plus.png"></a>
<div id="rangetext" class="airbrake"><?php echo $airbrake; ?></div>
<input type="range" name="airbrake" id="airbrake" min="0.001" max="<?php echo $maxairbrake; ?>" step="0.001" value="<?php echo $airbrake; ?>">
<script>
$('input[id="airbrake"]').on('change mousemove', function(){
$('.airbrake').html($(this).val());});
</script>
</div>
<div class="tuning50">
<span class="rangetitle">ПОВРЕЖДЕНИЯ</span> <a <?php if ($bonus < 1 OR $maxshielddamage <= 0.01) echo 'style="display:none;"'; ?> href="up.php?up=4"> <img class="addbonus" src="css/minus.png"></a>
<div id="rangetext" id="shielddamage" class="shielddamage"><?php echo $shielddamage; ?></div>
<input type="range" name="shielddamage" id="shielddamage" min="<?php echo $maxshielddamage; ?>" max="0.06" step="0.01" value="<?php echo $shielddamage; ?>">
<!-- Cкрипт результатов над ползунком -->
<script>
$('input[id="shielddamage"]').on('change mousemove', function(){
$('.shielddamage').html($(this).val());});
</script>
</div>
<br>
<div class="tuning50">
<span class="rangetitle">УГЛОВАЯ СКОРОСТЬ</span> <a <?php if ($bonus < 1 OR $maxangularspeed >= 0.05) echo 'style="display:none;"'; ?> href="up.php?up=5"> <img class="addbonus" src="css/plus.png"></a>
<div id="rangetext" id="angularspeed " class="angularspeed "><?php echo $angularspeed ; ?></div>
<input type="range" name="angularspeed" id="angularspeed" min="0.001" max="<?php echo $maxangularspeed; ?>" step="0.001" value="<?php echo $angularspeed; ?>">
<!-- Cкрипт результатов над ползунком -->
<script>
$('input[id="angularspeed"]').on('change mousemove', function(){
$('.angularspeed').html($(this).val());});
</script>
</div>
<div class="tuning50">
<span class="rangetitle">РЫВОК С МЕСТА</span> <a <?php if ($bonus < 1 OR $maxthrust >= 0.08) echo 'style="display:none;"'; ?> href="up.php?up=6"> <img class="addbonus" src="css/plus.png"></a>
<div id="rangetext" id="thrust" class="thrust"><?php echo $thrust; ?></div>
<input type="range" name="thrust" id="thrust" min="0.01" max="<?php echo $maxthrust; ?>" step="0.01" value="<?php echo $thrust; ?>">
<!-- Cкрипт результатов над ползунком -->
<script>
$('input[id="thrust"]').on('change mousemove', function(){
$('.thrust').html($(this).val());});
</script>
</div>
<br>
<input type="hidden" name="viewer_id" value="<?php echo $viewer_id; ?>">
<input type="hidden" name="auth_key" value="<?php echo $auth_key; ?>">
<input type="submit" class="sendbutton" value="отправить" />
</div>
</form>
<div class="bonus" ><img src="css/star.png">
<?php if ($bonus < 1){
echo "<a href='pay.php' id='add_btn' >КУПИТЬ БОНУСЫ</a>";
}
else {
echo $bonus;
}
?>
</div>
</div>
</div>
</center>
</div>
<?php else : ?>
<div class="alert alert-warning">ДОСТУП К ИГРЕ ВОЗМОЖЕН ТОЛЬКО ДЛЯ ЗАРЕГИСТРИРОВАННЫХ ПОЛЬЗОВАТЕЛЕЙ.<br><br> <a href="login.php">ВОЙДИТЕ</a> или <a href="sign_up.php">ЗАРЕГИСТРИРУЙТЕСЬ</a></div>
<?php endif; ?>
<?php include_once('footer.php'); ?>