2 Commits

Author SHA1 Message Date
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
25 changed files with 702 additions and 212 deletions

View File

@@ -512,9 +512,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
@@ -667,7 +667,7 @@ class update_module
// check status of matchdays // check status of matchdays
$local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 3600); $local_board_time = time() + (($this->config['board_timezone'] - $this->config['football_host_timezone']) * 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

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

@@ -45,7 +45,7 @@ $sql = "(SELECT
SUM(IF(eb.extra_no > 0, IF(eb.bet = '', 0, 1), 0)) AS extra_bets_count, SUM(IF(eb.extra_no > 0, IF(eb.bet = '', 0, 1), 0)) AS extra_bets_count,
SUM(IF(e.extra_no > 0, 1, 0)) AS extra_count SUM(IF(e.extra_no > 0, 1, 0)) AS extra_count
FROM " . FOOTB_MATCHDAYS . " AS m FROM " . FOOTB_MATCHDAYS . " AS m
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league) JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0) JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0)
JOIN " . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = ma.match_no AND b.user_id = $user_id) JOIN " . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
LEFT JOIN " . FOOTB_EXTRA . " AS e ON (e.season = m.season AND e.league = m.league AND e.matchday = m.matchday AND e.extra_status = 0) LEFT JOIN " . FOOTB_EXTRA . " AS e ON (e.season = m.season AND e.league = m.league AND e.matchday = m.matchday AND e.extra_status = 0)
@@ -83,7 +83,7 @@ $sql = "(SELECT
0 AS extra_bets_count, 0 AS extra_bets_count,
0 AS extra_count 0 AS extra_count
FROM " . FOOTB_MATCHDAYS . " AS m FROM " . FOOTB_MATCHDAYS . " AS m
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league) JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = -1) JOIN " . FOOTB_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) 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') WHERE m.delivery_date_2 > FROM_UNIXTIME('$local_board_time')
@@ -119,13 +119,49 @@ $sql = "(SELECT
0 AS extra_bets_count, 0 AS extra_bets_count,
0 AS extra_count 0 AS extra_count
FROM " . FOOTB_MATCHDAYS . " AS m FROM " . FOOTB_MATCHDAYS . " AS m
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league) JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = -2) JOIN " . FOOTB_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) 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') WHERE m.delivery_date_3 > FROM_UNIXTIME('$local_board_time')
AND m.status <= 0 AND m.status <= 0
GROUP BY m.delivery_date, m.league, b.user_id GROUP BY m.delivery_date, m.league, b.user_id
) )
UNION
(SELECT
m.season,
m.league,
m.matchday,
l.league_name_short,
CASE m.matchday_name
WHEN ''
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
ELSE m.matchday_name
END AS matchday_name,
CONCAT(
CASE DATE_FORMAT(ma.match_datetime,'%w')
WHEN 0 THEN '" . $lang_dates['Sun'] . "'
WHEN 1 THEN '" . $lang_dates['Mon'] . "'
WHEN 2 THEN '" . $lang_dates['Tue'] . "'
WHEN 3 THEN '" . $lang_dates['Wed'] . "'
WHEN 4 THEN '" . $lang_dates['Thu'] . "'
WHEN 5 THEN '" . $lang_dates['Fri'] . "'
WHEN 6 THEN '" . $lang_dates['Sat'] . "'
ELSE 'Error' END,
DATE_FORMAT(ma.match_datetime,' %d.%m.%y %H:%i')
) as delivery_time,
ma.match_datetime AS delivery,
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
COUNT(*) AS matches_count,
0 AS extra_bets_count,
0 AS extra_count
FROM " . FOOTB_MATCHDAYS . " AS m
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 1)
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0)
JOIN " . FOOTB_BETS . " AS b ON (b.season = ma.season AND b.league = ma.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
WHERE ma.match_datetime > FROM_UNIXTIME('$local_board_time')
AND m.status <= 0
GROUP BY ma.match_datetime, m.league, b.user_id
)
ORDER BY delivery, league"; ORDER BY delivery, league";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);

View File

@@ -24,6 +24,7 @@ $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';

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";

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=\"28\" height=\"28\"/>" ;
}
else
{
$logo = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ;
}
$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

@@ -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,76 +59,101 @@ $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 != '')
$rank++;
if ($last_points <> $row['points'] OR $last_goals <> $row['goals'] OR $last_goals_againts <> $row['goals_against'])
{ {
$current_rank = $rank . '.'; // Compare teams with equal points and sort
$teams = get_order_team_compare($teams, $season, $league, $group_id, $ranks_ary, $matchday);
} }
else foreach($teams as $key => $team)
{ {
$current_rank = ''; $row = $table_ary[$team];
} $rank++;
$last_points = $row['points']; if ($last_points <> $row['points'] OR $last_goals <> $row['goals'] OR $last_goals_againts <> $row['goals_against'])
$last_goals = $row['goals']; {
$last_goals_againts = $row['goals_against']; $current_rank = $rank . '.';
$row_class = (!($rank % 2)) ? 'bg1 row_light' : 'bg2 row_dark'; }
if ($row['team_symbol'] <> '') else
{ {
$logo = "<img src=\"" . $ext_path . 'images/flags/' . $row['team_symbol'] . "\" alt=\"" . $row['team_symbol'] . "\" width=\"28\" height=\"28\"/>" ; $current_rank = '';
} }
else $last_points = $row['points'];
{ $last_goals = $row['goals'];
$logo = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ; $last_goals_againts = $row['goals_against'];
} $row_class = (!($rank % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
if ($row['team_symbol'] <> '')
$template->assign_block_vars('total', array( {
'RANK' => $current_rank, $logo = "<img src=\"" . $ext_path . 'images/flags/' . $row['team_symbol'] . "\" alt=\"" . $row['team_symbol'] . "\" width=\"28\" height=\"28\"/>" ;
'ROW_CLASS' => $row_class, }
'LOGO' => $logo, else
'TEAM_ID' => $row['team_id'], {
'TEAM' => $row['team_name'], $logo = "<img src=\"" . $ext_path . "images/flags/blank.gif\" alt=\"\" width=\"28\" height=\"28\"/>" ;
'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')), $template->assign_block_vars('total', array(
'GAMES' => $row['matches'], 'RANK' => $current_rank,
'WIN' => $row['win'], 'ROW_CLASS' => $row_class,
'DRAW' => $row['draw'], 'LOGO' => $logo,
'LOST' => $row['lost'], 'TEAM_ID' => $row['team_id'],
'GOALS' => $row['goals'], 'TEAM' => $row['team_name'],
'GOALS_AGAINST' => $row['goals_against'], 'TEAM_SHORT' => $row['team_name_short'],
'GOALS_DIFF' => $row['goals_diff'], 'U_PLAN_TEAM' => $this->helper->route('football_football_popup', array('popside' => 'viewplan_popup', 's' => $season, 'l' => $row['league'],
'POINTS' => $row['points'], 'tid' => $row['team_id'], 'mode' => 'played')),
) 'GAMES' => $row['matches'],
); 'WIN' => $row['win'],
} 'DRAW' => $row['draw'],
'LOST' => $row['lost'],
'GOALS' => $row['goals'],
'GOALS_AGAINST' => $row['goals_against'],
'GOALS_DIFF' => $row['goals_diff'],
'POINTS' => $row['points'],
)
);
}
}
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$rank = 0; $rank = 0;
// Get form-table-information // Get form-table-information

View File

