conf['limit'] = intval( $this->conf['limit'] ); $this->conf['orderby'] = $this->conf['orderby'] ? $this->conf['orderby'] : 'pages.sorting, tt_content.sorting'; $this->id = intval( $GLOBALS['TSFE']->id ); $this->GPvars = t3lib_div::GPvar( $this->prefixId ); $this->local_cObj = t3lib_div::makeInstance( 'tslib_cObj' ); $this->totalTemplate = $this->cObj->fileResource( $this->conf['template'] ); $this->conf['pid'] = intval($this->conf['pid']); if( $this->conf['pid'] > 0) $this->pids = $this->conf['pid']; else $this->pids = $this->id; } /** * Pages teaser * * @param string $content: * @param array $conf: TS configuration * @return string return: HTML output */ function teaser( $content, $conf ) { // Conf base $template = ''; $this->conf = &$conf; $this->config(); // SQL typo3 conditions $this->where = $this->local_cObj->enableFields( 'pages' ); if ($this->conf['level'] == 100) $this->where .= " AND pages.abstract <> '' "; $this->whereContent = $this->local_cObj->enableFields( 'tt_content' ); //co chceme? if ($this->conf['level'] == 0) { $this->where2 = ' AND (children > 0) '; } else if ($this->conf['level'] == 47) { $this->where2 = ' '; } else { $this->where2 = ' AND (children = 0 OR children IS NULL) '; } $wrapArr = array( 'disabledLinkWrap' => '

|

', 'inactiveLinkWrap' => '

|

', 'activeLinkWrap' => '

|

' ); // Get/set navigation variable $this->countPages(); $this->GPvars['pointer'] = $this->GPvars['pointer'] > 0 ? intval( $this->GPvars['pointer'] ) : 0; $this->pages = ceil( $this->counter / $this->conf['limit'] ); if( $this->GPvars['pointer'] > 0 && $this->GPvars['pointer'] < $this->pages ) $this->start = $this->GPvars['pointer']; else $this->GPvars['pointer'] = 0; // Set limitation if( $deflimit != '' ) $limit = 'LIMIT '.$deflimit; elseif( $this->start > 0 ) $limit = 'LIMIT '.( $this->start * $this->conf['limit'] ).', '.$this->conf['limit']; else $limit = 'LIMIT 0, '.$this->conf['limit']; // SQL query prepare if ($GLOBALS['TSFE']->sys_language_uid != 0) { $query = ' SELECT pages.uid, ifnull(pages_language_overlay.title, pages.title) as title, ifnull(pages_language_overlay.abstract, pages.abstract) as abstract, if(length(pages_language_overlay.media) > 1, pages_language_overlay.media, pages.media) as media, tt_content.bodytext AS bodytext, GROUP_CONCAT( DISTINCT tt_content.image ORDER BY tt_content.t3_origuid DESC, tt_content.sorting SEPARATOR ",") as image, p2.children FROM pages LEFT JOIN tt_content ON ( tt_content.pid = pages.uid AND CType in ("text", "textpic", "image") AND tt_content.sys_language_uid in (0, '. (int) $GLOBALS['TSFE']->sys_language_uid.') '.$this->whereContent.' ) LEFT JOIN pages_language_overlay ON ( pages_language_overlay.pid = pages.uid AND pages_language_overlay.sys_language_uid="'. (int) $GLOBALS['TSFE']->sys_language_uid.'" AND pages_language_overlay.deleted =1) LEFT JOIN (SELECT count(*) as children, pid FROM pages WHERE pages.pid IN ( SELECT uid FROM pages WHERE pages.pid in ('.$this->pids.') '.$this->where.' ) '.$this->where.' GROUP BY pid) as p2 ON (pages.uid = p2.pid ) WHERE pages.pid IN ( '.$this->pids.' ) '.$this->where.$this->where2.' GROUP BY pages.uid ORDER BY '.$this->conf['orderby'].' '.$limit.' '; } else { $query = ' SELECT pages.uid, pages.title, pages.abstract, pages.media, tt_content.bodytext AS bodytext, GROUP_CONCAT( DISTINCT tt_content.image ORDER BY tt_content.sorting SEPARATOR ",") as image, p2.children FROM pages LEFT JOIN tt_content ON ( tt_content.pid = pages.uid AND CType in ("text", "textpic", "image") AND tt_content.sys_language_uid = 0 AND'.$this->whereContent.' ) LEFT JOIN (SELECT count(*) as children, pid FROM pages WHERE pages.pid IN ( SELECT uid FROM pages WHERE pages.pid in ('.$this->pids.') '.$this->where.' ) '.$this->where.' GROUP BY pid) as p2 ON (pages.uid = p2.pid ) WHERE pages.pid IN ( '.$this->pids.' ) '.$this->where.$this->where2.' GROUP BY pages.uid ORDER BY '.$this->conf['orderby'].' '.$limit.' '; } $query = ' SELECT pages.uid, pages.title, pages.abstract, pages.media, tt_content.bodytext AS bodytext, GROUP_CONCAT( DISTINCT tt_content.image ORDER BY tt_content.sorting SEPARATOR ",") as image, p2.children FROM pages LEFT JOIN tt_content ON ( tt_content.pid = pages.uid AND CType in ("text", "textpic", "image") '.$this->whereContent.' ) LEFT JOIN (SELECT count(*) as children, pid FROM pages WHERE pages.pid IN ( SELECT uid FROM pages WHERE pages.pid in ('.$this->pids.') '.$this->where.' ) '.$this->where.' GROUP BY pid) as p2 ON (pages.uid = p2.pid ) WHERE pages.pid IN ( '.$this->pids.' ) '.$this->where.$this->where2.' GROUP BY pages.uid ORDER BY '.$this->conf['orderby'].' '.$limit.' '; // Get pages with content $res = $GLOBALS['TYPO3_DB']->sql_query( $query ); if( $res ) { $numrows = $GLOBALS['TYPO3_DB']->sql_num_rows( $res ); if( $numrows > 0 ) { // Template, subpart, fields list $template['total'] = $this->local_cObj->getSubpart( $this->totalTemplate, '###TEASER###' ); $template['item'] = $this->local_cObj->getSubpart( $template['total'], '###ITEM###' ); // Parse pages list while( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res ) ) { // $row['media'] .= ', '.$row['image']; if (preg_match('~[^,]+\.(gif|jpg|jpeg|png|bmp)~i', $row['media'], $matches)) { $row['media'] = 'uploads/media/'.trim($matches[0]); } elseif (preg_match('~[^,]+\.(gif|jpg|jpeg|png|bmp)~i', $row['image'], $matches)) { $row['media'] = 'uploads/pics/'.trim($matches[0]); } else $row['media'] = 'fileadmin/templates/images/placeholder.jpg'; // Page, content marks $url = str_replace( '&', '&', $this->pi_getPageLink( $row['uid'], '_top', array() ) ); $submarks['###LINK##'] = $url; $submarks['###TITLE###'] = htmlspecialchars($row['title']); $submarks['###BODYTEXT###'] = $this->cObj->stdWrap( ( $row['abstract'] != '' ? $row['abstract'] : $row['bodytext'] ), $this->conf['bodytext.'] ); //$this->conf['image.']['stdWrap.']['cObject.']['file.']['10.']['file'] = $row['media']; //$submarks['###IMAGE###'] = $this->local_cObj->IMAGE($this->conf['image.']); $submarks['###IMAGE###'] = $this->cObj->cImage($row['media'], $this->conf['image.']); // Complete subpart $rows .= $this->cObj->substituteMarkerArrayCached( $template['item'], $submarks, array(), $wrappedSubSubpart ); } // Navigation subpart if( $this->conf['navigation'] ) { $this->internal = array( 'res_count' => $this->counter, 'results_at_a_time' => $this->conf['limit'], 'maxPages' => 7, 'dontLinkActivePage' => 1 ); $this->LOCAL_LANG[$this->LLkey]['pi_list_browseresults_page'] = $this->conf['pi_list_browseresults_page']; $this->LOCAL_LANG[$this->LLkey]['pi_list_browseresults_prev'] = $this->conf['pi_list_browseresults_prev']; $this->LOCAL_LANG[$this->LLkey]['pi_list_browseresults_next'] = $this->conf['pi_list_browseresults_next']; $marks['###PAGE_LISTING###'] = $this->pi_list_browseresults(false, '', $wrapArr, 'pointer', false); } else { $marks['###PAGE_LISTING###'] = ''; } if ($this->conf['label']) $marks['###LABEL###'] = $this->cObj->stdWrap( $this->conf['label'], $this->conf['label.'] ); else $marks['###LABEL###'] = ''; // Complete all subparts $subparts['###ITEM###'] = $rows; $template = $this->cObj->substituteMarkerArrayCached( $template['total'], $marks, $subparts, array() ); } } return $template; } /** * Pages counter * * @return int return: count of pages */ function countPages() { // SQL query for count items witout limit $query = ' SELECT COUNT(*) AS counter FROM pages LEFT JOIN (SELECT count(*) as children, pid FROM pages WHERE pages.pid IN ( SELECT uid FROM pages WHERE pages.pid in ('.$this->pids.') '.$this->where.' ) '.$this->where.' GROUP BY pid) as p2 ON (pages.uid = p2.pid ) WHERE pages.pid IN ( '.$this->pids.' ) '.$this->where.$this->where2.' '; // Get pages with content $res = $GLOBALS['TYPO3_DB']->sql_query( $query ); if( $res ) { $tmp = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res ); $this->counter = intval( $tmp['counter'] ); } return $this->counter; } } ?> Garáž - energeticky certifikat, projekt

Jozef Kadlečík

späť

Garáž

Počet izieb

0

Podlahová plocha

20.65 m2

Počet obyvateľov

 

Orientácia vstupu

 

Cena projektu

60 EUR

Odhad ceny stavby

EUR

Pohľady

Pôdorysy

Rýchly kontakt

Adresa: 

Pribinova 46

920 01 Hlohovec


Email:
ecertifikaty@gmail.com

Mobil: 
0911 792 893