fixed a bug when changing images, not retuning to the same order and "details page"
This commit is contained in:
@@ -24,7 +24,7 @@ $details = isset($_GET['details']) ? $_GET['details'] : "";
|
||||
function update() {
|
||||
$.get('page.php?rootpage=<?php echo $rootpage ?>&orderby=<?php echo $orderby ?>&details=<?php echo $details ?>', function(data) {
|
||||
$("#page").html(data);
|
||||
window.setTimeout(update, 10000); // 10 secondes
|
||||
//window.setTimeout(update, 10000); // 10 secondes
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
6
page.php
6
page.php
@@ -7,8 +7,8 @@ $sql = "SELECT * FROM game_time";
|
||||
$result = $ps4->mysql_conn($sql);
|
||||
|
||||
$rootpage = $_GET['rootpage'];
|
||||
$orderby = $_GET['orderby'];
|
||||
$details = $_GET['details'];
|
||||
$orderby = isset($_GET['orderby']) ? $_GET['orderby'] : "lastplayed_desc";
|
||||
$details = isset($_GET['details']) ? $_GET['details'] : "";
|
||||
|
||||
?>
|
||||
|
||||
@@ -53,7 +53,7 @@ $games = $ps4->games_reorder($games, $orderby);
|
||||
foreach ($games as $key => $value) {
|
||||
echo "<div class=\"game\">";
|
||||
echo "<div class=\"thumbnail\">";
|
||||
echo "<img src=\"".$ps4->thumbnailurl($games[$key]["game_id"])."\" border=0 weight=\"80px\" height=\"80px\" onclick=\"thumbnailupdateurl('". $games[$key]["game_id"] ."', '". $games[$key]["game_name"] ."');\">";
|
||||
echo "<img src=\"".$ps4->thumbnailurl($games[$key]["game_id"])."\" border=0 weight=\"80px\" height=\"80px\" onclick=\"thumbnailupdateurl('". $games[$key]["game_id"] ."', '". $games[$key]["game_name"] ."', '". $rootpage ."', '". $orderby ."', '". $details ."');\">";
|
||||
echo "</div>";
|
||||
echo "<div class=\"info\">";
|
||||
echo "<strong>". $games[$key]["game_name"] ."</strong> (". $games[$key]["game_id"] .")";
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
function thumbnailupdateurl(gameid, gamename) {
|
||||
|
||||
var sql;
|
||||
function thumbnailupdateurl(gameid, gamename, rootpage, orderby, details) {
|
||||
|
||||
var url = prompt("Enter Image URL for " + gamename + " (" + gameid + ")", "");
|
||||
|
||||
if (url == "") {
|
||||
if (url === "") {
|
||||
|
||||
alert ("Enter something !");
|
||||
|
||||
@@ -18,6 +16,7 @@ function thumbnailupdateurl(gameid, gamename) {
|
||||
};
|
||||
|
||||
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: "POST",
|
||||
@@ -25,12 +24,13 @@ function thumbnailupdateurl(gameid, gamename) {
|
||||
data: data,
|
||||
success: function(data, textStatus, jqXHR)
|
||||
{
|
||||
|
||||
$( document ).ready(function(){
|
||||
$('#message').html(data);
|
||||
$('#message').fadeIn('slow', function(){
|
||||
$('#message').delay(3000).fadeOut();
|
||||
});
|
||||
$("#page").load('page.php');
|
||||
$("#page").load('page.php?rootpage=' + rootpage + '&orderby=' + orderby + '&details=' + details);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user