-
Notifications
You must be signed in to change notification settings - Fork 0
/
images.php
118 lines (63 loc) · 2.63 KB
/
images.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
<?php
$servername = "localhost";
$username = "vhost85252s0";
$password = "0jKJd,x8Xs";
$dbname = "vhost85252s0";
// Create connection
$link = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if ($link->connect_error) {
die("Connection failed: " . $link->connect_error);
}
$gameID = $_GET['id'];
if($result = mysqli_query($link, "SELECT * FROM e107_games where id=".$gameID)){
if(mysqli_num_rows($result) > 0){
if($gameID != ""){
while($row = mysqli_fetch_array($result)){
if($row["Screenshot1"] != ""){
$imageURL = "";
$imagePath = "";
$imagePath = str_replace("{e_MEDIA_IMAGE}","",$row['Screenshot1']);
$imageURL = SITEURL.e_MEDIA_IMAGE.$imagePath;
echo $imageURL;
}
if($row["Screenshot2"] != ""){
$imageURL = "";
$imagePath = "";
$imagePath = str_replace("{e_MEDIA_IMAGE}","",$row['Screenshot2']);
$imageURL = SITEURL.e_MEDIA_IMAGE.$imagePath;
echo $imageURL;
}
if($row["Screenshot3"] != ""){
$imageURL = "";
$imagePath = "";
$imagePath = str_replace("{e_MEDIA_IMAGE}","",$row['Screenshot3']);
$imageURL = SITEURL.e_MEDIA_IMAGE.$imagePath;
echo $imageURL;
}
if($row["Screenshot4"] != ""){
$imageURL = "";
$imagePath = "";
$imagePath = str_replace("{e_MEDIA_IMAGE}","",$row['Screenshot4']);
$imageURL = SITEURL.e_MEDIA_IMAGE.$imagePath;
echo $imageURL;
}
if($row["Screenshot5"] != ""){
$imageURL = "";
$imagePath = "";
$imagePath = str_replace("{e_MEDIA_IMAGE}","",$row['Screenshot5']);
$imageURL = SITEURL.e_MEDIA_IMAGE.$imagePath;
echo $imageURL;
}
if($row["Screenshot6"] != ""){
$imageURL = "";
$imagePath = "";
$imagePath = str_replace("{e_MEDIA_IMAGE}","",$row['Screenshot6']);
$imageURL = SITEURL.e_MEDIA_IMAGE.$imagePath;
echo $imageURL;
}
}//end while row
}//end if $gameID
}//end if mysqli_num_rows
}//end if $result
?>