@@ -3,8 +3,8 @@
"type": "phpbb-extension", "type": "phpbb-extension",
"description": "Football Prediction League for phpBB 3.1", "description": "Football Prediction League for phpBB 3.1",
"homepage": "http://football.bplaced.net", "homepage": "http://football.bplaced.net",
"version": "0.9.5", "version": "0.9.6",
"time": "2016-04-22", "time": "2016-05-29",
"license": "GPL-2.0", "license": "GPL-2.0",
"authors": [{ "authors": [{
"name": "J. Helmke", "name": "J. Helmke",

View File

@@ -902,7 +902,14 @@ class main
if (!$user->data['football_mobile']) if (!$user->data['football_mobile'])
{ {
// Start matchday list // Start matchday list
include($this->football_root_path . 'block/rank_matchday.' . $this->php_ext); 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);
}
// End matchday list // End matchday list
//***************************************************************************** //*****************************************************************************

View File

@@ -87,9 +87,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')
{ {
@@ -137,12 +136,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 +155,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

@@ -934,14 +934,20 @@ function set_bet_in_time_delivery($season, $league)
function curr_season() function curr_season()
{ {
global $db, $lang, $user; global $db, $lang, $user;
$curr_user = $user->data['user_id']; $user_spec = '';
if ($user->data['user_type']==0 OR $user->data['user_type']==3)
{
$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,10 +1023,15 @@ function first_league($season, $complete = true)
function current_league($season) function current_league($season)
{ {
global $db, $lang, $user; global $db, $lang, $user;
$curr_user = $user->data['user_id']; $user_spec = '';
if ($user->data['user_type']==0 OR $user->data['user_type']==3)
{
$curr_user = $user->data['user_id'];
$user_spec = 'AND b.user_id = ' . $curr_user;
}
$sql = 'SELECT m.league $sql = 'SELECT 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";
@@ -1641,6 +1652,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 +1736,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 +1899,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,48 +1916,44 @@ 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();
$db->sql_freeresult($result); $points_ary = array();
$ranks_ary = array();
if (1 == $place) while( $row = $db->sql_fetchrow($result))
{ {
if ($rowset[0]['points'] == $rowset[1]['points'] AND $rowset[0]['goal_diff'] == $rowset[1]['goal_diff'] AND $rowset[0]['goals'] == $rowset[1]['goals']) $table_ary[$row['team_id']] = $row;
{ $points_ary[$row['points']][]=$row['team_id'];
return '#0#' . $place . '. ' . sprintf($user->lang['GROUP']) . ' ' . $place . '#' . $place . '. ' . sprintf($user->lang['GROUP']) . ' ' . $group; $ranks_ary[] = $row['team_id'];
}
else
{
$new_id = $rowset[0]['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[0]['team_symbol'] . '#' . $new_id . '#' . $rowset[0]['team_name'] . '#' . $rowset[0]['team_name_short'];
}
} }
else $db->sql_freeresult($result);
//sort on points descending
krsort($points_ary);
foreach($points_ary as $point => $teams)
{ {
// second if(count($teams) > 1)
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; // 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[1]['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++;
$resultup = $db->sql_query($sqlup); if ($rank == $place)
$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)) $sqlup = 'UPDATE ' . FOOTB_MATCHES . " SET $field = $team WHERE season = $season AND league = $league AND match_no = $matchnumber";
WHERE season = $season AND league = $league AND team_id = $new_id"; $resultup = $db->sql_query($sqlup);
$resultup = $db->sql_query($sqlup); $sqlup = 'UPDATE ' . FOOTB_TEAMS . ' SET matchday = (SELECT max(matchday) FROM ' . FOOTB_MATCHES . "
return $rowset[1]['team_symbol'] . '#' . $new_id . '#' . $rowset[1]['team_name'] . '#' . $rowset[1]['team_name_short']; 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);
return $row['team_symbol'] . '#' . $team . '#' . $row['team_name'] . '#' . $row['team_name_short'];
}
} }
} }
} }
@@ -2112,37 +2317,53 @@ function ko_group_next_round($season, $league, $matchday_from, $matchday_to, $ma
ORDER BY group_id ASC,points DESC, goal_diff DESC, goals DESC ORDER BY group_id ASC,points DESC, goal_diff DESC, goals DESC
"; ";
$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;
foreach($points as $point => $teams)
{ {
$place = 1; if(count($teams) > 1)
$group_id = $row['group_id']; {
} // 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)
{
$team_name = $row['team_name'];
$short_name = $row['team_name_short'];
$team_sign = $row['team_symbol'];
$sqlinsert = 'INSERT INTO ' . FOOTB_TEAMS . " VALUES($season, $move_league, $team_id, '$team_name', '$short_name', '$team_sign', '', $move_matchday)";
$resultinsert = $db->sql_query($sqlinsert);
$messag_moved .= $row['team_name'] . '<br />';
}
$place++;
}
} }
if ($move_rank > 0 AND $move_league > 0 AND $place == $move_rank)
{
$team_id = $row['team_id'];
$team_name = $row['team_name'];
$short_name = $row['team_name_short'];
$team_sign = $row['team_symbol'];
$sqlinsert = 'INSERT INTO ' . FOOTB_TEAMS . " VALUES($season, $move_league, $team_id, '$team_name', '$short_name', '$team_sign', '', $move_matchday)";
$resultinsert = $db->sql_query($sqlinsert);
$messag_moved .= $row['team_name'] . '<br />';
}
$place++;
} }
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);

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',
@@ -290,6 +291,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

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

View File

@@ -120,7 +120,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. ',

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',
@@ -277,6 +278,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

@@ -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 />

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

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')),
);
}
}

View File

