-
Notifications
You must be signed in to change notification settings - Fork 2
/
appContent.php
204 lines (142 loc) · 4.42 KB
/
appContent.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<div id="appContent">
<?php
include_once('./includes/common.functions.php');
if(!isset($_GET['appID']))
{
header("location:./index.php");
exit();
}
else
{
$appID=$_GET['appID'];
$devID=1;
$sql="SELECT * FROM apps WHERE appID=$appID AND appState=1";
$result=$mysqli->query($sql)or die("query failed due to ".mysqli_error());
if($result->num_rows==0)
{
logError("unkown app");
header("location:./index.php");
exit();
}
else
{
$app=$result->fetch_assoc();
$sql="SELECT developerName FROM developers WHERE developerID={$app['developerID']}";
$result2=$mysqli->query($sql)or die("query failed due to ".mysqli_error());
$developer=$result2->fetch_assoc();
$sql="SELECT platformName FROM platforms WHERE platformID={$app['appPlatformID']}";
$result2=$mysqli->query($sql)or die("query failed due to ".mysqli_error());
$platform=$result2->fetch_assoc();
$sql="SELECT catName FROM categories WHERE catID={$app['appMainCatID']}";
$result2=$mysqli->query($sql)or die("query failed due to ".mysqli_error());
$cat=$result2->fetch_assoc();
if($app['appSubCatID']!="")
{
$sql="SELECT catName FROM categories WHERE catID={$app['appSubCatID']}";
$result2=$mysqli->query($sql)or die("query failed due to ".mysqli_error());
$subCat=$result2->fetch_assoc();
}
}
}
?>
<div class="row">
<hr>
</div>
<div class="row white-block">
<div class="col col-md-2">
<?php echo '<img class="app-img-big" src="data:image;base64,'.$app['appIcon'].'">'; ?>
</div>
<div class="col-md-10">
<?php echo '<h1>'.$app['appName'].' '.$app['appVersion'].'</h1>';?>
<small>By : <?php echo '<a href="./developer.php?id='.$app['developerID'].'">'.$developer['developerName'].'</a>';?></small>
<p class="well app-short-desc">
<?php echo $app['appShortDesc']; ?>
</p>
</div>
</div>
<div class="row ">
<div class="col-md-6 col-md-offset-3 white-block">
<strong>Downloads: </strong><?php echo $app['appDownloads'];?>
, <strong>File Size: </strong><?php echo $app['appSize'].' KB';
echo '<a href="./download.php?appID='.$app['appID'].'" class="btn btn-success pull-right">download</a>';
?>
</div>
</div>
<div class="row ">
<div class="col-md-8 col-md-offset-2 white-block">
<div id="gallery">
<?php
include_once('screenshots.php');
?>
</div>
</div>
</div>
<div class="row ">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-success" >
<div class="panel-heading">
Description
</div>
<div class="panel-body">
<?php
echo $app['applongDesc'];
?>
</div>
</div>
</div>
</div>
<div class="row ">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-success" >
<div class="panel-heading">
System Requirements
</div>
<div class="panel-body">
<?php
echo $app['appSysRequirements'];
?>
</div>
</div>
</div>
</div>
<div class="row ">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-success" >
<div class="panel-heading">
More Informations
</div>
<div class="panel-body">
<strong> Language :</strong>
<?php
echo $app['appLanguage'];
?>
<br>
<strong> Release Date :</strong>
<?php
echo date('M .j Y',strtotime($app['appReleaseDate']));
?>
<br>
<strong> Platform :</strong>
<?php
echo $platform['platformName'];
?>
<br>
<strong> Category :</strong>
<?php
echo $cat['catName'];
if($app['appSubCatID']!="")
{
echo ' , '.$subCat['catName'];
}
echo '<br>';
echo '<a href="./developer.php?id='.$app['developerID'].'" class="btn btn-link">View Developer</a>';
?>
<br>
</div>
</div>
</div>
</div>
<div class="row">
<hr>
</div>
</div>