fix: fix various PHP problems and a few bugs
This commit is contained in:
parent
c91440af72
commit
a4b45ddaa4
34 changed files with 27 additions and 66 deletions
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
include('config.inc');
|
||||
include('../scripts/config.inc');
|
||||
include('as_manager.inc');
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || $_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
|
||||
echo "Sorry, can't do that.";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
session_start();
|
||||
if (!is_array($_SESSION['lw_new_game']) || $_GET['reset']) {
|
||||
$_SESSION['lw_new_game'] = array(
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
Select page:
|
||||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
include('config.inc');
|
||||
|
||||
switch ($_GET['p']) {
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
<h1><a href="index.html">LWB5 > Administration</a> > Maintenance mode</h1>
|
||||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
include('../scripts/config.inc');
|
||||
include('as_log.inc');
|
||||
|
||||
|
|
|
@ -37,19 +37,19 @@ function handleInput() {
|
|||
for ($y = $minY; $y <= $maxY; $y ++) {
|
||||
$str = array_shift($layout);
|
||||
for ($x = $minX; $x <= $maxX; $x ++) {
|
||||
$type = $str{0};
|
||||
$type = $str[0];
|
||||
$map->setSystemType($x, $y, $type);
|
||||
if ($type != 'S') {
|
||||
$str = substr($str, 1);
|
||||
continue;
|
||||
}
|
||||
$alloc = (int) $str{1};
|
||||
$alloc = (int) $str[1];
|
||||
$map->setSystemAlloc($x, $y, $alloc);
|
||||
if ($alloc == 0) {
|
||||
$str = substr($str, 2);
|
||||
continue;
|
||||
}
|
||||
$map->setSystemSpawn($x, $y, $str{2} == '1');
|
||||
$map->setSystemSpawn($x, $y, $str[2] == '1');
|
||||
$str = substr($str, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
include('config.inc');
|
||||
include('../scripts/config.inc');
|
||||
include('as_manager.inc');
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
include('config.inc');
|
||||
include('as_log.inc');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue