fixed the bugs with "details button"... even if it's not working yet.

This commit is contained in:
2018-12-01 21:34:54 -05:00
parent e872c017ff
commit d4079fccb6
2 changed files with 22 additions and 3 deletions

View File

@@ -4,7 +4,10 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$rootpage = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : "index.php";
$orderby = isset($_GET['orderby']) ? $_GET['orderby'] : "lastplayed_desc";
$details = isset($_GET['details']) ? $_GET['details'] : "";
?>
@@ -16,8 +19,14 @@ $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : "lastplayed_desc";
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript">
$( document ).ready(function(){
$("#page").load('page.php?orderby=<?php echo $orderby ?>');
update();
});
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
});
}
</script>
</head>
<body>