7 Commits

Author SHA1 Message Date
football
7d8b92f1df Version 0.9.9 2017-09-09 13:51:15 +02:00
football
c075143bfc Version 0.9.9b1
-replace icons with font awesome icons
-display icons on tabs and hide it on mobile access
-new block last results
-new config values for last users, last results
-replace config value football_host_timezone with football_time_shift
-fixed errors on php 7
-remove unnecessary sql_freeresult calls
-fixed non-numeric value errors
2017-09-09 10:58:32 +02:00
football
a502b5d082 Fix problem in admin-help-section on phpBB3.2 (no help is shown):
[phpBB Debug] PHP Warning: in file [ROOT]/ext/football/football/acp/football_module.php on line 80: Invalid argument supplied for foreach()
2017-03-05 18:04:34 +01:00
football
a16e0e3c79 Version 0.9.8 2017-02-19 20:25:32 +01:00
football
09631cbe15 Version 0.9.7 2016-06-12 17:20:16 +02:00
football
4734d75718 Version 0.9.7 2016-06-12 16:40:06 +02:00
football
caeec03da8 Version 0.9.6 2016-05-29 15:51:04 +02:00
100 changed files with 19328 additions and 18865 deletions

24
.gitignore vendored
View File

@@ -39,3 +39,27 @@ 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

View File

@@ -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';
@@ -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';
@@ -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';
@@ -575,7 +572,9 @@ class all_bets_module
) )
); );
} }
$db->sql_freeresult($result_bet);
} }
$db->sql_freeresult($result);
$legend = delivery($season, $league, $matchday); $legend = delivery($season, $league, $matchday);

View File

@@ -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'])
{ {
@@ -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 . '&amp;action=list&amp;s=' . $season . '&amp;l=' . $league . '&amp;t=' . $type . '&amp;start=' . $start; $back_link = $this->u_action . '&amp;action=list&amp;s=' . $season . '&amp;l=' . $league . '&amp;t=' . $type . '&amp;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));

View File

@@ -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'))
@@ -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);
@@ -584,6 +583,7 @@ class bets_module
) )
); );
} }
$db->sql_freeresult($resultopen);
// Calculate extra bets of matchday // Calculate extra bets of matchday
// Start select team // Start select team

View File

@@ -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';
@@ -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++)
{ {

View File

@@ -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');
@@ -79,7 +77,7 @@ class football_module
)); ));
// 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),
@@ -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,18 @@ 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;
}
} }
?> ?>

View File

@@ -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';

View File

@@ -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';
@@ -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 . "&amp;action=list&amp;s=$season&amp;l=$league"), E_USER_WARNING); trigger_error($user->lang['NO_MEMBERS_SELECTED'] . adm_back_link($this->u_action . "&amp;action=list&amp;s=$season&amp;l=$league"), E_USER_WARNING);
} }

View File

@@ -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';
@@ -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

View File

@@ -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';
@@ -415,7 +413,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 +627,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 . "&amp;s=$season&amp;l=$league&amp;m=$matchday"; $u_back = $this->u_action . "&amp;s=$season&amp;l=$league&amp;m=$matchday";
$template->assign_vars(array( $template->assign_vars(array(

View File

@@ -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
@@ -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 . "&amp;s=$season&amp;l=$league"), E_USER_WARNING); trigger_error(sprintf($user->lang['NO_MATCHDAY'], $league_info['league_name'], $season) . adm_back_link($this->u_action . "&amp;s=$season&amp;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);
@@ -770,6 +769,7 @@ class results_module
); );
} }
} }
$db->sql_freeresult($result);
switch ($league_info['bet_ko_type']) switch ($league_info['bet_ko_type'])
{ {

View File

@@ -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';

View File

@@ -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'))

View File

@@ -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'))
@@ -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))
{ {
@@ -512,9 +510,9 @@ class update_module
$league_info = league_info($season, $league); $league_info = league_info($season, $league);
if ($league_info['bet_in_time']) if ($league_info['bet_in_time'])
{ {
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, delivery_date, matchday_name, matches) $sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . " (season, league, matchday, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
SELECT m.season, m.league, m.matchday, min(m.match_datetime) AS delivery_date, md.matchday_name, md.matches SELECT m.season, m.league, m.matchday, min(m.match_datetime) AS delivery_date, '' AS delivery_date_2, '' AS delivery_date_3, md.matchday_name, md.matches
FROM ' . FOOTB_MATCHES . ' AS m FROM " . FOOTB_MATCHES . ' AS m
JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league) JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league)
JOIN ' . FOOTB_MATCHDAYS . " AS md ON (md.season = m.season AND md.league = m.league AND md.matchday = m.matchday) JOIN ' . FOOTB_MATCHDAYS . " AS md ON (md.season = m.season AND md.league = m.league AND md.matchday = m.matchday)
WHERE m.season = $season WHERE m.season = $season
@@ -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,8 +667,8 @@ 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 = "UPDATE phpbb_footb_matchdays AS target $sql = $sql = 'UPDATE ' . FOOTB_MATCHDAYS . " AS target
INNER JOIN INNER JOIN
( (
SELECT md.season SELECT md.season
@@ -1386,6 +1387,7 @@ class update_module
} }
} }
} }
$db->sql_freeresult($result);
return $count_updates; return $count_updates;
} }

View File

@@ -72,6 +72,7 @@
<th style="text-align:right">{L_GOALS_HOME}</th> <th style="text-align:right">{L_GOALS_HOME}</th>
<th></th> <th></th>
<th>{L_GOALS_GUEST}</th> <th>{L_GOALS_GUEST}</th>
<th>{L_BET_TIME}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -92,6 +93,7 @@
<td class="td_vs">:</td> <td class="td_vs">:</td>
<td class="td_goals_guest"><input style="margin:0; width:30px;" type="number" <td class="td_goals_guest"><input style="margin:0; width:30px;" type="number"
name="goalsg{bet_edit.MATCH_NUMBER}" min="0" max="20" size="2" value="{bet_edit.BET_GUEST}" /></td> name="goalsg{bet_edit.MATCH_NUMBER}" min="0" max="20" size="2" value="{bet_edit.BET_GUEST}" /></td>
<td>{bet_edit.BET_TIME}</td>
</tr> </tr>
<!-- END bet_edit --> <!-- END bet_edit -->
</tbody> </tbody>

View File

@@ -78,7 +78,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)
@@ -183,7 +182,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'] < 3) if ($user_bet['status'] < 3)
{ {
$colorstyle_total = ' color_provisionally'; $colorstyle_total = ' color_provisionally';
@@ -306,7 +305,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'] < 3) if ($user_bet['status'] < 3)
{ {
$colorstyle_total = ' color_provisionally'; $colorstyle_total = ' color_provisionally';
@@ -479,19 +478,14 @@ 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' => '&lt; ' . 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']) . ' &gt;',
'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),

View File

@@ -221,12 +221,6 @@ $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' => '&lt; ' . 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']) . ' &gt;',
'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'],
) )

View File

@@ -468,6 +468,8 @@ while ($row = $db->sql_fetchrow($result))
); );
} }
} }
$db->sql_freeresult($result);
$league_info = league_info($season, $league); $league_info = league_info($season, $league);
$bet_explain = ''; $bet_explain = '';
switch ($league_info['bet_ko_type']) switch ($league_info['bet_ko_type'])
@@ -505,12 +507,6 @@ $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' => '&lt; ' . 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']) . ' &gt;',
'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_main_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_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'join')),

View File

@@ -347,6 +347,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)

View File

@@ -11,13 +11,12 @@ if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
{ {
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,19 +26,12 @@ $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,
@@ -50,83 +42,9 @@ $sql = "(SELECT
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 delivery, m.league
GROUP BY m.delivery_date, m.league, b.user_id ORDER BY delivery, 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)
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)
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
)
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)
@@ -142,7 +60,7 @@ while($row = $db->sql_fetchrow($result) AND $index < 11)
'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'])),
) )
); );
} }

View File

@@ -89,6 +89,7 @@ else
trigger_error('NO_LEAGUE'); trigger_error('NO_LEAGUE');
} }
$user_rows = $db->sql_fetchrowset($result); $user_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$export_file = $league_short . '_' . $season . '_bank.csv'; $export_file = $league_short . '_' . $season . '_bank.csv';
$newline = "\r\n"; $newline = "\r\n";
header('Pragma: no-cache'); header('Pragma: no-cache');

View File

@@ -49,6 +49,7 @@ else
trigger_error('NO_SEASON'); trigger_error('NO_SEASON');
} }
$user_rows = $db->sql_fetchrowset($result); $user_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$export_file = $season. '_bank.csv'; $export_file = $season. '_bank.csv';
$newline = "\r\n"; $newline = "\r\n";
header('Pragma: no-cache'); header('Pragma: no-cache');

View File

@@ -91,6 +91,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 +119,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 +145,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 +247,6 @@ else
) )
); );
} }
$db->sql_freeresult($result);
// Statistic and forecast-points for historie // Statistic and forecast-points for historie
$sql = "SELECT $sql = "SELECT
@@ -322,10 +323,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 +1000,6 @@ else
); );
} }
} }
$db->sql_freeresult($result);
//last matches home hometeam //last matches home hometeam
$sql = '(SELECT $sql = '(SELECT
@@ -1074,7 +1070,6 @@ else
); );
} }
} }
$db->sql_freeresult($result);
//last game guestteam //last game guestteam
$sql = "(SELECT $sql = "(SELECT
@@ -1158,7 +1153,6 @@ else
); );
} }
} }
$db->sql_freeresult($result);
//last matches away guestteam //last matches away guestteam
$sql = '(SELECT $sql = '(SELECT
@@ -1226,7 +1220,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 +1259,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;

150
block/last_results.php Normal file
View File

@@ -0,0 +1,150 @@
<?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') OR !defined('IN_FOOTBALL'))
{
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_main_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,
)
);
?>

View File

@@ -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
@@ -24,10 +24,11 @@ $sql = 'SELECT s.session_user_id
FROM ' . USERS_TABLE . ' AS u FROM ' . USERS_TABLE . ' AS u
LEFT JOIN ' . SESSIONS_TABLE . ' AS s ON (u.user_id = s.session_user_id) LEFT JOIN ' . SESSIONS_TABLE . ' AS s ON (u.user_id = s.session_user_id)
WHERE u.user_lastvisit > 0 WHERE u.user_lastvisit > 0
AND u.user_type IN (0,3)
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))
{ {
@@ -57,7 +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,
)); ));

View File

@@ -314,14 +314,6 @@ $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']) ? '&lt; ' . sprintf($user->lang['FOOTBALL_BANK']) :
'&lt; ' . 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']) . ' &gt;',
'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,

View File

@@ -36,6 +36,7 @@ $sql = 'SELECT
$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)
{ {
@@ -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' => '&lt; ' . 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']) . ' &gt;',
'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,

View File

@@ -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)
@@ -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' => '&lt; ' . 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']) . ' &gt;',
'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),

View File

@@ -189,12 +189,6 @@ $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' => '&lt; ' . 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']) . ' &gt;',
'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,

View File

@@ -163,12 +163,6 @@ $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' => '&lt; ' . 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']) . ' &gt;',
'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,

View File

@@ -137,7 +137,6 @@ $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.status IN (2, 3,5,6)
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";
@@ -234,7 +233,6 @@ $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.status IN (2, 3,5,6)
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";
@@ -302,7 +300,6 @@ $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.status IN (2, 3,5,6)
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";
@@ -368,7 +365,6 @@ $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.status IN (2, 3,5,6)
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";
@@ -417,14 +413,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' => '&lt; ' . sprintf($user->lang['MY_TABLE']),
'LEFT_LINK' => '&lt; ' . 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' => '&lt; ' . sprintf($user->lang['MY_TABLE']),
'RIGHT_LINK' => sprintf($user->lang['MY_RANK']) . ' &gt;',
'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,

View File

@@ -198,12 +198,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' => '&lt; ' . 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']) . ' &gt;',
'LEFT_TITLE' => sprintf($user->lang['TITLE_BET']),
'RIGHT_TITLE' => sprintf($user->lang['TITLE_TABLE']),
'S_DATA_ODDS' => $data_odds, 'S_DATA_ODDS' => $data_odds,
) )
); );

View File

@@ -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 = '&nbsp;'; $change_differ = '&nbsp;';
} }
else else
@@ -167,7 +166,6 @@ 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 = '&nbsp;'; $change_differ = '&nbsp;';
} }
else else
@@ -175,14 +173,12 @@ 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/arrow_down.gif\" alt=\"" . $user->lang['WORSENED'] . "\"/>";
$differ = $rankof[$row['user_id']] - $prevrankof[$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 = '&nbsp;'; $change_differ = '&nbsp;';
} }
@@ -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,12 +251,6 @@ $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' => '&lt; ' . 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']) . ' &gt;',
'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),

View File

@@ -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,13 +165,6 @@ 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' => '&lt; ' . 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']) . ' &gt;' : sprintf($user->lang['MY_BETS']) . ' &gt;',
'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,
@@ -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,13 +328,6 @@ 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' => '&lt; ' . 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']) . ' &gt;' : sprintf($user->lang['MY_BETS']) . ' &gt;',
'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,
@@ -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,13 +548,6 @@ 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' => '&lt; ' . 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']) . ' &gt;' : sprintf($user->lang['MY_BETS']) . ' &gt;',
'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,

View File

@@ -387,6 +387,7 @@ while ($row = $db->sql_fetchrow($result))
); );
} }
} }
$db->sql_freeresult($result);
$sidename = sprintf($user->lang['RESULTS']); $sidename = sprintf($user->lang['RESULTS']);
switch ($league_info['bet_ko_type']) switch ($league_info['bet_ko_type'])
@@ -415,12 +416,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' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'LEFT_LINK' => '&lt; ' . 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']) . ' &gt;',
'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_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,

View File

@@ -180,7 +180,8 @@ if ($data_rules)
'JOIN_MODE' => ($league_info['join_by_user']) ? (($league_info['join_in_season']) ? sprintf($user->lang['JOIN_IN_SEASON']) : sprintf($user->lang['JOIN_BY_USER'])) : sprintf($user->lang['JOIN_BY_ADMIN']), 'JOIN_MODE' => ($league_info['join_by_user']) ? (($league_info['join_in_season']) ? sprintf($user->lang['JOIN_IN_SEASON']) : sprintf($user->lang['JOIN_BY_USER'])) : sprintf($user->lang['JOIN_BY_ADMIN']),
'POINTS_HIT' => sprintf($user->lang['POINTS_HIT'], $league_info['points_result']) . '<br/>', 'POINTS_HIT' => sprintf($user->lang['POINTS_HIT'], $league_info['points_result']) . '<br/>',
'POINTS_TENDENCY' => $points_tendency . '<br/>', 'POINTS_TENDENCY' => $points_tendency . '<br/>',
'POINTS_DIFF' => ($league_info['points_mode'] == 4) ? sprintf($user->lang['POINTS_DIFFERENCE'], $league_info['points_diff']) . '<br/>' : '', 'POINTS_DIFF' => ($league_info['points_mode'] == 4) ? sprintf($user->lang['POINTS_DIFFERENCE'], $league_info['points_diff']) . '<br/>' :
(($league_info['points_mode'] == 5) ? sprintf($user->lang['POINTS_DIFFERENCE_DRAW'], $league_info['points_diff']) . '<br/>' : ''),
'POINTS_LAST' => ($league_info['points_last']) ? sprintf($user->lang['POINTS_NO_BET']) . '<br/>' : '', 'POINTS_LAST' => ($league_info['points_last']) ? sprintf($user->lang['POINTS_NO_BET']) . '<br/>' : '',
'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'],

145
block/side_table.php Normal file
View File

