Added the function to change the thumbnail URL when clinking on the image.
This commit is contained in:
18
class.php
18
class.php
@@ -78,6 +78,24 @@ class ps4 {
|
||||
return $url;
|
||||
}
|
||||
|
||||
function thumbnailupdateurl($gameid,$gamename,$url) {
|
||||
$actualurl = $this->thumbnailurl($gameid);
|
||||
if ($actualurl == "no-thumbnail.png") {
|
||||
$sql = "INSERT INTO game_thumbnail (game_id, thumbnail_url) VALUES ('".$gameid."', '".$url."');";
|
||||
} else {
|
||||
$sql = "UPDATE game_thumbnail SET thumbnail_url = '".$url."' WHERE game_id = '".$gameid."';";
|
||||
}
|
||||
|
||||
$result = $this->mysql_conn($sql);
|
||||
if ($result == 1) {
|
||||
echo "<strong>SUCCESS:</strong> Updated image URL for <strong>". $gamename ."</strong> (". $gameid .")";
|
||||
echo "<br/><br/>";
|
||||
} else {
|
||||
echo "<strong>ERROR:</strong> Can't update image URL for <strong>". $gamename ."</strong> (". $gameid .")";
|
||||
echo "<br/><br/>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user