コード例 #1
0
ファイル: Round_History.php プロジェクト: Aliga8or/IKTS
<?php

require_once 'Connection.php';
require_once 'Ikts.class.php';
require_once 'Session.php';
Ikts::getGlobals();
$player = $_SESSION['player'];
$ttab = "";
for ($round = Ikts::$curr_round - 1; $round >= 1; $round--) {
    $ttab .= "<div class='eList' >\n\t\t\t";
    $ttab .= "<table>\n\t\t\t ";
    $ttab .= "<tr class='tabHeader' ><td colspan=5 > Round " . $round . " </td> <td></td> </tr>\n\t\t\t ";
    $query = "select * from main where player='" . $player . "' and round='" . $round . "' and confirmed=1 ";
    $result = mysql_query($query) or die("Error in query: {$query}. " . mysql_error());
    while ($main = mysql_fetch_assoc($result)) {
        $query1 = "select * from fixture where fid='" . $main['fixture'] . "' ";
        $result1 = mysql_query($query1) or die("Error in query: {$query1}. " . mysql_error());
        if ($fixture = mysql_fetch_assoc($result1)) {
            $ttab .= "<tr class='row" . $main['pts'] . "' >\n\t\t\t\t\t\t ";
            $ttab .= "<td>" . $fixture['teamA'] . "</td>\n\t\t\t\t\t\t ";
            $ttab .= "<td>" . $main['predA'] . "-" . $main['predB'] . "</td>\n\t\t\t\t\t\t ";
            $ttab .= "<td>" . $fixture['teamB'] . "</td>\n\t\t\t\t\t\t ";
            if ($main['banker']) {
                $ttab .= "<td><img src='img/banker_on.png' width='" . IMG_SIZE . "' height='" . IMG_SIZE . "' ></td>\n\t\t\t\t\t\t\t ";
            } else {
                $ttab .= "<td><img src='img/banker_off.png' width='" . IMG_SIZE . "' height='" . IMG_SIZE . "' style='opacity: 0.4; filter: alpha(opacity=40);' ></td>\n\t\t\t\t\t\t\t ";
            }
            if ($main['risk']) {
                $ttab .= "<td><img src='img/risk_on.png' width='" . IMG_SIZE . "' height='" . IMG_SIZE . "' ></td>\n\t\t\t\t\t\t\t ";
            } else {
                $ttab .= "<td><img src='img/risk_off.png' width='" . IMG_SIZE . "' height='" . IMG_SIZE . "' style='opacity: 0.4; filter: alpha(opacity=40);' ></td>\n\t\t\t\t\t\t\t ";