@@ -12,12 +12,11 @@
<li class="small-icon icon-bet"><a href="{U_BET}" role="menuitem">{L_BET}</a></li> <li class="small-icon icon-bet"><a href="{U_BET}" role="menuitem">{L_BET}</a></li>
<li class="small-icon icon-allbets"><a href="{U_ALL_BETS}" role="menuitem">{L_ALL_BETS}</a></li> <li class="small-icon icon-allbets"><a href="{U_ALL_BETS}" role="menuitem">{L_ALL_BETS}</a></li>
<li class="small-icon icon-results"><a href="{U_RESULTS}" role="menuitem">{L_RESULTS}</a></li> <li class="small-icon icon-results"><a href="{U_RESULTS}" role="menuitem">{L_RESULTS}</a></li>
<li class="small-icon icon-list"><a href="{U_TABLE}" role="menuitem">{L_TABLE}</a></li>
<li class="small-icon icon-rank"><a href="{U_RANKS_TOTAL}" role="menuitem">{L_RANK_TOTAL}</a></li>
<li class="small-icon icon-rank"><a href="{U_RANKS_MATCHDAY}" role="menuitem">{L_RANK_MATCHDAY}</a></li> <li class="small-icon icon-rank"><a href="{U_RANKS_MATCHDAY}" role="menuitem">{L_RANK_MATCHDAY}</a></li>
<li class="small-icon icon-rank"><a href="{U_RANKS_TOTAL}" role="menuitem">{L_RANK_TOTAL}</a></li>
<li class="small-icon icon-list"><a href="{U_TABLE}" role="menuitem">{L_TABLE}</a></li>
<li class="small-icon icon-points"><a href="{U_FOOTBALL_BANK}" role="menuitem">{L_FOOTBALL_BANK}</a></li> <li class="small-icon icon-points"><a href="{U_FOOTBALL_BANK}" role="menuitem">{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 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 class="small-icon icon-download"><a href="{U_EXPORT}" role="menuitem">{L_EXPORT}</a></li>
<li class="small-icon icon-odds"><a href="{U_ODDS}" role="menuitem">{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-->
@@ -38,6 +37,7 @@
<li class="small-icon icon-statistics"><a href="{U_MY_KOEFF}" role="menuitem">{L_MY_KOEFF}</a></li> <li class="small-icon icon-statistics"><a href="{U_MY_KOEFF}" role="menuitem">{L_MY_KOEFF}</a></li>
<li class="small-icon icon-statistics"><a href="{U_STAT_POINTS}" role="menuitem">{L_STAT_POINTS}</a></li> <li class="small-icon icon-statistics"><a href="{U_STAT_POINTS}" role="menuitem">{L_STAT_POINTS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_STAT_RESULTS}" role="menuitem">{L_STAT_RESULTS}</a></li> <li class="small-icon icon-statistics"><a href="{U_STAT_RESULTS}" role="menuitem">{L_STAT_RESULTS}</a></li>
<li class="small-icon icon-download"><a href="{U_EXPORT}" role="menuitem">{L_EXPORT}</a></li>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_FOOTBALL --> <!-- IF S_DISPLAY_FOOTBALL -->
<li class="separator"></li> <li class="separator"></li>

View File

@@ -19,9 +19,9 @@
<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 --> small-icon icon-bet"><a href="{U_BET}"><span>{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 --> small-icon icon-allbets"><a href="{U_ALL_BETS}"><span>{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 --> small-icon icon-results"><a href="{U_RESULTS}"><span>{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_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_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_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_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_TABLE -->activetab<!-- ENDIF --> small-icon icon-list"><a href="{U_TABLE}"><span>{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 --> small-icon icon-points"><a href="{U_FOOTBALL_BANK}"><span>{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 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 <!-- 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 --> small-icon icon-odds"><a href="{U_ODDS}"><span>{L_ODDS}</span></a></li>
@@ -197,6 +197,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 -->

View File

@@ -10,10 +10,10 @@
<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 --> small-icon icon-bet"><a href="{U_BET}"><span>{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 --> small-icon icon-allbets"><a href="{U_ALL_BETS}"><span>{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 --> small-icon icon-results"><a href="{U_RESULTS}"><span>{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_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_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_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_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_TABLE -->activetab<!-- ENDIF --> small-icon icon-list"><a href="{U_TABLE}"><span>{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 --> small-icon icon-bet"><a href="{U_DELIVERY_LIST}"><span>{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 --> small-icon icon-allbets"><a href="{U_LAST_VISITORS}"><span>{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 --> small-icon icon-points"><a href="{U_FOOTBALL_BANK}"><span>{L_FOOTBALL_BANK}</span></a></li>

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

@@ -0,0 +1,36 @@
<div class="panel">
<h3><span class="small-icon icon-rank"></span>&nbsp;{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>