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
This commit is contained in:
@@ -219,7 +219,6 @@ class all_bets_module
|
||||
$split_after = $count_matches;
|
||||
$splits = 1;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Make sure $start is set to the last page if it exceeds the amount
|
||||
if ($start < 0 || $start >= $total_users)
|
||||
@@ -311,7 +310,7 @@ class all_bets_module
|
||||
$total = 0;
|
||||
}
|
||||
$bet_index++;
|
||||
$total += $user_bet['points'];
|
||||
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||
if ($user_bet['status'] < 3)
|
||||
{
|
||||
$colorstyle_total = ' color_provisionally';
|
||||
@@ -419,7 +418,7 @@ class all_bets_module
|
||||
$total = 0;
|
||||
}
|
||||
$bet_index++;
|
||||
$total += $user_bet['points'];
|
||||
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||
if ($user_bet['status'] < 3)
|
||||
{
|
||||
$colorstyle_total = ' color_provisionally';
|
||||
@@ -573,7 +572,9 @@ class all_bets_module
|
||||
)
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result_bet);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$legend = delivery($season, $league, $matchday);
|
||||
|
||||
|
||||
@@ -184,6 +184,7 @@ class bank_module
|
||||
AND points_type IN (" . POINTS_MATCHDAY . ',' . POINTS_SEASON . ',' . POINTS_MOST_HITS . ',' . POINTS_MOST_HITS_AWAY . ')';
|
||||
$result = $db->sql_query($sql);
|
||||
$count_updates += $db->sql_affectedrows();
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -199,6 +200,7 @@ class bank_module
|
||||
HAVING win > 0";
|
||||
$result = $db->sql_query($sql);
|
||||
$points_ary = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
if (!$default_matchday)
|
||||
{
|
||||
$matchday = (curr_matchday($season, $league) > 0) ? curr_matchday($season, $league) : 1;
|
||||
@@ -351,6 +353,7 @@ class bank_module
|
||||
AND points_type = $type";
|
||||
$result = $db->sql_query($sql);
|
||||
$count_updates += $db->sql_affectedrows();
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
$back_link = $this->u_action . '&action=list&s=' . $season . '&l=' . $league . '&t=' . $type . '&start=' . $start;
|
||||
trigger_error(sprintf($user->lang['LEAGUE_' . $points_var . ($count_updates == 1 ? '' : 'S')], $count_updates) . adm_back_link($back_link));
|
||||
|
||||
@@ -325,6 +325,7 @@ class bets_module
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($resultopen);
|
||||
if ($count_updates > 0)
|
||||
{
|
||||
if ($same AND ($count_matches > 6) AND $this->config['football_same_allowed'] == 0)
|
||||
@@ -358,7 +359,6 @@ class bets_module
|
||||
{
|
||||
$success[] = sprintf($user->lang['NO_BETS_SAVED']);
|
||||
}
|
||||
$db->sql_freeresult($resultopen);
|
||||
|
||||
// extra bets
|
||||
$sql = 'SELECT * FROM ' . FOOTB_EXTRA . " WHERE season = $season AND league = $league AND matchday = $matchday";
|
||||
@@ -418,6 +418,7 @@ class bets_module
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($resultextra);
|
||||
if ($count_extra_updates)
|
||||
{
|
||||
$success[] = sprintf($user->lang['EXTRA_BET' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
||||
@@ -582,7 +583,8 @@ class bets_module
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$db->sql_freeresult($resultopen);
|
||||
|
||||
// Calculate extra bets of matchday
|
||||
// Start select team
|
||||
$sql = 'SELECT
|
||||
|
||||
@@ -151,8 +151,6 @@ class extra_module
|
||||
$existing_extra = sizeof($extra_row);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Which page?
|
||||
switch ($action)
|
||||
@@ -265,7 +263,7 @@ class extra_module
|
||||
$matchday_eval_options .= '<option value="' . $row['matchday'] . '"' . $selected_eval . '>' . $day_name . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
$question_type_options = '';
|
||||
for($i = 1; $i<= 5; $i++)
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ class football_module
|
||||
'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_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' => false,
|
||||
'football_win_name' => array('lang' => 'WIN_NAME', 'validate' => 'string', 'type' => 'text:6:6', 'explain' => true),
|
||||
@@ -120,6 +120,8 @@ class football_module
|
||||
'legend2' => 'GENERAL_SETTINGS',
|
||||
'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_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_users_per_page' => array('lang' => 'USERS_PAGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
|
||||
@@ -362,7 +364,7 @@ class football_module
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust Cronjob EMail remember next un
|
||||
* Adjust Cronjob EMail remember next run
|
||||
*/
|
||||
function next_run($value, $key = '')
|
||||
{
|
||||
@@ -419,6 +421,18 @@ class football_module
|
||||
$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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -153,7 +153,6 @@ class leagues_module
|
||||
$result = $db->sql_query($sql);
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
trigger_error($user->lang['NO_MEMBERS_SELECTED'] . adm_back_link($this->u_action . "&action=list&s=$season&l=$league"), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
@@ -323,6 +323,7 @@ class matchdays_module
|
||||
ORDER BY matchday ASC, number ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
$rows_matchdays = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
$row_number = 0;
|
||||
foreach ($rows_matchdays as $row_matchday)
|
||||
{
|
||||
@@ -710,7 +711,7 @@ class matchdays_module
|
||||
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']);
|
||||
$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)
|
||||
{
|
||||
// check if delivery is before all open matches
|
||||
@@ -764,6 +765,7 @@ class matchdays_module
|
||||
// reopen matchday
|
||||
$matchday_row['status'] = 0;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -413,7 +413,7 @@ class matches_module
|
||||
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']);
|
||||
$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)
|
||||
{
|
||||
// Bet in time and match moved to future
|
||||
@@ -627,7 +627,7 @@ class matches_module
|
||||
$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>';
|
||||
}
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
$u_back = $this->u_action . "&s=$season&l=$league&m=$matchday";
|
||||
|
||||
$template->assign_vars(array(
|
||||
|
||||
@@ -192,7 +192,7 @@ class results_module
|
||||
{
|
||||
trigger_error(sprintf($user->lang['NO_MATCHDAY'], $league_info['league_name'], $season) . adm_back_link($this->u_action . "&s=$season&l=$league"), E_USER_WARNING);
|
||||
}
|
||||
$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?
|
||||
switch ($action)
|
||||
@@ -382,6 +382,7 @@ class results_module
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($resultextra);
|
||||
if ($count_extra_updates)
|
||||
{
|
||||
$success[] = sprintf($user->lang['EXTRA_RESULT' . (($count_extra_updates == 1) ? '' : 'S') . '_SAVED'], $count_extra_updates);
|
||||
@@ -768,6 +769,7 @@ class results_module
|
||||
);
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
switch ($league_info['bet_ko_type'])
|
||||
{
|
||||
|
||||
@@ -397,6 +397,7 @@ class update_module
|
||||
{
|
||||
$error[] = sprintf($user->lang['MISMATCH_MATCHDAYS'], $row['matchdays']);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT COUNT(match_no) as matches
|
||||
FROM ' . FOOTB_MATCHES . "
|
||||
@@ -414,6 +415,7 @@ class update_module
|
||||
{
|
||||
$error[] = sprintf($user->lang['MISMATCH_MATCHES'], $row['matches']);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
@@ -547,6 +549,7 @@ class update_module
|
||||
$count_updates++;
|
||||
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
if ($effected_matchdays <> '')
|
||||
{
|
||||
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
||||
@@ -591,6 +594,7 @@ class update_module
|
||||
$count_updates++;
|
||||
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
if ($effected_matchdays <> '')
|
||||
{
|
||||
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
||||
@@ -635,6 +639,7 @@ class update_module
|
||||
$count_updates++;
|
||||
$effected_matchdays = ($effected_matchdays == '') ? $row['matchday'] : $effected_matchdays . ', ' . $row['matchday'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
if ($effected_matchdays <> '')
|
||||
{
|
||||
$sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
|
||||
@@ -662,7 +667,7 @@ class update_module
|
||||
}
|
||||
|
||||
// check status of matchdays
|
||||
$local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 3600);
|
||||
$local_board_time = time() + ($this->config['football_time_shift'] * 3600);
|
||||
$sql = $sql = 'UPDATE ' . FOOTB_MATCHDAYS . " AS target
|
||||
INNER JOIN
|
||||
(
|
||||
@@ -1382,6 +1387,7 @@ class update_module
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
return $count_updates;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user