-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·148 lines (136 loc) · 5.11 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?php 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">
<div style="margin:0 auto 0 auto;">
<?php
flush();
$mysqli = new mysqli('DATABASE SERVER','DATABASE USERNAME','DATABASE PASSWORD','DATABASE NAME');
$mysqli->set_charset("utf8");
$query = "SELECT * FROM site_content
WHERE language='eng'
AND page='1' AND section='1'
ORDER BY `order` ASC";
$items = $mysqli->query($query) or die("ERROR (SC.1): Site Content Query Failed!");
while ($return = mysqli_fetch_array($items))
{ ?>
<div style="text-align:center">
<h2><?php
$ident = $return['page']."_".$return['section']."_".$return['order'];
echo googTrans($ident."_t","en",$lang,$return['title']); ?></h2>
<?php $content = googTrans($ident."_c","en",$lang,$return['content']);
if ($content) echo "<span style='text-style:italic;'>".$content."</span>";
?>
</div>
<?php } ?>
<table cellpadding="5" cellspacing="10">
<?php
// Output main page content
$query = "SELECT * FROM site_content
WHERE language='eng'
AND page='1' AND section='2'
ORDER BY `order` ASC";
$items = $mysqli->query($query) or die("ERROR (SC.2): Site Content Query Failed! Query Failed!");
while ($return = mysqli_fetch_array($items))
{
?>
<tr>
<th align="right" valign="top"><?php
$ident = $return['page']."_".$return['section']."_".$return['order'];
echo googTrans($ident."_t","en",$lang,$return['title']); ?></th>
<td><?php echo googTrans($ident."_c","en",$lang,$return['content']); ?></td>
</tr>
<?php } ?>
</table>
</div>
<p> </p>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
<div id="news_section">
<div id="news1">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<table>
<?php
$query = "SELECT * FROM site_content
WHERE language='eng'
AND page='1' AND section='3' AND `order`='1'";
$items = $mysqli->query($query) or die("ERROR (SC.3): Site Content Query Failed!");
while ($return = mysqli_fetch_array($items))
{
?>
<tr><td colspan='2' align='center'><h2><?
$ident = $return['page']."_".$return['section']."_".$return['order'];
echo googTrans($ident."_t","en",$lang,$return['title']); ?></h2>
<?php
$content = googTrans($ident."_c","en",$lang,$return['content']);
if ($content) echo "</td></tr><tr><td colspan=2><i>".$content."</i>"; ?>
</td></tr>
<?php } ?>
<?php
$query = "SELECT * FROM site_content
WHERE language='eng'
AND page='1' AND section='4'
ORDER BY `order` DESC LIMIT 5"; // output backward for latest news first and only display 5
$items = $mysqli->query($query) or die("ERROR (SC.4): Site Content Query Failed!");
while ($return = mysqli_fetch_array($items))
{
?>
<tr>
<td valign='top' align='right' width='60'><b><?php
$ident = $return['page']."_".$return['section']."_".$return['order'];
echo googTrans($ident."_t","en",$lang,$return['title']); ?></b></td>
<td><?php echo googTrans($ident."_c","en",$lang,$return['content']); ?><hr></td>
</tr>
<?php } ?>
</table>
<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="news2">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<table>
<?php
$query = "SELECT * FROM site_content
WHERE language='eng'
AND page='1' AND section='5' AND `order`='1'";
$items = $mysqli->query($query) or die("ERROR (SC.5): Site Content Query Failed!");
while ($return = mysqli_fetch_array($items))
{
?>
<tr><td colspan='2' align='center'><h2><?
$ident = $return['page']."_".$return['section']."_".$return['order'];
echo googTrans($ident."_t","en",$lang,$return['title']); ?></h2>
<?php
$content = googTrans($ident."_c","en",$lang,$return['content']);
if ($content) echo "</td></tr><tr><td colspan=2><i>".$content."</i>"; ?>
</td></tr>
<?php } ?>
<?php
$query = "SELECT * FROM site_content
WHERE language='eng'
AND page='1' AND section='6'
ORDER BY `order` DESC LIMIT 5"; // output backward for latest news first and only display 5
$items = $mysqli->query($query) or die("ERROR (SC.6): Site Content Query Failed!");
while ($return = mysqli_fetch_array($items))
{
?>
<tr>
<td valign='top' align='right' width='100'><b><?
$ident = $return['page']."_".$return['section']."_".$return['order'];
echo googTrans($ident."_t","en",$lang,$return['title']); ?></b></td>
<td><?php echo googTrans($ident."_c","en",$lang,$return['content']); ?><hr></td>
</tr>
<?php }
$mysqli->close();
?>
</table>
<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"); ?>