fix: work on very basic PHP remediation

This commit is contained in:
Emmanuel BENOîT 2024-12-31 00:25:05 +01:00
parent b18b795ab3
commit 6ee9078e0c
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg
117 changed files with 216 additions and 208 deletions

View file

@ -6,7 +6,6 @@ function __logAdmin($txt, $level = null) {
if (!$logInit) {
global $__logPrefix;
define_syslog_variables();
openlog("lwControl", LOG_PID, LOG_USER);
$logInit = true;
}

View file

@ -1,7 +1,5 @@
<?php
set_magic_quotes_runtime(false);
include("config.inc");
include("as_log.inc");
@ -213,27 +211,27 @@ foreach ($games as $name => $game) {
<p>Games can have the following status:</p>
<table>
<tr>
<?printStatus('PRE');?>
<?php printStatus('PRE');?>
<td>The game is configured, but is hidden for now</td>
</tr>
<tr>
<?printStatus('READY');?>
<?php printStatus('READY');?>
<td>The game is visible, but ticks have not started</td>
</tr>
<tr>
<?printStatus('RUNNING');?>
<?php printStatus('RUNNING');?>
<td>The game is running normally</td>
</tr>
<tr>
<?printStatus('VICTORY');?>
<?php printStatus('VICTORY');?>
<td>The game is still running but someone reached victory</td>
</tr>
<tr>
<?printStatus('ENDING');?>
<?php printStatus('ENDING');?>
<td>The game is still available but is about to end.</td>
</tr>
<tr>
<?printStatus('FINISHED');?>
<?php printStatus('FINISHED');?>
<td>The game is no longer running and only visible through the rankings page</td>
</tr>
</table>

View file

@ -1,7 +1,5 @@
<?php
set_magic_quotes_runtime(false);
include('config.inc');
include('../scripts/config.inc');
include('as_manager.inc');
@ -137,25 +135,25 @@ if (!class_exists('config')) {
<body>
<h1><a href="index.html">LWB5 > Administration</a> > Ticks</h1>
<h2>Manager status</h2>
<p>Tick manager status: <?
<p>Tick manager status: <?php
if ($mRunning === false) {
?>
<b>not running</b> - <a href="?c=sm">Start manager</a>
<?
<?php
} else {
?> <b>running</b>, process ID #<?=$mRunning?> - <a href="?c=km">Kill manager</a><br/>
<?
<?php
if ($tActive === 'pending') {
?> Ticks status change pending; please <a href="?">reload</a> the page.<br/>
This can take up to 20 seconds, be patient.
<?
<?php
} elseif ($tActive) {
?> Ticks are <b>active</b> - <a href="?c=dt">Disable ticks</a>
<?
<?php
} else {
?> Ticks are <b>inactive</b> - <a href="?c=et">Enable ticks</a>
<?
<?php
}
}
@ -203,7 +201,7 @@ if ($statusMessage != '') {
for game
<select name="g">
<option value="">-- select --</option>
<?
<?php
$games = config::getGames();
foreach (array_keys($games) as $game) {
if ($game == 'main') {