Version 0.9.8

This commit is contained in:
football
2017-02-19 20:25:32 +01:00
parent 09631cbe15
commit a16e0e3c79
26 changed files with 13323 additions and 13446 deletions
+597 -599
View File
File diff suppressed because it is too large Load Diff
+670 -672
View File
File diff suppressed because it is too large Load Diff
+750 -752
View File
File diff suppressed because it is too large Load Diff
+460 -462
View File
@@ -1,463 +1,461 @@
<?php <?php
/** /**
* *
* @package phpBB Extension - Football Football * @package phpBB Extension - Football Football
* @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
* *
*/ */
namespace football\football\acp; namespace football\football\acp;
class extra_module class extra_module
{ {
public $u_action; public $u_action;
protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
protected $root_path, $request, $php_ext, $log; protected $root_path, $request, $php_ext, $log;
public function __construct() public function __construct()
{ {
global $db, $user, $request, $template; global $db, $user, $request, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang_ext('football/football', 'football'); $user->add_lang_ext('football/football', 'football');
$user->add_lang_ext('football/football', 'info_acp_extra'); $user->add_lang_ext('football/football', 'info_acp_extra');
$this->root_path = $phpbb_root_path . 'ext/football/football/'; $this->root_path = $phpbb_root_path . 'ext/football/football/';
$this->config = $config; $this->config = $config;
$this->request = $request; $this->request = $request;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpbb_admin_path = $phpbb_admin_path; $this->phpbb_admin_path = $phpbb_admin_path;
$this->php_ext = $phpEx; $this->php_ext = $phpEx;
if(!function_exists('season_info')) if(!function_exists('season_info'))
{ {
include($this->root_path . 'includes/functions.' . $this->php_ext); include($this->root_path . 'includes/functions.' . $this->php_ext);
} }
if (!defined('FOOTB_SEASONS')) if (!defined('FOOTB_SEASONS'))
{ {
include($this->root_path . 'includes/constants.' . $this->php_ext); include($this->root_path . 'includes/constants.' . $this->php_ext);
} }
} }
function main($id, $mode) function main($id, $mode)
{ {
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->page_title = 'ACP_FOOTBALL_EXTRA_MANAGE';
$this->tpl_name = 'acp_football_extra';
$this->page_title = 'ACP_FOOTBALL_EXTRA_MANAGE'; $form_key = 'acp_football_extra';
add_form_key($form_key);
$form_key = 'acp_football_extra';
add_form_key($form_key); include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['remove'])) ? 'remove' : $this->request->variable('action', ''));
// Check and set some common vars $edit = $this->request->variable('edit', 0);
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['remove'])) ? 'remove' : $this->request->variable('action', '')); $season = $this->request->variable('s', 0);
$edit = $this->request->variable('edit', 0); $league = $this->request->variable('l', 0);
$season = $this->request->variable('s', 0); $matchday = $this->request->variable('matchday', 0);
$league = $this->request->variable('l', 0); $matchday_eval = $this->request->variable('matchday_eval', 0);
$matchday = $this->request->variable('matchday', 0); $extra_no = $this->request->variable('e', 0);
$matchday_eval = $this->request->variable('matchday_eval', 0); $update = (isset($_POST['update'])) ? true : false;
$extra_no = $this->request->variable('e', 0);
$update = (isset($_POST['update'])) ? true : false; // Clear some vars
$extra_row = array();
// Clear some vars $error = array();
$extra_row = array();
$error = array(); // Grab current season
if (!$season)
// Grab current season {
if (!$season) $season = curr_season();
{ }
$season = curr_season();
} // Grab basic data for select season
if ($season)
// Grab basic data for select season {
if ($season) $sql = 'SELECT *
{ FROM ' . FOOTB_SEASONS . '
$sql = 'SELECT * ORDER BY season DESC';
FROM ' . FOOTB_SEASONS . ' $result = $db->sql_query($sql);
ORDER BY season DESC';
$result = $db->sql_query($sql); $season_options = '';
while ($row = $db->sql_fetchrow($result))
$season_options = ''; {
while ($row = $db->sql_fetchrow($result)) $selected = ($season && $row['season'] == $season) ? ' selected="selected"' : '';
{ $season_options .= '<option value="' . $row['season'] . '"' . $selected . '>' . $row['season_name_short'] . '</option>';
$selected = ($season && $row['season'] == $season) ? ' selected="selected"' : ''; if ($selected <> '')
$season_options .= '<option value="' . $row['season'] . '"' . $selected . '>' . $row['season_name_short'] . '</option>'; {
if ($selected <> '') $season_name = $row['season_name_short'];
{ }
$season_name = $row['season_name_short']; }
} $db->sql_freeresult($result);
} }
$db->sql_freeresult($result); else
} {
else trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
} // Grab current league
if (!$league)
// Grab current league {
if (!$league) $league = first_league($season, false);
{ }
$league = first_league($season, false);
} // Grab basic data for select league
if ($league)
// Grab basic data for select league {
if ($league) $sql = 'SELECT *
{ FROM ' . FOOTB_LEAGUES . "
$sql = 'SELECT * WHERE season = $season
FROM ' . FOOTB_LEAGUES . " ORDER BY league ASC";
WHERE season = $season $result = $db->sql_query($sql);
ORDER BY league ASC";
$result = $db->sql_query($sql); $league_options = '';
while ($row = $db->sql_fetchrow($result))
$league_options = ''; {
while ($row = $db->sql_fetchrow($result)) $selected = ($league && $row['league'] == $league) ? ' selected="selected"' : '';
{ $league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>';
$selected = ($league && $row['league'] == $league) ? ' selected="selected"' : ''; if ($selected <> '')
$league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>'; {
if ($selected <> '') $league_matchdays = $row['matchdays'];
{ $league_name = $row['league_name'];
$league_matchdays = $row['matchdays']; $league_type = $row['league_type'];
$league_name = $row['league_name']; $ko_league = ($row['league_type'] == LEAGUE_KO) ? true : false;
$league_type = $row['league_type']; }
$ko_league = ($row['league_type'] == LEAGUE_KO) ? true : false; }
} $db->sql_freeresult($result);
} }
$db->sql_freeresult($result); else
} {
else trigger_error(sprintf($user->lang['NO_LEAGUE'], $season) . adm_back_link($this->u_action . "&amp;s=$season"), E_USER_WARNING);
{ }
trigger_error(sprintf($user->lang['NO_LEAGUE'], $season) . adm_back_link($this->u_action . "&amp;s=$season"), E_USER_WARNING);
} // Grab basic data for extra bets, if extra bet is set and exists
if ($extra_no)
// Grab basic data for extra bets, if extra bet is set and exists {
if ($extra_no) $sql = 'SELECT *
{ FROM ' . FOOTB_EXTRA . "
$sql = 'SELECT * WHERE season = $season
FROM ' . FOOTB_EXTRA . " AND league = $league
WHERE season = $season AND extra_no = $extra_no";
AND league = $league $result = $db->sql_query($sql);
AND extra_no = $extra_no"; $extra_row = $db->sql_fetchrow($result);
$result = $db->sql_query($sql); $existing_extra = sizeof($extra_row);
$extra_row = $db->sql_fetchrow($result); $db->sql_freeresult($result);
$existing_extra = sizeof($extra_row); }
$db->sql_freeresult($result);
} $db->sql_freeresult($result);
$db->sql_freeresult($result); // Which page?
switch ($action)
// Which page? {
switch ($action) case 'delete':
{ if (!$season)
case 'delete': {
if (!$season) trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
} if (!$league)
{
if (!$league) trigger_error($user->lang['NO_LEAGUE'] . adm_back_link($this->u_action . "&amp;s=$season"), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_LEAGUE'] . adm_back_link($this->u_action . "&amp;s=$season"), E_USER_WARNING);
} if (!$extra_no)
{
if (!$extra_no) trigger_error($user->lang['NO_EXTRA'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_EXTRA'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
} if (confirm_box(true))
{
if (confirm_box(true)) $error = '';
{
$error = ''; if (!$auth->acl_get('a_football_delete'))
{
if (!$auth->acl_get('a_football_delete')) trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING); if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete'])
} {
if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete']) trigger_error($user->lang['EXTRA_NO_DELETE'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
{ }
trigger_error($user->lang['EXTRA_NO_DELETE'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
} // Delete extra
$sql = 'DELETE FROM ' . FOOTB_EXTRA . "
// Delete extra WHERE season = $season AND league = $league AND extra_no = $extra_no";
$sql = 'DELETE FROM ' . FOOTB_EXTRA . " $db->sql_query($sql);
WHERE season = $season AND league = $league AND extra_no = $extra_no";
$db->sql_query($sql); // Delete extra bets
$sql = 'DELETE FROM ' . FOOTB_EXTRA_BETS . "
// Delete extra bets WHERE season = $season
$sql = 'DELETE FROM ' . FOOTB_EXTRA_BETS . " AND league = $league
WHERE season = $season AND extra_no = $extra_no";
AND league = $league $db->sql_query($sql);
AND extra_no = $extra_no";
$db->sql_query($sql); trigger_error($user->lang['EXTRA_DELETED'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"));
}
trigger_error($user->lang['EXTRA_DELETED'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league")); else
} {
else confirm_box(false, sprintf($user->lang['EXTRA_CONFIRM_DELETE'], $extra_row['question'], $league, $season), build_hidden_fields(array(
{ 's' => $season,
confirm_box(false, sprintf($user->lang['EXTRA_CONFIRM_DELETE'], $extra_row['question'], $league, $season), build_hidden_fields(array( 'l' => $league,
's' => $season, 'e' => $extra_no,
'l' => $league, 'mode' => $mode,
'e' => $extra_no, 'action' => $action))
'mode' => $mode, );
'action' => $action)) }
); break;
}
break; case 'add':
$sql = "SELECT
case 'add': max(extra_no) AS max_extra_no
$sql = "SELECT FROM " . FOOTB_EXTRA . "
max(extra_no) AS max_extra_no WHERE season = $season
FROM " . FOOTB_EXTRA . " AND league = $league";
WHERE season = $season $result = $db->sql_query($sql);
AND league = $league"; $row_extra = $db->sql_fetchrow($result);
$result = $db->sql_query($sql); $existing_extra = sizeof($row_extra);
$row_extra = $db->sql_fetchrow($result); $db->sql_freeresult($result);
$existing_extra = sizeof($row_extra); $extra_no = ($existing_extra) ? $row_extra['max_extra_no'] + 1 : 1;
$db->sql_freeresult($result); $extra_row['extra_no'] = $extra_no;
$extra_no = ($existing_extra) ? $row_extra['max_extra_no'] + 1 : 1; $extra_row['question_type'] = $this->request->variable('question_type', 3);
$extra_row['extra_no'] = $extra_no; $extra_row['question'] = utf8_normalize_nfc($this->request->variable('question', '', true));
$extra_row['question_type'] = $this->request->variable('question_type', 3); $extra_row['matchday'] = $this->request->variable('matchday', 0);
$extra_row['question'] = utf8_normalize_nfc($this->request->variable('question', '', true)); $extra_row['matchday_eval'] = $this->request->variable('matchday_eval', 0);
$extra_row['matchday'] = $this->request->variable('matchday', 0); $extra_row['result'] = utf8_normalize_nfc($this->request->variable('result', ''));
$extra_row['matchday_eval'] = $this->request->variable('matchday_eval', 0); $extra_row['extra_points'] = $this->request->variable('extra_points', 0);
$extra_row['result'] = utf8_normalize_nfc($this->request->variable('result', '')); $extra_row['extra_status'] = $this->request->variable('extra_status', 0);
$extra_row['extra_points'] = $this->request->variable('extra_points', 0); // No break for edit add
$extra_row['extra_status'] = $this->request->variable('extra_status', 0); case 'edit':
// No break for edit add $error_msg = array();
case 'edit':
$error_msg = array(); if (!sizeof($error))
{
if (!sizeof($error)) if ($action == 'edit' && !$extra_no)
{ {
if ($action == 'edit' && !$extra_no) trigger_error($user->lang['NO_EXTRA'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_EXTRA'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
} $matchday = $extra_row['matchday'];
$matchday_eval = $extra_row['matchday_eval'];
$matchday = $extra_row['matchday'];
$matchday_eval = $extra_row['matchday_eval']; $sql = 'SELECT *
FROM ' . FOOTB_MATCHDAYS . "
$sql = 'SELECT * WHERE season = $season
FROM ' . FOOTB_MATCHDAYS . " AND league = $league
WHERE season = $season ORDER BY matchday ASC";
AND league = $league $result = $db->sql_query($sql);
ORDER BY matchday ASC";
$result = $db->sql_query($sql); $matchday_options = '<option value="0"' . ((!$matchday) ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_MATCHDAY'] . '</option>';
$matchday_eval_options = '<option value="0"' . ((!$matchday_eval) ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_MATCHDAY'] . '</option>';
$matchday_options = '<option value="0"' . ((!$matchday) ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_MATCHDAY'] . '</option>'; while ($row = $db->sql_fetchrow($result))
$matchday_eval_options = '<option value="0"' . ((!$matchday_eval) ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_MATCHDAY'] . '</option>'; {
while ($row = $db->sql_fetchrow($result)) if ($row['status'] == 0 or $action == 'edit')
{ {
if ($row['status'] == 0 or $action == 'edit') $selected_matchday = ($matchday && $row['matchday'] == $matchday) ? ' selected="selected"' : '';
{ $selected_eval = ($matchday_eval && $row['matchday'] == $matchday_eval) ? ' selected="selected"' : '';
$selected_matchday = ($matchday && $row['matchday'] == $matchday) ? ' selected="selected"' : ''; $day_name = (strlen($row['matchday_name']) > 0) ? $row['matchday_name'] : $row['matchday'] . '. ' . sprintf($user->lang['MATCHDAY']);
$selected_eval = ($matchday_eval && $row['matchday'] == $matchday_eval) ? ' selected="selected"' : ''; $matchday_options .= '<option value="' . $row['matchday'] . '"' . $selected_matchday . '>' . $day_name . '</option>';
$day_name = (strlen($row['matchday_name']) > 0) ? $row['matchday_name'] : $row['matchday'] . '. ' . sprintf($user->lang['MATCHDAY']); $matchday_eval_options .= '<option value="' . $row['matchday'] . '"' . $selected_eval . '>' . $day_name . '</option>';
$matchday_options .= '<option value="' . $row['matchday'] . '"' . $selected_matchday . '>' . $day_name . '</option>'; }
$matchday_eval_options .= '<option value="' . $row['matchday'] . '"' . $selected_eval . '>' . $day_name . '</option>'; }
}
} $question_type_options = '';
for($i = 1; $i<= 5; $i++)
$question_type_options = ''; {
for($i = 1; $i<= 5; $i++) $selected = ($i == $extra_row['question_type']) ? ' selected="selected"' : '';
{ $question_type_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
$selected = ($i == $extra_row['question_type']) ? ' selected="selected"' : ''; }
$question_type_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
} $extra_status_options = '';
for($i = 0; $i<= 3; $i++)
$extra_status_options = ''; {
for($i = 0; $i<= 3; $i++) $selected = ($i == $extra_row['extra_status']) ? ' selected="selected"' : '';
{ $extra_status_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
$selected = ($i == $extra_row['extra_status']) ? ' selected="selected"' : ''; }
$extra_status_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
}
// Did we submit?
if ($update)
// Did we submit? {
if ($update) $data = array();
{ if (!check_form_key($form_key))
$data = array(); {
if (!check_form_key($form_key)) trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
{ }
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING); $extra_row['extra_no'] = $extra_no;
} $extra_row['question_type'] = $this->request->variable('question_type', $extra_row['question_type']);
$extra_row['extra_no'] = $extra_no; $extra_row['question'] = $this->request->variable('question', $extra_row['question'], true);
$extra_row['question_type'] = $this->request->variable('question_type', $extra_row['question_type']); $extra_row['matchday'] = $this->request->variable('matchday', $extra_row['matchday']);
$extra_row['question'] = $this->request->variable('question', $extra_row['question'], true); $extra_row['matchday_eval'] = $this->request->variable('matchday_eval', $extra_row['matchday_eval']);
$extra_row['matchday'] = $this->request->variable('matchday', $extra_row['matchday']); $extra_row['extra_points'] = $this->request->variable('extra_points', $extra_row['extra_points']);
$extra_row['matchday_eval'] = $this->request->variable('matchday_eval', $extra_row['matchday_eval']); $extra_row['extra_status'] = $this->request->variable('extra_status', $extra_row['extra_status']);
$extra_row['extra_points'] = $this->request->variable('extra_points', $extra_row['extra_points']);
$extra_row['extra_status'] = $this->request->variable('extra_status', $extra_row['extra_status']); $data['extra_points'] = (int) $extra_row['extra_points'];
$data['matchday'] = (int) $extra_row['matchday'];
$data['extra_points'] = (int) $extra_row['extra_points']; $data['matchday_eval'] = (int) $extra_row['matchday_eval'];
$data['matchday'] = (int) $extra_row['matchday'];
$data['matchday_eval'] = (int) $extra_row['matchday_eval']; if ($data['matchday_eval'] < $data['matchday'])
{
if ($data['matchday_eval'] < $data['matchday']) $error[] = $user->lang['EVAL_BEFORE_DELIVERY'];
{ }
$error[] = $user->lang['EVAL_BEFORE_DELIVERY'];
}
if (!sizeof($error))
{
if (!sizeof($error)) $sql_ary = array(
{ 'season' => (int) $season,
$sql_ary = array( 'league' => (int) $league,
'season' => (int) $season, 'extra_no' => (int) $extra_no,
'league' => (int) $league, 'question_type' => (int) $extra_row['question_type'],
'extra_no' => (int) $extra_no, 'question' => strlen($extra_row['question']) ? $extra_row['question'] : '',
'question_type' => (int) $extra_row['question_type'], 'matchday' => (int) $extra_row['matchday'],
'question' => strlen($extra_row['question']) ? $extra_row['question'] : '', 'matchday_eval' => (int) $extra_row['matchday_eval'],
'matchday' => (int) $extra_row['matchday'], 'result' => $extra_row['result'],
'matchday_eval' => (int) $extra_row['matchday_eval'], 'extra_points' => (int) $extra_row['extra_points'],
'result' => $extra_row['result'], 'extra_status' => (int) $extra_row['extra_status'],
'extra_points' => (int) $extra_row['extra_points'], );
'extra_status' => (int) $extra_row['extra_status'],
); $var_ary = array(
'extra_points' => array('num', false, 0, 99),
$var_ary = array( 'matchday' => array('num', false, 1),
'extra_points' => array('num', false, 0, 99), 'matchday_eval' => array('num', false, 1),
'matchday' => array('num', false, 1), );
'matchday_eval' => array('num', false, 1), if (!($error_vals = validate_data($data, $var_ary)))
); {
if (!($error_vals = validate_data($data, $var_ary))) if ($action == 'add')
{ {
if ($action == 'add') $sql = 'INSERT INTO ' . FOOTB_EXTRA . ' ' . $db->sql_build_array('INSERT', $sql_ary);
{ $db->sql_query($sql);
$sql = 'INSERT INTO ' . FOOTB_EXTRA . ' ' . $db->sql_build_array('INSERT', $sql_ary); }
$db->sql_query($sql); else
} {
else $sql = 'UPDATE ' . FOOTB_EXTRA . '
{ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
$sql = 'UPDATE ' . FOOTB_EXTRA . ' WHERE season = $season AND league = $league AND extra_no = $extra_no";
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " $db->sql_query($sql);
WHERE season = $season AND league = $league AND extra_no = $extra_no"; }
$db->sql_query($sql); trigger_error($user->lang['EXTRA_UPDATED'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"));
} }
trigger_error($user->lang['EXTRA_UPDATED'] . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league")); else
} {
else foreach ($error_vals as $error_val)
{ {
foreach ($error_vals as $error_val) $error_msg[] = $user->lang[$error_val];
{ }
$error_msg[] = $user->lang[$error_val]; $error[] = $user->lang['EXTRA_UPDATE_FAILED'];
} $error = array_merge($error, $error_msg);
$error[] = $user->lang['EXTRA_UPDATE_FAILED']; }
$error = array_merge($error, $error_msg); }
} }
} }
}
} $u_back = $this->u_action . "&amp;s=$season&amp;l=$league";
$u_back = $this->u_action . "&amp;s=$season&amp;l=$league"; $template->assign_vars(array(
'S_EDIT' => true,
$template->assign_vars(array( 'S_ADD_EXTRA' => ($action == 'add') ? true : false,
'S_EDIT' => true, 'S_ERROR' => (sizeof($error)) ? true : false,
'S_ADD_EXTRA' => ($action == 'add') ? true : false, 'S_EDIT_EXTRAS' => ($existing_extra) ? false : true,
'S_ERROR' => (sizeof($error)) ? true : false, 'S_QUESTION_TYPE_OPTIONS' => $question_type_options,
'S_EDIT_EXTRAS' => ($existing_extra) ? false : true, 'S_MATCHDAY_OPTIONS' => $matchday_options,
'S_QUESTION_TYPE_OPTIONS' => $question_type_options, 'S_MATCHDAY_EVAL_OPTIONS' => $matchday_eval_options,
'S_MATCHDAY_OPTIONS' => $matchday_options, 'S_EXTRA_STATUS_OPTIONS' => $extra_status_options,
'S_MATCHDAY_EVAL_OPTIONS' => $matchday_eval_options, 'S_VERSION_NO' => $this->config['football_version'],
'S_EXTRA_STATUS_OPTIONS' => $extra_status_options, 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_VERSION_NO' => $this->config['football_version'], 'SEASON' => $season,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'SEASON_NAME' => $season_name,
'SEASON' => $season, 'LEAGUE' => $league,
'SEASON_NAME' => $season_name, 'LEAGUE_NAME' => $league_name,
'LEAGUE' => $league, 'EXTRA_NO' => $extra_no,
'LEAGUE_NAME' => $league_name, 'QUESTION_TYPE' => $extra_row['question_type'],
'EXTRA_NO' => $extra_no, 'QUESTION' => $extra_row['question'],
'QUESTION_TYPE' => $extra_row['question_type'], 'MATCHDAY' => $extra_row['matchday'],
'QUESTION' => $extra_row['question'], 'MATCHDAY_EVAL' => $extra_row['matchday_eval'],
'MATCHDAY' => $extra_row['matchday'], 'MATCHDAY_OPTION' => $extra_row['matchday'],
'MATCHDAY_EVAL' => $extra_row['matchday_eval'], 'MATCHDAY_EVAL' => $extra_row['matchday_eval'],
'MATCHDAY_OPTION' => $extra_row['matchday'], 'RESULT' => $extra_row['result'],
'MATCHDAY_EVAL' => $extra_row['matchday_eval'], 'EXTRA_POINTS' => $extra_row['extra_points'],
'RESULT' => $extra_row['result'], 'EXTRA_STATUS' => $extra_row['extra_status'],
'EXTRA_POINTS' => $extra_row['extra_points'], 'U_BACK' => $u_back,
'EXTRA_STATUS' => $extra_row['extra_status'], 'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season&amp;l=$league",
'U_BACK' => $u_back, )
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season&amp;l=$league", );
) return;
); break;
return; }
break;
} // Check open matchday in league
$sql = 'SELECT *
// Check open matchday in league FROM ' . FOOTB_MATCHDAYS . "
$sql = 'SELECT * WHERE season = $season
FROM ' . FOOTB_MATCHDAYS . " AND league = $league
WHERE season = $season AND status <= 0";
AND league = $league $result = $db->sql_query($sql);
AND status <= 0"; $open_matchdays = sizeof($db->sql_fetchrowset($result));
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$open_matchdays = sizeof($db->sql_fetchrowset($result));
$db->sql_freeresult($result); // Get us all the extra
$sql = "SELECT e.*,
// Get us all the extra m1.matchday_name AS matchday_name,
$sql = "SELECT e.*, m2.matchday_name AS matchday_eval_name
m1.matchday_name AS matchday_name, FROM " . FOOTB_EXTRA . ' AS e
m2.matchday_name AS matchday_eval_name LEFT JOIN ' . FOOTB_MATCHDAYS . ' AS m1 ON (m1.season = e.season AND m1.league = e.league AND m1.matchday = e.matchday)
FROM " . FOOTB_EXTRA . ' AS e LEFT JOIN ' . FOOTB_MATCHDAYS . " AS m2 ON (m2.season = e.season AND m2.league = e.league AND m2.matchday = e.matchday_eval)
LEFT JOIN ' . FOOTB_MATCHDAYS . ' AS m1 ON (m1.season = e.season AND m1.league = e.league AND m1.matchday = e.matchday) WHERE e.season = $season
LEFT JOIN ' . FOOTB_MATCHDAYS . " AS m2 ON (m2.season = e.season AND m2.league = e.league AND m2.matchday = e.matchday_eval) AND e.league = $league
WHERE e.season = $season ORDER BY e.extra_no ASC";
AND e.league = $league $result = $db->sql_query($sql);
ORDER BY e.extra_no ASC"; $rows_extra = $db->sql_fetchrowset($result);
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$rows_extra = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); $template->assign_vars(array(
'U_ACTION' => $this->u_action,
$template->assign_vars(array( 'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'U_ACTION' => $this->u_action, 'S_SEASON' => $season,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)), 'S_LEAGUE' => $league,
'S_SEASON' => $season, 'S_SEASON_OPTIONS' => $season_options,
'S_LEAGUE' => $league, 'S_LEAGUE_OPTIONS' => $league_options,
'S_SEASON_OPTIONS' => $season_options, 'S_EXTRA_ADD' => ($open_matchdays) ? true : false,
'S_LEAGUE_OPTIONS' => $league_options, 'S_VERSION_NO' => $this->config['football_version'],
'S_EXTRA_ADD' => ($open_matchdays) ? true : false, )
'S_VERSION_NO' => $this->config['football_version'], );
)
); // Check if the user is allowed to delete a extra.
if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete'])
// Check if the user is allowed to delete a extra. {
if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete']) $allow_delete = false;
{ }
$allow_delete = false; else
} {
else $allow_delete = true;
{ }
$allow_delete = true;
} $row_number = 0;
foreach ($rows_extra as $row_extra)
$row_number = 0; {
foreach ($rows_extra as $row_extra) $row_number++;
{ $row_class = (!($row_number % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
$row_number++; $template->assign_block_vars('extras', array(
$row_class = (!($row_number % 2)) ? 'bg1 row_light' : 'bg2 row_dark'; 'ROW_CLASS' => $row_class,
$template->assign_block_vars('extras', array( 'EXTRA_NO' => $row_extra['extra_no'],
'ROW_CLASS' => $row_class, 'QUESTION_TYPE' => $row_extra['question_type'],
'EXTRA_NO' => $row_extra['extra_no'], 'QUESTION' => $row_extra['question'],
'QUESTION_TYPE' => $row_extra['question_type'], 'MATCHDAY' => (strlen($row_extra['matchday_name']) > 0) ? $row_extra['matchday_name'] : $row_extra['matchday'] . '. ' . sprintf($user->lang['MATCHDAY']),
'QUESTION' => $row_extra['question'], 'MATCHDAY_EVAL' => (strlen($row_extra['matchday_name']) > 0) ? $row_extra['matchday_eval_name'] : $row_extra['matchday_eval'] . '. ' . sprintf($user->lang['MATCHDAY']),
'MATCHDAY' => (strlen($row_extra['matchday_name']) > 0) ? $row_extra['matchday_name'] : $row_extra['matchday'] . '. ' . sprintf($user->lang['MATCHDAY']), 'EXTRA_POINTS' => $row_extra['extra_points'],
'MATCHDAY_EVAL' => (strlen($row_extra['matchday_name']) > 0) ? $row_extra['matchday_eval_name'] : $row_extra['matchday_eval'] . '. ' . sprintf($user->lang['MATCHDAY']), 'EXTRA_STATUS' => $row_extra['extra_status'],
'EXTRA_POINTS' => $row_extra['extra_points'], 'U_EDIT' => "{$this->u_action}&amp;action=edit&amp;s=" . $season . "&amp;l=" .$league . "&amp;e=" .$row_extra['extra_no'],
'EXTRA_STATUS' => $row_extra['extra_status'], 'U_DELETE' => ($allow_delete) ? "{$this->u_action}&amp;action=delete&amp;s=" . $season . "&amp;l=" . $league . "&amp;e=" . $row_extra['extra_no'] : '',
'U_EDIT' => "{$this->u_action}&amp;action=edit&amp;s=" . $season . "&amp;l=" .$league . "&amp;e=" .$row_extra['extra_no'], )
'U_DELETE' => ($allow_delete) ? "{$this->u_action}&amp;action=delete&amp;s=" . $season . "&amp;l=" . $league . "&amp;e=" . $row_extra['extra_no'] : '', );
) }
); }
} }
}
}
?> ?>
+423 -425
View File
@@ -1,426 +1,424 @@
<?php <?php
/** /**
* *
* @package phpBB Extension - Football Football * @package phpBB Extension - Football Football
* @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
* *
*/ */
namespace football\football\acp; namespace football\football\acp;
class football_module class football_module
{ {
var $new_config = array(); var $new_config = array();
public $u_action; public $u_action;
protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
protected $root_path, $request, $php_ext, $log, $phpbb_container, $version_check; protected $root_path, $request, $php_ext, $log, $phpbb_container, $version_check;
public function __construct() public function __construct()
{ {
global $db, $user, $request, $template, $phpbb_container; global $db, $user, $request, $template, $phpbb_container;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang_ext('football/football', 'help_football'); $user->add_lang_ext('football/football', 'help_football');
$user->add_lang_ext('football/football', 'football'); $user->add_lang_ext('football/football', 'football');
$user->add_lang_ext('football/football', 'info_acp_football'); $user->add_lang_ext('football/football', 'info_acp_football');
$this->root_path = $phpbb_root_path . 'ext/football/football/'; $this->root_path = $phpbb_root_path . 'ext/football/football/';
$this->config = $config; $this->config = $config;
$this->request = $request; $this->request = $request;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpbb_admin_path = $phpbb_admin_path; $this->phpbb_admin_path = $phpbb_admin_path;
$this->php_ext = $phpEx; $this->php_ext = $phpEx;
$this->phpbb_container = $phpbb_container; $this->phpbb_container = $phpbb_container;
$this->version_check = $this->phpbb_container->get('football.football.version.check'); $this->version_check = $this->phpbb_container->get('football.football.version.check');
if(!function_exists('season_info')) if(!function_exists('season_info'))
{ {
include($this->root_path . 'includes/functions.' . $this->php_ext); include($this->root_path . 'includes/functions.' . $this->php_ext);
} }
if (!defined('FOOTB_SEASONS')) if (!defined('FOOTB_SEASONS'))
{ {
include($this->root_path . 'includes/constants.' . $this->php_ext); include($this->root_path . 'includes/constants.' . $this->php_ext);
} }
} }
function main($id, $mode) function main($id, $mode)
{ {
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'); $action = $this->request->variable('action', '');
$submit = (isset($_POST['submit'])) ? true : false;
$action = $this->request->variable('action', '');
$submit = (isset($_POST['submit'])) ? true : false; $form_key = 'acp_football';
add_form_key($form_key);
$form_key = 'acp_football';
add_form_key($form_key); switch ($mode)
{
switch ($mode) case 'userguide':
{ $this->page_title = 'ACP_FOOTBALL_USERGUIDE';
case 'userguide': $this->tpl_name = 'acp_football_userguide';
$this->page_title = 'ACP_FOOTBALL_USERGUIDE';
$this->tpl_name = 'acp_football_userguide'; $template->assign_vars(array(
'S_IN_FOOTBALL_USERGUIDE' => true,
$template->assign_vars(array( 'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')),
'S_IN_FOOTBALL_USERGUIDE' => true, 'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')), 'ICON_BACK_TO_TOP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" style="vertical-align: middle;" alt="' . $user->lang['BACK_TO_TOP'] . '" title="' . $user->lang['BACK_TO_TOP'] . '" />',
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'], 'S_VERSION_NO' => $this->config['football_version'],
'ICON_BACK_TO_TOP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" style="vertical-align: middle;" alt="' . $user->lang['BACK_TO_TOP'] . '" title="' . $user->lang['BACK_TO_TOP'] . '" />', ));
'S_VERSION_NO' => $this->config['football_version'],
)); // Pull the array data from the lang pack
foreach ($user->help as $help_ary)
// Pull the array data from the lang pack {
foreach ($user->help as $help_ary) if ($help_ary[0] == '--')
{ {
if ($help_ary[0] == '--') $template->assign_block_vars('userguide_block', array(
{ 'BLOCK_TITLE' => $help_ary[1])
$template->assign_block_vars('userguide_block', array( );
'BLOCK_TITLE' => $help_ary[1])
); continue;
}
continue;
} $template->assign_block_vars('userguide_block.userguide_row', array(
'USERGUIDE_QUESTION' => $help_ary[0],
$template->assign_block_vars('userguide_block.userguide_row', array( 'USERGUIDE_ANSWER' => $help_ary[1])
'USERGUIDE_QUESTION' => $help_ary[0], );
'USERGUIDE_ANSWER' => $help_ary[1]) }
); return;
} break;
return; case 'settings':
break; $display_vars = array(
case 'settings': 'title' => 'ACP_FOOTBALL_SETTINGS',
$display_vars = array( 'vars' => array(
'title' => 'ACP_FOOTBALL_SETTINGS', 'legend1' => 'ACP_FOOTBALL_SETTINGS',
'vars' => array( 'football_name' => array('lang' => 'FOOTBALL_NAME', 'validate' => 'string', 'type' => 'text:25:25', 'explain' => true),
'legend1' => 'ACP_FOOTBALL_SETTINGS', 'football_disable' => array('lang' => 'DISABLE_FOOTBALL', 'validate' => 'bool', 'type' => 'custom', 'method' => 'football_disable', 'explain' => true),
'football_name' => array('lang' => 'FOOTBALL_NAME', 'validate' => 'string', 'type' => 'text:25:25', 'explain' => true), 'football_disable_msg' => false,
'football_disable' => array('lang' => 'DISABLE_FOOTBALL', 'validate' => 'bool', 'type' => 'custom', 'method' => 'football_disable', 'explain' => true), 'football_fullscreen' => array('lang' => 'FOOTBALL_FULLSCREEN','validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_disable_msg' => false, 'football_header_enable' => array('lang' => 'FOOTBALL_HEADER_ENABLE','validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_fullscreen' => array('lang' => 'FOOTBALL_FULLSCREEN','validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_guest_view' => array('lang' => 'GUEST_VIEW', '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_user_view' => array('lang' => 'USER_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_host_timezone' => array('lang' => 'HOST_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'phpbb_timezone_select', 'params' => array($template, $user, '{CONFIG_VALUE}', true), 'explain' => true),
'football_user_view' => array('lang' => 'USER_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_info_display' => array('lang' => 'FOOTBALL_INFO', 'validate' => 'bool', 'type' => 'custom', 'method' => 'football_info', '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_info' => false,
'football_info_display' => array('lang' => 'FOOTBALL_INFO', 'validate' => 'bool', 'type' => 'custom', 'method' => 'football_info', 'explain' => true), 'football_win_name' => array('lang' => 'WIN_NAME', 'validate' => 'string', 'type' => 'text:6:6', 'explain' => true),
'football_info' => false, 'football_code' => array('lang' => 'FOOTBALL_CODE', 'validate' => 'string', 'type' => 'text:25:25', 'explain' => true),
'football_win_name' => array('lang' => 'WIN_NAME', 'validate' => 'string', 'type' => 'text:6:6', 'explain' => true), 'football_style' => array('lang' => 'FOOTBALL_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false),
'football_code' => array('lang' => 'FOOTBALL_CODE', 'validate' => 'string', 'type' => 'text:25:25', 'explain' => true), 'football_override_style' => array('lang' => 'FOOTBALL_OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_style' => array('lang' => 'FOOTBALL_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false), 'football_update_source' => array('lang' => 'FOOTBALL_UPDATE_SOURCE', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => true),
'football_override_style' => array('lang' => 'FOOTBALL_OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_update_code' => array('lang' => 'FOOTBALL_UPDATE_CODE', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
'football_update_source' => array('lang' => 'FOOTBALL_UPDATE_SOURCE', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => true),
'football_update_code' => array('lang' => 'FOOTBALL_UPDATE_CODE', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true), 'legend2' => 'GENERAL_SETTINGS',
'football_left_column_width' => array('lang' => 'LEFT_COLUMN', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'legend2' => 'GENERAL_SETTINGS', 'football_right_column_width' => array('lang' => 'RIGHT_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_display_ranks' => array('lang' => 'DISPLAY_RANKS', '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_users_per_page' => array('lang' => 'USERS_PAGE', '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), 'legend3' => 'ACP_SUBMIT_CHANGES',
)
'legend3' => 'ACP_SUBMIT_CHANGES', );
) // show the extension version check on Settings page
); $this->version_check->check();
// show the extension version check on Settings page break;
$this->version_check->check();
break; case 'features':
$display_vars = array(
case 'features': 'title' => 'ACP_FOOTBALL_FEATURES',
$display_vars = array( 'vars' => array(
'title' => 'ACP_FOOTBALL_FEATURES', 'legend1' => 'ACP_FOOTBALL_FEATURES',
'vars' => array( 'football_founder_delete' => array('lang' => 'FOUNDER_DELETE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend1' => 'ACP_FOOTBALL_FEATURES', 'football_results_at_time' => array('lang' => 'RESULTS_AT_TIME', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_founder_delete' => array('lang' => 'FOUNDER_DELETE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_win_hits02' => array('lang' => 'WIN_HITS02', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_results_at_time' => array('lang' => 'RESULTS_AT_TIME', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_same_allowed' => array('lang' => 'SAME_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_win_hits02' => array('lang' => 'WIN_HITS02', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_season_start' => array('lang' => 'FOOTBALL_SEASON_START', 'validate' => 'int', 'type' => 'select', 'method' => 'season_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => true),
'football_same_allowed' => array('lang' => 'SAME_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_view_current' => array('lang' => 'VIEW_CURRENT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_season_start' => array('lang' => 'FOOTBALL_SEASON_START', 'validate' => 'int', 'type' => 'select', 'method' => 'season_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => true), 'football_view_bets' => array('lang' => 'VIEW_BETS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_view_current' => array('lang' => 'VIEW_CURRENT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_view_tendencies' => array('lang' => 'VIEW_TENDENCIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_view_bets' => array('lang' => 'VIEW_BETS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_bank' => array('lang' => 'BANK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_view_tendencies' => array('lang' => 'VIEW_TENDENCIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_ult_points' => array('lang' => 'ULT_POINTS', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_up_method', 'explain' => true),
'football_bank' => array('lang' => 'BANK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_ult_points_factor'=> array('lang' => 'ULT_POINTS_FACTOR', 'validate' => 'dec:3:2','type' => 'text:4:10', 'explain' => true),
'football_ult_points' => array('lang' => 'ULT_POINTS', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_up_method', 'explain' => true), 'football_remember_enable' => array('lang' => 'FOOTBALL_REMEMBER_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_ult_points_factor'=> array('lang' => 'ULT_POINTS_FACTOR', 'validate' => 'dec:3:2','type' => 'text:4:10', 'explain' => true), 'football_remember_next_run'=> array('lang' => 'FOOTBALL_REMEMBER_NEXT_RUN','validate' => 'int', 'type' => 'custom', 'method' => 'next_run', 'explain' => true),
'football_remember_enable' => array('lang' => 'FOOTBALL_REMEMBER_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_remember_next_run'=> array('lang' => 'FOOTBALL_REMEMBER_NEXT_RUN','validate' => 'int', 'type' => 'custom', 'method' => 'next_run', 'explain' => true), 'legend2' => 'ACP_SUBMIT_CHANGES',
)
'legend2' => 'ACP_SUBMIT_CHANGES', );
) break;
);
break; case 'menu':
$display_vars = array(
case 'menu': 'title' => 'ACP_FOOTBALL_MENU',
$display_vars = array( 'vars' => array(
'title' => 'ACP_FOOTBALL_MENU', 'legend1' => 'ACP_FOOTBALL_MENU',
'vars' => array( 'football_breadcrumb' => array('lang' => 'FOOTBALL_BREADCRUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend1' => 'ACP_FOOTBALL_MENU', 'football_side' => array('lang' => 'FOOTBALL_SIDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_breadcrumb' => array('lang' => 'FOOTBALL_BREADCRUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_menu' => array('lang' => 'FOOTBALL_MENU', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'football_side' => array('lang' => 'FOOTBALL_SIDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_menu_link1' => array('lang' => 'MENU_LINK1', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => true),
'football_menu' => array('lang' => 'FOOTBALL_MENU', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'football_menu_desc1' => array('lang' => 'MENU_DESC1', 'validate' => 'string', 'type' => 'text:20:20', 'explain' => true),
'football_menu_link1' => array('lang' => 'MENU_LINK1', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => true), 'football_menu_link2' => array('lang' => 'MENU_LINK2', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => false),
'football_menu_desc1' => array('lang' => 'MENU_DESC1', 'validate' => 'string', 'type' => 'text:20:20', 'explain' => true), 'football_menu_desc2' => array('lang' => 'MENU_DESC2', 'validate' => 'string', 'type' => 'text:20:20', 'explain' => false),
'football_menu_link2' => array('lang' => 'MENU_LINK2', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => false), 'football_menu_link3' => array('lang' => 'MENU_LINK3', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => false),
'football_menu_desc2' => array('lang' => 'MENU_DESC2', 'validate' => 'string', 'type' => 'text:20:20', 'explain' => false), 'football_menu_desc3' => array('lang' => 'MENU_DESC3', 'validate' => 'string', 'type' => 'text:20:20', 'explain' => false),
'football_menu_link3' => array('lang' => 'MENU_LINK3', 'validate' => 'string', 'type' => 'text:80:255', 'explain' => false), )
'football_menu_desc3' => array('lang' => 'MENU_DESC3', 'validate' => 'string', 'type' => 'text:20:20', 'explain' => false), );
) break;
);
break; default:
trigger_error('NO_MODE', E_USER_ERROR);
default: break;
trigger_error('NO_MODE', E_USER_ERROR); }
break;
} if (isset($display_vars['lang']))
{
if (isset($display_vars['lang'])) $user->add_lang($display_vars['lang']);
{ }
$user->add_lang($display_vars['lang']);
} $this->new_config = $this->config;
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc($this->request->variable('config', array('' => ''), true)) : $this->new_config;
$this->new_config = $this->config; $error = array();
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc($this->request->variable('config', array('' => ''), true)) : $this->new_config;
$error = array(); // We validate the complete config if whished
validate_config_vars($display_vars['vars'], $cfg_array, $error);
// We validate the complete config if whished
validate_config_vars($display_vars['vars'], $cfg_array, $error); if ($submit && !check_form_key($form_key))
{
if ($submit && !check_form_key($form_key)) $error[] = $user->lang['FORM_INVALID'];
{ }
$error[] = $user->lang['FORM_INVALID']; // Do not write values if there is an error
} if (sizeof($error))
// Do not write values if there is an error {
if (sizeof($error)) $submit = false;
{ }
$submit = false;
} // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $this->config_name => $null)
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to... {
foreach ($display_vars['vars'] as $this->config_name => $null) if (!isset($cfg_array[$this->config_name]) || strpos($this->config_name, 'legend') !== false)
{ {
if (!isset($cfg_array[$this->config_name]) || strpos($this->config_name, 'legend') !== false) continue;
{ }
continue; $this->new_config[$this->config_name] = $this->config_value = $cfg_array[$this->config_name];
}
$this->new_config[$this->config_name] = $this->config_value = $cfg_array[$this->config_name]; if ($submit)
{
if ($submit) if ($this->config_name == 'football_ult_points' && $this->config_value)
{ {
if ($this->config_name == 'football_ult_points' && $this->config_value) $this->config->set('football_bank', 1);
{ }
$this->config->set('football_bank', 1); if ($this->config_name == 'football_remember_enable')
} {
if ($this->config_name == 'football_remember_enable') $day = $this->request->variable('next_run_day', 0);
{ $month = $this->request->variable('next_run_month', 0);
$day = $this->request->variable('next_run_day', 0); $year = $this->request->variable('next_run_year', 0);
$month = $this->request->variable('next_run_month', 0); $hour = $this->request->variable('next_run_hour', 0);
$year = $this->request->variable('next_run_year', 0); $minute = $this->request->variable('next_run_minute', 0);
$hour = $this->request->variable('next_run_hour', 0);
$minute = $this->request->variable('next_run_minute', 0); $next_run = mktime($hour, $minute, 0, $month, $day, $year);
$this->config->set('football_remember_next_run', $next_run);
$next_run = mktime($hour, $minute, 0, $month, $day, $year); }
$this->config->set('football_remember_next_run', $next_run); $this->config->set($this->config_name, $this->config_value);
} }
$this->config->set($this->config_name, $this->config_value); }
}
} if ($submit)
{
if ($submit) $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FOOTBALL_' . strtoupper($mode));
{
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FOOTBALL_' . strtoupper($mode)); trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
} $this->tpl_name = 'acp_football';
$this->page_title = $display_vars['title'];
$this->tpl_name = 'acp_football';
$this->page_title = $display_vars['title']; $template->assign_vars(array(
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')),
$template->assign_vars(array( 'L_TITLE' => $user->lang[$display_vars['title']],
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')), 'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
'L_TITLE' => $user->lang[$display_vars['title']], 'S_ERROR' => (sizeof($error)) ? true : false,
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'], 'ERROR_MSG' => implode('<br />', $error),
'S_ERROR' => (sizeof($error)) ? true : false, 'U_ACTION' => $this->u_action,
'ERROR_MSG' => implode('<br />', $error), 'S_VERSION_NO' => $this->config['football_version'],
'U_ACTION' => $this->u_action, )
'S_VERSION_NO' => $this->config['football_version'], );
)
); // Output relevant page
foreach ($display_vars['vars'] as $this->config_key => $vars)
// Output relevant page {
foreach ($display_vars['vars'] as $this->config_key => $vars) if (!is_array($vars) && strpos($this->config_key, 'legend') === false)
{ {
if (!is_array($vars) && strpos($this->config_key, 'legend') === false) continue;
{ }
continue;
} if (strpos($this->config_key, 'legend') !== false)
{
if (strpos($this->config_key, 'legend') !== false) $template->assign_block_vars('options', array(
{ 'S_LEGEND' => true,
$template->assign_block_vars('options', array( 'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars,
'S_LEGEND' => true, )
'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars, );
)
); continue;
}
continue;
} $type = explode(':', $vars['type']);
$type = explode(':', $vars['type']); $l_explain = '';
if ($vars['explain'] && isset($vars['lang_explain']))
$l_explain = ''; {
if ($vars['explain'] && isset($vars['lang_explain'])) $l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
{ }
$l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain']; else if ($vars['explain'])
} {
else if ($vars['explain']) $l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
{ }
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
} $content = build_cfg_template($type, $this->config_key, $this->new_config, $this->config_key, $vars);
$content = build_cfg_template($type, $this->config_key, $this->new_config, $this->config_key, $vars); if (empty($content))
{
if (empty($content)) continue;
{ }
continue;
} $template->assign_block_vars('options', array(
'KEY' => $this->config_key,
$template->assign_block_vars('options', array( 'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
'KEY' => $this->config_key, 'S_EXPLAIN' => $vars['explain'],
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'], 'TITLE_EXPLAIN' => $l_explain,
'S_EXPLAIN' => $vars['explain'], 'CONTENT' => $content,
'TITLE_EXPLAIN' => $l_explain, )
'CONTENT' => $content, );
)
); unset($display_vars['vars'][$this->config_key]);
}
unset($display_vars['vars'][$this->config_key]); }
}
} /**
* Football disable option and message
/** */
* Football disable option and message function football_disable($value, $key)
*/ {
function football_disable($value, $key) global $user;
{
global $user; $radio_ary = array(1 => 'YES', 0 => 'NO');
$radio_ary = array(1 => 'YES', 0 => 'NO'); return h_radio('config[football_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[football_disable_msg]" maxlength="255" size="80" value="' . $this->new_config['football_disable_msg'] . '" />';
}
return h_radio('config[football_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[football_disable_msg]" maxlength="255" size="80" value="' . $this->new_config['football_disable_msg'] . '" />';
} /**
* Football info option and message
/** */
* Football info option and message function football_info($value, $key)
*/ {
function football_info($value, $key) global $user;
{
global $user; $radio_ary = array(1 => 'YES', 0 => 'NO');
$radio_ary = array(1 => 'YES', 0 => 'NO'); return h_radio('config[football_info_display]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[football_info]" maxlength="255" size="80" value="' . $this->new_config['football_info'] . '" />';
}
return h_radio('config[football_info_display]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[football_info]" maxlength="255" size="80" value="' . $this->new_config['football_info'] . '" />';
} /**
* Select ultimate points method
/** */
* Select ultimate points method function select_up_method($value, $key = '')
*/ {
function select_up_method($value, $key = '') global $user, $config;
{
global $user, $config; $radio_ary = array(UP_NONE => 'UP_NONE', UP_WINS => 'UP_WINS', UP_POINTS => 'UP_POINTS');
$radio_ary = array(UP_NONE => 'UP_NONE', UP_WINS => 'UP_WINS', UP_POINTS => 'UP_POINTS'); return h_radio('config[football_ult_points]', $radio_ary, $value, $key);
}
return h_radio('config[football_ult_points]', $radio_ary, $value, $key);
}
function season_select($default = 0)
{
function season_select($default = 0) global $user, $db;
{
global $user, $db; $sql = 'SELECT DISTINCT s.season, s.season_name_short FROM ' . FOOTB_SEASONS . ' AS s
INNER JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = s.season)
$sql = 'SELECT DISTINCT s.season, s.season_name_short FROM ' . FOOTB_SEASONS . ' AS s INNER JOIN ' . FOOTB_MATCHDAYS . ' AS md ON (md.season = s.season AND md.league = l.league)
INNER JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = s.season) WHERE 1
INNER JOIN ' . FOOTB_MATCHDAYS . ' AS md ON (md.season = s.season AND md.league = l.league) ORDER BY s.season DESC';
WHERE 1 $result = $db->sql_query($sql);
ORDER BY s.season DESC';
$result = $db->sql_query($sql); $selected = (0 == $default) ? ' selected="selected"' : '';
$season_options = '<option value="0"' . $selected . '>' . $user->lang['AUTO'] . '</option>';
$selected = (0 == $default) ? ' selected="selected"' : ''; while ($row = $db->sql_fetchrow($result))
$season_options = '<option value="0"' . $selected . '>' . $user->lang['AUTO'] . '</option>'; {
while ($row = $db->sql_fetchrow($result)) $selected = ($row['season'] == $default) ? ' selected="selected"' : '';
{ $season_options .= '<option value="' . $row['season'] . '"' . $selected . '>' . $row['season_name_short'] . '</option>';
$selected = ($row['season'] == $default) ? ' selected="selected"' : ''; }
$season_options .= '<option value="' . $row['season'] . '"' . $selected . '>' . $row['season_name_short'] . '</option>'; $db->sql_freeresult($result);
}
$db->sql_freeresult($result); return $season_options;
}
return $season_options;
} /**
* Adjust Cronjob EMail remember next un
/** */
* Adjust Cronjob EMail remember next un function next_run($value, $key = '')
*/ {
function next_run($value, $key = '') global $user, $db;
{ $next_run = getdate($this->config['football_remember_next_run']);
global $user, $db;
$next_run = getdate($this->config['football_remember_next_run']); // Days
$day_options = '<select name="next_run_day" id="next_run_day">';
// Days for ($i = 1; $i < 32; $i++)
$day_options = '<select name="next_run_day" id="next_run_day">'; {
for ($i = 1; $i < 32; $i++) $selected = ($i == $next_run['mday']) ? ' selected="selected"' : '';
{ $day_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
$selected = ($i == $next_run['mday']) ? ' selected="selected"' : ''; }
$day_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>'; $day_options .= '</select>';
}
$day_options .= '</select>'; // Months
$month_options = '<select name="next_run_month" id="next_run_month">';
// Months for ($i = 1; $i < 13; $i++)
$month_options = '<select name="next_run_month" id="next_run_month">'; {
for ($i = 1; $i < 13; $i++) $selected = ($i == $next_run['mon']) ? ' selected="selected"' : '';
{ $month_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
$selected = ($i == $next_run['mon']) ? ' selected="selected"' : ''; }
$month_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>'; $month_options .= '</select>';
}
$month_options .= '</select>'; // Years
$year_options = '<select name="next_run_year" id="next_run_year">';
// Years for ($i = date("Y"); $i < (date("Y") + 1); $i++)
$year_options = '<select name="next_run_year" id="next_run_year">'; {
for ($i = date("Y"); $i < (date("Y") + 1); $i++) $selected = ($i == $next_run['year']) ? ' selected="selected"' : '';
{ $year_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
$selected = ($i == $next_run['year']) ? ' selected="selected"' : ''; }
$year_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>'; $year_options .= '</select>';
}
$year_options .= '</select>'; // Hours
$hour_options = '<select name="next_run_hour" id="next_run_hour">';
// Hours for ($i = 0; $i < 24; $i++)
$hour_options = '<select name="next_run_hour" id="next_run_hour">'; {
for ($i = 0; $i < 24; $i++) $selected = ($i == $next_run['hours']) ? ' selected="selected"' : '';
{ $hour_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
$selected = ($i == $next_run['hours']) ? ' selected="selected"' : ''; }
$hour_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>'; $hour_options .= '</select>';
}
$hour_options .= '</select>'; // Minutes
$minute_options = '<select name="next_run_minute" id="next_run_minute">';
// Minutes for ($i = 0; $i < 60; $i++)
$minute_options = '<select name="next_run_minute" id="next_run_minute">'; {
for ($i = 0; $i < 60; $i++) $selected = ($i == $next_run['minutes']) ? ' selected="selected"' : '';
{ $minute_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
$selected = ($i == $next_run['minutes']) ? ' selected="selected"' : ''; }
$minute_options .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>'; $minute_options .= '</select>';
}
$minute_options .= '</select>';
return $user->lang['DAY'] . ': ' . $day_options . ' ' . $user->lang['MONTH'] . ': ' . $month_options . ' ' . $user->lang['YEAR'] . ': ' .
$year_options . ' ' . $user->lang['HOURS'] . ': ' . $hour_options . ' ' . $user->lang['MINUTES'] . ': ' . $minute_options;
return $user->lang['DAY'] . ': ' . $day_options . ' ' . $user->lang['MONTH'] . ': ' . $month_options . ' ' . $user->lang['YEAR'] . ': ' .
$year_options . ' ' . $user->lang['HOURS'] . ': ' . $hour_options . ' ' . $user->lang['MINUTES'] . ': ' . $minute_options; }
}
}
}
?> ?>
+254 -256
View File
@@ -1,257 +1,255 @@
<?php <?php
/** /**
* *
* @package phpBB Extension - Football Football * @package phpBB Extension - Football Football
* @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
* *
*/ */
namespace football\football\acp; namespace football\football\acp;
class ko_module class ko_module
{ {
public $u_action; public $u_action;
protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
protected $root_path, $request, $php_ext, $log; protected $root_path, $request, $php_ext, $log;
public function __construct() public function __construct()
{ {
global $db, $user, $request, $template; global $db, $user, $request, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang_ext('football/football', 'football'); $user->add_lang_ext('football/football', 'football');
$user->add_lang_ext('football/football', 'info_acp_ko'); $user->add_lang_ext('football/football', 'info_acp_ko');
$this->root_path = $phpbb_root_path . 'ext/football/football/'; $this->root_path = $phpbb_root_path . 'ext/football/football/';
$this->config = $config; $this->config = $config;
$this->request = $request; $this->request = $request;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpbb_admin_path = $phpbb_admin_path; $this->phpbb_admin_path = $phpbb_admin_path;
$this->php_ext = $phpEx; $this->php_ext = $phpEx;
if(!function_exists('season_info')) if(!function_exists('season_info'))
{ {
include($this->root_path . 'includes/functions.' . $this->php_ext); include($this->root_path . 'includes/functions.' . $this->php_ext);
} }
if (!defined('FOOTB_SEASONS')) if (!defined('FOOTB_SEASONS'))
{ {
include($this->root_path . 'includes/constants.' . $this->php_ext); include($this->root_path . 'includes/constants.' . $this->php_ext);
} }
} }
function main($id, $mode) function main($id, $mode)
{ {
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->page_title = 'ACP_FOOTBALL_KO_MANAGE';
$this->tpl_name = 'acp_football_ko';
$this->page_title = 'ACP_FOOTBALL_KO_MANAGE'; $form_key = 'acp_football_ko';
add_form_key($form_key);
$form_key = 'acp_football_ko';
add_form_key($form_key); include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); // Check and set some common vars
$action = (isset($_POST['update'])) ? 'update' : $this->request->variable('action', '');
// Check and set some common vars $season = $this->request->variable('s', 0);
$action = (isset($_POST['update'])) ? 'update' : $this->request->variable('action', ''); $league = $this->request->variable('l', 0);
$season = $this->request->variable('s', 0); $matchday_from = $this->request->variable('matchday_from', 0);
$league = $this->request->variable('l', 0); $matchday_to = $this->request->variable('matchday_to', 0);
$matchday_from = $this->request->variable('matchday_from', 0); $matchday_new = $this->request->variable('matchday_new', 0);
$matchday_to = $this->request->variable('matchday_to', 0); $check_rank = $this->request->variable('check_rank', 0);
$matchday_new = $this->request->variable('matchday_new', 0); $rank = $this->request->variable('rank', 2);
$check_rank = $this->request->variable('check_rank', 0); $move_rank = $this->request->variable('move_rank', 3);
$rank = $this->request->variable('rank', 2); $move_league = $this->request->variable('move_league', 0);
$move_rank = $this->request->variable('move_rank', 3); $move_matchday = $this->request->variable('move_matchday', 8);
$move_league = $this->request->variable('move_league', 0);
$move_matchday = $this->request->variable('move_matchday', 8); // Clear some vars
$error = array();
// Clear some vars $success = array();
$error = array();
$success = array(); $curr_season = curr_season();
// Grab current season
$curr_season = curr_season(); if (!$season)
// Grab current season {
if (!$season) $season = $curr_season;
{ }
$season = $curr_season;
} // Grab basic data for select season
if ($season)
// Grab basic data for select season {
if ($season) $sql = 'SELECT
{ DISTINCT s.*
$sql = 'SELECT FROM ' . FOOTB_SEASONS . ' AS s
DISTINCT s.* LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = s.season)
FROM ' . FOOTB_SEASONS . ' AS s WHERE l.league_type = 2
LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = s.season) ORDER BY s.season DESC';
WHERE l.league_type = 2 $result = $db->sql_query($sql);
ORDER BY s.season DESC';
$result = $db->sql_query($sql); $season_options = '';
while ($row = $db->sql_fetchrow($result))
$season_options = ''; {
while ($row = $db->sql_fetchrow($result)) $selected = ($season && $row['season'] == $season) ? ' selected="selected"' : '';
{ $season_options .= '<option value="' . $row['season'] . '"' . $selected . '>' . $row['season_name_short'] . '</option>';
$selected = ($season && $row['season'] == $season) ? ' selected="selected"' : ''; if ($selected <> '')
$season_options .= '<option value="' . $row['season'] . '"' . $selected . '>' . $row['season_name_short'] . '</option>'; {
if ($selected <> '') $season_name = $row['season_name_short'];
{ }
$season_name = $row['season_name_short']; }
} $db->sql_freeresult($result);
} }
$db->sql_freeresult($result); else
} {
else trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
} // Grab basic data for select league
$sql = 'SELECT *
// Grab basic data for select league FROM ' . FOOTB_LEAGUES . '
$sql = 'SELECT * WHERE season = ' . $season . '
FROM ' . FOOTB_LEAGUES . ' AND league_type = ' . LEAGUE_KO . '
WHERE season = ' . $season . ' ORDER BY league ASC';
AND league_type = ' . LEAGUE_KO . ' $result = $db->sql_query($sql);
ORDER BY league ASC';
$result = $db->sql_query($sql); $league_options = '';
if ($move_league == 0)
$league_options = ''; {
if ($move_league == 0) $league_move_options = '<option value="0" selected="selected">' . sprintf($user->lang['CHOOSE_LEAGUE']) . '</option>';
{ }
$league_move_options = '<option value="0" selected="selected">' . sprintf($user->lang['CHOOSE_LEAGUE']) . '</option>'; else
} {
else $league_move_options = '<option value="0">' . sprintf($user->lang['CHOOSE_LEAGUE']) . '</option>';
{ }
$league_move_options = '<option value="0">' . sprintf($user->lang['CHOOSE_LEAGUE']) . '</option>'; while ($row = $db->sql_fetchrow($result))
} {
while ($row = $db->sql_fetchrow($result)) // Grab current league
{ if (!$league)
// Grab current league {
if (!$league) $league = $row['league'];
{ }
$league = $row['league']; $selected = ($league && $row['league'] == $league) ? ' selected="selected"' : '';
} $league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>';
$selected = ($league && $row['league'] == $league) ? ' selected="selected"' : ''; if ($selected <> '')
$league_options .= '<option value="' . $row['league'] . '"' . $selected . '>' . $row['league_name'] . '</option>'; {
if ($selected <> '') $league_matchdays = $row['matchdays'];
{ $matches_matchday = $row['matches_on_matchday'];
$league_matchdays = $row['matchdays']; $league_name = $row['league_name'];
$matches_matchday = $row['matches_on_matchday']; }
$league_name = $row['league_name']; else
} {
else $selected_move = ($move_league && $row['league'] == $move_league) ? ' selected="selected"' : '';
{ $league_move_options .= '<option value="' . $row['league'] . '"' . $selected_move . '>' . $row['league_name'] . '</option>';
$selected_move = ($move_league && $row['league'] == $move_league) ? ' selected="selected"' : ''; }
$league_move_options .= '<option value="' . $row['league'] . '"' . $selected_move . '>' . $row['league_name'] . '</option>'; }
} $db->sql_freeresult($result);
}
$db->sql_freeresult($result); if (!$league)
{
if (!$league) trigger_error(sprintf($user->lang['NO_LEAGUE'], $season) . adm_back_link($this->u_action . "&amp;s=$season"), E_USER_WARNING);
{ }
trigger_error(sprintf($user->lang['NO_LEAGUE'], $season) . adm_back_link($this->u_action . "&amp;s=$season"), E_USER_WARNING);
} // Grab basic data for select matchday
if (!$matchday_from)
// Grab basic data for select matchday {
if (!$matchday_from) $matchday_from = curr_matchday($season, $league);
{ if ($matchday_from > 1)
$matchday_from = curr_matchday($season, $league); {
if ($matchday_from > 1) $matchday_from = $matchday_from - 1;
{ }
$matchday_from = $matchday_from - 1; }
} if (!$matchday_to)
} {
if (!$matchday_to) $matchday_to = $matchday_from;
{ }
$matchday_to = $matchday_from; if (!$matchday_new)
} {
if (!$matchday_new) $matchday_new = $matchday_to + 1;
{ }
$matchday_new = $matchday_to + 1;
} $sql = 'SELECT *
FROM ' . FOOTB_MATCHDAYS . "
$sql = 'SELECT * WHERE season = $season
FROM ' . FOOTB_MATCHDAYS . " AND league = $league
WHERE season = $season ORDER BY matchday ASC";
AND league = $league $result = $db->sql_query($sql);
ORDER BY matchday ASC";
$result = $db->sql_query($sql); $matchday_from_options = '';
$matchday_to_options = '';
$matchday_from_options = ''; $matchday_new_options = '';
$matchday_to_options = ''; while ($row = $db->sql_fetchrow($result))
$matchday_new_options = ''; {
while ($row = $db->sql_fetchrow($result)) $selected_from = ($matchday_from && $row['matchday'] == $matchday_from) ? ' selected="selected"' : '';
{ $selected_to = ($matchday_to && $row['matchday'] == $matchday_to) ? ' selected="selected"' : '';
$selected_from = ($matchday_from && $row['matchday'] == $matchday_from) ? ' selected="selected"' : ''; $selected_new = ($matchday_new && $row['matchday'] == $matchday_new) ? ' selected="selected"' : '';
$selected_to = ($matchday_to && $row['matchday'] == $matchday_to) ? ' selected="selected"' : ''; $day_name = (strlen($row['matchday_name']) > 0) ? $row['matchday_name'] : $row['matchday'] . '. ' . sprintf($user->lang['MATCHDAY']);
$selected_new = ($matchday_new && $row['matchday'] == $matchday_new) ? ' selected="selected"' : ''; $matchday_from_options .= '<option value="' . $row['matchday'] . '"' . $selected_from . '>' . $day_name . '</option>';
$day_name = (strlen($row['matchday_name']) > 0) ? $row['matchday_name'] : $row['matchday'] . '. ' . sprintf($user->lang['MATCHDAY']); $matchday_to_options .= '<option value="' . $row['matchday'] . '"' . $selected_to . '>' . $day_name . '</option>';
$matchday_from_options .= '<option value="' . $row['matchday'] . '"' . $selected_from . '>' . $day_name . '</option>'; $matchday_new_options .= '<option value="' . $row['matchday'] . '"' . $selected_new . '>' . $day_name . '</option>';
$matchday_to_options .= '<option value="' . $row['matchday'] . '"' . $selected_to . '>' . $day_name . '</option>'; }
$matchday_new_options .= '<option value="' . $row['matchday'] . '"' . $selected_new . '>' . $day_name . '</option>'; $db->sql_freeresult($result);
} if ($matchday_from_options == '')
$db->sql_freeresult($result); {
if ($matchday_from_options == '') trigger_error(sprintf($user->lang['NO_MATCHDAY'], $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_name, $season) . adm_back_link($this->u_action . "&amp;s=$season&amp;l=$league"), E_USER_WARNING);
} // Which page?
switch ($action)
// Which page? {
switch ($action) case 'update':
{ {
case 'update': if ($matchday_from > $matchday_to)
{ {
if ($matchday_from > $matchday_to) $error[] = sprintf($user->lang['ERROR_FROM_TO']);
{ }
$error[] = sprintf($user->lang['ERROR_FROM_TO']); if ($matchday_new <= $matchday_to)
} {
if ($matchday_new <= $matchday_to) $error[] = sprintf($user->lang['ERROR_TARGET']);
{ }
$error[] = sprintf($user->lang['ERROR_TARGET']); if (!sizeof($error))
} {
if (!sizeof($error)) if (1 == $check_rank)
{ {
if (1 == $check_rank) $success = ko_group_next_round($season, $league, $matchday_from, $matchday_to, $matchday_new, $rank, $move_rank, $move_league, $move_matchday);
{ }
$success = ko_group_next_round($season, $league, $matchday_from, $matchday_to, $matchday_new, $rank, $move_rank, $move_league, $move_matchday); else
} {
else $success = ko_next_round($season, $league, $matchday_from, $matchday_to, $matchday_new);
{ }
$success = ko_next_round($season, $league, $matchday_from, $matchday_to, $matchday_new); trigger_error($success . adm_back_link($this->u_action));
} }
trigger_error($success . adm_back_link($this->u_action)); }
} break;
} }
break;
} $template->assign_vars(array(
'U_ACTION' => $this->u_action,
$template->assign_vars(array( 'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'U_ACTION' => $this->u_action, 'S_ERROR' => (sizeof($error)) ? true : false,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)), 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_ERROR' => (sizeof($error)) ? true : false, 'S_SUCCESS' => (sizeof($success)) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '',
'S_SUCCESS' => (sizeof($success)) ? true : false, 'S_SEASON_OPTIONS' => $season_options,
'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '', 'S_LEAGUE_OPTIONS' => $league_options,
'S_SEASON_OPTIONS' => $season_options, 'S_SEASON' => $season,
'S_LEAGUE_OPTIONS' => $league_options, 'S_LEAGUE' => $league,
'S_SEASON' => $season, 'S_MATCHDAY_FROM_OPTIONS'=> $matchday_from_options,
'S_LEAGUE' => $league, 'S_MATCHDAY_TO_OPTIONS' => $matchday_to_options,
'S_MATCHDAY_FROM_OPTIONS'=> $matchday_from_options, 'S_MATCHDAY_NEW_OPTIONS'=> $matchday_new_options,
'S_MATCHDAY_TO_OPTIONS' => $matchday_to_options, 'S_CHECK_RANK' => $check_rank,
'S_MATCHDAY_NEW_OPTIONS'=> $matchday_new_options, 'S_RANK' => $rank,
'S_CHECK_RANK' => $check_rank, 'S_MOVE_RANK' => $move_rank,
'S_RANK' => $rank, 'S_MOVE_LEAGUE_OPTIONS' => $league_move_options,
'S_MOVE_RANK' => $move_rank, 'S_MOVE_MATCHDAY' => $move_matchday,
'S_MOVE_LEAGUE_OPTIONS' => $league_move_options, 'S_VERSION_NO' => $this->config['football_version'],
'S_MOVE_MATCHDAY' => $move_matchday, )
'S_VERSION_NO' => $this->config['football_version'], );
) }
); }
}
}
?> ?>
+733 -735
View File
File diff suppressed because it is too large Load Diff
+1131 -1133
View File
File diff suppressed because it is too large Load Diff
+764 -766
View File
File diff suppressed because it is too large Load Diff
+816 -818
View File
File diff suppressed because it is too large Load Diff
+393 -395
View File
@@ -1,396 +1,394 @@
<?php <?php
/** /**
* *
* @package phpBB Extension - Football Football * @package phpBB Extension - Football Football
* @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
* *
*/ */
namespace football\football\acp; namespace football\football\acp;
class seasons_module class seasons_module
{ {
public $u_action; public $u_action;
protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; protected $db, $user, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
protected $root_path, $request, $php_ext, $log; protected $root_path, $request, $php_ext, $log;
public function __construct() public function __construct()
{ {
global $db, $user, $request, $template; global $db, $user, $request, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang_ext('football/football', 'football'); $user->add_lang_ext('football/football', 'football');
$user->add_lang_ext('football/football', 'info_acp_seasons'); $user->add_lang_ext('football/football', 'info_acp_seasons');
$this->root_path = $phpbb_root_path . 'ext/football/football/'; $this->root_path = $phpbb_root_path . 'ext/football/football/';
$this->config = $config; $this->config = $config;
$this->request = $request; $this->request = $request;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpbb_admin_path = $phpbb_admin_path; $this->phpbb_admin_path = $phpbb_admin_path;
$this->php_ext = $phpEx; $this->php_ext = $phpEx;
if(!function_exists('season_info')) if(!function_exists('season_info'))
{ {
include($this->root_path . 'includes/functions.' . $this->php_ext); include($this->root_path . 'includes/functions.' . $this->php_ext);
} }
if (!defined('FOOTB_SEASONS')) if (!defined('FOOTB_SEASONS'))
{ {
include($this->root_path . 'includes/constants.' . $this->php_ext); include($this->root_path . 'includes/constants.' . $this->php_ext);
} }
} }
function main($id, $mode) function main($id, $mode)
{ {
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->page_title = 'ACP_FOOTBALL_SEASONS_MANAGE';
$this->tpl_name = 'acp_football_seasons';
$this->page_title = 'ACP_FOOTBALL_SEASONS_MANAGE'; $form_key = 'acp_football_seasons';
add_form_key($form_key);
$form_key = 'acp_football_seasons';
add_form_key($form_key); include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx); // Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', '');
// Check and set some common vars $season = $this->request->variable('s', 0);
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', ''); $edit = $this->request->variable('edit', 0);
$season = $this->request->variable('s', 0); $update = (isset($_POST['update'])) ? true : false;
$edit = $this->request->variable('edit', 0);
$update = (isset($_POST['update'])) ? true : false; // Clear some vars
$season_row = array();
// Clear some vars $error = array();
$season_row = array();
$error = array(); // Grab basic data for season, if season is set and exists
if ($season)
// Grab basic data for season, if season is set and exists {
if ($season) $sql = 'SELECT *
{ FROM ' . FOOTB_SEASONS . "
$sql = 'SELECT * WHERE season = $season";
FROM ' . FOOTB_SEASONS . " $result = $db->sql_query($sql);
WHERE season = $season"; $season_row = $db->sql_fetchrow($result);
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$season_row = $db->sql_fetchrow($result); }
$db->sql_freeresult($result);
} // Which page?
switch ($action)
// Which page? {
switch ($action) case 'delete':
{ if (!$season)
case 'delete': {
if (!$season) trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
} if (confirm_box(true))
{
if (confirm_box(true)) $error = '';
{ if (!$auth->acl_get('a_football_delete'))
$error = ''; {
if (!$auth->acl_get('a_football_delete')) trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete'])
} {
if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete']) trigger_error($user->lang['SEASONS_NO_DELETE'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['SEASONS_NO_DELETE'] . adm_back_link($this->u_action), E_USER_WARNING); // Delete season
} $sql = 'DELETE FROM ' . FOOTB_SEASONS . "
// Delete season WHERE season = $season";
$sql = 'DELETE FROM ' . FOOTB_SEASONS . " $db->sql_query($sql);
WHERE season = $season";
$db->sql_query($sql); // Delete leagues
$sql = 'DELETE FROM ' . FOOTB_LEAGUES . "
// Delete leagues WHERE season = $season";
$sql = 'DELETE FROM ' . FOOTB_LEAGUES . " $db->sql_query($sql);
WHERE season = $season";
$db->sql_query($sql); // Delete matchdays
$sql = 'DELETE FROM ' . FOOTB_MATCHDAYS . "
// Delete matchdays WHERE season = $season";
$sql = 'DELETE FROM ' . FOOTB_MATCHDAYS . " $db->sql_query($sql);
WHERE season = $season";
$db->sql_query($sql); // Delete matches
$sql = 'DELETE FROM ' . FOOTB_MATCHES . "
// Delete matches WHERE season = $season";
$sql = 'DELETE FROM ' . FOOTB_MATCHES . " $db->sql_query($sql);
WHERE season = $season";
$db->sql_query($sql); // Delete teams
$sql = 'DELETE FROM ' . FOOTB_TEAMS . "
// Delete teams WHERE season = $season";
$sql = 'DELETE FROM ' . FOOTB_TEAMS . " $db->sql_query($sql);
WHERE season = $season";
$db->sql_query($sql); // Delete ranks
$sql = 'DELETE FROM ' . FOOTB_RANKS . "
// Delete ranks WHERE season = $season";
$sql = 'DELETE FROM ' . FOOTB_RANKS . " $db->sql_query($sql);
WHERE season = $season";
$db->sql_query($sql); // Delete bets
$sql = 'DELETE FROM ' . FOOTB_BETS . "
// Delete bets WHERE season = $season";
$sql = 'DELETE FROM ' . FOOTB_BETS . " $db->sql_query($sql);
WHERE season = $season";
$db->sql_query($sql); trigger_error($user->lang['SEASON_DELETED'] . adm_back_link($this->u_action));
}
trigger_error($user->lang['SEASON_DELETED'] . adm_back_link($this->u_action)); else
} {
else confirm_box(false, sprintf($user->lang['SEASON_CONFIRM_DELETE'], $season), build_hidden_fields(array(
{ 's' => $season,
confirm_box(false, sprintf($user->lang['SEASON_CONFIRM_DELETE'], $season), build_hidden_fields(array( 'mode' => $mode,
's' => $season, 'action' => $action))
'mode' => $mode, );
'action' => $action)) }
); break;
}
break; case 'add':
if ($season >= 1963 AND $season <= 2099)
case 'add': {
if ($season >= 1963 AND $season <= 2099) if ($season_row)
{ {
if ($season_row) if ($edit)
{ {
if ($edit) $error[] = $user->lang['SEASON_TAKEN'];
{ }
$error[] = $user->lang['SEASON_TAKEN']; else
} {
else trigger_error($user->lang['SEASON_TAKEN'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['SEASON_TAKEN'] . adm_back_link($this->u_action), E_USER_WARNING); }
} $season_row['season_name'] = utf8_normalize_nfc($this->request->variable('season_name', '', true));
} if ($season_row['season_name'] <> '')
$season_row['season_name'] = utf8_normalize_nfc($this->request->variable('season_name', '', true)); {
if ($season_row['season_name'] <> '') $sql = 'SELECT
{ season_name
$sql = 'SELECT FROM ' . FOOTB_SEASONS . "
season_name WHERE season_name = '" . $season_row['season_name'] . "'";
FROM ' . FOOTB_SEASONS . " $result = $db->sql_query($sql);
WHERE season_name = '" . $season_row['season_name'] . "'"; $row = $db->sql_fetchrow($result);
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result); if ($row)
{
if ($row) $error[] = $user->lang['SEASON_NAME_TAKEN'];
{ }
$error[] = $user->lang['SEASON_NAME_TAKEN']; }
} else
} {
else $intseason = ((int) $season) - 1;
{ $season_row['season_name'] = $user->lang['SEASON'] . ' ' . $intseason . '/' . $season;
$intseason = ((int) $season) - 1; }
$season_row['season_name'] = $user->lang['SEASON'] . ' ' . $intseason . '/' . $season;
} $season_row['season_name_short'] = utf8_normalize_nfc($this->request->variable('season_short', '', true));
if ($season_row['season_name_short'] <> '')
$season_row['season_name_short'] = utf8_normalize_nfc($this->request->variable('season_short', '', true)); {
if ($season_row['season_name_short'] <> '') $sql = 'SELECT
{ season_name_short
$sql = 'SELECT FROM ' . FOOTB_SEASONS . "
season_name_short WHERE season_name_short = '" . $season_row['season_name_short'] . "'";
FROM ' . FOOTB_SEASONS . " $result = $db->sql_query($sql);
WHERE season_name_short = '" . $season_row['season_name_short'] . "'"; $row = $db->sql_fetchrow($result);
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result); if ($row)
{
if ($row) $error[] = $user->lang['SEASON_SHORT_TAKEN'];
{ }
$error[] = $user->lang['SEASON_SHORT_TAKEN']; }
} else
} {
else $intseason = ((int) $season) - 1;
{ $season_row['season_name_short'] = $intseason . '/' . $season;
$intseason = ((int) $season) - 1; }
$season_row['season_name_short'] = $intseason . '/' . $season; }
} else
} {
else trigger_error($user->lang['SEASON_NUMBER'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['SEASON_NUMBER'] . adm_back_link($this->u_action), E_USER_WARNING); // No break for edit add
} case 'edit':
// No break for edit add $data = array();
case 'edit':
$data = array(); if (!sizeof($error))
{
if (!sizeof($error)) if ($action == 'edit' && !$season)
{ {
if ($action == 'edit' && !$season) trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
{ }
trigger_error($user->lang['NO_SEASON'] . adm_back_link($this->u_action), E_USER_WARNING);
} // Did we submit?
if ($update)
// Did we submit? {
if ($update) if (!check_form_key($form_key))
{ {
if (!check_form_key($form_key)) trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
{ return;
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); }
return;
} $season_row['season_name'] = utf8_normalize_nfc($this->request->variable('season_name', '', true));
if ($season_row['season_name'] <> '')
$season_row['season_name'] = utf8_normalize_nfc($this->request->variable('season_name', '', true)); {
if ($season_row['season_name'] <> '') $sql = 'SELECT
{ season
$sql = 'SELECT FROM ' . FOOTB_SEASONS . "
season WHERE season_name = '" . $season_row['season_name'] . "'";
FROM ' . FOOTB_SEASONS . " $result = $db->sql_query($sql);
WHERE season_name = '" . $season_row['season_name'] . "'"; $row = $db->sql_fetchrow($result);
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result); if ($row)
{
if ($row) if ($row['season'] <> $season)
{ {
if ($row['season'] <> $season) $error[] = $user->lang['SEASON_NAME_TAKEN'];
{ }
$error[] = $user->lang['SEASON_NAME_TAKEN']; }
} }
} else
} {
else $error[] = $user->lang['SEASON_NAME_EMPTY'];
{ }
$error[] = $user->lang['SEASON_NAME_EMPTY'];
} $season_row['season_name_short'] = utf8_normalize_nfc($this->request->variable('season_short', '', true));
if ($season_row['season_name_short'] <> '')
$season_row['season_name_short'] = utf8_normalize_nfc($this->request->variable('season_short', '', true)); {
if ($season_row['season_name_short'] <> '') $sql = 'SELECT
{ season
$sql = 'SELECT FROM ' . FOOTB_SEASONS . "
season WHERE season_name_short = '" . $season_row['season_name_short'] . "'";
FROM ' . FOOTB_SEASONS . " $result = $db->sql_query($sql);
WHERE season_name_short = '" . $season_row['season_name_short'] . "'"; $row = $db->sql_fetchrow($result);
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result); if ($row)
{
if ($row) if ($row['season'] <> $season)
{ {
if ($row['season'] <> $season) $error[] = $user->lang['SEASON_SHORT_TAKEN'];
{ }
$error[] = $user->lang['SEASON_SHORT_TAKEN']; }
} }
} else
} {
else $error[] = $user->lang['SEASON_SHORT_EMPTY'];
{ }
$error[] = $user->lang['SEASON_SHORT_EMPTY']; if (!sizeof($error))
} {
if (!sizeof($error)) $sql_ary = array(
{ 'season' => (int) $season,
$sql_ary = array( 'season_name' => $season_row['season_name'],
'season' => (int) $season, 'season_name_short' => $season_row['season_name_short'],
'season_name' => $season_row['season_name'], );
'season_name_short' => $season_row['season_name_short'],
); $data['season'] = $season;
$data['season_name'] = $this->request->variable('season_name', '');
$data['season'] = $season; $data['season_short'] = $this->request->variable('season_short', '');
$data['season_name'] = $this->request->variable('season_name', '');
$data['season_short'] = $this->request->variable('season_short', ''); $var_ary = array(
'season' => array('num', false, 1963, 2099),
$var_ary = array( 'season_name' => array('string', false, 4, 20),
'season' => array('num', false, 1963, 2099), 'season_short' => array('string', false, 2, 10),
'season_name' => array('string', false, 4, 20), );
'season_short' => array('string', false, 2, 10), if (!($error_vals = validate_data($data, $var_ary)))
); {
if (!($error_vals = validate_data($data, $var_ary))) if ($action == 'add')
{ {
if ($action == 'add') $sql = 'INSERT INTO ' . FOOTB_SEASONS . ' ' . $db->sql_build_array('INSERT', $sql_ary);
{ $db->sql_query($sql);
$sql = 'INSERT INTO ' . FOOTB_SEASONS . ' ' . $db->sql_build_array('INSERT', $sql_ary); }
$db->sql_query($sql); else
} {
else $sql = 'UPDATE ' . FOOTB_SEASONS . '
{ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
$sql = 'UPDATE ' . FOOTB_SEASONS . ' WHERE season = $season";
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " $db->sql_query($sql);
WHERE season = $season"; }
$db->sql_query($sql); $message = ($action == 'edit') ? 'SEASON_UPDATED' : 'SEASON_CREATED';
} trigger_error($user->lang[$message] . adm_back_link($this->u_action));
$message = ($action == 'edit') ? 'SEASON_UPDATED' : 'SEASON_CREATED'; }
trigger_error($user->lang[$message] . adm_back_link($this->u_action)); else
} {
else foreach ($error_vals as $error_val)
{ {
foreach ($error_vals as $error_val) $error_msg[] = $user->lang[$error_val];
{ }
$error_msg[] = $user->lang[$error_val]; $message = ($action == 'edit') ? 'SEASON_UPDATE_FAILED' : 'SEASON_CREATE_FAILED';
} $error[] = $user->lang[$message];
$message = ($action == 'edit') ? 'SEASON_UPDATE_FAILED' : 'SEASON_CREATE_FAILED'; $error = array_merge($error, $error_msg);
$error[] = $user->lang[$message]; }
$error = array_merge($error, $error_msg); }
} }
} }
}
} $u_back = $this->u_action;
$u_back = $this->u_action; $template->assign_vars(array(
'S_EDIT' => true,
$template->assign_vars(array( 'S_ADD_SEASON' => ($action == 'add') ? true : false,
'S_EDIT' => true, 'S_ERROR' => (sizeof($error)) ? true : false,
'S_ADD_SEASON' => ($action == 'add') ? true : false, 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_ERROR' => (sizeof($error)) ? true : false, 'SEASON' => $season,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'SEASON_NAME' => $season_row['season_name'],
'SEASON' => $season, 'SEASON_SHORT' => $season_row['season_name_short'],
'SEASON_NAME' => $season_row['season_name'], 'U_BACK' => $u_back,
'SEASON_SHORT' => $season_row['season_name_short'], 'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season",
'U_BACK' => $u_back, )
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season", );
) return;
); break;
return; }
break;
} $template->assign_vars(array(
'U_ACTION' => $this->u_action,
$template->assign_vars(array( 'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')),
'U_ACTION' => $this->u_action, 'S_SEASON_ADD' => true,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')), )
'S_SEASON_ADD' => true, );
)
); // Get us all the seasons
$sql = 'SELECT
// Get us all the seasons s.season,
$sql = 'SELECT s.season_name,
s.season, s.season_name_short,
s.season_name, COUNT(l.league) AS leagues
s.season_name_short, FROM ' . FOOTB_SEASONS . ' s
COUNT(l.league) AS leagues LEFT JOIN ' . FOOTB_LEAGUES . ' l on l.season = s.season
FROM ' . FOOTB_SEASONS . ' s GROUP BY season
LEFT JOIN ' . FOOTB_LEAGUES . ' l on l.season = s.season ORDER BY season DESC';
GROUP BY season $result = $db->sql_query($sql);
ORDER BY season DESC'; $rows_seasons = $db->sql_fetchrowset($result);
$result = $db->sql_query($sql); $db->sql_freeresult($result);
$rows_seasons = $db->sql_fetchrowset($result);
$db->sql_freeresult($result); // Check if the user is allowed to delete a season.
if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete'])
// Check if the user is allowed to delete a season. {
if ($user->data['user_type'] != USER_FOUNDER && $this->config['football_founder_delete']) $allow_delete = false;
{ }
$allow_delete = false; else
} {
else $allow_delete = true;
{ }
$allow_delete = true;
} $row_number = 0;
foreach ($rows_seasons as $row_season)
$row_number = 0; {
foreach ($rows_seasons as $row_season) $row_number++;
{ $row_class = (!($row_number % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
$row_number++; $template->assign_block_vars('seasons', array(
$row_class = (!($row_number % 2)) ? 'bg1 row_light' : 'bg2 row_dark'; 'ROW_CLASS' => $row_class,
$template->assign_block_vars('seasons', array( 'SEASON' => $row_season['season'],
'ROW_CLASS' => $row_class, 'SEASON_NAME' => $row_season['season_name'],
'SEASON' => $row_season['season'], 'SEASON_SHORT' => $row_season['season_name_short'],
'SEASON_NAME' => $row_season['season_name'], 'LEAGUES' => $row_season['leagues'],
'SEASON_SHORT' => $row_season['season_name_short'], 'U_EDIT' => "{$this->u_action}&amp;action=edit&amp;s=" .$row_season['season'],
'LEAGUES' => $row_season['leagues'], 'U_DELETE' => ($allow_delete) ? "{$this->u_action}&amp;action=delete&amp;s=" . $row_season['season'] : '',
'U_EDIT' => "{$this->u_action}&amp;action=edit&amp;s=" .$row_season['season'], )
'U_DELETE' => ($allow_delete) ? "{$this->u_action}&amp;action=delete&amp;s=" . $row_season['season'] : '', );
) }
); }
} }
}
}
?> ?>
+656 -658
View File
File diff suppressed because it is too large Load Diff
+1457 -1461
View File
File diff suppressed because it is too large Load Diff
+74 -192
View File
@@ -1,193 +1,75 @@
<?php <?php
/** /**
* *
* @package phpBB Extension - Football Football * @package phpBB Extension - Football Football
* @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
* *
*/ */
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL')) 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['board_timezone'] - $config['football_host_timezone']) * 3600); $sql = "SELECT
$sql = "(SELECT m.season,
m.season, m.league,
m.league, m.matchday,
m.matchday, l.league_name_short,
l.league_name_short, CASE m.matchday_name
CASE m.matchday_name WHEN ''
WHEN '' 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, IF(l.bet_in_time = 0, IF(ma.status = 0, m.delivery_date
CONCAT( , IF(ma.status = -1, m.delivery_date_2
CASE DATE_FORMAT(m.delivery_date,'%w') , m.delivery_date_3
WHEN 0 THEN '" . $lang_dates['Sun'] . "' )
WHEN 1 THEN '" . $lang_dates['Mon'] . "' )
WHEN 2 THEN '" . $lang_dates['Tue'] . "' , ma.match_datetime) AS delivery,
WHEN 3 THEN '" . $lang_dates['Wed'] . "' SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
WHEN 4 THEN '" . $lang_dates['Thu'] . "' COUNT(*) AS matches_count,
WHEN 5 THEN '" . $lang_dates['Fri'] . "' SUM(IF(eb.extra_no > 0, IF(eb.bet = '', 0, 1), 0)) AS extra_bets_count,
WHEN 6 THEN '" . $lang_dates['Sat'] . "' SUM(IF(e.extra_no > 0, 1, 0)) AS extra_count
ELSE 'Error' END, FROM " . FOOTB_MATCHDAYS . " AS m
DATE_FORMAT(m.delivery_date,' %d.%m.%y %H:%i') JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league)
) as delivery_time, JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0)
m.delivery_date AS delivery, 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)
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count, 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)
COUNT(*) AS matches_count, 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)
SUM(IF(eb.extra_no > 0, IF(eb.bet = '', 0, 1), 0)) AS extra_bets_count, WHERE m.status <= 0
SUM(IF(e.extra_no > 0, 1, 0)) AS extra_count GROUP BY delivery, m.league
FROM " . FOOTB_MATCHDAYS . " AS m ORDER BY delivery, 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) $result = $db->sql_query($sql);
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) while($row = $db->sql_fetchrow($result) AND $index < 11)
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) $index++;
WHERE m.delivery_date > FROM_UNIXTIME('$local_board_time') $data_delivery = true;
AND m.status <= 0 $row_class = (!($index % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
GROUP BY m.delivery_date, m.league, b.user_id
) $template->assign_block_vars('delivery', array(
UNION 'ROW_CLASS' => $row_class,
(SELECT 'U_BET_LINK' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
m.season, 'LEAGUE_SHORT' => $row['league_name_short'],
m.league, 'MATCHDAY_NAME' => $row['matchday_name'],
m.matchday, 'COLOR' => ($row['bets_count'] == $row['matches_count'] && $row['extra_bets_count'] == $row['extra_count']) ? 'green' : 'red',
l.league_name_short, 'TITLE' => ($row['bets_count'] == $row['matches_count']) ? sprintf($user->lang['DELIVERY_READY']) : sprintf($user->lang['DELIVERY_NOT_READY']),
CASE m.matchday_name 'DELIVERY' => $lang_dates[date("D", strtotime($row['delivery']))] . date(" d.m.y G:i", strtotime($row['delivery'])),
WHEN '' )
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "') );
ELSE m.matchday_name }
END AS matchday_name, $db->sql_freeresult($result);
CONCAT(
CASE DATE_FORMAT(m.delivery_date_2,'%w') $template->assign_vars(array(
WHEN 0 THEN '" . $lang_dates['Sun'] . "' 'S_DISPLAY_DELIVERY' => $data_delivery,
WHEN 1 THEN '" . $lang_dates['Mon'] . "' 'S_DATA_DELIVERY' => $data_delivery,
WHEN 2 THEN '" . $lang_dates['Tue'] . "' )
WHEN 3 THEN '" . $lang_dates['Wed'] . "' );
WHEN 4 THEN '" . $lang_dates['Thu'] . "'
WHEN 5 THEN '" . $lang_dates['Fri'] . "'
WHEN 6 THEN '" . $lang_dates['Sat'] . "'
ELSE 'Error' END,
DATE_FORMAT(m.delivery_date_2,' %d.%m.%y %H:%i')
) as delivery_time,
m.delivery_date_2 AS delivery ,
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
COUNT(*) AS matches_count,
0 AS extra_bets_count,
0 AS extra_count
FROM " . FOOTB_MATCHDAYS . " AS m
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = -1)
JOIN " . FOOTB_BETS . " AS b ON (b.season = ma.season AND b.league = ma.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
WHERE m.delivery_date_2 > FROM_UNIXTIME('$local_board_time')
AND m.status <= 0
GROUP BY m.delivery_date, m.league, b.user_id
)
UNION
(SELECT
m.season,
m.league,
m.matchday,
l.league_name_short,
CASE m.matchday_name
WHEN ''
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
ELSE m.matchday_name
END AS matchday_name,
CONCAT(
CASE DATE_FORMAT(m.delivery_date_3,'%w')
WHEN 0 THEN '" . $lang_dates['Sun'] . "'
WHEN 1 THEN '" . $lang_dates['Mon'] . "'
WHEN 2 THEN '" . $lang_dates['Tue'] . "'
WHEN 3 THEN '" . $lang_dates['Wed'] . "'
WHEN 4 THEN '" . $lang_dates['Thu'] . "'
WHEN 5 THEN '" . $lang_dates['Fri'] . "'
WHEN 6 THEN '" . $lang_dates['Sat'] . "'
ELSE 'Error' END,
DATE_FORMAT(m.delivery_date_3,' %d.%m.%y %H:%i')
) as delivery_time,
m.delivery_date_3 AS delivery,
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
COUNT(*) AS matches_count,
0 AS extra_bets_count,
0 AS extra_count
FROM " . FOOTB_MATCHDAYS . " AS m
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 0)
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = -2)
JOIN " . FOOTB_BETS . " AS b ON (b.season = ma.season AND b.league = ma.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
WHERE m.delivery_date_3 > FROM_UNIXTIME('$local_board_time')
AND m.status <= 0
GROUP BY m.delivery_date, m.league, b.user_id
)
UNION
(SELECT
m.season,
m.league,
m.matchday,
l.league_name_short,
CASE m.matchday_name
WHEN ''
THEN CONCAT(m.matchday, '." . sprintf($user->lang['MATCHDAY']) . "')
ELSE m.matchday_name
END AS matchday_name,
CONCAT(
CASE DATE_FORMAT(ma.match_datetime,'%w')
WHEN 0 THEN '" . $lang_dates['Sun'] . "'
WHEN 1 THEN '" . $lang_dates['Mon'] . "'
WHEN 2 THEN '" . $lang_dates['Tue'] . "'
WHEN 3 THEN '" . $lang_dates['Wed'] . "'
WHEN 4 THEN '" . $lang_dates['Thu'] . "'
WHEN 5 THEN '" . $lang_dates['Fri'] . "'
WHEN 6 THEN '" . $lang_dates['Sat'] . "'
ELSE 'Error' END,
DATE_FORMAT(ma.match_datetime,' %d.%m.%y %H:%i')
) as delivery_time,
ma.match_datetime AS delivery,
SUM(IF(((b.goals_home = '') OR (b.goals_guest = '')), 0, 1)) AS bets_count,
COUNT(*) AS matches_count,
0 AS extra_bets_count,
0 AS extra_count
FROM " . FOOTB_MATCHDAYS . " AS m
JOIN " . FOOTB_LEAGUES . " AS l ON(l.season = m.season AND l.league = m.league AND l.bet_in_time = 1)
JOIN " . FOOTB_MATCHES . " AS ma ON (ma.season = m.season AND ma.league = m.league AND ma.matchday = m.matchday AND ma.status = 0)
JOIN " . FOOTB_BETS . " AS b ON (b.season = ma.season AND b.league = ma.league AND b.match_no = ma.match_no AND b.user_id = $user_id)
WHERE ma.match_datetime > FROM_UNIXTIME('$local_board_time')
AND m.status <= 0
GROUP BY ma.match_datetime, m.league, b.user_id
)
ORDER BY delivery, league";
$result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result) AND $index < 11)
{
$index++;
$data_delivery = true;
$row_class = (!($index % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
$template->assign_block_vars('delivery', array(
'ROW_CLASS' => $row_class,
'U_BET_LINK' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
'LEAGUE_SHORT' => $row['league_name_short'],
'MATCHDAY_NAME' => $row['matchday_name'],
'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']),
'DELIVERY' => $row['delivery_time'],
)
);
}
$db->sql_freeresult($result);
$template->assign_vars(array(
'S_DISPLAY_DELIVERY' => $data_delivery,
'S_DATA_DELIVERY' => $data_delivery,
)
);
?> ?>
+3 -3
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.7", "version": "0.9.8",
"time": "2016-06-12", "time": "2017-02-19",
"license": "GPL-2.0", "license": "GPL-2.0",
"authors": [{ "authors": [{
"name": "J. Helmke", "name": "J. Helmke",
+335 -333
View File
@@ -1,334 +1,336 @@
<?php <?php
/** /**
* *
* @package phpBB Extension - Football Football * @package phpBB Extension - Football Football
* @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
* *
*/ */
namespace football\football\cron\task; namespace football\football\cron\task;
class football_remember extends \phpbb\cron\task\base class football_remember extends \phpbb\cron\task\base
{ {
/* @var string phpBB root path */ /* @var string phpBB root path */
protected $root_path; protected $root_path;
/* @var string phpEx */ /* @var string phpEx */
protected $php_ext; protected $php_ext;
/* @var \phpbb\extension\manager */ /* @var \phpbb\extension\manager */
protected $phpbb_extension_manager; protected $phpbb_extension_manager;
/* @var \phpbb\path_helper */ /* @var \phpbb\path_helper */
protected $phpbb_path_helper; protected $phpbb_path_helper;
/* @var \phpbb\db\driver\driver_interface */ /* @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/* @var \phpbb\config\config */ /* @var \phpbb\config\config */
protected $config; protected $config;
/* @var \phpbb\log\log_interface */ /* @var \phpbb\log\log_interface */
protected $log; protected $log;
/* @var \phpbb\user */ /* @var \phpbb\user */
protected $user; protected $user;
/** /**
* Constructor * Constructor
* *
* @param string $root_path * @param string $root_path
* @param string $php_ext * @param string $php_ext
* @param \phpbb\extension\manager $phpbb_extension_manager * @param \phpbb\extension\manager $phpbb_extension_manager
* @param \phpbb\path_helper $phpbb_path_helper * @param \phpbb\path_helper $phpbb_path_helper
* @param \phpbb\db\driver\driver_interfacer $db * @param \phpbb\db\driver\driver_interfacer $db
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\log\log_interface $log * @param \phpbb\log\log_interface $log
* @param \phpbb\user $user * @param \phpbb\user $user
*/ */
public function __construct($root_path, $php_ext, \phpbb\extension\manager $phpbb_extension_manager, \phpbb\path_helper $phpbb_path_helper, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\log\log_interface $log, \phpbb\user $user) public function __construct($root_path, $php_ext, \phpbb\extension\manager $phpbb_extension_manager, \phpbb\path_helper $phpbb_path_helper, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\log\log_interface $log, \phpbb\user $user)
{ {
$this->root_path = $root_path; $this->root_path = $root_path;
$this->php_ext = $php_ext; $this->php_ext = $php_ext;
$this->phpbb_extension_manager = $phpbb_extension_manager; $this->phpbb_extension_manager = $phpbb_extension_manager;
$this->phpbb_path_helper = $phpbb_path_helper; $this->phpbb_path_helper = $phpbb_path_helper;
$this->db = $db; $this->db = $db;
$this->config = $config; $this->config = $config;
$this->phpbb_log = $log; $this->phpbb_log = $log;
$this->user = $user; $this->user = $user;
} }
/** /**
* Runs this cron task. * Runs this cron task.
* *
* @return null * @return null
*/ */
public function run() public function run()
{ {
global $request; global $request;
$ext_path = $this->phpbb_path_helper->update_web_root_path($this->phpbb_extension_manager->get_extension_path('football/football', true)); $ext_path = $this->phpbb_path_helper->update_web_root_path($this->phpbb_extension_manager->get_extension_path('football/football', true));
include($ext_path . 'includes/functions.' . $this->php_ext); include($ext_path . 'includes/functions.' . $this->php_ext);
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->add_lang_ext('football/football', 'info_acp_football'); $this->user->setup();
$this->user->add_lang_ext('football/football', 'info_acp_football');
// mode=test ?
$mode = $request->variable('mode', ''); // mode=test ?
$days = $request->variable('days', 0); $mode = $request->variable('mode', '');
$days = $request->variable('days', 0);
//Mail Settings
$use_queue = false; //Mail Settings
$used_method = NOTIFY_EMAIL; $use_queue = false;
$priority = MAIL_NORMAL_PRIORITY; $used_method = NOTIFY_EMAIL;
$priority = MAIL_NORMAL_PRIORITY;
$season = curr_season();
//Matchdays to close in 24 hours and 24 hours later $season = curr_season();
// shift days to test //Matchdays to close in 24 hours and 24 hours later
$local_board_time = time() + ($days * 86400); // shift days to test
$local_board_time = time() + ($days * 86400);
if ($mode <> 'test')
{ if ($mode <> 'test')
// Update next run {
$run_time = getdate($this->config['football_remember_next_run']); // Update next run
$next_run = mktime($run_time['hours'], $run_time['minutes'], 0, date("n"), date("j") + 1, date("Y")); $run_time = getdate($this->config['football_remember_next_run']);
$this->config->set('football_remember_next_run', $next_run, true); $next_run = mktime($run_time['hours'], $run_time['minutes'], 0, date("n"), date("j") + 1, date("Y"));
} $this->config->set('football_remember_next_run', $next_run, true);
else }
{ else
$message = sprintf($this->user->lang['LOG_FOOTBALL_MSG_TEST' . (($days == 0) ? '' : '_TRAVEL')], date("d.m.Y H:i", $local_board_time)); {
$this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON_TEST', false, array($message)); $message = sprintf($this->user->lang['LOG_FOOTBALL_MSG_TEST' . (($days == 0) ? '' : '_TRAVEL')], date("d.m.Y H:i", $local_board_time));
} $this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON_TEST', false, array($message));
}
$sql = 'SELECT
m.*, $sql = 'SELECT
l.* m.*,
FROM ' . FOOTB_MATCHDAYS . ' AS m l.*
LEFT JOIN ' . FOOTB_LEAGUES . " AS l ON (l.season = m.season AND l.league = m.league) FROM ' . FOOTB_MATCHDAYS . ' AS m
WHERE m.season >= $season AND m.status = 0 LEFT JOIN ' . FOOTB_LEAGUES . " AS l ON (l.season = m.season AND l.league = m.league)
AND (DATE_SUB(m.delivery_date, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time')) WHERE m.season >= $season AND m.status = 0
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 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time'))
$result = $this->db->sql_query($sql); AND (DATE_SUB(m.delivery_date, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time'))
$toclose = $this->db->sql_fetchrowset($result); GROUP BY m.season, m.league, m.matchday";
$this->db->sql_freeresult($result); $result = $this->db->sql_query($sql);
$toclose = $this->db->sql_fetchrowset($result);
// If we found matchdays to close, search missing bets and mail them $this->db->sql_freeresult($result);
foreach ($toclose as $close)
{ // If we found matchdays to close, search missing bets and mail them
// prepare some variables foreach ($toclose as $close)
$first_mail = true; {
$season = $close['season']; // prepare some variables
$league = $close['league']; $first_mail = true;
$league_name = $close['league_name']; $season = $close['season'];
$league_short = $close['league_name_short']; $league = $close['league'];
$delivery = $close['delivery_date']; $league_name = $close['league_name'];
$matchday = $close['matchday']; $league_short = $close['league_name_short'];
$subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_SUBJECT'], $league_short, $matchday); $delivery = $close['delivery_date'];
$usernames = ''; $matchday = $close['matchday'];
$subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_SUBJECT'], $league_short, $matchday);
// find missing users $usernames = '';
$sql = 'SELECT
u.user_email AS user_email, // find missing users
u.username AS username, $sql = 'SELECT
u.user_id AS userid, u.user_email AS user_email,
u.user_lang u.username AS username,
FROM ' . FOOTB_MATCHES . ' AS m u.user_id AS userid,
LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league) u.user_lang
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no) FROM ' . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league)
LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id
AND ((b.goals_home = '') OR (b.goals_guest = '')) LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id
AND m.status = 0 AND p.pf_footb_rem_f = 1 WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday
AND (l.bet_in_time = 0 OR AND ((b.goals_home = '') OR (b.goals_guest = ''))
(l.bet_in_time = 1 AND m.status = 0 AND p.pf_footb_rem_f = 1
AND (DATE_SUB(m.match_datetime, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time')) AND (l.bet_in_time = 0 OR
AND (DATE_SUB(m.match_datetime, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time')))) (l.bet_in_time = 1
GROUP BY b.user_id AND (DATE_SUB(m.match_datetime, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time'))
UNION AND (DATE_SUB(m.match_datetime, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time'))))
SELECT GROUP BY b.user_id
p.pf_footb_email AS user_email, UNION
u.username AS username, SELECT
u.user_id AS userid, p.pf_footb_email AS user_email,
u.user_lang u.username AS username,
FROM " . FOOTB_MATCHES . ' AS m u.user_id AS userid,
LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league) u.user_lang
LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no) FROM " . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id LEFT JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league)
LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id LEFT JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday LEFT JOIN ' . PROFILE_FIELDS_DATA_TABLE. ' AS p ON p.user_id = b.user_id
AND ((b.goals_home = '') OR (b.goals_guest = '')) LEFT JOIN ' . USERS_TABLE. " AS u ON u.user_id = b.user_id
AND m.status = 0 AND p.pf_footb_rem_s = 1 WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday
AND (l.bet_in_time = 0 OR AND ((b.goals_home = '') OR (b.goals_guest = ''))
(l.bet_in_time = 1 AND m.status = 0 AND p.pf_footb_rem_s = 1
AND (DATE_SUB(m.match_datetime, INTERVAL '1 23:59' DAY_MINUTE) < FROM_UNIXTIME('$local_board_time')) AND (l.bet_in_time = 0 OR
AND (DATE_SUB(m.match_datetime, INTERVAL '1 00:00' DAY_MINUTE) > FROM_UNIXTIME('$local_board_time')))) (l.bet_in_time = 1
GROUP BY b.user_id 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'))))
$result = $this->db->sql_query($sql); GROUP BY b.user_id
$row = $this->db->sql_fetchrow($result); ";
$result = $this->db->sql_query($sql);
if (!$row) $row = $this->db->sql_fetchrow($result);
{
$this->db->sql_freeresult($result); if (!$row)
} {
else $this->db->sql_freeresult($result);
{ }
else
// Send the messages {
include_once($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
$messenger = new \messenger($use_queue); // Send the messages
include_once($this->root_path . 'includes/functions_user.' . $this->php_ext); include_once($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
$errored = false; $messenger = new \messenger($use_queue);
$messenger->headers('X-AntiAbuse: Board servername - ' . $this->config['server_name']); include_once($this->root_path . 'includes/functions_user.' . $this->php_ext);
$messenger->headers('X-AntiAbuse: User_id - ' . ANONYMOUS); $errored = false;
$messenger->headers('X-AntiAbuse: Username - CRON TASK Football remember'); $messenger->headers('X-AntiAbuse: Board servername - ' . $this->config['server_name']);
$messenger->headers('X-AntiAbuse: User IP - ' . $this->user->ip); $messenger->headers('X-AntiAbuse: User_id - ' . ANONYMOUS);
$messenger->subject(htmlspecialchars_decode($subject)); $messenger->headers('X-AntiAbuse: Username - CRON TASK Football remember');
$messenger->set_mail_priority($priority); $messenger->headers('X-AntiAbuse: User IP - ' . $this->user->ip);
$messenger->subject(htmlspecialchars_decode($subject));
do $messenger->set_mail_priority($priority);
{
// Send the messages do
$used_lang = $row['user_lang']; {
$mail_template_path = $ext_path . 'language/' . $used_lang . '/email/'; // Send the messages
$used_lang = $row['user_lang'];
if ($mode <> 'test') $mail_template_path = $ext_path . 'language/' . $used_lang . '/email/';
{
$messenger->to($row['user_email'], $row['username']); if ($mode <> 'test')
} {
else $messenger->to($row['user_email'], $row['username']);
{ }
// test send to board email else
$messenger->to($this->config['board_email'], $this->config['sitename']); {
} // test send to board email
$messenger->template('footb_send_remember', $used_lang, $mail_template_path); $messenger->to($this->config['board_email'], $this->config['sitename']);
}
$messenger->assign_vars(array( $messenger->template('footb_send_remember', $used_lang, $mail_template_path);
'USERNAME' => $row['username'],
'LEAGUE' => $league_name, $messenger->assign_vars(array(
'MATCHDAY' => $matchday, 'USERNAME' => $row['username'],
'DELIVERY' => $delivery, 'LEAGUE' => $league_name,
'CONTACT_EMAIL' => $this->config['board_contact']) 'MATCHDAY' => $matchday,
); 'DELIVERY' => $delivery,
'CONTACT_EMAIL' => $this->config['board_contact'])
if ($mode <> 'test') );
{
if (!($messenger->send($used_method))) if ($mode <> 'test')
{ {
$message = '<strong>' . sprintf($this->user->lang['FOOTBALL_REMEMBER_ERROR_EMAIL'], $league_short, $row['user_email']) . '</strong>'; if (!($messenger->send($used_method)))
$this->phpbb_log->add('critical', ANONYMOUS, '', 'LOG_ERROR_EMAIL', false, array($message)); {
$usernames .= (($usernames != '') ? ', ' : '') . $row['username']. '!'; $message = '<strong>' . sprintf($this->user->lang['FOOTBALL_REMEMBER_ERROR_EMAIL'], $league_short, $row['user_email']) . '</strong>';
} $this->phpbb_log->add('critical', ANONYMOUS, '', 'LOG_ERROR_EMAIL', false, array($message));
else $usernames .= (($usernames != '') ? ', ' : '') . $row['username']. '!';
{ }
$usernames .= (($usernames != '') ? ', ' : '') . $row['username']; else
} {
} $usernames .= (($usernames != '') ? ', ' : '') . $row['username'];
else }
{ }
// Test mode else
if ($first_mail) {
{ // Test mode
// only send one mail if ($first_mail)
if (!($messenger->send($used_method))) {
{ // only send one mail
$message = '<strong>' . sprintf($this->user->lang['FOOTBALL_REMEMBER_ERROR_EMAIL'], $league_short, $row['user_email']) . '</strong>'; if (!($messenger->send($used_method)))
$this->phpbb_log->add('critical', ANONYMOUS, '', 'LOG_ERROR_EMAIL', false, array($message)); {
$usernames .= (($usernames != '') ? ', ' : '') . $row['username']. '!'; $message = '<strong>' . sprintf($this->user->lang['FOOTBALL_REMEMBER_ERROR_EMAIL'], $league_short, $row['user_email']) . '</strong>';
} $this->phpbb_log->add('critical', ANONYMOUS, '', 'LOG_ERROR_EMAIL', false, array($message));
else $usernames .= (($usernames != '') ? ', ' : '') . $row['username']. '!';
{ }
$usernames .= (($usernames != '') ? ', ' : '') . $row['username']; else
} {
$first_mail = false; $usernames .= (($usernames != '') ? ', ' : '') . $row['username'];
} }
else $first_mail = false;
{ }
$usernames .= (($usernames != '') ? ', ' : '') . $row['username']; else
} {
} $usernames .= (($usernames != '') ? ', ' : '') . $row['username'];
} }
while ($row = $this->db->sql_fetchrow($result)); }
$this->db->sql_freeresult($result); }
while ($row = $this->db->sql_fetchrow($result));
// Only if mails have already been sent previously $this->db->sql_freeresult($result);
if ($usernames <> '')
{ // Only if mails have already been sent previously
// send mail to board administration if ($usernames <> '')
$used_lang = $this->config['default_lang']; {
$mail_template_path = $ext_path . 'language/' . $used_lang . '/email/'; // send mail to board administration
$subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_SUBJECT_BOARD'], $league_short, $matchday); $used_lang = $this->config['default_lang'];
$messenger->to($this->config['board_email'], $this->config['sitename']); $mail_template_path = $ext_path . 'language/' . $used_lang . '/email/';
$messenger->subject(htmlspecialchars_decode($subject)); $subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_SUBJECT_BOARD'], $league_short, $matchday);
$messenger->template('footb_board_remember', $used_lang, $mail_template_path); $messenger->to($this->config['board_email'], $this->config['sitename']);
$messenger->assign_vars(array( $messenger->subject(htmlspecialchars_decode($subject));
'CONTACT_EMAIL' => $this->config['board_contact'], $messenger->template('footb_board_remember', $used_lang, $mail_template_path);
'REMEMBER_LIST' => $usernames, $messenger->assign_vars(array(
) 'CONTACT_EMAIL' => $this->config['board_contact'],
); 'REMEMBER_LIST' => $usernames,
)
if (!($messenger->send($used_method))) );
{
$message = '<strong>' . sprintf($this->user->lang['FOOTBALL_REMEMBER_ERROR_EMAIL_BOARD'], $league_short, $this->config['board_email']) . '</strong>'; if (!($messenger->send($used_method)))
$this->phpbb_log->add('critical', ANONYMOUS, '', 'LOG_ERROR_EMAIL', false, array($message)); {
} $message = '<strong>' . sprintf($this->user->lang['FOOTBALL_REMEMBER_ERROR_EMAIL_BOARD'], $league_short, $this->config['board_email']) . '</strong>';
else $this->phpbb_log->add('critical', ANONYMOUS, '', 'LOG_ERROR_EMAIL', false, array($message));
{ }
$log_subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_SEND'], $league_short, $usernames) ; else
$this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON', false, array($log_subject)); {
} $log_subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_SEND'], $league_short, $usernames) ;
} $this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON', false, array($log_subject));
else }
{ }
// Log the cronjob run else
$log_subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_NOBODY']) ; {
$this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON', false, array($log_subject)); // Log the cronjob run
} $log_subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_NOBODY']) ;
} $this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON', false, array($log_subject));
} }
if (sizeof($toclose) == 0) }
{ }
// Log the cronjob run if (sizeof($toclose) == 0)
$log_subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_NO_DELIVERY']) ; {
$this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON', false, array($log_subject)); // Log the cronjob run
} $log_subject = sprintf($this->user->lang['FOOTBALL_REMEMBER_NO_DELIVERY']) ;
$this->phpbb_log->add('admin', ANONYMOUS, '', 'LOG_FOOTBALL_REMEMBER_CRON', false, array($log_subject));
return; }
}
return;
/** }
* Returns whether this cron task can run, given current board configuration.
* /**
* @return bool * Returns whether this cron task can run, given current board configuration.
*/ *
public function is_runnable() * @return bool
{ */
return (bool) $this->config['football_remember_enable']; public function is_runnable()
} {
return (bool) $this->config['football_remember_enable'];
/** }
* Returns whether this cron task should run now, because next run time
* has passed. /**
* * Returns whether this cron task should run now, because next run time
* @return bool * has passed.
*/ *
public function should_run() * @return bool
{ */
global $request; public function should_run()
$mode = $request->variable('mode', ''); {
global $request;
if ($mode <> 'test') $mode = $request->variable('mode', '');
{
return $this->config['football_remember_next_run'] < time(); if ($mode <> 'test')
} {
else return $this->config['football_remember_next_run'] < time();
{ }
return true; else
} {
} return true;
} }
}
}
?> ?>
+549 -551
View File
File diff suppressed because one or more lines are too long
+2531 -2530
View File
File diff suppressed because it is too large Load Diff
+205 -204
View File
@@ -1,205 +1,206 @@
<?php <?php
/** /**
* *
* info_acp_football [Deutsch — Du] * info_acp_football [Deutsch — Du]
* *
* @package language * @package language
* @version $Id: info_acp_football.php 12 2011-03-13 08:03:31Z football $ * @version $Id: info_acp_football.php 12 2011-03-13 08:03:31Z football $
* @copyright (c) 2010 football (http://football.bplaced.net) * @copyright (c) 2010 football (http://football.bplaced.net)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* *
*/ */
/** /**
* DO NOT CHANGE * DO NOT CHANGE
*/ */
if (!defined('IN_PHPBB')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
if (empty($lang) || !is_array($lang)) if (empty($lang) || !is_array($lang))
{ {
$lang = array(); $lang = array();
} }
// DEVELOPERS PLEASE NOTE // DEVELOPERS PLEASE NOTE
// //
// All language files should use UTF-8 as their encoding and the files must not contain a BOM. // All language files should use UTF-8 as their encoding and the files must not contain a BOM.
// //
// Placeholders can now contain order information, e.g. instead of // Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct // translators to re-order the output of data while ensuring it remains correct
// //
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine // You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text // equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
// Football Settings // Football Settings
$lang = array_merge($lang, array( $lang = array_merge($lang, array(
'ACP_FOOTBALL' => 'Fussball', 'ACP_FOOTBALL' => 'Fussball',
'ACP_FOOTBALL_MANAGEMENT' => 'Tipprunde-Verwalten', 'ACP_FOOTBALL_MANAGEMENT' => 'Tipprunde-Verwalten',
'ACP_FOOTBALL_OPERATION' => 'Spielbetrieb', 'ACP_FOOTBALL_OPERATION' => 'Spielbetrieb',
'ACP_FOOTBALL_MANAGE' => 'Spielplan Verwaltung', 'ACP_FOOTBALL_MANAGE' => 'Spielplan Verwaltung',
'ACP_FOOTBALL_CONFIGURATION' => 'Tipprunden-Konfiguration', 'ACP_FOOTBALL_CONFIGURATION' => 'Tipprunden-Konfiguration',
'ACP_FOOTBALL_SETTINGS' => 'Tipprunden-Einstellungen', 'ACP_FOOTBALL_SETTINGS' => 'Tipprunden-Einstellungen',
'ACP_FOOTBALL_SETTINGS_EXPLAIN' => 'Hier kannst du einige grundlegende Einstellungen der Tipprunde vornehmen, ihr einen passenden Namen und eine Beschreibung geben und, neben anderen Werten, die Standard-Einstellungen für die Anzeige anpassen. ', 'ACP_FOOTBALL_SETTINGS_EXPLAIN' => 'Hier kannst du einige grundlegende Einstellungen der Tipprunde vornehmen, ihr einen passenden Namen und eine Beschreibung geben und, neben anderen Werten, die Standard-Einstellungen für die Anzeige anpassen. ',
'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_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. ',
'FOOTBALL_CODE' => 'Tipprunden Code', 'FOOTBALL_CODE' => 'Tipprunden Code',
'FOOTBALL_CODE_EXPLAIN' => 'Zugangscode zur Tipprunde z.B. für Cronjobs. ', 'FOOTBALL_CODE_EXPLAIN' => 'Zugangscode zur Tipprunde z.B. für Cronjobs. ',
'FOOTBALL_FULLSCREEN' => 'Tipprunden-Seiten im Fullscreen-Modus', 'FOOTBALL_FULLSCREEN' => 'Tipprunden-Seiten im Fullscreen-Modus',
'FOOTBALL_FULLSCREEN_EXPLAIN' => 'Hiermit kannst Du, abweichend vom Forum, die Tipprundenseiten mit minimalen Seitenrändern anzeigen lassen. ', 'FOOTBALL_FULLSCREEN_EXPLAIN' => 'Hiermit kannst Du, abweichend vom Forum, die Tipprundenseiten mit minimalen Seitenrändern anzeigen lassen. ',
'FOOTBALL_HEADER_ENABLE' => 'Header-Bild je Liga verwenden', 'FOOTBALL_HEADER_ENABLE' => 'Header-Bild je Liga verwenden',
'FOOTBALL_HEADER_ENABLE_EXPLAIN' => 'Hiermit kannst Du festlegen, ob je Liga die zugehöriges Bild im Header angezeigt werden soll. ', 'FOOTBALL_HEADER_ENABLE_EXPLAIN' => 'Hiermit kannst Du festlegen, ob je Liga die zugehöriges Bild im Header angezeigt werden soll. ',
'FOOTBALL_INFO' => 'Tipprunden Information anzeigen', 'FOOTBALL_INFO' => 'Tipprunden Information anzeigen',
'FOOTBALL_INFO_EXPLAIN' => 'Hiermit kannst Du eine kurze Information (bis zu 255 Zeichen) oberhalb der Tippdaten anzeigen lassen. ', 'FOOTBALL_INFO_EXPLAIN' => 'Hiermit kannst Du eine kurze Information (bis zu 255 Zeichen) oberhalb der Tippdaten anzeigen lassen. ',
'FOOTBALL_NAME' => 'Name der Tipprunde', 'FOOTBALL_NAME' => 'Name der Tipprunde',
'FOOTBALL_NAME_EXPLAIN' => 'Name der im Tipprunden-Menu verwendet wird, um zur Hauptseite zu gelangen. ', 'FOOTBALL_NAME_EXPLAIN' => 'Name der im Tipprunden-Menu verwendet wird, um zur Hauptseite zu gelangen. ',
'FOOTBALL_OVERRIDE_STYLE' => 'Style überschreiben', 'FOOTBALL_OVERRIDE_STYLE' => 'Style überschreiben',
'FOOTBALL_OVERRIDE_STYLE_EXPLAIN' => 'Verwendet für die Tipprunde immer den Standard-Tipprunden-Style. ', 'FOOTBALL_OVERRIDE_STYLE_EXPLAIN' => 'Verwendet für die Tipprunde immer den Standard-Tipprunden-Style. ',
'FOOTBALL_STYLE' => 'Standard Tipprunden Style', 'FOOTBALL_STYLE' => 'Standard Tipprunden Style',
'FOOTBALL_UPDATE_SOURCE' => 'Update Quelle', 'FOOTBALL_UPDATE_SOURCE' => 'Update Quelle',
'FOOTBALL_UPDATE_SOURCE_EXPLAIN' => 'Link zur Quelle des Updates. Falls leer, wird automatisch <var>http://football.bplaced.net/football/xml/football_xml_season.php</var> gewählt. ', 'FOOTBALL_UPDATE_SOURCE_EXPLAIN' => 'Link zur Quelle des Updates. Falls leer, wird automatisch <var>http://football.bplaced.net/football/xml/football_xml_season.php</var> gewählt. ',
'FOOTBALL_UPDATE_CODE' => 'Update Code', 'FOOTBALL_UPDATE_CODE' => 'Update Code',
'FOOTBALL_UPDATE_CODE_EXPLAIN' => 'Nur mit diesem Code können Updates von dieser Seite heruntergeladen werden. ', 'FOOTBALL_UPDATE_CODE_EXPLAIN' => 'Nur mit diesem Code können Updates von dieser Seite heruntergeladen werden. ',
'GUEST_VIEW' => 'Tipprunde für Gäste sichtbar', 'GUEST_VIEW' => 'Tipprunde für Gäste sichtbar',
'GUEST_VIEW_EXPLAIN' => 'Soll die Tipprunde für Gäste sichtbar sein?', 'GUEST_VIEW_EXPLAIN' => 'Soll die Tipprunde für Gäste sichtbar sein?',
'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', 'HOST_TIMEZONE' => 'Host Zeitzone',
'HOST_TIMEZONE_EXPLAIN' => 'Differenz zur Board Zeitzone wenn dein Host in einer anderen Zeitzone steht, damit die Tippabgabe korrekt funktioniert. ', 'HOST_TIMEZONE_EXPLAIN' => 'Differenz 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. ',
'PREDICTION_LEAGUE' => 'Tipprunde', 'PREDICTION_LEAGUE' => 'Tipprunde',
'RIGHT_COLUMN' => 'Spaltenbreite Rechts in Pixeln', 'RIGHT_COLUMN' => 'Spaltenbreite Rechts in Pixeln',
'RIGHT_COLUMN_EXPLAIN' => 'Optimal 180 Pixel. Dieser Wert wird durch externe Einblendungen ggf. übersteuert. ', 'RIGHT_COLUMN_EXPLAIN' => 'Optimal 180 Pixel. Dieser Wert wird durch externe Einblendungen ggf. übersteuert. ',
'USERS_PAGE' => 'Tipper pro Seite', 'USERS_PAGE' => 'Tipper pro Seite',
'USERS_PAGE_EXPLAIN' => 'Anzahl der Tipper je Seite in der Hauptrangliste und Alle Tipps. ', 'USERS_PAGE_EXPLAIN' => 'Anzahl der Tipper je Seite in der Hauptrangliste und Alle Tipps. ',
'WIN_NAME' => 'Gewinn Name (oder Währung)', 'WIN_NAME' => 'Gewinn Name (oder Währung)',
'WIN_NAME_EXPLAIN' => 'Der Name, der für die Gewinne in der Tipprunde angezeigt werden soll', 'WIN_NAME_EXPLAIN' => 'Der Name, der für die Gewinne in der Tipprunde angezeigt werden soll',
'ANNOUNCEMENT_TOPIC' => 'Release Ankündigung', 'ANNOUNCEMENT_TOPIC' => 'Release Ankündigung',
'CURRENT_VERSION' => 'Derzeitige Version', 'CURRENT_VERSION' => 'Derzeitige Version',
'DOWNLOAD_LATEST' => 'Neueste Version herunterladen', 'DOWNLOAD_LATEST' => 'Neueste Version herunterladen',
'LATEST_VERSION' => 'Neueste Version', 'LATEST_VERSION' => 'Neueste Version',
'NOT_UP_TO_DATE' => '%s ist nicht aktuell', 'NOT_UP_TO_DATE' => '%s ist nicht aktuell',
'RELEASE_ANNOUNCEMENT' => 'Ankündigungsthema', 'RELEASE_ANNOUNCEMENT' => 'Ankündigungsthema',
'UP_TO_DATE' => '%s ist aktuell', 'UP_TO_DATE' => '%s ist aktuell',
'FOOTBALL_VERSION_CHECK' => 'Football Prediction League Extension Version Check', 'FOOTBALL_VERSION_CHECK' => 'Football Prediction League Extension Version Check',
)); ));
// Football Features // Football Features
$lang = array_merge($lang, array( $lang = array_merge($lang, array(
'ACP_FOOTBALL_FEATURES' => 'Tipprunden-Funktionalitäten', 'ACP_FOOTBALL_FEATURES' => 'Tipprunden-Funktionalitäten',
'ACP_FOOTBALL_FEATURES_EXPLAIN' => 'Hier kannst du einige Funktionen der Tipprunde aktivieren bzw. deaktivieren', 'ACP_FOOTBALL_FEATURES_EXPLAIN' => 'Hier kannst du einige Funktionen der Tipprunde aktivieren bzw. deaktivieren',
'AUTO' => 'Auto', 'AUTO' => 'Auto',
'BANK' => 'Tipprunden Konto verwalten', 'BANK' => 'Tipprunden Konto verwalten',
'BANK_EXPLAIN' => 'Sollen Tipprunden Konten mit Einsätzen und Gewinnen gepflegt werden?', 'BANK_EXPLAIN' => 'Sollen Tipprunden Konten mit Einsätzen und Gewinnen gepflegt werden?',
'FOOTBALL_SEASON_START' => 'Starte in Saison', 'FOOTBALL_SEASON_START' => 'Starte in Saison',
'FOOTBALL_SEASON_START_EXPLAIN' => 'Starte in dieser oder in der automatisch ermittelten Saison, wenn noch keine ausgewählt wurde. ', 'FOOTBALL_SEASON_START_EXPLAIN' => 'Starte in dieser oder in der automatisch ermittelten Saison, wenn noch keine ausgewählt wurde. ',
'FOOTBALL_REMEMBER_ENABLE' => 'Cronjob für die Tipp-Erinnerungsmail aktivieren', 'FOOTBALL_REMEMBER_ENABLE' => 'Cronjob für die Tipp-Erinnerungsmail aktivieren',
'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 gleichen 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. ',
'RESULTS_AT_TIME' => 'Eingabe endgültiger Spielergebnisse erst nach Spielende', 'RESULTS_AT_TIME' => 'Eingabe endgültiger Spielergebnisse erst nach Spielende',
'RESULTS_AT_TIME_EXPLAIN' => 'Eingabe der endgültigen Spielergebnisse im Adminbereich erst nach Spielende freigeben. Die Eingabe von vorläufigen Spielergebnissen durch die Tipper ist hiervon unabhängig. ', 'RESULTS_AT_TIME_EXPLAIN' => 'Eingabe der endgültigen Spielergebnisse im Adminbereich erst nach Spielende freigeben. Die Eingabe von vorläufigen Spielergebnissen durch die Tipper ist hiervon unabhängig. ',
'SAME_ALLOWED' => 'Alle Tipps an einem Spieltag gleich', 'SAME_ALLOWED' => 'Alle Tipps an einem Spieltag gleich',
'SAME_ALLOWED_EXPLAIN' => 'Identische Tipps (Oma-Tipps) bei allen Spielen eines Spieltags erlauben bzw. verbieten. ', 'SAME_ALLOWED_EXPLAIN' => 'Identische Tipps (Oma-Tipps) bei allen Spielen eines Spieltags erlauben bzw. verbieten. ',
'ULT_POINTS' => 'Ultimate Points einbinden', 'ULT_POINTS' => 'Ultimate Points einbinden',
'ULT_POINTS_EXPLAIN' => 'Soll es möglich sein, die Punkte oder Gewinne in Ultimate Points verrechnen zu lassen? Dazu muss Ultimate Points installiert sein. ', 'ULT_POINTS_EXPLAIN' => 'Soll es möglich sein, die Punkte oder Gewinne in Ultimate Points verrechnen zu lassen? Dazu muss Ultimate Points installiert sein. ',
'ULT_POINTS_FACTOR' => 'Ultimate Points Faktor', 'ULT_POINTS_FACTOR' => 'Ultimate Points Faktor',
'ULT_POINTS_FACTOR_EXPLAIN' => 'Faktor mit dem die Punkte je Spieltag in Ultimate Points gutgeschrieben werden. ', 'ULT_POINTS_FACTOR_EXPLAIN' => 'Faktor mit dem die Punkte je Spieltag in Ultimate Points gutgeschrieben werden. ',
'UP_NONE' => 'Keine', 'UP_NONE' => 'Keine',
'UP_POINTS' => 'Punkte', 'UP_POINTS' => 'Punkte',
'UP_WINS' => 'Gewinne', 'UP_WINS' => 'Gewinne',
'VIEW_BETS' => 'Tipps immer Anzeigen', 'VIEW_BETS' => 'Tipps immer Anzeigen',
'VIEW_BETS_EXPLAIN' => 'Sollen alle Tipps sofort angezeigt werden? Wenn Nein, dann werden sie erst nach Tippabgabeschluss angezeigt. ', 'VIEW_BETS_EXPLAIN' => 'Sollen alle Tipps sofort angezeigt werden? Wenn Nein, dann werden sie erst nach Tippabgabeschluss angezeigt. ',
'VIEW_CURRENT' => 'Anzeige startet in aktueller Liga', 'VIEW_CURRENT' => 'Anzeige startet in aktueller Liga',
'VIEW_CURRENT_EXPLAIN' => 'Soll beim ersten Aufruf die Liga angezeigt werden, in der die nächsten Spiele stattfinden? Sonst wird immer die erste Liga angezeigt', 'VIEW_CURRENT_EXPLAIN' => 'Soll beim ersten Aufruf die Liga angezeigt werden, in der die nächsten Spiele stattfinden? Sonst wird immer die erste Liga angezeigt',
'VIEW_TENDENCIES' => 'Tipp-Tendenzen immer Anzeigen', 'VIEW_TENDENCIES' => 'Tipp-Tendenzen immer Anzeigen',
'VIEW_TENDENCIES_EXPLAIN' => 'Sollen alle Tipp-Tendenzen sofort angezeigt werden? Wenn Nein, dann werden sie erst nach Tippabgabeschluss angezeigt. ', 'VIEW_TENDENCIES_EXPLAIN' => 'Sollen alle Tipp-Tendenzen sofort angezeigt werden? Wenn Nein, dann werden sie erst nach Tippabgabeschluss angezeigt. ',
'WIN_HITS02' => 'Gewinne Volltreffer-Wertung mit Auswärtspunkten', 'WIN_HITS02' => 'Gewinne Volltreffer-Wertung mit Auswärtspunkten',
'WIN_HITS02_EXPLAIN' => 'Sollen Gewinne der Volltreffer-Wertung mit Auswärtspunkten angezeigt werden? Wenn Nein, muss sichergestellt werden, dass dazu keine Gewinne in den bestehenden Ligen hinterlegt wurden. ', 'WIN_HITS02_EXPLAIN' => 'Sollen Gewinne der Volltreffer-Wertung mit Auswärtspunkten angezeigt werden? Wenn Nein, muss sichergestellt werden, dass dazu keine Gewinne in den bestehenden Ligen hinterlegt wurden. ',
)); ));
// Football Menu // Football Menu
$lang = array_merge($lang, array( $lang = array_merge($lang, array(
'ACP_FOOTBALL_MENU' => 'Tipprunden-Menu', 'ACP_FOOTBALL_MENU' => 'Tipprunden-Menu',
'ACP_FOOTBALL_MENU_EXPLAIN' => 'Hier kannst du Links für das Tipprunden-Menu hinterlegen. Die Linkbeschriftung kannst du frei wählen. ', 'ACP_FOOTBALL_MENU_EXPLAIN' => 'Hier kannst du Links für das Tipprunden-Menu hinterlegen. Die Linkbeschriftung kannst du frei wählen. ',
'FOOTBALL_BREADCRUMB' => 'Tipprunden breadcrumb anzeigen', 'FOOTBALL_BREADCRUMB' => 'Tipprunden breadcrumb anzeigen',
'FOOTBALL_BREADCRUMB_EXPLAIN' => 'Soll ein Breadcrumb-Link für die Tipprunden angezeigt werden? ', 'FOOTBALL_BREADCRUMB_EXPLAIN' => 'Soll ein Breadcrumb-Link für die Tipprunden angezeigt werden? ',
'FOOTBALL_SIDE' => 'Tipprunden Sidebar anzeigen', 'FOOTBALL_SIDE' => 'Tipprunden Sidebar anzeigen',
'FOOTBALL_SIDE_EXPLAIN' => 'Soll die Tipprunden Sidebar mit den Menüeinträgen angezeigt werden? ', 'FOOTBALL_SIDE_EXPLAIN' => 'Soll die Tipprunden Sidebar mit den Menüeinträgen angezeigt werden? ',
'FOOTBALL_MENU' => 'Tipprunden Menu anzeigen', 'FOOTBALL_MENU' => 'Tipprunden Menu anzeigen',
'FOOTBALL_MENU_EXPLAIN' => 'Soll das Tipprunden Dropdown Menü in der Navigationsleiste angezeigt werden? ', 'FOOTBALL_MENU_EXPLAIN' => 'Soll das Tipprunden Dropdown Menü in der Navigationsleiste angezeigt werden? ',
'MENU_DESC1' => 'Beschriftung http-Link 1', 'MENU_DESC1' => 'Beschriftung http-Link 1',
'MENU_DESC1_EXPLAIN' => 'Die Beschriftung des Links darf keine unzulässigen Sonderzeichen enthalten und höchsten 20 Zeichen lang sein. ', 'MENU_DESC1_EXPLAIN' => 'Die Beschriftung des Links darf keine unzulässigen Sonderzeichen enthalten und höchsten 20 Zeichen lang sein. ',
'MENU_DESC2' => 'Beschriftung http-Link 2', 'MENU_DESC2' => 'Beschriftung http-Link 2',
'MENU_DESC3' => 'Beschriftung http-Link 3', 'MENU_DESC3' => 'Beschriftung http-Link 3',
'MENU_LINK1' => 'Http-Link 1', 'MENU_LINK1' => 'Http-Link 1',
'MENU_LINK1_EXPLAIN' => 'Bitte hier nur http Links eingeben. ', 'MENU_LINK1_EXPLAIN' => 'Bitte hier nur http Links eingeben. ',
'MENU_LINK2' => 'Http-Link 2', 'MENU_LINK2' => 'Http-Link 2',
'MENU_LINK3' => 'Http-Link 3', 'MENU_LINK3' => 'Http-Link 3',
'MENU_NO_LINK' => 'Kein Link hinterlegt', 'MENU_NO_LINK' => 'Kein Link hinterlegt',
)); ));
// Football Help // Football Help
$lang = array_merge($lang, array( $lang = array_merge($lang, array(
'ACP_FOOTBALL_USERGUIDE' => 'Benutzerhilfe', 'ACP_FOOTBALL_USERGUIDE' => 'Benutzerhilfe',
'ACP_FOOTBALL_USERGUIDE_EXPLAIN' => 'Hier findest du Hilfe für die Einstellungen des phpBB3 Football MODs.<br />Wenn du Fragen hast, dann schaue bitte immer zuerst hier!', 'ACP_FOOTBALL_USERGUIDE_EXPLAIN' => 'Hier findest du Hilfe für die Einstellungen des phpBB3 Football MODs.<br />Wenn du Fragen hast, dann schaue bitte immer zuerst hier!',
)); ));
#// Football Logs #// Football Logs
$lang = array_merge($lang, array( $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_TRAVEL' => 'Aufruf mit Zeitreise zum %s.', 'LOG_FOOTBALL_MSG_TEST' => 'Aufruf am %s.',
'LOG_FOOTBALL_MSG_TEST_TRAVEL' => 'Aufruf mit Zeitreise zum %s.',
'LOG_FOOTBALL_REMEMBER_CRON' => '<strong>Cronjob Football remember ausgeführt</strong><br />» %s',
'LOG_FOOTBALL_REMEMBER_CRON_TEST' => '<strong>Cronjob Football remember Testaufruf</strong><br />» %s', 'LOG_FOOTBALL_REMEMBER_CRON' => '<strong>Cronjob Football remember ausgeführt</strong><br />» %s',
'LOG_FOOTBALL_REMEMBER_CRON_TEST' => '<strong>Cronjob Football remember Testaufruf</strong><br />» %s',
'FOOTBALL_REMEMBER_SUBJECT' => 'Bitte %1$s %2$d. Spieltag tippen',
'FOOTBALL_REMEMBER_SUBJECT_BOARD' => 'Versendete Erinnerungs-Mails %1$s %2$d', 'FOOTBALL_REMEMBER_SUBJECT' => 'Bitte %1$s %2$d. Spieltag tippen',
'FOOTBALL_REMEMBER_ERROR_EMAIL' => '%1$s Erinnerungs-Mail an: %2$s gescheitert', 'FOOTBALL_REMEMBER_SUBJECT_BOARD' => 'Versendete Erinnerungs-Mails %1$s %2$d',
'FOOTBALL_REMEMBER_ERROR_EMAIL_BOARD'=> '%1$s Versandliste Erinnerungs-Mail an: %2$s gescheitert', 'FOOTBALL_REMEMBER_ERROR_EMAIL' => '%1$s Erinnerungs-Mail an: %2$s gescheitert',
'FOOTBALL_REMEMBER_NOBODY' => 'Es muss niemand erinnert werden.', 'FOOTBALL_REMEMBER_ERROR_EMAIL_BOARD'=> '%1$s Versandliste Erinnerungs-Mail an: %2$s gescheitert',
'FOOTBALL_REMEMBER_NO_DELIVERY' => 'Keine anstehende Tippabgabe im Zeitraum.', 'FOOTBALL_REMEMBER_NOBODY' => 'Es muss niemand erinnert werden.',
'FOOTBALL_REMEMBER_SEND' => '%1$s Erinnerungs-Mail an: %2$s', 'FOOTBALL_REMEMBER_NO_DELIVERY' => 'Keine anstehende Tippabgabe im Zeitraum.',
'FOOTBALL_REMEMBER_SEND' => '%1$s Erinnerungs-Mail an: %2$s',
));
));
?> ?>
+1
View File
@@ -146,6 +146,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',
+3 -13
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
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')),
);
}
}
@@ -1,29 +1,29 @@
<!-- IF S_FOOTBALL_FULLSCREEN --> <!-- IF S_FOOTBALL_FULLSCREEN -->
<!-- INCLUDECSS @football_football/fullscreen.css --> <!-- INCLUDECSS @football_football/fullscreen.css -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_VIEW == 'print' --> <!-- IF S_VIEW == 'print' -->
<!-- INCLUDECSS @football_football/football_print.css --> <!-- INCLUDECSS @football_football/football_print.css -->
<!-- ELSE --> <!-- ELSE -->
<!-- INCLUDECSS @football_football/football.css --> <!-- INCLUDECSS @football_football/football.css -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- INCLUDECSS @football_football/football_side.css --> <!-- INCLUDECSS @football_football/football_side.css -->
<!-- IF S_FOOTBALL_HEADER_ENABLED --> <!-- IF S_FOOTBALL_HEADER_ENABLED -->
<style> <style>
@media screen and (min-width: 700px){ @media screen and (min-width: 700px){
.imageset.site_logo { .site_logo {
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: 52px;
width: 52px; width: 52px;
} }
.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}.gif) 300px 5px no-repeat,
url({S_FOOTBALL_EXT_PATH}styles/prosilver/theme/images/header.jpg) 0px 0px; 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;
} }
} }
</style> </style>
<!-- ENDIF --> <!-- ENDIF -->
@@ -1,64 +1,64 @@
<!-- IF S_FOOTBALL_SIDE --> <!-- IF S_FOOTBALL_SIDE -->
<!--[if lt IE 7]> <!--[if lt IE 7]>
<style type="text/css"> <style type="text/css">
/* hover fix for i6 < 7 */ /* hover fix for i6 < 7 */
#footballside { #footballside {
background-color: expression( background-color: expression(
this.onmouseover = new Function("this.className += ' iehover';"), this.onmouseover = new Function("this.className += ' iehover';"),
this.onmouseout = new Function("this.className = this.className.replace('iehover', '');") this.onmouseout = new Function("this.className = this.className.replace('iehover', '');")
); );
} }
</style> </style>
<![endif]--> <![endif]-->
<div id="footballside"> <div id="footballside">
<div class="forabg"> <div class="forabg">
<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 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_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-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-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-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-->
<li class="small-icon icon-xml"><a href="{U_MENU_LINK1}" role="menuitem" target="_blank">{MENU_DESC_LINK1}</a></li> <li class="small-icon icon-xml"><a href="{U_MENU_LINK1}" role="menuitem" target="_blank">{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 class="small-icon icon-xml"><a href="{U_MENU_LINK2}" role="menuitem" target="_blank">{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 class="small-icon icon-xml"><a href="{U_MENU_LINK3}" role="menuitem" target="_blank">{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 class="small-icon icon-statistics"><a href="{U_MY_BETS}" role="menuitem">{L_MY_BETS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_POINTS}" role="menuitem">{L_MY_POINTS}</a></li> <li class="small-icon icon-statistics"><a href="{U_MY_POINTS}" role="menuitem">{L_MY_POINTS}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_TABLE}" role="menuitem">{L_MY_TABLE}</a></li> <li class="small-icon icon-statistics"><a href="{U_MY_TABLE}" role="menuitem">{L_MY_TABLE}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_RANK}" role="menuitem">{L_MY_RANK}</a></li> <li class="small-icon icon-statistics"><a href="{U_MY_RANK}" role="menuitem">{L_MY_RANK}</a></li>
<li class="small-icon icon-statistics"><a href="{U_MY_CHART}" role="menuitem">{L_MY_CHART}</a></li> <li class="small-icon icon-statistics"><a href="{U_MY_CHART}" role="menuitem">{L_MY_CHART}</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_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>
</ul> </ul>
</div> </div>
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
+219 -219
View File
@@ -1,220 +1,220 @@
<!-- DEFINE $S_IN_FOOTBALL = 1 --> <!-- DEFINE $S_IN_FOOTBALL = 1 -->
<!-- INCLUDE overall_header.html --> <!-- INCLUDE overall_header.html -->
<!-- $Id: football_body.html 2 2010-06-05 22:09:02Z football $ //--> <!-- $Id: football_body.html 2 2010-06-05 22:09:02Z football $ //-->
<!-- IF S_FOOTBALL_INFO --> <!-- IF S_FOOTBALL_INFO -->
<div id="information" class="rules"> <div id="information" class="rules">
<strong>{L_INFORMATION}:</strong> {S_FOOTBALL_INFO} <strong>{L_INFORMATION}:</strong> {S_FOOTBALL_INFO}
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
<div id="football-body"> <div id="football-body">
<!-- [+] 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 --> 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_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_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_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>
<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 small-icon icon-print"><a href="{U_PRINT_FOOTBALL}" accesskey="d" target="_blank"><span>{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 small-icon icon-xml"><a href="{U_MENU_LINK1}" target="_blank"><span>{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 small-icon icon-xml"><a href="{U_MENU_LINK2}" target="_blank"><span>{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 small-icon icon-xml"><a href="{U_MENU_LINK3}" target="_blank"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_BETS}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_POINTS}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_TABLE}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_RANK}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_CHART}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_KOEFF}"><span>{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 --> small-icon icon-statistics"><a href="{U_STAT_POINTS}"><span>{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 --> small-icon icon-statistics"><a href="{U_STAT_RESULTS}"><span>{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 small-icon icon-download"><a href="{U_EXPORT}"><span>{L_EXPORT}</span></a></li>
</ul> </ul>
</div> </div>
<div class="panel"> <div class="panel">
<!-- IF S_FOOTBALL_TABS --> <!-- IF S_FOOTBALL_TABS -->
<div class="left-box football-h3" style="margin-left:5px; width:35%"><a title="{LEFT_TITLE}" href="{U_LEFT}">{LEFT_LINK}</a></div> <div class="left-box football-h3" style="margin-left:5px; width:35%"><a title="{LEFT_TITLE}" href="{U_LEFT}">{LEFT_LINK}</a></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 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> <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 --> <!-- ENDIF -->
<div class="navbar football_bg"> <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;">
<select name="s" onchange="this.form.submit();" title="{L_OPTION_SEASON}"> <select name="s" onchange="this.form.submit();" title="{L_OPTION_SEASON}">
<!-- BEGIN form_season --> <!-- BEGIN form_season -->
<option {form_season.S_SELECTED} value="{form_season.S_SEASON}">{form_season.S_SEASONNAME}</option> <option {form_season.S_SELECTED} value="{form_season.S_SEASON}">{form_season.S_SEASONNAME}</option>
<!-- END form_season --> <!-- END form_season -->
</select> </select>
<input type="hidden" name="side" value="{S_SIDE}"/> <input type="hidden" name="side" value="{S_SIDE}"/>
</div> </div>
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF .form_league --> <!-- IF .form_league -->
<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;">
&nbsp; &nbsp;
<input type="hidden" name="side" value="{S_SIDE}"/> <input type="hidden" name="side" value="{S_SIDE}"/>
<input type="hidden" name="s" value="{S_SEASON}"/> <input type="hidden" name="s" value="{S_SEASON}"/>
<select name="l" onchange="this.form.submit();" title="{L_OPTION_LEAGUE}"> <select name="l" onchange="this.form.submit();" title="{L_OPTION_LEAGUE}">
<!-- BEGIN form_league --> <!-- BEGIN form_league -->
<option {form_league.S_SELECTED} value="{form_league.S_LEAGUE}">{form_league.S_LEAGUENAME}</option> <option {form_league.S_SELECTED} value="{form_league.S_LEAGUE}">{form_league.S_LEAGUENAME}</option>
<!-- END form_league --> <!-- END form_league -->
</select> </select>
&nbsp; &nbsp;
</div> </div>
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->
<!-- 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 class="prev_matchday" title="{L_SHOW_PREV}" href="{S_PREV_LINK}"></a>
<!-- ELSE --> <!-- ELSE -->
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<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;">
<select name="m" onchange="this.form.submit();" title="{L_OPTION_MATCHDAY}"> <select name="m" onchange="this.form.submit();" title="{L_OPTION_MATCHDAY}">
<!-- BEGIN form_matchday --> <!-- BEGIN form_matchday -->
<option {form_matchday.S_SELECTED} value="{form_matchday.S_MATCHDAY}">{form_matchday.S_MATCHDAYNAME} {form_matchday.S_CURRENT}</option> <option {form_matchday.S_SELECTED} value="{form_matchday.S_MATCHDAY}">{form_matchday.S_MATCHDAYNAME} {form_matchday.S_CURRENT}</option>
<!-- END form_matchday --> <!-- END form_matchday -->
</select> </select>
<input type="hidden" name="side" value="{S_SIDE}"/> <input type="hidden" name="side" value="{S_SIDE}"/>
<input type="hidden" name="s" value="{S_SEASON}"/> <input type="hidden" name="s" value="{S_SEASON}"/>
<input type="hidden" name="l" value="{S_LEAGUE}"/> <input type="hidden" name="l" value="{S_LEAGUE}"/>
<input type="hidden" name="u" value="{S_USER_SEL}"/> <input type="hidden" name="u" value="{S_USER_SEL}"/>
</div> </div>
</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 class="next_matchday" title="{L_SHOW_NEXT}" href="{S_NEXT_LINK}"></a>
<!-- ELSE --> <!-- ELSE -->
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<!-- ENDIF --> <!-- ENDIF -->
&nbsp; &nbsp;
</div> </div>
<div style="display:inline; margin:0; vertical-align:center; white-space:nowrap; line-height: 2em;"> <div style="display:inline; margin:0; vertical-align:center; white-space:nowrap; line-height: 2em;">
{S_DELIVERY} {S_DELIVERY}
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<!-- IF S_DISPLAY_UNDER_CONSTRUCTION --> <!-- IF S_DISPLAY_UNDER_CONSTRUCTION -->
<!-- INCLUDE under_construction.html --> <!-- INCLUDE under_construction.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_BET --> <!-- IF S_DISPLAY_BET -->
<!-- INCLUDE bet.html --> <!-- INCLUDE bet.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_ALL_BETS --> <!-- IF S_DISPLAY_ALL_BETS -->
<!-- INCLUDE all_bets.html --> <!-- INCLUDE all_bets.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_RESULTS --> <!-- IF S_DISPLAY_RESULTS -->
<!-- INCLUDE results.html --> <!-- INCLUDE results.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_RANKS_MATCHDAY --> <!-- IF S_DISPLAY_RANKS_MATCHDAY -->
<!-- INCLUDE ranks.html --> <!-- INCLUDE ranks.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_RANKS_TOTAL --> <!-- IF S_DISPLAY_RANKS_TOTAL -->
<!-- INCLUDE ranks.html --> <!-- INCLUDE ranks.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_BANK --> <!-- IF S_DISPLAY_BANK -->
<!-- INCLUDE bank.html --> <!-- INCLUDE bank.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_TABLE --> <!-- IF S_DISPLAY_TABLE -->
<!-- INCLUDE table.html --> <!-- INCLUDE table.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_ODDS --> <!-- IF S_DISPLAY_ODDS -->
<!-- INCLUDE odds.html --> <!-- INCLUDE odds.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_BETS --> <!-- IF S_DISPLAY_MY_BETS -->
<!-- INCLUDE my_bets.html --> <!-- INCLUDE my_bets.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_POINTS --> <!-- IF S_DISPLAY_MY_POINTS -->
<!-- INCLUDE my_points.html --> <!-- INCLUDE my_points.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_TABLE --> <!-- IF S_DISPLAY_MY_TABLE -->
<!-- INCLUDE my_table.html --> <!-- INCLUDE my_table.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_RANK --> <!-- IF S_DISPLAY_MY_RANK -->
<!-- INCLUDE my_rank.html --> <!-- INCLUDE my_rank.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_CHART --> <!-- IF S_DISPLAY_MY_CHART -->
<!-- INCLUDE my_chart.html --> <!-- INCLUDE my_chart.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_KOEFF --> <!-- IF S_DISPLAY_MY_KOEFF -->
<!-- INCLUDE my_koeff.html --> <!-- INCLUDE my_koeff.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_STAT_RESULTS --> <!-- IF S_DISPLAY_STAT_RESULTS -->
<!-- INCLUDE stat_results.html --> <!-- INCLUDE stat_results.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_STAT_POINTS --> <!-- IF S_DISPLAY_STAT_POINTS -->
<!-- INCLUDE stat_points.html --> <!-- INCLUDE stat_points.html -->
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<div class="copyright"> <div class="copyright">
<!-- IF S_FOOTBALL_COPY -->{S_FOOTBALL_COPY}<!-- ENDIF --> <!-- IF S_FOOTBALL_COPY -->{S_FOOTBALL_COPY}<!-- ENDIF -->
<br /><strong><a href="{U_MOBILE_SWITCH}">{L_SWITCH_MOBILE}</a></strong> <br /><strong><a href="{U_MOBILE_SWITCH}">{L_SWITCH_MOBILE}</a></strong>
</div> </div>
</div> </div>
</div> </div>
<!-- [-] center block area --> <!-- [-] center block area -->
<!-- [+] left block area --> <!-- [+] left block area -->
<div id="football-left" style="width: {FOOTBALL_LEFT_COLUMN}px;"> <div id="football-left" style="width: {FOOTBALL_LEFT_COLUMN}px;">
<!-- 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 --> <!-- IF S_DISPLAY_SIDE_TABLE -->
<!-- INCLUDE side_table.html --> <!-- INCLUDE side_table.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_DELIVERY --> <!-- IF S_DISPLAY_DELIVERY -->
<!-- INCLUDE delivery.html --> <!-- INCLUDE delivery.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_LAST_USERS --> <!-- IF S_DISPLAY_LAST_USERS -->
<!-- INCLUDE last_users.html --> <!-- INCLUDE last_users.html -->
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<!-- [-] left block area --> <!-- [-] left block area -->
<!-- [+] right block area --> <!-- [+] right block area -->
<div id="football-right" style="width: {FOOTBALL_RIGHT_COLUMN}px; margin-<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->: -{FOOTBALL_RIGHT_COLUMN}px;"> <div id="football-right" style="width: {FOOTBALL_RIGHT_COLUMN}px; margin-<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->: -{FOOTBALL_RIGHT_COLUMN}px;">
<!-- IF S_DISPLAY_RANK_TOTAL --> <!-- IF S_DISPLAY_RANK_TOTAL -->
<!-- INCLUDE rank_total.html --> <!-- INCLUDE rank_total.html -->
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<!-- [-] right block area --> <!-- [-] right block area -->
<br class="football-clear" /> <br class="football-clear" />
</div> </div>
<!-- INCLUDE overall_footer.html --> <!-- INCLUDE overall_footer.html -->
@@ -1,179 +1,179 @@
<!-- DEFINE $S_IN_FOOTBALL = 1 --> <!-- DEFINE $S_IN_FOOTBALL = 1 -->
<!-- INCLUDE overall_header.html --> <!-- INCLUDE overall_header.html -->
<!-- IF S_FOOTBALL_INFO --> <!-- IF S_FOOTBALL_INFO -->
<div id="information" class="rules"> <div id="information" class="rules">
<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 --> 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_SHORT_DOT}</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_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_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_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>
<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>
<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 small-icon icon-print"><a href="{U_PRINT_FOOTBALL}" accesskey="d" target="_blank"><span>{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 small-icon icon-xml"><a href="{U_MENU_LINK1}" target="_blank"><span>{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 small-icon icon-xml"><a href="{U_MENU_LINK2}" target="_blank"><span>{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 small-icon icon-xml"><a href="{U_MENU_LINK3}" target="_blank"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_BETS}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_POINTS}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_TABLE}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_RANK}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_CHART}"><span>{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 --> small-icon icon-statistics"><a href="{U_MY_KOEFF}"><span>{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 --> small-icon icon-statistics"><a href="{U_STAT_POINTS}"><span>{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 --> small-icon icon-statistics"><a href="{U_STAT_RESULTS}"><span>{L_STAT_RESULTS}</span></a></li>
</ul> </ul>
</div> </div>
<div class="panel"> <div class="panel">
<!-- IF !S_DISPLAY_LAST_USERS and !S_DISPLAY_DELIVERY --> <!-- IF !S_DISPLAY_LAST_USERS and !S_DISPLAY_DELIVERY -->
<div style="line-height: 0.7em;"> <div style="line-height: 0.7em;">
<br /> <br />
</div> </div>
<div class="navbar football_bg"> <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;">
<select name="s" onchange="this.form.submit();" title="{L_OPTION_SEASON}"> <select name="s" onchange="this.form.submit();" title="{L_OPTION_SEASON}">
<!-- BEGIN form_season --> <!-- BEGIN form_season -->
<option {form_season.S_SELECTED} value="{form_season.S_SEASON}">{form_season.S_SEASON}</option> --> <option {form_season.S_SELECTED} value="{form_season.S_SEASON}">{form_season.S_SEASON}</option> -->
<!-- END form_season --> <!-- END form_season -->
</select> </select>
<input type="hidden" name="side" value="{S_SIDE}"/> <input type="hidden" name="side" value="{S_SIDE}"/>
</div> </div>
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF .form_league --> <!-- IF .form_league -->
<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;">
<select name="l" onchange="this.form.submit();" title="{L_OPTION_LEAGUE}"> <select name="l" onchange="this.form.submit();" title="{L_OPTION_LEAGUE}">
<!-- BEGIN form_league --> <!-- BEGIN form_league -->
<option {form_league.S_SELECTED} value="{form_league.S_LEAGUE}">{form_league.S_LEAGUENAME}</option> <option {form_league.S_SELECTED} value="{form_league.S_LEAGUE}">{form_league.S_LEAGUENAME}</option>
<!-- END form_league --> <!-- END form_league -->
</select> </select>
<input type="hidden" name="side" value="{S_SIDE}"/> <input type="hidden" name="side" value="{S_SIDE}"/>
<input type="hidden" name="s" value="{S_SEASON}"/> <input type="hidden" name="s" value="{S_SEASON}"/>
</div> </div>
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF .form_matchday and not S_MATCHDAY_HIDE --> <!-- IF .form_matchday and not S_MATCHDAY_HIDE -->
<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;">
<select name="m" onchange="this.form.submit();" title="{L_OPTION_MATCHDAY}"> <select name="m" onchange="this.form.submit();" title="{L_OPTION_MATCHDAY}">
<!-- BEGIN form_matchday --> <!-- BEGIN form_matchday -->
<option {form_matchday.S_SELECTED} value="{form_matchday.S_MATCHDAY}">{form_matchday.S_MATCHDAY}. {L_MATCHDAY}{form_matchday.S_CURRENT}</option> <option {form_matchday.S_SELECTED} value="{form_matchday.S_MATCHDAY}">{form_matchday.S_MATCHDAY}. {L_MATCHDAY}{form_matchday.S_CURRENT}</option>
<!-- END form_matchday --> <!-- END form_matchday -->
</select> </select>
<input type="hidden" name="side" value="{S_SIDE}"/> <input type="hidden" name="side" value="{S_SIDE}"/>
<input type="hidden" name="s" value="{S_SEASON}"/> <input type="hidden" name="s" value="{S_SEASON}"/>
<input type="hidden" name="l" value="{S_LEAGUE}"/> <input type="hidden" name="l" value="{S_LEAGUE}"/>
<input type="hidden" name="u" value="{S_USER_SEL}"/> <input type="hidden" name="u" value="{S_USER_SEL}"/>
</div> </div>
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<div style="clear: both; font-size: 0.6em; margin 0px; vertical-align:center; white-space:nowrap; line-height: 1.5em;"> <div style="clear: both; font-size: 0.6em; margin 0px; vertical-align:center; white-space:nowrap; line-height: 1.5em;">
<!-- IF .form_matchday and not S_MATCHDAY_HIDE --> <!-- IF .form_matchday and not S_MATCHDAY_HIDE -->
{S_DELIVERY} {S_DELIVERY}
<!-- ELSE --> <!-- ELSE -->
<br /> <br />
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_UNDER_CONSTRUCTION --> <!-- IF S_DISPLAY_UNDER_CONSTRUCTION -->
<!-- INCLUDE mobile_under_construction.html --> <!-- INCLUDE mobile_under_construction.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_BET --> <!-- IF S_DISPLAY_BET -->
<!-- INCLUDE mobile_bet.html --> <!-- INCLUDE mobile_bet.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_ALL_BETS --> <!-- IF S_DISPLAY_ALL_BETS -->
<!-- INCLUDE mobile_all_bets.html --> <!-- INCLUDE mobile_all_bets.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_RESULTS --> <!-- IF S_DISPLAY_RESULTS -->
<!-- INCLUDE mobile_results.html --> <!-- INCLUDE mobile_results.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_RANKS_MATCHDAY --> <!-- IF S_DISPLAY_RANKS_MATCHDAY -->
<!-- INCLUDE mobile_ranks.html --> <!-- INCLUDE mobile_ranks.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_RANKS_TOTAL --> <!-- IF S_DISPLAY_RANKS_TOTAL -->
<!-- INCLUDE mobile_ranks.html --> <!-- INCLUDE mobile_ranks.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_BANK --> <!-- IF S_DISPLAY_BANK -->
<!-- INCLUDE mobile_bank.html --> <!-- INCLUDE mobile_bank.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_TABLE --> <!-- IF S_DISPLAY_TABLE -->
<!-- INCLUDE mobile_table.html --> <!-- INCLUDE mobile_table.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_LAST_USERS --> <!-- IF S_DISPLAY_LAST_USERS -->
<!-- INCLUDE mobile_last_users.html --> <!-- INCLUDE mobile_last_users.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_ODDS --> <!-- IF S_DISPLAY_ODDS -->
<!-- INCLUDE mobile_odds.html --> <!-- INCLUDE mobile_odds.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_BETS --> <!-- IF S_DISPLAY_MY_BETS -->
<!-- INCLUDE mobile_my_bets.html --> <!-- INCLUDE mobile_my_bets.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_POINTS --> <!-- IF S_DISPLAY_MY_POINTS -->
<!-- INCLUDE mobile_my_points.html --> <!-- INCLUDE mobile_my_points.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_TABLE --> <!-- IF S_DISPLAY_MY_TABLE -->
<!-- INCLUDE mobile_my_table.html --> <!-- INCLUDE mobile_my_table.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_RANK --> <!-- IF S_DISPLAY_MY_RANK -->
<!-- INCLUDE mobile_my_rank.html --> <!-- INCLUDE mobile_my_rank.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_CHART --> <!-- IF S_DISPLAY_MY_CHART -->
<!-- INCLUDE mobile_my_chart.html --> <!-- INCLUDE mobile_my_chart.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_MY_KOEFF --> <!-- IF S_DISPLAY_MY_KOEFF -->
<!-- INCLUDE mobile_my_koeff.html --> <!-- INCLUDE mobile_my_koeff.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_STAT_RESULTS --> <!-- IF S_DISPLAY_STAT_RESULTS -->
<!-- INCLUDE mobile_stat_results.html --> <!-- INCLUDE mobile_stat_results.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_STAT_POINTS --> <!-- IF S_DISPLAY_STAT_POINTS -->
<!-- INCLUDE mobile_stat_points.html --> <!-- INCLUDE mobile_stat_points.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_DELIVERY --> <!-- IF S_DISPLAY_DELIVERY -->
<!-- INCLUDE mobile_delivery.html --> <!-- INCLUDE mobile_delivery.html -->
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<div class="copyright"> <div class="copyright">
<!-- IF S_FOOTBALL_COPY -->{S_FOOTBALL_COPY}<!-- ENDIF --> <!-- IF S_FOOTBALL_COPY -->{S_FOOTBALL_COPY}<!-- ENDIF -->
<br /><strong><a href="{U_MOBILE_SWITCH}">{L_SWITCH_DESKTOP}</a></strong> <br /><strong><a href="{U_MOBILE_SWITCH}">{L_SWITCH_DESKTOP}</a></strong>
</div> </div>
<!-- INCLUDE overall_footer.html --> <!-- INCLUDE overall_footer.html -->