@@ -0,0 +1,145 @@
<?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') OR !defined('IN_FOOTBALL'))
{
exit;
}
$data_table = false;
$ext_path = $this->phpbb_path_helper->update_web_root_path($this->phpbb_extension_manager->get_extension_path('football/football', true));
$sql = 'SELECT *
FROM ' . FOOTB_RANKS . "
WHERE season = $season
AND league = $league
AND matchday = $matchday";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
{
include($this->football_root_path . 'block/rank_matchday.' . $this->php_ext);
}
else
{
$rank = 0;
// Get table-information
$sql = "SELECT
t.*,
SUM(1) AS matches,
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(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)) AS goals,
SUM(IF(m.team_id_home = t.team_id, goals_guest , goals_home)) AS goals_against
FROM " . FOOTB_TEAMS . ' AS t
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)
WHERE t.season = $season
AND t.league = $league
AND m.matchday <= $matchday
AND m.status IN (2,3,5,6)
GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC";
$result = $db->sql_query($sql);
$table_ary = array();
$points_ary = array();
$ranks_ary = array();
while( $row = $db->sql_fetchrow($result))
{
$table_ary[$row['team_id']] = $row;
$points_ary[$row['group_id']][$row['points']][]=$row['team_id'];
$ranks_ary[] = $row['team_id'];
}
$last_group = '';
$rank = 0;
$current_rank = 0;
$last_goals = 0;
$last_goals_againts = 0;
$last_points = 0;
foreach($points_ary as $group_id => $points)
{
$data_table = true;
if ($last_group != $group_id)
{
$last_group =$group_id;
$rank = 0;
$last_goals = 0;
$last_goals_againts = 0;
$last_points = 0;
$template->assign_block_vars('side_total', array(
'GROUP' => sprintf($user->lang['GROUP']) . ' ' .$group_id,
)
);
}
foreach($points as $point => $teams)
{
if(count($teams) > 1 AND $group_id != '')
{
// Compare teams with equal points and sort
$teams = get_order_team_compare($teams, $season, $league, $group_id, $ranks_ary, $matchday);
}
foreach($teams as $key => $team)
{
$row = $table_ary[$team];
$rank++;
if ($last_points <> $row['points'] OR $last_goals <> $row['goals'] OR $last_goals_againts <> $row['goals_against'])
{
$current_rank = $rank . '.';
}
else
{
$current_rank = '';
}
$last_points = $row['points'];
$last_goals = $row['goals'];
$last_goals_againts = $row['goals_against'];
$row_class = (!($rank % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
if ($row['team_symbol'] <> '')
{
$logo = "<img src=\"" . $ext_path . 'images/flags/' . $row['team_symbol'] . "\" alt=\"" . $row['team_symbol'] . "\" width=\"20\" height=\"20\"/>" ;
}
else
{
$logo = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"20\" height=\"20\"/>" ;
}
$template->assign_block_vars('side_total', array(
'RANK' => $current_rank,
'ROW_CLASS' => $row_class,
'LOGO' => $logo,
'TEAM_ID' => $row['team_id'],
'TEAM_SHORT' => $row['team_name_short'],
'U_PLAN_TEAM' => $this->helper->route('football_football_popup', array('popside' => 'viewplan_popup', 's' => $season, 'l' => $row['league'],
'tid' => $row['team_id'], 'mode' => 'played')),
'GAMES' => $row['matches'],
'POINTS' => $row['points'],
)
);
}
}
}
$db->sql_freeresult($result);
$template->assign_vars(array(
'S_DISPLAY_SIDE_TABLE' => true,
'S_DATA_SIDE_TABLE' => $data_table,
)
);
}
?>

View File

@@ -154,12 +154,6 @@ $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' => '&lt; ' . 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']) . ' &gt;',
'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,

View File

@@ -131,12 +131,6 @@ $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' => '&lt; ' . 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']) . ' &gt;',
'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,

View File

