Compare commits
44 Commits
v0.9.7
...
a7c2ba8e72
| Author | SHA1 | Date | |
|---|---|---|---|
| a7c2ba8e72 | |||
| 76cedb15a2 | |||
| 41397ffbdc | |||
|
|
cba1e024cd | ||
|
|
75c02e1eb8 | ||
|
|
80e99f7a11 | ||
|
|
7ab5247437 | ||
|
|
25dc3154aa | ||
|
|
a2ea3364a4 | ||
| abf7e95d08 | |||
| 573a3bdea7 | |||
| 25e4e53485 | |||
| adfecaac96 | |||
| 4870166b96 | |||
| 9d57480e6d | |||
| 948f7b8511 | |||
| 90172d076b | |||
| 66dceff9f2 | |||
| 8b679b1286 | |||
| e1db71c99d | |||
| 3ade0f043f | |||
| f56cf04e74 | |||
| 66b2a1a8d0 | |||
| 889ff05ca6 | |||
| 0b9f099381 | |||
| 148c16c87a | |||
| 511fab50b7 | |||
| 6c06de3772 | |||
| 37204150dc | |||
| 85d3c835d2 | |||
| ac536658fa | |||
| 92267523b9 | |||
| 4a64eb71a3 | |||
| 268ca763f7 | |||
| 66b35b0155 | |||
| 4b627586f8 | |||
| 3b47093a3a | |||
| 511a23d609 | |||
| 6b9ebb0d1a | |||
|
|
7d8b92f1df | ||
|
|
c075143bfc | ||
|
|
a502b5d082 | ||
|
|
a16e0e3c79 | ||
|
|
09631cbe15 |
27
.gitignore
vendored
@@ -39,3 +39,30 @@ Icon
|
|||||||
# Files that might appear on external disk
|
# Files that might appear on external disk
|
||||||
.Spotlight-V100
|
.Spotlight-V100
|
||||||
.Trashes
|
.Trashes
|
||||||
|
/styles/prosilver/theme/images/right_arrow.png
|
||||||
|
/styles/prosilver/theme/images/icon_allbets.gif
|
||||||
|
/styles/prosilver/theme/images/icon_ball.gif
|
||||||
|
/styles/prosilver/theme/images/icon_ball2.gif
|
||||||
|
/styles/prosilver/theme/images/icon_bet.gif
|
||||||
|
/styles/prosilver/theme/images/icon_bookmark.gif
|
||||||
|
/styles/prosilver/theme/images/icon_download.gif
|
||||||
|
/styles/prosilver/theme/images/icon_info.gif
|
||||||
|
/styles/prosilver/theme/images/icon_list.gif
|
||||||
|
/styles/prosilver/theme/images/icon_mark.gif
|
||||||
|
/styles/prosilver/theme/images/icon_odds.gif
|
||||||
|
/styles/prosilver/theme/images/icon_points.gif
|
||||||
|
/styles/prosilver/theme/images/icon_print.gif
|
||||||
|
/styles/prosilver/theme/images/icon_rank.gif
|
||||||
|
/styles/prosilver/theme/images/icon_results.gif
|
||||||
|
/styles/prosilver/theme/images/icon_rules.gif
|
||||||
|
/styles/prosilver/theme/images/icon_statistic.gif
|
||||||
|
/styles/prosilver/theme/images/icon_statistics.gif
|
||||||
|
/styles/prosilver/theme/images/icon_xml.gif
|
||||||
|
/styles/prosilver/theme/images/left_arrow.png
|
||||||
|
/images/no_change.gif
|
||||||
|
/images/arrow_down.gif
|
||||||
|
/images/arrow_up.gif
|
||||||
|
/migrations/v099_beta1.php
|
||||||
|
/.buildpath
|
||||||
|
/.project
|
||||||
|
/.settings/
|
||||||
|
|||||||
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
11
.idea/aws.xml
generated
Normal 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -47,10 +47,8 @@ class all_bets_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->tpl_name = 'acp_football_all_bets';
|
$this->tpl_name = 'acp_football_all_bets';
|
||||||
$this->page_title = 'ACP_FOOTBALL_ALL_BETS_VIEW';
|
$this->page_title = 'ACP_FOOTBALL_ALL_BETS_VIEW';
|
||||||
@@ -58,13 +56,13 @@ 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);
|
||||||
$league = $this->request->variable('l', 0);
|
$league = $this->request->variable('l', 0);
|
||||||
$matchday = $this->request->variable('m', 0);
|
$matchday = $this->request->variable('m', 0);
|
||||||
$start = $this->request->variable('start', 0);
|
$start = $this->request->variable('start', 0);
|
||||||
|
|
||||||
// Grab current season
|
// Grab current season
|
||||||
if (!$season)
|
if (!$season)
|
||||||
@@ -120,11 +118,11 @@ class all_bets_module
|
|||||||
$league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>';
|
$league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>';
|
||||||
if ($selected <> '')
|
if ($selected <> '')
|
||||||
{
|
{
|
||||||
$league_matchdays = $row['matchdays'];
|
$league_matchdays = $row['matchdays'];
|
||||||
$matches_matchday = $row['matches_on_matchday'];
|
$matches_matchday = $row['matches_on_matchday'];
|
||||||
$league_name = $row['league_name'];
|
$league_name = $row['league_name'];
|
||||||
$league_type = $row['league_type'];
|
$league_type = $row['league_type'];
|
||||||
$ko_league = ($row['league_type'] == LEAGUE_KO) ? true : false;
|
$ko_league = ($row['league_type'] == LEAGUE_KO) ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
@@ -221,7 +219,6 @@ class all_bets_module
|
|||||||
$split_after = $count_matches;
|
$split_after = $count_matches;
|
||||||
$splits = 1;
|
$splits = 1;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Make sure $start is set to the last page if it exceeds the amount
|
// Make sure $start is set to the last page if it exceeds the amount
|
||||||
if ($start < 0 || $start >= $total_users)
|
if ($start < 0 || $start >= $total_users)
|
||||||
@@ -313,7 +310,7 @@ class all_bets_module
|
|||||||
$total = 0;
|
$total = 0;
|
||||||
}
|
}
|
||||||
$bet_index++;
|
$bet_index++;
|
||||||
$total += $user_bet['points'];
|
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||||
if ($user_bet['status'] < 3)
|
if ($user_bet['status'] < 3)
|
||||||
{
|
{
|
||||||
$colorstyle_total = ' color_provisionally';
|
$colorstyle_total = ' color_provisionally';
|
||||||
@@ -323,9 +320,9 @@ class all_bets_module
|
|||||||
|
|
||||||
$colorstyle_bet = color_style($user_bet['status']);
|
$colorstyle_bet = color_style($user_bet['status']);
|
||||||
$template->assign_block_vars('match_panel.user_row.bet', array(
|
$template->assign_block_vars('match_panel.user_row.bet', array(
|
||||||
'BET' => $bet_home. ':'. $bet_guest,
|
'BET' => $bet_home. ':'. $bet_guest,
|
||||||
'COLOR_STYLE' => $colorstyle_bet,
|
'COLOR_STYLE' => $colorstyle_bet,
|
||||||
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -367,9 +364,9 @@ class all_bets_module
|
|||||||
}
|
}
|
||||||
if (0 == $match['hid'])
|
if (0 == $match['hid'])
|
||||||
{
|
{
|
||||||
$home_info = get_team($season, $league, $match['match_no'], 'team_id_home', $match['formula_home']);
|
$home_info = get_team($season, $league, $match['match_no'], 'team_id_home', $match['formula_home']);
|
||||||
$home_in_array = explode("#",$home_info);
|
$home_in_array = explode("#",$home_info);
|
||||||
$homename = $home_in_array[3];
|
$homename = $home_in_array[3];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -377,9 +374,9 @@ class all_bets_module
|
|||||||
}
|
}
|
||||||
if (0 == $match['gid'])
|
if (0 == $match['gid'])
|
||||||
{
|
{
|
||||||
$guest_info = get_team($season, $league, $match['match_no'], 'team_id_guest', $match['formula_guest']);
|
$guest_info = get_team($season, $league, $match['match_no'], 'team_id_guest', $match['formula_guest']);
|
||||||
$guest_in_array = explode("#",$guest_info);
|
$guest_in_array = explode("#",$guest_info);
|
||||||
$guestname = $guest_in_array[3];
|
$guestname = $guest_in_array[3];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -387,10 +384,10 @@ class all_bets_module
|
|||||||
}
|
}
|
||||||
$colorstyle_match = color_style($match['status']);
|
$colorstyle_match = color_style($match['status']);
|
||||||
$template->assign_block_vars('match_panel.match', array(
|
$template->assign_block_vars('match_panel.match', array(
|
||||||
'HOME_NAME' => $homename,
|
'HOME_NAME' => $homename,
|
||||||
'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,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -421,7 +418,7 @@ class all_bets_module
|
|||||||
$total = 0;
|
$total = 0;
|
||||||
}
|
}
|
||||||
$bet_index++;
|
$bet_index++;
|
||||||
$total += $user_bet['points'];
|
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||||
if ($user_bet['status'] < 3)
|
if ($user_bet['status'] < 3)
|
||||||
{
|
{
|
||||||
$colorstyle_total = ' color_provisionally';
|
$colorstyle_total = ' color_provisionally';
|
||||||
@@ -431,9 +428,9 @@ class all_bets_module
|
|||||||
|
|
||||||
$colorstyle_bet = color_style($user_bet['status']);
|
$colorstyle_bet = color_style($user_bet['status']);
|
||||||
$template->assign_block_vars('match_panel.user_row.bet', array(
|
$template->assign_block_vars('match_panel.user_row.bet', array(
|
||||||
'BET' => $bet_home. ':'. $bet_guest,
|
'BET' => $bet_home. ':'. $bet_guest,
|
||||||
'COLOR_STYLE' => $colorstyle_bet,
|
'COLOR_STYLE' => $colorstyle_bet,
|
||||||
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -442,8 +439,8 @@ class all_bets_module
|
|||||||
$sum_total[$user_bet['username']] += $total;
|
$sum_total[$user_bet['username']] += $total;
|
||||||
$matchday_sum_total += $total;
|
$matchday_sum_total += $total;
|
||||||
$template->assign_block_vars('match_panel.user_row.points', array(
|
$template->assign_block_vars('match_panel.user_row.points', array(
|
||||||
'COLOR_STYLE' => $colorstyle_total,
|
'COLOR_STYLE' => $colorstyle_total,
|
||||||
'POINTS_TOTAL' => $sum_total[$user_bet['username']],
|
'POINTS_TOTAL' => $sum_total[$user_bet['username']],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$bet_index = 0;
|
$bet_index = 0;
|
||||||
@@ -451,9 +448,9 @@ class all_bets_module
|
|||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('match_panel.tendency_footer', array(
|
$template->assign_block_vars('match_panel.tendency_footer', array(
|
||||||
'S_TOTAL' => true,
|
'S_TOTAL' => true,
|
||||||
'COLOR_STYLE' => $colorstyle_total, //currently ignored
|
'COLOR_STYLE' => $colorstyle_total, //currently ignored
|
||||||
'SUMTOTAL' => $matchday_sum_total,
|
'SUMTOTAL' => $matchday_sum_total,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach ($matches_tendency AS $match_tendency)
|
foreach ($matches_tendency AS $match_tendency)
|
||||||
@@ -524,12 +521,12 @@ class all_bets_module
|
|||||||
$extra_colorstyle = color_style($row['extra_status']);
|
$extra_colorstyle = color_style($row['extra_status']);
|
||||||
|
|
||||||
$template->assign_block_vars('extra_panel', array(
|
$template->assign_block_vars('extra_panel', array(
|
||||||
'QUESTION' => $row['question'],
|
'QUESTION' => $row['question'],
|
||||||
'RESULT' => ($display_type == 1) ? $row['result_team'] : $row['result'],
|
'RESULT' => ($display_type == 1) ? $row['result_team'] : $row['result'],
|
||||||
'POINTS' => $row['extra_points'],
|
'POINTS' => $row['extra_points'],
|
||||||
'EVALUATION' => ($row['matchday'] == $row['matchday_eval']) ? sprintf($user->lang['MATCHDAY']) : sprintf($user->lang['TOTAL']),
|
'EVALUATION' => ($row['matchday'] == $row['matchday_eval']) ? sprintf($user->lang['MATCHDAY']) : sprintf($user->lang['TOTAL']),
|
||||||
'EVALUATION_TITLE' => $eval_title,
|
'EVALUATION_TITLE' => $eval_title,
|
||||||
'COLOR_STYLE' => $extra_colorstyle,
|
'COLOR_STYLE' => $extra_colorstyle,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -567,34 +564,35 @@ class all_bets_module
|
|||||||
|
|
||||||
|
|
||||||
$template->assign_block_vars('extra_panel.user_row', array(
|
$template->assign_block_vars('extra_panel.user_row', array(
|
||||||
'ROW_CLASS' => $row_class,
|
'ROW_CLASS' => $row_class,
|
||||||
'USER_NAME' => $user_row['username'],
|
'USER_NAME' => $user_row['username'],
|
||||||
'BET' => ($display_type == 1) ? $bet_team : $bet,
|
'BET' => ($display_type == 1) ? $bet_team : $bet,
|
||||||
'BET_POINTS' => $user_row['bet_points'],
|
'BET_POINTS' => $user_row['bet_points'],
|
||||||
'COLOR_STYLE' => $extra_colorstyle,
|
'COLOR_STYLE' => $extra_colorstyle,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result_bet);
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$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,
|
||||||
'S_SEASON_OPTIONS' => $season_options,
|
'S_SEASON_OPTIONS' => $season_options,
|
||||||
'S_LEAGUE_OPTIONS' => $league_options,
|
'S_LEAGUE_OPTIONS' => $league_options,
|
||||||
'S_MATCHDAY_OPTIONS' => $matchday_options,
|
'S_MATCHDAY_OPTIONS' => $matchday_options,
|
||||||
'S_DISPLAY_ALL_BETS' => true,
|
'S_DISPLAY_ALL_BETS' => true,
|
||||||
'S_MATCHES_ON_MATCHDAY' => $matches_on_matchday,
|
'S_MATCHES_ON_MATCHDAY' => $matches_on_matchday,
|
||||||
'S_SPALTEN' => ($count_matches * 2)+2,
|
'S_SPALTEN' => ($count_matches * 2)+2,
|
||||||
'S_VERSION_NO' => $this->config['football_version'],
|
'S_VERSION_NO' => $this->config['football_version'],
|
||||||
'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),
|
||||||
'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),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -47,10 +47,8 @@ class bank_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
if (!$this->config['football_bank'])
|
if (!$this->config['football_bank'])
|
||||||
{
|
{
|
||||||
@@ -75,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', ''));
|
||||||
@@ -186,6 +184,7 @@ class bank_module
|
|||||||
AND points_type IN (" . POINTS_MATCHDAY . ',' . POINTS_SEASON . ',' . POINTS_MOST_HITS . ',' . POINTS_MOST_HITS_AWAY . ')';
|
AND points_type IN (" . POINTS_MATCHDAY . ',' . POINTS_SEASON . ',' . POINTS_MOST_HITS . ',' . POINTS_MOST_HITS_AWAY . ')';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$count_updates += $db->sql_affectedrows();
|
$count_updates += $db->sql_affectedrows();
|
||||||
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -201,6 +200,7 @@ class bank_module
|
|||||||
HAVING win > 0";
|
HAVING win > 0";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$points_ary = $db->sql_fetchrowset($result);
|
$points_ary = $db->sql_fetchrowset($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
if (!$default_matchday)
|
if (!$default_matchday)
|
||||||
{
|
{
|
||||||
$matchday = (curr_matchday($season, $league) > 0) ? curr_matchday($season, $league) : 1;
|
$matchday = (curr_matchday($season, $league) > 0) ? curr_matchday($season, $league) : 1;
|
||||||
@@ -353,6 +353,7 @@ class bank_module
|
|||||||
AND points_type = $type";
|
AND points_type = $type";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$count_updates += $db->sql_affectedrows();
|
$count_updates += $db->sql_affectedrows();
|
||||||
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
$back_link = $this->u_action . '&action=list&s=' . $season . '&l=' . $league . '&t=' . $type . '&start=' . $start;
|
$back_link = $this->u_action . '&action=list&s=' . $season . '&l=' . $league . '&t=' . $type . '&start=' . $start;
|
||||||
trigger_error(sprintf($user->lang['LEAGUE_' . $points_var . ($count_updates == 1 ? '' : 'S')], $count_updates) . adm_back_link($back_link));
|
trigger_error(sprintf($user->lang['LEAGUE_' . $points_var . ($count_updates == 1 ? '' : 'S')], $count_updates) . adm_back_link($back_link));
|
||||||
@@ -554,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 . "&s=$season&l=$league",
|
'U_ACTION' => $this->u_action . "&s=$season&l=$league",
|
||||||
'U_BACK' => $this->u_action. "&s=$season&l=$league",
|
'U_BACK' => $this->u_action. "&s=$season&l=$league",
|
||||||
)
|
)
|
||||||
@@ -592,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&action=edit&u={$row['user_id']}"),
|
'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&action=edit&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']),
|
||||||
@@ -618,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,
|
||||||
@@ -644,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);
|
||||||
@@ -669,5 +670,3 @@ class bank_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -39,10 +39,8 @@ class bets_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->ext_football_path = $phpbb_root_path . 'ext/football/football/';
|
$this->ext_football_path = $phpbb_root_path . 'ext/football/football/';
|
||||||
if(!function_exists('season_info'))
|
if(!function_exists('season_info'))
|
||||||
@@ -68,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', '');
|
||||||
@@ -327,6 +325,7 @@ class bets_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($resultopen);
|
||||||
if ($count_updates > 0)
|
if ($count_updates > 0)
|
||||||
{
|
{
|
||||||
if ($same AND ($count_matches > 6) AND $this->config['football_same_allowed'] == 0)
|
if ($same AND ($count_matches > 6) AND $this->config['football_same_allowed'] == 0)
|
||||||
@@ -360,7 +359,6 @@ class bets_module
|
|||||||
{
|
{
|
||||||
$success[] = sprintf($user->lang['NO_BETS_SAVED']);
|
$success[] = sprintf($user->lang['NO_BETS_SAVED']);
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($resultopen);
|
|
||||||
|
|
||||||
// extra bets
|
// extra bets
|
||||||
$sql = 'SELECT * FROM ' . FOOTB_EXTRA . " WHERE season = $season AND league = $league AND matchday = $matchday";
|
$sql = 'SELECT * FROM ' . FOOTB_EXTRA . " WHERE season = $season AND league = $league AND matchday = $matchday";
|
||||||
@@ -420,6 +418,7 @@ class bets_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($resultextra);
|
||||||
if ($count_extra_updates)
|
if ($count_extra_updates)
|
||||||
{
|
{
|
||||||
$success[] = sprintf($user->lang['EXTRA_BET' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
$success[] = sprintf($user->lang['EXTRA_BET' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
||||||
@@ -427,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;
|
||||||
}
|
}
|
||||||
@@ -584,6 +586,7 @@ class bets_module
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$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
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -47,10 +47,8 @@ class extra_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->tpl_name = 'acp_football_extra';
|
$this->tpl_name = 'acp_football_extra';
|
||||||
$this->page_title = 'ACP_FOOTBALL_EXTRA_MANAGE';
|
$this->page_title = 'ACP_FOOTBALL_EXTRA_MANAGE';
|
||||||
@@ -58,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', ''));
|
||||||
@@ -154,8 +152,6 @@ class extra_module
|
|||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Which page?
|
// Which page?
|
||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
@@ -267,7 +263,7 @@ class extra_module
|
|||||||
$matchday_eval_options .= '<option value="' . $row['matchday'] . '"' . $selected_eval . '>' . $day_name . '</option>';
|
$matchday_eval_options .= '<option value="' . $row['matchday'] . '"' . $selected_eval . '>' . $day_name . '</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
$question_type_options = '';
|
$question_type_options = '';
|
||||||
for($i = 1; $i<= 5; $i++)
|
for($i = 1; $i<= 5; $i++)
|
||||||
{
|
{
|
||||||
@@ -419,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,
|
||||||
@@ -460,4 +456,3 @@ class extra_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -20,7 +20,7 @@ class football_info
|
|||||||
'modes' => array(
|
'modes' => array(
|
||||||
'settings' => array('title' => 'ACP_FOOTBALL_SETTINGS', 'auth' => 'acl_a_football_config', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
'settings' => array('title' => 'ACP_FOOTBALL_SETTINGS', 'auth' => 'acl_a_football_config', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
||||||
'features' => array('title' => 'ACP_FOOTBALL_FEATURES', 'auth' => 'acl_a_football_config', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
'features' => array('title' => 'ACP_FOOTBALL_FEATURES', 'auth' => 'acl_a_football_config', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
||||||
'menu' => array('title' => 'ACP_FOOTBALL_MENU', 'auth' => 'acl_a_football_config', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
'menu' => array('title' => 'ACP_FOOTBALL_MENU', 'auth' => 'acl_a_football_config', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
||||||
'userguide' => array('title' => 'ACP_FOOTBALL_USERGUIDE','auth' => 'acl_a_football_plan', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
'userguide' => array('title' => 'ACP_FOOTBALL_USERGUIDE','auth' => 'acl_a_football_plan', 'cat' => array('ACP_FOOTBALL_CONFIGURATION')),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -51,10 +51,8 @@ class football_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $phpbb_log;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $phpbb_log;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$user->add_lang('acp/board');
|
$user->add_lang('acp/board');
|
||||||
|
|
||||||
@@ -67,19 +65,19 @@ class football_module
|
|||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
case 'userguide':
|
case 'userguide':
|
||||||
$this->page_title = 'ACP_FOOTBALL_USERGUIDE';
|
$this->page_title = 'ACP_FOOTBALL_USERGUIDE';
|
||||||
$this->tpl_name = 'acp_football_userguide';
|
$this->tpl_name = 'acp_football_userguide';
|
||||||
|
|
||||||
$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'],
|
||||||
));
|
));
|
||||||
|
|
||||||
// Pull the array data from the lang pack
|
// Pull the array data from the lang pack
|
||||||
foreach ($user->help as $help_ary)
|
foreach ($user->lang['FOOTBALL_HELP_FAQ'] as $help_ary)
|
||||||
{
|
{
|
||||||
if ($help_ary[0] == '--')
|
if ($help_ary[0] == '--')
|
||||||
{
|
{
|
||||||
@@ -109,7 +107,7 @@ class football_module
|
|||||||
'football_header_enable' => array('lang' => 'FOOTBALL_HEADER_ENABLE','validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'football_header_enable' => array('lang' => 'FOOTBALL_HEADER_ENABLE','validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
'football_guest_view' => array('lang' => 'GUEST_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'football_guest_view' => array('lang' => 'GUEST_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
'football_user_view' => array('lang' => 'USER_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'football_user_view' => array('lang' => 'USER_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
'football_host_timezone' => array('lang' => 'HOST_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'phpbb_timezone_select', 'params' => array($template, $user, '{CONFIG_VALUE}', true), 'explain' => true),
|
'football_time_shift' => array('lang' => 'TIME_SHIFT', 'validate' => 'int', 'type' => 'select', 'method' => 'time_shift_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => true),
|
||||||
'football_info_display' => array('lang' => 'FOOTBALL_INFO', 'validate' => 'bool', 'type' => 'custom', 'method' => 'football_info', 'explain' => true),
|
'football_info_display' => array('lang' => 'FOOTBALL_INFO', 'validate' => 'bool', 'type' => 'custom', 'method' => 'football_info', 'explain' => true),
|
||||||
'football_info' => false,
|
'football_info' => false,
|
||||||
'football_win_name' => array('lang' => 'WIN_NAME', 'validate' => 'string', 'type' => 'text:6:6', 'explain' => true),
|
'football_win_name' => array('lang' => 'WIN_NAME', 'validate' => 'string', 'type' => 'text:6:6', 'explain' => true),
|
||||||
@@ -122,6 +120,8 @@ class football_module
|
|||||||
'legend2' => 'GENERAL_SETTINGS',
|
'legend2' => 'GENERAL_SETTINGS',
|
||||||
'football_left_column_width' => array('lang' => 'LEFT_COLUMN', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
'football_left_column_width' => array('lang' => 'LEFT_COLUMN', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||||
'football_right_column_width' => array('lang' => 'RIGHT_COLUMN', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
'football_right_column_width' => array('lang' => 'RIGHT_COLUMN', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||||
|
'football_display_last_users' => array('lang' => 'DISPLAY_LAST_USERS', 'validate' => 'int','type' => 'text:3:3', 'explain' => true),
|
||||||
|
'football_display_last_results' => array('lang' => 'DISPLAY_LAST_RESULTS', 'validate' => 'int','type' => 'text:3:3', 'explain' => true),
|
||||||
'football_display_ranks' => array('lang' => 'DISPLAY_RANKS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
'football_display_ranks' => array('lang' => 'DISPLAY_RANKS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||||
'football_users_per_page' => array('lang' => 'USERS_PAGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
'football_users_per_page' => array('lang' => 'USERS_PAGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||||
|
|
||||||
@@ -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,
|
||||||
@@ -364,7 +364,7 @@ class football_module
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adjust Cronjob EMail remember next un
|
* Adjust Cronjob EMail remember next run
|
||||||
*/
|
*/
|
||||||
function next_run($value, $key = '')
|
function next_run($value, $key = '')
|
||||||
{
|
{
|
||||||
@@ -421,6 +421,16 @@ class football_module
|
|||||||
$year_options . ' ' . $user->lang['HOURS'] . ': ' . $hour_options . ' ' . $user->lang['MINUTES'] . ': ' . $minute_options;
|
$year_options . ' ' . $user->lang['HOURS'] . ': ' . $hour_options . ' ' . $user->lang['MINUTES'] . ': ' . $minute_options;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
function time_shift_select($default = 0)
|
||||||
|
{
|
||||||
|
$time_shift_options = "";
|
||||||
|
for ($i = -23; $i < 24; $i++)
|
||||||
|
{
|
||||||
|
$selected = ($i == $default) ? ' selected="selected"' : '';
|
||||||
|
$time_shift_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
|
||||||
|
}
|
||||||
|
return $time_shift_options;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -47,10 +47,8 @@ class ko_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->tpl_name = 'acp_football_ko';
|
$this->tpl_name = 'acp_football_ko';
|
||||||
$this->page_title = 'ACP_FOOTBALL_KO_MANAGE';
|
$this->page_title = 'ACP_FOOTBALL_KO_MANAGE';
|
||||||
@@ -58,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', '');
|
||||||
@@ -232,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,
|
||||||
@@ -254,4 +252,3 @@ class ko_module
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -47,10 +47,8 @@ class leagues_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->tpl_name = 'acp_football_leagues';
|
$this->tpl_name = 'acp_football_leagues';
|
||||||
$this->page_title = 'ACP_FOOTBALL_LEAGUES_MANAGE';
|
$this->page_title = 'ACP_FOOTBALL_LEAGUES_MANAGE';
|
||||||
@@ -58,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', ''));
|
||||||
@@ -155,7 +153,6 @@ class leagues_module
|
|||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
if (!($row = $db->sql_fetchrow($result)))
|
if (!($row = $db->sql_fetchrow($result)))
|
||||||
{
|
{
|
||||||
$db->sql_freeresult($result);
|
|
||||||
trigger_error($user->lang['NO_MEMBERS_SELECTED'] . adm_back_link($this->u_action . "&action=list&s=$season&l=$league"), E_USER_WARNING);
|
trigger_error($user->lang['NO_MEMBERS_SELECTED'] . adm_back_link($this->u_action . "&action=list&s=$season&l=$league"), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,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)
|
||||||
{
|
{
|
||||||
@@ -497,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)
|
||||||
{
|
{
|
||||||
@@ -513,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)
|
||||||
{
|
{
|
||||||
@@ -558,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;
|
||||||
@@ -567,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),
|
||||||
@@ -623,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 . "&s=$season";
|
$u_back = $this->u_action . "&s=$season";
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
@@ -664,7 +681,8 @@ class leagues_module
|
|||||||
'LEAGUE_WIN_MATCHDAYS' => $league_info['win_matchday'],
|
'LEAGUE_WIN_MATCHDAYS' => $league_info['win_matchday'],
|
||||||
'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}&action=$action&s=$season",
|
'U_ACTION' => "{$this->u_action}&action=$action&s=$season",
|
||||||
)
|
)
|
||||||
@@ -675,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,
|
||||||
@@ -693,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);
|
||||||
@@ -733,4 +751,3 @@ class leagues_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -47,10 +47,8 @@ class matchdays_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->tpl_name = 'acp_football_matchdays';
|
$this->tpl_name = 'acp_football_matchdays';
|
||||||
$this->page_title = 'ACP_FOOTBALL_MATCHDAYS_MANAGE';
|
$this->page_title = 'ACP_FOOTBALL_MATCHDAYS_MANAGE';
|
||||||
@@ -58,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' : '';
|
||||||
@@ -218,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')
|
||||||
@@ -253,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')
|
||||||
@@ -288,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')
|
||||||
@@ -325,6 +323,7 @@ class matchdays_module
|
|||||||
ORDER BY matchday ASC, number ASC";
|
ORDER BY matchday ASC, number ASC";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$rows_matchdays = $db->sql_fetchrowset($result);
|
$rows_matchdays = $db->sql_fetchrowset($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
$row_number = 0;
|
$row_number = 0;
|
||||||
foreach ($rows_matchdays as $row_matchday)
|
foreach ($rows_matchdays as $row_matchday)
|
||||||
{
|
{
|
||||||
@@ -712,7 +711,7 @@ class matchdays_module
|
|||||||
if ($data['dday1_day'] <> '--' and $data['dday1_month'] <> '--' and $data['dday1_year'] <> '--')
|
if ($data['dday1_day'] <> '--' and $data['dday1_month'] <> '--' and $data['dday1_year'] <> '--')
|
||||||
{
|
{
|
||||||
$delivery_timestamp = mktime($data['dday1_hour'], $data['dday1_min'], 0, $data['dday1_month'], $data['dday1_day'], $data['dday1_year']);
|
$delivery_timestamp = mktime($data['dday1_hour'], $data['dday1_min'], 0, $data['dday1_month'], $data['dday1_day'], $data['dday1_year']);
|
||||||
$local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 3600);
|
$local_board_time = time() + ($this->config['football_time_shift'] * 3600);
|
||||||
if ($delivery_timestamp > $local_board_time AND $matchday_row['status'] == 0)
|
if ($delivery_timestamp > $local_board_time AND $matchday_row['status'] == 0)
|
||||||
{
|
{
|
||||||
// check if delivery is before all open matches
|
// check if delivery is before all open matches
|
||||||
@@ -766,6 +765,7 @@ class matchdays_module
|
|||||||
// reopen matchday
|
// reopen matchday
|
||||||
$matchday_row['status'] = 0;
|
$matchday_row['status'] = 0;
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -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
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -47,10 +47,8 @@ class matches_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->tpl_name = 'acp_football_matches';
|
$this->tpl_name = 'acp_football_matches';
|
||||||
$this->page_title = 'ACP_FOOTBALL_MATCHES_MANAGE';
|
$this->page_title = 'ACP_FOOTBALL_MATCHES_MANAGE';
|
||||||
@@ -58,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', '');
|
||||||
@@ -126,12 +124,12 @@ class matches_module
|
|||||||
$league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>';
|
$league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>';
|
||||||
if ($selected <> '')
|
if ($selected <> '')
|
||||||
{
|
{
|
||||||
$league_info = $row;
|
$league_info = $row;
|
||||||
$league_matchdays = $row['matchdays'];
|
$league_matchdays = $row['matchdays'];
|
||||||
$matches_matchday = $row['matches_on_matchday'];
|
$matches_matchday = $row['matches_on_matchday'];
|
||||||
$league_name = $row['league_name'];
|
$league_name = $row['league_name'];
|
||||||
$league_type = $row['league_type'];
|
$league_type = $row['league_type'];
|
||||||
$ko_league = ($row['league_type'] == LEAGUE_KO) ? true : false;
|
$ko_league = ($row['league_type'] == LEAGUE_KO) ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
@@ -389,17 +387,18 @@ class matches_module
|
|||||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . "&s=$season&l=$league&m=$matchday"), E_USER_WARNING);
|
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . "&s=$season&l=$league&m=$matchday"), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
$match_row['status'] = utf8_normalize_nfc($this->request->variable('match_status', '', true));
|
$match_row['status'] = utf8_normalize_nfc($this->request->variable('match_status', '', true));
|
||||||
$match_row['odd_1'] = round($this->request->variable('odd_1', $match_row['odd_1']),2);
|
$match_row['odd_1'] = round($this->request->variable('odd_1', $match_row['odd_1']),2);
|
||||||
$match_row['odd_x'] = round($this->request->variable('odd_x', $match_row['odd_x']),2);
|
$match_row['odd_x'] = round($this->request->variable('odd_x', $match_row['odd_x']),2);
|
||||||
$match_row['odd_2'] = round($this->request->variable('odd_2', $match_row['odd_2']),2);
|
$match_row['odd_2'] = round($this->request->variable('odd_2', $match_row['odd_2']),2);
|
||||||
$match_row['rating'] = round($this->request->variable('rating', $match_row['rating']),2);
|
$match_row['rating'] = round($this->request->variable('rating', $match_row['rating']),2);
|
||||||
$match_row['team_id_home'] = utf8_normalize_nfc($this->request->variable('team_home', '', true));
|
$match_row['team_id_home'] = utf8_normalize_nfc($this->request->variable('team_home', '', true));
|
||||||
$match_row['team_id_guest'] = utf8_normalize_nfc($this->request->variable('team_guest', '', true));
|
$match_row['team_id_guest'] = utf8_normalize_nfc($this->request->variable('team_guest', '', true));
|
||||||
$match_row['formula_home'] = utf8_normalize_nfc($this->request->variable('formula_home', '', true));
|
$match_row['formula_home'] = utf8_normalize_nfc($this->request->variable('formula_home', '', true));
|
||||||
$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'] <> '')
|
||||||
{
|
{
|
||||||
@@ -415,7 +414,7 @@ class matches_module
|
|||||||
if ($data['mday_day'] <> '--' and $data['mday_month'] <> '--' and $data['mday_year'] <> '--')
|
if ($data['mday_day'] <> '--' and $data['mday_month'] <> '--' and $data['mday_year'] <> '--')
|
||||||
{
|
{
|
||||||
$match_timestamp = mktime($data['mday_hour'], $data['mday_min'], 0, $data['mday_month'], $data['mday_day'], $data['mday_year']);
|
$match_timestamp = mktime($data['mday_hour'], $data['mday_min'], 0, $data['mday_month'], $data['mday_day'], $data['mday_year']);
|
||||||
$local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 3600);
|
$local_board_time = time() + ($this->config['football_time_shift'] * 3600);
|
||||||
if ($match_timestamp > $local_board_time AND $match_row['status'] < 3 AND $league_info['bet_in_time'] == 1)
|
if ($match_timestamp > $local_board_time AND $match_row['status'] < 3 AND $league_info['bet_in_time'] == 1)
|
||||||
{
|
{
|
||||||
// Bet in time and match moved to future
|
// Bet in time and match moved to future
|
||||||
@@ -629,7 +628,7 @@ class matches_module
|
|||||||
$selected_home = ($home_id && $row['team_id'] == $home_id) ? ' selected="selected"' : '';
|
$selected_home = ($home_id && $row['team_id'] == $home_id) ? ' selected="selected"' : '';
|
||||||
$team_home_options .= '<option value="' . $row['group_id'] . ';' . $row['team_id'] .'"' . $selected_home . '>' . $row['team_name'] . '</option>';
|
$team_home_options .= '<option value="' . $row['group_id'] . ';' . $row['team_id'] .'"' . $selected_home . '>' . $row['team_name'] . '</option>';
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
$u_back = $this->u_action . "&s=$season&l=$league&m=$matchday";
|
$u_back = $this->u_action . "&s=$season&l=$league&m=$matchday";
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
@@ -719,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,
|
||||||
@@ -763,5 +762,3 @@ class matches_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -46,10 +46,8 @@ class results_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
if ($phpbb_extension_manager->is_enabled('dmzx/ultimatepoints')) {
|
if ($phpbb_extension_manager->is_enabled('dmzx/ultimatepoints')) {
|
||||||
// Get an instance of the ultimatepoints functions_points
|
// Get an instance of the ultimatepoints functions_points
|
||||||
@@ -62,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', '');
|
||||||
@@ -194,7 +192,7 @@ class results_module
|
|||||||
{
|
{
|
||||||
trigger_error(sprintf($user->lang['NO_MATCHDAY'], $league_info['league_name'], $season) . adm_back_link($this->u_action . "&s=$season&l=$league"), E_USER_WARNING);
|
trigger_error(sprintf($user->lang['NO_MATCHDAY'], $league_info['league_name'], $season) . adm_back_link($this->u_action . "&s=$season&l=$league"), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
$local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 3600);
|
$local_board_time = time() + ($this->config['football_time_shift'] * 3600);
|
||||||
|
|
||||||
// Which page?
|
// Which page?
|
||||||
switch ($action)
|
switch ($action)
|
||||||
@@ -384,6 +382,7 @@ class results_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($resultextra);
|
||||||
if ($count_extra_updates)
|
if ($count_extra_updates)
|
||||||
{
|
{
|
||||||
$success[] = sprintf($user->lang['EXTRA_RESULT' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
$success[] = sprintf($user->lang['EXTRA_RESULT' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
||||||
@@ -444,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)
|
||||||
@@ -770,6 +772,7 @@ class results_module
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
switch ($league_info['bet_ko_type'])
|
switch ($league_info['bet_ko_type'])
|
||||||
{
|
{
|
||||||
@@ -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
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -47,10 +47,8 @@ class seasons_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->tpl_name = 'acp_football_seasons';
|
$this->tpl_name = 'acp_football_seasons';
|
||||||
$this->page_title = 'ACP_FOOTBALL_SEASONS_MANAGE';
|
$this->page_title = 'ACP_FOOTBALL_SEASONS_MANAGE';
|
||||||
@@ -58,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', '');
|
||||||
@@ -337,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}&action=$action&s=$season",
|
'U_ACTION' => "{$this->u_action}&action=$action&s=$season",
|
||||||
|
'S_VERSION_NO' => $this->config['football_version'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@@ -345,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,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -358,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);
|
||||||
@@ -392,5 +391,3 @@ class seasons_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -37,10 +37,8 @@ class teams_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->ext_football_path = $phpbb_root_path . 'ext/football/football/';
|
$this->ext_football_path = $phpbb_root_path . 'ext/football/football/';
|
||||||
if(!function_exists('season_info'))
|
if(!function_exists('season_info'))
|
||||||
@@ -58,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', '');
|
||||||
@@ -591,7 +589,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,
|
||||||
@@ -599,6 +597,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'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -611,7 +610,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);
|
||||||
@@ -656,4 +655,3 @@ class teams_module
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -36,10 +36,8 @@ class update_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$user->add_lang_ext('football/football', 'info_acp_update');
|
$user->add_lang_ext('football/football', 'info_acp_update');
|
||||||
|
|
||||||
@@ -90,10 +88,8 @@ class update_module
|
|||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points, $phpbb_log;
|
global $db, $auth, $phpbb_container, $phpbb_admin_path, $league_info, $functions_points, $phpbb_log;
|
||||||
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx, $cache;
|
global $template, $user, $config, $phpbb_extension_manager, $request, $phpbb_root_path, $phpEx, $cache;
|
||||||
$provider = new \phpbb\controller\ provider();
|
|
||||||
$symphony_request = new \phpbb\ symfony_request($request);
|
$helper = $phpbb_container->get('controller.helper');
|
||||||
$filesystem = new \phpbb\ filesystem();
|
|
||||||
$helper = new \phpbb\controller\ helper($template, $user, $config, $provider, $phpbb_extension_manager, $symphony_request, $request, $filesystem, $phpbb_root_path, $phpEx);
|
|
||||||
|
|
||||||
$this->ext_football_path = $phpbb_root_path . 'ext/football/football/';
|
$this->ext_football_path = $phpbb_root_path . 'ext/football/football/';
|
||||||
if(!function_exists('season_info'))
|
if(!function_exists('season_info'))
|
||||||
@@ -111,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' : '';
|
||||||
@@ -135,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();
|
||||||
@@ -401,6 +397,7 @@ class update_module
|
|||||||
{
|
{
|
||||||
$error[] = sprintf($user->lang['MISMATCH_MATCHDAYS'], $row['matchdays']);
|
$error[] = sprintf($user->lang['MISMATCH_MATCHDAYS'], $row['matchdays']);
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$sql = 'SELECT COUNT(match_no) as matches
|
$sql = 'SELECT COUNT(match_no) as matches
|
||||||
FROM ' . FOOTB_MATCHES . "
|
FROM ' . FOOTB_MATCHES . "
|
||||||
@@ -418,6 +415,7 @@ class update_module
|
|||||||
{
|
{
|
||||||
$error[] = sprintf($user->lang['MISMATCH_MATCHES'], $row['matches']);
|
$error[] = sprintf($user->lang['MISMATCH_MATCHES'], $row['matches']);
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (!sizeof($error))
|
if (!sizeof($error))
|
||||||
{
|
{
|
||||||
@@ -551,6 +549,7 @@ class update_module
|
|||||||
$count_updates++;
|
$count_updates++;
|
||||||
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
if ($effected_matchdays <> '')
|
if ($effected_matchdays <> '')
|
||||||
{
|
{
|
||||||
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
||||||
@@ -595,6 +594,7 @@ class update_module
|
|||||||
$count_updates++;
|
$count_updates++;
|
||||||
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
if ($effected_matchdays <> '')
|
if ($effected_matchdays <> '')
|
||||||
{
|
{
|
||||||
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
||||||
@@ -639,6 +639,7 @@ class update_module
|
|||||||
$count_updates++;
|
$count_updates++;
|
||||||
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
if ($effected_matchdays <> '')
|
if ($effected_matchdays <> '')
|
||||||
{
|
{
|
||||||
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
||||||
@@ -666,7 +667,7 @@ class update_module
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check status of matchdays
|
// check status of matchdays
|
||||||
$local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 3600);
|
$local_board_time = time() + ($this->config['football_time_shift'] * 3600);
|
||||||
$sql = $sql = 'UPDATE ' . FOOTB_MATCHDAYS . " AS target
|
$sql = $sql = 'UPDATE ' . FOOTB_MATCHDAYS . " AS target
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
(
|
(
|
||||||
@@ -729,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 . "&action=choose",
|
'U_CHOOSE_ACTION' => $this->u_action . "&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,
|
||||||
@@ -749,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,
|
||||||
@@ -850,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)
|
||||||
{
|
{
|
||||||
@@ -1143,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')
|
||||||
{
|
{
|
||||||
@@ -1159,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)) . '" />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1170,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
|
||||||
@@ -1187,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 . ' </td>' :
|
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? $color_open . utf8_htmlspecialchars($value) . $color_close . ' </td>' :
|
||||||
'<td>' . $color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . '<br />';
|
'<td>' . $color_open . utf8_htmlspecialchars($value) . $color_close . '<br />';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1197,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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1244,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') . ' </td>' :
|
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? utf8_htmlspecialchars($value) . ' </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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1321,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')
|
||||||
{
|
{
|
||||||
@@ -1386,6 +1387,7 @@ class update_module
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
return $count_updates;
|
return $count_updates;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1405,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())
|
||||||
@@ -1459,4 +1461,3 @@ class update_module
|
|||||||
return $selected_fields;
|
return $selected_fields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -78,7 +102,6 @@ else
|
|||||||
$splits = 1;
|
$splits = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Make sure $start is set to the last page if it exceeds the amount
|
// Make sure $start is set to the last page if it exceeds the amount
|
||||||
if ($start < 0 || $start >= $total_users)
|
if ($start < 0 || $start >= $total_users)
|
||||||
@@ -95,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'])
|
||||||
{
|
{
|
||||||
@@ -114,21 +137,47 @@ if ($count_matches > 0)
|
|||||||
{
|
{
|
||||||
$matches_on_matchday = true;
|
$matches_on_matchday = true;
|
||||||
|
|
||||||
$sql = "SELECT
|
if($league_info['bet_type'])
|
||||||
u.user_id,
|
{
|
||||||
u.username,
|
$sql = "SELECT
|
||||||
m.status,
|
u.user_id,
|
||||||
b.goals_home AS bet_home,
|
u.username,
|
||||||
b.goals_guest AS bet_guest,
|
m.status,
|
||||||
" . select_points() . '
|
b.goals_home AS bet_home,
|
||||||
FROM ' . FOOTB_MATCHES . ' AS m
|
b.goals_guest AS bet_guest,
|
||||||
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
|
IFNULL(m2.match_no,m3.match_no),
|
||||||
LEFT JOIN ' . USERS_TABLE . " AS u ON (u.user_id = b.user_id)
|
" . select_points() . '
|
||||||
WHERE m.season = $season
|
FROM ' . FOOTB_MATCHES . ' AS m
|
||||||
AND m.league = $league
|
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
|
||||||
AND m.matchday = $matchday
|
LEFT JOIN ' . USERS_TABLE . ' AS u ON (u.user_id = b.user_id)
|
||||||
ORDER BY LOWER(u.username) ASC, m.match_datetime ASC, m.match_no ASC";
|
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
|
||||||
|
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);
|
||||||
@@ -165,56 +214,67 @@ foreach ($matches AS $match)
|
|||||||
$count_user = 0;
|
$count_user = 0;
|
||||||
$bet_index = 0;
|
$bet_index = 0;
|
||||||
$last_match_index = 0;
|
$last_match_index = 0;
|
||||||
foreach ($bet_line[$split_index] AS $user_bet)
|
if(!empty($bet_line))
|
||||||
{
|
{
|
||||||
if ($bet_index == 0)
|
foreach ($bet_line[$split_index] AS $user_bet)
|
||||||
{
|
{
|
||||||
$count_user++;
|
if ($bet_index == 0)
|
||||||
$row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
{
|
||||||
if ($user_bet['user_id'] == $user->data['user_id'])
|
$count_user++;
|
||||||
{
|
$league_info = league_info($season, $league);
|
||||||
$row_class = 'bg3 row_user';
|
if ($league_info['bet_type'])
|
||||||
}
|
{
|
||||||
$template->assign_block_vars('match_panel.user_row', array(
|
$row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||||
'ROW_CLASS' => $row_class,
|
}
|
||||||
'USER_NAME' => $user_bet['username'],
|
else
|
||||||
)
|
{
|
||||||
);
|
$row_class = (!(($count_user + ($count_user % 2)) % 4)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||||
$total = 0;
|
}
|
||||||
}
|
if ($user_bet['user_id'] == $user->data['user_id'])
|
||||||
$bet_index++;
|
{
|
||||||
$total += $user_bet['points'];
|
$row_class = 'bg3 row_user';
|
||||||
if ($user_bet['status'] < 3)
|
}
|
||||||
{
|
$template->assign_block_vars('match_panel.user_row', array(
|
||||||
$colorstyle_total = ' color_provisionally';
|
'ROW_CLASS' => $row_class,
|
||||||
}
|
'USER_NAME' => $user_bet['username'],
|
||||||
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
)
|
||||||
{
|
);
|
||||||
// hide bets
|
$total = 0;
|
||||||
$bet_home = ($user_bet['bet_home'] == '') ? ' ' : '?';
|
}
|
||||||
$bet_guest = ($user_bet['bet_guest'] == '') ? ' ' : '?';
|
$bet_index++;
|
||||||
}
|
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||||
else
|
if ($user_bet['status'] < 3)
|
||||||
{
|
{
|
||||||
$bet_home = $user_bet['bet_home'];
|
$colorstyle_total = ' color_provisionally';
|
||||||
$bet_guest = $user_bet['bet_guest'];
|
}
|
||||||
}
|
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
||||||
|
{
|
||||||
|
// hide bets
|
||||||
|
$bet_home = ($user_bet['bet_home'] == '') ? ' ' : '?';
|
||||||
|
$bet_guest = ($user_bet['bet_guest'] == '') ? ' ' : '?';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$bet_home = $user_bet['bet_home'];
|
||||||
|
$bet_guest = $user_bet['bet_guest'];
|
||||||
|
}
|
||||||
|
|
||||||
$colorstyle_bet = color_style($user_bet['status']);
|
$colorstyle_bet = color_style($user_bet['status']);
|
||||||
$template->assign_block_vars('match_panel.user_row.bet', array(
|
$template->assign_block_vars('match_panel.user_row.bet', array(
|
||||||
'BET' => $bet_home. ':'. $bet_guest,
|
'BET' => $bet_home. ':'. $bet_guest,
|
||||||
'COLOR_STYLE' => $colorstyle_bet,
|
'COLOR_STYLE' => $colorstyle_bet,
|
||||||
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($bet_index == $split_after)
|
if ($bet_index == $split_after)
|
||||||
{
|
{
|
||||||
$sum_total[$user_bet['username']] += $total;
|
$sum_total[$user_bet['username']] += $total;
|
||||||
$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(
|
||||||
'S_TOTAL' => false,
|
'S_TOTAL' => false,
|
||||||
@@ -265,10 +325,11 @@ foreach ($matches AS $match)
|
|||||||
}
|
}
|
||||||
$colorstyle_match = color_style($match['status']);
|
$colorstyle_match = color_style($match['status']);
|
||||||
$template->assign_block_vars('match_panel.match_entry', array(
|
$template->assign_block_vars('match_panel.match_entry', array(
|
||||||
'HOME_NAME' => $homename,
|
'HOME_NAME' => $homename,
|
||||||
'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'])
|
||||||
@@ -288,59 +349,70 @@ if ($count_matches > 0)
|
|||||||
$total = 0;
|
$total = 0;
|
||||||
$count_user = 0;
|
$count_user = 0;
|
||||||
$bet_index = 0;
|
$bet_index = 0;
|
||||||
foreach ($bet_line[$split_index] AS $user_bet)
|
if(!empty($bet_line))
|
||||||
{
|
{
|
||||||
if ($bet_index == 0)
|
foreach ($bet_line[$split_index] AS $user_bet)
|
||||||
{
|
{
|
||||||
$count_user++;
|
if ($bet_index == 0)
|
||||||
$row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
|
||||||
if ($user_bet['user_id'] == $user->data['user_id'])
|
|
||||||
{
|
{
|
||||||
$row_class = 'bg3 row_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';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$row_class = (!(($count_user + ($count_user % 2)) % 4)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||||
|
}
|
||||||
|
if ($user_bet['user_id'] == $user->data['user_id'])
|
||||||
|
{
|
||||||
|
$row_class = 'bg3 row_user';
|
||||||
|
}
|
||||||
|
$template->assign_block_vars('match_panel.user_row', array(
|
||||||
|
'ROW_CLASS' => $row_class,
|
||||||
|
'USER_NAME' => $user_bet['username'],
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$total = 0;
|
||||||
}
|
}
|
||||||
$template->assign_block_vars('match_panel.user_row', array(
|
$bet_index++;
|
||||||
'ROW_CLASS' => $row_class,
|
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||||
'USER_NAME' => $user_bet['username'],
|
if ($user_bet['status'] < 3)
|
||||||
|
{
|
||||||
|
$colorstyle_total = ' color_provisionally';
|
||||||
|
}
|
||||||
|
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
||||||
|
{
|
||||||
|
// hide bets
|
||||||
|
$bet_home = ($user_bet['bet_home'] == '') ? '' : '?';
|
||||||
|
$bet_guest = ($user_bet['bet_guest'] == '') ? '' : '?';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$bet_home = $user_bet['bet_home'];
|
||||||
|
$bet_guest = $user_bet['bet_guest'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$colorstyle_bet = color_style($user_bet['status']);
|
||||||
|
$template->assign_block_vars('match_panel.user_row.bet', array(
|
||||||
|
'BET' => $bet_home. ':'. $bet_guest,
|
||||||
|
'COLOR_STYLE' => $colorstyle_bet,
|
||||||
|
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$total = 0;
|
|
||||||
}
|
|
||||||
$bet_index++;
|
|
||||||
$total += $user_bet['points'];
|
|
||||||
if ($user_bet['status'] < 3)
|
|
||||||
{
|
|
||||||
$colorstyle_total = ' color_provisionally';
|
|
||||||
}
|
|
||||||
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
|
||||||
{
|
|
||||||
// hide bets
|
|
||||||
$bet_home = ($user_bet['bet_home'] == '') ? '' : '?';
|
|
||||||
$bet_guest = ($user_bet['bet_guest'] == '') ? '' : '?';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$bet_home = $user_bet['bet_home'];
|
|
||||||
$bet_guest = $user_bet['bet_guest'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$colorstyle_bet = color_style($user_bet['status']);
|
if ($bet_index == $last_match_index)
|
||||||
$template->assign_block_vars('match_panel.user_row.bet', array(
|
{
|
||||||
'BET' => $bet_home. ':'. $bet_guest,
|
$sum_total[$user_bet['username']] += $total;
|
||||||
'COLOR_STYLE' => $colorstyle_bet,
|
$matchday_sum_total += $total;
|
||||||
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
$template->assign_block_vars('match_panel.user_row.points', array(
|
||||||
)
|
'COLOR_STYLE' => $colorstyle_total,
|
||||||
);
|
'POINTS_TOTAL' => $sum_total[$user_bet['username']],
|
||||||
|
)
|
||||||
if ($bet_index == $last_match_index)
|
);
|
||||||
{
|
$bet_index = 0;
|
||||||
$sum_total[$user_bet['username']] += $total;
|
}
|
||||||
$matchday_sum_total += $total;
|
|
||||||
$template->assign_block_vars('match_panel.user_row.points', array(
|
|
||||||
'COLOR_STYLE' => $colorstyle_total,
|
|
||||||
'POINTS_TOTAL' => $sum_total[$user_bet['username']],
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$bet_index = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,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';
|
||||||
@@ -479,23 +551,17 @@ while ($row = $db->sql_fetchrow($result))
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result_bet);
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$sidename = sprintf($user->lang['ALL_BETS']);
|
$sidename = sprintf($user->lang['ALL_BETS']);
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_ALL_BETS' => true,
|
'S_DISPLAY_ALL_BETS' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['BET']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['RESULTS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_BET']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_RESULTS']),
|
|
||||||
'S_MATCHES_ON_MATCHDAY' => $matches_on_matchday,
|
'S_MATCHES_ON_MATCHDAY' => $matches_on_matchday,
|
||||||
'S_SPALTEN' => ($count_matches * 2) + 2,
|
'S_SPALTEN' => ($count_matches * 2) + 2,
|
||||||
'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),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
|
||||||
@@ -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') )
|
||||||
{
|
{
|
||||||
@@ -221,15 +226,7 @@ $template->assign_vars(array(
|
|||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'S_MULTI_VIEW' => $multi_view,
|
'S_MULTI_VIEW' => $multi_view,
|
||||||
'L_TOTAL_ENTRIES' => ($count == 1) ? $count . ' ' .sprintf($user->lang['FOOTBALL_RECORD']) : $count . ' ' .sprintf($user->lang['FOOTBALL_RECORDS']),
|
'L_TOTAL_ENTRIES' => ($count == 1) ? $count . ' ' .sprintf($user->lang['FOOTBALL_RECORD']) : $count . ' ' .sprintf($user->lang['FOOTBALL_RECORDS']),
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['RANK_TOTAL']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['MY_BETS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_RANK_TOTAL']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_MY_BETS']),
|
|
||||||
'USERNAME' => $username,
|
'USERNAME' => $username,
|
||||||
'POINTS' => $config['football_win_name'],
|
'POINTS' => $config['football_win_name'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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
|
||||||
@@ -468,7 +470,8 @@ while ($row = $db->sql_fetchrow($result))
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$league_info = league_info($season, $league);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$bet_explain = '';
|
$bet_explain = '';
|
||||||
switch ($league_info['bet_ko_type'])
|
switch ($league_info['bet_ko_type'])
|
||||||
{
|
{
|
||||||
@@ -505,17 +508,11 @@ $template->assign_vars(array(
|
|||||||
'S_DISPLAY_BET' => true,
|
'S_DISPLAY_BET' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'BET_EXPLAIN' => $bet_explain,
|
'BET_EXPLAIN' => $bet_explain,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'stat_results', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['STAT_RESULTS']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['ALL_BETS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_STAT_RESULTS']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_ALL_BETS']),
|
|
||||||
'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,
|
||||||
@@ -530,5 +527,3 @@ $template->assign_vars(array(
|
|||||||
'S_DISPLAY_RATING' => $display_rating,
|
'S_DISPLAY_RATING' => $display_rating,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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'])
|
||||||
{
|
{
|
||||||
@@ -347,6 +352,7 @@ while ($row = $db->sql_fetchrow($result))
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$sidename = sprintf($user->lang['BET']);
|
$sidename = sprintf($user->lang['BET']);
|
||||||
if ($data_bet)
|
if ($data_bet)
|
||||||
@@ -388,4 +394,3 @@ $template->set_filenames(array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
page_footer();
|
page_footer();
|
||||||
?>
|
|
||||||
@@ -7,17 +7,16 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data_delivery = false;
|
$data_delivery = false;
|
||||||
$user_id = $user->data['user_id'];
|
$user_id = $user->data['user_id'];
|
||||||
$lang_dates = $user->lang['datetime'];
|
$lang_dates = $user->lang['datetime'];
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$local_board_time = time() + (($config['board_timezone'] - $config['football_host_timezone']) * 3600);
|
$local_board_time = time() + ($config['football_time_shift'] * 3600);
|
||||||
$sql = "(SELECT
|
$sql = "SELECT
|
||||||
m.season,
|
m.season,
|
||||||
m.league,
|
m.league,
|
||||||
m.matchday,
|
m.matchday,
|
||||||
@@ -27,142 +26,25 @@ $sql = "(SELECT
|
|||||||
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
|
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
|
||||||
ELSE m.matchday_name
|
ELSE m.matchday_name
|
||||||
END AS matchday_name,
|
END AS matchday_name,
|
||||||
CONCAT(
|
IF(l.bet_in_time = 0, IF(ma.status = 0, m.delivery_date
|
||||||
CASE DATE_FORMAT(m.delivery_date,'%w')
|
, IF(ma.status = -1, m.delivery_date_2
|
||||||
WHEN 0 THEN '" . $lang_dates['Sun'] . "'
|
, m.delivery_date_3
|
||||||
WHEN 1 THEN '" . $lang_dates['Mon'] . "'
|
)
|
||||||
WHEN 2 THEN '" . $lang_dates['Tue'] . "'
|
)
|
||||||
WHEN 3 THEN '" . $lang_dates['Wed'] . "'
|
, ma.match_datetime) AS delivery,
|
||||||
WHEN 4 THEN '" . $lang_dates['Thu'] . "'
|
|
||||||
WHEN 5 THEN '" . $lang_dates['Fri'] . "'
|
|
||||||
WHEN 6 THEN '" . $lang_dates['Sat'] . "'
|
|
||||||
ELSE 'Error' END,
|
|
||||||
DATE_FORMAT(m.delivery_date,' %d.%m.%y %H:%i')
|
|
||||||
) as delivery_time,
|
|
||||||
m.delivery_date AS delivery,
|
|
||||||
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
|
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
|
||||||
COUNT(*) AS matches_count,
|
COUNT(*) AS matches_count,
|
||||||
SUM(IF(eb.extra_no > 0, IF(eb.bet = '', 0, 1), 0)) AS extra_bets_count,
|
SUM(IF(eb.extra_no > 0, IF(eb.bet = '', 0, 1), 0)) AS extra_bets_count,
|
||||||
SUM(IF(e.extra_no > 0, 1, 0)) AS extra_count
|
SUM(IF(e.extra_no > 0, 1, 0)) AS extra_count
|
||||||
FROM " . FOOTB_MATCHDAYS . " AS m
|
FROM " . FOOTB_MATCHDAYS . " AS m
|
||||||
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
|
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league)
|
||||||
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0)
|
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0)
|
||||||
JOIN " . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
|
JOIN " . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
|
||||||
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.delivery_date > FROM_UNIXTIME('$local_board_time')
|
WHERE m.status <= 0
|
||||||
AND m.status <= 0
|
GROUP BY m.season, m.league, m.matchday, l.league_name_short, matchday_name, delivery
|
||||||
GROUP BY m.delivery_date, m.league, b.user_id
|
ORDER BY delivery, m.season, m.league";
|
||||||
)
|
|
||||||
UNION
|
|
||||||
(SELECT
|
|
||||||
m.season,
|
|
||||||
m.league,
|
|
||||||
m.matchday,
|
|
||||||
l.league_name_short,
|
|
||||||
CASE m.matchday_name
|
|
||||||
WHEN ''
|
|
||||||
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
|
|
||||||
ELSE m.matchday_name
|
|
||||||
END AS matchday_name,
|
|
||||||
CONCAT(
|
|
||||||
CASE DATE_FORMAT(m.delivery_date_2,'%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.delivery_date_2,' %d.%m.%y %H:%i')
|
|
||||||
) as delivery_time,
|
|
||||||
m.delivery_date_2 AS delivery ,
|
|
||||||
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
|
|
||||||
COUNT(*) AS matches_count,
|
|
||||||
0 AS extra_bets_count,
|
|
||||||
0 AS extra_count
|
|
||||||
FROM " . FOOTB_MATCHDAYS . " AS m
|
|
||||||
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
|
|
||||||
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = -1)
|
|
||||||
JOIN " . FOOTB_BETS . " AS b ON (b.season = ma.season AND b.league = ma.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
|
|
||||||
WHERE m.delivery_date_2 > FROM_UNIXTIME('$local_board_time')
|
|
||||||
AND m.status <= 0
|
|
||||||
GROUP BY m.delivery_date, m.league, b.user_id
|
|
||||||
)
|
|
||||||
UNION
|
|
||||||
(SELECT
|
|
||||||
m.season,
|
|
||||||
m.league,
|
|
||||||
m.matchday,
|
|
||||||
l.league_name_short,
|
|
||||||
CASE m.matchday_name
|
|
||||||
WHEN ''
|
|
||||||
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
|
|
||||||
ELSE m.matchday_name
|
|
||||||
END AS matchday_name,
|
|
||||||
CONCAT(
|
|
||||||
CASE DATE_FORMAT(m.delivery_date_3,'%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.delivery_date_3,' %d.%m.%y %H:%i')
|
|
||||||
) as delivery_time,
|
|
||||||
m.delivery_date_3 AS delivery,
|
|
||||||
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
|
|
||||||
COUNT(*) AS matches_count,
|
|
||||||
0 AS extra_bets_count,
|
|
||||||
0 AS extra_count
|
|
||||||
FROM " . FOOTB_MATCHDAYS . " AS m
|
|
||||||
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
|
|
||||||
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = -2)
|
|
||||||
JOIN " . FOOTB_BETS . " AS b ON (b.season = ma.season AND b.league = ma.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
|
|
||||||
WHERE m.delivery_date_3 > FROM_UNIXTIME('$local_board_time')
|
|
||||||
AND m.status <= 0
|
|
||||||
GROUP BY m.delivery_date, m.league, b.user_id
|
|
||||||
)
|
|
||||||
UNION
|
|
||||||
(SELECT
|
|
||||||
m.season,
|
|
||||||
m.league,
|
|
||||||
m.matchday,
|
|
||||||
l.league_name_short,
|
|
||||||
CASE m.matchday_name
|
|
||||||
WHEN ''
|
|
||||||
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
|
|
||||||
ELSE m.matchday_name
|
|
||||||
END AS matchday_name,
|
|
||||||
CONCAT(
|
|
||||||
CASE DATE_FORMAT(ma.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(ma.match_datetime,' %d.%m.%y %H:%i')
|
|
||||||
) as delivery_time,
|
|
||||||
ma.match_datetime AS delivery,
|
|
||||||
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
|
|
||||||
COUNT(*) AS matches_count,
|
|
||||||
0 AS extra_bets_count,
|
|
||||||
0 AS extra_count
|
|
||||||
FROM " . FOOTB_MATCHDAYS . " AS m
|
|
||||||
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 1)
|
|
||||||
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0)
|
|
||||||
JOIN " . FOOTB_BETS . " AS b ON (b.season = ma.season AND b.league = ma.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
|
|
||||||
WHERE ma.match_datetime > FROM_UNIXTIME('$local_board_time')
|
|
||||||
AND m.status <= 0
|
|
||||||
GROUP BY ma.match_datetime, m.league, b.user_id
|
|
||||||
)
|
|
||||||
ORDER BY delivery, 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)
|
||||||
@@ -173,12 +55,12 @@ 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',
|
||||||
'TITLE' => ($row['bets_count'] == $row['matches_count']) ? sprintf($user->lang['DELIVERY_READY']) : sprintf($user->lang['DELIVERY_NOT_READY']),
|
'TITLE' => ($row['bets_count'] == $row['matches_count']) ? sprintf($user->lang['DELIVERY_READY']) : sprintf($user->lang['DELIVERY_NOT_READY']),
|
||||||
'DELIVERY' => $row['delivery_time'],
|
'DELIVERY' => $lang_dates[date("D", strtotime($row['delivery']))] . date(" d.m.y G:i", strtotime($row['delivery'])),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -189,5 +71,3 @@ $template->assign_vars(array(
|
|||||||
'S_DATA_DELIVERY' => $data_delivery,
|
'S_DATA_DELIVERY' => $data_delivery,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -89,14 +94,11 @@ else
|
|||||||
trigger_error('NO_LEAGUE');
|
trigger_error('NO_LEAGUE');
|
||||||
}
|
}
|
||||||
$user_rows = $db->sql_fetchrowset($result);
|
$user_rows = $db->sql_fetchrowset($result);
|
||||||
$export_file = $league_short . '_' . $season . '_bank.csv';
|
$db->sql_freeresult($result);
|
||||||
$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;
|
||||||
|
|
||||||
@@ -117,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 . ';' .
|
||||||
@@ -126,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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -49,14 +54,11 @@ else
|
|||||||
trigger_error('NO_SEASON');
|
trigger_error('NO_SEASON');
|
||||||
}
|
}
|
||||||
$user_rows = $db->sql_fetchrowset($result);
|
$user_rows = $db->sql_fetchrowset($result);
|
||||||
$export_file = $season. '_bank.csv';
|
$db->sql_freeresult($result);
|
||||||
$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;
|
||||||
@@ -64,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;
|
||||||
@@ -77,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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -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')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$vert = 9;
|
$vert = 9;
|
||||||
$start = 22;
|
$start = 22;
|
||||||
$end = 28;
|
$end = 28;
|
||||||
@@ -91,6 +96,10 @@ else
|
|||||||
$data_last_home = false;
|
$data_last_home = false;
|
||||||
$data_last_away = false;
|
$data_last_away = false;
|
||||||
$form_from = $matchday-5;
|
$form_from = $matchday-5;
|
||||||
|
$percent_home = 0;
|
||||||
|
$percent_draw = 0;
|
||||||
|
$percent_guest = 0;
|
||||||
|
$stat_hist = '';
|
||||||
$value_h = 0;
|
$value_h = 0;
|
||||||
$value_g = 0;
|
$value_g = 0;
|
||||||
$value_hg = 0;
|
$value_hg = 0;
|
||||||
@@ -115,7 +124,6 @@ else
|
|||||||
{
|
{
|
||||||
$logo[$home_id] = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ;
|
$logo[$home_id] = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -142,7 +150,6 @@ else
|
|||||||
{
|
{
|
||||||
$logo[$guest_id] = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ;
|
$logo[$guest_id] = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -245,7 +252,6 @@ else
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Statistic and forecast-points for historie
|
// Statistic and forecast-points for historie
|
||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
@@ -322,10 +328,6 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$stat_hist = '';
|
|
||||||
$percent_home = 0;
|
|
||||||
$percent_draw = 0;
|
|
||||||
$percent_guest = 0;
|
|
||||||
if (sizeof($row))
|
if (sizeof($row))
|
||||||
{
|
{
|
||||||
if ($history_count <= 2)
|
if ($history_count <= 2)
|
||||||
@@ -1003,7 +1005,6 @@ else
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
//last matches home hometeam
|
//last matches home hometeam
|
||||||
$sql = '(SELECT
|
$sql = '(SELECT
|
||||||
@@ -1074,7 +1075,6 @@ else
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
//last game guestteam
|
//last game guestteam
|
||||||
$sql = "(SELECT
|
$sql = "(SELECT
|
||||||
@@ -1158,7 +1158,6 @@ else
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
//last matches away guestteam
|
//last matches away guestteam
|
||||||
$sql = '(SELECT
|
$sql = '(SELECT
|
||||||
@@ -1226,7 +1225,6 @@ else
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
if ($history_count == 0 and !($data_home and $data_guest))
|
if ($history_count == 0 and !($data_home and $data_guest))
|
||||||
{
|
{
|
||||||
@@ -1266,7 +1264,7 @@ else
|
|||||||
$sql = 'UPDATE ' . FOOTB_MATCHES . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
$sql = 'UPDATE ' . FOOTB_MATCHES . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||||
WHERE season = $season AND league = $league AND match_no = $matchnumber";
|
WHERE season = $season AND league = $league AND match_no = $matchnumber";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
||||||
$forecast_value = 0;
|
$forecast_value = 0;
|
||||||
@@ -1349,4 +1347,3 @@ $template->set_filenames(array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
page_footer();
|
page_footer();
|
||||||
?>
|
|
||||||
148
block/last_results.php
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package phpBB Extension - Football Football
|
||||||
|
* @copyright (c) 2016 football (http://football.bplaced.net)
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_is_member = user_is_member($user->data['user_id'], $season, $league);
|
||||||
|
$edit_mode = false;
|
||||||
|
$display_group = false;
|
||||||
|
$display_ko = false;
|
||||||
|
$data_lastresults = false;
|
||||||
|
$curr_year = date("Y");
|
||||||
|
$matchnumber = 0;
|
||||||
|
$match_date = "";
|
||||||
|
|
||||||
|
$local_board_time = time() + ($config['football_time_shift'] * 3600);
|
||||||
|
$sql = 'SELECT * FROM ' . FOOTB_MATCHDAYS . " WHERE status = 0 AND delivery_date < FROM_UNIXTIME('$local_board_time')";
|
||||||
|
|
||||||
|
// Calculate matches AND results of matchday
|
||||||
|
$sql = "SELECT
|
||||||
|
m.season,
|
||||||
|
m.league,
|
||||||
|
m.matchday,
|
||||||
|
m.status,
|
||||||
|
m.match_datetime,
|
||||||
|
LEFT(m.match_datetime, 10) AS match_date,
|
||||||
|
l.league_name,
|
||||||
|
t1.team_symbol AS home_symbol,
|
||||||
|
t2.team_symbol AS guest_symbol,
|
||||||
|
t1.team_name AS home_name,
|
||||||
|
t2.team_name AS guest_name,
|
||||||
|
t1.team_name_short AS home_short,
|
||||||
|
t2.team_name_short AS guest_short,
|
||||||
|
m.goals_home,
|
||||||
|
m.goals_guest,
|
||||||
|
m.ko_match AS ko_match,
|
||||||
|
m.goals_overtime_home AS kogoals_home,
|
||||||
|
m.goals_overtime_guest AS kogoals_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
|
||||||
|
LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league)
|
||||||
|
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)
|
||||||
|
WHERE m.match_datetime < FROM_UNIXTIME('$local_board_time')
|
||||||
|
ORDER BY m.match_datetime DESC, m.league ASC
|
||||||
|
LIMIT 100";
|
||||||
|
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$ext_path = $this->phpbb_path_helper->update_web_root_path($this->phpbb_extension_manager->get_extension_path('football/football', true));
|
||||||
|
while($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$data_lastresults = true;
|
||||||
|
$matchnumber++ ;
|
||||||
|
$row_class = (!($matchnumber % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||||
|
|
||||||
|
if ($match_date <> $row['match_date'])
|
||||||
|
{
|
||||||
|
$match_date = ($match_date == "") ? $row['match_date'] : $match_date;
|
||||||
|
if ($matchnumber > $config['football_display_last_results'] )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$homelogo = $row['home_symbol'];
|
||||||
|
$homename = $row['home_name'];
|
||||||
|
$homeshort = $row['home_short'];
|
||||||
|
|
||||||
|
$guestlogo = $row['guest_symbol'];
|
||||||
|
$guestname = $row['guest_name'];
|
||||||
|
$guestshort = $row['guest_short'];
|
||||||
|
|
||||||
|
if ($homelogo <> '')
|
||||||
|
{
|
||||||
|
$logoH = "<img src=\"" . $ext_path . 'images/flags/' . $homelogo . "\" alt=\"" . $homelogo . "\" width=\"20\" height=\"20\"/>" ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$logoH = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"20\" height=\"20\"/>" ;
|
||||||
|
}
|
||||||
|
if ($guestlogo <> '')
|
||||||
|
{
|
||||||
|
$logoG = "<img src=\"" . $ext_path . 'images/flags/' . $guestlogo . "\" alt=\"" . $guestlogo . "\" width=\"20\" height=\"20\"/>" ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$logoG = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"20\" height=\"20\"/>" ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$goals_home = ($row['goals_home'] == '') ? '- ' : $row['goals_home'];
|
||||||
|
$goals_guest = ($row['goals_guest'] == '') ? ' -' : $row['goals_guest'];
|
||||||
|
$kogoals_home = ($row['kogoals_home'] == '') ? '- ' : $row['kogoals_home'];
|
||||||
|
$kogoals_guest = ($row['kogoals_guest'] == '') ? ' -' : $row['kogoals_guest'];
|
||||||
|
$colorstyle = color_style($row['status']);
|
||||||
|
|
||||||
|
$template->assign_block_vars('last_results', array(
|
||||||
|
'ROW_CLASS' => $row_class,
|
||||||
|
'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_TIME' => $row['match_time'],
|
||||||
|
'LEAGUE_NAME' => $row['league_name'],
|
||||||
|
'LOGO_HOME' => $logoH,
|
||||||
|
'LOGO_GUEST' => $logoG,
|
||||||
|
'HOME_NAME' => $homename,
|
||||||
|
'GUEST_NAME' => $guestname,
|
||||||
|
'HOME_SHORT' => $homeshort,
|
||||||
|
'GUEST_SHORT' => $guestshort,
|
||||||
|
'GOALS_HOME' => $goals_home,
|
||||||
|
'GOALS_GUEST' => $goals_guest,
|
||||||
|
'COLOR_STYLE' => color_style($row['status']),
|
||||||
|
'KOGOALS_HOME' => $kogoals_home,
|
||||||
|
'KOGOALS_GUEST' => $kogoals_guest,
|
||||||
|
'COLOR_STYLE' => $colorstyle,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$sidename = sprintf($user->lang['LAST_RESULTS']);
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_DISPLAY_LAST_RESULTS' => true,
|
||||||
|
'S_SIDENAME' => $sidename,
|
||||||
|
'S_DATA_LAST_RESULTS' => $data_lastresults,
|
||||||
|
'S_USER_IS_MEMBER' => $user_is_member,
|
||||||
|
)
|
||||||
|
);
|
||||||
@@ -13,7 +13,7 @@ if (!defined('IN_PHPBB'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$display_last_users = false;
|
$display_last_users = false;
|
||||||
// Last 5 users
|
// Last users
|
||||||
$sql = 'SELECT s.session_user_id
|
$sql = 'SELECT s.session_user_id
|
||||||
, u.username
|
, u.username
|
||||||
, u.user_colour
|
, u.user_colour
|
||||||
@@ -28,7 +28,7 @@ $sql = 'SELECT s.session_user_id
|
|||||||
GROUP BY u.user_id
|
GROUP BY u.user_id
|
||||||
ORDER BY lastvisit DESC';
|
ORDER BY lastvisit DESC';
|
||||||
|
|
||||||
$result = $db->sql_query_limit($sql, 5);
|
$result = $db->sql_query_limit($sql, $config['football_display_last_users']);
|
||||||
$first = true;
|
$first = true;
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
@@ -58,9 +58,7 @@ $db->sql_freeresult($result);
|
|||||||
|
|
||||||
// Assign specific vars
|
// Assign specific vars
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'LAST_USERS' => sprintf($user->lang['LAST_VISITORS'], 5),
|
'LAST_USERS' => sprintf($user->lang['LAST_VISITORS'], $config['football_display_last_users']),
|
||||||
'S_DISPLAY_LAST_USERS' => $display_last_users,
|
'S_DISPLAY_LAST_USERS' => $display_last_users,
|
||||||
'S_LAST_USERS' => true,
|
'S_LAST_USERS' => true,
|
||||||
));
|
));
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -314,19 +314,9 @@ $sidename = sprintf($user->lang['MY_BETS']);
|
|||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_MY_BETS' => true,
|
'S_DISPLAY_MY_BETS' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => ($config['football_bank']) ? $this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)) :
|
|
||||||
$this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => ($config['football_bank']) ? '< ' . sprintf($user->lang['FOOTBALL_BANK']) :
|
|
||||||
'< ' . sprintf($user->lang['RANK_TOTAL']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'my_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['MY_POINTS']) . ' >',
|
|
||||||
'LEFT_TITLE' => ($config['football_bank']) ? sprintf($user->lang['TITLE_FOOTBALL_BANK']) : sprintf($user->lang['TITLE_RANK_TOTAL']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_MY_POINTS']),
|
|
||||||
'S_DATA_MY_BETS' => $data,
|
'S_DATA_MY_BETS' => $data,
|
||||||
'SEASON' => $season,
|
'SEASON' => $season,
|
||||||
'LEAGUE' => $league,
|
'LEAGUE' => $league,
|
||||||
'USERNAME' => $username,
|
'USERNAME' => $username,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -22,20 +22,21 @@ $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);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
$total_users = sizeof($current_ranks);
|
$total_users = sizeof($current_ranks);
|
||||||
if ($total_users > 3 AND $total_users <= 50)
|
if ($total_users > 3 AND $total_users <= 50)
|
||||||
{
|
{
|
||||||
@@ -157,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
|
||||||
@@ -210,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
|
||||||
@@ -237,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
|
||||||
@@ -266,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
|
||||||
@@ -317,12 +318,6 @@ $sidename = sprintf($user->lang['MY_CHART']);
|
|||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_MY_CHART' => true,
|
'S_DISPLAY_MY_CHART' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'my_rank', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_RANK']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['MY_KOEFF']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_MY_RANKS']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_MY_KOEFF']),
|
|
||||||
'S_DATA_MY_CHART' => $data,
|
'S_DATA_MY_CHART' => $data,
|
||||||
'SEASON' => $season,
|
'SEASON' => $season,
|
||||||
'LEAGUE' => $league,
|
'LEAGUE' => $league,
|
||||||
@@ -336,4 +331,3 @@ $template->assign_vars(array(
|
|||||||
'USERNAME4' => $username4,
|
'USERNAME4' => $username4,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,6 @@ else
|
|||||||
$split_after = $count_matches;
|
$split_after = $count_matches;
|
||||||
$splits = 1;
|
$splits = 1;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Make sure $start is set to the last page if it exceeds the amount
|
// Make sure $start is set to the last page if it exceeds the amount
|
||||||
if ($start < 0 || $start >= $total_users)
|
if ($start < 0 || $start >= $total_users)
|
||||||
@@ -114,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);
|
||||||
|
|
||||||
@@ -192,7 +191,7 @@ foreach ($matches AS $match)
|
|||||||
$total = 0;
|
$total = 0;
|
||||||
}
|
}
|
||||||
$bet_index++;
|
$bet_index++;
|
||||||
$total += $user_bet['points'];
|
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||||
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
||||||
{
|
{
|
||||||
// hide bets
|
// hide bets
|
||||||
@@ -310,7 +309,7 @@ if ($count_matches > 0)
|
|||||||
$total = 0;
|
$total = 0;
|
||||||
}
|
}
|
||||||
$bet_index++;
|
$bet_index++;
|
||||||
$total += $user_bet['points'];
|
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||||
if ($user_bet['status'] < 1)
|
if ($user_bet['status'] < 1)
|
||||||
{
|
{
|
||||||
if ($user_bet['bet_home'] == '')
|
if ($user_bet['bet_home'] == '')
|
||||||
@@ -376,12 +375,6 @@ $sidename = sprintf($user->lang['MY_KOEFF']);
|
|||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_MY_KOEFF' => true,
|
'S_DISPLAY_MY_KOEFF' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'my_chart', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_CHART']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'stat_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['STAT_POINTS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_MY_CHART']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_STAT_POINTS']),
|
|
||||||
'S_MATCHES_ON_MATCHDAY' => $matches_on_matchday,
|
'S_MATCHES_ON_MATCHDAY' => $matches_on_matchday,
|
||||||
'S_SPALTEN' => ($count_matches * 2) + 2,
|
'S_SPALTEN' => ($count_matches * 2) + 2,
|
||||||
'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),
|
||||||
@@ -389,5 +382,3 @@ $template->assign_vars(array(
|
|||||||
'USERNAME' => $username,
|
'USERNAME' => $username,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -189,16 +189,9 @@ $sidename = sprintf($user->lang['MY_POINTS']);
|
|||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_MY_POINTS' => true,
|
'S_DISPLAY_MY_POINTS' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_BETS']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'my_table', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['MY_TABLE']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_MY_BETS']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_MY_TABLE']),
|
|
||||||
'S_DATA_MY_POINTS' => $data,
|
'S_DATA_MY_POINTS' => $data,
|
||||||
'SEASON' => $season,
|
'SEASON' => $season,
|
||||||
'LEAGUE' => $league,
|
'LEAGUE' => $league,
|
||||||
'USERNAME' => $username,
|
'USERNAME' => $username,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -163,17 +163,9 @@ $template->assign_vars(array(
|
|||||||
'S_DISPLAY_MY_RANK' => true,
|
'S_DISPLAY_MY_RANK' => true,
|
||||||
'S_MATCHDAY_HIDE' => true,
|
'S_MATCHDAY_HIDE' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'my_table', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_TABLE']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'my_chart', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['MY_CHART']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_MY_TABLE']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_MY_CHART']),
|
|
||||||
'S_DATA_MY_RANK' => $data,
|
'S_DATA_MY_RANK' => $data,
|
||||||
'SEASON' => $season,
|
'SEASON' => $season,
|
||||||
'LEAGUE' => $league,
|
'LEAGUE' => $league,
|
||||||
'USERNAME' => $username,
|
'USERNAME' => $username,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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";
|
||||||
|
|
||||||
@@ -413,14 +417,6 @@ $sidename = sprintf($user->lang['MY_TABLE']);
|
|||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_MY_TABLE' => true,
|
'S_DISPLAY_MY_TABLE' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'my_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_TABLE']),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_POINTS']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'my_rank', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_TABLE']),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['MY_RANK']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_MY_POINTS']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_MY_RANKS']),
|
|
||||||
'S_DATA_MY_TABLE' => $data_table,
|
'S_DATA_MY_TABLE' => $data_table,
|
||||||
'S_DATA_FORM' => $data_form,
|
'S_DATA_FORM' => $data_form,
|
||||||
'SEASON' => $season,
|
'SEASON' => $season,
|
||||||
@@ -430,5 +426,3 @@ $template->assign_vars(array(
|
|||||||
'USERNAME' => $username,
|
'USERNAME' => $username,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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,13 +52,15 @@ $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_TEAMS . " AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest)
|
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)
|
||||||
WHERE m.season = $season
|
LEFT JOIN " . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home)
|
||||||
AND m.league = $league
|
LEFT JOIN ' . FOOTB_TEAMS . " AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest)
|
||||||
AND m.matchday = $matchday
|
WHERE m.season = $season
|
||||||
ORDER BY m.match_datetime ASC, m.match_no ASC";
|
AND m.league = $league
|
||||||
|
AND m.matchday = $matchday
|
||||||
|
ORDER BY m.match_datetime ASC, m.match_no ASC";
|
||||||
|
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$rows = $db->sql_fetchrowset($result);
|
$rows = $db->sql_fetchrowset($result);
|
||||||
@@ -137,6 +143,8 @@ foreach ($rows as $row)
|
|||||||
$goals_guest = ($row['goals_guest'] == '') ? ' ' : $row['goals_guest'];
|
$goals_guest = ($row['goals_guest'] == '') ? ' ' : $row['goals_guest'];
|
||||||
$kogoals_home = ($row['kogoals_home'] == '') ? ' ' : $row['kogoals_home'];
|
$kogoals_home = ($row['kogoals_home'] == '') ? ' ' : $row['kogoals_home'];
|
||||||
$kogoals_guest = ($row['kogoals_guest'] == '') ? ' ' : $row['kogoals_guest'];
|
$kogoals_guest = ($row['kogoals_guest'] == '') ? ' ' : $row['kogoals_guest'];
|
||||||
|
$bet_home = ($row['bet_home'] == '') ? ' ' : $row['bet_home'];
|
||||||
|
$bet_guest = ($row['bet_guest'] == '') ? ' ' : $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,
|
||||||
@@ -198,14 +209,6 @@ $template->assign_vars(array(
|
|||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'RESULT_EXPLAIN' => $result_explain,
|
'RESULT_EXPLAIN' => $result_explain,
|
||||||
'LABEL_FINALRESULT' => $label_finalresult,
|
'LABEL_FINALRESULT' => $label_finalresult,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['BET']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'table', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['TABLE']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_BET']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_TABLE']),
|
|
||||||
'S_DATA_ODDS' => $data_odds,
|
'S_DATA_ODDS' => $data_odds,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -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)
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -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;
|
||||||
@@ -159,7 +159,6 @@ while($row = $db->sql_fetchrow($result))
|
|||||||
if ($rankof[$row['user_id']] == '')
|
if ($rankof[$row['user_id']] == '')
|
||||||
{
|
{
|
||||||
$change_sign = '';
|
$change_sign = '';
|
||||||
$change_img = '';
|
|
||||||
$change_differ = ' ';
|
$change_differ = ' ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -167,22 +166,19 @@ 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 = '=';
|
||||||
$change_img = "<img src=\"" . $ext_path . "images/no_change.gif\" alt=\"" . $user->lang['NO_CHANGES'] . "\"/>";
|
|
||||||
$change_differ = ' ';
|
$change_differ = ' ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($rankof[$row['user_id']] > $prevrankof[$row['user_id']])
|
if ($rankof[$row['user_id']] > $prevrankof[$row['user_id']])
|
||||||
{
|
{
|
||||||
$change_sign = '+';
|
$change_sign = '-';
|
||||||
$change_img = "<img src=\"" . $ext_path . "images/arrow_down.gif\" alt=\"" . $user->lang['WORSENED'] . "\"/>";
|
$differ = $prevrankof[$row['user_id']] - $rankof[$row['user_id']];
|
||||||
$differ = $rankof[$row['user_id']] - $prevrankof[$row['user_id']];
|
|
||||||
$change_differ = ' (' . $differ . ')';
|
$change_differ = ' (' . $differ . ')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$change_sign = '-';
|
$change_sign = '+';
|
||||||
$change_img = "<img src=\"" . $ext_path . "images/arrow_up.gif\" alt=\"" . $user->lang['IMPROVED'] . "\"/>";
|
|
||||||
$differ = $prevrankof[$row['user_id']] - $rankof[$row['user_id']];
|
$differ = $prevrankof[$row['user_id']] - $rankof[$row['user_id']];
|
||||||
$change_differ = ' (' . $differ . ')';
|
$change_differ = ' (' . $differ . ')';
|
||||||
}
|
}
|
||||||
@@ -192,7 +188,6 @@ while($row = $db->sql_fetchrow($result))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$change_sign = '';
|
$change_sign = '';
|
||||||
$change_img = '';
|
|
||||||
$change_differ = ' ';
|
$change_differ = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,8 +223,10 @@ while($row = $db->sql_fetchrow($result))
|
|||||||
$template->assign_block_vars('rankstotal', array(
|
$template->assign_block_vars('rankstotal', array(
|
||||||
'ROW_CLASS' => $row_class,
|
'ROW_CLASS' => $row_class,
|
||||||
'RANK' => $rankof[$row['user_id']],
|
'RANK' => $rankof[$row['user_id']],
|
||||||
|
'NO_CHANGES' => ($change_sign == '=') ? true : false,
|
||||||
|
'WORSENED' => ($change_sign == '+') ? true : false,
|
||||||
|
'IMPROVED' => ($change_sign == '-') ? true : false,
|
||||||
'CHANGE_SIGN' => $change_sign,
|
'CHANGE_SIGN' => $change_sign,
|
||||||
'CHANGE_IMG' => $change_img,
|
|
||||||
'CHANGE_DIFFER' => $change_differ,
|
'CHANGE_DIFFER' => $change_differ,
|
||||||
'USERID' => $row['user_id'],
|
'USERID' => $row['user_id'],
|
||||||
'USERNAME' => $row['username'],
|
'USERNAME' => $row['username'],
|
||||||
@@ -254,17 +251,9 @@ $template->assign_vars(array(
|
|||||||
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'S_WIN' => ($league_info['win_matchday'] == '0') ? false : true,
|
'S_WIN' => ($league_info['win_matchday'] == '0') ? false : true,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'table', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['TABLE']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['RANK_TOTAL']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_TABLE']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_RANK_TOTAL']),
|
|
||||||
'S_DATA_RANKS' => $data_ranks,
|
'S_DATA_RANKS' => $data_ranks,
|
||||||
'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),
|
||||||
'WIN_NAME' => $config['football_win_name'],
|
'WIN_NAME' => $config['football_win_name'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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);
|
||||||
|
|
||||||
@@ -157,7 +157,6 @@ switch ($mode)
|
|||||||
}
|
}
|
||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$sidename = sprintf($user->lang['RANK_TOTAL']);
|
$sidename = sprintf($user->lang['RANK_TOTAL']);
|
||||||
$league_info = league_info($season, $league);
|
$league_info = league_info($season, $league);
|
||||||
@@ -166,22 +165,15 @@ switch ($mode)
|
|||||||
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
||||||
'S_DATA_RANKS' => $data_ranks,
|
'S_DATA_RANKS' => $data_ranks,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['RANK_MATCHDAY']),
|
|
||||||
'U_RIGHT' => ($config['football_bank']) ? $this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)) :
|
|
||||||
$this->helper->route('football_main_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => ($config['football_bank']) ? sprintf($user->lang['FOOTBALL_BANK']) . ' >' : sprintf($user->lang['MY_BETS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_RANK_MATCHDAY']),
|
|
||||||
'RIGHT_TITLE' => ($config['football_bank']) ? sprintf($user->lang['TITLE_FOOTBALL_BANK']) : sprintf($user->lang['TITLE_MY_BETS']),
|
|
||||||
'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' => false,
|
'S_WIN' => 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_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;
|
||||||
@@ -235,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);
|
||||||
|
|
||||||
@@ -283,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);
|
||||||
|
|
||||||
@@ -328,7 +320,6 @@ switch ($mode)
|
|||||||
}
|
}
|
||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$sidename = sprintf($user->lang['RANK_TOTAL']);
|
$sidename = sprintf($user->lang['RANK_TOTAL']);
|
||||||
$league_info = league_info($season, $league);
|
$league_info = league_info($season, $league);
|
||||||
@@ -337,21 +328,14 @@ switch ($mode)
|
|||||||
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
||||||
'S_DATA_RANKS' => $data_ranks,
|
'S_DATA_RANKS' => $data_ranks,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['RANK_MATCHDAY']),
|
|
||||||
'U_RIGHT' => ($config['football_bank']) ? $this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)) :
|
|
||||||
$this->helper->route('football_main_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => ($config['football_bank']) ? sprintf($user->lang['FOOTBALL_BANK']) . ' >' : sprintf($user->lang['MY_BETS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_RANK_MATCHDAY']),
|
|
||||||
'RIGHT_TITLE' => ($config['football_bank']) ? sprintf($user->lang['TITLE_FOOTBALL_BANK']) : sprintf($user->lang['TITLE_MY_BETS']),
|
|
||||||
'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' => '',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -385,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);
|
||||||
@@ -439,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);
|
||||||
@@ -463,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'])
|
||||||
{
|
{
|
||||||
@@ -492,7 +476,6 @@ switch ($mode)
|
|||||||
if ($rank == $prev_rank_of[$curr_rank['user_id']])
|
if ($rank == $prev_rank_of[$curr_rank['user_id']])
|
||||||
{
|
{
|
||||||
$change_sign = '=';
|
$change_sign = '=';
|
||||||
$change_img = "<img src=\"" . $ext_path . "images/no_change.gif\" alt=\"" . $user->lang['NO_CHANGES'] . "\"/>";
|
|
||||||
$change_differ = '';
|
$change_differ = '';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -500,14 +483,12 @@ switch ($mode)
|
|||||||
if ($rank > $prev_rank_of[$curr_rank['user_id']])
|
if ($rank > $prev_rank_of[$curr_rank['user_id']])
|
||||||
{
|
{
|
||||||
$change_sign = '+';
|
$change_sign = '+';
|
||||||
$change_img = "<img src=\"" . $ext_path . "images/arrow_down.gif\" alt=\"" . $user->lang['WORSENED'] . "\"/>";
|
|
||||||
$differ = $rank - $prev_rank_of[$curr_rank['user_id']];
|
$differ = $rank - $prev_rank_of[$curr_rank['user_id']];
|
||||||
$change_differ = ' (' . $differ . ')';
|
$change_differ = ' (' . $differ . ')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$change_sign = '-';
|
$change_sign = '-';
|
||||||
$change_img = "<img src=\"" . $ext_path . "images/arrow_up.gif\" alt=\"" . $user->lang['IMPROVED'] . "\"/>";
|
|
||||||
$differ = $prev_rank_of[$curr_rank['user_id']] - $rank;
|
$differ = $prev_rank_of[$curr_rank['user_id']] - $rank;
|
||||||
$change_differ = ' (' . $differ . ')';
|
$change_differ = ' (' . $differ . ')';
|
||||||
}
|
}
|
||||||
@@ -516,7 +497,6 @@ switch ($mode)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$change_sign = '';
|
$change_sign = '';
|
||||||
$change_img = '';
|
|
||||||
$change_differ = '';
|
$change_differ = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,8 +519,10 @@ switch ($mode)
|
|||||||
$template->assign_block_vars('rankstotal', array(
|
$template->assign_block_vars('rankstotal', array(
|
||||||
'ROW_CLASS' => $row_class,
|
'ROW_CLASS' => $row_class,
|
||||||
'RANK' => $rank,
|
'RANK' => $rank,
|
||||||
|
'NO_CHANGES' => ($change_sign == '=') ? true : false,
|
||||||
|
'WORSENED' => ($change_sign == '+') ? true : false,
|
||||||
|
'IMPROVED' => ($change_sign == '-') ? true : false,
|
||||||
'CHANGE_SIGN' => $change_sign,
|
'CHANGE_SIGN' => $change_sign,
|
||||||
'CHANGE_IMG' => $change_img,
|
|
||||||
'CHANGE_DIFFER' => $change_differ,
|
'CHANGE_DIFFER' => $change_differ,
|
||||||
'USERID' => $curr_rank['user_id'],
|
'USERID' => $curr_rank['user_id'],
|
||||||
'USERNAME' => $curr_rank['username'],
|
'USERNAME' => $curr_rank['username'],
|
||||||
@@ -558,7 +540,6 @@ switch ($mode)
|
|||||||
}
|
}
|
||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$sidename = sprintf($user->lang['RANK_TOTAL']);
|
$sidename = sprintf($user->lang['RANK_TOTAL']);
|
||||||
$league_info = league_info($season, $league);
|
$league_info = league_info($season, $league);
|
||||||
@@ -567,21 +548,14 @@ switch ($mode)
|
|||||||
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
'S_DISPLAY_HITS02' => $config['football_win_hits02'],
|
||||||
'S_DATA_RANKS' => $data_ranks,
|
'S_DATA_RANKS' => $data_ranks,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['RANK_MATCHDAY']),
|
|
||||||
'U_RIGHT' => ($config['football_bank']) ? $this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)) :
|
|
||||||
$this->helper->route('football_main_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => ($config['football_bank']) ? sprintf($user->lang['FOOTBALL_BANK']) . ' >' : sprintf($user->lang['MY_BETS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_RANK_MATCHDAY']),
|
|
||||||
'RIGHT_TITLE' => ($config['football_bank']) ? sprintf($user->lang['TITLE_FOOTBALL_BANK']) : sprintf($user->lang['TITLE_MY_BETS']),
|
|
||||||
'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 : true,
|
'S_WIN' => ($league_info['win_matchday'] == '0' and $league_info['win_season'] == '0') ? false : true,
|
||||||
'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;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -387,8 +387,8 @@ while ($row = $db->sql_fetchrow($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:
|
||||||
@@ -408,20 +408,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,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
'S_FORM_ACTION_RESULT' => $this->helper->route('football_football_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'result')),
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['ALL_BETS']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'table', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['TABLE']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_ALL_BETS']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_TABLE']),
|
|
||||||
'S_FORM_ACTION_RESULT' => $this->helper->route('football_main_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,
|
||||||
@@ -429,5 +437,3 @@ $template->assign_vars(array(
|
|||||||
'S_EDIT_MODE' => $edit_mode,
|
'S_EDIT_MODE' => $edit_mode,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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();
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -112,11 +112,11 @@ else
|
|||||||
$row_class = (!($rank % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
$row_class = (!($rank % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||||
if ($row['team_symbol'] <> '')
|
if ($row['team_symbol'] <> '')
|
||||||
{
|
{
|
||||||
$logo = "<img src=\"" . $ext_path . 'images/flags/' . $row['team_symbol'] . "\" alt=\"" . $row['team_symbol'] . "\" width=\"28\" height=\"28\"/>" ;
|
$logo = "<img src=\"" . $ext_path . 'images/flags/' . $row['team_symbol'] . "\" alt=\"" . $row['team_symbol'] . "\" width=\"20\" height=\"20\"/>" ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$logo = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ;
|
$logo = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"20\" height=\"20\"/>" ;
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('side_total', array(
|
$template->assign_block_vars('side_total', array(
|
||||||
@@ -142,4 +142,3 @@ else
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -154,17 +154,9 @@ $template->assign_vars(array(
|
|||||||
'S_MATCHDAY_HIDE' => true,
|
'S_MATCHDAY_HIDE' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'S_WIN' => ($league_info['win_matchday'] == '0') ? false : true,
|
'S_WIN' => ($league_info['win_matchday'] == '0') ? false : true,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['MY_KOEFF']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'stat_results', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['STAT_RESULTS']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_MY_KOEFF']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_STAT_RESULTS']),
|
|
||||||
'S_DATA_STAT_POINTS' => $data,
|
'S_DATA_STAT_POINTS' => $data,
|
||||||
'S_DATA_ALL_POINTS' => $data_all,
|
'S_DATA_ALL_POINTS' => $data_all,
|
||||||
'SEASON' => $season,
|
'SEASON' => $season,
|
||||||
'LEAGUE' => $league,
|
'LEAGUE' => $league,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -131,16 +131,8 @@ $sidename = sprintf($user->lang['STAT_RESULTS']);
|
|||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_STAT_RESULTS' => true,
|
'S_DISPLAY_STAT_RESULTS' => true,
|
||||||
'S_SIDENAME' => $sidename,
|
'S_SIDENAME' => $sidename,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'stat_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['STAT_POINTS']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['BET']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_STAT_POINTS']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_BET']),
|
|
||||||
'S_DATA_STAT_RESULTS' => $data,
|
'S_DATA_STAT_RESULTS' => $data,
|
||||||
'SEASON' => $season,
|
'SEASON' => $season,
|
||||||
'LEAGUE' => $league,
|
'LEAGUE' => $league,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
124
block/table.php
@@ -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";
|
||||||
|
|
||||||
@@ -241,8 +256,9 @@ while($row = $db->sql_fetchrow($result))
|
|||||||
'LOST' => $row['lost'],
|
'LOST' => $row['lost'],
|
||||||
'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";
|
||||||
|
|
||||||
@@ -329,8 +351,9 @@ while($row = $db->sql_fetchrow($result))
|
|||||||
'LOST' => $row['lost'],
|
'LOST' => $row['lost'],
|
||||||
'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";
|
||||||
|
|
||||||
@@ -417,30 +446,37 @@ while($row = $db->sql_fetchrow($result))
|
|||||||
'LOST' => $row['lost'],
|
'LOST' => $row['lost'],
|
||||||
'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,
|
||||||
'U_LEFT' => $this->helper->route('football_main_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'LEFT_LINK' => '< ' . sprintf($user->lang['RESULTS']),
|
|
||||||
'U_RIGHT' => $this->helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)),
|
|
||||||
'RIGHT_LINK' => sprintf($user->lang['RANK_MATCHDAY']) . ' >',
|
|
||||||
'LEFT_TITLE' => sprintf($user->lang['TITLE_RESULTS']),
|
|
||||||
'RIGHT_TITLE' => sprintf($user->lang['TITLE_RANK_MATCHDAY']),
|
|
||||||
'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,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -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();
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,29 +1,30 @@
|
|||||||
{
|
{
|
||||||
"name": "football/football",
|
"name" : "football/football",
|
||||||
"type": "phpbb-extension",
|
"type" : "phpbb-extension",
|
||||||
"description": "Football Prediction League for phpBB 3.1",
|
"description" : "Football Prediction League",
|
||||||
"homepage": "http://football.bplaced.net",
|
"homepage" : "http://football.bplaced.net",
|
||||||
"version": "0.9.6",
|
"version" : "0.9.9",
|
||||||
"time": "2016-05-29",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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 }
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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?
|
||||||
|
|||||||
@@ -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?
|
||||||
@@ -308,8 +307,8 @@ class main
|
|||||||
$user_id = $user->data['user_id'];
|
$user_id = $user->data['user_id'];
|
||||||
$sql = 'SELECT * FROM ' . FOOTB_MATCHES . " WHERE season = $season AND league = $league AND matchday = $matchday AND status <= 0";
|
$sql = 'SELECT * FROM ' . FOOTB_MATCHES . " WHERE season = $season AND league = $league AND matchday = $matchday AND status <= 0";
|
||||||
$resultopen = $db->sql_query($sql);
|
$resultopen = $db->sql_query($sql);
|
||||||
|
|
||||||
$rows = $db->sql_fetchrowset($resultopen);
|
$rows = $db->sql_fetchrowset($resultopen);
|
||||||
|
$db->sql_freeresult($resultopen);
|
||||||
|
|
||||||
$count_matches = 0;
|
$count_matches = 0;
|
||||||
$count_updates = 0;
|
$count_updates = 0;
|
||||||
@@ -419,7 +418,6 @@ class main
|
|||||||
{
|
{
|
||||||
$dbmsg = sprintf($user->lang['NO_BETS_SAVED']);
|
$dbmsg = sprintf($user->lang['NO_BETS_SAVED']);
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($resultopen);
|
|
||||||
|
|
||||||
// extra bets
|
// extra bets
|
||||||
$sql = 'SELECT * FROM ' . FOOTB_EXTRA . " WHERE season = $season AND league = $league AND matchday = $matchday AND extra_status <= 0";
|
$sql = 'SELECT * FROM ' . FOOTB_EXTRA . " WHERE season = $season AND league = $league AND matchday = $matchday AND extra_status <= 0";
|
||||||
@@ -479,6 +477,7 @@ class main
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($resultextra);
|
||||||
if ($count_extra_updates)
|
if ($count_extra_updates)
|
||||||
{
|
{
|
||||||
$dbmsg = $dbmsg . ' ' . sprintf($user->lang['EXTRA_BET' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
$dbmsg = $dbmsg . ' ' . sprintf($user->lang['EXTRA_BET' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
||||||
@@ -725,12 +724,16 @@ class main
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($resultextra);
|
||||||
if ($count_extra_updates)
|
if ($count_extra_updates)
|
||||||
{
|
{
|
||||||
$dbmsg = $dbmsg . ' ' . sprintf($user->lang['EXTRA_RESULT' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
$dbmsg = $dbmsg . ' ' . sprintf($user->lang['EXTRA_RESULT' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
||||||
}
|
}
|
||||||
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']);
|
||||||
@@ -749,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);
|
||||||
@@ -781,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'];
|
||||||
@@ -823,7 +855,7 @@ class main
|
|||||||
$league_type = $row['league_type'];
|
$league_type = $row['league_type'];
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
$lang_dates = $user->lang['datetime'];
|
$lang_dates = $user->lang['datetime'];
|
||||||
$local_board_time = time() + (($config['board_timezone'] - $config['football_host_timezone']) * 3600);
|
$local_board_time = time() + ($config['football_time_shift'] * 3600);
|
||||||
$sql = "SELECT *,
|
$sql = "SELECT *,
|
||||||
CONCAT(
|
CONCAT(
|
||||||
CASE DATE_FORMAT(delivery_date,'%w')
|
CASE DATE_FORMAT(delivery_date,'%w')
|
||||||
@@ -904,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
|
||||||
{
|
{
|
||||||
@@ -914,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,
|
||||||
@@ -944,9 +976,9 @@ class main
|
|||||||
$print_start = ($start) ? "start=$start&" : '';
|
$print_start = ($start) ? "start=$start&" : '';
|
||||||
|
|
||||||
$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,
|
||||||
@@ -965,20 +997,21 @@ 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,
|
||||||
'S_NEXT_DEADLINE' => $next_deadline,
|
'S_NEXT_DEADLINE' => $next_deadline,
|
||||||
'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
|
||||||
@@ -988,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);
|
||||||
@@ -1000,7 +1037,14 @@ class main
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mobile = '';
|
$mobile = '';
|
||||||
include($this->football_root_path . 'block/last_users.' . $this->php_ext);
|
if ($config['football_display_last_users'] > 0)
|
||||||
|
{
|
||||||
|
include($this->football_root_path . 'block/last_users.' . $this->php_ext);
|
||||||
|
}
|
||||||
|
if ($config['football_display_last_results'] > 0)
|
||||||
|
{
|
||||||
|
include($this->football_root_path . 'block/last_results.' . $this->php_ext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Send data to the template file
|
// Send data to the template file
|
||||||
if ($view == 'print')
|
if ($view == 'print')
|
||||||
|
|||||||
@@ -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?
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -73,6 +73,7 @@ class football_remember extends \phpbb\cron\task\base
|
|||||||
include($ext_path . 'includes/constants.' . $this->php_ext);
|
include($ext_path . 'includes/constants.' . $this->php_ext);
|
||||||
|
|
||||||
// Load extension language file
|
// Load extension language file
|
||||||
|
$this->user->setup();
|
||||||
$this->user->add_lang_ext('football/football', 'info_acp_football');
|
$this->user->add_lang_ext('football/football', 'info_acp_football');
|
||||||
|
|
||||||
// mode=test ?
|
// mode=test ?
|
||||||
@@ -104,13 +105,14 @@ class football_remember extends \phpbb\cron\task\base
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT
|
$sql = 'SELECT
|
||||||
m.*,
|
m.*,
|
||||||
l.*
|
l.*
|
||||||
FROM ' . FOOTB_MATCHDAYS . ' AS m
|
FROM ' . FOOTB_MATCHDAYS . ' AS m
|
||||||
LEFT JOIN ' . FOOTB_LEAGUES . " AS l ON (l.season = m.season AND l.league = m.league)
|
LEFT JOIN ' . FOOTB_LEAGUES . " AS l ON (l.season = m.season AND l.league = m.league)
|
||||||
WHERE m.season >= $season AND m.status = 0
|
WHERE m.season >= $season AND m.status = 0
|
||||||
AND (DATE_SUB(m.delivery_date, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time'))
|
AND (DATE_SUB(m.delivery_date, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time'))
|
||||||
AND (DATE_SUB(m.delivery_date, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time'))";
|
AND (DATE_SUB(m.delivery_date, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time'))
|
||||||
|
GROUP BY m.season, m.league, m.matchday";
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
$toclose = $this->db->sql_fetchrowset($result);
|
$toclose = $this->db->sql_fetchrowset($result);
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
@@ -331,4 +333,3 @@ class football_remember extends \phpbb\cron\task\base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Before Width: | Height: | Size: 187 B |
|
Before Width: | Height: | Size: 188 B |
BIN
images/flags/1. FC Gera.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
images/flags/1. FC Heidenheim 1846.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
images/flags/1. FC Kaiserslautern.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
images/flags/1. FC Koeln.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
images/flags/1. FC Magdeburg.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
images/flags/1. FC Neubrandenburg 04.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
images/flags/1. FC Normannia Schwaebisch Gmuend.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
images/flags/1. FC Nuernberg.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
images/flags/1. FC Saarbruecken.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
images/flags/1. FC Schweinfurt 05.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
images/flags/1. FC Union Berlin.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/flags/1. FSV Mainz 05.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/flags/AC Florenz.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
images/flags/AC Mailand.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
images/flags/AEK Athen.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
images/flags/AEK Larnaka.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
images/flags/AEL Limassol.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
images/flags/AFC Sunderland.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
images/flags/AIK Solna.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
images/flags/APOEL Nikosia.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
images/flags/AS Monaco.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
images/flags/AS Rom.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
images/flags/AS St. Etienne.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
images/flags/ASV Bergedorf 85.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
images/flags/ASV Durlach.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
images/flags/AZ Alkmaar.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
images/flags/Aalborg BK.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
images/flags/Aalesunds FK.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
images/flags/Academica Coimbra.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
images/flags/Afghanistan.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
images/flags/Ajax Amsterdam.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
images/flags/Alania Wladikawkas.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
images/flags/Albania.png
Normal file
|
After Width: | Height: | Size: 594 B |
BIN
images/flags/Alemannia Aachen.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
images/flags/Algeria.png
Normal file
|
After Width: | Height: | Size: 345 B |