Esempio n. 1
0
 function _getTurnierData()
 {
     $query = "SELECT id, sid, name, typ, runden, rnd, published, params, catidAlltime, catidEdition" . " FROM #__clm_turniere" . " WHERE id = " . $this->turnierid;
     $this->_db->setQuery($query);
     $this->turnier = $this->_db->loadObject();
     // TO-DO: auslagern
     // zudem PGN-Parameter auswerten
     $turParams = new clm_class_params($this->turnier->params);
     $pgnInput = $turParams->get('pgnInput', 1);
     $pgnPublic = $turParams->get('pgnPublic', 1);
     // User ermitteln
     $user = JFactory::getUser();
     // Flag für View und Template setzen: pgnShow
     // FALSE - PGN nicht verlinken/anzeigen
     // TRUE - PGN-Links setzen und anzeigen
     // 'pgnInput möglich' UND ('pgn öffentlich' ORDER 'User eingeloggt')
     if ($pgnInput == 1 and ($pgnPublic == 1 or $user->id > 0)) {
         $this->pgnShow = TRUE;
     } else {
         $this->pgnShow = FALSE;
     }
     // turniernamen anpassen?
     $addCatToName = $turParams->get('addCatToName', 0);
     if ($addCatToName != 0 and ($this->turnier->catidAlltime > 0 or $this->turnier->catidEdition > 0)) {
         $this->turnier->name = CLMText::addCatToName($addCatToName, $this->turnier->name, $this->turnier->catidAlltime, $this->turnier->catidEdition);
     }
 }
 function _getTurnierData()
 {
     $query = "SELECT *" . " FROM #__clm_turniere" . " WHERE id = " . $this->turnierid;
     $this->_db->setQuery($query);
     $this->turnier = $this->_db->loadObject();
     // turniernamen anpassen?
     $turParams = new JParameter($this->turnier->params);
     $addCatToName = $turParams->get('addCatToName', 0);
     if ($addCatToName != 0 and ($this->turnier->catidAlltime > 0 or $this->turnier->catidEdition > 0)) {
         $this->turnier->name = CLMText::addCatToName($addCatToName, $this->turnier->name, $this->turnier->catidAlltime, $this->turnier->catidEdition);
     }
 }
 function _getTurnierData()
 {
     $query = "SELECT t.*, CHAR_LENGTH(t.invitationText) AS invitationLength, s.name AS saisonname, u.name AS tlname, v.Vereinname AS organame" . " FROM #__clm_turniere AS t" . " LEFT JOIN #__clm_saison AS s ON s.id = t.sid" . " LEFT JOIN #__clm_user AS u ON jid = t.tl" . " LEFT JOIN #__clm_dwz_vereine AS v ON v.ZPS = t.vereinZPS" . " WHERE t.id = " . $this->turnierid;
     $this->_db->setQuery($query);
     $this->turnier = $this->_db->loadObject();
     // turniernamen anpassen?
     $turParams = new JParameter($this->turnier->params);
     $addCatToName = $turParams->get('addCatToName', 0);
     if ($addCatToName != 0 and ($this->turnier->catidAlltime > 0 or $this->turnier->catidEdition > 0)) {
         $this->turnier->name = CLMText::addCatToName($addCatToName, $this->turnier->name, $this->turnier->catidAlltime, $this->turnier->catidEdition);
     }
 }