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()
|
|||
if ( !$db->isAdmin($_SESSION['user_id']) )
|
||||
{
|
||||
$result = $db->getUserGroupList($_SESSION['user_id']);
|
||||
foreach ( $result as $row ) #loop through the groups
|
||||
foreach ((array)$result as $row) #loop through the groups
|
||||
{
|
||||
if ( $row['group_id'] == $group_id )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function exec_ogp_module()
|
|||
if ( !$db->isAdmin($_SESSION['user_id']) )
|
||||
{
|
||||
$result = $db->getUserGroupList($_SESSION['user_id']);
|
||||
foreach ( $result as $row ) #loop through the groups
|
||||
foreach ((array)$result as $row) #loop through the groups
|
||||
{
|
||||
if ( $row['group_id'] == $group_id )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function exec_ogp_module()
|
|||
if ( !$db->isAdmin($_SESSION['user_id']) )
|
||||
{
|
||||
$result = $db->getUserGroupList($_SESSION['user_id']);
|
||||
foreach ( $result as $row ) #loop through the groups
|
||||
foreach ((array)$result as $row) #loop through the groups
|
||||
{
|
||||
if ( $row['group_id'] == $group_id )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ function exec_ogp_module() {
|
|||
if ( $isAdmin )
|
||||
{
|
||||
$users = $db->getUserList();
|
||||
foreach ( $users as $user )
|
||||
foreach ((array)$users as $user)
|
||||
{
|
||||
if ( $db->isAdmin($user['user_id']) )
|
||||
{
|
||||
|
|
@ -275,11 +275,11 @@ function exec_ogp_module() {
|
|||
//echo "Timediff is $timediff<br>";
|
||||
if(read_expire($timediff) !== 'X')
|
||||
{
|
||||
$exday = date("j", $timediff);
|
||||
$exyear = date("Y", $timediff);
|
||||
$exmonth = date("m", $timediff);
|
||||
$exhour = date("H", $timediff);
|
||||
$exmin = date("i", $timediff);
|
||||
$exday = date("j", is_numeric($timediff) ? (int)$timediff : strtotime($timediff));
|
||||
$exyear = date("Y", is_numeric($timediff) ? (int)$timediff : strtotime($timediff));
|
||||
$exmonth = date("m", is_numeric($timediff) ? (int)$timediff : strtotime($timediff));
|
||||
$exhour = date("H", is_numeric($timediff) ? (int)$timediff : strtotime($timediff));
|
||||
$exmin = date("i", is_numeric($timediff) ? (int)$timediff : strtotime($timediff));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -293,7 +293,7 @@ function exec_ogp_module() {
|
|||
$minutes = range(0,59);
|
||||
$pad_length = 2;
|
||||
|
||||
foreach ($minutes as &$minute)
|
||||
foreach ((array)$minutes as &$minute)
|
||||
{
|
||||
$minute = str_pad($minute, $pad_length, "0", STR_PAD_LEFT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ function exec_ogp_module() {
|
|||
get_lang('actions')."</td><td>".get_lang('group_name')."</td><td>".
|
||||
get_lang('users')."</td></tr>";
|
||||
|
||||
foreach ( $result as $row ) #loop through the groups
|
||||
foreach ((array)$result as $row) #loop through the groups
|
||||
{
|
||||
$i++;
|
||||
echo "<tr class='tr$i'><td><a href='?m=user_games&p=assign&group_id=".$row['group_id']."'>[".
|
||||
|
|
@ -107,11 +107,11 @@ function exec_ogp_module() {
|
|||
|
||||
if ( is_array($available_users) )
|
||||
{
|
||||
if(count($available_users) > 0){
|
||||
if(count((array)$available_users) > 0){
|
||||
echo "<form action=\"?m=user_admin&p=add_to_group\" method=\"post\">".
|
||||
get_lang('add_user_to_group').
|
||||
": <select name=\"user_to_add\">";
|
||||
foreach ($available_users as $user_row )
|
||||
foreach ((array)$available_users as $user_row)
|
||||
{
|
||||
echo "<option value=\"$user_row[user_id]\">" . htmlentities($user_row[users_login]) . "</option>";
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ function exec_ogp_module() {
|
|||
if (is_array($group_users))
|
||||
{
|
||||
echo "<ul>";
|
||||
foreach ($group_users as $user_id)
|
||||
foreach ((array)$group_users as $user_id)
|
||||
{
|
||||
$user_info = $db->getUserById($user_id['user_id']);
|
||||
echo "<li><a href='?m=user_admin&p=del_from_group&group_id=".
|
||||
|
|
@ -149,7 +149,7 @@ function exec_ogp_module() {
|
|||
echo "</table>";
|
||||
|
||||
if ($db->isAdmin($_SESSION['user_id']))
|
||||
$count_groups = $db->get_group_count($search_field);
|
||||
$count_groups = $db->get_group_count((array)$search_field);
|
||||
else
|
||||
$count_groups = $db->getUserGroupList_count($_SESSION['user_id'],$search_field);
|
||||
|
||||
|
|
|
|||
|
|
@ -90,14 +90,14 @@ function exec_ogp_module() {
|
|||
echo "<th class='subuserColumn'>".get_lang('subusers')."</th></tr>";
|
||||
|
||||
$i = 0;
|
||||
foreach ( $result as $row )
|
||||
foreach ((array)$result as $row)
|
||||
{
|
||||
// Show user's parent
|
||||
$ownedBy = "";
|
||||
if(!is_null($row['users_parent'])){
|
||||
$ownedBy = $row['users_parent'];
|
||||
$parentInfo = $db->getUserById($ownedBy);
|
||||
if(is_array($parentInfo) && array_key_exists("user_expires", $parentInfo) && $parentInfo['user_expires'] != "X"){
|
||||
if(is_array($parentInfo) && array_key_exists("user_expires", (array)$parentInfo) && $parentInfo['user_expires'] != "X"){
|
||||
$row['user_expires'] = $parentInfo['user_expires'];
|
||||
}
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ function exec_ogp_module() {
|
|||
}
|
||||
echo '</table><br>';
|
||||
|
||||
$count_users = $db->get_user_count($search_field);
|
||||
$count_users = $db->get_user_count((array)$search_field);
|
||||
|
||||
if(isset($_GET['search']) && !empty($_GET['search'])){
|
||||
$uri = '?m=user_admin&search='.$_GET['search'].'&limit='.$limit_user.'&page=';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue