45 Commits

Author SHA1 Message Date
579d841dfb Remove arrows in bet input fields in mozilla mobile browser 2023-11-24 11:46:15 +01:00
2153dadf7b Fix warning in matches management for started matches 2023-08-20 12:16:39 +02:00
30489c0cfb Fix warning in results page when result is after penalty 2023-08-11 09:09:53 +02:00
5edd08986c Fix ranks total 2023-08-06 16:50:12 +02:00
c490a00b48 Fix warning in football acp manage team page 2023-07-30 18:10:15 +02:00
6c90033ede Fix charts 2023-06-08 21:07:33 +02:00
c9b4372b34 Merge remote-tracking branch 'football/master'
# Conflicts:
#	acp/matches_module.php
#	adm/style/acp_football_leagues.html
#	adm/style/acp_football_matches.html
#	block/all_bets.php
#	block/rank_matchday.php
#	block/ranks_total.php
#	config/services.yml
#	controller/main.php
#	event/main_listener.php
#	includes/constants.php
#	includes/functions.php
#	language/de/football.php
#	language/de/info_acp_leagues.php
#	language/de/info_acp_matches.php
#	styles/prosilver/template/all_bets.html
#	styles/prosilver/template/results.html
#	styles/prosilver/template/table.html
#	styles/prosilver/theme/football.css
2023-06-07 20:40:50 +02:00
76cedb15a2 Only allow betting if user is in a match 2022-08-12 20:07:38 +02:00
41397ffbdc Fix warning in all bets when no bets are shown. 2022-08-11 16:29:35 +02:00
football
cba1e024cd Version 0.9.9
- Code cleaning
2021-04-07 00:32:55 +02:00
football
75c02e1eb8 Version 0.9.9
- Code cleaning
2021-04-06 23:39:05 +02:00
football
80e99f7a11 Version 0.9.9
- Code cleaning
2021-04-06 22:08:58 +02:00
football
7ab5247437 Version 0.9.9
- several bugfixes
- Code cleaning
2021-04-06 17:58:31 +02:00
football
25dc3154aa Version 0.9.9 2021-04-05 00:35:17 +02:00
football
a2ea3364a4 Version 0.9.9
- several bugfixes
- Code cleaning
2021-04-04 22:15:15 +02:00
abf7e95d08 Fix calculation of bonuspoints and corrected values for form table 2021-01-27 22:12:23 +01:00
573a3bdea7 Changes for phpbb 3.3.0 2020-08-03 21:22:09 +02:00
25e4e53485 Fix mobile style to display correct page when results_tl is clicked.
Rearrange mobile menu to fit to the desktop menu.
2018-08-04 16:00:21 +02:00
adfecaac96 Fix change sign in ranks_matchday and ranks_total. 2018-07-07 16:03:31 +02:00
4870166b96 Show table on bet site also on mobile devices 2018-06-24 16:39:04 +02:00
9d57480e6d Change last blue color to green in table. 2018-06-24 15:57:39 +02:00
948f7b8511 Updated desktop menu to show ranks_total if bet_type is 1
Updated mobile menu to behave like desktop menu
2018-06-23 16:08:29 +02:00
90172d076b Add modifications for show_table of matches and bet_type for leagues in ACP. 2018-06-03 13:57:34 +02:00
66dceff9f2 change color to green 2018-05-20 16:18:38 +02:00
8b679b1286 Change order of tippers in all_bets site according to the tipper vs tipper matches and change background color. 2018-04-03 22:16:31 +02:00
e1db71c99d Add matchtime tooltip to all_bets site 2018-04-03 21:58:09 +02:00
3ade0f043f Add bonuspoint, corr and chart calculation and update displaying of chart. 2018-04-03 21:06:22 +02:00
f56cf04e74 Rearange main menu and change external links to internal links 2018-04-03 19:57:48 +02:00
66b2a1a8d0 Readd rank_matchday in all sites and add check for correct league --> Display of rank_matchday works on table and results_tl site. 2018-04-03 19:24:37 +02:00
889ff05ca6 Remove highlight of table menu item in bet site. 2018-04-03 19:14:08 +02:00
0b9f099381 Remove small rank total from main view. 2018-04-03 19:13:08 +02:00
148c16c87a Remove unneeded teams from tables in mytable site. 2018-04-03 19:12:36 +02:00
511fab50b7 Add results_tl and handling in different files 2018-04-03 18:43:39 +02:00
6c06de3772 Remove unneeded menu items. 2018-04-03 17:47:42 +02:00
37204150dc Add results_tl to language and main controller. 2018-04-03 17:47:30 +02:00
85d3c835d2 Change short team names to full team names 2018-04-02 23:25:37 +02:00
ac536658fa Add auto selection of correct leage (higher or lower league id 50) 2018-04-02 22:58:54 +02:00
92267523b9 Include full table in bet view instead of small table 2018-04-02 22:56:21 +02:00
4a64eb71a3 Add bonus points to the missing tables and make non relevant teams invisible in tables. 2018-04-02 22:24:49 +02:00
268ca763f7 Fix BNS coloumn displaying 2018-02-21 23:26:07 +01:00
66b35b0155 Fix table and add corr to constants 2018-02-21 23:24:04 +01:00
4b627586f8 Add bonus points calculation to table total. 2018-02-21 23:19:03 +01:00
3b47093a3a fix broken function current_league($season) sql select 2018-02-19 22:57:59 +01:00
511a23d609 Wappen der Mannschaften hinzugefügt 2018-02-19 22:10:07 +01:00
6b9ebb0d1a Football functions.php angepasst, damit ertippte Punkte bei ihren jeweiligen Teams als Tore eingetragen werden. 2018-02-19 21:56:29 +01:00
751 changed files with 13046 additions and 12416 deletions

3
.gitignore vendored
View File

@@ -63,3 +63,6 @@ Icon
/images/arrow_down.gif /images/arrow_down.gif
/images/arrow_up.gif /images/arrow_up.gif
/migrations/v099_beta1.php /migrations/v099_beta1.php
/.buildpath
/.project
/.settings/

3
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

11
.idea/aws.xml generated Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="accountSettings">
<option name="activeRegion" value="us-east-1" />
<option name="recentlyUsedRegions">
<list>
<option value="us-east-1" />
</list>
</option>
</component>
</project>

6
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" project-jdk-name="openjdk-14" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/phpbb_football_tlw.iml" filepath="$PROJECT_DIR$/.idea/phpbb_football_tlw.iml" />
</modules>
</component>
</project>

4
.idea/php.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="5.3.0" />
</project>

9
.idea/phpbb_football_tlw.iml generated Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -56,7 +56,7 @@ class all_bets_module
$form_key = 'acp_football_all_bets'; $form_key = 'acp_football_all_bets';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$season = $this->request->variable('s', 0); $season = $this->request->variable('s', 0);
@@ -579,7 +579,7 @@ class all_bets_module
$legend = delivery($season, $league, $matchday); $legend = delivery($season, $league, $matchday);
$template->assign_vars(array( $template->assign_vars(array(
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_SEASON' => $season, 'S_SEASON' => $season,
'S_LEAGUE' => $league, 'S_LEAGUE' => $league,
'S_MATCHDAY' => $matchday, 'S_MATCHDAY' => $matchday,
@@ -596,4 +596,3 @@ class all_bets_module
); );
} }
} }
?>

View File

@@ -73,7 +73,7 @@ class bank_module
$form_key = 'acp_football_bank'; $form_key = 'acp_football_bank';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addmembers'])) ? 'addmembers' : $this->request->variable('action', '')); $action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addmembers'])) ? 'addmembers' : $this->request->variable('action', ''));
@@ -555,7 +555,7 @@ class bank_module
'POINTS' => $this->config['points_name'], 'POINTS' => $this->config['points_name'],
'TARGET' => $target, 'TARGET' => $target,
'ACTUAL' => $actual, 'ACTUAL' => $actual,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bank', 's' => $season, 'l' => $league)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bank', 's' => $season, 'l' => $league)),
'U_ACTION' => $this->u_action . "&amp;s=$season&amp;l=$league", 'U_ACTION' => $this->u_action . "&amp;s=$season&amp;l=$league",
'U_BACK' => $this->u_action. "&amp;s=$season&amp;l=$league", 'U_BACK' => $this->u_action. "&amp;s=$season&amp;l=$league",
) )
@@ -593,7 +593,7 @@ class bank_module
{ {
$template->assign_block_vars('member', array( $template->assign_block_vars('member', array(
'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;action=edit&amp;u={$row['user_id']}"), 'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;action=edit&amp;u={$row['user_id']}"),
'U_USER_BANK' => $helper->route('football_main_controller',array('side' => 'bank', 's' => $season, 'l' => $league, 'u' => $row['user_id'])), 'U_USER_BANK' => $helper->route('football_football_controller',array('side' => 'bank', 's' => $season, 'l' => $league, 'u' => $row['user_id'])),
'USERNAME' => $row['username'], 'USERNAME' => $row['username'],
'POINTS' => $functions_points->number_format_points($row['user_points']), 'POINTS' => $functions_points->number_format_points($row['user_points']),
'TARGET' => $functions_points->number_format_points($row['target']), 'TARGET' => $functions_points->number_format_points($row['target']),
@@ -619,7 +619,7 @@ class bank_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bank', 's' => $season)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bank', 's' => $season)),
'U_DLOAD_BANK_OPEN' => $helper->route('football_football_download',array('downside' => 'dload_bank_open', 's' => $season)), 'U_DLOAD_BANK_OPEN' => $helper->route('football_football_download',array('downside' => 'dload_bank_open', 's' => $season)),
'S_SEASON' => $season, 'S_SEASON' => $season,
'S_LIST_DEPOSITED' => ($this->config['football_ult_points'] == UP_POINTS) ? false : true, 'S_LIST_DEPOSITED' => ($this->config['football_ult_points'] == UP_POINTS) ? false : true,
@@ -645,7 +645,7 @@ class bank_module
LEFT JOIN ' . FOOTB_POINTS . " AS p ON (p.season = $season AND p.league = l.league) LEFT JOIN ' . FOOTB_POINTS . " AS p ON (p.season = $season AND p.league = l.league)
WHERE l.season = $season WHERE l.season = $season
GROUP BY l.league GROUP BY l.league
ORDER BY league ASC"; ORDER BY l.league ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$rows_leagues = $db->sql_fetchrowset($result); $rows_leagues = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -670,5 +670,3 @@ class bank_module
} }
} }
} }
?>

View File

@@ -66,7 +66,7 @@ class bets_module
$form_key = 'acp_football_bets'; $form_key = 'acp_football_bets';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['bet'])) ? 'bet' : $this->request->variable('action', ''); $action = (isset($_POST['bet'])) ? 'bet' : $this->request->variable('action', '');
@@ -426,6 +426,9 @@ class bets_module
$league_info = league_info($season, $league); $league_info = league_info($season, $league);
$cash = $this->request->variable('cash', false); $cash = $this->request->variable('cash', false);
save_ranking_matchday($season, $league, $matchday, $cash); save_ranking_matchday($season, $league, $matchday, $cash);
bonuspoints($season, $league, $matchday);
corr($season, $league, $matchday);
chart($season, $league, $matchday);
} }
break; break;
} }
@@ -583,7 +586,7 @@ class bets_module
) )
); );
} }
$db->sql_freeresult($resultopen); $db->sql_freeresult($result);
// Calculate extra bets of matchday // Calculate extra bets of matchday
// Start select team // Start select team
@@ -730,7 +733,7 @@ class bets_module
$legend = delivery($season, $league, $matchday); $legend = delivery($season, $league, $matchday);
$template->assign_vars(array( $template->assign_vars(array(
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LEGEND' => $legend, 'S_LEGEND' => $legend,
'S_SUCCESS' => (sizeof($success)) ? true : false, 'S_SUCCESS' => (sizeof($success)) ? true : false,
'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '', 'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '',
@@ -750,4 +753,3 @@ class bets_module
); );
} }
} }
?>

View File

@@ -56,7 +56,7 @@ class extra_module
$form_key = 'acp_football_extra'; $form_key = 'acp_football_extra';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['remove'])) ? 'remove' : $this->request->variable('action', '')); $action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['remove'])) ? 'remove' : $this->request->variable('action', ''));
@@ -415,7 +415,7 @@ class extra_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_SEASON' => $season, 'S_SEASON' => $season,
'S_LEAGUE' => $league, 'S_LEAGUE' => $league,
'S_SEASON_OPTIONS' => $season_options, 'S_SEASON_OPTIONS' => $season_options,
@@ -456,4 +456,3 @@ class extra_module
} }
} }
} }
?>

View File

@@ -70,7 +70,7 @@ class football_module
$template->assign_vars(array( $template->assign_vars(array(
'S_IN_FOOTBALL_USERGUIDE' => true, 'S_IN_FOOTBALL_USERGUIDE' => true,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet')),
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'], 'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
'ICON_BACK_TO_TOP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" style="vertical-align: middle;" alt="' . $user->lang['BACK_TO_TOP'] . '" title="' . $user->lang['BACK_TO_TOP'] . '" />', 'ICON_BACK_TO_TOP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" style="vertical-align: middle;" alt="' . $user->lang['BACK_TO_TOP'] . '" title="' . $user->lang['BACK_TO_TOP'] . '" />',
'S_VERSION_NO' => $this->config['football_version'], 'S_VERSION_NO' => $this->config['football_version'],
@@ -242,7 +242,7 @@ class football_module
$this->page_title = $display_vars['title']; $this->page_title = $display_vars['title'];
$template->assign_vars(array( $template->assign_vars(array(
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet')),
'L_TITLE' => $user->lang[$display_vars['title']], 'L_TITLE' => $user->lang[$display_vars['title']],
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'], 'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
'S_ERROR' => (sizeof($error)) ? true : false, 'S_ERROR' => (sizeof($error)) ? true : false,
@@ -434,5 +434,3 @@ class football_module
} }
} }
?>

View File

@@ -56,7 +56,7 @@ class ko_module
$form_key = 'acp_football_ko'; $form_key = 'acp_football_ko';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['update'])) ? 'update' : $this->request->variable('action', ''); $action = (isset($_POST['update'])) ? 'update' : $this->request->variable('action', '');
@@ -230,7 +230,7 @@ class ko_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_ERROR' => (sizeof($error)) ? true : false, 'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_SUCCESS' => (sizeof($success)) ? true : false, 'S_SUCCESS' => (sizeof($success)) ? true : false,
@@ -252,4 +252,3 @@ class ko_module
); );
} }
} }
?>

View File

@@ -56,7 +56,7 @@ class leagues_module
$form_key = 'acp_football_leagues'; $form_key = 'acp_football_leagues';
add_form_key($form_key); add_form_key($form_key);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx); include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addmembers'])) ? 'addmembers' : $this->request->variable('action', '')); $action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addmembers'])) ? 'addmembers' : $this->request->variable('action', ''));
@@ -416,7 +416,7 @@ class leagues_module
break; break;
case 'add': case 'add':
if ($league > 0 AND $league <= 99) if ($league > 0 AND $league <= 101)
{ {
if ($league_info) if ($league_info)
{ {
@@ -494,6 +494,7 @@ class leagues_module
$league_info['join_in_season'] = $this->request->variable('league_join_in_season', $league_info['join_in_season'], true); $league_info['join_in_season'] = $this->request->variable('league_join_in_season', $league_info['join_in_season'], true);
$league_info['bet_in_time'] = $this->request->variable('league_bet_in_time', $league_info['bet_in_time'], true); $league_info['bet_in_time'] = $this->request->variable('league_bet_in_time', $league_info['bet_in_time'], true);
$league_info['rules_post_id'] = $this->request->variable('league_rules_post_id', $league_info['rules_post_id'], true); $league_info['rules_post_id'] = $this->request->variable('league_rules_post_id', $league_info['rules_post_id'], true);
$league_info['bet_type'] = $this->request->variable('bet_type', false);
if (!$league_info['rules_post_id'] and $league_info['join_by_user'] == 1) if (!$league_info['rules_post_id'] and $league_info['join_by_user'] == 1)
{ {
@@ -510,6 +511,15 @@ class leagues_module
$error[] = $user->lang['CHECK_HITS02_WINS']; $error[] = $user->lang['CHECK_HITS02_WINS'];
} }
if ($league_info['bet_type'] == true)
{
$bet_type = '0';
}
else
{
$bet_type = '1';
}
$matchday_wins = explode(';',$league_info['win_matchday']); $matchday_wins = explode(';',$league_info['win_matchday']);
foreach ($matchday_wins as $matchday_win) foreach ($matchday_wins as $matchday_win)
{ {
@@ -555,6 +565,7 @@ class leagues_module
'bet_in_time' => $league_info['bet_in_time'], 'bet_in_time' => $league_info['bet_in_time'],
'rules_post_id' => (is_numeric($league_info['rules_post_id'])) ? $league_info['rules_post_id'] : 0, 'rules_post_id' => (is_numeric($league_info['rules_post_id'])) ? $league_info['rules_post_id'] : 0,
'bet_points' => $league_info['bet_points'], 'bet_points' => $league_info['bet_points'],
'bet_type' => (int) $bet_type,
); );
$data['league'] = $league; $data['league'] = $league;
@@ -564,8 +575,8 @@ class leagues_module
$data['league_matches'] = ($league_info['league_type'] == LEAGUE_KO) ? 0 : $league_info['matches_on_matchday']; $data['league_matches'] = ($league_info['league_type'] == LEAGUE_KO) ? 0 : $league_info['matches_on_matchday'];
$var_ary = array( $var_ary = array(
'league' => array('num', false, 1, 99), 'league' => array('num', false, 1, 101),
'league_name' => array('string', false, 2, 20), 'league_name' => array('string', false, 2, 25),
'league_short' => array('string', false, 1, 3), 'league_short' => array('string', false, 1, 3),
'league_matchdays' => array('num', false, 0, 99), 'league_matchdays' => array('num', false, 0, 99),
'league_matches' => array('num', false, 0, 99), 'league_matches' => array('num', false, 0, 99),
@@ -620,6 +631,15 @@ class leagues_module
// check if matches created // check if matches created
$existing_matches_on_league = count_existing_matches($season, $league, 0); $existing_matches_on_league = count_existing_matches($season, $league, 0);
if ($league_info['bet_type'] == true)
{
$bet_type = '0';
}
else
{
$bet_type = '1';
}
$u_back = $this->u_action . "&amp;s=$season"; $u_back = $this->u_action . "&amp;s=$season";
$template->assign_vars(array( $template->assign_vars(array(
@@ -662,6 +682,7 @@ class leagues_module
'LEAGUE_WIN_SEASON' => $league_info['win_season'], 'LEAGUE_WIN_SEASON' => $league_info['win_season'],
'POINTS_LAST_YES' => ($league_info['points_last'] == 1) ? ' checked="checked"' : '', 'POINTS_LAST_YES' => ($league_info['points_last'] == 1) ? ' checked="checked"' : '',
'POINTS_LAST_NO' => ($league_info['points_last'] == 0) ? ' checked="checked"' : '', 'POINTS_LAST_NO' => ($league_info['points_last'] == 0) ? ' checked="checked"' : '',
'S_BET_TYPE' => $bet_type,
'U_BACK' => $u_back, 'U_BACK' => $u_back,
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season", 'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season",
) )
@@ -672,7 +693,7 @@ class leagues_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season)),
'S_SEASON' => $season, 'S_SEASON' => $season,
'S_SEASON_OPTIONS' => $season_options, 'S_SEASON_OPTIONS' => $season_options,
'S_LEAGUE_ADD' => true, 'S_LEAGUE_ADD' => true,
@@ -690,8 +711,8 @@ class leagues_module
FROM ' . FOOTB_LEAGUES . ' AS l FROM ' . FOOTB_LEAGUES . ' AS l
LEFT JOIN ' . FOOTB_BETS . " AS b ON (b.season = l.season AND b.league = l.league) LEFT JOIN ' . FOOTB_BETS . " AS b ON (b.season = l.season AND b.league = l.league)
WHERE l.season = $season WHERE l.season = $season
GROUP BY league GROUP BY l.league
ORDER BY league ASC"; ORDER BY l.league ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$rows_leagues = $db->sql_fetchrowset($result); $rows_leagues = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -730,4 +751,3 @@ class leagues_module
} }
} }
} }
?>

View File

@@ -56,7 +56,7 @@ class matchdays_module
$form_key = 'acp_football_matchdays'; $form_key = 'acp_football_matchdays';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ''; $action = (isset($_POST['add'])) ? 'add' : '';
@@ -216,7 +216,7 @@ class matchdays_module
$show_delivery_select = false; $show_delivery_select = false;
$show_delivery = true; $show_delivery = true;
$lang_dates = $user->lang['datetime']; $lang_dates = $user->lang['datetime'];
$sql = "(SELECT md.matchday, $sql = "(SELECT md.matchday AS matchday,
1 AS number, 1 AS number,
md.delivery_date, md.delivery_date,
CASE DATE_FORMAT(md.delivery_date,'%w') CASE DATE_FORMAT(md.delivery_date,'%w')
@@ -251,7 +251,7 @@ class matchdays_module
AND md.league = agg.league AND md.league = agg.league
AND md.matchday = agg.matchday) AND md.matchday = agg.matchday)
UNION UNION
(SELECT md2.matchday, (SELECT md2.matchday AS matchday,
2 AS number, 2 AS number,
md2.delivery_date_2 AS delivery_date, md2.delivery_date_2 AS delivery_date,
CASE DATE_FORMAT(md2.delivery_date_2,'%w') CASE DATE_FORMAT(md2.delivery_date_2,'%w')
@@ -286,7 +286,7 @@ class matchdays_module
AND md2.league = agg2.league AND md2.league = agg2.league
AND md2.matchday = agg2.matchday) AND md2.matchday = agg2.matchday)
UNION UNION
(SELECT md3.matchday, (SELECT md3.matchday AS matchday,
3 AS number, 3 AS number,
md3.delivery_date_3 AS delivery_date, md3.delivery_date_3 AS delivery_date,
CASE DATE_FORMAT(md3.delivery_date_3,'%w') CASE DATE_FORMAT(md3.delivery_date_3,'%w')
@@ -1090,7 +1090,7 @@ class matchdays_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_SEASON' => $season, 'S_SEASON' => $season,
'S_LEAGUE' => $league, 'S_LEAGUE' => $league,
'S_SEASON_OPTIONS' => $season_options, 'S_SEASON_OPTIONS' => $season_options,
@@ -1131,4 +1131,3 @@ class matchdays_module
} }
} }
} }
?>

View File

@@ -56,7 +56,7 @@ class matches_module
$form_key = 'acp_football_matches'; $form_key = 'acp_football_matches';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', ''); $action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', '');
@@ -398,6 +398,7 @@ class matches_module
$match_row['formula_guest'] = utf8_normalize_nfc($this->request->variable('formula_guest', '', true)); $match_row['formula_guest'] = utf8_normalize_nfc($this->request->variable('formula_guest', '', true));
$match_row['ko_match'] = $this->request->variable('match_ko', false); $match_row['ko_match'] = $this->request->variable('match_ko', false);
$match_row['group_id'] = ($this->request->variable('group_match', false)) ? utf8_normalize_nfc($this->request->variable('match_group', '', true)) : ''; $match_row['group_id'] = ($this->request->variable('group_match', false)) ? utf8_normalize_nfc($this->request->variable('match_group', '', true)) : '';
$match_row['show_table'] = $this->request->variable('show_table', false);
if ($match_row['team_id_home'] <> '') if ($match_row['team_id_home'] <> '')
{ {
@@ -593,7 +594,7 @@ class matches_module
} }
else else
{ {
$status_options = '<option value="' . $row['status'] . '" selected="selected">' . $row['status'] . '</option>'; $status_options = '<option value="' . $match_row['status'] . '" selected="selected">' . $match_row['status'] . '</option>';
} }
// Grab for teams for selection // Grab for teams for selection
if ($ko_league) if ($ko_league)
@@ -717,7 +718,7 @@ class matches_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_SEASON' => $season, 'S_SEASON' => $season,
'S_LEAGUE' => $league, 'S_LEAGUE' => $league,
'S_KO_LEAGUE' => $ko_league, 'S_KO_LEAGUE' => $ko_league,
@@ -761,5 +762,3 @@ class matches_module
} }
} }
} }
?>

View File

@@ -60,7 +60,7 @@ class results_module
$form_key = 'acp_football_results'; $form_key = 'acp_football_results';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['edit'])) ? 'edit' : $this->request->variable('action', ''); $action = (isset($_POST['edit'])) ? 'edit' : $this->request->variable('action', '');
@@ -443,6 +443,9 @@ class results_module
$cash = $this->request->variable('cash', false); $cash = $this->request->variable('cash', false);
save_ranking_matchday($season, $league, $matchday, $cash); save_ranking_matchday($season, $league, $matchday, $cash);
bonuspoints($season, $league, $matchday);
corr($season, $league, $matchday);
chart($season, $league, $matchday);
// Patch delevirey // Patch delevirey
if ($league_info['bet_in_time'] == 1) if ($league_info['bet_in_time'] == 1)
@@ -793,7 +796,7 @@ class results_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LEGEND' => $legend, 'S_LEGEND' => $legend,
'S_SUCCESS' => (sizeof($success)) ? true : false, 'S_SUCCESS' => (sizeof($success)) ? true : false,
'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '', 'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '',
@@ -815,5 +818,3 @@ class results_module
); );
} }
} }
?>

View File

@@ -56,7 +56,7 @@ class seasons_module
$form_key = 'acp_football_seasons'; $form_key = 'acp_football_seasons';
add_form_key($form_key); add_form_key($form_key);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx); include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', ''); $action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', '');
@@ -335,6 +335,7 @@ class seasons_module
'SEASON_SHORT' => $season_row['season_name_short'], 'SEASON_SHORT' => $season_row['season_name_short'],
'U_BACK' => $u_back, 'U_BACK' => $u_back,
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season", 'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season",
'S_VERSION_NO' => $this->config['football_version'],
) )
); );
return; return;
@@ -343,7 +344,7 @@ class seasons_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet')),
'S_SEASON_ADD' => true, 'S_SEASON_ADD' => true,
) )
); );
@@ -356,8 +357,8 @@ class seasons_module
COUNT(l.league) AS leagues COUNT(l.league) AS leagues
FROM ' . FOOTB_SEASONS . ' s FROM ' . FOOTB_SEASONS . ' s
LEFT JOIN ' . FOOTB_LEAGUES . ' l on l.season = s.season LEFT JOIN ' . FOOTB_LEAGUES . ' l on l.season = s.season
GROUP BY season GROUP BY s.season
ORDER BY season DESC'; ORDER BY s.season DESC';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$rows_seasons = $db->sql_fetchrowset($result); $rows_seasons = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -390,5 +391,3 @@ class seasons_module
} }
} }
} }
?>

View File

@@ -56,7 +56,7 @@ class teams_module
$form_key = 'acp_football_teams'; $form_key = 'acp_football_teams';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', ''); $action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', '');
@@ -189,7 +189,10 @@ class teams_module
foreach( $files as $file ) foreach( $files as $file )
{ {
$selected = '';
if (isset($team_row) && is_array($team_row)) {
$selected = (strtoupper($file) == strtoupper($team_row['team_symbol'])) ? ' selected="selected"' : ''; $selected = (strtoupper($file) == strtoupper($team_row['team_symbol'])) ? ' selected="selected"' : '';
}
$teamsymbol_options .= '<option value="' . $file . '"' . $selected . '>' . $file . '</option>'; $teamsymbol_options .= '<option value="' . $file . '"' . $selected . '>' . $file . '</option>';
} }
closedir($directory); closedir($directory);
@@ -589,7 +592,7 @@ class teams_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_SEASON' => $season, 'S_SEASON' => $season,
'S_LEAGUE' => $league, 'S_LEAGUE' => $league,
'S_KO_LEAGUE' => $ko_league, 'S_KO_LEAGUE' => $ko_league,
@@ -597,6 +600,7 @@ class teams_module
'S_LEAGUE_OPTIONS' => $league_options, 'S_LEAGUE_OPTIONS' => $league_options,
'S_TEAM_OPTIONS' => $team_options, 'S_TEAM_OPTIONS' => $team_options,
'S_TEAM_ADD' => true, 'S_TEAM_ADD' => true,
'S_VERSION_NO' => $this->config['football_version'],
) )
); );
@@ -609,7 +613,7 @@ class teams_module
WHERE t.season = $season WHERE t.season = $season
AND t.league = $league AND t.league = $league
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY team_id ASC"; ORDER BY t.team_id ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$rows_teams = $db->sql_fetchrowset($result); $rows_teams = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -654,4 +658,3 @@ class teams_module
); );
} }
} }
?>

View File

@@ -107,7 +107,7 @@ class update_module
$form_key = 'acp_football_update'; $form_key = 'acp_football_update';
add_form_key($form_key); add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars // Check and set some common vars
$action = (isset($_POST['load_xml_season'])) ? 'load_xml_season' : ''; $action = (isset($_POST['load_xml_season'])) ? 'load_xml_season' : '';
@@ -131,7 +131,7 @@ class update_module
$insert_season = $this->request->variable('insert_season', false); $insert_season = $this->request->variable('insert_season', false);
$insert_league = $this->request->variable('insert_league', false); $insert_league = $this->request->variable('insert_league', false);
$list = $this->request->variable('list', false); $list = $this->request->variable('list', false);
$this->xml_ary = unserialize(urldecode($this->request->variable('xml_ary', ''))); $this->xml_ary = json_decode(urldecode($this->request->variable('xml_ary', '')),true);
$display_team_mapping = false; $display_team_mapping = false;
// Clear some vars // Clear some vars
$error = array(); $error = array();
@@ -730,7 +730,7 @@ class update_module
$template->assign_vars(array( $template->assign_vars(array(
'U_ACTION' => $this->u_action, 'U_ACTION' => $this->u_action,
'U_CHOOSE_ACTION' => $this->u_action . "&amp;action=choose", 'U_CHOOSE_ACTION' => $this->u_action . "&amp;action=choose",
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)), 'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_ERROR' => (sizeof($error)) ? true : false, 'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_SUCCESS' => (sizeof($success)) ? true : false, 'S_SUCCESS' => (sizeof($success)) ? true : false,
@@ -750,7 +750,7 @@ class update_module
'DO_MATCHES' => ($insert_league) ? sprintf($user->lang['INSERT_MATCHES']) : sprintf($user->lang['UPDATE_MATCHES']), 'DO_MATCHES' => ($insert_league) ? sprintf($user->lang['INSERT_MATCHES']) : sprintf($user->lang['UPDATE_MATCHES']),
'XML_SEASON_URL' => $xml_season_url, 'XML_SEASON_URL' => $xml_season_url,
'XML_LEAGUE_URL' => $xml_league_url, 'XML_LEAGUE_URL' => $xml_league_url,
'XML_ARY' => (sizeof($this->xml_ary)) ? urlencode(serialize($this->xml_ary)) : '', 'XML_ARY' => (is_array($this->xml_ary) && sizeof($this->xml_ary)) ? urlencode(json_encode($this->xml_ary)) : '',
'S_XSEASON_OPTIONS' => $xseason_options, 'S_XSEASON_OPTIONS' => $xseason_options,
'S_XLEAGUE_OPTIONS' => $xleague_options, 'S_XLEAGUE_OPTIONS' => $xleague_options,
'S_XSEASON' => $xseason, 'S_XSEASON' => $xseason,
@@ -851,7 +851,7 @@ class update_module
{ {
$this->xml_ary['footb_teams'][$key]['team_id'] = $team_id_map_ary[$xml_team['team_id']]; $this->xml_ary['footb_teams'][$key]['team_id'] = $team_id_map_ary[$xml_team['team_id']];
} }
usort($this->xml_ary['footb_teams'], 'sort_teams'); usort($this->xml_ary['footb_teams'], array($this, 'sort_teams'));
foreach ($this->xml_ary['footb_matches'] AS $key => $xml_team) foreach ($this->xml_ary['footb_matches'] AS $key => $xml_team)
{ {
@@ -1144,7 +1144,7 @@ class update_module
{ {
if (sizeof($table_row)) if (sizeof($table_row))
{ {
$tpl .= '<input type="hidden" name="row_' . $id . '" value="' . urlencode(serialize($diff)) . '" />'; $tpl .= '<input type="hidden" name="row_' . $id . '" value="' . urlencode(json_encode($diff)) . '" />';
// match status update and database // match status update and database
if (substr($id, 0, 13) == 'FOOTB_MATCHES') if (substr($id, 0, 13) == 'FOOTB_MATCHES')
{ {
@@ -1160,7 +1160,7 @@ class update_module
else else
{ {
// Insert team // Insert team
$tpl .= '<input type="hidden" name="' . $id . '[]" value="' . urlencode(serialize($diff)) . '" />'; $tpl .= '<input type="hidden" name="' . $id . '[]" value="' . urlencode(json_encode($diff)) . '" />';
} }
} }
@@ -1171,7 +1171,7 @@ class update_module
{ {
if (sizeof($table_row)) if (sizeof($table_row))
{ {
$color_open = '<span title= "' . sprintf($user->lang['CURRENT_VALUE']) . ': ' . htmlspecialchars($table_row[$key], ENT_COMPAT, 'UTF-8') . '" style="color: red;">* '; $color_open = '<span title= "' . sprintf($user->lang['CURRENT_VALUE']) . ': ' . utf8_htmlspecialchars($table_row[$key]) . '" style="color: red;">* ';
$color_close = '</span>'; $color_close = '</span>';
} }
else else
@@ -1188,8 +1188,8 @@ class update_module
if (sizeof($order)) if (sizeof($order))
{ {
$value = (substr($key, 0, 7) == 'team_id') ? $value . ' ' . $this->team_ary[$value] : $value; $value = (substr($key, 0, 7) == 'team_id') ? $value . ' ' . $this->team_ary[$value] : $value;
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? $color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . '&nbsp;</td>' : $tpl_ary[$order[$key]] = ($order[$key] % 2) ? $color_open . utf8_htmlspecialchars($value) . $color_close . '&nbsp;</td>' :
'<td>' . $color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . '<br />'; '<td>' . $color_open . utf8_htmlspecialchars($value) . $color_close . '<br />';
} }
else else
{ {
@@ -1198,14 +1198,14 @@ class update_module
// Write table fields // Write table fields
if (sizeof($table_row)) if (sizeof($table_row))
{ {
$tpl .= '<td title= "' . htmlspecialchars($table_row[$key], ENT_COMPAT, 'UTF-8') . '">' . $tpl .= '<td title= "' . utf8_htmlspecialchars($table_row[$key]) . '">' .
$color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . $color_open . utf8_htmlspecialchars($value) . $color_close .
'</td>'; '</td>';
} }
else else
{ {
$tpl .= '<td title= "' . sprintf($user->lang['NEW_TEAM']) . '">' . $tpl .= '<td title= "' . sprintf($user->lang['NEW_TEAM']) . '">' .
$color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . $color_open . utf8_htmlspecialchars($value) . $color_close .
'</td>'; '</td>';
} }
} }
@@ -1245,15 +1245,15 @@ class update_module
if (sizeof($order)) if (sizeof($order))
{ {
$value = (substr($key, 0, 7) == 'team_id') ? $value . ' ' . $this->team_ary[$value] : $value; $value = (substr($key, 0, 7) == 'team_id') ? $value . ' ' . $this->team_ary[$value] : $value;
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '&nbsp;</td>' : $tpl_ary[$order[$key]] = ($order[$key] % 2) ? utf8_htmlspecialchars($value) . '&nbsp;</td>' :
'<td>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '<br />'; '<td>' . utf8_htmlspecialchars($value) . '<br />';
} }
else else
{ {
if ($key <> 'season' and $key <> 'league') if ($key <> 'season' and $key <> 'league')
{ {
// Write XML-table fields // Write XML-table fields
$tpl .= '<td>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</td>'; $tpl .= '<td>' . utf8_htmlspecialchars($value) . '</td>';
} }
} }
} }
@@ -1322,7 +1322,7 @@ class update_module
if ($this->request->variable($table . '_' . $row['index_field'], false)) if ($this->request->variable($table . '_' . $row['index_field'], false))
{ {
$diff_ary = unserialize(urldecode($this->request->variable('row_' . $table . '_' . $row['index_field'], ''))); $diff_ary = json_decode(urldecode($this->request->variable('row_' . $table . '_' . $row['index_field'], '')),true);
$sql_ary = array_intersect_ukey($diff_ary, $selected_fields, 'self::key_compare_func'); $sql_ary = array_intersect_ukey($diff_ary, $selected_fields, 'self::key_compare_func');
if ($table == 'FOOTB_MATCHES') if ($table == 'FOOTB_MATCHES')
{ {
@@ -1407,7 +1407,7 @@ class update_module
} }
foreach ($insert_ary AS $insert) foreach ($insert_ary AS $insert)
{ {
$sql_ary = unserialize(urldecode($insert)); $sql_ary = json_decode(urldecode($insert),true);
$sql = 'INSERT INTO ' . $table_name . ' ' . $db->sql_build_array('INSERT', $sql_ary); $sql = 'INSERT INTO ' . $table_name . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql); $db->sql_query($sql);
if ($db->sql_affectedrows()) if ($db->sql_affectedrows())
@@ -1461,4 +1461,3 @@ class update_module
return $selected_fields; return $selected_fields;
} }
} }
?>

View File

@@ -100,6 +100,10 @@
</dd> </dd>
</dl> </dl>
<!-- ENDIF --> <!-- ENDIF -->
<dl>
<dt><label for="bet_type">{L_BET_TYPE}:</label><br /><span>{L_BET_TYPE_EXPLAIN}</span></dt>
<dd><input name="bet_type" type="checkbox" id="bet_type" <!-- IF S_BET_TYPE -->checked="checked" <!-- ENDIF --> /></dd>
</dl>
</fieldset> </fieldset>
<fieldset> <fieldset>

View File

@@ -96,6 +96,10 @@
<dd><input name="formula_guest" type="text" id="formula_guest" size="9" maxlength="9" value="{FORMULA_GUEST}" /></dd> <dd><input name="formula_guest" type="text" id="formula_guest" size="9" maxlength="9" value="{FORMULA_GUEST}" /></dd>
</dl> </dl>
<!-- ENDIF --> <!-- ENDIF -->
<dl>
<dt><label for="show_table">{L_SHOW_TABLE}:</label><br /><span>{L_SHOW_TABLE_EXPLAIN}</span></dt>
<dd><input name="show_table" type="checkbox" class="radio" id="show_table" <!-- IF S_SHOW_TABLE --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<input type="hidden" name="ko_league" value="1" /> <input type="hidden" name="ko_league" value="1" />
</fieldset> </fieldset>

View File

@@ -7,18 +7,30 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
$start = $this->request->variable('start', 0); $start = $this->request->variable('start', 0);
$matches_on_matchday = false; $matches_on_matchday = false;
$league_info = league_info($season, $league);
$sql = 'SELECT COUNT(DISTINCT user_id) AS num_users if($league_info['bet_type'])
FROM ' . FOOTB_BETS . " {
WHERE season = $season AND league = $league"; $sql = 'SELECT COUNT(DISTINCT b.user_id) AS num_users
FROM ' . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
WHERE b.season = $season AND b.league = $league AND m.matchday = $matchday";
}
else
{
$sql = 'SELECT COUNT(DISTINCT b.user_id) AS num_users
FROM ' . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
LEFT JOIN ' . FOOTB_MATCHES . ' AS m2 ON (m2.season = m.season AND m2.league = m.league + 50 AND m2.matchday = m.matchday AND m2.team_id_home = b.user_id + 2000)
LEFT JOIN ' . FOOTB_MATCHES . " AS m3 ON (m3.season = m.season AND m3.league = m.league + 50 AND m3.matchday = m.matchday AND m3.team_id_guest = b.user_id + 2000)
WHERE b.season = $season AND b.league = $league AND m.matchday = $matchday AND (m2.match_no IS NOT NULL || m3.match_no IS NOT NULL) ";
}
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$total_users = (int) $db->sql_fetchfield('num_users'); $total_users = (int) $db->sql_fetchfield('num_users');
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -36,7 +48,19 @@ $sql = "SELECT
m.goals_guest, m.goals_guest,
SUM(IF(b.goals_home + 0 > b.goals_guest AND b.goals_home <> '' AND b.goals_guest <> '', 1, 0)) AS home, SUM(IF(b.goals_home + 0 > b.goals_guest AND b.goals_home <> '' AND b.goals_guest <> '', 1, 0)) AS home,
SUM(IF(b.goals_home = b.goals_guest AND b.goals_home <> '' AND b.goals_guest <> '', 1, 0)) AS draw, SUM(IF(b.goals_home = b.goals_guest AND b.goals_home <> '' AND b.goals_guest <> '', 1, 0)) AS draw,
SUM(IF(b.goals_home + 0 < b.goals_guest AND b.goals_home <> '' AND b.goals_guest <> '', 1, 0)) AS guest SUM(IF(b.goals_home + 0 < b.goals_guest AND b.goals_home <> '' AND b.goals_guest <> '', 1, 0)) AS guest,
CONCAT(
CASE DATE_FORMAT(m.match_datetime,'%w')
WHEN 0 THEN '" . $lang_dates['Sun'] . "'
WHEN 1 THEN '" . $lang_dates['Mon'] . "'
WHEN 2 THEN '" . $lang_dates['Tue'] . "'
WHEN 3 THEN '" . $lang_dates['Wed'] . "'
WHEN 4 THEN '" . $lang_dates['Thu'] . "'
WHEN 5 THEN '" . $lang_dates['Fri'] . "'
WHEN 6 THEN '" . $lang_dates['Sat'] . "'
ELSE 'Error' END,
DATE_FORMAT(m.match_datetime,' %d.%m. %H:%i')
) AS match_time
FROM " . FOOTB_MATCHES . ' AS m FROM " . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home) LEFT JOIN ' . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home)
LEFT JOIN ' . FOOTB_TEAMS . ' AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest) LEFT JOIN ' . FOOTB_TEAMS . ' AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest)
@@ -67,7 +91,7 @@ if ($user->data['football_mobile'])
} }
else else
{ {
if ($count_matches > 11) if ($count_matches > 12)
{ {
$split_after = 8; $split_after = 8;
$splits = ceil($count_matches / 8); $splits = ceil($count_matches / 8);
@@ -94,7 +118,7 @@ $sql_limit = $config['football_users_per_page'] * $count_matches;
// If we've got a hightlight set pass it on to pagination. // If we've got a hightlight set pass it on to pagination.
// handle pagination. // handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)); $base_url = $this->helper->route('football_football_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday));
$pagination = $phpbb_container->get('pagination'); $pagination = $phpbb_container->get('pagination');
if ($user->data['football_mobile']) if ($user->data['football_mobile'])
{ {
@@ -113,21 +137,47 @@ if ($count_matches > 0)
{ {
$matches_on_matchday = true; $matches_on_matchday = true;
if($league_info['bet_type'])
{
$sql = "SELECT $sql = "SELECT
u.user_id, u.user_id,
u.username, u.username,
m.status, m.status,
b.goals_home AS bet_home, b.goals_home AS bet_home,
b.goals_guest AS bet_guest, b.goals_guest AS bet_guest,
IFNULL(m2.match_no,m3.match_no),
" . select_points() . ' " . select_points() . '
FROM ' . FOOTB_MATCHES . ' AS m FROM ' . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no) LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
LEFT JOIN ' . USERS_TABLE . " AS u ON (u.user_id = b.user_id) LEFT JOIN ' . USERS_TABLE . ' AS u ON (u.user_id = b.user_id)
LEFT JOIN ' . FOOTB_MATCHES . ' AS m2 ON (m2.season = m.season AND m2.league = m.league + 50 AND m2.matchday = m.matchday AND m2.team_id_home = b.user_id + 2000)
LEFT JOIN ' . FOOTB_MATCHES . " AS m3 ON (m3.season = m.season AND m3.league = m.league + 50 AND m3.matchday = m.matchday AND m3.team_id_guest = b.user_id + 2000)
WHERE m.season = $season WHERE m.season = $season
AND m.league = $league AND m.league = $league
AND m.matchday = $matchday AND m.matchday = $matchday
ORDER BY LOWER(u.username) ASC, m.match_datetime ASC, m.match_no ASC"; ORDER BY IFNULL(m2.match_no,m3.match_no) ASC, m3.match_no ASC, LOWER(u.username) ASC, m.match_datetime ASC, m.match_no ASC";
}
else
{
$sql = "SELECT
u.user_id,
u.username,
m.status,
b.goals_home AS bet_home,
b.goals_guest AS bet_guest,
IFNULL(m2.match_no,m3.match_no),
" . select_points() . '
FROM ' . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
LEFT JOIN ' . USERS_TABLE . ' AS u ON (u.user_id = b.user_id)
LEFT JOIN ' . FOOTB_MATCHES . ' AS m2 ON (m2.season = m.season AND m2.league = m.league + 50 AND m2.matchday = m.matchday AND m2.team_id_home = b.user_id + 2000)
LEFT JOIN ' . FOOTB_MATCHES . " AS m3 ON (m3.season = m.season AND m3.league = m.league + 50 AND m3.matchday = m.matchday AND m3.team_id_guest = b.user_id + 2000)
WHERE m.season = $season
AND m.league = $league
AND m.matchday = $matchday
AND (m3.match_no IS NOT NULL OR m2.match_no IS NOT NULL)
ORDER BY IFNULL(m2.match_no,m3.match_no) ASC, m3.match_no ASC, LOWER(u.username) ASC, m.match_datetime ASC, m.match_no ASC";
}
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start); $result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
$user_bets = $db->sql_fetchrowset($result); $user_bets = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -164,12 +214,22 @@ foreach ($matches AS $match)
$count_user = 0; $count_user = 0;
$bet_index = 0; $bet_index = 0;
$last_match_index = 0; $last_match_index = 0;
if(!empty($bet_line))
{
foreach ($bet_line[$split_index] AS $user_bet) foreach ($bet_line[$split_index] AS $user_bet)
{ {
if ($bet_index == 0) if ($bet_index == 0)
{ {
$count_user++; $count_user++;
$league_info = league_info($season, $league);
if ($league_info['bet_type'])
{
$row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark'; $row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
}
else
{
$row_class = (!(($count_user + ($count_user % 2)) % 4)) ? 'bg1 row_light' : 'bg2 row_dark';
}
if ($user_bet['user_id'] == $user->data['user_id']) if ($user_bet['user_id'] == $user->data['user_id'])
{ {
$row_class = 'bg3 row_user'; $row_class = 'bg3 row_user';
@@ -213,6 +273,7 @@ foreach ($matches AS $match)
$matchday_sum_total += $total; $matchday_sum_total += $total;
$bet_index = 0; $bet_index = 0;
} }
}
} }
$template->assign_block_vars('match_panel.tendency_footer', array( $template->assign_block_vars('match_panel.tendency_footer', array(
@@ -268,6 +329,7 @@ foreach ($matches AS $match)
'GUEST_NAME' => $guestname, 'GUEST_NAME' => $guestname,
'RESULT' => $match['goals_home']. ':'.$match['goals_guest'], 'RESULT' => $match['goals_home']. ':'.$match['goals_guest'],
'COLOR_STYLE' => $colorstyle_match, 'COLOR_STYLE' => $colorstyle_match,
'MATCH_TIME' => $match['match_time'],
) )
); );
if ($match['status'] < 1 && !$config['football_view_tendencies']) if ($match['status'] < 1 && !$config['football_view_tendencies'])
@@ -287,12 +349,22 @@ if ($count_matches > 0)
$total = 0; $total = 0;
$count_user = 0; $count_user = 0;
$bet_index = 0; $bet_index = 0;
if(!empty($bet_line))
{
foreach ($bet_line[$split_index] AS $user_bet) foreach ($bet_line[$split_index] AS $user_bet)
{ {
if ($bet_index == 0) if ($bet_index == 0)
{ {
$count_user++; $count_user++;
$league_info = league_info($season, $league);
if ($league_info['bet_type'])
{
$row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark'; $row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
}
else
{
$row_class = (!(($count_user + ($count_user % 2)) % 4)) ? 'bg1 row_light' : 'bg2 row_dark';
}
if ($user_bet['user_id'] == $user->data['user_id']) if ($user_bet['user_id'] == $user->data['user_id'])
{ {
$row_class = 'bg3 row_user'; $row_class = 'bg3 row_user';
@@ -342,6 +414,7 @@ if ($count_matches > 0)
$bet_index = 0; $bet_index = 0;
} }
} }
}
$template->assign_block_vars('match_panel.tendency_footer', array( $template->assign_block_vars('match_panel.tendency_footer', array(
'S_TOTAL' => true, 'S_TOTAL' => true,
@@ -450,7 +523,7 @@ while ($row = $db->sql_fetchrow($result))
while ($user_row = $db->sql_fetchrow($result_bet)) while ($user_row = $db->sql_fetchrow($result_bet))
{ {
$bet_number++ ; $bet_number++ ;
$row_class = (!($bet_number % 2)) ? 'bg1 row_light' : 'bg2 row_dark'; $row_class = (!(($count_user + ($count_user % 2)) % 4)) ? 'bg1 row_light' : 'bg2 row_dark';
if ($user_row['user_id'] == $user->data['user_id']) if ($user_row['user_id'] == $user->data['user_id'])
{ {
$row_class = 'bg3 row_user'; $row_class = 'bg3 row_user';
@@ -492,4 +565,3 @@ $template->assign_vars(array(
'TOTAL_USERS' => ($total_users == 1) ? $user->lang['VIEW_BET_USER'] : sprintf($user->lang['VIEW_BET_USERS'], $total_users), 'TOTAL_USERS' => ($total_users == 1) ? $user->lang['VIEW_BET_USER'] : sprintf($user->lang['VIEW_BET_USERS'], $total_users),
) )
); );
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
// Check Prediction League authorisation // Check Prediction League authorisation
if ( !$this->auth->acl_get('u_use_football') ) if ( !$this->auth->acl_get('u_use_football') )
{ {
@@ -225,5 +230,3 @@ $template->assign_vars(array(
'POINTS' => $config['football_win_name'], 'POINTS' => $config['football_win_name'],
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -20,7 +20,9 @@ $join_league = false;
$matchnumber = 0; $matchnumber = 0;
$userid = $user->data['user_id']; $userid = $user->data['user_id'];
$lang_dates = $user->lang['datetime']; $lang_dates = $user->lang['datetime'];
$league_info = league_info($season, $league);
$user_is_member = user_is_member($userid, $season, $league); $user_is_member = user_is_member($userid, $season, $league);
$user_is_allowed_to_bet = $league_info['bet_type'] ? true : user_is_allowed_to_bet($userid, $season, $league, $matchday);
$display_rating = false; $display_rating = false;
// Calculate multiple delivery // Calculate multiple delivery
@@ -470,7 +472,6 @@ while ($row = $db->sql_fetchrow($result))
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$league_info = league_info($season, $league);
$bet_explain = ''; $bet_explain = '';
switch ($league_info['bet_ko_type']) switch ($league_info['bet_ko_type'])
{ {
@@ -508,10 +509,10 @@ $template->assign_vars(array(
'S_SIDENAME' => $sidename, 'S_SIDENAME' => $sidename,
'BET_EXPLAIN' => $bet_explain, 'BET_EXPLAIN' => $bet_explain,
'JOIN_LEAGUE' => ($link_rules == '') ? '' : sprintf($user->lang['JOIN_LEAGUE'], $link_rules), 'JOIN_LEAGUE' => ($link_rules == '') ? '' : sprintf($user->lang['JOIN_LEAGUE'], $link_rules),
'S_FORM_ACTION_BET' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'bet')), 'S_FORM_ACTION_BET' => $this->helper->route('football_football_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'bet')),
'S_FORM_ACTION_JOIN' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'join')), 'S_FORM_ACTION_JOIN' => $this->helper->route('football_football_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'join')),
'S_USER_IS_MEMBER' => $user_is_member, 'S_USER_IS_MEMBER' => $user_is_member,
'S_DATA_BET' => $data_bet, 'S_DATA_BET' => $data_bet && $user_is_allowed_to_bet,
'S_DATA_GROUP' => $data_group, 'S_DATA_GROUP' => $data_group,
'S_DATA_BET_RESULTS' => $data_bet_results, 'S_DATA_BET_RESULTS' => $data_bet_results,
'S_EDIT_MODE' => $edit_mode, 'S_EDIT_MODE' => $edit_mode,
@@ -526,5 +527,3 @@ $template->assign_vars(array(
'S_DISPLAY_RATING' => $display_rating, 'S_DISPLAY_RATING' => $display_rating,
) )
); );
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages? // Can this user view Prediction Leagues pages?
if (!$config['football_guest_view']) if (!$config['football_guest_view'])
{ {
@@ -389,4 +394,3 @@ $template->set_filenames(array(
); );
page_footer(); page_footer();
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -43,8 +43,8 @@ $sql = "SELECT
LEFT JOIN " . FOOTB_EXTRA . " AS e ON (e.season = m.season AND e.league = m.league AND e.matchday = m.matchday AND e.extra_status = 0) LEFT JOIN " . FOOTB_EXTRA . " AS e ON (e.season = m.season AND e.league = m.league AND e.matchday = m.matchday AND e.extra_status = 0)
LEFT JOIN " . FOOTB_EXTRA_BETS . " AS eb ON (eb.season = m.season AND eb.league = m.league AND eb.extra_no = e.extra_no AND eb.user_id = $user_id) LEFT JOIN " . FOOTB_EXTRA_BETS . " AS eb ON (eb.season = m.season AND eb.league = m.league AND eb.extra_no = e.extra_no AND eb.user_id = $user_id)
WHERE m.status <= 0 WHERE m.status <= 0
GROUP BY delivery, m.league GROUP BY m.season, m.league, m.matchday, l.league_name_short, matchday_name, delivery
ORDER BY delivery, m.league"; ORDER BY delivery, m.season, m.league";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result) AND $index < 11) while($row = $db->sql_fetchrow($result) AND $index < 11)
@@ -55,7 +55,7 @@ while($row = $db->sql_fetchrow($result) AND $index < 11)
$template->assign_block_vars('delivery', array( $template->assign_block_vars('delivery', array(
'ROW_CLASS' => $row_class, 'ROW_CLASS' => $row_class,
'U_BET_LINK' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])), 'U_BET_LINK' => $this->helper->route('football_football_controller', array('side' => 'bet', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
'LEAGUE_SHORT' => $row['league_name_short'], 'LEAGUE_SHORT' => $row['league_name_short'],
'MATCHDAY_NAME' => $row['matchday_name'], 'MATCHDAY_NAME' => $row['matchday_name'],
'COLOR' => ($row['bets_count'] == $row['matches_count'] && $row['extra_bets_count'] == $row['extra_count']) ? 'green' : 'red', 'COLOR' => ($row['bets_count'] == $row['matches_count'] && $row['extra_bets_count'] == $row['extra_count']) ? 'green' : 'red',
@@ -71,5 +71,3 @@ $template->assign_vars(array(
'S_DATA_DELIVERY' => $data_delivery, 'S_DATA_DELIVERY' => $data_delivery,
) )
); );
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
$this->user->add_lang_ext('football/football', 'info_acp_bank'); $this->user->add_lang_ext('football/football', 'info_acp_bank');
// Check Prediction League authorisation // Check Prediction League authorisation
@@ -16,11 +21,11 @@ if ( !$this->auth->acl_get('u_use_football') )
} }
$action=''; $action='';
$phpbb_root_path = './../../'; $phpbb_root_path = './../../';
if (!$season OR !$league) if (!$season OR !$league)
{ {
redirect($this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league))); redirect($this->helper->route('football_football_controller', array('side' => 'bank', 's' => $season, 'l' => $league)));
} }
else else
{ {
@@ -90,14 +95,10 @@ else
} }
$user_rows = $db->sql_fetchrowset($result); $user_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
$export_file = $league_short . '_' . $season . '_bank.csv';
$newline = "\r\n"; $newline = "\r\n";
header('Pragma: no-cache'); $csv_data= '';
header("Content-Type: text/csv; name=\"$export_file\""); $csv_data .= $league_name . ' ' . sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
header("Content-disposition: attachment; filename=$export_file"); $csv_data .= sprintf($user->lang['NAME']) . ';' . $config['football_win_name'] . ';' . sprintf($user->lang['BET_POINTS']) . ';' .
$export= '';
$export .= $league_name . ' ' . sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
$export .= sprintf($user->lang['NAME']) . ';' . $config['football_win_name'] . ';' . sprintf($user->lang['BET_POINTS']) . ';' .
sprintf($user->lang['DEPOSITED']) . ';' . sprintf($user->lang['DEPOSIT']) . ';' . sprintf($user->lang['WINS']) . ';' . sprintf($user->lang['DEPOSITED']) . ';' . sprintf($user->lang['DEPOSIT']) . ';' . sprintf($user->lang['WINS']) . ';' .
sprintf($user->lang['PAID']) . ';' . sprintf($user->lang['PAYOUT']) . ';' . $newline; sprintf($user->lang['PAID']) . ';' . sprintf($user->lang['PAYOUT']) . ';' . $newline;
@@ -118,7 +119,7 @@ else
$no_cash_wins = ''; $no_cash_wins = '';
$no_cash_paid = ''; $no_cash_paid = '';
} }
$export .= str_replace("\"", "\"\"", $user_row['username']) . ';' . $csv_data .= str_replace("\"", "\"\"", $user_row['username']) . ';' .
str_replace('.', ',', $user_row['user_points']) . ';' . str_replace('.', ',', $user_row['user_points']) . ';' .
str_replace('.', ',', $user_row['bet_points']) . $no_cash_bet_points . ';' . str_replace('.', ',', $user_row['bet_points']) . $no_cash_bet_points . ';' .
str_replace('.', ',', $user_row['deposit']) . $no_cash_deposit . ';' . str_replace('.', ',', $user_row['deposit']) . $no_cash_deposit . ';' .
@@ -127,9 +128,24 @@ else
str_replace('.', ',', $user_row['paid']) . $no_cash_paid . ';' . str_replace('.', ',', $user_row['paid']) . $no_cash_paid . ';' .
str_replace('.', ',', $user_row['new_pay']) . ';' . $newline; str_replace('.', ',', $user_row['new_pay']) . ';' . $newline;
} }
echo utf8_decode($export);
exit; // Output the csv file
$filename = $league_short . '_' . $season . '_bank.csv';
$fp = fopen('php://output', 'w');
header('Content-Type: application/octet-stream');
header("Content-disposition: attachment; filename=\"" . basename($filename) . "\"");
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Pragma: public');
header('Content-Transfer-Encoding: binary');
fwrite($fp, "\xEF\xBB\xBF"); // UTF-8 BOM
fwrite($fp, utf8_decode($csv_data));
fclose($fp);
exit_handler();
} }
} }
} }
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
$this->user->add_lang_ext('football/football', 'info_acp_bank'); $this->user->add_lang_ext('football/football', 'info_acp_bank');
// Check Prediction League authorisation // Check Prediction League authorisation
@@ -19,7 +24,7 @@ $action='';
if (!$season) if (!$season)
{ {
redirect($this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season))); redirect($this->helper->route('football_football_controller', array('side' => 'bank', 's' => $season)));
} }
else else
{ {
@@ -50,14 +55,10 @@ else
} }
$user_rows = $db->sql_fetchrowset($result); $user_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
$export_file = $season. '_bank.csv';
$newline = "\r\n"; $newline = "\r\n";
header('Pragma: no-cache'); $csv_data= '';
header("Content-Type: text/csv; name=\"$export_file\""); $csv_data .= sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
header("Content-disposition: attachment; filename=$export_file"); $csv_data .= sprintf($user->lang['NAME']) . ';' . sprintf($user->lang['SEASON']) . ';' . sprintf($user->lang['LEAGUE']) . ';Saldo;' . $newline;
$export= '';
$export .= sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
$export .= sprintf($user->lang['NAME']) . ';' . sprintf($user->lang['SEASON']) . ';' . sprintf($user->lang['LEAGUE']) . ';Saldo;' . $newline;
$last_username = ''; $last_username = '';
$sum_saldo = 0.0; $sum_saldo = 0.0;
@@ -65,11 +66,11 @@ else
{ {
if ($last_username != '' AND $last_username != $user_row['username']) if ($last_username != '' AND $last_username != $user_row['username'])
{ {
$export .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' . $csv_data .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' .
str_replace('.', ',', $sum_saldo) . ';' . $newline; str_replace('.', ',', $sum_saldo) . ';' . $newline;
$sum_saldo = 0.0; $sum_saldo = 0.0;
} }
$export .= str_replace("\"", "\"\"", $user_row['username']) . ';' . $csv_data .= str_replace("\"", "\"\"", $user_row['username']) . ';' .
$user_row['season'] . ';' . $user_row['season'] . ';' .
$user_row['league'] . ';' . $user_row['league'] . ';' .
str_replace('.', ',', $user_row['saldo']) . ';' . $newline; str_replace('.', ',', $user_row['saldo']) . ';' . $newline;
@@ -78,11 +79,25 @@ else
} }
if ($last_username != '') if ($last_username != '')
{ {
$export .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' . $csv_data .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' .
str_replace('.', ',', $sum_saldo) . ';' . $newline; str_replace('.', ',', $sum_saldo) . ';' . $newline;
} }
echo utf8_decode($export); // Output the csv file
exit; $filename = $season. '_bank.csv';
$fp = fopen('php://output', 'w');
header('Content-Type: application/octet-stream');
header("Content-disposition: attachment; filename=\"" . basename($filename) . "\"");
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Pragma: public');
header('Content-Transfer-Encoding: binary');
fwrite($fp, "\xEF\xBB\xBF"); // UTF-8 BOM
fwrite($fp, utf8_decode($csv_data));
fclose($fp);
exit_handler();
} }
} }
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
// Check Prediction League authorisation // Check Prediction League authorisation
if ( !$this->auth->acl_get('u_use_football') ) if ( !$this->auth->acl_get('u_use_football') )
{ {
@@ -17,7 +22,7 @@ $action='';
if (!$season OR !$league) if (!$season OR !$league)
{ {
redirect($this->helper->route('football_main_controller', array('side' => 'bet'))); redirect($this->helper->route('football_football_controller', array('side' => 'bet')));
} }
else else
{ {
@@ -45,8 +50,6 @@ else
} }
else else
{ {
redirect($this->helper->route('football_main_controller', array('side' => 'bet'))); redirect($this->helper->route('football_football_controller', array('side' => 'bet')));
} }
} }
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
$vert = 9; $vert = 9;
$start = 22; $start = 22;
$end = 28; $end = 28;
@@ -1342,4 +1347,3 @@ $template->set_filenames(array(
); );
page_footer(); page_footer();
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -114,7 +114,7 @@ while($row = $db->sql_fetchrow($result))
$template->assign_block_vars('last_results', array( $template->assign_block_vars('last_results', array(
'ROW_CLASS' => $row_class, 'ROW_CLASS' => $row_class,
'U_RESULTS_LINK'=> $this->helper->route('football_main_controller', array('side' => 'results', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])), 'U_RESULTS_LINK'=> $this->helper->route('football_football_controller', array('side' => 'results', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
'MATCH_DATE' => $row['match_date'], 'MATCH_DATE' => $row['match_date'],
'MATCH_TIME' => $row['match_time'], 'MATCH_TIME' => $row['match_time'],
'LEAGUE_NAME' => $row['league_name'], 'LEAGUE_NAME' => $row['league_name'],
@@ -146,5 +146,3 @@ $template->assign_vars(array(
'S_USER_IS_MEMBER' => $user_is_member, 'S_USER_IS_MEMBER' => $user_is_member,
) )
); );
?>

View File

@@ -62,5 +62,3 @@ $template->assign_vars(array(
'S_DISPLAY_LAST_USERS' => $display_last_users, 'S_DISPLAY_LAST_USERS' => $display_last_users,
'S_LAST_USERS' => true, 'S_LAST_USERS' => true,
)); ));
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -320,5 +320,3 @@ $template->assign_vars(array(
'USERNAME' => $username, 'USERNAME' => $username,
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -22,17 +22,17 @@ $username2 = '';
$username3 = ''; $username3 = '';
$username4 = ''; $username4 = '';
// Calculate rank total // Calculate rank total
$sql = 'SELECT $sql = "SELECT
r.user_id, r.user_id,
u.username, u.username,
SUM(r.points) AS points_total (SELECT SUM(c.rank_total) FROM " . FOOTB_MY_CHART . " AS c WHERE c.user_id = (r.user_id) AND c.season = r.season AND c.league = r.league AND c.matchday = $matchday) AS points_total
FROM ' . FOOTB_RANKS . ' AS r FROM " . FOOTB_RANKS . ' AS r
LEFT JOIN ' . USERS_TABLE . " AS u ON (u.user_id = r.user_id) LEFT JOIN ' . USERS_TABLE . " AS u ON (u.user_id = r.user_id)
WHERE r.season = $season WHERE r.season = $season
AND r.league = $league AND r.league = $league
AND r.matchday <= $matchday AND r.matchday <= $matchday
GROUP BY r.user_id GROUP BY r.user_id
ORDER BY points_total DESC, LOWER(u.username) ASC"; ORDER BY points_total ASC, LOWER(u.username) ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$current_ranks = $db->sql_fetchrowset($result); $current_ranks = $db->sql_fetchrowset($result);
@@ -158,7 +158,7 @@ if ($total_users > 3 AND $total_users <= 50)
$ranks_dayl_1 = ''; $ranks_dayl_1 = '';
$points_1 = ''; $points_1 = '';
$sql = 'SELECT * $sql = 'SELECT *
FROM ' . FOOTB_RANKS . " FROM ' . FOOTB_MY_CHART . "
WHERE season = $season WHERE season = $season
AND league = $league AND league = $league
AND matchday <= $matchday AND matchday <= $matchday
@@ -211,7 +211,7 @@ if ($total_users > 3 AND $total_users <= 50)
if ($user3 != 0) if ($user3 != 0)
{ {
$sql = 'SELECT * $sql = 'SELECT *
FROM ' . FOOTB_RANKS . " FROM ' . FOOTB_MY_CHART . "
WHERE season = $season WHERE season = $season
AND league = $league AND league = $league
AND matchday <= $matchday AND matchday <= $matchday
@@ -238,7 +238,7 @@ if ($total_users > 3 AND $total_users <= 50)
if ($user4 != 0) if ($user4 != 0)
{ {
$sql = 'SELECT * $sql = 'SELECT *
FROM ' . FOOTB_RANKS . " FROM ' . FOOTB_MY_CHART . "
WHERE season = $season WHERE season = $season
AND league = $league AND league = $league
AND matchday <= $matchday AND matchday <= $matchday
@@ -267,7 +267,7 @@ if ($total_users > 3 AND $total_users <= 50)
$sql = 'SELECT $sql = 'SELECT
MIN(points) As points_min, MIN(points) As points_min,
MAX(points) As points_max MAX(points) As points_max
FROM ' . FOOTB_RANKS . " FROM ' . FOOTB_MY_CHART . "
WHERE season = $season WHERE season = $season
AND league = $league AND league = $league
AND matchday <= $matchday AND matchday <= $matchday
@@ -331,4 +331,3 @@ $template->assign_vars(array(
'USERNAME4' => $username4, 'USERNAME4' => $username4,
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -113,7 +113,7 @@ $sql_start = $start * $count_matches;
$sql_limit = $config['football_users_per_page'] * $count_matches; $sql_limit = $config['football_users_per_page'] * $count_matches;
// handle pagination. // handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday, 'u' => "$user_sel")); $base_url = $this->helper->route('football_football_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday, 'u' => "$user_sel"));
$pagination = $phpbb_container->get('pagination'); $pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start); $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);
@@ -382,5 +382,3 @@ $template->assign_vars(array(
'USERNAME' => $username, 'USERNAME' => $username,
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -195,4 +195,3 @@ $template->assign_vars(array(
'USERNAME' => $username, 'USERNAME' => $username,
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -169,5 +169,3 @@ $template->assign_vars(array(
'USERNAME' => $username, 'USERNAME' => $username,
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -137,6 +137,7 @@ $sql = 'SELECT
AND b.goals_home <> '' AND b.goals_home <> ''
AND b.goals_guest <> '' AND b.goals_guest <> ''
AND m.matchday <= $matchday AND m.matchday <= $matchday
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC";
@@ -233,6 +234,7 @@ $sql = 'SELECT
AND b.goals_home <> '' AND b.goals_home <> ''
AND b.goals_guest <> '' AND b.goals_guest <> ''
AND m.matchday >= $form_from AND m.matchday >= $form_from
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC";
@@ -300,6 +302,7 @@ $sql = 'SELECT
AND b.goals_home <> '' AND b.goals_home <> ''
AND b.goals_guest <> '' AND b.goals_guest <> ''
AND m.matchday <= $matchday AND m.matchday <= $matchday
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC";
@@ -365,6 +368,7 @@ $sql = 'SELECT
AND b.goals_home <> '' AND b.goals_home <> ''
AND b.goals_guest <> '' AND b.goals_guest <> ''
AND m.matchday <= $matchday AND m.matchday <= $matchday
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC";
@@ -422,5 +426,3 @@ $template->assign_vars(array(
'USERNAME' => $username, 'USERNAME' => $username,
) )
); );
?>

View File

@@ -7,12 +7,14 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
$data_odds = false; $data_odds = false;
$userid = $user->data['user_id'];
$user_is_member = user_is_member($userid, $season, $league);
$matchnumber = 0; $matchnumber = 0;
$lang_dates = $user->lang['datetime']; $lang_dates = $user->lang['datetime'];
@@ -37,6 +39,8 @@ $sql = "SELECT
t2.team_name_short AS guest_name, t2.team_name_short AS guest_name,
t1.team_id AS home_id, t1.team_id AS home_id,
t2.team_id AS guest_id, t2.team_id AS guest_id,
b.goals_home AS bet_home,
b.goals_guest AS bet_guest,
m.goals_home, m.goals_home,
m.goals_guest, m.goals_guest,
m.goals_overtime_home AS kogoals_home, m.goals_overtime_home AS kogoals_home,
@@ -48,8 +52,10 @@ $sql = "SELECT
m.odd_1, m.odd_1,
m.odd_x, m.odd_x,
m.odd_2, m.odd_2,
m.trend FROM " . FOOTB_MATCHES . ' AS m m.trend
LEFT JOIN ' . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home) FROM " . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no AND b.user_id = $userid)
LEFT JOIN " . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home)
LEFT JOIN ' . FOOTB_TEAMS . " AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest) LEFT JOIN ' . FOOTB_TEAMS . " AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest)
WHERE m.season = $season WHERE m.season = $season
AND m.league = $league AND m.league = $league
@@ -137,6 +143,8 @@ foreach ($rows as $row)
$goals_guest = ($row['goals_guest'] == '') ? '&nbsp;' : $row['goals_guest']; $goals_guest = ($row['goals_guest'] == '') ? '&nbsp;' : $row['goals_guest'];
$kogoals_home = ($row['kogoals_home'] == '') ? '&nbsp;' : $row['kogoals_home']; $kogoals_home = ($row['kogoals_home'] == '') ? '&nbsp;' : $row['kogoals_home'];
$kogoals_guest = ($row['kogoals_guest'] == '') ? '&nbsp;' : $row['kogoals_guest']; $kogoals_guest = ($row['kogoals_guest'] == '') ? '&nbsp;' : $row['kogoals_guest'];
$bet_home = ($row['bet_home'] == '') ? '&nbsp;' : $row['bet_home'];
$bet_guest = ($row['bet_guest'] == '') ? '&nbsp;' : $row['bet_guest'];
$template->assign_block_vars('odds', array( $template->assign_block_vars('odds', array(
'ROW_CLASS' => $row_class, 'ROW_CLASS' => $row_class,
@@ -154,12 +162,15 @@ foreach ($rows as $row)
'tid' => $homeid, 'mode' => 'all')), 'tid' => $homeid, 'mode' => 'all')),
'U_PLAN_GUEST' => $this->helper->route('football_football_popup', array('popside' => 'viewplan_popup', 's' => $season, 'l' => $league, 'U_PLAN_GUEST' => $this->helper->route('football_football_popup', array('popside' => 'viewplan_popup', 's' => $season, 'l' => $league,
'tid' => $guestid, 'mode' => 'all')), 'tid' => $guestid, 'mode' => 'all')),
'BET_HOME' => $bet_home,
'BET_GUEST' => $bet_guest,
'GOALS_HOME' => $goals_home, 'GOALS_HOME' => $goals_home,
'GOALS_GUEST' => $goals_guest, 'GOALS_GUEST' => $goals_guest,
'COLOR_STYLE' => '', 'COLOR_STYLE' => '',
'KOGOALS_HOME' => $kogoals_home, 'KOGOALS_HOME' => $kogoals_home,
'KOGOALS_GUEST' => $kogoals_guest, 'KOGOALS_GUEST' => $kogoals_guest,
'S_KO_MATCH' => $ko_match, 'S_KO_MATCH' => $ko_match,
'S_USER_IS_MEMBER' => $user_is_member,
'TREND' => $row['trend'], 'TREND' => $row['trend'],
'U_MATCH_STATS' => $this->helper->route('football_football_popup', array('popside' => 'hist_popup', 's' => $season, 'l' => $league, 'U_MATCH_STATS' => $this->helper->route('football_football_popup', array('popside' => 'hist_popup', 's' => $season, 'l' => $league,
'hid' => $homeid, 'gid' => $guestid, 'm' => $matchday, 'hid' => $homeid, 'gid' => $guestid, 'm' => $matchday,
@@ -201,5 +212,3 @@ $template->assign_vars(array(
'S_DATA_ODDS' => $data_odds, 'S_DATA_ODDS' => $data_odds,
) )
); );
?>

View File

@@ -7,11 +7,20 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
if ($league > 50)
{
$league_corr = $league - 50;
}
else
{
$league_corr = $league;
}
if ($league <> 0) if ($league <> 0)
{ {
$data_rank_matchday = false; $data_rank_matchday = false;
@@ -26,10 +35,10 @@ if ($league <> 0)
FROM " . FOOTB_RANKS . ' AS r FROM " . FOOTB_RANKS . ' AS r
LEFT Join ' . USERS_TABLE . " AS u ON (r.user_id = u.user_id) LEFT Join ' . USERS_TABLE . " AS u ON (r.user_id = u.user_id)
WHERE r.season = $season WHERE r.season = $season
AND r.league = $league AND r.league = $league_corr
AND r.matchday = $matchday AND r.matchday = $matchday
AND r.status IN (2,3) AND r.status IN (2,3)
ORDER BY rank ASC, LOWER(u.username) ASC"; ORDER BY r.rank ASC, LOWER(u.username) ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result)) while($row = $db->sql_fetchrow($result))
@@ -50,7 +59,7 @@ if ($league <> 0)
'ROW_CLASS' => $row_class, 'ROW_CLASS' => $row_class,
'USERID' => $row['user_id'], 'USERID' => $row['user_id'],
'USERNAME' => $row['username'], 'USERNAME' => $row['username'],
'U_BET_USER' => $this->helper->route('football_football_popup', array('popside' => 'bet_popup', 's' => $season, 'l' => $league, 'U_BET_USER' => $this->helper->route('football_football_popup', array('popside' => 'bet_popup', 's' => $season, 'l' => $league_corr,
'm' => $matchday, 'u' => $row['user_id'])), 'm' => $matchday, 'u' => $row['user_id'])),
'POINTS' => $row['points'], 'POINTS' => $row['points'],
'COLOR_STYLE' => $colorstyle, 'COLOR_STYLE' => $colorstyle,
@@ -60,7 +69,7 @@ if ($league <> 0)
} }
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$league_info = league_info($season, $league); $league_info = league_info($season, $league_corr);
$template->assign_vars(array( $template->assign_vars(array(
'S_DISPLAY_RANK_MATCHDAY' => true, 'S_DISPLAY_RANK_MATCHDAY' => true,
@@ -69,4 +78,3 @@ if ($league <> 0)
'WIN_NAME' => $config['football_win_name'], 'WIN_NAME' => $config['football_win_name'],
)); ));
} }
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -91,4 +91,3 @@ if ($league <> 0)
) )
); );
} }
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -53,7 +53,7 @@ $sql = "SELECT
AND b.league = $league AND b.league = $league
AND m.status IN (2,3) AND m.status IN (2,3)
AND m.matchday = $matchday AND m.matchday = $matchday
GROUP BY user_id"; GROUP BY b.user_id";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$usersstats = $db->sql_fetchrowset($result); $usersstats = $db->sql_fetchrowset($result);
@@ -126,7 +126,7 @@ else
$sql_limit = $config['football_users_per_page']; $sql_limit = $config['football_users_per_page'];
// handle pagination. // handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)); $base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday));
$pagination = $phpbb_container->get('pagination'); $pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start); $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);
$data_ranks = false; $data_ranks = false;
@@ -172,13 +172,13 @@ while($row = $db->sql_fetchrow($result))
{ {
if ($rankof[$row['user_id']] > $prevrankof[$row['user_id']]) if ($rankof[$row['user_id']] > $prevrankof[$row['user_id']])
{ {
$change_sign = '+'; $change_sign = '-';
$differ = $rankof[$row['user_id']] - $prevrankof[$row['user_id']]; $differ = $prevrankof[$row['user_id']] - $rankof[$row['user_id']];
$change_differ = ' (' . $differ . ')'; $change_differ = ' (' . $differ . ')';
} }
else else
{ {
$change_sign = '-'; $change_sign = '+';
$differ = $prevrankof[$row['user_id']] - $rankof[$row['user_id']]; $differ = $prevrankof[$row['user_id']] - $rankof[$row['user_id']];
$change_differ = ' (' . $differ . ')'; $change_differ = ' (' . $differ . ')';
} }
@@ -224,8 +224,8 @@ while($row = $db->sql_fetchrow($result))
'ROW_CLASS' => $row_class, 'ROW_CLASS' => $row_class,
'RANK' => $rankof[$row['user_id']], 'RANK' => $rankof[$row['user_id']],
'NO_CHANGES' => ($change_sign == '=') ? true : false, 'NO_CHANGES' => ($change_sign == '=') ? true : false,
'WORSENED' => ($change_sign == '-') ? true : false, 'WORSENED' => ($change_sign == '+') ? true : false,
'IMPROVED' => ($change_sign == '+') ? true : false, 'IMPROVED' => ($change_sign == '-') ? true : false,
'CHANGE_SIGN' => $change_sign, 'CHANGE_SIGN' => $change_sign,
'CHANGE_DIFFER' => $change_differ, 'CHANGE_DIFFER' => $change_differ,
'USERID' => $row['user_id'], 'USERID' => $row['user_id'],
@@ -257,5 +257,3 @@ $template->assign_vars(array(
'WIN_NAME' => $config['football_win_name'], 'WIN_NAME' => $config['football_win_name'],
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -39,7 +39,7 @@ switch ($mode)
WHERE b.league = $league WHERE b.league = $league
AND ((b.season < $season) OR (b.season = $season AND m.matchday <= $matchday)) AND ((b.season < $season) OR (b.season = $season AND m.matchday <= $matchday))
AND m.status IN (2,3) AND m.status IN (2,3)
GROUP BY user_id"; GROUP BY b.user_id";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$rows = $db->sql_fetchrowset($result); $rows = $db->sql_fetchrowset($result);
@@ -61,7 +61,7 @@ switch ($mode)
WHERE r.league = $league WHERE r.league = $league
AND ((r.season < $season AND r.matchday = l.matchdays) OR (r.season = $season AND r.matchday = $matchday)) AND ((r.season < $season AND r.matchday = l.matchdays) OR (r.season = $season AND r.matchday = $matchday))
AND r.status IN (2,3) AND r.status IN (2,3)
GROUP BY user_id GROUP BY r.user_id
ORDER BY r.user_id ASC"; ORDER BY r.user_id ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
@@ -89,7 +89,7 @@ switch ($mode)
WHERE r.league = $league WHERE r.league = $league
AND ((r.season < $season) OR (r.season = $season AND r.matchday <= $matchday)) AND ((r.season < $season) OR (r.season = $season AND r.matchday <= $matchday))
AND r.status IN (2,3) AND r.status IN (2,3)
GROUP BY user_id GROUP BY r.user_id
ORDER BY points_total DESC, LOWER(u.username) ASC"; ORDER BY points_total DESC, LOWER(u.username) ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
@@ -114,7 +114,7 @@ switch ($mode)
$index_end = $index_start + $config['football_users_per_page'] - 1; $index_end = $index_start + $config['football_users_per_page'] - 1;
// handle pagination. // handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')); $base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime'));
$pagination = $phpbb_container->get('pagination'); $pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start); $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);
@@ -171,9 +171,9 @@ switch ($mode)
'WIN_NAME' => $config['football_win_name'], 'WIN_NAME' => $config['football_win_name'],
'S_SHOW_OTHER_LINKS' => true, 'S_SHOW_OTHER_LINKS' => true,
'S_HEADER' => sprintf($user->lang['RANKING_ALL_TIME']), 'S_HEADER' => sprintf($user->lang['RANKING_ALL_TIME']),
'S_LINK_RANKING' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)), 'S_LINK_RANKING' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LINK_ALL_TIME' => '', 'S_LINK_ALL_TIME' => '',
'S_LINK_COMPARE' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')), 'S_LINK_COMPARE' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')),
) )
); );
break; break;
@@ -227,8 +227,8 @@ switch ($mode)
AND r.league = $league AND r.league = $league
AND r.matchday = $matchday AND r.matchday = $matchday
AND r.status IN (2,3) AND r.status IN (2,3)
GROUP BY season, user_id GROUP BY r.season, r.user_id
ORDER BY r.user_id ASC, season ASC"; ORDER BY r.user_id ASC, r.season ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
@@ -275,7 +275,7 @@ switch ($mode)
$index_end = $index_start + $config['football_users_per_page'] - 1; $index_end = $index_start + $config['football_users_per_page'] - 1;
// handle pagination. // handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')); $base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare'));
$pagination = $phpbb_container->get('pagination'); $pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start); $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);
@@ -330,12 +330,12 @@ switch ($mode)
'S_SIDENAME' => $sidename, 'S_SIDENAME' => $sidename,
'PAGE_NUMBER' => $pagination->on_page($total_users, $this->config['football_users_per_page'], $start), 'PAGE_NUMBER' => $pagination->on_page($total_users, $this->config['football_users_per_page'], $start),
'TOTAL_USERS' => ($total_users == 1) ? $user->lang['VIEW_BET_USER'] : sprintf($user->lang['VIEW_BET_USERS'], $total_users), 'TOTAL_USERS' => ($total_users == 1) ? $user->lang['VIEW_BET_USER'] : sprintf($user->lang['VIEW_BET_USERS'], $total_users),
'S_WIN' => ($league_info['win_matchday'] == '0' and $league_info['win_season'] == '0') ? false : ($this->auth->acl_gets('a_')) ? true : false, 'S_WIN' => ($league_info['win_matchday'] == '0' and $league_info['win_season'] == '0') ? false : (($this->auth->acl_gets('a_')) ? true : false),
'WIN_NAME' => $config['football_win_name'], 'WIN_NAME' => $config['football_win_name'],
'S_SHOW_OTHER_LINKS' => true, 'S_SHOW_OTHER_LINKS' => true,
'S_HEADER' => sprintf($user->lang['RANKING_COMPARE']), 'S_HEADER' => sprintf($user->lang['RANKING_COMPARE']),
'S_LINK_RANKING' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)), 'S_LINK_RANKING' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LINK_ALL_TIME' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')), 'S_LINK_ALL_TIME' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')),
'S_LINK_COMPARE' => '', 'S_LINK_COMPARE' => '',
) )
); );
@@ -369,7 +369,7 @@ switch ($mode)
AND b.league = $league AND b.league = $league
AND m.status IN (2,3) AND m.status IN (2,3)
AND m.matchday <= $matchday AND m.matchday <= $matchday
GROUP BY user_id"; GROUP BY b.user_id";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$rows = $db->sql_fetchrowset($result); $rows = $db->sql_fetchrowset($result);
@@ -423,7 +423,7 @@ switch ($mode)
AND r.league = $league AND r.league = $league
AND r.matchday = $matchday AND r.matchday = $matchday
AND r.status IN (2,3) AND r.status IN (2,3)
GROUP BY user_id GROUP BY r.user_id
ORDER BY r.points_total DESC, LOWER(u.username) ASC"; ORDER BY r.points_total DESC, LOWER(u.username) ASC";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
@@ -447,7 +447,7 @@ switch ($mode)
$index_end = $index_start + $config['football_users_per_page'] - 1; $index_end = $index_start + $config['football_users_per_page'] - 1;
// handle pagination. // handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)); $base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday));
$pagination = $phpbb_container->get('pagination'); $pagination = $phpbb_container->get('pagination');
if ($user->data['football_mobile']) if ($user->data['football_mobile'])
{ {
@@ -520,8 +520,8 @@ switch ($mode)
'ROW_CLASS' => $row_class, 'ROW_CLASS' => $row_class,
'RANK' => $rank, 'RANK' => $rank,
'NO_CHANGES' => ($change_sign == '=') ? true : false, 'NO_CHANGES' => ($change_sign == '=') ? true : false,
'WORSENED' => ($change_sign == '-') ? true : false, 'WORSENED' => ($change_sign == '+') ? true : false,
'IMPROVED' => ($change_sign == '+') ? true : false, 'IMPROVED' => ($change_sign == '-') ? true : false,
'CHANGE_SIGN' => $change_sign, 'CHANGE_SIGN' => $change_sign,
'CHANGE_DIFFER' => $change_differ, 'CHANGE_DIFFER' => $change_differ,
'USERID' => $curr_rank['user_id'], 'USERID' => $curr_rank['user_id'],
@@ -554,8 +554,8 @@ switch ($mode)
'WIN_NAME' => $config['football_win_name'], 'WIN_NAME' => $config['football_win_name'],
'S_SHOW_OTHER_LINKS' => true, 'S_SHOW_OTHER_LINKS' => true,
'S_LINK_RANKING' => '', 'S_LINK_RANKING' => '',
'S_LINK_ALL_TIME' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')), 'S_LINK_ALL_TIME' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')),
'S_LINK_COMPARE' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')), 'S_LINK_COMPARE' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')),
) )
); );
break; break;

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -389,7 +389,6 @@ while ($row = $db->sql_fetchrow($result))
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$sidename = sprintf($user->lang['RESULTS']);
switch ($league_info['bet_ko_type']) switch ($league_info['bet_ko_type'])
{ {
case BET_KO_90: case BET_KO_90:
@@ -402,6 +401,7 @@ switch ($league_info['bet_ko_type'])
break; break;
case BET_KO_PENALTY: case BET_KO_PENALTY:
$result_explain = sprintf($user->lang['PENALTY']); $result_explain = sprintf($user->lang['PENALTY']);
$label_finalresult = sprintf($user->lang['PENALTY']);
$display_ko = false; $display_ko = false;
break; break;
default: default:
@@ -409,14 +409,28 @@ switch ($league_info['bet_ko_type'])
$label_finalresult = sprintf($user->lang['EXTRATIME_SHORT']) . '/' . sprintf($user->lang['PENALTY_SHORT']); $label_finalresult = sprintf($user->lang['EXTRATIME_SHORT']) . '/' . sprintf($user->lang['PENALTY_SHORT']);
break; break;
} }
// set correct display for usage in menu template
if($side == 'results')
{
$display_results = true;
$display_results_tl = false;
$sidename = sprintf($user->lang['RESULTS']);
}
if($side == 'results_tl')
{
$display_results = false;
$display_results_tl = true;
$sidename = sprintf($user->lang['RESULTS']);
}
$template->assign_vars(array( $template->assign_vars(array(
'S_DISPLAY_RESULTS' => true, 'S_DISPLAY_RESULTS' => $display_results,
'S_DISPLAY_RESULTS_TL' => $display_results_tl,
'S_EXTRA_RESULTS' => $extra_results, 'S_EXTRA_RESULTS' => $extra_results,
'S_SIDENAME' => $sidename, 'S_SIDENAME' => $sidename,
'RESULT_EXPLAIN' => $result_explain, 'RESULT_EXPLAIN' => $result_explain,
'LABEL_FINALRESULT' => $label_finalresult, 'LABEL_FINALRESULT' => $label_finalresult,
'S_FORM_ACTION_RESULT' => $this->helper->route('football_main_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'result')), 'S_FORM_ACTION_RESULT' => $this->helper->route('football_football_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'result')),
'S_DATA_RESULTS' => $data_results, 'S_DATA_RESULTS' => $data_results,
'S_USER_IS_MEMBER' => $user_is_member, 'S_USER_IS_MEMBER' => $user_is_member,
'S_DISPLAY_GROUP' => $display_group, 'S_DISPLAY_GROUP' => $display_group,
@@ -424,5 +438,3 @@ $template->assign_vars(array(
'S_EDIT_MODE' => $edit_mode, 'S_EDIT_MODE' => $edit_mode,
) )
); );
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages? // Can this user view Prediction Leagues pages?
if (!$config['football_guest_view']) if (!$config['football_guest_view'])
{ {
@@ -173,6 +178,7 @@ if ($data_rules)
'S_SIDENAME' => $sidename, 'S_SIDENAME' => $sidename,
'S_DATA_RULES' => $data_rules, 'S_DATA_RULES' => $data_rules,
'S_BET_IN_TIME' => $league_info['bet_in_time'], 'S_BET_IN_TIME' => $league_info['bet_in_time'],
'S_BET_POINTS' => true,
'S_RULES_POST_ID' => $league_info['rules_post_id'], 'S_RULES_POST_ID' => $league_info['rules_post_id'],
'S_ERROR_MESSAGE' => $error_message, 'S_ERROR_MESSAGE' => $error_message,
'S_FOOTBALL_COPY' => sprintf($user->lang['FOOTBALL_COPY'], $config['football_version'], $phpbb_root_path . 'football/'), 'S_FOOTBALL_COPY' => sprintf($user->lang['FOOTBALL_COPY'], $config['football_version'], $phpbb_root_path . 'football/'),
@@ -186,6 +192,7 @@ if ($data_rules)
'LINK_RULES' => sprintf($user->lang['LINK_RULES'], $link_rules), 'LINK_RULES' => sprintf($user->lang['LINK_RULES'], $link_rules),
'SEASONNAME' => $season_info['season_name'], 'SEASONNAME' => $season_info['season_name'],
'LEAGUENAME' => $league_name, 'LEAGUENAME' => $league_name,
'BET_POINTS' => $league_info['bet_points'],
) )
); );
@@ -198,6 +205,7 @@ else
'S_SIDENAME' => $sidename, 'S_SIDENAME' => $sidename,
'S_DATA_RULES' => $data_rules, 'S_DATA_RULES' => $data_rules,
'S_BET_IN_TIME' => false, 'S_BET_IN_TIME' => false,
'S_BET_POINTS' => false,
'S_RULES_POST_ID' => 0, 'S_RULES_POST_ID' => 0,
'S_ERROR_MESSAGE' => $error_message, 'S_ERROR_MESSAGE' => $error_message,
'S_FOOTBALL_COPY' => sprintf($user->lang['FOOTBALL_COPY'], $config['football_version'], $phpbb_root_path . 'football/'), 'S_FOOTBALL_COPY' => sprintf($user->lang['FOOTBALL_COPY'], $config['football_version'], $phpbb_root_path . 'football/'),
@@ -223,5 +231,3 @@ $template->set_filenames(array(
// $template->display('popup'); // $template->display('popup');
page_footer(); page_footer();
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -142,4 +142,3 @@ else
) )
); );
} }
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -160,5 +160,3 @@ $template->assign_vars(array(
'LEAGUE' => $league, 'LEAGUE' => $league,
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -136,5 +136,3 @@ $template->assign_vars(array(
'LEAGUE' => $league, 'LEAGUE' => $league,
) )
); );
?>

View File

@@ -7,7 +7,7 @@
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -42,17 +42,23 @@ $rank = 0;
$sql = "SELECT $sql = "SELECT
t.*, t.*,
SUM(1) AS matches, SUM(1) AS matches,
SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 > goals_guest, 1, 0), IF(goals_home + 0 < goals_guest, 1, 0))) AS win, SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 > goals_guest, 1, 0), IF(goals_home + 0 < goals_guest, 1, 0)))
SUM(IF(goals_home = goals_guest, 1, 0)) AS draw, + IFNULL((SELECT SUM(c.win) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday),0)AS win,
SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 < goals_guest, 1, 0), IF(goals_home + 0 > goals_guest, 1, 0))) AS lost, SUM(IF(goals_home = goals_guest, 1, 0))
+ IFNULL((SELECT SUM(c.draw) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday),0)AS draw,
SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 < goals_guest, 1, 0), IF(goals_home + 0 > goals_guest, 1, 0)))
+ IFNULL((SELECT SUM(c.lost) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday),0)AS lost,
SUM(IF(m.team_id_home = t.team_id, SUM(IF(m.team_id_home = t.team_id,
IF(goals_home + 0 > goals_guest, 3, IF(goals_home = goals_guest, 1, 0)), IF(goals_home + 0 > goals_guest, 3, IF(goals_home = goals_guest, 1, 0)),
IF(goals_home + 0 < goals_guest, 3, IF(goals_home = goals_guest, 1, 0)) IF(goals_home + 0 < goals_guest, 3, IF(goals_home = goals_guest, 1, 0))
) )
) - IF(t.team_id = 20 AND t.season = 2011 AND $matchday > 7, 2, 0) AS points, ) + IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND b.matchday <= $matchday), 0)
+ IFNULL((SELECT SUM(c.points) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday),0)
- IF(t.team_id = 20 AND t.season = 2011 AND $matchday > 7, 2, 0) AS points,
SUM(IF(m.team_id_home = t.team_id, goals_home - goals_guest , goals_guest - goals_home)) AS goals_diff, SUM(IF(m.team_id_home = t.team_id, goals_home - goals_guest , goals_guest - goals_home)) AS goals_diff,
SUM(IF(m.team_id_home = t.team_id, goals_home , goals_guest)) AS goals, SUM(IF(m.team_id_home = t.team_id, goals_home , goals_guest)) AS goals,
SUM(IF(m.team_id_home = t.team_id, goals_guest , goals_home)) AS goals_against SUM(IF(m.team_id_home = t.team_id, goals_guest , goals_home)) AS goals_against,
IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND b.matchday <= $matchday), 0) AS bonus
FROM " . FOOTB_TEAMS . ' AS t FROM " . FOOTB_TEAMS . ' AS t
LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league
AND (m.team_id_home = t.team_id OR m.team_id_guest = t.team_id) AND m.group_id = t.group_id) AND (m.team_id_home = t.team_id OR m.team_id_guest = t.team_id) AND m.group_id = t.group_id)
@@ -60,6 +66,7 @@ $sql = "SELECT
AND t.league = $league AND t.league = $league
AND m.matchday <= $matchday AND m.matchday <= $matchday
AND m.status IN (2,3,5,6) AND m.status IN (2,3,5,6)
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC";
@@ -147,7 +154,8 @@ foreach($points_ary as $group_id => $points)
'GOALS' => $row['goals'], 'GOALS' => $row['goals'],
'GOALS_AGAINST' => $row['goals_against'], 'GOALS_AGAINST' => $row['goals_against'],
'GOALS_DIFF' => $row['goals_diff'], 'GOALS_DIFF' => $row['goals_diff'],
'POINTS' => $row['points'], 'BONUS' => round($row['bonus'],2),
'POINTS' => round($row['points'],2),
) )
); );
} }
@@ -157,27 +165,34 @@ foreach($points_ary as $group_id => $points)
$db->sql_freeresult($result); $db->sql_freeresult($result);
$rank = 0; $rank = 0;
// Get form-table-information // Get form-table-information
$sql = 'SELECT $sql = "SELECT
t.*, t.*,
SUM(1) AS matches, SUM(1) AS matches,
SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 > goals_guest, 1, 0), IF(goals_home + 0 < goals_guest, 1, 0))) AS win, SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 > goals_guest, 1, 0), IF(goals_home + 0 < goals_guest, 1, 0)))
SUM(IF(goals_home = goals_guest, 1, 0)) AS draw, + IFNULL((SELECT SUM(c.win) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.matchday >= $form_from),0)AS win,
SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 < goals_guest, 1, 0), IF(goals_home + 0 > goals_guest, 1, 0))) AS lost, SUM(IF(goals_home = goals_guest, 1, 0))
+ IFNULL((SELECT SUM(c.draw) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.matchday >= $form_from),0)AS draw,
SUM(IF((m.team_id_home = t.team_id), IF(goals_home + 0 < goals_guest, 1, 0), IF(goals_home + 0 > goals_guest, 1, 0)))
+ IFNULL((SELECT SUM(c.lost) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.matchday >= $form_from),0)AS lost,
SUM(IF(m.team_id_home = t.team_id, SUM(IF(m.team_id_home = t.team_id,
IF(goals_home + 0 > goals_guest, 3, IF(goals_home = goals_guest, 1, 0)), IF(goals_home + 0 > goals_guest, 3, IF(goals_home = goals_guest, 1, 0)),
IF(goals_home + 0 < goals_guest, 3, IF(goals_home = goals_guest, 1, 0)) IF(goals_home + 0 < goals_guest, 3, IF(goals_home = goals_guest, 1, 0))
) )
) AS points, ) + IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND b.matchday <= $matchday AND b.matchday >= $form_from),0)
+ IFNULL((SELECT SUM(c.points) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.matchday >= $form_from),0)
- IF(t.team_id = 20 AND t.season = 2011 AND $matchday > 7, 2, 0) AS points,
SUM(IF(m.team_id_home = t.team_id, goals_home - goals_guest , goals_guest - goals_home)) AS goals_diff, SUM(IF(m.team_id_home = t.team_id, goals_home - goals_guest , goals_guest - goals_home)) AS goals_diff,
SUM(IF(m.team_id_home = t.team_id, goals_home, goals_guest)) AS goals, SUM(IF(m.team_id_home = t.team_id, goals_home , goals_guest)) AS goals,
SUM(IF(m.team_id_home = t.team_id, goals_guest, goals_home)) AS goals_against SUM(IF(m.team_id_home = t.team_id, goals_guest , goals_home)) AS goals_against,
FROM ' . FOOTB_TEAMS . ' AS t IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND b.matchday <= $matchday AND b.matchday >= $form_from),0) AS bonus
FROM " . FOOTB_TEAMS . ' AS t
LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league
AND (m.team_id_home = t.team_id OR m.team_id_guest = t.team_id) AND m.group_id = t.group_id) AND (m.team_id_home = t.team_id OR m.team_id_guest = t.team_id) AND m.group_id = t.group_id)
WHERE t.season = $season WHERE t.season = $season
AND t.league = $league AND t.league = $league
AND m.matchday >= $form_from AND m.matchday >= $form_from
AND m.status IN (2, 3,5,6) AND m.status IN (2, 3,5,6)
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC";
@@ -242,7 +257,8 @@ while($row = $db->sql_fetchrow($result))
'GOALS' => $row['goals'], 'GOALS' => $row['goals'],
'GOALS_AGAINST' => $row['goals_against'], 'GOALS_AGAINST' => $row['goals_against'],
'GOALS_DIFF' => $row['goals_diff'], 'GOALS_DIFF' => $row['goals_diff'],
'POINTS' => $row['points'], 'BONUS' => round($row['bonus'],2),
'POINTS' => round($row['points'],2),
) )
); );
} }
@@ -250,23 +266,29 @@ while($row = $db->sql_fetchrow($result))
$db->sql_freeresult($result); $db->sql_freeresult($result);
$rank = 0; $rank = 0;
// Get home-table-information // Get home-table-information
$sql = 'SELECT $sql = "SELECT
t.*, t.*,
SUM(1) AS matches, SUM(1) AS matches,
SUM(IF(goals_home + 0 > goals_guest, 1, 0)) AS win, SUM(IF(goals_home + 0 > goals_guest, 1, 0))
SUM(IF(goals_home = goals_guest, 1, 0)) AS draw, + IFNULL((SELECT SUM(c.win) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 1 ),0)AS win,
SUM(IF(goals_home + 0 < goals_guest, 1, 0)) AS lost, SUM(IF(goals_home = goals_guest, 1, 0))
SUM(IF(goals_home + 0 > goals_guest, 3, IF(goals_home = goals_guest, 1, 0))) AS points, + IFNULL((SELECT SUM(c.draw) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 1 ),0)AS draw,
SUM(IF(goals_home + 0 < goals_guest, 1, 0))
+ IFNULL((SELECT SUM(c.lost) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 1 ),0)AS lost,
SUM(IF(goals_home + 0 > goals_guest, 3, IF(goals_home = goals_guest, 1, 0)))+ IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND b.matchday <= $matchday AND home = '1'),0)
+ IFNULL((SELECT SUM(c.points) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 1 ),0)AS points,
SUM(goals_home - goals_guest) AS goals_diff, SUM(goals_home - goals_guest) AS goals_diff,
SUM(goals_home) AS goals, SUM(goals_home) AS goals,
SUM(goals_guest) AS goals_against SUM(goals_guest) AS goals_against,
FROM ' . FOOTB_TEAMS . ' AS t IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND home = '1'),0) AS bonus
FROM " . FOOTB_TEAMS . ' AS t
LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league
AND m.team_id_home = t.team_id AND m.group_id = t.group_id) AND m.team_id_home = t.team_id AND m.group_id = t.group_id)
WHERE t.season = $season WHERE t.season = $season
AND t.league = $league AND t.league = $league
AND m.matchday <= $matchday AND m.matchday <= $matchday
AND m.status IN (2, 3,5,6) AND m.status IN (2, 3,5,6)
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC";
@@ -330,7 +352,8 @@ while($row = $db->sql_fetchrow($result))
'GOALS' => $row['goals'], 'GOALS' => $row['goals'],
'GOALS_AGAINST' => $row['goals_against'], 'GOALS_AGAINST' => $row['goals_against'],
'GOALS_DIFF' => $row['goals_diff'], 'GOALS_DIFF' => $row['goals_diff'],
'POINTS' => $row['points'], 'BONUS' => round($row['bonus'],2),
'POINTS' => round($row['points'],2),
) )
); );
} }
@@ -338,23 +361,29 @@ while($row = $db->sql_fetchrow($result))
$db->sql_freeresult($result); $db->sql_freeresult($result);
$rank = 0; $rank = 0;
// Get away-table-information // Get away-table-information
$sql = 'SELECT $sql = "SELECT
t.*, t.*,
SUM(1) AS matches, SUM(1) AS matches,
SUM(IF(goals_home + 0 < goals_guest, 1, 0)) AS win, SUM(IF(goals_home + 0 < goals_guest, 1, 0))
SUM(IF(goals_home = goals_guest, 1, 0)) AS draw, + IFNULL((SELECT SUM(c.win) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 0 ),0)AS win,
SUM(IF(goals_home + 0 > goals_guest, 1, 0)) AS lost, SUM(IF(goals_home = goals_guest, 1, 0))
SUM(IF(goals_home + 0 < goals_guest, 3, IF(goals_home = goals_guest, 1, 0))) AS points, + IFNULL((SELECT SUM(c.draw) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 0 ),0)AS draw,
SUM(IF(goals_home + 0 > goals_guest, 1, 0))
+ IFNULL((SELECT SUM(c.lost) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 0 ),0)AS lost,
SUM(IF(goals_home + 0 < goals_guest, 3, IF(goals_home = goals_guest, 1, 0))) + IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND b.matchday <= $matchday AND home = '0'),0)
+ IFNULL((SELECT SUM(c.points) FROM " . FOOTB_CORR . " AS c WHERE c.team_id = t.team_id AND c.season = t.season AND c.league = t.league AND c.matchday <= $matchday AND c.home = 0 ),0)AS points,
SUM(goals_guest - goals_home) AS goals_diff, SUM(goals_guest - goals_home) AS goals_diff,
SUM(goals_guest) AS goals, SUM(goals_guest) AS goals,
SUM(goals_home) AS goals_against SUM(goals_home) AS goals_against,
FROM ' . FOOTB_TEAMS . ' AS t IFNULL((SELECT SUM(b.bonuspoints) FROM " . FOOTB_BONUS_DAY . " AS b WHERE b.team_id = t.team_id AND b.season = t.season AND b.league = t.league AND home = '0'),0) AS bonus
FROM " . FOOTB_TEAMS . ' AS t
LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league
AND m.team_id_guest = t.team_id AND m.group_id = t.group_id) AND m.team_id_guest = t.team_id AND m.group_id = t.group_id)
WHERE t.season = $season WHERE t.season = $season
AND t.league = $league AND t.league = $league
AND m.matchday <= $matchday AND m.matchday <= $matchday
AND m.status IN (2, 3,5,6) AND m.status IN (2, 3,5,6)
AND m.show_table = 0
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC"; ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC";
@@ -418,23 +447,36 @@ while($row = $db->sql_fetchrow($result))
'GOALS' => $row['goals'], 'GOALS' => $row['goals'],
'GOALS_AGAINST' => $row['goals_against'], 'GOALS_AGAINST' => $row['goals_against'],
'GOALS_DIFF' => $row['goals_diff'], 'GOALS_DIFF' => $row['goals_diff'],
'POINTS' => $row['points'], 'BONUS' => round($row['bonus'],2),
'POINTS' => round($row['points'],2),
) )
); );
} }
} }
if($league > 50)
{
// Activate bonus coloumn only for tippers.
$data_bns = true;
} else {
$data_bns = false;
}
if($side == 'table') {
$display_table_menu = true;
} else {
$display_table_menu = false;
}
$db->sql_freeresult($result); $db->sql_freeresult($result);
$sidename = sprintf($user->lang['TABLE']); $sidename = sprintf($user->lang['TABLE']);
$template->assign_vars(array( $template->assign_vars(array(
'S_DISPLAY_TABLE' => true, 'S_DISPLAY_TABLE' => true,
'S_DISPLAY_TABLE_MENU' => $display_table_menu,
'S_SIDENAME' => $sidename, 'S_SIDENAME' => $sidename,
'S_DATA_TABLE' => $data_table, 'S_DATA_TABLE' => $data_table,
'S_DATA_FORM' => $data_form, 'S_DATA_FORM' => $data_form,
'SEASON' => $season, 'SEASON' => $season,
'LEAGUE' => $league, 'LEAGUE' => $league,
'TEXT_FORM' => $text_form, 'TEXT_FORM' => $text_form,
'S_DATA_BNS' => $data_bns,
) )
); );
?>

View File

@@ -8,7 +8,7 @@
* *
*/ */
if ( !defined('IN_PHPBB') OR !defined('IN_FOOTBALL') ) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
@@ -19,5 +19,3 @@ $template->assign_vars(array(
'S_DISPLAY_UNDER_CONSTRUCTION' => true, 'S_DISPLAY_UNDER_CONSTRUCTION' => true,
) )
); );
?>

View File

@@ -7,6 +7,11 @@
* *
*/ */
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages? // Can this user view Prediction Leagues pages?
if (!$config['football_guest_view']) if (!$config['football_guest_view'])
{ {
@@ -293,5 +298,3 @@ $template->set_filenames(array(
); );
page_footer(); page_footer();
?>

View File

@@ -1,29 +1,30 @@
{ {
"name": "football/football", "name" : "football/football",
"type": "phpbb-extension", "type" : "phpbb-extension",
"description": "Football Prediction League", "description" : "Football Prediction League",
"homepage": "http://football.bplaced.net", "homepage" : "http://football.bplaced.net",
"version": "0.9.9", "version" : "0.9.9",
"time": "2017-09-09", "time" : "2021-04-04",
"license": "GPL-2.0", "license" : "GPL-2.0-only",
"authors": [{ "authors" : [{
"name": "J. Helmke", "name" : "J. Helmke",
"email": "phpBB3.football@gmx.de", "email" : "phpBB3.football@gmx.de",
"homepage": "http://football.bplaced.net", "homepage" : "http://football.bplaced.net",
"role": "Lead Developer" "role" : "Lead Developer"
}], }
"require": { ],
"php": ">=5.3.3" "require" : {
"php" : ">=5.3.3"
}, },
"extra": { "extra" : {
"display-name": "Football Prediction League", "display-name" : "Football Prediction League",
"soft-require": { "soft-require" : {
"phpbb/phpbb": ">3.1.*" "phpbb/phpbb" : ">=3.2.8,<3.4"
}, },
"version-check": { "version-check" : {
"host": "football.bplaced.net", "host" : "football.bplaced.net",
"directory": "/updatecheck", "directory" : "/updatecheck",
"filename": "football_predictionleague.json" "filename" : "football_predictionleague.json"
} }
} }
} }

View File

@@ -1,4 +1,4 @@
football_main_controller: football_football_controller:
path: /football/{side} path: /football/{side}
defaults: { _controller: football.football.controller:handle } defaults: { _controller: football.football.controller:handle }

View File

@@ -12,102 +12,102 @@ services:
football.football.controller: football.football.controller:
class: football\football\controller\main class: football\football\controller\main
arguments: arguments:
- @auth - '@auth'
- @config - '@config'
- @ext.manager - '@ext.manager'
- @notification_manager - '@notification_manager'
- @log - '@log'
- @path_helper - '@path_helper'
- @dbal.conn - '@dbal.conn'
- @controller.helper - '@controller.helper'
- @template - '@template'
- @user - '@user'
- @pagination - '@pagination'
- %core.root_path% - '%core.root_path%'
- %core.php_ext% - '%core.php_ext%'
football.football.controller_popup: football.football.controller_popup:
class: football\football\controller\popup class: football\football\controller\popup
arguments: arguments:
- @auth - '@auth'
- @config - '@config'
- @ext.manager - '@ext.manager'
- @path_helper - '@path_helper'
- @dbal.conn - '@dbal.conn'
- @controller.helper - '@controller.helper'
- @template - '@template'
- @user - '@user'
- @pagination - '@pagination'
- %core.root_path% - '%core.root_path%'
- %core.php_ext% - '%core.php_ext%'
football.football.controller_download: football.football.controller_download:
class: football\football\controller\download class: football\football\controller\download
arguments: arguments:
- @auth - '@auth'
- @config - '@config'
- @ext.manager - '@ext.manager'
- @path_helper - '@path_helper'
- @dbal.conn - '@dbal.conn'
- @controller.helper - '@controller.helper'
- @template - '@template'
- @user - '@user'
- %core.root_path% - '%core.root_path%'
- %core.php_ext% - '%core.php_ext%'
football.football.version.check: football.football.version.check:
class: football\football\includes\version_check class: football\football\includes\version_check
scope: prototype scope: prototype
arguments: arguments:
- %football.version_data% - '%football.version_data%'
- @config - '@config'
- @version_helper - '@version_helper'
- @template - '@template'
- @user - '@user'
football.football.controller_xml: football.football.controller_xml:
class: football\football\controller\xmlplan class: football\football\controller\xmlplan
arguments: arguments:
- @config - '@config'
- @ext.manager - '@ext.manager'
- @path_helper - '@path_helper'
- @dbal.conn - '@dbal.conn'
- @user - '@user'
- %core.root_path% - '%core.root_path%'
- %core.php_ext% - '%core.php_ext%'
football.football.core.functions.points: football.football.core.functions.points:
class: football\football\core\functions_points class: football\football\core\functions_points
arguments: arguments:
- @user - '@user'
- @dbal.conn - '@dbal.conn'
football.football.listener: football.football.listener:
class: football\football\event\main_listener class: football\football\event\main_listener
arguments: arguments:
- @auth - '@auth'
- @config - '@config'
- @controller.helper - '@controller.helper'
- @template - '@template'
- @path_helper - '@path_helper'
- @ext.manager - '@ext.manager'
- @user - '@user'
- %core.root_path% - '%core.root_path%'
- %core.php_ext% - '%core.php_ext%'
tags: tags:
- { name: event.listener } - { name: event.listener }
football.football.cron.task.football_remember: football.football.cron.task.football_remember:
class: football\football\cron\task\football_remember class: football\football\cron\task\football_remember
arguments: arguments:
- %core.root_path% - '%core.root_path%'
- %core.php_ext% - '%core.php_ext%'
- @ext.manager - '@ext.manager'
- @path_helper - '@path_helper'
- @dbal.conn - '@dbal.conn'
- @config - '@config'
- @log - '@log'
- @user - '@user'
calls: calls:
- [set_name, [football.football.cron.task.football_remember]] - [set_name, [football.football.cron.task.football_remember]]
tags: tags:

View File

@@ -122,7 +122,6 @@ class download
{ {
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED'; $message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message); trigger_error($message);
exit;
} }
// Can this user view Prediction Leagues pages? // Can this user view Prediction Leagues pages?

View File

@@ -45,7 +45,7 @@ class main
/* @var \phpbb\user */ /* @var \phpbb\user */
protected $user; protected $user;
/** @var \phpbb\pagination */ /* @var \phpbb\pagination */
protected $pagination; protected $pagination;
/* @var phpBB root path */ /* @var phpBB root path */
@@ -137,7 +137,6 @@ class main
{ {
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED'; $message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message); trigger_error($message);
exit;
} }
// Can this user view Prediction Leagues pages? // Can this user view Prediction Leagues pages?
@@ -732,6 +731,9 @@ class main
} }
calculate_extra_points($season, $league, $matchday); calculate_extra_points($season, $league, $matchday);
save_ranking_matchday($season, $league, $matchday); save_ranking_matchday($season, $league, $matchday);
bonuspoints($season, $league, $matchday);
corr($season, $league, $matchday);
chart($season, $league, $matchday);
break; break;
case 'join': case 'join':
join_league($season, $league, $user->data['user_id']); join_league($season, $league, $user->data['user_id']);
@@ -750,18 +752,18 @@ class main
INNER JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = s.season) INNER JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = s.season)
INNER JOIN ' . FOOTB_MATCHDAYS . ' AS sp ON (sp.season = s.season AND sp.league = l.league) INNER JOIN ' . FOOTB_MATCHDAYS . ' AS sp ON (sp.season = s.season AND sp.league = l.league)
WHERE 1 WHERE 1
ORDER BY season DESC'; ORDER BY s.season DESC';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result)) while( $row = $db->sql_fetchrow($result))
{ {
$selected = ($season && $row['season'] == $season) ? ' selected="selected"' : ''; $selected = ($season && $row['season'] == $season) ? ' selected="selected"' : '';
if ($selected) if ($selected)
{ {
$season_name = htmlspecialchars($row['season_name_short']); $season_name = utf8_htmlspecialchars($row['season_name_short']);
} }
$template->assign_block_vars('form_season', array( $template->assign_block_vars('form_season', array(
'S_SEASON' => htmlspecialchars($row['season']), 'S_SEASON' => utf8_htmlspecialchars($row['season']),
'S_SEASONNAME' => htmlspecialchars($row['season_name_short']), 'S_SEASONNAME' => utf8_htmlspecialchars($row['season_name_short']),
'S_SELECTED' => $selected)); 'S_SELECTED' => $selected));
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -782,11 +784,40 @@ class main
} }
$league_name = ''; $league_name = '';
$sql = 'SELECT * FROM ' . FOOTB_LEAGUES . " WHERE season = $season AND league_type >= 1"; if ($side == 'table' OR $side == 'results_tl')
{
$sql = 'SELECT * FROM ' . FOOTB_LEAGUES . " WHERE season = $season AND league_type >= 1 AND (league >= 50 OR bet_type = 1) ORDER BY sort ASC";
}
else
{
$sql = 'SELECT * FROM ' . FOOTB_LEAGUES . " WHERE season = $season AND league_type >= 1 AND league < 50";
}
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result)) while( $row = $db->sql_fetchrow($result))
{ {
$selected = ($league && $row['league'] == $league) ? ' selected="selected"' : ''; $selected = ($league && $row['league'] == $league) ? ' selected="selected"' : '';
if ($side == 'table' && $league_info['bet_type'])
{
$side = 'ranks_total';
}
elseif ($side == 'ranks_total' && !$league_info['bet_type'])
{
$side = 'table';
}
elseif ($side == 'table' OR $side == 'results_tl')
{
if ($league < 51)
{
$league = $league + 50;
}
}
else
{
if ($league > 50)
{
$league = $league - 50;
}
}
if ($selected) if ($selected)
{ {
$league_name = $row['league_name']; $league_name = $row['league_name'];
@@ -905,7 +936,7 @@ class main
// Start matchday list // Start matchday list
if ($side == 'bet') if ($side == 'bet')
{ {
include($this->football_root_path . 'block/side_table.' . $this->php_ext);
} }
else else
{ {
@@ -915,18 +946,18 @@ class main
//***************************************************************************** //*****************************************************************************
// Start total list
include($this->football_root_path . 'block/rank_total.' . $this->php_ext);
// End total list
//*****************************************************************************
// Start delivery list // Start delivery list
include($this->football_root_path . 'block/delivery.' . $this->php_ext); include($this->football_root_path . 'block/delivery.' . $this->php_ext);
// End delivery list // End delivery list
//***************************************************************************** //*****************************************************************************
} }
if ($side == 'bet')
{
include($this->football_root_path . 'block/table.' . $this->php_ext);
}
// Start assign vars // Start assign vars
$sql_ary = array( $sql_ary = array(
'football_season' => (int) $season, 'football_season' => (int) $season,
@@ -945,9 +976,9 @@ class main
$print_start = ($start) ? "start=$start&amp;" : ''; $print_start = ($start) ? "start=$start&amp;" : '';
$template->assign_vars(array( $template->assign_vars(array(
'U_PRINT_FOOTBALL' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'view' => 'print')), 'U_PRINT_FOOTBALL' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'view' => 'print')),
'U_MOBILE_SWITCH' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'switch')), 'U_MOBILE_SWITCH' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'switch')),
'U_SIDE_LINK' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_SIDE_LINK' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday)),
'L_TOP_RANKSP' => sprintf($user->lang['RANKING']) . ' ' . $matchday . '. ' . sprintf($user->lang['MATCHDAY']), 'L_TOP_RANKSP' => sprintf($user->lang['RANKING']) . ' ' . $matchday . '. ' . sprintf($user->lang['MATCHDAY']),
'L_TOP_RANKGESAMT' => sprintf($user->lang['TOTAL_RANKING']) . ' ' . $matchday . '. ' . sprintf($user->lang['MATCHDAY']), 'L_TOP_RANKGESAMT' => sprintf($user->lang['TOTAL_RANKING']) . ' ' . $matchday . '. ' . sprintf($user->lang['MATCHDAY']),
'PHPBB_ROOT_PATH' => $this->phpbb_root_path, 'PHPBB_ROOT_PATH' => $this->phpbb_root_path,
@@ -966,13 +997,13 @@ class main
'S_SEASON_NAME' => $season_name, 'S_SEASON_NAME' => $season_name,
'S_LEAGUE_NAME' => $league_name, 'S_LEAGUE_NAME' => $league_name,
'S_MATCHDAY_NAME' => $matchday_name, 'S_MATCHDAY_NAME' => $matchday_name,
'S_FORMSELF' => $this->helper->route('football_main_controller', array('side' => $side)), 'S_FORMSELF' => $this->helper->route('football_football_controller', array('side' => $side)),
'S_DELIVERY' => delivery($season, $league, $matchday), 'S_DELIVERY' => delivery($season, $league, $matchday),
// For nav_delivery // For nav_delivery
'S_PREV_LINK' => $prev_link, 'S_PREV_LINK' => $prev_link,
'S_PREV_CLASS' => $prev_class, 'S_PREV_CLASS' => $prev_class,
'S_PREV_DEADLINE' => $prev_deadline, 'S_PREV_DEADLINE' => $prev_deadline,
'S_CURR_LINK' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league)), 'S_CURR_LINK' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league)),
'S_CURR_MATCHDAY' => $curr_matchday, 'S_CURR_MATCHDAY' => $curr_matchday,
'S_NEXT_LINK' => $next_link, 'S_NEXT_LINK' => $next_link,
'S_NEXT_CLASS' => $next_class, 'S_NEXT_CLASS' => $next_class,
@@ -980,6 +1011,7 @@ class main
'S_DBMSG' => $dbmsg, 'S_DBMSG' => $dbmsg,
'FOOTBALL_LEFT_COLUMN' => $config['football_left_column_width'], 'FOOTBALL_LEFT_COLUMN' => $config['football_left_column_width'],
'FOOTBALL_RIGHT_COLUMN' => $config['football_right_column_width'], 'FOOTBALL_RIGHT_COLUMN' => $config['football_right_column_width'],
'S_BET_TYPE' => $league_info['bet_type'],
)); ));
// End assign vars // End assign vars
@@ -989,6 +1021,10 @@ class main
{ {
include($this->football_root_path . 'block/under_construction.' . $this->php_ext); include($this->football_root_path . 'block/under_construction.' . $this->php_ext);
} }
elseif ($side == 'results_tl')
{
include($this->football_root_path . 'block/results.' . $this->php_ext);
}
else else
{ {
include($this->football_root_path . 'block/' . $side . '.' . $this->php_ext); include($this->football_root_path . 'block/' . $side . '.' . $this->php_ext);

View File

@@ -39,7 +39,7 @@ class popup
/* @var \phpbb\user */ /* @var \phpbb\user */
protected $user; protected $user;
/** @var \phpbb\pagination */ /* @var \phpbb\pagination */
protected $pagination; protected $pagination;
/* @var phpBB root path */ /* @var phpBB root path */
@@ -128,7 +128,6 @@ class popup
{ {
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED'; $message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message); trigger_error($message);
exit;
} }
// Can this user view Prediction Leagues pages? // Can this user view Prediction Leagues pages?

View File

@@ -105,7 +105,6 @@ class xmlplan
{ {
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED'; $message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message); trigger_error($message);
exit;
} }

View File

@@ -42,7 +42,7 @@ class football_remember extends \phpbb\cron\task\base
* @param string $php_ext * @param string $php_ext
* @param \phpbb\extension\manager $phpbb_extension_manager * @param \phpbb\extension\manager $phpbb_extension_manager
* @param \phpbb\path_helper $phpbb_path_helper * @param \phpbb\path_helper $phpbb_path_helper
* @param \phpbb\db\driver\driver_interfacer $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\log\log_interface $log * @param \phpbb\log\log_interface $log
* @param \phpbb\user $user * @param \phpbb\user $user
@@ -333,4 +333,3 @@ class football_remember extends \phpbb\cron\task\base
} }
} }
} }
?>

View File

@@ -129,7 +129,7 @@ class main_listener implements EventSubscriberInterface
} }
else else
{ {
$event['location_url'] = $this->controller_helper->route('football_main_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params'])); $event['location_url'] = $this->controller_helper->route('football_football_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params']));
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
} }
@@ -137,7 +137,7 @@ class main_listener implements EventSubscriberInterface
{ {
$event['location'] = $this->user->lang('VIEWING_FOOTBALL' . (empty($url_parts['base']) ? '' : '_' . strtoupper ($url_parts['base']))); $event['location'] = $this->user->lang('VIEWING_FOOTBALL' . (empty($url_parts['base']) ? '' : '_' . strtoupper ($url_parts['base'])));
} }
$event['location_url'] = $this->controller_helper->route('football_main_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params'])); $event['location_url'] = $this->controller_helper->route('football_football_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params']));
} }
} }
@@ -217,19 +217,20 @@ class main_listener implements EventSubscriberInterface
'S_FOOTBALL_HEADER_LEAGUE' => $league, 'S_FOOTBALL_HEADER_LEAGUE' => $league,
'S_FOOTBALL_EXT_PATH' => $ext_path, 'S_FOOTBALL_EXT_PATH' => $ext_path,
'S_FOOTBALL_HEADER_ENABLED' => $this->config['football_header_enable'] ? $in_football_ext : false, 'S_FOOTBALL_HEADER_ENABLED' => $this->config['football_header_enable'] ? $in_football_ext : false,
'U_FOOTBALL' => $this->controller_helper->route('football_main_controller', array('side' => 'bet')), 'U_FOOTBALL' => $this->controller_helper->route('football_football_controller', array('side' => 'bet')),
'U_BET' => $this->controller_helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_BET' => $this->controller_helper->route('football_football_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_ALL_BETS' => $this->controller_helper->route('football_main_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_ALL_BETS' => $this->controller_helper->route('football_football_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RESULTS' => $this->controller_helper->route('football_main_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_RESULTS' => $this->controller_helper->route('football_football_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_TABLE' => $this->controller_helper->route('football_main_controller', array('side' => 'table', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_RESULTS_TL' => $this->controller_helper->route('football_football_controller', array('side' => 'results_tl', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RANKS_TOTAL' => $this->controller_helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_TABLE' => $this->controller_helper->route('football_football_controller', array('side' => 'table', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RANKS_MATCHDAY' => $this->controller_helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_RANKS_TOTAL' => $this->controller_helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_DELIVERY_LIST' => $this->controller_helper->route('football_main_controller', array('side' => 'delivery', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_RANKS_MATCHDAY' => $this->controller_helper->route('football_football_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_LAST_VISITORS' => $this->controller_helper->route('football_main_controller', array('side' => 'last_users', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_DELIVERY_LIST' => $this->controller_helper->route('football_football_controller', array('side' => 'delivery', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL_BANK' => $this->controller_helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_LAST_VISITORS' => $this->controller_helper->route('football_football_controller', array('side' => 'last_users', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL_BANK' => $this->controller_helper->route('football_football_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RULES' => $this->controller_helper->route('football_football_popup', array('popside' => 'rules_popup', 's' => $season, 'l' => $league)), 'U_RULES' => $this->controller_helper->route('football_football_popup', array('popside' => 'rules_popup', 's' => $season, 'l' => $league)),
'U_EXPORT' => $this->controller_helper->route('football_football_download', array('downside' => 'dload_export', 's' => $season, 'l' => $league)), 'U_EXPORT' => $this->controller_helper->route('football_football_download', array('downside' => 'dload_export', 's' => $season, 'l' => $league)),
'U_ODDS' => $this->controller_helper->route('football_main_controller', array('side' => 'odds', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_ODDS' => $this->controller_helper->route('football_football_controller', array('side' => 'odds', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_MENU_LINK1' => (strlen($this->config['football_menu_link1']) > 4) ? true : false, 'S_MENU_LINK1' => (strlen($this->config['football_menu_link1']) > 4) ? true : false,
'U_MENU_LINK1' => $this->config['football_menu_link1'], 'U_MENU_LINK1' => $this->config['football_menu_link1'],
'MENU_DESC_LINK1' => $this->config['football_menu_desc1'], 'MENU_DESC_LINK1' => $this->config['football_menu_desc1'],
@@ -239,14 +240,14 @@ class main_listener implements EventSubscriberInterface
'S_MENU_LINK3' => (strlen($this->config['football_menu_link3']) > 4) ? true : false, 'S_MENU_LINK3' => (strlen($this->config['football_menu_link3']) > 4) ? true : false,
'U_MENU_LINK3' => (strpos($this->config['football_menu_link3'], 'xml/league.php') === false) ? $this->config['football_menu_link3'] : $this->config['football_menu_link3'] . "&season=$season&league=$league", 'U_MENU_LINK3' => (strpos($this->config['football_menu_link3'], 'xml/league.php') === false) ? $this->config['football_menu_link3'] : $this->config['football_menu_link3'] . "&season=$season&league=$league",
'MENU_DESC_LINK3' => $this->config['football_menu_desc3'], 'MENU_DESC_LINK3' => $this->config['football_menu_desc3'],
'U_MY_BETS' => $this->controller_helper->route('football_main_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_MY_BETS' => $this->controller_helper->route('football_football_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_POINTS' => $this->controller_helper->route('football_main_controller', array('side' => 'my_points', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_MY_POINTS' => $this->controller_helper->route('football_football_controller', array('side' => 'my_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_TABLE' => $this->controller_helper->route('football_main_controller', array('side' => 'my_table', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_MY_TABLE' => $this->controller_helper->route('football_football_controller', array('side' => 'my_table', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_RANK' => $this->controller_helper->route('football_main_controller', array('side' => 'my_rank', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_MY_RANK' => $this->controller_helper->route('football_football_controller', array('side' => 'my_rank', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_CHART' => $this->controller_helper->route('football_main_controller', array('side' => 'my_chart', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_MY_CHART' => $this->controller_helper->route('football_football_controller', array('side' => 'my_chart', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_KOEFF' => $this->controller_helper->route('football_main_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_MY_KOEFF' => $this->controller_helper->route('football_football_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_STAT_RESULTS' => $this->controller_helper->route('football_main_controller', array('side' => 'stat_results', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_STAT_RESULTS' => $this->controller_helper->route('football_football_controller', array('side' => 'stat_results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_STAT_POINTS' => $this->controller_helper->route('football_main_controller', array('side' => 'stat_points', 's' => $season, 'l' => $league, 'm' => $matchday)), 'U_STAT_POINTS' => $this->controller_helper->route('football_football_controller', array('side' => 'stat_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
)); ));
} }

BIN
images/flags/1. FC Gera.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
images/flags/AC Florenz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
images/flags/AC Mailand.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/flags/AEK Athen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
images/flags/AIK Solna.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
images/flags/AS Monaco.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
images/flags/AS Rom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/flags/AZ Alkmaar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/flags/Aalborg BK.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
images/flags/Albania.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
images/flags/Algeria.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
images/flags/Andorra.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

BIN
images/flags/Angola.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Some files were not shown because too many files have changed in this diff Show More