Файл: iwup.biz/buksobguest.php
Строк: 65
<?php
$mt=microtime(1);
$time=time();
include('db.php');
include('ses.php');
include('auth.php');
include('nast.php');
include('shapka.php');
if(!isset($_SESSION['kod']))
$_SESSION['kod']=rand(1,1000);
print "<a href="reg.php">Регистрация</a><br />";
print "<a href="index.php">Авторизация</a><br />";
$id=intval($_GET['id']);
$result=mysql_query("SELECT * from `buks` WHERE `id`='$id'");
if(!mysql_num_rows($result))
print '</div><div class="top">Ставки: ошибка<br /></div><div>';
else
{
$match=mysql_fetch_assoc($result);
$infodir=mysql_fetch_assoc(mysql_query("SELECT * from `bukr` WHERE `id`='$match[rid]'"));
print "</div><div class="top">Ставки: $infodir[name]<br /></div><div>";
$dateend=date('d/m/Y H:i',$match['timeend']);
$datestart=date('d/m/Y H:i',$match['timestart']);
print "<b>Название: $match[name]<br /></b>
Описание: $match[opis]<br />
Ставки принимаются до: $dateend<br />
Начало: $datestart<br />";
if($match['timestart']<=time() and $match['status']>2)
print "Результаты пока не опубликованы<br />";
elseif($match['timestart']<=time() and $match['status']<=2)
print "Результаты: $match[komment](вариант $match[result])<br />";
elseif(time()>$match['timeend'] or $match['status']<=2)
print "Ставки больше не принимаются<br />";
else
print "Только авторизованные пользователи могут делать ставки<br />";
//Вычисляю общую сумму вложений
$summa=0;
$n=1;
while($match["st$n"])
{
$summa+=$match["st$n"];
$n++;
}
print '</div><div class="top">Возможные варианты:<br /></div><div>';
$n=1;
while($match["st$n"])
{
$percent=round($match['st'.$n]/$summa,4)*100;
$koef=round(1/($percent/100),2)*0.95;
if($koef<1.005)
$koef=1.005;
print "#$n. ".$match["v$n"]."($percent% )<br />";
print "Текущий коэффициент: 1 : $koef<br />";
print "Всего ставок на этот исход: ".($match['st'.$n])." р.<br />";
$n++;
if(@$match["st$n"])
print $razd;
}
if($match['timestart']<=time() and $match['status']>2)
print "Результаты пока не опубликованы<br />";
elseif($match['timestart']<=time() and $match['status']<=2)
print "Результаты: $match[komment](вариант $match[result])<br />";
elseif(time()>$match['timeend'] or $match['status']<=2)
print "Ставки больше не принимаются<br />";
else
print "Вы не можете делать ставки, пока не зарегистрируетесь<br />";
print "</div><div class="down"><a href="index.php">Игровой клуб</a><br /></div><div>";
}
include('foot.php'); ?>