-
Notifications
You must be signed in to change notification settings - Fork 0
/
world.php
executable file
·99 lines (84 loc) · 2.96 KB
/
world.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
function showCountries($session_buzz)
{
// Include language file for translations
//include("./lang/lang-en.php");
?>
<center>
<table class="sortable">
<thead>
<tr>
<th class="header"><a href="#">#</a></td>
<th class="header"> </td>
<th class="header" align="center"><a href="#">Name</a></td>
<th class="header" align="center"><a href="#">Divisions</a></td>
<th class="header" align="center"><a href="#">First Season</a></td>
<th class="header" align="center"><a href="#">Users</a></td>
</tr>
</thead>
<tbody>
<?
$i=0;//counter for row
$mysqli = new mysqli('DATABASE SERVER','DATABASE USERNAME','DATABASE PASSWORD','DATABASE NAME');
$mysqli->set_charset("utf8");
$query = "
SELECT
c.id, c.name, c.divisions, c.firstSeason, c.users
FROM
countries c
ORDER BY id ASC
";
$items = $mysqli->query($query);
while ($return = mysqli_fetch_array($items))
{
?>
<tr>
<td align="center"><a href="country.php?country=<? echo $return['id']; ?>" rel="nofollow"><? echo $return['id']; ?></a></td>
<td><a href="country.php?country=<? echo $return['id']; ?>" rel="nofollow"><img border=0 title='<? echo $return['name']; ?>' src='http://<? echo $_SESSION['buzzImages']; ?>/images/flags/flag_<? echo $return['id']; ?>.gif' /></a></td>
<td><a href="country.php?country=<? echo $return['id']; ?>" rel="nofollow"><?
if ($return['translated']) echo $return['translated'];
else echo $return['name']; ?></a></td>
<td align="center"><? echo $return['divisions']; ?></td>
<td align="center"><? echo $return['firstSeason']; ?></td>
<td align="center"><? echo $return['users']; ?></td>
</tr>
<?
}
?>
</tbody>
</table>
</center>
<?
$mysqli->close();
}
include("header.php");
$_SESSION['returnPage'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
?>
<div id="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent" style="text-align:center">
<p> </p>
<a href="/ntscout.php">NT Scouter</a> | <a href="/visitors.php">Visitor Breakdown</a> | <a href="/world.php">World View</a>
<p> </p>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
</div>
<div id="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<p> </p>
<?
if ($_SESSION['id']==38596){
echo "UPDATING COUNTRIES.";
updateCountries($update_time,$_SESSION['id'],$_SESSION['bbusername'],$_SESSION['bbaccesskey'],$_SESSION['buzzWebsite']);
}
?>
<center><h1>Countries of the World</h1></center>
<?
showCountries($_SESSION['buzzWebsite']);
?>
<p> </p>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
</div>
<?php include("footer.php"); ?>