$db->query("UPDATE users SET money=money+1 WHERE userid='{$ir['userid']}'");
                    $db->query("UPDATE slots_stats SET houseprofit=houseprofit-1");
                }
                print "You bet \${$betamt}.<br /><br />";
                $db->query("UPDATE users SET money=money-{$betamt} WHERE userid='{$ir['userid']}'");
                $db->query("UPDATE slots_stats SET plays=plays+1, houseprofit=houseprofit+{$betamt}");
                $reel1 = rand(1, 64);
                $reel2 = rand(1, 64);
                $reel3 = rand(1, 64);
                $re1 = $db->query("SELECT reel1,reel1aft,reel1bef FROM slot_reel WHERE id={$reel1}");
                $r1 = $db->fetch_row($re1);
                $re2 = $db->query("SELECT reel2,reel2aft,reel2bef FROM slot_reel WHERE id={$reel2}");
                $r2 = $db->fetch_row($re2);
                $re3 = $db->query("SELECT reel3,reel3aft,reel3bef FROM slot_reel WHERE id={$reel3}");
                $r3 = $db->fetch_row($re3);
                $score = getscore($r1['reel1'], $r2['reel2'], $r3['reel3']);
                $winamount = $score[1] * $betamt;
                $r1img = $r1['reel1'];
                $r2img = $r2['reel2'];
                $r3img = $r3['reel3'];
                ?>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr><td colspan=5>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><img src="images/slots/<?php 
                print $r1['reel1bef'];
                ?>
btm.PNG" border="0"></td><td width="9"></td><td><img src="images/slots/<?php 
                print $r2['reel2bef'];
                ?>
btm.PNG" border="0"></td><td width="9"></td><td><img src="images/slots/<?php 
                print $r3['reel3bef'];
Пример #2
0
    $signxorder = $sign * $order;
    $signxorderpseconds = $signxorder + $seconds;
    $score = round($signxorderpseconds / 45000, 7);
    return $score;
}
$query = $conn->prepare("SELECT * FROM posts ORDER BY id DESC LIMIT 100");
$query->execute();
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
    $postid = $row['postid'];
    $userid = $row['user'];
    $title = $row['title'];
    $tagling = $row['tagline'];
    $link = $row['link'];
    $post_time = $row['post_time'];
    $total_votes = totalvotes($postid, $conn);
    $hotrank = getscore($total_votes, $post_time);
    $isvoted = isuservoted($postid, $conn);
    $gu = $conn->prepare("SELECT * FROM users WHERE userid = :id LIMIT 1");
    $gu->execute(array(':id' => $userid));
    $gur = $gu->fetch(PDO::FETCH_ASSOC);
    $user_name = $gur['name'];
    $user_propic = $gur['propic'];
    $gcoms = totalcomments($postid, $conn);
    $allposts[] = ['datalink' => $postid, 'user_id' => $userid, 'upropic' => $user_propic, 'user' => $user_name, 'title' => $title, 'tag_line' => $tagling, 'post_url' => $link, 'votecount' => $total_votes, 'hot_rank' => $hotrank, 'isVoted' => $isvoted, 'post_time' => $post_time, 'num_comments' => $gcoms];
}
usort($allposts, function ($a, $b) {
    return $a['hot_rank'] < $b['hot_rank'] ? -1 : 1;
    //   return $a['hot_rank'] - $b['hot_rank'];
});
$rsl = array_reverse($allposts);
$sl = array_slice($rsl, 0, 20);
Пример #3
0
        break;
    case "vodgood":
    case "vodbad":
        voddigg();
        break;
    case "diypage":
        diypage();
        break;
    case "desktop":
        desktop();
        break;
    case "score":
        score();
        break;
    case "getscore":
        getscore();
        break;
    case "userfav":
        userfav();
        break;
    default:
        main();
        break;
}
dispseObj();
function main()
{
}
function goodbad()
{
    global $db, $action, $id;