} // Data processing... if (isset($_POST['results']) && check_admin_referer('phpleague')) { // Secure data $array = !empty($_POST['array']) ? $_POST['array'] : NULL; if (is_array($array)) { $success = TRUE; foreach ($array as $item) { if (!($item['goal_home'] == '' || $item['goal_away'] == '')) { if ($item['goal_home'] == FORFEIT_INPUT) { $item['goal_home'] = $sport->get_forfeit_code(); } if ($item['goal_away'] == FORFEIT_INPUT) { $item['goal_away'] = $sport->get_forfeit_code(); } $db->update_results($item['goal_home'], $item['goal_away'], $item['date'], $item['id_match']); } elseif ($item['goal_home'] == '' || $item['goal_away'] == '') { $db->update_results(NULL, NULL, $item['date'], $item['id_match']); } else { $success = FALSE; } } if ($success) { $message[] = __('Match(es) updated successfully.', 'phpleague'); } else { $message[] = __('An error occurred during the results generation.', 'phpleague'); } } // Player mod is enabled, so check if we have anything to add in the database if ($setting->player_mod === 'yes') { // Secure data