<?php 
include 'zz2.php';
include 'zzsubnav_statistik.php';
if ($loggedin == 1) {
    ?>
<h1><?php 
    echo _('Saisonverlauf');
    ?>
</h1>
<p><?php 
    echo _('Dieses Liniendiagramm zeigt die Entwicklung Deines Tabellenplatzes in der aktuellen Saison. Hinweis: Die Daten können erst nach zwei Spielen angezeigt werden.');
    ?>
</p>
<p>
<?php 
    $torj1 = "SELECT spieltag, platz FROM " . $prefix . "geschichte_tabellen WHERE liga = '" . $cookie_liga . "' AND saison = " . GameTime::getSeason() . " AND team = '" . $cookie_teamname . "' ORDER BY spieltag ASC";
    $torj2 = mysql_query($torj1);
    if (mysql_num_rows($torj2) >= 2) {
        $wertemenge = '';
        $tage = array();
        while ($torj3 = mysql_fetch_assoc($torj2)) {
            $wertemenge .= intval(12 - $torj3['platz']) . ',';
            $tage[] = $torj3['spieltag'];
        }
        if (count($tage) >= 2) {
            // LABELS ANFANG
            $p0 = min($tage);
            $p100 = max($tage);
            $p50 = round(($p0 + $p100) / 2);
            $p33 = round(($p0 + $p50) / 2);
            $p66 = round(($p50 + $p100) / 2);
Ejemplo n.º 2
0
    $sql1 = "SELECT name FROM " . $prefix . "teams WHERE ids = '" . $chosenTeamID . "'";
    $sql2 = mysql_query($sql1);
    if (mysql_num_rows($sql2) == 0) {
        unset($_GET['team']);
        $chosenTeam = '';
    } else {
        $sql3 = mysql_fetch_assoc($sql2);
        $chosenTeam = $sql3['name'];
    }
} else {
    $chosenTeamID = $cookie_team;
    $chosenTeam = $cookie_teamname;
}
?>
<h1><?php 
echo __('Saison %d', GameTime::getSeason());
?>
 - <?php 
echo __('Spiele von %s', $chosenTeam);
?>
</h1>
<?php 
if ($loggedin == 1 || isset($_GET['team'])) {
    if ($loggedin == 1) {
        setTaskDone('team_calender');
    }
    // TYPEN-FILTER ANFANG
    $filterSQL = "";
    $filterTyp = '';
    if (isset($_GET['typ'])) {
        $filterTyp = mysql_real_escape_string(trim(strip_tags($_GET['typ'])));
<?php

if (!isset($_GET['mode'])) {
    include 'zzserver.php';
}
$sql1 = "SELECT ids FROM " . $prefix . "ligen";
$sql2 = mysql_query($sql1);
while ($sql3 = mysql_fetch_assoc($sql2)) {
    $sql4 = "SELECT ids, name, punkte, tore, gegentore FROM " . $prefix . "teams WHERE liga = '" . $sql3['ids'] . "' ORDER BY punkte DESC, (tore-gegentore) DESC, tore DESC";
    $sql5 = mysql_query($sql4);
    $counter = 1;
    while ($sql6 = mysql_fetch_assoc($sql5)) {
        $sql7 = "UPDATE " . $prefix . "teams SET rank = " . $counter . " WHERE ids = '" . $sql6['ids'] . "'";
        $sql8 = mysql_query($sql7);
        if (date('H', time()) == 16 or date('H', time()) == 17) {
            $team = $sql6['name'];
            $punkte = $sql6['punkte'];
            $tore = $sql6['tore'];
            $gegentore = $sql6['gegentore'];
            $in1 = "INSERT INTO " . $prefix . "geschichte_tabellen (saison, spieltag, liga, team, platz, punkte, tore, gegentore) ";
            $in1 .= "VALUES (" . GameTime::getSeason() . ", " . GameTime::getMatchDay() . ", '" . $sql3['ids'] . "', '" . $team . "', " . $counter . ", " . $punkte . ", " . $tore . ", " . $gegentore . ")";
            $in2 = mysql_query($in1);
        }
        $counter++;
    }
}
Ejemplo n.º 4
0
        if (strlen($tmp_liga_cache) > 0) {
            $ersatz_temp = '<strong>' . $cookie_teamname . '</strong>';
            echo str_replace($cookie_teamname, $ersatz_temp, $tmp_liga_cache);
            $temp = TRUE;
        }
    }
}
if ($temp == FALSE) {
    if (GameTime::getMatchDay() > 11) {
        // Hinrunden-Tabelle der aktuellen Saison
        $linkText = _('Hinrunde');
        $linkURL = '/stat_geschichte.php?saison_spieltag=' . GameTime::getSeason() . '-11&liga=' . $temp_liga;
    } else {
        // End-Tabelle der letzten Saison
        $linkText = _('Letzte Saison');
        $linkURL = '/stat_geschichte.php?saison_spieltag=' . intval(GameTime::getSeason() - 1) . '-22&liga=' . $temp_liga;
    }
    $liga1 = "SELECT ids, name, gespielt, isoAlpha2, pkt_gesamt FROM " . $prefix . "ligen WHERE ids = '" . $temp_liga . "'";
    $liga2 = mysql_query($liga1);
    $liga3 = mysql_fetch_assoc($liga2);
    $tmp_liga_cache = '';
    $tmp_liga_cache .= '
<h1>' . _('Tabelle') . '</h1>
<p style="text-align:right"><a href="/stat_torjaegerliste.php?liga=' . $temp_liga . '" class="pagenava">' . _('Torjäger') . '</a> <a href="' . $linkURL . '" class="pagenava">' . $linkText . '</a></p>
<table>
<thead>
<tr class="odd">
<th scope="col"><img src="/images/flaggen/' . $liga3["isoAlpha2"] . '.png" alt="" /></th>
<th scope="col">' . _('Team') . '</th>
<th scope="col">' . _('SP') . '</th>';
    $tmp_liga_cache .= '<th scope="col">' . _('S-U-N') . '</th>';
Ejemplo n.º 5
0
        echo '<tr><td>' . _('Nächster Jugendspieler') . '</td><td>' . $nextYouth . ' (' . __('Spieltag %d', $nextYouthDay) . ')</td></tr>';
        ?>
	<tr class="odd"><td><?php 
        echo _('Testspiele');
        ?>
</td><td class="link"><a href="/testspiele.php">
		<?php 
        if ($vd3['wantTests'] == 1) {
            echo _('Interessiert');
        } else {
            echo _('Kein Interesse');
        }
        ?>
	</a></td></tr>
	<tr><td colspan="2"><?php 
        echo '<img style="vertical-align: middle;" alt="Systemzeit" src="/images/clock.gif" width="16" /> ' . __('Saison %d', GameTime::getSeason()) . ' &middot; ' . __('Spieltag %d', GameTime::getMatchDay()) . ' &middot; ' . __('%s Uhr', date('d.m.Y, H:i'));
        ?>
</td></tr>
	</tbody>
	</table>
	<?php 
        $in_14_tagen = getTimestamp('+14 days');
        $auslauf1 = "SELECT ids, vorname, nachname, vertrag, gehalt, wiealt FROM " . $prefix . "spieler WHERE team = '" . $cookie_team . "' ORDER BY vertrag ASC LIMIT 0, 10";
        $auslauf2 = mysql_query($auslauf1);
        $auslauf2a = mysql_num_rows($auslauf2);
        if ($auslauf2a > 0) {
            ?>
	<h1><?php 
            echo _('Kürzeste Verträge');
            ?>
</h1>
    ?>
</th>
<th scope="col"><?php 
    echo intval(GameTime::getSeason() - 1);
    ?>
</th>
<th scope="col"><?php 
    echo intval(GameTime::getSeason() - 2);
    ?>
</th>
<th scope="col"><?php 
    echo intval(GameTime::getSeason() - 3);
    ?>
</th>
<th scope="col"><?php 
    echo intval(GameTime::getSeason() - 4);
    ?>
</th>
</tr>
</thead>
<tbody>
<?php 
    setTaskDone('check_5yearsranking');
    $sql1 = "SELECT ids, name, pkt_saison1, pkt_saison2, pkt_saison3, pkt_saison4, pkt_saison5, pkt_gesamt FROM " . $prefix . "ligen WHERE hoch = 'KEINE' ORDER BY pkt_gesamt DESC, pkt_saison1 DESC, pkt_saison2 DESC, pkt_saison3 DESC, pkt_saison4 DESC, pkt_saison5 DESC LIMIT 0, 13";
    $sql2 = mysql_query($sql1);
    $counter = 1;
    while ($sql3 = mysql_fetch_assoc($sql2)) {
        if ($counter <= 6) {
            echo '<tr class="tabelle_3startplaetze">';
        } elseif ($counter % 2 == 1) {
            echo '<tr>';
                echo '<td class="link"><a href="/manager_der_saison.php?wahl_id=' . $sql3['ids'] . '&amp;sec_id=' . $sec_id . '" onclick="return confirm(' . _('\'Bist Du sicher?\'') . ')">' . _('Klicken') . '</a></td>';
                echo '</tr>';
                $counter++;
            }
            ?>
</tbody>
</table>
<?php 
        }
    } else {
        // AUSWERTUNG ANFANG
        $sql1 = "SELECT a.manager, b.username, (COUNT(*)/(SELECT COUNT(*) FROM " . $prefix . "users_mds)*100) AS prozent FROM " . $prefix . "users_mds AS a JOIN " . $prefix . "users AS b ON a.manager = b.ids GROUP BY a.manager ORDER BY prozent DESC, b.regdate DESC LIMIT 0, 1";
        $sql2 = mysql_query($sql1);
        if (mysql_num_rows($sql2) == 1) {
            $sql3 = mysql_fetch_assoc($sql2);
            $sql4 = "INSERT INTO " . $prefix . "users_mds_sieger (saison, ids, username, stimmen) VALUES (" . GameTime::getSeason() . ", '" . $sql3['manager'] . "', '" . mysql_real_escape_string($sql3['username']) . "', " . $sql3['prozent'] . ")";
            $sql5 = mysql_query($sql4);
            $sql6 = "TRUNCATE TABLE " . $prefix . "users_mds";
            $sql7 = mysql_query($sql6);
        }
        // AUSWERTUNG ENDE
        echo '<h1>' . _('Bisherige Sieger') . '</h1>';
        echo '<p><table><thead><tr class="odd"><th scope="col">' . _('Saison') . '</th><th scope="col">' . _('Manager') . '</th><th scope="col">' . _('Stimmen') . '</th></tr></thead><tbody>';
        $get1 = "SELECT a.saison, a.ids, b.username, a.stimmen FROM " . $prefix . "users_mds_sieger AS a JOIN " . $prefix . "users AS b ON a.ids = b.ids ORDER BY a.saison DESC";
        $get2 = mysql_query($get1);
        $counter = 0;
        while ($get3 = mysql_fetch_assoc($get2)) {
            if ($counter % 2 == 1) {
                echo '<tr>';
            } else {
                echo '<tr class="odd">';