Version 0.9.9
- Code cleaning
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Check Prediction League authorisation
|
||||
if ( !$this->auth->acl_get('u_use_football') )
|
||||
{
|
||||
@@ -225,5 +230,3 @@ $template->assign_vars(array(
|
||||
'POINTS' => $config['football_win_name'],
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -526,5 +526,3 @@ $template->assign_vars(array(
|
||||
'S_DISPLAY_RATING' => $display_rating,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Can this user view Prediction Leagues pages?
|
||||
if (!$config['football_guest_view'])
|
||||
{
|
||||
@@ -389,4 +394,3 @@ $template->set_filenames(array(
|
||||
);
|
||||
|
||||
page_footer();
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -71,5 +71,3 @@ $template->assign_vars(array(
|
||||
'S_DATA_DELIVERY' => $data_delivery,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->user->add_lang_ext('football/football', 'info_acp_bank');
|
||||
|
||||
// Check Prediction League authorisation
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->user->add_lang_ext('football/football', 'info_acp_bank');
|
||||
|
||||
// Check Prediction League authorisation
|
||||
@@ -96,4 +101,3 @@ else
|
||||
exit_handler();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Check Prediction League authorisation
|
||||
if ( !$this->auth->acl_get('u_use_football') )
|
||||
{
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$vert = 9;
|
||||
$start = 22;
|
||||
$end = 28;
|
||||
@@ -1342,4 +1347,3 @@ $template->set_filenames(array(
|
||||
);
|
||||
|
||||
page_footer();
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -146,5 +146,3 @@ $template->assign_vars(array(
|
||||
'S_USER_IS_MEMBER' => $user_is_member,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -62,5 +62,3 @@ $template->assign_vars(array(
|
||||
'S_DISPLAY_LAST_USERS' => $display_last_users,
|
||||
'S_LAST_USERS' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -320,5 +320,3 @@ $template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -331,4 +331,3 @@ $template->assign_vars(array(
|
||||
'USERNAME4' => $username4,
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -382,5 +382,3 @@ $template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -195,4 +195,3 @@ $template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -169,5 +169,3 @@ $template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -422,5 +422,3 @@ $template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -212,5 +212,3 @@ $template->assign_vars(array(
|
||||
'S_DATA_ODDS' => $data_odds,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -91,4 +91,3 @@ if ($league <> 0)
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -424,5 +424,3 @@ $template->assign_vars(array(
|
||||
'S_EDIT_MODE' => $edit_mode,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Can this user view Prediction Leagues pages?
|
||||
if (!$config['football_guest_view'])
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -142,4 +142,3 @@ else
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -160,5 +160,3 @@ $template->assign_vars(array(
|
||||
'LEAGUE' => $league,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -136,5 +136,3 @@ $template->assign_vars(array(
|
||||
'LEAGUE' => $league,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -436,5 +436,3 @@ $template->assign_vars(array(
|
||||
'TEXT_FORM' => $text_form,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if ( !defined('IN_PHPBB') OR !defined('IN_FOOTBALL') )
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -19,5 +19,3 @@ $template->assign_vars(array(
|
||||
'S_DISPLAY_UNDER_CONSTRUCTION' => true,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -7,6 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Can this user view Prediction Leagues pages?
|
||||
if (!$config['football_guest_view'])
|
||||
{
|
||||
@@ -293,5 +298,3 @@ $template->set_filenames(array(
|
||||
);
|
||||
|
||||
page_footer();
|
||||
|
||||
?>
|
||||
@@ -5,7 +5,7 @@
|
||||
"homepage" : "http://football.bplaced.net",
|
||||
"version" : "0.9.9",
|
||||
"time" : "2021-04-04",
|
||||
"license" : "GPL-2.0",
|
||||
"license" : "GPL-2.0-only",
|
||||
"authors" : [{
|
||||
"name" : "J. Helmke",
|
||||
"email" : "phpBB3.football@gmx.de",
|
||||
|
||||
@@ -122,7 +122,6 @@ class download
|
||||
{
|
||||
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
|
||||
trigger_error($message);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Can this user view Prediction Leagues pages?
|
||||
|
||||
@@ -137,7 +137,6 @@ class main
|
||||
{
|
||||
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
|
||||
trigger_error($message);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Can this user view Prediction Leagues pages?
|
||||
|
||||
@@ -128,7 +128,6 @@ class popup
|
||||
{
|
||||
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
|
||||
trigger_error($message);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Can this user view Prediction Leagues pages?
|
||||
|
||||
@@ -105,7 +105,6 @@ class xmlplan
|
||||
{
|
||||
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
|
||||
trigger_error($message);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -333,4 +333,3 @@ class football_remember extends \phpbb\cron\task\base
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -9,6 +9,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0;
|
||||
$graphvalues1 = explode(",",$values1);
|
||||
$matchdays = sizeof($graphvalues1);
|
||||
@@ -63,4 +68,3 @@ for ($i = 0; $i < $count_values; $i++)
|
||||
// Output graph and clear image from memory
|
||||
imagepng($image);
|
||||
imagedestroy($image);
|
||||
?>
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0;
|
||||
$values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0;
|
||||
@@ -123,4 +128,3 @@ for ($i = 1; $i < $count_values; $i++)
|
||||
// Output graph and clear image from memory
|
||||
imagepng($image);
|
||||
imagedestroy($image);
|
||||
?>
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$numb_users = ( isset($_GET['t']) ) ? intval($_GET['t']) : 0;
|
||||
$matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0;
|
||||
@@ -94,4 +99,3 @@ for ($i = 1; $i < $count_values; $i++)
|
||||
// Output graph and clear image from memory
|
||||
imagepng($image);
|
||||
imagedestroy($image);
|
||||
?>
|
||||
|
||||
@@ -42,4 +42,3 @@ define('UP_WINS', 1);
|
||||
define('UP_POINTS', 2);
|
||||
define('LEAGUE_CHAMP', 1);
|
||||
define('LEAGUE_KO', 2);
|
||||
?>
|
||||
@@ -11,44 +11,42 @@
|
||||
* Automatically write the league as XML-file
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
// Stuff required to work with phpBB3
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
$user->add_lang_ext('football/football', 'info_acp_update');
|
||||
include('../includes/constants.' . $phpEx);
|
||||
|
||||
if ($config['board_disable'])
|
||||
{
|
||||
// Stuff required to work with phpBB3
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
$user->add_lang_ext('football/football', 'info_acp_update');
|
||||
include('../includes/constants.' . $phpEx);
|
||||
|
||||
if ($config['board_disable'])
|
||||
{
|
||||
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
|
||||
trigger_error($message);
|
||||
}
|
||||
}
|
||||
|
||||
$season = $request->variable('season', 0);
|
||||
$league = $request->variable('league', 0);
|
||||
if (!$season or !$league)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
$season = $request->variable('season', 0);
|
||||
$league = $request->variable('league', 0);
|
||||
if (!$season or !$league)
|
||||
{
|
||||
trigger_error('Keine gültige Saison oder Liga gewählt.');
|
||||
}
|
||||
|
||||
$download = $request->variable('d', false);
|
||||
$xml_string = xml_data($season, $league);
|
||||
$download = $request->variable('d', false);
|
||||
$xml_string = xml_data($season, $league);
|
||||
|
||||
if ( $xml_string == '')
|
||||
{
|
||||
if ( $xml_string == '')
|
||||
{
|
||||
trigger_error('Fehler! Die XML-Datei konnte nicht erzeugt werden.');
|
||||
}
|
||||
}
|
||||
|
||||
if ($download)
|
||||
{
|
||||
if ($download)
|
||||
{
|
||||
// Download XML-File
|
||||
$filename = 'league_' . $season . '_' . $league . '.xml';
|
||||
$fp = fopen('php://output', 'w');
|
||||
@@ -64,13 +62,12 @@ if (!defined('IN_PHPBB'))
|
||||
fwrite($fp, $xml_string);
|
||||
fclose($fp);
|
||||
exit_handler();
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
// XML header
|
||||
header ("content-type: text/xml");
|
||||
echo $xml_string;
|
||||
}
|
||||
}
|
||||
|
||||
function xml_data($season, $league)
|
||||
|
||||
@@ -11,46 +11,43 @@
|
||||
* Automatically write the seasons and leagues as XML-file
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
// Stuff required to work with phpBB3
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
$user->add_lang_ext('football/football', 'info_acp_update');
|
||||
include('../includes/constants.' . $phpEx);
|
||||
|
||||
if ($config['board_disable'])
|
||||
{
|
||||
// Stuff required to work with phpBB3
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
$user->add_lang_ext('football/football', 'info_acp_update');
|
||||
include('../includes/constants.' . $phpEx);
|
||||
|
||||
if ($config['board_disable'])
|
||||
{
|
||||
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
//Check Access Code
|
||||
global $code;
|
||||
$code = $request->variable('code', '');
|
||||
if (strcmp($code, trim($config['football_update_code'])) <> 0)
|
||||
{
|
||||
trigger_error('ERROR_XML_CODE');
|
||||
}
|
||||
|
||||
$string = xml_seasons();
|
||||
|
||||
if ( $string == '')
|
||||
{
|
||||
trigger_error('ERROR_XML_CREATE');
|
||||
}
|
||||
|
||||
header ("content-type: text/xml");
|
||||
echo $string;
|
||||
}
|
||||
|
||||
//Check Access Code
|
||||
global $code;
|
||||
$code = $request->variable('code', '');
|
||||
if (strcmp($code, trim($config['football_update_code'])) <> 0)
|
||||
{
|
||||
trigger_error('ERROR_XML_CODE');
|
||||
}
|
||||
|
||||
$string = xml_seasons();
|
||||
|
||||
if ( $string == '')
|
||||
{
|
||||
trigger_error('ERROR_XML_CREATE');
|
||||
}
|
||||
|
||||
header ("content-type: text/xml");
|
||||
echo $string;
|
||||
|
||||
function xml_seasons()
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx, $table_prefix, $code, $ext_path;
|
||||
|
||||
Reference in New Issue
Block a user