diff --git a/compatibility.php b/compatibility.php index 99850214b..abbc05791 100644 --- a/compatibility.php +++ b/compatibility.php @@ -362,7 +362,7 @@ function displayGameList($title, $games) { { if ($c % 2 == 0) { $color = "color2"; } else { $color = "color0"; } echo html_frame_tr( - html_frame_td(html_ahref($name, $PHP_SELF."?details=".$array[0])). + html_frame_td(html_ahref($name, $_SERVER["PHP_SELF"]."?details=".$array[0])). html_frame_td($array[0]). html_frame_td($array[1]."%", 'align="center" class="pct'.($array[1] - ($array[1]%5)).'"'), $color @@ -387,7 +387,7 @@ function displayGameList($title, $games) { echo html_frame_end(" "); if ($details) - echo html_p(),html_back_link(1,$PHP_SELF); + echo html_p(),html_back_link(1,$_SERVER["PHP_SELF"]); echo html_p(); echo html_round_frame_end(" "); diff --git a/compatibility_stable.php b/compatibility_stable.php index 1611c91ea..d071bcde5 100644 --- a/compatibility_stable.php +++ b/compatibility_stable.php @@ -362,7 +362,7 @@ function displayGameList($title, $games) { { if ($c % 2 == 0) { $color = "color2"; } else { $color = "color0"; } echo html_frame_tr( - html_frame_td(html_ahref($name, $PHP_SELF."?details=".$array[0])). + html_frame_td(html_ahref($name, $_SERVER["PHP_SELF"]."?details=".$array[0])). html_frame_td($array[0]). html_frame_td($array[1]."%", 'align="center" class="pct'.($array[1] - ($array[1]%5)).'"'), $color @@ -387,7 +387,7 @@ function displayGameList($title, $games) { echo html_frame_end(" "); if ($details) - echo html_p(),html_back_link(1,$PHP_SELF); + echo html_p(),html_back_link(1,$_SERVER["PHP_SELF"]); echo html_p(); echo html_round_frame_end(" "); diff --git a/documentation.php b/documentation.php index 212f4afef..94d4a5fbe 100644 --- a/documentation.php +++ b/documentation.php @@ -61,7 +61,7 @@ list($file,$ext) = split("\.",$item,2); echo html_frame_tr( html_frame_td( - html_ahref(display_xml($file_root."/docs/".$item,'NAME'),"$PHP_SELF?view=$file").html_br(). + html_ahref(display_xml($file_root."/docs/".$item,'NAME'),$_SERVER["PHP_SELF"]."?view=$file").html_br(). display_xml($file_root."/docs/".$item,'DESC').html_br(2)."\n" ) ); diff --git a/include/html.php b/include/html.php index 1cba830a7..e50ab7b67 100644 --- a/include/html.php +++ b/include/html.php @@ -248,8 +248,7 @@ function html_form_submit ($value = "") function html_form_js_button ($url = null) { - global $PHP_SELF; - if (!$url) { $url = $PHP_SELF; } + if (!$url) { $url = $_SERVER["PHP_SELF"]; } $str = ''."\n"; return $str; } diff --git a/index.php b/index.php index 1d284ad0b..891e77b59 100644 --- a/index.php +++ b/index.php @@ -17,7 +17,7 @@ html_header("ScummVM", ''); sidebar_start(); -$shownews = $_GET['shownews']; +$shownews = empty($_GET['shownews']) ? 0 : 1; // display welcome table // don't show this if we are in news mode diff --git a/screenshots.php b/screenshots.php index b24c8fe55..28cc48372 100644 --- a/screenshots.php +++ b/screenshots.php @@ -24,8 +24,8 @@ '. - ''. + ''. 'Screenshot '.$c.''. ''. @@ -114,7 +114,7 @@ if ($offset) { $prev = $offset - 4; - $prevLink = html_ahref("<< Prev 4 Images",$PHP_SELF."?offset=".$prev,"style='color: white;'"); + $prevLink = html_ahref("<< Prev 4 Images",$_SERVER["PHP_SELF"]."?offset=".$prev,"style='color: white;'"); } @@ -122,7 +122,7 @@ if (($offset + 4) < $screenshots_count) { $next = $where + 1; - $nextLink = html_ahref("Next 4 Images >>",$PHP_SELF."?offset=".$next,"style='color: white;'"); + $nextLink = html_ahref("Next 4 Images >>",$_SERVER["PHP_SELF"]."?offset=".$next,"style='color: white;'"); } echo html_frame_tr(