Apply automated PHP8 safety transforms
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
aca850b6cd
commit
e44519c030
465 changed files with 1716 additions and 1716 deletions
|
|
@ -89,7 +89,7 @@ function exec_ogp_module() {
|
|||
else
|
||||
{
|
||||
print_success( get_lang("found_ips") ." (".implode(",",$iplist).") ". get_lang("for_remote_server") );
|
||||
foreach ( $iplist as $remote_ip )
|
||||
foreach ((array)$iplist as $remote_ip)
|
||||
{
|
||||
$remote_ip = trim($remote_ip);
|
||||
if ( empty($remote_ip) )
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ function exec_ogp_module()
|
|||
// Linux 64 bits + wine
|
||||
if( preg_match("/Linux/", $os) AND preg_match("/64/", $os) AND preg_match("/wine/", $os) )
|
||||
{
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/linux/", $row['game_key']) )
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name'];
|
||||
|
|
@ -71,7 +71,7 @@ function exec_ogp_module()
|
|||
echo "</option>\n";
|
||||
}
|
||||
echo "<option style='background:black;color:white;' value=''>". get_lang("wine_games") .":</option>\n";
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/win/", $row['game_key']) )
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name'];
|
||||
|
|
@ -82,7 +82,7 @@ function exec_ogp_module()
|
|||
// Linux 64 bits
|
||||
elseif( preg_match("/Linux/", $os) AND preg_match("/64/", $os) )
|
||||
{
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/linux/", $row['game_key']))
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name'];
|
||||
|
|
@ -93,13 +93,13 @@ function exec_ogp_module()
|
|||
// Linux 32 bits + wine
|
||||
elseif( preg_match("/Linux/", $os) AND preg_match("/wine/", $os) )
|
||||
{
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/linux32/", $row['game_key']) )
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name']."</option>\n";
|
||||
}
|
||||
echo "<option style='background:black;color:white;' value=''>". get_lang("wine_games") ."</option>\n";
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/win32/", $row['game_key']) )
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name']."</option>\n";
|
||||
|
|
@ -108,7 +108,7 @@ function exec_ogp_module()
|
|||
// Linux 32 bits
|
||||
elseif( preg_match("/Linux/", $os) )
|
||||
{
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/linux32/", $row['game_key']) )
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name']."</option>\n";
|
||||
|
|
@ -117,7 +117,7 @@ function exec_ogp_module()
|
|||
// Windows 64 bits (CYGWIN)
|
||||
elseif( preg_match("/CYGWIN/", $os) AND preg_match("/64/", $os))
|
||||
{
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/win/", $row['game_key']) )
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name'];
|
||||
|
|
@ -128,7 +128,7 @@ function exec_ogp_module()
|
|||
// Windows 32 bits (CYGWIN)
|
||||
elseif( preg_match("/CYGWIN/", $os))
|
||||
{
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/win32/", $row['game_key']) )
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name']."</option>\n";
|
||||
|
|
@ -136,7 +136,7 @@ function exec_ogp_module()
|
|||
}
|
||||
elseif ( $os == "Unknown OS" )
|
||||
{
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
echo "<option value='".$row['home_cfg_id']."'>".$row['game_name'];
|
||||
if ( preg_match("/64/", $row['game_key']) ) echo " (64 bit)";
|
||||
|
|
@ -202,7 +202,7 @@ function exec_ogp_module()
|
|||
if(!empty($ranges))
|
||||
{
|
||||
echo "<table>\n";
|
||||
foreach($ranges as $range)
|
||||
foreach ((array)$ranges as $range)
|
||||
{
|
||||
if($range['home_cfg_id'] != "0")
|
||||
$cfg_info = $db->getGameCfg($range['home_cfg_id']);
|
||||
|
|
@ -221,7 +221,7 @@ function exec_ogp_module()
|
|||
$used_ports = array();
|
||||
if(!empty($game_homes))
|
||||
{
|
||||
foreach($game_homes as $game_home)
|
||||
foreach ((array)$game_homes as $game_home)
|
||||
{
|
||||
$used_ports[] = $game_home['port'];
|
||||
}
|
||||
|
|
@ -229,7 +229,7 @@ function exec_ogp_module()
|
|||
|
||||
if(!empty($used_ports))
|
||||
{
|
||||
foreach($used_ports as $used_port)
|
||||
foreach ((array)$used_ports as $used_port)
|
||||
{
|
||||
if(in_array($used_port,$usable_range_ports))
|
||||
$available_ports_amount--;
|
||||
|
|
@ -274,7 +274,7 @@ function exec_ogp_module()
|
|||
{
|
||||
echo "<table class='center'>";
|
||||
echo "<tr><th>". get_lang("home_id") ."</th><th>". get_lang("home_path") ."</th><th>". get_lang("game_type") ."</th><th>". get_lang("server_name") ."</th><th>". get_lang("port") ."</th></tr>";
|
||||
foreach($game_homes as $game_home)
|
||||
foreach ((array)$game_homes as $game_home)
|
||||
{
|
||||
echo "<tr><td>".$game_home['home_id']."</td><td>".$game_home['home_path']."</td><td>".$game_home['game_name']."</td><td>".htmlentities($game_home['home_name'])."</td><td>".$game_home['port']."</td></tr>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,13 +159,13 @@ function exec_ogp_module() {
|
|||
|
||||
include_once('includes/lib_remote.php');
|
||||
|
||||
foreach ( $remote_server_ips as $ip_row )
|
||||
foreach ((array)$remote_server_ips as $ip_row)
|
||||
{
|
||||
$servers_match_ip_id = $db->getIpPorts( $ip_row['ip_id'] );
|
||||
$servers_running = FALSE;
|
||||
if($servers_match_ip_id)
|
||||
{
|
||||
foreach ( $servers_match_ip_id as $home_info )
|
||||
foreach ((array)$servers_match_ip_id as $home_info)
|
||||
{
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$screen_running = $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_info['home_id']) === 1;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function exec_ogp_module() {
|
|||
if(is_array($addresses))
|
||||
{
|
||||
$trimed_addresses = array();
|
||||
foreach($addresses as $key => $address)
|
||||
foreach ((array)$addresses as $key => $address)
|
||||
{
|
||||
$address = trim($address);
|
||||
if(strpos($address,':'))
|
||||
|
|
@ -80,7 +80,7 @@ function exec_ogp_module() {
|
|||
if(is_array($addresses))
|
||||
{
|
||||
$trimed_addresses = array();
|
||||
foreach($addresses as $key => $address)
|
||||
foreach ((array)$addresses as $key => $address)
|
||||
{
|
||||
$address = trim($address);
|
||||
if(strpos($address,':'))
|
||||
|
|
@ -126,7 +126,7 @@ function exec_ogp_module() {
|
|||
if(is_array($addresses))
|
||||
{
|
||||
$trimed_addresses = array();
|
||||
foreach($addresses as $key => $address)
|
||||
foreach ((array)$addresses as $key => $address)
|
||||
{
|
||||
$address = trim($address);
|
||||
if(strpos($address,':'))
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ function exec_ogp_module() {
|
|||
$text_color = ImageColorAllocate($im,225,225,225);
|
||||
$text_font = "includes/fonts/TIMES_SQ.TTF";
|
||||
$i = 40;
|
||||
foreach ($stats_lines_array as $stats_line)
|
||||
foreach ((array)$stats_lines_array as $stats_line)
|
||||
{
|
||||
pretty_text_ttf($im,11,0,5,$i,$text_color,$text_font,utf8_decode($stats_line), true); // Servername
|
||||
$i = $i+20;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ function exec_ogp_module() {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody> <?php
|
||||
foreach ( $servers as $server_row )
|
||||
foreach ((array)$servers as $server_row)
|
||||
{
|
||||
#check to see if the remote daeomns are up status_chk is found in lib_remote.php
|
||||
$remote = new OGPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
|
||||
|
|
@ -130,7 +130,7 @@ function exec_ogp_module() {
|
|||
}
|
||||
else
|
||||
{
|
||||
foreach ( $remote_server_ips as $ip_row )
|
||||
foreach ((array)$remote_server_ips as $ip_row)
|
||||
{
|
||||
$data .= $ip_row['ip']."<br>";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue