* * @since 2004-06-05 * @author Christian Ehret <*****@*****.**> */ $smartyType = "www"; include_once "../includes/default.inc.php"; $auth->is_authenticated(); include_once 'seasonclass.inc.php'; $season = new Season(); $smarty->assign("tpl_title", "Saisonzeiträume verwalten"); $smarty->assign('tpl_nav', 'settings'); $smarty->assign('tpl_subnav', 'syssettings'); $smarty->assign('tpl_subnav2', 'season'); $smarty->assign('tpl_type', 'season'); if ($request->GetVar('frm_seasonid', 'post') !== $request->undefined) { if ($request->GetVar('frm_action', 'post') == 'edit') { $smarty->assign('tpl_editid', $request->GetVar('frm_seasonid', 'post')); } else { if ($request->GetVar('frm_action', 'post') == 'addnew') { $smarty->assign('tpl_addnew', 'true'); } else { if ($request->GetVar('frm_action', 'post') == 'del') { $season->del($request->GetVar('frm_seasonid', 'post')); } else { $check = $season->saveupdate(); } } } } $smarty->assign('tpl_season', $season->get()); $smarty->display('season.tpl');
function isPublished() { $season = Season::get($this->seasonid); return $season->weekIsPublished($this->week); }
public function __construct($seasonId) { $this->season = Season::get($seasonId); }
} elseif ($request->GetVar('theseason', 'get') !== $request->undefined) { $theseason = $request->GetVar('theseason', 'get'); } else { $theseason = -1; } $smarty->assign('tpl_theseason', $theseason); if ($request->GetVar('frm_action', 'post') == 'save') { $price->save(); } $prices = $price->getall('N'); $prices2 = $price->getall('A'); if ($request->GetVar('frm_copy', 'post') !== $request->undefined) { $cpyfrom = $request->GetVar('frm_copy', 'post'); $cpyto = substr($theseason, 1, strlen($theseason)); $prices[$cpyto] = $prices[$cpyfrom]; $prices2[$cpyto] = $prices2[$cpyfrom]; $setaltered = true; } else { $setaltered = false; } $smarty->assign('tpl_altered', $setaltered); $smarty->assign('tpl_prices', $prices); $smarty->assign('tpl_prices2', $prices2); $smarty->assign('tpl_theyear', $theyear); $smarty->assign('tpl_years', $season->getYears()); $smarty->assign('tpl_seasons', $season->GetOneYear($theyear)); $smarty->assign('tpl_allseasons', $season->get()); $smarty->assign('tpl_bcat', $bcat->Get()); $smarty->assign('tpl_rcat', $rcat->get('N')); $smarty->assign('tpl_rcat2', $rcat->get('A')); $smarty->display('price.tpl');
public function __construct(PublicSection $section) { parent::__construct(); if (HTMLResponse::fromGET('authenticate')) { HTMLResponse::exitWithRoute(TwitterAuth::getAuthorizeURL(HTMLResponse::getRoute())); } if (HTMLResponse::fromGET('logout')) { session_destroy(); HTMLResponse::exitWithRoute(HTMLResponse::getRoute()); } TwitterAuth::isLogged(); if (TwitterAuth::isBot()) { if (HTMLResponse::fromGET('authenticatebot')) { HTMLResponse::exitWithRoute(TwitterAuth::getBotAuthorizeURL(HTMLResponse::getRoute())); } TwitterAuth::doBotLogin(); } $this->topMenu = array(); $this->setMeta('charset', 'utf-8'); $this->setMeta('viewport', 'width=device-width, initial-scale=1.0'); $this->setTitle($section->getTitle() . ' - ' . $section->getSubtitle()); $this->addStyleSheet('/css/style.css'); if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') { $this->addJavaScript("http://localhost/jquery.js", true); } else { $this->addJavaScript("https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js", true); } $this->addJavaScript(" $(document).ready(function() { if(screen.width <= 512) { document.getElementById('meta-viewport').setAttribute('content','width=512'); } }) ", false); $this->season = null; if ($_SESSION['seasonid']) { $this->season = Season::get($_SESSION['seasonid']); } $section->setDesign($this); $this->section = $section; if ($this->season == null) { $this->season = Season::findOne('ispublic order by isdefault desc'); } $seasonLink = $this->season->getLink(); $this->addToTopMenu("/{$seasonLink}/", 'Enfrentamientos', '/'); $this->addToTopMenu("/{$seasonLink}/equipos/", 'Equipos', '/equipos/.*'); $this->addToTopMenu("/{$seasonLink}/calendario/", 'Calendario', '/calendario/'); $this->addToTopMenu("/{$seasonLink}/clasificacion/", 'Clasificación', '/clasificacion/'); $this->addToTopMenu("/{$seasonLink}/quiniela/", 'Quiniela', '/quiniela/'); $this->addToTopMenu('/normas/', 'Normas', '/normas/'); if (Team::isAdmin()) { $this->addToTopMenu('/unete/', '¡Únete!', '/unete/'); } /* if (Team::isMember()) { // $this->addToTopMenu('/votaciones/', 'Votaciones', '/votaciones/.*'); } if (Team::isSuperAdmin()) { // $this->addToTopMenu('/admin/', 'Admin', '/admin/.*'); // $this->addToTopMenu('/comunicados/', 'Comunicados', '/comunicados/.*'); } */ $this->addJavaScript('/js/lce.js', true); $this->addStyleSheet(" html { background: url(/".$this->season->getBackgroundLink().") no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } ", false); ob_start(); $this->section->show(); $this->contents = ob_get_contents(); ob_end_clean(); }