@@ -12,6 +12,7 @@ if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
exit; exit;
} }
$data_table = false; $data_table = false;
$data_form = false; $data_form = false;
@@ -58,33 +59,56 @@ $sql = "SELECT
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)
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";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$table_ary = array();
$points_ary = array();
$ranks_ary = array();
$rank = 0;
while( $row = $db->sql_fetchrow($result))
{
$rank++;
$table_ary[$row['team_id']] = $row;
$points_ary[$row['group_id']][$row['points']][]=$row['team_id'];
$ranks_ary[] = $row['team_id'];
}
$last_group = ''; $last_group = '';
$rank = 0;
$current_rank = 0; $current_rank = 0;
$last_goals = 0; $last_goals = 0;
$last_goals_againts = 0; $last_goals_againts = 0;
$last_points = 0; $last_points = 0;
while($row = $db->sql_fetchrow($result)) foreach($points_ary as $group_id => $points)
{ {
if ($last_group != $row['group_id']) $data_table = true;
if ($last_group != $group_id)
{ {
$last_group = $row['group_id']; $last_group =$group_id;
$rank = 0; $rank = 0;
$last_goals = 0; $last_goals = 0;
$last_goals_againts = 0; $last_goals_againts = 0;
$last_points = 0; $last_points = 0;
$template->assign_block_vars('total', array( $template->assign_block_vars('total', array(
'GROUP' => sprintf($user->lang['GROUP']) . ' ' . $row['group_id'], 'GROUP' => sprintf($user->lang['GROUP']) . ' ' .$group_id,
) )
); );
} }
if ($league_type != 2 OR $row['group_id'] != '')
foreach($points as $point => $teams)
{ {
$data_table = true; if(count($teams) > 1 AND $group_id != '')
{
// Compare teams with equal points and sort
$teams = get_order_team_compare($teams, $season, $league, $group_id, $ranks_ary, $matchday);
}
foreach($teams as $key => $team)
{
$row = $table_ary[$team];
$rank++; $rank++;
if ($last_points <> $row['points'] OR $last_goals <> $row['goals'] OR $last_goals_againts <> $row['goals_against']) if ($last_points <> $row['points'] OR $last_goals <> $row['goals'] OR $last_goals_againts <> $row['goals_against'])
{ {
@@ -127,7 +151,9 @@ while($row = $db->sql_fetchrow($result))
) )
); );
} }
}
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$rank = 0; $rank = 0;
// Get form-table-information // Get form-table-information
@@ -403,12 +429,6 @@ $sidename = sprintf($user->lang['TABLE']);
$template->assign_vars(array( $template->assign_vars(array(
'S_DISPLAY_TABLE' => true, 'S_DISPLAY_TABLE' => true,
'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' => '&lt; ' . 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']) . ' &gt;',
'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,

View File

@@ -1,10 +1,10 @@
{ {
"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.5", "version": "0.9.9",
"time": "2016-04-22", "time": "2017-09-09",
"license": "GPL-2.0", "license": "GPL-2.0",
"authors": [{ "authors": [{
"name": "J. Helmke", "name": "J. Helmke",
@@ -18,7 +18,7 @@
"extra": { "extra": {
"display-name": "Football Prediction League", "display-name": "Football Prediction League",
"soft-require": { "soft-require": {
"phpbb/phpbb": "3.1.*" "phpbb/phpbb": ">3.1.*"
}, },
"version-check": { "version-check": {
"host": "football.bplaced.net", "host": "football.bplaced.net",

View File

@@ -308,8 +308,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 +419,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 +478,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,6 +725,7 @@ 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);
@@ -823,7 +824,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')
@@ -902,7 +903,14 @@ class main
if (!$user->data['football_mobile']) if (!$user->data['football_mobile'])
{ {
// Start matchday list // Start matchday list
if ($side == 'bet')
{
include($this->football_root_path . 'block/side_table.' . $this->php_ext);
}
else
{
include($this->football_root_path . 'block/rank_matchday.' . $this->php_ext); include($this->football_root_path . 'block/rank_matchday.' . $this->php_ext);
}
// End matchday list // End matchday list
//***************************************************************************** //*****************************************************************************
@@ -993,8 +1001,15 @@ class main
else else
{ {
$mobile = ''; $mobile = '';
if ($config['football_display_last_users'] > 0)
{
include($this->football_root_path . 'block/last_users.' . $this->php_ext); 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')
{ {

View File

@@ -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 ?
@@ -87,9 +88,8 @@ class football_remember extends \phpbb\cron\task\base
$season = curr_season(); $season = curr_season();
//Matchdays to close in 24 hours and 24 hours later //Matchdays to close in 24 hours and 24 hours later
$local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 3600);
// shift days to test // shift days to test
$local_board_time = $local_board_time + ($days * 86400); $local_board_time = time() + ($days * 86400);
if ($mode <> 'test') if ($mode <> 'test')
{ {
@@ -111,7 +111,8 @@ class football_remember extends \phpbb\cron\task\base
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);
@@ -137,12 +138,17 @@ class football_remember extends \phpbb\cron\task\base
u.user_id AS userid, u.user_id AS userid,
u.user_lang u.user_lang
FROM ' . FOOTB_MATCHES . ' AS m FROM ' . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league)
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no) LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id
LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id
WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday
AND ((b.goals_home = '') OR (b.goals_guest = '')) AND ((b.goals_home = '') OR (b.goals_guest = ''))
AND m.status = 0 AND p.pf_footb_rem_f = 1 AND m.status = 0 AND p.pf_footb_rem_f = 1
AND (l.bet_in_time = 0 OR
(l.bet_in_time = 1
AND (DATE_SUB(m.match_datetime, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time'))
AND (DATE_SUB(m.match_datetime, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time'))))
GROUP BY b.user_id GROUP BY b.user_id
UNION UNION
SELECT SELECT
@@ -151,12 +157,17 @@ class football_remember extends \phpbb\cron\task\base
u.user_id AS userid, u.user_id AS userid,
u.user_lang u.user_lang
FROM " . FOOTB_MATCHES . ' AS m FROM " . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league)
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no) LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id
LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id
WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday
AND ((b.goals_home = '') OR (b.goals_guest = '')) AND ((b.goals_home = '') OR (b.goals_guest = ''))
AND m.status = 0 AND p.pf_footb_rem_s = 1 AND m.status = 0 AND p.pf_footb_rem_s = 1
AND (l.bet_in_time = 0 OR
(l.bet_in_time = 1
AND (DATE_SUB(m.match_datetime, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time'))
AND (DATE_SUB(m.match_datetime, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time'))))
GROUP BY b.user_id GROUP BY b.user_id
"; ";
$result = $this->db->sql_query($sql); $result = $this->db->sql_query($sql);

View File

@@ -261,8 +261,7 @@ class main_listener implements EventSubscriberInterface
$mobile = false; $mobile = false;
$user_agent = $request->server('HTTP_USER_AGENT'); $user_agent = $request->server('HTTP_USER_AGENT');
if ($this->user->data['football_mobile_device'] == '')
{
switch(true) switch(true)
{ {
/** Remove Bots from the list */ /** Remove Bots from the list */
@@ -508,7 +507,6 @@ class main_listener implements EventSubscriberInterface
$this->user->data['football_mobile'] = $mobile; $this->user->data['football_mobile'] = $mobile;
$this->user->data['football_mobile_device'] = $mobile_device; $this->user->data['football_mobile_device'] = $mobile_device;
} }
}
/** /**
* Check if user should be able to access football prediction league * Check if user should be able to access football prediction league

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

View File

@@ -121,7 +121,7 @@ if( !$result_bets = $db->sql_query($sql_bets) )
} }
$rows_bets = $db->sql_fetchrowset($result_bets); $rows_bets = $db->sql_fetchrowset($result_bets);
$count_bets = sizeof($rows_bets); $count_bets = sizeof($rows_bets);
$db->sql_freeresult($result_results); $db->sql_freeresult($result_bets);
$column = array(); $column = array();
$lastcolumn = 0; $lastcolumn = 0;
$last_match_num = 0; $last_match_num = 0;

View File

@@ -126,13 +126,14 @@ function save_ranking_matchday($season, $league, $matchday, $cash = false)
{ {
$matchday_status = 2; $matchday_status = 2;
} }
$db->sql_freeresult($result);
} }
if ($matchday_status == 0 OR $matchday_status == 1) if ($matchday_status == 0 OR $matchday_status == 1)
{ {
// No matches played, so we can delete the ranking // No matches played, so we can delete the ranking
$sql = 'DELETE FROM ' . FOOTB_RANKS . " WHERE season = $season AND league = $league AND matchday = $matchday"; $sql = 'DELETE FROM ' . FOOTB_RANKS . " WHERE season = $season AND league = $league AND matchday = $matchday";
$result = $db->sql_query($sql); $db->sql_query($sql);
} }
else else
{ {
@@ -280,7 +281,7 @@ function save_ranking_matchday($season, $league, $matchday, $cash = false)
,0 ,0
,0 ,0
)"; )";
$result = $db->sql_query($sql); $db->sql_query($sql);
} }
if ( sizeof($ranking_ary) == 0 ) if ( sizeof($ranking_ary) == 0 )
{ {
@@ -288,7 +289,7 @@ function save_ranking_matchday($season, $league, $matchday, $cash = false)
WHERE season = $season WHERE season = $season
AND league = $league AND league = $league
AND matchday = $matchday"; AND matchday = $matchday";
$result = $db->sql_query($sql); $db->sql_query($sql);
} }
else else
{ {
@@ -389,7 +390,7 @@ function save_ranking_matchday($season, $league, $matchday, $cash = false)
points_total = $points_total, points_total = $points_total,
win_total = $win_total win_total = $win_total
WHERE season = $season AND league = $league AND matchday = $matchday AND user_id = $curr_userid"; WHERE season = $season AND league = $league AND matchday = $matchday AND user_id = $curr_userid";
$result = $db->sql_query($sql); $db->sql_query($sql);
} }
} }
} }
@@ -427,9 +428,9 @@ function save_ranking_matchday($season, $league, $matchday, $cash = false)
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
if ( $next_matchday = (int) $db->sql_fetchfield('matchday')) if ( $next_matchday = (int) $db->sql_fetchfield('matchday'))
{ {
$db->sql_freeresult($result);
save_ranking_matchday($season, $league, $next_matchday, $cash); save_ranking_matchday($season, $league, $next_matchday, $cash);
} }
$db->sql_freeresult($result);
} }
} }
@@ -480,7 +481,7 @@ function rollback_points($points_type, $season, $league, $matchday, $cash)
} }
$sql = 'DELETE FROM ' . FOOTB_POINTS . " WHERE season = $season AND league = $league AND matchday = $matchday AND points_type = $points_type"; $sql = 'DELETE FROM ' . FOOTB_POINTS . " WHERE season = $season AND league = $league AND matchday = $matchday AND points_type = $points_type";
$result = $db->sql_query($sql); $db->sql_query($sql);
} }
function set_footb_points($points_type, $season, $league, $matchday, $wins, $cash) function set_footb_points($points_type, $season, $league, $matchday, $wins, $cash)
@@ -897,7 +898,7 @@ function set_bet_in_time_delivery($season, $league)
'goals_overtime_home' => '', 'goals_overtime_home' => '',
'goals_overtime_guest' => '', 'goals_overtime_guest' => '',
); );
$local_board_time = time() + (($config['board_timezone'] - $config['football_host_timezone']) * 3600); $local_board_time = time() + ($config['football_time_shift'] * 3600);
$sql = 'UPDATE ' . FOOTB_MATCHES . ' $sql = 'UPDATE ' . FOOTB_MATCHES . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE season = $season AND league = $league AND matchday =" . $row['matchday'] . " AND match_datetime > FROM_UNIXTIME('$local_board_time')"; WHERE season = $season AND league = $league AND matchday =" . $row['matchday'] . " AND match_datetime > FROM_UNIXTIME('$local_board_time')";
@@ -934,14 +935,20 @@ function set_bet_in_time_delivery($season, $league)
function curr_season() function curr_season()
{ {
global $db, $lang, $user; global $db, $lang, $user;
$user_spec = '';
if ($user->data['user_type']==0 OR $user->data['user_type']==3)
{
$curr_user = $user->data['user_id']; $curr_user = $user->data['user_id'];
$user_spec = 'AND b.user_id = ' . $curr_user;
}
$sql = 'SELECT DISTINCT s.season $sql = 'SELECT DISTINCT s.season
FROM ' . FOOTB_SEASONS . ' AS s FROM ' . FOOTB_SEASONS . ' AS s
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 m ON (m.season = s.season AND m.league = l.league) INNER JOIN ' . FOOTB_MATCHDAYS . ' AS m ON (m.season = s.season AND m.league = l.league)
INNER JOIN ' . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.user_id = $curr_user) INNER JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league ' . $user_spec . ')
WHERE m.status IN (0,1,2) WHERE m.status IN (0,1,2)
ORDER BY s.season ASC"; ORDER BY s.season ASC';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result)) if ($row = $db->sql_fetchrow($result))
@@ -1017,13 +1024,19 @@ function first_league($season, $complete = true)
function current_league($season) function current_league($season)
{ {
global $db, $lang, $user; global $db, $lang, $user;
$user_spec = '';
if ($user->data['user_type']==0 OR $user->data['user_type']==3)
{
$curr_user = $user->data['user_id']; $curr_user = $user->data['user_id'];
$sql = 'SELECT m.league $user_spec = 'AND b.user_id = ' . $curr_user;
}
$sql = 'SELECT DISTINCT m.league
FROM ' . FOOTB_MATCHES . ' AS m FROM ' . FOOTB_MATCHES . ' AS m
INNER JOIN ' . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.user_id = $curr_user) INNER JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league ' . $user_spec . ")
WHERE m.season = $season WHERE m.season = $season
AND m.status in (0,1,2) AND m.status in (0,1,2)
ORDER BY m.match_datetime ASC"; ORDER BY m.match_datetime ASC
LIMIT 1";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result)) if ($row = $db->sql_fetchrow($result))
@@ -1154,7 +1167,7 @@ function close_open_matchdays()
{ {
global $db, $lang, $config; global $db, $lang, $config;
$local_board_time = time() + (($config['board_timezone'] - $config['football_host_timezone']) * 3600); $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')"; $sql = 'SELECT * FROM ' . FOOTB_MATCHDAYS . " WHERE status = 0 AND delivery_date < FROM_UNIXTIME('$local_board_time')";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$toclose = $db->sql_fetchrowset($result); $toclose = $db->sql_fetchrowset($result);
@@ -1641,6 +1654,78 @@ function color_points($text, $status)
return $color_points; return $color_points;
} }
/**
* get table order on teams with equal points.
*/
function get_order_team_compare($team_ary, $season, $league, $group, $ranks, $matchday = 999, $first = true)
{
global $db;
$sql = "
SELECT
t.*,
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(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)) AS goals
FROM " . FOOTB_TEAMS . ' AS t
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)
WHERE t.season = $season
AND t.league = $league
AND m.matchday <= $matchday
AND m.status IN (2,3,5,6)
AND m.group_id = '$group'
AND (m.team_id_home='" . implode("' OR m.team_id_home='", $team_ary) . "')
AND (m.team_id_guest='" . implode("' OR m.team_id_guest='", $team_ary) . "')
GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC";
$result = $db->sql_query($sql);
$tmp = array();
$rank_ary = array();
$rank = 0;
$last_points = 0;
$last_goals_diff = 0;
$last_goals = 0;
while( $row = $db->sql_fetchrow($result))
{
if ($last_points <> $row['points'] OR $last_goals_diff <> $row['goals_diff'] OR $last_goals <> $row['goals'])
{
$rank++;
}
$rank_ary[$rank][]=$row['team_id'];
$last_points = $row['points'];
$last_goals_diff = $row['goals_diff'];
$last_goals = $row['goals'];
}
foreach($rank_ary as $rank => $teams)
{
if(count($teams) > 1)
{
if ($first)
{
// Compare teams with equal ranks
$teams = get_order_team_compare($teams, $season, $league, $group, $ranks, $matchday, false);
}
else
{
// Second compare is still equal, so look on total rank
$teams = array_intersect($ranks, $teams);
}
}
foreach($teams as $key => $team)
{
$tmp[] = $team;
}
}
return (sizeof($tmp) == 0) ? $team_ary: $tmp;
}
/** /**
* determine team items from formula. * determine team items from formula.
*/ */
@@ -1653,6 +1738,147 @@ function get_team($season, $league, $matchnumber, $field, $formula)
switch($first_letter) switch($first_letter)
{ {
case '3':
// 3. Place Euro 2106
$groups = substr($para_ary[0], 0, 5);
$sql = '
SELECT
SUM(1) AS matches,
SUM(IF(m.status = 3, 1, 0)) AS played
FROM ' . FOOTB_MATCHES . " AS m
WHERE m.season = $season AND m.league = $league AND m.group_id <> ''
GROUP BY m.group_id
";
$result = $db->sql_query($sql);
if ( $row = $db->sql_fetchrow($result))
{
if ($row['matches'] == $row['played'])
{
$rank = 0;
// Get table-information
$sql = "SELECT
t.*,
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(goals_home = goals_guest, 1, 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))) AS lost,
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))
)
) 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)) AS goals,
SUM(IF(m.team_id_home = t.team_id, goals_guest , goals_home)) AS goals_against
FROM " . FOOTB_TEAMS . ' AS t
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)
WHERE t.season = $season
AND t.league = $league
AND m.status IN (2,3,5,6)
GROUP BY t.team_id
ORDER BY t.group_id ASC, points DESC, goals_diff DESC, goals DESC, t.team_name ASC";
$result = $db->sql_query($sql);
$table_ary = array();
$points_ary = array();
$ranks_ary = array();
$third_team = array();
$third_group = array();
$points3 = array();
$diff3 = array();
$goals3 = array();
$rank = 0;
while( $row = $db->sql_fetchrow($result))
{
$rank++;
$table_ary[$row['team_id']] = $row;
$points_ary[$row['group_id']][$row['points']][]=$row['team_id'];
$ranks_ary[] = $row['team_id'];
}
foreach($points_ary as $group_id => $points)
{
$rank = 0;
//sort on points descending
krsort($points);
foreach($points as $point => $teams)
{
if(count($teams) > 1)
{
// Compare teams with equal points
$teams = get_order_team_compare($teams, $season, $league, $group_id, $ranks_ary);
}
foreach($teams as $key => $team)
{
$row = $table_ary[$team];
$rank++;
if ($rank == 3)
{
$points3[$team] = $row['points'];
$diff3[$team] = $row['goals_diff'];
$goals3[$team] = $row['goals'];
$third_team[$team]= $team;
$third_group[$team]= $row['group_id'];
}
}
}
}
// Sort 3. Place on points, diff, goals
array_multisort($points3, SORT_DESC, $diff3, SORT_DESC, $goals3, SORT_DESC, $third_team, $third_group);
$qualified_groups = array();
for($i = 0; $i < 4; $i++)
{
$qualified_groups[$i] = $third_group[$i];
$team_of[$third_group[$i]] = $third_team[$i];
}
asort($qualified_groups);
$qualified_groups_string = '';
foreach($qualified_groups as $key => $letter)
{
$qualified_groups_string .= $letter;
}
$modus = array('ABCD' => 'CDAB', 'ABCE' => 'CABE', 'ABCF' => 'CABF', 'ABDE' => 'DABE', 'ABDF' => 'DABF',
'ABEF' => 'EABF', 'ACDE' => 'CDAE', 'ACDF' => 'CDAF', 'ACEF' => 'CAFE', 'ADEF' => 'DAFE',
'BCDE' => 'CDBE', 'BCDF' => 'CDBF', 'BCEF' => 'ECBF', 'BDEF' => 'EDBF', 'CDEF' => 'CDFE');
$form_para = array('CDE', 'ACD', 'ABF', 'BEF');
$mode = $modus[$qualified_groups_string];
for($i = 0; $i < 4; $i++)
{
$team = $team_of[substr($mode, $i, 1)];
$sqlup = 'UPDATE ' . FOOTB_MATCHES . " SET team_id_guest = $team WHERE season = $season AND league = $league AND formula_guest = '3 $form_para[$i]'";
$resultup = $db->sql_query($sqlup);
$sqlup = 'UPDATE ' . FOOTB_TEAMS . ' SET matchday = (SELECT max(matchday) FROM ' . FOOTB_MATCHES . "
WHERE season = $season AND league = $league AND (team_id_home= $team OR team_id_guest = $team))
WHERE season = $season AND league = $league AND team_id = $team";
$resultup = $db->sql_query($sqlup);
if ($form_para[$i] == $groups)
{
$team_id = $team;
$row = $table_ary[$team];
$team_symbol = $row['team_symbol'];
$team_name = $row['team_name'];
$team_name_short = $row['team_name_short'];
}
}
return $team_symbol . '#' . $team_id . '#' . $team_name . '#' . $team_name_short;
}
else
{
return '#0#' . '3. ' . sprintf($user->lang['GROUP']) . ' ' . $groups . '#' . '3. ' . sprintf($user->lang['GROUP']) . ' ' . $groups;
}
}
else
{
return '#0#' . '3. ' . sprintf($user->lang['GROUP']) . ' ' . $groups . '#' . '3. ' . sprintf($user->lang['GROUP']) . ' ' . $groups;
}
break;
case 'D': case 'D':
// Drawing // Drawing
return '#0#' . sprintf($user->lang['DRAWING']) . '#' . sprintf($user->lang['DRAWING']); return '#0#' . sprintf($user->lang['DRAWING']) . '#' . sprintf($user->lang['DRAWING']);
@@ -1675,31 +1901,16 @@ function get_team($season, $league, $matchnumber, $field, $formula)
{ {
if ($row['matches'] == $row['played']) if ($row['matches'] == $row['played'])
{ {
$rank = 0;
$sql = ' $sql = '
SELECT SELECT
t.*, t.*,
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(goals_home = goals_guest, 1, 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))) AS lose,
SUM(IF(m.team_id_home = t.team_id, SUM(IF(m.team_id_home = t.team_id,
IF(goals_home + 0 > goals_guest, IF(goals_home + 0 > goals_guest, 3, IF(goals_home = goals_guest, 1, 0)),
3, IF(goals_home + 0 < goals_guest, 3, IF(goals_home = goals_guest, 1, 0))
IF(goals_home = goals_guest,
1,
0
)
),
IF(goals_home + 0 < goals_guest,
3,
IF(goals_home = goals_guest,
1,
0
)
)
) )
) AS points, ) AS points,
SUM(IF(m.team_id_home = t.team_id, goals_home - goals_guest, goals_guest - goals_home)) AS goal_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_get SUM(IF(m.team_id_home = t.team_id, goals_guest, goals_home)) AS goals_get
FROM ' . FOOTB_TEAMS . ' AS t FROM ' . FOOTB_TEAMS . ' AS t
@@ -1707,49 +1918,45 @@ function get_team($season, $league, $matchnumber, $field, $formula)
(m.team_id_home = t.team_id OR m.team_id_guest = t.team_id) AND m.group_id = t.group_id) (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 AND t.league = $league AND m.group_id = '$group' WHERE t.season = $season AND t.league = $league AND m.group_id = '$group'
GROUP BY t.team_id GROUP BY t.team_id
ORDER BY points DESC, goal_diff DESC, goals DESC ORDER BY points DESC, goals_diff DESC, goals DESC
"; ";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$rowset = $db->sql_fetchrowset($result); $table_ary = array();
$points_ary = array();
$ranks_ary = array();
while( $row = $db->sql_fetchrow($result))
{
$table_ary[$row['team_id']] = $row;
$points_ary[$row['points']][]=$row['team_id'];
$ranks_ary[] = $row['team_id'];
}
$db->sql_freeresult($result); $db->sql_freeresult($result);
if (1 == $place) //sort on points descending
krsort($points_ary);
foreach($points_ary as $point => $teams)
{ {
if ($rowset[0]['points'] == $rowset[1]['points'] AND $rowset[0]['goal_diff'] == $rowset[1]['goal_diff'] AND $rowset[0]['goals'] == $rowset[1]['goals']) if(count($teams) > 1)
{ {
return '#0#' . $place . '. ' . sprintf($user->lang['GROUP']) . ' ' . $place . '#' . $place . '. ' . sprintf($user->lang['GROUP']) . ' ' . $group; // Compare teams with equal points
$teams = get_order_team_compare($teams, $season, $league, $group, $ranks_ary);
} }
else foreach($teams as $key => $team)
{ {
$new_id = $rowset[0]['team_id']; $row = $table_ary[$team];
$sqlup = 'UPDATE ' . FOOTB_MATCHES . " SET $field = $new_id WHERE season = $season AND league = $league AND match_no = $matchnumber"; $rank++;
if ($rank == $place)
{
$sqlup = 'UPDATE ' . FOOTB_MATCHES . " SET $field = $team WHERE season = $season AND league = $league AND match_no = $matchnumber";
$resultup = $db->sql_query($sqlup); $resultup = $db->sql_query($sqlup);
$sqlup = 'UPDATE ' . FOOTB_TEAMS . ' SET matchday = (SELECT max(matchday) FROM ' . FOOTB_MATCHES . " $sqlup = 'UPDATE ' . FOOTB_TEAMS . ' SET matchday = (SELECT max(matchday) FROM ' . FOOTB_MATCHES . "
WHERE season = $season AND league = $league AND (team_id_home= $new_id OR team_id_guest = $new_id)) WHERE season = $season AND league = $league AND (team_id_home= $team OR team_id_guest = $team))
WHERE season = $season AND league = $league AND team_id = $new_id"; WHERE season = $season AND league = $league AND team_id = $team";
$resultup = $db->sql_query($sqlup); $resultup = $db->sql_query($sqlup);
return $rowset[0]['team_symbol'] . '#' . $new_id . '#' . $rowset[0]['team_name'] . '#' . $rowset[0]['team_name_short']; return $row['team_symbol'] . '#' . $team . '#' . $row['team_name'] . '#' . $row['team_name_short'];
} }
} }
else
{
// second
if (($rowset[0]['points'] == $rowset[1]['points'] AND $rowset[0]['goal_diff'] == $rowset[1]['goal_diff'] AND $rowset[0]['goals'] == $rowset[1]['goals'] ) OR
($rowset[2]['points'] == $rowset[1]['points'] AND $rowset[2]['goal_diff'] == $rowset[1]['goal_diff'] AND $rowset[2]['goals'] == $rowset[1]['goals'] ))
{
return '#0#' . $place . '. ' . sprintf($user->lang['GROUP']) . ' ' . $group . '#' . $place . '. ' . sprintf($user->lang['GROUP']) . ' ' . $group;
}
else
{
$new_id = $rowset[1]['team_id'];
$sqlup = 'UPDATE ' . FOOTB_MATCHES . " SET $field = $new_id WHERE season = $season AND league = $league AND match_no = $matchnumber";
$resultup = $db->sql_query($sqlup);
$sqlup = 'UPDATE ' . FOOTB_TEAMS . ' SET matchday = (SELECT max(matchday) FROM ' . FOOTB_MATCHES . "
WHERE season = $season AND league = $league AND (team_id_home= $new_id OR team_id_guest = $new_id))
WHERE season = $season AND league = $league AND team_id = $new_id";
$resultup = $db->sql_query($sqlup);
return $rowset[1]['team_symbol'] . '#' . $new_id . '#' . $rowset[1]['team_name'] . '#' . $rowset[1]['team_name_short'];
}
} }
} }
else else
@@ -2113,28 +2320,42 @@ function ko_group_next_round($season, $league, $matchday_from, $matchday_to, $ma
"; ";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$table_ary = array();
$points_ary = array();
$ranks_ary = array();
while( $row = $db->sql_fetchrow($result))
{
$table_ary[$row['team_id']] = $row;
$points_ary[$row['group_id']][$row['points']][]=$row['team_id'];
$ranks_ary[] = $row['team_id'];
}
$message = sprintf($user->lang['KO_NEXT_CHECK']) . ': <br /><br />'; $message = sprintf($user->lang['KO_NEXT_CHECK']) . ': <br /><br />';
$message .= sprintf($user->lang['KO_NEXT']) . ': <br /><br />'; $message .= sprintf($user->lang['KO_NEXT']) . ': <br /><br />';
$messag_moved = '<br /><br />' . sprintf($user->lang['KO_MOVED']) . ': <br />'; $messag_moved = '<br /><br />' . sprintf($user->lang['KO_MOVED']) . ': <br />';
$group_id = 'XX'; $group_id = 'XX';
while ($row = $db->sql_fetchrow($result)) foreach($points_ary as $group_id => $points)
{
if ($group_id != $row['group_id'])
{ {
$place = 1; $place = 1;
$group_id = $row['group_id']; foreach($points as $point => $teams)
{
if(count($teams) > 1)
{
// Compare teams with equal points
$teams = get_order_team_compare($teams, $season, $league, $group_id, $ranks_ary);
} }
foreach($teams as $key => $team_id)
{
$row = $table_ary[$team_id];
if ($place <= $rank) if ($place <= $rank)
{ {
$team_id = $row['team_id'];
$sqlup = 'UPDATE ' . FOOTB_TEAMS . " SET matchday = $matchday_new WHERE season = $season AND league = $league AND team_id = $team_id"; $sqlup = 'UPDATE ' . FOOTB_TEAMS . " SET matchday = $matchday_new WHERE season = $season AND league = $league AND team_id = $team_id";
$resultup = $db->sql_query($sqlup); $resultup = $db->sql_query($sqlup);
$message .= $row['team_name'] . '<br />'; $message .= $row['team_name'] . '<br />';
} }
if ($move_rank > 0 AND $move_league > 0 AND $place == $move_rank) if ($move_rank > 0 AND $move_league > 0 AND $place == $move_rank)
{ {
$team_id = $row['team_id'];
$team_name = $row['team_name']; $team_name = $row['team_name'];
$short_name = $row['team_name_short']; $short_name = $row['team_name_short'];
$team_sign = $row['team_symbol']; $team_sign = $row['team_symbol'];
@@ -2145,6 +2366,8 @@ function ko_group_next_round($season, $league, $matchday_from, $matchday_to, $ma
$place++; $place++;
} }
} }
}
}
$db->sql_freeresult($result); $db->sql_freeresult($result);
$message .= '<br /><br />'; $message .= '<br /><br />';

View File

@@ -58,6 +58,7 @@ $lang = array_merge($lang, array(
'BET_KOEFF' => 'Tippkoeffizient ', 'BET_KOEFF' => 'Tippkoeffizient ',
'BET_OF' => 'Tipp', 'BET_OF' => 'Tipp',
'BET_POINTS' => 'Einsatz', 'BET_POINTS' => 'Einsatz',
'BET_TIME' => 'Tipp Zeit',
'BET_UNTIL_DELIVERY' => 'Die Spiele eines Spieltags können nur bis zum Abgabetermin des Spieltags getippt werden. Danach werden die Tipps der anderen Tipper für alle sichtbar. ', 'BET_UNTIL_DELIVERY' => 'Die Spiele eines Spieltags können nur bis zum Abgabetermin des Spieltags getippt werden. Danach werden die Tipps der anderen Tipper für alle sichtbar. ',
'BETS' => 'Tipps', 'BETS' => 'Tipps',
'BETS_AND_RANKS' => 'Tipps und Ranglisten der', 'BETS_AND_RANKS' => 'Tipps und Ranglisten der',
@@ -192,6 +193,7 @@ $lang = array_merge($lang, array(
'LAST_GAMES' => 'Die letzten Spiele', 'LAST_GAMES' => 'Die letzten Spiele',
'LAST_GAMES_AWAY' => 'Die letzten Auswärtsspiele', 'LAST_GAMES_AWAY' => 'Die letzten Auswärtsspiele',
'LAST_GAMES_HOME' => 'Die letzten Heimspiele', 'LAST_GAMES_HOME' => 'Die letzten Heimspiele',
'LAST_RESULTS' => 'Die letzten Ergebnisse',
'LAST_VISITORS' => 'Die letzten %s Besuche', 'LAST_VISITORS' => 'Die letzten %s Besuche',
'LEAGUE' => 'Liga', 'LEAGUE' => 'Liga',
'LINK_PREDICTION_LEAGUE' => 'Zur Tipprunde', 'LINK_PREDICTION_LEAGUE' => 'Zur Tipprunde',
@@ -290,6 +292,7 @@ $lang = array_merge($lang, array(
'POINTS' => 'Punkte', 'POINTS' => 'Punkte',
'POINTS_DIFF' => 'Punktedifferenz', 'POINTS_DIFF' => 'Punktedifferenz',
'POINTS_DIFFERENCE' => 'Punkte für die richtige Tordifferenz: %s', 'POINTS_DIFFERENCE' => 'Punkte für die richtige Tordifferenz: %s',
'POINTS_DIFFERENCE_DRAW' => 'Punkte für die richtige Tordifferenz (außer bei Unentschieden): %s',
'POINTS_DOT' => 'Pk. ', 'POINTS_DOT' => 'Pk. ',
'POINTS_HIT' => 'Für die Vorhersage des richtigen Ergebnisses (Volltreffer) gibt es %s Punkte. ', 'POINTS_HIT' => 'Für die Vorhersage des richtigen Ergebnisses (Volltreffer) gibt es %s Punkte. ',
'POINTS_LAST' => 'Punkte des letzten für Nichttipper', 'POINTS_LAST' => 'Punkte des letzten für Nichttipper',

View File

@@ -37,7 +37,7 @@ if ( empty($lang) || !is_array($lang) )
// » „ “ — … // » „ “ — …
// //
$help = array( $lang = array_merge($lang, array('FOOTBALL_HELP_FAQ' => array(
array( array(
0 => '--', 0 => '--',
1 => 'Erste Schritte' 1 => 'Erste Schritte'
@@ -93,7 +93,8 @@ footb_rem_s = Schalter für Versand der Erinnerungsmail an die 2. E-Mail-Adresse
0 => 'Wie aktiviere ich die Erinnerungs-Mail Funktion?', 0 => 'Wie aktiviere ich die Erinnerungs-Mail Funktion?',
1 => 'Im Adminbereich muss unter den Tipprunden-Funktionalitäten der Cronjob für die Tipp-Erinnerungsmail aktiviert und der Termin der nächsten Ausführung gesetzt werden.<br /> 1 => 'Im Adminbereich muss unter den Tipprunden-Funktionalitäten der Cronjob für die Tipp-Erinnerungsmail aktiviert und der Termin der nächsten Ausführung gesetzt werden.<br />
Der Cron-Job wird beim ersten Zugriff nach diesem Termin ausgeführt und sendet eine Erinnerungs-Mail für die fehlenden Tippabgaben, die im Zeitraum 24-48 Stunden nach dem Cron-Termin liegen. Der Cron-Job wird beim ersten Zugriff nach diesem Termin ausgeführt und sendet eine Erinnerungs-Mail für die fehlenden Tippabgaben, die im Zeitraum 24-48 Stunden nach dem Cron-Termin liegen.
Falls nicht ausreichend Zugriffe auf die Seite erfolgen, sollte der Cronjob automatisch z.B. von www.cronjob.de durch das Script "cron.php?cron_type=football_remember" gestartet werden.<br /> Falls nicht ausreichend Zugriffe auf die Seite erfolgen, sollte der Cronjob automatisch z.B. von www.cronjob.de durch das Script
"DEINE_URL/cron.php?cron_type=football.football.cron.task.football_remember" gestartet werden.<br />
Das versenden der Email erfolgt nur einmalig. Nach Aufruf des Cronjobs wird der nächste automatisch für den Folgetag eingeplant. Das versenden der Email erfolgt nur einmalig. Nach Aufruf des Cronjobs wird der nächste automatisch für den Folgetag eingeplant.
Mit den angehängten parametern "&mode=test&days=n" kann der Versand für die um n Tage versetzte Tippabgabe getestet werden. Dabei werden nur Mails an Board-Email-Adresse versendet.' Mit den angehängten parametern "&mode=test&days=n" kann der Versand für die um n Tage versetzte Tippabgabe getestet werden. Dabei werden nur Mails an Board-Email-Adresse versendet.'
), ),
@@ -526,5 +527,5 @@ mit gleichem Status aktualisieren" zu wählen.'
Datenquelle erfolgen. Benötigt man innerhalb dieser Zeit trotzdem aktualisierte Daten, so muss man den Cache löschen um einen erneuten Download von der Datenquelle erfolgen. Benötigt man innerhalb dieser Zeit trotzdem aktualisierte Daten, so muss man den Cache löschen um einen erneuten Download von der
Datenquelle zu erzwingen.' Datenquelle zu erzwingen.'
), ),
); )));
?> ?>

View File

@@ -48,6 +48,10 @@ $lang = array_merge($lang, array(
'DISABLE_FOOTBALL' => 'Tipprunde deaktivieren', 'DISABLE_FOOTBALL' => 'Tipprunde deaktivieren',
'DISABLE_FOOTBALL_EXPLAIN' => 'Hiermit sperrst du die Tipprunde für alle Benutzer. Wenn du möchtest, kannst du eine kurze Nachricht (bis zu 255 Zeichen) angeben. ', 'DISABLE_FOOTBALL_EXPLAIN' => 'Hiermit sperrst du die Tipprunde für alle Benutzer. Wenn du möchtest, kannst du eine kurze Nachricht (bis zu 255 Zeichen) angeben. ',
'DISPLAY_LAST_USERS' => 'Anzahl anzuzeigender letzter Besucher des Forums',
'DISPLAY_LAST_USERS_EXPLAIN' => 'Limitiert die Anzeige der letzten Besucher im selbigen Tipprunden-Block. Mit 0 wird die Anzeige des Blocks unterdrückt. ',
'DISPLAY_LAST_RESULTS' => 'Anzahl maximal anzuzeigender letzter Spielergebnisse',
'DISPLAY_LAST_RESULTS_EXPLAIN' => 'Limitiert die Anzeige der letzten Spielergebnisse im selbigen Tipprunden-Block. Finden mehr Spiele am letzten Tag statt, werden alle Ergebnisse dieses Tages angezeigt. Mit 0 wird die Anzeige des Blocks unterdrückt. ',
'DISPLAY_RANKS' => 'Anzahl angezeigter Tipper in den Übersichts-Ranglisten', 'DISPLAY_RANKS' => 'Anzahl angezeigter Tipper in den Übersichts-Ranglisten',
'DISPLAY_RANKS_EXPLAIN' => 'Limitiert die Anzeige der Spieltags- und Gesamtrangliste in der Hauptansicht. Die eigene Platzierung wird ggf. unten angehängt. ', 'DISPLAY_RANKS_EXPLAIN' => 'Limitiert die Anzeige der Spieltags- und Gesamtrangliste in der Hauptansicht. Die eigene Platzierung wird ggf. unten angehängt. ',
@@ -75,8 +79,8 @@ $lang = array_merge($lang, array(
'USER_VIEW' => 'Tipprunde nur für Teilnehmer sichtbar', 'USER_VIEW' => 'Tipprunde nur für Teilnehmer sichtbar',
'USER_VIEW_EXPLAIN' => 'Soll die Tipprunde nur für Tipprunden-Teilnehmer sichtbar sein?', 'USER_VIEW_EXPLAIN' => 'Soll die Tipprunde nur für Tipprunden-Teilnehmer sichtbar sein?',
'HOST_TIMEZONE' => 'Host Zeitzone', 'TIME_SHIFT' => 'Zeitverschiebung',
'HOST_TIMEZONE_EXPLAIN' => 'Differenz zur Board Zeitzone wenn dein Host in einer anderen Zeitzone steht, damit die Tippabgabe korrekt funktioniert. ', 'TIME_SHIFT_EXPLAIN' => 'Differenz in Stunden zur Board Zeitzone wenn dein Host in einer anderen Zeitzone steht, damit die Tippabgabe korrekt funktioniert. ',
'LEFT_COLUMN' => 'Spaltenbreite Links in Pixeln', 'LEFT_COLUMN' => 'Spaltenbreite Links in Pixeln',
'LEFT_COLUMN_EXPLAIN' => 'Optimale Breite 180 Pixel. Dieser Wert sollte nicht unterschritten werden. ', 'LEFT_COLUMN_EXPLAIN' => 'Optimale Breite 180 Pixel. Dieser Wert sollte nicht unterschritten werden. ',
@@ -120,7 +124,7 @@ $lang = array_merge($lang, array(
'FOOTBALL_REMEMBER_ENABLE_EXPLAIN' => 'Hier kannst Du angeben, ob 1 Tag vor Tippabgabe eine Erinnerungsmail versendet werden soll.', 'FOOTBALL_REMEMBER_ENABLE_EXPLAIN' => 'Hier kannst Du angeben, ob 1 Tag vor Tippabgabe eine Erinnerungsmail versendet werden soll.',
'FOOTBALL_REMEMBER_NEXT_RUN' => 'Nächster Cronjoblauf für die Tipp-Erinnerungsmail', 'FOOTBALL_REMEMBER_NEXT_RUN' => 'Nächster Cronjoblauf für die Tipp-Erinnerungsmail',
'FOOTBALL_REMEMBER_NEXT_RUN_EXPLAIN'=> 'Hier kannst Du einstellen, wann der Cronjob für die Tipp-Erinnerungsmail frühestens wieder aufgerufen wird. Nach Ausführung wird der Cronjob für den Folgetag zur geichen Uhrzeit neu eingeplant.', 'FOOTBALL_REMEMBER_NEXT_RUN_EXPLAIN'=> 'Hier kannst Du einstellen, wann der Cronjob für die Tipp-Erinnerungsmail frühestens wieder aufgerufen wird. Nach Ausführung wird der Cronjob für den Folgetag zur gleichen Uhrzeit neu eingeplant.',
'FOUNDER_DELETE' => 'Nur Gründungsmitglieder dürfen löschen', 'FOUNDER_DELETE' => 'Nur Gründungsmitglieder dürfen löschen',
'FOUNDER_DELETE_EXPLAIN' => 'Löschung von Spielplandaten wie Saisons, Ligen, Teams, Spieltage und Spielpläne nur auf Gründungsmitglieder beschränken. ', 'FOUNDER_DELETE_EXPLAIN' => 'Löschung von Spielplandaten wie Saisons, Ligen, Teams, Spieltage und Spielpläne nur auf Gründungsmitglieder beschränken. ',
@@ -185,6 +189,7 @@ $lang = array_merge($lang, array(
'LOG_FOOTBALL_FEATURES' => '<strong>Tipprunden-Funktionalitäten geändert</strong>', 'LOG_FOOTBALL_FEATURES' => '<strong>Tipprunden-Funktionalitäten geändert</strong>',
'LOG_FOOTBALL_MENU' => '<strong>Tipprunden-Menu geändert</strong>', 'LOG_FOOTBALL_MENU' => '<strong>Tipprunden-Menu geändert</strong>',
'LOG_FOOTBALL_SETTINGS' => '<strong>Tipprunde-Einstellungen geändert</strong>', 'LOG_FOOTBALL_SETTINGS' => '<strong>Tipprunde-Einstellungen geändert</strong>',
'LOG_PL_BACKUP' => '<strong>Tipprunden Backup</strong>',
'LOG_FOOTBALL_MSG_TEST' => 'Aufruf am %s.', 'LOG_FOOTBALL_MSG_TEST' => 'Aufruf am %s.',
'LOG_FOOTBALL_MSG_TEST_TRAVEL' => 'Aufruf mit Zeitreise zum %s.', 'LOG_FOOTBALL_MSG_TEST_TRAVEL' => 'Aufruf mit Zeitreise zum %s.',

View File

@@ -60,6 +60,7 @@ $lang = array_merge($lang, array(
'BET_KOEFF' => 'Bet coefficient', 'BET_KOEFF' => 'Bet coefficient',
'BET_OF' => 'Bet', 'BET_OF' => 'Bet',
'BET_POINTS' => 'Bet', 'BET_POINTS' => 'Bet',
'BET_TIME' => 'Bet time',
'BET_UNTIL_DELIVERY' => 'The matches of a matchday can be entered only up to the deadline of the matchday. Then the bets of others Users become visible for everybody. ', 'BET_UNTIL_DELIVERY' => 'The matches of a matchday can be entered only up to the deadline of the matchday. Then the bets of others Users become visible for everybody. ',
'BETS' => 'Bets', 'BETS' => 'Bets',
'BETS_AND_RANKS' => 'Bets and ranking of', 'BETS_AND_RANKS' => 'Bets and ranking of',
@@ -184,6 +185,7 @@ $lang = array_merge($lang, array(
'LAST_GAMES' => 'The last matches', 'LAST_GAMES' => 'The last matches',
'LAST_GAMES_AWAY' => 'The last away matches', 'LAST_GAMES_AWAY' => 'The last away matches',
'LAST_GAMES_HOME' => 'The last home matches', 'LAST_GAMES_HOME' => 'The last home matches',
'LAST_RESULTS' => 'Last results',
'LAST_VISITORS' => 'Last %s visitors', 'LAST_VISITORS' => 'Last %s visitors',
'LEAGUE' => 'League', 'LEAGUE' => 'League',
'LINK_PREDICTION_LEAGUE' => 'To the WebtTip', 'LINK_PREDICTION_LEAGUE' => 'To the WebtTip',
@@ -277,6 +279,7 @@ $lang = array_merge($lang, array(
'POINTS' => 'Points', 'POINTS' => 'Points',
'POINTS_DIFF' => 'Point difference', 'POINTS_DIFF' => 'Point difference',
'POINTS_DIFFERENCE' => 'Points for the correct Goal difference: %s', 'POINTS_DIFFERENCE' => 'Points for the correct Goal difference: %s',
'POINTS_DIFFERENCE_DRAW' => 'Points for the correct Goal difference (except in case of draw): %s',
'POINTS_DOT' => 'Pt. ', 'POINTS_DOT' => 'Pt. ',
'POINTS_HIT' => 'For the prediction of the correct result (direct hit) there is %s points. ', 'POINTS_HIT' => 'For the prediction of the correct result (direct hit) there is %s points. ',
'POINTS_LAST' => 'Points of the last one for non-betting members', 'POINTS_LAST' => 'Points of the last one for non-betting members',

View File

@@ -40,7 +40,7 @@ if ( empty($lang) || !is_array($lang) )
// » „ “ — … // » „ “ — …
// //
$help = array( $lang = array_merge($lang, array('FOOTBALL_HELP_FAQ' => array(
array( array(
0 => '--', 0 => '--',
1 => 'First steps' 1 => 'First steps'
@@ -96,7 +96,7 @@ footb_rem_s = switch for sending the reminder email to the second E-mail address
0 => 'How do I activate the reminder e-mail function? ', 0 => 'How do I activate the reminder e-mail function? ',
1 => 'In the admin area in the Prediction League functionality the mail reminder cron job and the next run must be activated. <br /> 1 => 'In the admin area in the Prediction League functionality the mail reminder cron job and the next run must be activated. <br />
The cron job is run on the first access after this date and sends an e-mail reminder for the missing tip duties that lie in the period 24-48 hours after cron date . The cron job is run on the first access after this date and sends an e-mail reminder for the missing tip duties that lie in the period 24-48 hours after cron date .
If not sufficient accesses the page, the cron job should automatically run on script "cron.php?cron_type=football_remember". <br /> If not sufficient accesses the page, the cron job should automatically run on script "YOUR_URL/cron.php?cron_type=football.football.cron.task.football_remember". <br />
The ship of the email takes place only once . After calling up the cron job, the next scheduled is automatically planned for the following day . The ship of the email takes place only once . After calling up the cron job, the next scheduled is automatically planned for the following day .
With the appended parameters " & mode = test & days = n " can be tested the shipment for the offset to n days predictions . Only mails to board email address will be shipped . With the appended parameters " & mode = test & days = n " can be tested the shipment for the offset to n days predictions . Only mails to board email address will be shipped .
In ACP a user defined prediction leagues code is to define.<br /> In ACP a user defined prediction leagues code is to define.<br />
@@ -499,5 +499,5 @@ Preliminary results from the update are not used. If these should be taken, this
1 => 'The seasons- and the leagues-data are stored for 5 minutes in the cache, so that the data are downloaded from Source only once. If you need 1 => 'The seasons- and the leagues-data are stored for 5 minutes in the cache, so that the data are downloaded from Source only once. If you need
updated data within that time anyway, you have to delete the cache to force a new download from the Source.' updated data within that time anyway, you have to delete the cache to force a new download from the Source.'
), ),
); )));
?> ?>

View File

@@ -46,6 +46,10 @@ $lang = array_merge($lang, array(
'ACP_FOOTBALL_SETTINGS_EXPLAIN' => 'Here you can carry out some basic settings of the Prediction League, give it a suitable name and description and define a football side announcement and other values. ', 'ACP_FOOTBALL_SETTINGS_EXPLAIN' => 'Here you can carry out some basic settings of the Prediction League, give it a suitable name and description and define a football side announcement and other values. ',
'DISABLE_FOOTBALL' => 'Deactivate Prediction League', 'DISABLE_FOOTBALL' => 'Deactivate Prediction League',
'DISABLE_FOOTBALL_EXPLAIN' => 'You can disable the Prediction League for all users. If you wanted, you can display a short message (up to 255 signs). ', 'DISABLE_FOOTBALL_EXPLAIN' => 'You can disable the Prediction League for all users. If you wanted, you can display a short message (up to 255 signs). ',
'DISPLAY_LAST_USERS' => 'Number of board visitors to display',
'DISPLAY_LAST_USERS_EXPLAIN' => 'Limits the last visitors to display in block. 0 is used to suppress the display of the block. ',
'DISPLAY_LAST_RESULTS' => 'Number of match results to display',
'DISPLAY_LAST_RESULTS_EXPLAIN' => 'Limits the last match results to display in block. If more matches are played on the last day, all results of that day are displayed. 0 is used to suppress the display of the block. ',
'DISPLAY_RANKS' => 'Number of indicated User in total ranking', 'DISPLAY_RANKS' => 'Number of indicated User in total ranking',
'DISPLAY_RANKS_EXPLAIN' => 'Announcement of users in the ranking lists. The ownrank is suspended if necessary below. ', 'DISPLAY_RANKS_EXPLAIN' => 'Announcement of users in the ranking lists. The ownrank is suspended if necessary below. ',
'FOOTBALL_CODE' => 'Prediction League Code', 'FOOTBALL_CODE' => 'Prediction League Code',
@@ -71,8 +75,8 @@ $lang = array_merge($lang, array(
'GUEST_VIEW_EXPLAIN' => 'Should guests be able to see the Prediction League?', 'GUEST_VIEW_EXPLAIN' => 'Should guests be able to see the Prediction League?',
'USER_VIEW' => 'Prediction League only for participants visible', 'USER_VIEW' => 'Prediction League only for participants visible',
'USER_VIEW_EXPLAIN' => 'Should the Prediction League only to participants be visible?', 'USER_VIEW_EXPLAIN' => 'Should the Prediction League only to participants be visible?',
'HOST_TIMEZONE' => 'Host Timezone', 'TIME_SHIFT' => 'Time shift',
'HOST_TIMEZONE_EXPLAIN' => 'Difference to the Board time zone if your Host in another time zone stands, so that the tip delivery correctly functions. ', 'TIME_SHIFT_EXPLAIN' => 'Difference in hours to board time zone if host is in another time zone, so that the tip delivery works correctly. ',
'LEFT_COLUMN' => 'Left column width in pixels', 'LEFT_COLUMN' => 'Left column width in pixels',
'LEFT_COLUMN_EXPLAIN' => 'Optimum width 180 pixels. This value should not be fell short. ', 'LEFT_COLUMN_EXPLAIN' => 'Optimum width 180 pixels. This value should not be fell short. ',
'PREDICTION_LEAGUE' => 'Prediction League', 'PREDICTION_LEAGUE' => 'Prediction League',
@@ -146,6 +150,7 @@ $lang = array_merge($lang, array(
'LOG_FOOTBALL_MSG_TEST_TRAVEL' => 'Call with time travel to %s.', 'LOG_FOOTBALL_MSG_TEST_TRAVEL' => 'Call with time travel to %s.',
'LOG_FOOTBALL_REMEMBER_CRON' => 'Cronjob Football remember running %s', 'LOG_FOOTBALL_REMEMBER_CRON' => 'Cronjob Football remember running %s',
'LOG_FOOTBALL_REMEMBER_CRON_TEST' => 'Cronjob Football remember test call %s', 'LOG_FOOTBALL_REMEMBER_CRON_TEST' => 'Cronjob Football remember test call %s',
'LOG_PL_BACKUP' => '<strong>Prediction League backup</strong>',
'FOOTBALL_REMEMBER_SUBJECT' => 'Please bet %1$s %2$d. matchday', 'FOOTBALL_REMEMBER_SUBJECT' => 'Please bet %1$s %2$d. matchday',
'FOOTBALL_REMEMBER_SUBJECT_BOARD' => 'Sent reminder mails %1$s %2$d', 'FOOTBALL_REMEMBER_SUBJECT_BOARD' => 'Sent reminder mails %1$s %2$d',
'FOOTBALL_REMEMBER_ERROR_EMAIL' => '%1$s reminder email to: %2$d failed', 'FOOTBALL_REMEMBER_ERROR_EMAIL' => '%1$s reminder email to: %2$d failed',

View File

@@ -274,7 +274,6 @@ class v094_beta extends \phpbb\db\migration\migration
array('config.remove', array('football_menu_forumid4')), array('config.remove', array('football_menu_forumid4')),
array('config.remove', array('football_menu_forumid5')), array('config.remove', array('football_menu_forumid5')),
array('config.remove', array('football_menu_forumid6')), array('config.remove', array('football_menu_forumid6')),
array('config.remove', array('football_side')),
array('config.add', array('football_bank', '0', '0')), array('config.add', array('football_bank', '0', '0')),
array('config.add', array('football_code', '0000', '0')), array('config.add', array('football_code', '0000', '0')),
array('config.add', array('football_disable', '0', '0')), array('config.add', array('football_disable', '0', '0')),

View File

@@ -58,23 +58,13 @@ class v094_beta_update extends \phpbb\db\migration\migration
{ {
return array( return array(
'drop_columns' => array( 'drop_columns' => array(
$this->table_prefix . 'groups' => array(
'group_teampage',
),
$this->table_prefix . 'sessions' => array( $this->table_prefix . 'sessions' => array(
'football_season',
'football_league',
'football_matchday',
'football_mobile', 'football_mobile',
'football_mobile_device', 'football_mobile_device',
), ),
$this->table_prefix . 'footb_bets' => array(
'bet_time',
),
$this->table_prefix . 'footb_matches' => array(
'trend',
'odd_1',
'odd_x',
'odd_2',
'rating',
),
) )
); );
} }

30
migrations/v096_beta.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
/**
*
* @package Football Football v0.96
* @copyright (c) 2016 football (http://football.bplaced.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace football\football\migrations;
class v096_beta extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return isset($this->config['football_version']) && version_compare($this->config['football_version'], '0.9.6', '>=');
}
static public function depends_on()
{
return array('\football\football\migrations\v095_beta');
}
public function update_data()
{
return array(
array('config.update', array('football_version', '0.9.6', '0')),
);
}
}

30
migrations/v097_beta.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
/**
*
* @package Football Football v0.97
* @copyright (c) 2016 football (http://football.bplaced.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace football\football\migrations;
class v097_beta extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return isset($this->config['football_version']) && version_compare($this->config['football_version'], '0.9.7', '>=');
}
static public function depends_on()
{
return array('\football\football\migrations\v096_beta');
}
public function update_data()
{
return array(
array('config.update', array('football_version', '0.9.7', '0')),
);
}
}

30
migrations/v098_beta.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
/**
*
* @package Football Football v0.98
* @copyright (c) 2017 football (http://football.bplaced.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace football\football\migrations;
class v098_beta extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return isset($this->config['football_version']) && version_compare($this->config['football_version'], '0.9.8', '>=');
}
static public function depends_on()
{
return array('\football\football\migrations\v097_beta');
}
public function update_data()
{
return array(
array('config.update', array('football_version', '0.9.8', '0')),
);
}
}

34
migrations/v099_beta.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
/**
*
* @package Football Football v0.9.9
* @copyright (c) 2017 football (http://football.bplaced.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace football\football\migrations;
class v099_beta extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return isset($this->config['football_version']) && version_compare($this->config['football_version'], '0.9.9', '>=');
}
static public function depends_on()
{
return array('\football\football\migrations\v098_beta');
}
public function update_data()
{
return array(
array('config.remove', array('football_host_timezone')),
array('config.add', array('football_time_shift', '1', '0')),
array('config.add', array('football_display_last_users', '5', '0')),
array('config.add', array('football_display_last_results', '0', '0')),
array('config.update', array('football_version', '0.9.9', '0')),
);
}
}

View File

@@ -53,7 +53,7 @@
<td class="td_points {bet_view.COLOR_STYLE}">{bet_view.POINTS}</td> <td class="td_points {bet_view.COLOR_STYLE}">{bet_view.POINTS}</td>
<td class="td_button"> <td class="td_button">
<!-- IF S_VIEW <> 'print' and bet_view.DISPLAY_LINK --> <!-- IF S_VIEW <> 'print' and bet_view.DISPLAY_LINK -->
<a class="match_info" title="{L_MATCH_STATS}" href="{bet_view.U_MATCH_STATS}" onclick="javascript:popup(this.href, 818, 750, '_matchstats'); return false;"></a> <a title="{L_MATCH_STATS}" href="{bet_view.U_MATCH_STATS}" onclick="javascript:popup(this.href, 818, 750, '_matchstats'); return false;"><i class="icon fa-bar-chart fa-fw"></i></a>
<!-- ELSE --> <!-- ELSE -->
<img src="./../../ext/football/football/images/spacer.gif" alt="" width="28" height="28" /> <img src="./../../ext/football/football/images/spacer.gif" alt="" width="28" height="28" />
<!-- ENDIF --> <!-- ENDIF -->
@@ -105,7 +105,7 @@
<!-- ENDIF --> <!-- ENDIF -->
<td class="td_button"> <td class="td_button">
<!-- IF S_VIEW <> 'print' and bet_edit.DISPLAY_LINK --> <!-- IF S_VIEW <> 'print' and bet_edit.DISPLAY_LINK -->
<a class="match_info" title="{L_MATCH_STATS}" href="{bet_edit.U_MATCH_STATS}" onclick="javascript:popup(this.href, 818, 750, '_matchstats'); return false;"></a> <a title="{L_MATCH_STATS}" href="{bet_edit.U_MATCH_STATS}" onclick="javascript:popup(this.href, 818, 750, '_matchstats'); return false;"><i class="icon fa-bar-chart fa-fw"></i></a>
<!-- ELSE --> <!-- ELSE -->
<img src="./../../ext/football/football/images/spacer.gif" alt="" width="28" height="28" /> <img src="./../../ext/football/football/images/spacer.gif" alt="" width="28" height="28" />
<!-- ENDIF --> <!-- ENDIF -->

View File

@@ -1,5 +1,5 @@
<div class="panel"> <div class="panel">
<h3><span class="small-icon icon-bet"></span>&nbsp;{L_DELIVERY_LIST}</h3> <h3><i class="icon fa-calendar fa-fw"></i>{L_DELIVERY_LIST}</h3>
<!-- BEGIN delivery --> <!-- BEGIN delivery -->
<span style="cursor:pointer;" title="{delivery.TITLE}" onclick="location.href='{delivery.U_BET_LINK}'"> <span style="cursor:pointer;" title="{delivery.TITLE}" onclick="location.href='{delivery.U_BET_LINK}'">
<span> <strong style="color:{delivery.COLOR};">{delivery.DELIVERY} </strong></span> <br /> <span> <strong style="color:{delivery.COLOR};">{delivery.DELIVERY} </strong></span> <br />

View File

@@ -1 +1 @@
<!-- IF U_FOOTBALL and S_FOOTBALL_BREADCRUMB--><span class="crumb"><a href="{U_FOOTBALL}" data-navbar-reference="football">{S_FOOTBALL_NAME}</a></span><!-- ENDIF --> <!-- IF U_FOOTBALL and S_FOOTBALL_BREADCRUMB--><span class="crumb"><a href="{U_FOOTBALL}" data-navbar-reference="football"><i class="icon fa-futbol-o fa-fw"></i>{S_FOOTBALL_NAME}</a></span><!-- ENDIF -->

View File

@@ -1 +1 @@
<!-- IF U_FOOTBALL and S_FOOTBALL_BREADCRUMB--><span class="crumb"><a href="{U_FOOTBALL}" data-navbar-reference="football">{S_FOOTBALL_NAME}</a></span><!-- ENDIF --> <!-- IF U_FOOTBALL and S_FOOTBALL_BREADCRUMB--><span class="crumb"><a href="{U_FOOTBALL}" data-navbar-reference="football"><i class="icon fa-futbol-o fa-fw"></i>{S_FOOTBALL_NAME}</a></span><!-- ENDIF -->

View File

@@ -14,12 +14,11 @@
background-image: url({S_FOOTBALL_EXT_PATH}images/site_logo.gif); background-image: url({S_FOOTBALL_EXT_PATH}images/site_logo.gif);
padding-left: 0px; padding-left: 0px;
padding-top: 0px; padding-top: 0px;
height: 52px; height: 75px;
width: 52px; width: 75px;
} }
.headerbar { .headerbar {
background: url({S_FOOTBALL_EXT_PATH}styles/prosilver/theme/images/header{S_FOOTBALL_HEADER_LEAGUE}.gif) 300px 5px no-repeat, background: url({S_FOOTBALL_EXT_PATH}styles/prosilver/theme/images/header{S_FOOTBALL_HEADER_LEAGUE}.jpg) 0px 0px no-repeat;
url({S_FOOTBALL_EXT_PATH}styles/prosilver/theme/images/header.jpg) 0px 0px;
background-color: #12A3EB; background-color: #12A3EB;
margin-bottom: 4px; margin-bottom: 4px;
width: auto; width: auto;
@@ -27,3 +26,11 @@
} }
</style> </style>
<!-- ENDIF --> <!-- ENDIF -->
<style>
@media screen and (max-width: 700px){
li.tab i.icon {
display: none;
}
}
</style>

View File

@@ -9,42 +9,36 @@
<ul class="dropdown-contents" role="menu"> <ul class="dropdown-contents" role="menu">
<!-- EVENT navbar_header_football_links_before --> <!-- EVENT navbar_header_football_links_before -->
<!-- IF not S_IS_BOT --> <!-- IF not S_IS_BOT -->
<li class="small-icon icon-bet"><a href="{U_BET}" role="menuitem">{L_BET}</a></li> <li><a href="{U_BET}" role="menuitem"><i class="icon fa-futbol-o fa-fw"></i>{L_BET}</a></li>
<li class="small-icon icon-allbets"><a href="{U_ALL_BETS}" role="menuitem">{L_ALL_BETS}</a></li> <li><a href="{U_ALL_BETS}" role="menuitem"><i class="icon fa-group fa-fw"></i>{L_ALL_BETS}</a></li>
<li class="small-icon icon-results"><a href="{U_RESULTS}" role="menuitem">{L_RESULTS}</a></li> <li><a href="{U_RESULTS}" role="menuitem"><i class="icon fa-check-square-o fa-fw"></i>{L_RESULTS}</a></li>
<li class="small-icon icon-list"><a href="{U_TABLE}" role="menuitem">{L_TABLE}</a></li> <li><a href="{U_RANKS_MATCHDAY}" role="menuitem"><i class="icon fa-trophy fa-fw"></i>{L_RANK_MATCHDAY}</a></li>
<li class="small-icon icon-rank"><a href="{U_RANKS_TOTAL}" role="menuitem">{L_RANK_TOTAL}</a></li> <li><a href="{U_RANKS_TOTAL}" role="menuitem"><i class="icon fa-trophy fa-fw"></i>{L_RANK_TOTAL}</a></li>
<li class="small-icon icon-rank"><a href="{U_RANKS_MATCHDAY}" role="menuitem">{L_RANK_MATCHDAY}</a></li> <li><a href="{U_TABLE}" role="menuitem"><i class="icon fa-list-ol fa-fw"></i>{L_TABLE}</a></li>
<li class="small-icon icon-points"><a href="{U_FOOTBALL_BANK}" role="menuitem">{L_FOOTBALL_BANK}</a></li> <li><a href="{U_FOOTBALL_BANK}" role="menuitem"><i class="icon fa-bank fa-fw"></i>{L_FOOTBALL_BANK}</a></li>
<li class="small-icon icon-rules"><a href="{U_RULES}" role="menuitem" target="popup" onclick="popup('{U_RULES}', 625,625);return false;">{L_RULES}</a></li> <li><a href="{U_RULES}" role="menuitem" target="popup" onclick="popup('{U_RULES}', 625,625);return false;"><i class="icon fa-paragraph fa-fw"></i>{L_RULES}</a></li>
<li class="small-icon icon-download"><a href="{U_EXPORT}" role="menuitem">{L_EXPORT}</a></li> <li><a href="{U_ODDS}" role="menuitem"><i class="icon fa-line-chart fa-fw"></i>{L_ODDS}</a></li>
<li class="small-icon icon-odds"><a href="{U_ODDS}" role="menuitem">{L_ODDS}</a></li>
<li class="separator"></li> <li class="separator"></li>
<!-- IF S_MENU_LINK1--> <!-- IF S_MENU_LINK1-->
<li class="small-icon icon-xml"><a href="{U_MENU_LINK1}" role="menuitem" target="_blank">{MENU_DESC_LINK1}</a></li> <li><a href="{U_MENU_LINK1}" role="menuitem" target="_blank"><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK1}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK2--> <!-- IF S_MENU_LINK2-->
<li class="small-icon icon-xml"><a href="{U_MENU_LINK2}" role="menuitem" target="_blank">{MENU_DESC_LINK2}</a></li> <li><a href="{U_MENU_LINK2}" role="menuitem" target="_blank"><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK2}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK3--> <!-- IF S_MENU_LINK3-->
<li class="small-icon icon-xml"><a href="{U_MENU_LINK3}" role="menuitem" target="_blank">{MENU_DESC_LINK3}</a></li> <li><a href="{U_MENU_LINK3}" role="menuitem" target="_blank"><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK3}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
<li class="separator"></li> <li class="separator"></li>
<li class="small-icon icon-statistics"><a href="{U_MY_BETS}" role="menuitem">{L_MY_BETS}</a></li> <li><a href="{U_MY_BETS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_BETS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_POINTS}" role="menuitem">{L_MY_POINTS}</a></li> <li><a href="{U_MY_POINTS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_POINTS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_TABLE}" role="menuitem">{L_MY_TABLE}</a></li> <li><a href="{U_MY_TABLE}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_TABLE}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_RANK}" role="menuitem">{L_MY_RANK}</a></li> <li><a href="{U_MY_RANK}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_RANK}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_CHART}" role="menuitem">{L_MY_CHART}</a></li> <li><a href="{U_MY_CHART}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_CHART}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_KOEFF}" role="menuitem">{L_MY_KOEFF}</a></li> <li><a href="{U_MY_KOEFF}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_KOEFF}</a></li>
<li class="small-icon icon-statistics"><a href="{U_STAT_POINTS}" role="menuitem">{L_STAT_POINTS}</a></li> <li><a href="{U_STAT_POINTS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_STAT_POINTS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_STAT_RESULTS}" role="menuitem">{L_STAT_RESULTS}</a></li> <li><a href="{U_STAT_RESULTS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_STAT_RESULTS}</a></li>
<li><a href="{U_EXPORT}" role="menuitem"><i class="icon fa-file-excel-o fa-fw"></i>{L_EXPORT}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_FOOTBALL -->
<li class="separator"></li>
<!-- IF U_TEAM --><li class="small-icon icon-odds"><a href="{U_FOOTBALL_ODDS}" role="menuitem">{L_FOOTBALL_ODDS}</a></li><!-- ENDIF -->
<!-- ENDIF -->
<li class="separator"></li>
<!-- EVENT navbar_header_football_links_after --> <!-- EVENT navbar_header_football_links_after -->
</ul> </ul>
</div> </div>

View File

@@ -15,49 +15,49 @@
<p id="dirty"><strong>{S_FOOTBALLSIDE}</strong></p> <p id="dirty"><strong>{S_FOOTBALLSIDE}</strong></p>
<ul class="topiclist"> <ul class="topiclist">
<li class="header"> <li class="header">
<dl class="icon"> <dl>
<dt><a href="{U_FOOTBALL}"><span>{S_FOOTBALL_NAME}</span></a></dt><dd></dd> <dt><a href="{U_FOOTBALL}"><span>{S_FOOTBALL_NAME}</span></a></dt><dd></dd>
</dl> </dl>
</li> </li>
</ul> </ul>
<ul class="topiclist forums" role="menu"> <ul class="topiclist forums" role="menu">
<li class="small-icon icon-bet"><a href="{U_BET}" role="menuitem">{L_BET}</a></li> <li><a href="{U_BET}" role="menuitem"><i class="icon fa-futbol-o fa-fw"></i>{L_BET}</a></li>
<li class="small-icon icon-allbets"><a href="{U_ALL_BETS}" role="menuitem">{L_ALL_BETS}</a></li> <li><a href="{U_ALL_BETS}" role="menuitem"><i class="icon fa-group fa-fw"></i>{L_ALL_BETS}</a></li>
<li class="small-icon icon-results"><a href="{U_RESULTS}" role="menuitem">{L_RESULTS}</a></li> <li><a href="{U_RESULTS}" role="menuitem"><i class="icon fa-check-square-o fa-fw"></i>{L_RESULTS}</a></li>
<li class="small-icon icon-list"><a href="{U_TABLE}" role="menuitem">{L_TABLE}</a></li> <li><a href="{U_TABLE}" role="menuitem"><i class="icon fa-list-ol fa-fw"></i>{L_TABLE}</a></li>
<li class="small-icon icon-rank"><a href="{U_RANKS_TOTAL}" role="menuitem">{L_RANK_TOTAL}</a></li> <li><a href="{U_RANKS_TOTAL}" role="menuitem"><i class="icon fa-trophy fa-fw"></i>{L_RANK_TOTAL}</a></li>
<li class="small-icon icon-rank"><a href="{U_RANKS_MATCHDAY}" role="menuitem">{L_RANK_MATCHDAY}</a></li> <li><a href="{U_RANKS_MATCHDAY}" role="menuitem"><i class="icon fa-trophy fa-fw"></i>{L_RANK_MATCHDAY}</a></li>
<li class="small-icon icon-points"><a href="{U_FOOTBALL_BANK}" role="menuitem">{L_FOOTBALL_BANK}</a></li> <li><a href="{U_FOOTBALL_BANK}" role="menuitem"><i class="icon fa-bank fa-fw"></i>{L_FOOTBALL_BANK}</a></li>
<li class="small-icon icon-rules"><a href="{U_RULES}" role="menuitem" target="popup" onclick="popup('{U_RULES}', 625,625);return false;">{L_RULES}</a></li> <li><a href="{U_RULES}" role="menuitem" target="popup" onclick="popup('{U_RULES}', 625,625);return false;"><i class="icon fa-paragraph fa-fw"></i>{L_RULES}</a></li>
<li class="small-icon icon-download"><a href="{U_EXPORT}" role="menuitem">{L_EXPORT}</a></li> <li><a href="{U_EXPORT}" role="menuitem"><i class="icon fa-file-excel-o fa-fw"></i>{L_EXPORT}</a></li>
<li class="small-icon icon-odds"><a href="{U_ODDS}" role="menuitem">{L_ODDS}</a></li> <li><a href="{U_ODDS}" role="menuitem"><i class="icon fa-line-chart fa-fw"></i>{L_ODDS}</a></li>
<li class="separator"></li> <li class="separator"></li>
<!-- IF S_MENU_LINK1--> <!-- IF S_MENU_LINK1-->
<li class="small-icon icon-xml"><a href="{U_MENU_LINK1}" role="menuitem" target="_blank">{MENU_DESC_LINK1}</a></li> <li><a href="{U_MENU_LINK1}" role="menuitem" target="_blank"><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK1}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK2--> <!-- IF S_MENU_LINK2-->
<li class="small-icon icon-xml"><a href="{U_MENU_LINK2}" role="menuitem" target="_blank">{MENU_DESC_LINK2}</a></li> <li><a href="{U_MENU_LINK2}" role="menuitem" target="_blank"><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK2}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK3--> <!-- IF S_MENU_LINK3-->
<li class="small-icon icon-xml"><a href="{U_MENU_LINK3}" role="menuitem" target="_blank">{MENU_DESC_LINK3}</a></li> <li><a href="{U_MENU_LINK3}" role="menuitem" target="_blank"><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK3}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
</ul> </ul>
<ul class="topiclist cat"> <ul class="topiclist cat">
<li class="header"> <li class="header">
<dl class="icon"> <dl>
<dt>{L_STATISTICS}</dt><dd></dd> <dt>{L_STATISTICS}</dt><dd></dd>
</dl> </dl>
</li> </li>
</ul> </ul>
<ul class="topiclist forums" role="menu"> <ul class="topiclist forums" role="menu">
<li class="small-icon icon-statistics"><a href="{U_MY_BETS}" role="menuitem">{L_MY_BETS}</a></li> <li><a href="{U_MY_BETS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_BETS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_POINTS}" role="menuitem">{L_MY_POINTS}</a></li> <li><a href="{U_MY_POINTS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_POINTS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_TABLE}" role="menuitem">{L_MY_TABLE}</a></li> <li><a href="{U_MY_TABLE}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_TABLE}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_RANK}" role="menuitem">{L_MY_RANK}</a></li> <li><a href="{U_MY_RANK}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_RANK}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_CHART}" role="menuitem">{L_MY_CHART}</a></li> <li><a href="{U_MY_CHART}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_CHART}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_KOEFF}" role="menuitem">{L_MY_KOEFF}</a></li> <li><a href="{U_MY_KOEFF}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_MY_KOEFF}</a></li>
<li class="small-icon icon-statistics"><a href="{U_STAT_POINTS}" role="menuitem">{L_STAT_POINTS}</a></li> <li><a href="{U_STAT_POINTS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_STAT_POINTS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_STAT_RESULTS}" role="menuitem">{L_STAT_RESULTS}</a></li> <li><a href="{U_STAT_RESULTS}" role="menuitem"><i class="icon fa-area-chart fa-fw"></i>{L_STAT_RESULTS}</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@@ -14,46 +14,42 @@
<!-- [+] center block area --> <!-- [+] center block area -->
<div id="football-center-wrapper"> <div id="football-center-wrapper">
<div id="football-center" style="margin: 0 {FOOTBALL_RIGHT_COLUMN}px 0 {FOOTBALL_LEFT_COLUMN}px; padding: 0 4px;"> <div id="football-center" style="margin: 0 {FOOTBALL_RIGHT_COLUMN}px 0 {FOOTBALL_LEFT_COLUMN}px; padding: 0 4px;">
<div id="tabs" style="margin-top: 0px; margin-left: 5px;"> <div id="tabs" class="tabs" style="margin-top: 0px; margin-left: 5px;">
<ul> <ul>
<li class="tab <!-- IF S_DISPLAY_BET -->activetab<!-- ENDIF --> small-icon icon-bet"><a href="{U_BET}"><span>{L_BET}</span></a></li> <li class="tab <!-- IF S_DISPLAY_BET -->activetab<!-- ENDIF -->"><a href="{U_BET}"><span><i class="icon fa-futbol-o fa-fw"></i>{L_BET}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_ALL_BETS -->activetab<!-- ENDIF --> small-icon icon-allbets"><a href="{U_ALL_BETS}"><span>{L_ALL_BETS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_ALL_BETS -->activetab<!-- ENDIF -->"><a href="{U_ALL_BETS}"><span><i class="icon fa-group fa-fw"></i>{L_ALL_BETS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_RESULTS -->activetab<!-- ENDIF --> small-icon icon-results"><a href="{U_RESULTS}"><span>{L_RESULTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_RESULTS -->activetab<!-- ENDIF -->"><a href="{U_RESULTS}"><span><i class="icon fa-check-square-o fa-fw"></i>{L_RESULTS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_TABLE -->activetab<!-- ENDIF --> small-icon icon-list"><a href="{U_TABLE}"><span>{L_TABLE}</span></a></li> <li class="tab <!-- IF S_DISPLAY_RANKS_MATCHDAY -->activetab<!-- ENDIF -->"><a href="{U_RANKS_MATCHDAY}"><span><i class="icon fa-trophy fa-fw"></i>{L_RANK_MATCHDAY}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_RANKS_TOTAL -->activetab<!-- ENDIF --> small-icon icon-rank"><a href="{U_RANKS_TOTAL}"><span>{L_RANK_TOTAL}</span></a></li> <li class="tab <!-- IF S_DISPLAY_RANKS_TOTAL -->activetab<!-- ENDIF -->"><a href="{U_RANKS_TOTAL}"><span><i class="icon fa-trophy fa-fw"></i>{L_RANK_TOTAL}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_RANKS_MATCHDAY -->activetab<!-- ENDIF --> small-icon icon-rank"><a href="{U_RANKS_MATCHDAY}"><span>{L_RANK_MATCHDAY}</span></a></li> <li class="tab <!-- IF S_DISPLAY_TABLE -->activetab<!-- ENDIF -->"><a href="{U_TABLE}"><span><i class="icon fa-list-ol fa-fw"></i>{L_TABLE}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_BANK -->activetab<!-- ENDIF --> small-icon icon-points"><a href="{U_FOOTBALL_BANK}"><span>{L_FOOTBALL_BANK}</span></a></li> <li class="tab <!-- IF S_DISPLAY_BANK -->activetab<!-- ENDIF -->"><a href="{U_FOOTBALL_BANK}"><span><i class="icon fa-bank fa-fw"></i>{L_FOOTBALL_BANK}</span></a></li>
<li class="tab small-icon icon-rules"><a href="{U_RULES}" target="popup" onclick="popup('{U_RULES}', 625,625);return false;"><span>{L_RULES}</span></a></li> <li class="tab"><a href="{U_RULES}" target="popup" onclick="popup('{U_RULES}', 625,625);return false;"><span><i class="icon fa-paragraph fa-fw"></i>{L_RULES}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_ODDS -->activetab<!-- ENDIF --> small-icon icon-odds"><a href="{U_ODDS}"><span>{L_ODDS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_ODDS -->activetab<!-- ENDIF -->"><a href="{U_ODDS}"><span><i class="icon fa-line-chart fa-fw"></i>{L_ODDS}</span></a></li>
<li class="tab small-icon icon-print"><a href="{U_PRINT_FOOTBALL}" accesskey="d" target="_blank"><span>{L_PRINT_FOOTBALL}</span></a></li> <li class="tab"><a href="{U_PRINT_FOOTBALL}" accesskey="d" target="_blank"><span><i class="icon fa-print fa-fw"></i>{L_PRINT_FOOTBALL}</span></a></li>
<!-- IF S_MENU_LINK1--> <!-- IF S_MENU_LINK1-->
<li class="tab small-icon icon-xml"><a href="{U_MENU_LINK1}" target="_blank"><span>{MENU_DESC_LINK1}</span></a></li> <li class="tab"><a href="{U_MENU_LINK1}" target="_blank"><span><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK1}</span></a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK2--> <!-- IF S_MENU_LINK2-->
<li class="tab small-icon icon-xml"><a href="{U_MENU_LINK2}" target="_blank"><span>{MENU_DESC_LINK2}</span></a></li> <li class="tab"><a href="{U_MENU_LINK2}" target="_blank"><span><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK2}</span></a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK3--> <!-- IF S_MENU_LINK3-->
<li class="tab small-icon icon-xml"><a href="{U_MENU_LINK3}" target="_blank"><span>{MENU_DESC_LINK3}</span></a></li> <li class="tab"><a href="{U_MENU_LINK3}" target="_blank"><span><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK3}</span></a></li>
<!-- ENDIF --> <!-- ENDIF -->
<li class="tab <!-- IF S_DISPLAY_MY_BETS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_BETS}"><span>{L_MY_BETS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_BETS -->activetab<!-- ENDIF -->"><a href="{U_MY_BETS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_BETS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_POINTS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_POINTS}"><span>{L_MY_POINTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_POINTS -->activetab<!-- ENDIF -->"><a href="{U_MY_POINTS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_POINTS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_TABLE -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_TABLE}"><span>{L_MY_TABLE}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_TABLE -->activetab<!-- ENDIF -->"><a href="{U_MY_TABLE}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_TABLE}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_RANK -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_RANK}"><span>{L_MY_RANK}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_RANK -->activetab<!-- ENDIF -->"><a href="{U_MY_RANK}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_RANK}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_CHART -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_CHART}"><span>{L_MY_CHART}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_CHART -->activetab<!-- ENDIF -->"><a href="{U_MY_CHART}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_CHART}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_KOEFF -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_KOEFF}"><span>{L_MY_KOEFF}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_KOEFF -->activetab<!-- ENDIF -->"><a href="{U_MY_KOEFF}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_KOEFF}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_STAT_POINTS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_STAT_POINTS}"><span>{L_STAT_POINTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_STAT_POINTS -->activetab<!-- ENDIF -->"><a href="{U_STAT_POINTS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_STAT_POINTS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_STAT_RESULTS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_STAT_RESULTS}"><span>{L_STAT_RESULTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_STAT_RESULTS -->activetab<!-- ENDIF -->"><a href="{U_STAT_RESULTS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_STAT_RESULTS}</span></a></li>
<li class="tab small-icon icon-download"><a href="{U_EXPORT}"><span>{L_EXPORT}</span></a></li> <li class="tab"><a href="{U_EXPORT}"><span><i class="icon fa-file-excel-o fa-fw"></i>{L_EXPORT}</span></a></li>
</ul> </ul>
</div> </div>
<div class="panel"> <div class="panel">
<!-- IF S_FOOTBALL_TABS --> <div class="navbar football_nav">
<div class="left-box football-h3" style="margin-left:5px; width:35%"><a title="{LEFT_TITLE}" href="{U_LEFT}">{LEFT_LINK}</a></div> <div>
<div class="right-box football-h3" style="margin-right:5px; width:35%"><a title="{RIGHT_TITLE}" href="{U_RIGHT}">{RIGHT_LINK}</a></div>
<div style="display:inline; text-align:center;"><div ><H3>{S_SIDENAME} <a href="{U_PRINT_FOOTBALL}" title="{L_PRINT_FOOTBALL}" accesskey="p" class="football_print" style="vertical-align: top;"></a></H3></div></div>
<!-- ENDIF -->
<div class="navbar football_bg">
<!-- IF .form_season --> <!-- IF .form_season -->
<form style="display:inline; margin:0; padding:0;" action="{S_FORMSELF}" method="post"> <form style="display:inline; margin:0; padding:0;" action="{S_FORMSELF}" method="post">
<div style="float:left;"> <div style="float:left;">
@@ -84,7 +80,7 @@
<!-- IF .form_matchday and not S_MATCHDAY_HIDE --> <!-- IF .form_matchday and not S_MATCHDAY_HIDE -->
<div style="float:left;"> <div style="float:left;">
<!-- IF S_PREV_LINK --> <!-- IF S_PREV_LINK -->
<a class="prev_matchday" title="{L_SHOW_PREV}" href="{S_PREV_LINK}"></a> <a title="{L_SHOW_PREV}" href="{S_PREV_LINK}"><i class="icon fa-minus-square fa-fw" style="line-height: 2em; text-align: right;"></i></a>
<!-- ELSE --> <!-- ELSE -->
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<!-- ENDIF --> <!-- ENDIF -->
@@ -104,7 +100,7 @@
</form> </form>
<div style="float:left;"> <div style="float:left;">
<!-- IF S_NEXT_LINK --> <!-- IF S_NEXT_LINK -->
<a class="next_matchday" title="{L_SHOW_NEXT}" href="{S_NEXT_LINK}"></a> <a title="{L_SHOW_NEXT}" href="{S_NEXT_LINK}"><i class="icon fa-plus-square fa-fw" style="line-height: 2em;"></i></a>
<!-- ELSE --> <!-- ELSE -->
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<!-- ENDIF --> <!-- ENDIF -->
@@ -115,6 +111,7 @@
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
</div>
<!-- IF S_DISPLAY_UNDER_CONSTRUCTION --> <!-- IF S_DISPLAY_UNDER_CONSTRUCTION -->
<!-- INCLUDE under_construction.html --> <!-- INCLUDE under_construction.html -->
@@ -197,6 +194,9 @@
<!-- IF S_DISPLAY_RANK_MATCHDAY --> <!-- IF S_DISPLAY_RANK_MATCHDAY -->
<!-- INCLUDE rank_matchday.html --> <!-- INCLUDE rank_matchday.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_SIDE_TABLE -->
<!-- INCLUDE side_table.html -->
<!-- ENDIF -->
<!-- IF S_DISPLAY_DELIVERY --> <!-- IF S_DISPLAY_DELIVERY -->
<!-- INCLUDE delivery.html --> <!-- INCLUDE delivery.html -->
<!-- ENDIF --> <!-- ENDIF -->
@@ -210,6 +210,9 @@
<!-- IF S_DISPLAY_RANK_TOTAL --> <!-- IF S_DISPLAY_RANK_TOTAL -->
<!-- INCLUDE rank_total.html --> <!-- INCLUDE rank_total.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_LAST_RESULTS -->
<!-- INCLUDE last_results.html -->
<!-- ENDIF -->
</div> </div>
<!-- [-] right block area --> <!-- [-] right block area -->
<br class="football-clear" /> <br class="football-clear" />

View File

@@ -36,7 +36,6 @@
<!-- IF S_DISPLAY_ALL_BETS --> <!-- IF S_DISPLAY_ALL_BETS -->
<table class="football"> <table class="football">
<tr> <tr>
style="vertical-align: top;"
<!-- INCLUDE all_bets.html --> <!-- INCLUDE all_bets.html -->
</td> </td>
<td style="width:4px; vertical-align: top;"></td> <td style="width:4px; vertical-align: top;"></td>

View File

@@ -0,0 +1,13 @@
<!-- IF S_DATA_LAST_RESULTS -->
<div class="panel"> <h3><i class="icon fa-check-square-o fa-fw"></i>{L_LAST_RESULTS}</h3>
<!-- BEGIN last_results -->
<div style="text-align:center;" class="{last_results.COLOR_STYLE}" title="{last_results.LEAGUE_NAME}: {last_results.MATCH_TIME}"
onclick="location.href='{last_results.U_RESULTS_LINK}'">
{last_results.LOGO_HOME} {last_results.GOALS_HOME}:{last_results.GOALS_GUEST} {last_results.LOGO_GUEST}
</div>
<!-- IF last_results.KOGOALS_HOME != '- ' -->
<div style="text-align:center;">({last_results.KOGOALS_HOME}:{last_results.KOGOALS_GUEST})</div>
<!-- ENDIF -->
<div style="text-align:center;">{last_results.HOME_SHORT} - {last_results.GUEST_SHORT}</div><hr />
<!-- END last_results --></div>
<!-- ENDIF -->

View File

@@ -1,4 +1,4 @@
<div class="panel"> <div class="panel"> <h3><i class="icon fa-sign-in fa-fw"></i>{LAST_USERS}</h3>
<!-- BEGIN last_users --> <!-- BEGIN last_users -->
<span class="genmed">{last_users.USER_NAME}</span> <br /> <span class="gensmall">{last_users.LAST_VISIT_DATE}</span><hr /> <span class="genmed">{last_users.USER_NAME}</span> <br /> <span class="gensmall">{last_users.LAST_VISIT_DATE}</span><hr />
<!-- BEGIN last_users --> <!-- END last_users --></div>

View File

@@ -6,37 +6,37 @@
<strong>{L_INFORMATION}:</strong> {S_FOOTBALL_INFO} <strong>{L_INFORMATION}:</strong> {S_FOOTBALL_INFO}
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
<div id="tabs" style="margin-top: 0px; margin-left: 5px;"> <div id="tabs" class="tabs" style="margin-top: 0px; margin-left: 5px;">
<ul> <ul>
<li class="tab <!-- IF S_DISPLAY_BET -->activetab<!-- ENDIF --> small-icon icon-bet"><a href="{U_BET}"><span>{L_BET}</span></a></li> <li class="tab <!-- IF S_DISPLAY_BET -->activetab<!-- ENDIF -->"><a href="{U_BET}"><span><i class="icon fa-futbol-o fa-fw"></i>{L_BET}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_ALL_BETS -->activetab<!-- ENDIF --> small-icon icon-allbets"><a href="{U_ALL_BETS}"><span>{L_BETS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_ALL_BETS -->activetab<!-- ENDIF -->"><a href="{U_ALL_BETS}"><span><i class="icon fa-group fa-fw"></i>{L_BETS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_RESULTS -->activetab<!-- ENDIF --> small-icon icon-results"><a href="{U_RESULTS}"><span>{L_RESULTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_RESULTS -->activetab<!-- ENDIF -->"><a href="{U_RESULTS}"><span><i class="icon fa-check-square-o fa-fw"></i>{L_RESULTS_SHORT_DOT}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_TABLE -->activetab<!-- ENDIF --> small-icon icon-list"><a href="{U_TABLE}"><span>{L_TABLE}</span></a></li> <li class="tab <!-- IF S_DISPLAY_RANKS_MATCHDAY -->activetab<!-- ENDIF -->"><a href="{U_RANKS_MATCHDAY}"><span><i class="icon fa-trophy fa-fw"></i>{L_MATCHDAY_SHORT}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_RANKS_TOTAL -->activetab<!-- ENDIF --> small-icon icon-rank"><a href="{U_RANKS_TOTAL}"><span>{L_TOTAL}</span></a></li> <li class="tab <!-- IF S_DISPLAY_RANKS_TOTAL -->activetab<!-- ENDIF -->"><a href="{U_RANKS_TOTAL}"><span><i class="icon fa-trophy fa-fw"></i>{L_TOTAL}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_RANKS_MATCHDAY -->activetab<!-- ENDIF --> small-icon icon-rank"><a href="{U_RANKS_MATCHDAY}"><span>{L_MATCHDAY_SHORT}</span></a></li> <li class="tab <!-- IF S_DISPLAY_TABLE -->activetab<!-- ENDIF -->"><a href="{U_TABLE}"><span><i class="icon fa-list-ol fa-fw"></i>{L_TABLE}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_DELIVERY -->activetab<!-- ENDIF --> small-icon icon-bet"><a href="{U_DELIVERY_LIST}"><span>{L_DATES}</span></a></li> <li class="tab <!-- IF S_DISPLAY_DELIVERY -->activetab<!-- ENDIF -->"><a href="{U_DELIVERY_LIST}"><span><i class="icon fa-calendar fa-fw"></i>{L_DATES}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_LAST_USERS -->activetab<!-- ENDIF --> small-icon icon-allbets"><a href="{U_LAST_VISITORS}"><span>{L_USERS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_LAST_USERS -->activetab<!-- ENDIF -->"><a href="{U_LAST_VISITORS}"><span><i class="icon fa-sign-in fa-fw"></i>{L_USERS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_BANK -->activetab<!-- ENDIF --> small-icon icon-points"><a href="{U_FOOTBALL_BANK}"><span>{L_FOOTBALL_BANK}</span></a></li> <li class="tab <!-- IF S_DISPLAY_BANK -->activetab<!-- ENDIF -->"><a href="{U_FOOTBALL_BANK}"><span><i class="icon fa-bank fa-fw"></i>{L_FOOTBALL_BANK}</span></a></li>
<li class="tab small-icon icon-rules"><a href="{U_RULES}" target="popup" onclick="popup('{U_RULES}', 625,625);return false;"><span>{L_RULES}</span></a></li> <li class="tab"><a href="{U_RULES}" target="popup" onclick="popup('{U_RULES}', 625,625);return false;"><span><i class="icon fa-paragraph fa-fw"></i>{L_RULES}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_ODDS -->activetab<!-- ENDIF --> small-icon icon-odds"><a href="{U_ODDS}"><span>{L_ODDS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_ODDS -->activetab<!-- ENDIF -->"><a href="{U_ODDS}"><span><i class="icon fa-line-chart fa-fw"></i>{L_ODDS}</span></a></li>
<li class="tab small-icon icon-print"><a href="{U_PRINT_FOOTBALL}" accesskey="d" target="_blank"><span>{L_PRINT_FOOTBALL}</span></a></li> <li class="tab"><a href="{U_PRINT_FOOTBALL}" accesskey="d" target="_blank"><span><i class="icon fa-print fa-fw"></i>{L_PRINT_FOOTBALL}</span></a></li>
<!-- IF S_MENU_LINK1--> <!-- IF S_MENU_LINK1-->
<li class="tab small-icon icon-xml"><a href="{U_MENU_LINK1}" target="_blank"><span>{MENU_DESC_LINK1}</span></a></li> <li class="tab"><a href="{U_MENU_LINK1}" target="_blank"><span><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK1}</span></a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK2--> <!-- IF S_MENU_LINK2-->
<li class="tab small-icon icon-xml"><a href="{U_MENU_LINK2}" target="_blank"><span>{MENU_DESC_LINK2}</span></a></li> <li class="tab"><a href="{U_MENU_LINK2}" target="_blank"><span><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK2}</span></a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_MENU_LINK3--> <!-- IF S_MENU_LINK3-->
<li class="tab small-icon icon-xml"><a href="{U_MENU_LINK3}" target="_blank"><span>{MENU_DESC_LINK3}</span></a></li> <li class="tab"><a href="{U_MENU_LINK3}" target="_blank"><span><i class="icon fa-external-link fa-fw"></i>{MENU_DESC_LINK3}</span></a></li>
<!-- ENDIF --> <!-- ENDIF -->
<li class="tab <!-- IF S_DISPLAY_MY_BETS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_BETS}"><span>{L_MY_BETS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_BETS -->activetab<!-- ENDIF -->"><a href="{U_MY_BETS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_BETS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_POINTS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_POINTS}"><span>{L_MY_POINTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_POINTS -->activetab<!-- ENDIF -->"><a href="{U_MY_POINTS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_POINTS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_TABLE -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_TABLE}"><span>{L_MY_TABLE}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_TABLE -->activetab<!-- ENDIF -->"><a href="{U_MY_TABLE}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_TABLE}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_RANK -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_RANK}"><span>{L_MY_RANK}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_RANK -->activetab<!-- ENDIF -->"><a href="{U_MY_RANK}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_RANK}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_CHART -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_CHART}"><span>{L_MY_CHART}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_CHART -->activetab<!-- ENDIF -->"><a href="{U_MY_CHART}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_CHART}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_MY_KOEFF -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_MY_KOEFF}"><span>{L_MY_KOEFF}</span></a></li> <li class="tab <!-- IF S_DISPLAY_MY_KOEFF -->activetab<!-- ENDIF -->"><a href="{U_MY_KOEFF}"><span><i class="icon fa-area-chart fa-fw"></i>{L_MY_KOEFF}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_STAT_POINTS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_STAT_POINTS}"><span>{L_STAT_POINTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_STAT_POINTS -->activetab<!-- ENDIF -->"><a href="{U_STAT_POINTS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_STAT_POINTS}</span></a></li>
<li class="tab <!-- IF S_DISPLAY_STAT_RESULTS -->activetab<!-- ENDIF --> small-icon icon-statistics"><a href="{U_STAT_RESULTS}"><span>{L_STAT_RESULTS}</span></a></li> <li class="tab <!-- IF S_DISPLAY_STAT_RESULTS -->activetab<!-- ENDIF -->"><a href="{U_STAT_RESULTS}"><span><i class="icon fa-area-chart fa-fw"></i>{L_STAT_RESULTS}</span></a></li>
</ul> </ul>
</div> </div>
<div class="panel"> <div class="panel">

View File

@@ -1,57 +0,0 @@
<!-- INCLUDE simple_header.html -->
<!--//<link href="{T_THEME_PATH}/football.css" rel="stylesheet" type="text/css" media="screen, projection" /> -->
<div class="panel">
<br />
<div class="navbar football_bg">
<div class="maintitle">{MODE_DESC} {LOGO} {TEAM} <br /> {LEAGUE} {SEASON}</div>
</div>
<br />
<!-- IF S_DATA_PLAN -->
<span class="match_win">{L_WON}</span> - <span class="match_draw">{L_DRAW}</span> - <span class="match_lost">{L_LOST}</span>
<div class="forabg">
<table class="football">
<thead>
<tr>
<th>{L_DATE}</th>
<!-- IF S_DATA_GROUP -->
<th>{L_GR}</th>
<!-- ENDIF -->
<th colspan="5">{L_VS}</th>
<!-- IF S_DATA_RESULTS -->
<th colspan="3">{L_RESULT}</th>
<!-- ENDIF -->
</tr>
</thead>
<tbody>
<!-- BEGIN match -->
<tr class="{match.ROW_CLASS}">
<td>{match.MATCH_TIME}</td>
<!-- IF S_DATA_GROUP -->
<td class="td_group">{match.GROUP}</td>
<!-- ENDIF -->
<td class="td_logo">{match.LOGO_HOME}</td>
<td class="td_team {match.COLOR_HOME}">{match.HOME_NAME}</td>
<td class="td_vs">:</td>
<td class="td_logo">{match.LOGO_GUEST}</td>
<td class="td_team {match.COLOR_GUEST}">{match.GUEST_NAME}</td>
<!-- IF S_DATA_RESULTS -->
<td class="td_goals_home {match.COLOR_GOALS}">{match.GOALS_HOME}</td>
<td class="td_vs {match.COLOR_GOALS}">:</td>
<td class="td_goals_guest {match.COLOR_GOALS}">{match.GOALS_GUEST}</td>
<!-- ENDIF -->
</tr>
<!-- END match -->
</tbody>
</table>
</div>
<!-- ELSE -->
<br />
<div class="message">{S_ERROR_MESSAGE}</div>
<br />
<!-- ENDIF -->
<div style="text-align:center">
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
</div>
</div>
<!-- INCLUDE simple_footer.html -->

View File

@@ -42,7 +42,7 @@
<td style="text-align: center;">{odds.TREND}</td> <td style="text-align: center;">{odds.TREND}</td>
<td class="td_button"> <td class="td_button">
<!-- IF S_VIEW <> 'print' --> <!-- IF S_VIEW <> 'print' -->
<a class="match_info" title="{L_MATCH_STATS}" href="{odds.U_MATCH_STATS}" onclick="popup(this.href, 818, 450, '_matchstats'); return false;"></a> <a title="{L_MATCH_STATS}" href="{odds.U_MATCH_STATS}" onclick="popup(this.href, 818, 450, '_matchstats'); return false;"><i class="icon fa-bar-chart fa-fw"></i></a>
<!-- ELSE --> <!-- ELSE -->
<img src="./../../ext/football/football/images/spacer.gif" alt="" width="28" height="28" /> <img src="./../../ext/football/football/images/spacer.gif" alt="" width="28" height="28" />
<!-- ENDIF --> <!-- ENDIF -->

View File

@@ -1,5 +1,5 @@
<div class="panel"> <div class="panel">
<h3><span class="small-icon icon-rank"></span>&nbsp;{L_RANK_MATCHDAY}</h3> <h3><i class="icon fa-trophy fa-fw"></i>{L_RANK_MATCHDAY}</h3>
<!-- IF S_DATA_RANK_MATCHDAY --> <!-- IF S_DATA_RANK_MATCHDAY -->
<table class="forabg rank"> <table class="forabg rank">
<thead> <thead>

View File

@@ -1,9 +1,5 @@
<div class="panel"> <div class="panel">
<h3><!-- IF S_VIEW <> 'print' --> <h3><i class="icon fa-trophy fa-fw"></i>{L_RANK_TOTAL}</h3>
<span class="small-icon icon-rank"></span>&nbsp;
<!-- ENDIF -->
{L_RANK_TOTAL}
</h3>
<!-- IF S_DATA_RANK_TOTAL --> <!-- IF S_DATA_RANK_TOTAL -->
<table class="forabg rank"> <table class="forabg rank">
<thead> <thead>

View File

@@ -49,7 +49,12 @@
onclick="window.location.href='{rankstotal.U_PROFILE}';"> onclick="window.location.href='{rankstotal.U_PROFILE}';">
<td class="td_rank">{rankstotal.RANK}</td> <td class="td_rank">{rankstotal.RANK}</td>
<!-- IF not S_HEADER --> <!-- IF not S_HEADER -->
<td><!-- IF S_VIEW == 'print' -->{rankstotal.CHANGE_SIGN}<!-- ELSE -->{rankstotal.CHANGE_IMG}<!-- ENDIF -->{rankstotal.CHANGE_DIFFER}</td> <td><!-- IF S_VIEW == 'print' -->{rankstotal.CHANGE_SIGN}
<!-- ELSE --> <!-- IF rankstotal.WORSENED --> <i class="icon fa-arrow-down fa-fw icon-red" aria-hidden="true"></i><!-- ENDIF -->
<!-- IF rankstotal.NO_CHANGES --><i class="icon fa-circle fa-fw icon-gray" aria-hidden="true"></i><!-- ENDIF -->
<!-- IF rankstotal.IMPROVED --><i class="icon fa-arrow-up fa-fw icon-green" aria-hidden="true"></i><!-- ENDIF -->
<!-- ENDIF -->{rankstotal.CHANGE_DIFFER}
</td>
<!-- ENDIF --> <!-- ENDIF -->
<td class="td_name">{rankstotal.USERNAME}</td> <td class="td_name">{rankstotal.USERNAME}</td>
<!-- IF S_LINK_RANKING <> '' and S_LINK_ALL_TIME <> '' --> <!-- IF S_LINK_RANKING <> '' and S_LINK_ALL_TIME <> '' -->

View File

@@ -0,0 +1,36 @@
<div class="panel">
<h3><i class="icon fa-list-ol fa-fw"></i>{L_TABLE_TOTAL}</h3>
<!-- IF S_DATA_SIDE_TABLE -->
<table class="forabg rank">
<thead>
<tr>
<th>{L_RANK_SHORT}</th>
<th colspan="2" style="text-align: center;">{L_TEAM}</th>
<th>{L_GAMES_SHORT}</th>
<th style="text-align: right;">{L_POINTS_SHORT}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN side_total -->
<!-- IF side_total.GROUP <> '' -->
<tr class="row_group">
<td colspan="12" style="text-align: center;">{side_total.GROUP}</td>
</tr>
<!-- ELSE -->
<tr class="{side_total.ROW_CLASS}" style="cursor:pointer;" title="{L_SHOW_PLAYED}" onclick="popup('{side_total.U_PLAN_TEAM}');return false;">
<td class="td_rank">{side_total.RANK}</td>
<td class="td_logo">{side_total.LOGO}</td>
<td class="td_team">{side_total.TEAM_SHORT}</td>
<td class="td_hits">{side_total.GAMES}</td>
<td class="td_pts">{side_total.POINTS}</td>
</tr>
<!-- ENDIF -->
<!-- END side_total -->
</tbody>
</table>
<!-- ELSE -->
<div class="message">{L_NO_TABLE}</div>
<br />
<!-- ENDIF -->
</div>

View File

@@ -3,6 +3,15 @@
* @copyright (c) 2016 football (http://football.bplaced.net) * @copyright (c) 2016 football (http://football.bplaced.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
* ----------------------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------------------- */
.fa-paragraph:before {
font-weight: bold;
content: '§';
}
ul.dropdown-contents i.icon {
display: inline;
float: left;
}
.football-table-scroll { .football-table-scroll {
overflow-x:auto; overflow-x:auto;
@@ -31,34 +40,6 @@
font-size: 0; font-size: 0;
} }
span.small-icon {
display: inline-block;
vertical-align: top;
overflow: hidden;
width: 16px;
height: 14px;
}
.icon-allbets { background-image: url("./images/icon_allbets.gif"); }
.icon-ball { background-image: url("./images/icon_ball.gif"); }
.icon-ball2 { background-image: url("./images/icon_ball2.gif"); }
.icon-bet { background-image: url("./images/icon_bet.gif"); }
.icon-bookmark { background-image: url("./images/icon_bookmark.gif"); }
.icon-download { background-image: url("./images/icon_download.gif"); }
.icon-football { background-image: url("./images/icon_football.gif"); background-repeat: no-repeat; }
.icon-info { background-image: url("./images/icon_info.gif"); }
.icon-list { background-image: url("./images/icon_list.gif"); }
.icon-mark { background-image: url("./images/icon_mark.gif"); }
.icon-odds { background-image: url("./images/icon_odds.gif"); }
.icon-points { background-image: url("./images/icon_points.gif"); }
.icon-print { background-image: url("./images/icon_print.gif"); }
.icon-rank { background-image: url("./images/icon_rank.gif"); }
.icon-results { background-image: url("./images/icon_results.gif"); }
.icon-rules { background-image: url("./images/icon_rules.gif"); }
.icon-statistics { background-image: url("./images/icon_statistics.gif"); }
.icon-xml { background-image: url("./images/icon_xml.gif"); }
/** /**
* Replacement for table layout * Replacement for table layout
*/ */
@@ -163,6 +144,13 @@ div.info {
width: 155px; width: 155px;
} }
.football_nav {
margin-bottom: 5px;
padding: 5px 5px;
clear: both;
line-height:2em;
}
.football_bg { .football_bg {
margin-bottom: 5px; margin-bottom: 5px;
padding: 0 5px; padding: 0 5px;
@@ -266,42 +254,6 @@ a.pastlink:hover, a.futurelink:hover {
text-decoration: underline; text-decoration: underline;
} }
a.football_print {
background-image: url("./images/icon_print.gif");
display: inline-block;
vertical-align: top;
overflow: hidden;
width: 16px;
height: 14px;
}
a.match_info {
display: block;
overflow: hidden;
width: 28px;
height: 28px;
text-indent: -5000px;
text-align: left;
background-repeat: no-repeat;
background-image: url("./images/icon_statistic.gif");
}
a.prev_matchday {
background: transparent url("./images/left_arrow.png") no-repeat scroll 50% 0;
display: inline-block;
overflow: hidden;
width: 16px;
height: 16px;
}
a.next_matchday {
background: transparent url("./images/right_arrow.png") no-repeat scroll 0 0;
display: inline-block;
overflow: hidden;
width: 16px;
height: 16px;
}
.message { .message {
font-weight: bold; font-weight: bold;
color: #AA0000; color: #AA0000;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B