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
|
|
@ -32,7 +32,7 @@ function exec_ogp_module()
|
|||
echo "<tr>\n";
|
||||
$menus = $db->getMenusForGroup('admin');
|
||||
|
||||
foreach ($menus as $key => $row) {
|
||||
foreach ((array)$menus as $key => $row) {
|
||||
if ( !empty( $row['subpage'] ) )
|
||||
$name[$key] = $row['subpage'];
|
||||
else
|
||||
|
|
@ -44,7 +44,7 @@ function exec_ogp_module()
|
|||
array_multisort($translation, $name, SORT_DESC, $menus);
|
||||
|
||||
$td = 0;
|
||||
foreach ( $menus as $menu )
|
||||
foreach ((array)$menus as $menu)
|
||||
{
|
||||
$module = $menu['module'];
|
||||
if ( !empty( $menu['subpage'] ) )
|
||||
|
|
@ -159,7 +159,7 @@ function exec_ogp_module()
|
|||
$td2 = 0;
|
||||
if($external_links != 0)
|
||||
{
|
||||
foreach ( $external_links as $external_link )
|
||||
foreach ((array)$external_links as $external_link)
|
||||
{
|
||||
|
||||
$url = $external_link['url'];
|
||||
|
|
@ -185,7 +185,7 @@ function exec_ogp_module()
|
|||
|
||||
if ( isset( $_POST['changeOrder'] ) )
|
||||
{
|
||||
foreach($_POST as $key => $value)
|
||||
foreach ((array)$_POST as $key => $value)
|
||||
{
|
||||
if( preg_match( "/^change_button/", $key ) )
|
||||
{
|
||||
|
|
@ -205,7 +205,7 @@ function exec_ogp_module()
|
|||
$menus = $db->getMenusForGroup('user');
|
||||
|
||||
$pos = 0;
|
||||
foreach ( $menus as $menu )
|
||||
foreach ((array)$menus as $menu)
|
||||
{
|
||||
$module = $menu['module'];
|
||||
if ( !empty( $menu['subpage'] ) )
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function exec_ogp_module()
|
|||
if(isset($_POST['unban']))
|
||||
{
|
||||
unset($_POST['unban']);
|
||||
foreach($_POST as $name => $ip)
|
||||
foreach ((array)$_POST as $name => $ip)
|
||||
{
|
||||
$ip = $db->real_escape_string($ip);
|
||||
$db->query("DELETE FROM `OGP_DB_PREFIXban_list` WHERE client_ip = '$ip';");
|
||||
|
|
@ -42,11 +42,11 @@ function exec_ogp_module()
|
|||
$ban_table = '';
|
||||
if($ban_list)
|
||||
{
|
||||
foreach($ban_list as $ban)
|
||||
foreach ((array)$ban_list as $ban)
|
||||
{
|
||||
if($ban['logging_attempts'] >= $settings["login_attempts_before_banned"])
|
||||
{
|
||||
$ban_table .= "<tr><td><input type=checkbox name='".$ban_qty."' value='".$ban['client_ip']."' /></td><td>".$ban['client_ip']."</td><td>".date("r",$ban['banned_until'])."</td></tr>\n";
|
||||
$ban_table .= "<tr><td><input type=checkbox name='".$ban_qty."' value='".$ban['client_ip']."' /></td><td>".$ban['client_ip']."</td><td>".date("r", is_numeric($ban['banned_until']) ? (int)$ban['banned_until'] : strtotime($ban['banned_until']))."</td></tr>\n";
|
||||
$ban_qty++;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ function exec_ogp_module() {
|
|||
if( isset( $_POST['log_id'] ) ){
|
||||
$db->del_logger_log($_POST['log_id']);
|
||||
$newLogs = array();
|
||||
foreach($logs as $log){
|
||||
foreach ((array)$logs as $log){
|
||||
if($log['log_id'] != $_POST['log_id']){
|
||||
$newLogs[] = $log;
|
||||
}
|
||||
|
|
@ -97,7 +97,7 @@ function exec_ogp_module() {
|
|||
|
||||
if($logs)
|
||||
{
|
||||
foreach($logs as $log)
|
||||
foreach ((array)$logs as $log)
|
||||
{
|
||||
$user = $db->getUserById($log['user_id']);
|
||||
$when = $log['date'];
|
||||
|
|
@ -126,7 +126,7 @@ function exec_ogp_module() {
|
|||
"<table>\n";
|
||||
|
||||
$show_values = array( "users_login", "users_lang", "users_role", "users_email", "user_expires");
|
||||
foreach($user as $key => $value)
|
||||
foreach ((array)$user as $key => $value)
|
||||
{
|
||||
if( in_array( $key, $show_values ) )
|
||||
echo "<tr><td>".str_replace("_", "", substr($key,5))."</td><td>$value</td></tr>\n";
|
||||
|
|
@ -139,7 +139,7 @@ function exec_ogp_module() {
|
|||
echo "</tbody>\n";
|
||||
echo "<tfoot style='border:1px solid grey;'></tfoot>\n";
|
||||
echo "</table>\n";
|
||||
$count_logs = $db->get_logger_count($search_field);
|
||||
$count_logs = $db->get_logger_count((array)$search_field);
|
||||
|
||||
if (isset($_GET['search']) && !empty($_GET['search'])) {
|
||||
$uri = '?m=administration&p=watch_logger&search='.$_GET['search'].'&limit='.$l.'&page=';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue