-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
64 lines (60 loc) · 3.15 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
include (dirname(__FILE__).'/../../inc.conf.php');
include (dirname(__FILE__).'/../../inhalt/inc.hilfsfunktionen.php');
open_db();
include ('xstatsUtil.php');
include ('xstatsVersion.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<head>
<title>Skrupel XStats - Liste der Spiele</title>
<meta name="language" content="de" />
<meta http-equiv="Content-Language" content="de_DE" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link type="text/css" rel="stylesheet" href="xstats.css" media="screen" />
</head>
<body>
<div id="logo">
<?php echo( xstats_getVersionStr() ); ?>
<img src="images/skrupel_logo.png" alt="" />
</div>
<div class="borderedBoxWrap">
<div class="borderedBox">
<div class="borderedBoxInner">
<ul class="listGames">
<?php
$result = @mysql_query("SELECT * FROM skrupel_spiele") or die(mysql_error());
$gameCount = 0;
while ($row = mysql_fetch_array($result)) {
echo( '<li>' );
$statsGameId = $row['id'];
$gameCount++;
$statsGameDisplay = '<strong>' . $row['name'] . '</strong>';
$statsAvailableIds = xstats_getAvailablePlayerIndicies($statsGameId);
$statsSize = $row['umfang'] . 'x' . $row['umfang'];
$statsGameDisplay = $statsGameDisplay . ' (' . count($statsAvailableIds) . ' Spieler, ' . $statsSize . ')';
if (xstats_gameIsFinished($statsGameId)) {
if (xstats_gameExistsInStats($statsGameId)) {
echo( $statsGameDisplay . ' <a href="DisplaySingleGame.php?gameid=' . $statsGameId . '&outputtype=IMAGE" target="_new">Bildversion</a>' .
' <a href="DisplaySingleGame.php?gameid=' . $statsGameId . '&outputtype=FLASH" target="_new">Flashversion</a>');
}else{
echo( $statsGameDisplay . ' (Keine Statistikaufzeichnungen verfügbar)');
}
} else {
echo( $statsGameDisplay . "<i> (Keine Statistik verfügbar, Spiel ist noch nicht beendet)</i>" );
}
echo( '</li>');
}
if ($gameCount == 0) {
echo( "Es ist leider kein Spiel verfügbar.");
}
?>
</ul>
</div>
</div>
</div><!-- /end .borderedBoxWrap -->
</body>
</html>