Get banner categories

@deprecated
@param     integer    $banner_number
@return    array      $arrBannerCats
550156
protected function getBannerCategories($banner_number)
    {
        // Kat sammeln
        $objBannerCat = \Database::getInstance()
                            ->prepare("SELECT 
                                            id 
                                          , title 
                                       FROM 
                                            tl_banner_category 
                                        WHERE 
                                            id 
                                        IN 
                                            (SELECT 
                                                 pid
                                             FROM
                                                 tl_banner
                                             LEFT JOIN
                                                 tl_banner_category 
                                             ON 
                                                 tl_banner.pid = tl_banner_category.id
                                             GROUP BY 
                                                 tl_banner.pid
                                             )
                                        ORDER BY 
                                            title")
                            ->execute();
        
        if ($objBannerCat->numRows > 0)
        {
            if ($banner_number == 0)
            { // gewählte Kategorie hat keine Banner, es gibt aber weitere Kategorien
                $arrBannerCats[] = array
                (
                    'id'    => '0',
                    'title' => $GLOBALS['TL_LANG']['tl_banner_stat']['select']
                );
                $this->intCatID = 0; // template soll nichts anzeigen
            }
            $arrBannerCats[] = array
            (
                'id'    => '-1',
                'title' => $GLOBALS['TL_LANG']['tl_banner_stat']['allkat']
            );
            while ($objBannerCat->next())
            {
                $arrBannerCats[] = array
                (
                    'id'    => $objBannerCat->id,
                    'title' => $objBannerCat->title
                );
            }
        }
        else
        { // es gibt keine Kategorie mit Banner
            $arrBannerCats[] = array
            (
                'id'    => '0',
                'title' => '---------'
            );
        }
        return $arrBannerCats;
        
    }
971923
function() {
            var categories = { "": 1 };
            for (var i in this.registered_node_types) {
                if (
                    this.registered_node_types[i].category &&
                    !this.registered_node_types[i].skip_list
                ) {
                    categories[this.registered_node_types[i].category] = 1;
                }
            }
            var result = [];
            for (var i in categories) {
                result.push(i);
            }
            return result;
        }
411026
public function banners()
    {
        //Only admins and managers can access these controllers
        if (!$this->Auth->isGroup(['admin', 'manager'])) {
            return;
        }

        $links[] = [__d('me_cms', 'List banners'), [
            'controller' => 'Banners',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Upload banners'), [
            'controller' => 'Banners',
            'action' => 'upload',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        //Only admin can access this controller
        if ($this->Auth->isGroup('admin')) {
            $links[] = [__d('me_cms', 'List positions'), [
                'controller' => 'BannersPositions',
                'action' => 'index',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
            $links[] = [__d('me_cms', 'Add position'), [
                'controller' => 'BannersPositions',
                'action' => 'add',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
        }

        return [$links, __d('me_cms', 'Banners'), ['icon' => 'shopping-cart']];
    }
217764
public static function getCategory($publish=null, $array=true) 
	{
		$criteria=new CDbCriteria;
		if($publish != null)
			$criteria->compare('t.publish', $publish);

		$model = self::model()->findAll($criteria);

		if($array == true) {
			$items = array();
			if($model != null) {
				foreach($model as $key => $val) {
					$items[$val->cat_id] = $val->title->message;
				}
				return $items;
			} else
				return false;
		} else
			return $model;
	}
612835
public function getTrailIds(NewsCategoryModel $category)
    {
        static $ids;

        if (!\is_array($ids)) {
            /** @var Database $db */
            $db = $this->framework->createInstance(Database::class);

            $ids = $db->getParentRecords($category->id, $category->getTable());
            $ids = \array_map('intval', \array_unique($ids));

            // Remove the current category
            unset($ids[\array_search($category->id, $ids, true)]);
        }

        return $ids;
    }
848025
protected function getSetCategoryValues()
	{
	    //DEBUG log_message('getSetCategoryValues banner_categories:'.$this->banner_categories,'Banner.log');
		//$this->banner_categories is now an ID, but the name is backward compatible 
		if ( !isset($this->banner_categories) || !is_numeric($this->banner_categories) ) 
		{
			$this->log($GLOBALS['TL_LANG']['tl_banner']['banner_cat_not_found'], 'ModulBanner Compile', 'ERROR');
			$this->arrCategoryValues = false;
			return false;
		}
		$objBannerCategory = \Database::getInstance()->prepare("SELECT 
                                                                    * 
                                                                FROM  
                                                                    tl_banner_category 
                                                                WHERE 
                                                                    id=?")
											         ->execute($this->banner_categories); 
		if ($objBannerCategory->numRows == 0) 
		{
			$this->log($GLOBALS['TL_LANG']['tl_banner']['banner_cat_not_found'], 'ModulBanner Compile', 'ERROR');
			$this->arrCategoryValues = false;
			return false;
		}
		$arrGroup = deserialize($objBannerCategory->banner_groups);
		//Pfad+Dateiname holen ueber UUID (findByPk leitet um auf findByUuid)
		$objFile = \FilesModel::findByPk($objBannerCategory->banner_default_image);
		$this->arrCategoryValues = array(
				'id'                    => $objBannerCategory->id,
				'banner_default'		=> $objBannerCategory->banner_default,
				'banner_default_name'	=> $objBannerCategory->banner_default_name,
				'banner_default_image'	=> $objFile->path,
				'banner_default_url'	=> $objBannerCategory->banner_default_url,
				'banner_default_target'	=> $objBannerCategory->banner_default_target,
				'banner_numbers'		=> $objBannerCategory->banner_numbers, //0:single,1:multi,see banner_limit
				'banner_random'			=> $objBannerCategory->banner_random,
				'banner_limit'			=> $objBannerCategory->banner_limit, // 0:all, others = max 
				'banner_protected'		=> $objBannerCategory->banner_protected,
				'banner_group'			=> $arrGroup[0]
				);
        //DEBUG log_message('getSetCategoryValues arrCategoryValues:'.print_r($this->arrCategoryValues,true),'Banner.log');
		return true;
	}
1164543
public function categoryLists ($categories=[],$parent=false)
    {
        $data = [];
        $categories=(count($categories)==0 && !$parent)?$this->rootCategories():$categories;

        if(count($categories)>0){
            foreach ($categories as $category) {
                $data[] = [
                    'id' => $category->id ,
                    'title' => $category->title ,
                    'slug' => $category->slug ,
                    'parent' => $category->parent ,
                    'children' => $this->categoryLists($category->child(),true) ,
                ];
            }
        }
        return $data;
    }
29053
public static GetCategoryResult get_category(String access_token){
		HttpUriRequest httpUriRequest = RequestBuilder.get()
				.setUri(BASE_URI + "/wxa/get_category")
				.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
				.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,GetCategoryResult.class);
	}
405788
public function actionGetCategoryRouteRules(string $category, string $format = 'Craft', $siteId = null): Response
    {
        return $this->asJson(RouteMap::$plugin->routes->getCategoryRouteRules($category, $format, $siteId));
    }
746991
protected function getCategoryMenuData($obCategoryItem, $sPageCode, $sURL)
    {
        if (empty($obCategoryItem)) {
            return [];
        }

        $arMenuItem = [
            'title'   => $obCategoryItem->name,
            'url'     => $obCategoryItem->getPageUrl($sPageCode),
            'mtime'   => $obCategoryItem->updated_at,
            'viewBag' => ['object' => $obCategoryItem],
        ];

        $arMenuItem['isActive'] = $arMenuItem['url'] == $sURL;

        return $arMenuItem;
    }
152098
protected function getImageSizeInternal($BannerImage)
	{
	    try 
	    {
	        $arrImageSize = getimagesize(TL_ROOT . '/' . $BannerImage);
	    } 
	    catch (\Exception $e) 
	    {
	        $arrImageSize = false;
	    }		
		
		if ($arrImageSize === false)
		{
		    //Workaround for PHP without zlib on SWC files
		    $arrImageSize = $this->getImageSizeCompressed($BannerImage);
		}
		ModuleBannerLog::writeLog(__METHOD__ , __LINE__ , 'Image Size: '. print_r($arrImageSize,true));
		
		return $arrImageSize;
	}
1122969
public static function getParentCategoryList($categoryId)
    {
        $categoryList = new TIterator();
        $aTmpList = array(); // we store the list in a tmp array so we can reverse the order
        $currentCategoryId = $categoryId;
        $bDone = false;
        $requestInfoService = self::getRequestInfoService();
        $languageService = self::getLanguageService();
        if ($requestInfoService->isBackendMode()) {
            $languageId = $languageService->getActiveEditLanguage()->id;
        } else {
            $languageId = $languageService->getActiveLanguageId();
        }
        do {
            $category = TdbShopCategory::GetNewInstance();
            $category->SetLanguage($languageId);
            if (!$category->Load($currentCategoryId)) {
                $category = null;
                $bDone = true;
            } else {
                $category = $category->GetParent();
                if (!is_null($category)) {
                    $aTmpList[] = $category;
                    $currentCategoryId = $category->id;
                } else {
                    $bDone = true;
                }
            }
        } while (!$bDone);

        $aTmpList = array_reverse($aTmpList);
        foreach ($aTmpList as $tempCategory) {
            $categoryList->AddItem($tempCategory);
        }

        return $categoryList;
    }
776128
protected function listBannerExternal($row)
    {
        $fallback_content = '';

        $arrImageSize = $this->BannerImage->getBannerImageSize($row['banner_image_extern'], self::BANNER_TYPE_EXTERN);
    
        //resize if necessary
        $arrImageSizeNew = array();
        switch ($arrImageSize[2])
        {
            case 1: // GIF
            case 2: // JPG
            case 3: // PNG
                $arrImageSizeNew = $this->BannerImage->getCheckBannerImageSize($arrImageSize,250,200);
                $intWidth  = $arrImageSizeNew[0];
                $intHeight = $arrImageSizeNew[1];
                $oriSize   = $arrImageSizeNew[2];
                break;
            case 4:  // Flash swf
            case 13: // Flash swc
                $arrImageSizeNew = $this->BannerImage->getCheckBannerImageSize($arrImageSize,250,200);
                $intWidth  = $arrImageSizeNew[0];
                $intHeight = $arrImageSizeNew[1];
                $oriSize   = $arrImageSizeNew[2];
                break;
            default:
                break;
        }
        unset($oriSize);

        $banner_image = $row['banner_image_extern'];

        //Banner Ziel per Page?
        if ($row['banner_jumpTo'] >0)
        {
            //url generieren
            $objBannerNextPage = \Database::getInstance()->prepare("SELECT id, alias FROM tl_page WHERE id=?")
                                                ->limit(1)
                                                ->execute($row['banner_jumpTo']);
            if ($objBannerNextPage->numRows)
            {
                $row['banner_url'] = $this->generateFrontendUrl($objBannerNextPage->fetchAssoc());
            }
        }
        $banner_url = ampersand(\Idna::decode($row['banner_url']));
        if (strlen($banner_url)>0)
        {
            $banner_url_text = $GLOBALS['TL_LANG']['tl_banner']['banner_url'][0].': ';
        }
        else
        {
            $banner_url_text = '';
        }
    
        //Output
        switch ($arrImageSize[2])
        {
            case 1: // GIF
            case 2: // JPG
            case 3: // PNG
                $output = '<div class="mod_banner_be">' .
                        '<div class="name"><img alt="'.specialchars(ampersand($row['banner_name'])).'" src="'. $banner_image .'" height="'.$intHeight.'" width="'.$intWidth.'" /></div>' .
                        '<div class="right">' .
                        '<div class="left">'.
                        '<div class="published_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_published'][0].'</div>'.
                        '<div class="published_data">'.($row['banner_published'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_no'] : $GLOBALS['TL_LANG']['tl_banner']['tl_be_yes']).' </div>'.
                        '</div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_type'][0].'</div>' .
                        '<div class="date_data">'.$GLOBALS['TL_LANG']['tl_banner']['source_extern'] .'</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_start'].'</div>' .
                        '<div class="date_data">' . ($row['banner_start']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_start'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_start'])) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_stop'].'</div>' .
                        '<div class="date_data">' . ($row['banner_stop'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_stop'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_stop'])) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_views'].'</div>' .
                        '<div class="date_data">' . ($row['banner_views_until']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_views_until']) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_clicks'].'</div>' .
                        '<div class="date_data">' . ($row['banner_clicks_until'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_clicks_until']) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '</div>' .
                        '<div class="url">'.$banner_url_text . (strlen($banner_url)<80 ? $banner_url : substr($banner_url, 0, 36)."[...]".substr($banner_url,-36,36) ).'</div>' .
                        '</div>';
                break;
            case 4:  // Flash swf
            case 13: // Flash swc
                $output = '<div class="mod_banner_be">' .
                        '<div class="name"><div id="flash_'.$row['id'].'">'.specialchars(ampersand($row['banner_name'])).'</div>'.$fallback_content.'</div>' .
                        '<div class="right">' .
                        '<div class="left">'.
                        '<div class="published_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_published'][0].'</div>'.
                        '<div class="published_data">'.($row['banner_published'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_no'] : $GLOBALS['TL_LANG']['tl_banner']['tl_be_yes']).' </div>'.
                        '</div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_type'][0].'</div>' .
                        '<div class="date_data">'.$GLOBALS['TL_LANG']['tl_banner']['source_extern'] .'</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_start'].'</div>' .
                        '<div class="date_data">' . ($row['banner_start']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_start'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_start'])) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_stop'].'</div>' .
                        '<div class="date_data">' . ($row['banner_stop'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_stop'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_stop'])) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_views'].'</div>' .
                        '<div class="date_data">' . ($row['banner_views_until']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_views_until']) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_clicks'].'</div>' .
                        '<div class="date_data">' . ($row['banner_clicks_until'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_clicks_until']) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '</div>' .
                        '<div class="url">'.$banner_url_text . (strlen($banner_url)<80 ? $banner_url : substr($banner_url, 0, 36)."[...]".substr($banner_url,-36,36) ). '</div>' .
                        '</div>' .
                        '<script>
	new Swiff("'.$banner_image.'", {
	  id: "flash_'.$row['id'].'",
	  width: '.$intWidth.',
	  height: '.$intHeight.',
	  params : {
	  allowfullscreen: "true",
	  wMode: "transparent",
	  flashvars: ""
	  }
	}).replaces($("flash_'.$row['id'].'"));
	</script>';
                break;
            default:
                break;
        }//switch
    
        if ($arrImageSize === false)
        {
            //Externe Banner Grafik
            $output = '<div class="mod_banner_be">' .
                    '<div class="name"><span style="color:red;">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_read_error'].'</span><br />'.$banner_image.'</div>' .
                    '<div class="right">' .
                    '<div class="left">'.
                    '<div class="published_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_published'][0].'</div>'.
                    '<div class="published_data">'.($row['banner_published'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_no'] : $GLOBALS['TL_LANG']['tl_banner']['tl_be_yes']).' </div>'.
                    '</div>'.
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_type'][0].'</div>' .
                    '<div class="date_data">'.$GLOBALS['TL_LANG']['tl_banner']['source_intern'] .'</div>' .
                    '</div>' .
                    '<div style="clear:both;"></div>'.
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_start'].'</div>' .
                    '<div class="date_data">' . ($row['banner_start']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_start'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_start'])) . '</div>' .
                    '</div>' .
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_stop'].'</div>' .
                    '<div class="date_data">' . ($row['banner_stop'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_stop'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_stop'])) . '</div>' .
                    '</div>' .
                    '<div style="clear:both;"></div>'.
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_views'].'</div>' .
                    '<div class="date_data">' . ($row['banner_views_until']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_views_until']) . '</div>' .
                    '</div>' .
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_clicks'].'</div>' .
                    '<div class="date_data">' . ($row['banner_clicks_until'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_clicks_until']) . '</div>' .
                    '</div>' .
                    '<div style="clear:both;"></div>'.
                    '</div>' .
                    '<div class="url">'.$banner_url_text . (strlen($banner_url)<80 ? $banner_url : substr($banner_url, 0, 36)."[...]".substr($banner_url,-36,36) ).'</div>' .
                    '</div>';
        }
    
        $key = $row['banner_published'] ? 'published' : 'unpublished';
        $style = 'style="font-size:11px;margin-bottom:10px;"';
        $output_h = '<div class="cte_type ' . $key . '" ' . $style . '><strong>' . specialchars(ampersand($row['banner_name'])) . '</strong></div>';
        return $output_h . $output;
    }
44785
public function actionGetCategoryUrls(string $category, array $criteria = [], $siteId = null): Response
    {
        return $this->asJson(RouteMap::$plugin->routes->getCategoryUrls($category, $criteria, $siteId));
    }
1165096
protected function getChildrenCategoryList($obCategoryItem, $sPageCode, $sURL)
    {
        if (empty($obCategoryItem) || $obCategoryItem->children->isEmpty()) {
            return [];
        }

        $arResult = [];
        foreach ($obCategoryItem->children as $obChildrenCategory) {
            $arMenuItem = $this->getCategoryMenuData($obChildrenCategory, $sPageCode, $sURL);
            if ($obChildrenCategory->children->isNotEmpty()) {
                $arMenuItem['items'] = $this->getChildrenCategoryList($obChildrenCategory, $sPageCode, $sURL);
            }

            $arResult[] = $arMenuItem;
        }

        return $arResult;
    }
1206806
protected function getListCategory()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->category->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('group')) {
            return $this->category->getList(array('category_group_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('parent')) {
            return $this->category->getList(array('parent_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->category->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
992694
protected function addBannerIntern( &$Banner )
    {
        $arrBannersStat = array();
        $oriSize = false;
        
        // return array(bool $intMaxViews, bool $intMaxClicks)
        $MaxViewsClicks = $this->getMaxViewsClicksStatus($Banner);

        // set $Banner['banner_active'] as HTML Text
        // and $Banner['banner_published_class'] published/unpublished
        $this->setBannerPublishedActive($Banner);
        $this->setBannerURL($Banner);
        $Banner['banner_url'] = \Idna::decode($Banner['banner_url']); // #79
        
        //Pfad+Dateiname holen ueber UUID (findByPk leitet um auf findByUuid)
        $objFile = \FilesModel::findByPk($Banner['banner_image']);
        //BannerImage Class
        $this->BannerImage = new \Banner\BannerImage();
        
        //Banner Art und Größe bestimmen
        $arrImageSize = $this->BannerImage->getBannerImageSize($objFile->path, self::BANNER_TYPE_INTERN);
        // 1 = GIF, 2 = JPG, 3 = PNG
        // 4 = SWF, 13 = SWC (zip-like swf file)
        // 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order)
        // 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF
        switch ($arrImageSize[2])
        {
            case 1:  // GIF
            case 2:  // JPG
            case 3:  // PNG
            case 4:  // Flash swf
            case 13: // Flash swc
                //Check ob Banner zu groß für Anzeige, @return array $Width,$Height,$oriSize     
                $arrNewBannerImageSize = $this->BannerImage->getCheckBannerImageSize($arrImageSize, 250, 200);
                break;
            default:
                break;
        }
        $intWidth  = $arrNewBannerImageSize[0];
        $intHeight = $arrNewBannerImageSize[1];
        $oriSize   = $arrNewBannerImageSize[2];
        
        switch ($arrImageSize[2])
        {
            case 1: // GIF
            case 2: // JPG
            case 3: // PNG
                if ($oriSize || $arrImageSize[2] == 1) // GIF 
                {
                    $Banner['banner_image'] = $this->urlEncode($objFile->path);
                }
                else
                {
                    $Banner['banner_image'] = \Image::get($this->urlEncode($objFile->path), $intWidth, $intHeight,'proportional');
                }
                $arrBannersStat['banner_id'       ]   = $Banner['id'];
                $arrBannersStat['banner_style'    ]   = '';
                $arrBannersStat['banner_name'     ]   = specialchars(ampersand($Banner['banner_name']));
                $arrBannersStat['banner_alt'      ]   = specialchars(ampersand($Banner['banner_name']));
                $arrBannersStat['banner_title'    ]   = $Banner['banner_url'];
                $arrBannersStat['banner_url'      ]   = (strlen($Banner['banner_url']) <61 ? $Banner['banner_url'] : substr($Banner['banner_url'], 0, 28)."[...]".substr($Banner['banner_url'],-24,24) );
                $arrBannersStat['banner_image'    ]   = $Banner['banner_image'];
                $arrBannersStat['banner_width'    ]   = $intWidth;
                $arrBannersStat['banner_height'   ]   = $intHeight;
                $arrBannersStat['banner_prio'     ]   = $GLOBALS['TL_LANG']['tl_banner_stat']['prio'][$Banner['banner_weighting']];
                $arrBannersStat['banner_views'    ]   = ($MaxViewsClicks[0]) ? $Banner['banner_views']  .'<br />'.$GLOBALS['TL_LANG']['tl_banner_stat']['max_yes'] : $Banner['banner_views'];
                $arrBannersStat['banner_clicks'   ]   = ($MaxViewsClicks[1]) ? $Banner['banner_clicks'] .'<br />'.$GLOBALS['TL_LANG']['tl_banner_stat']['max_yes'] : $Banner['banner_clicks'];
                $arrBannersStat['banner_active'   ]   = $Banner['banner_active'];
                $arrBannersStat['banner_pub_class']   = $Banner['banner_published_class'];
                $arrBannersStat['banner_zero'     ]   = $GLOBALS['TL_LANG']['tl_banner_stat']['zero_text'];
                $arrBannersStat['banner_confirm'  ]   = $GLOBALS['TL_LANG']['tl_banner_stat']['zero_confirm'];
                $arrBannersStat['banner_pic'      ]   = true; // Es ist ein Bild
                $arrBannersStat['banner_flash'    ]   = false;
                $arrBannersStat['banner_text'     ]   = false;
                break;
            case 4:  // Flash swf
            case 13: // Flash swc
                $Banner['banner_image'] = $this->urlEncode($objFile->path);
                
                $arrBannersStat['banner_id'       ]   = $Banner['id'];
                $arrBannersStat['banner_style'    ]   = '';
                $arrBannersStat['banner_name'     ]   = specialchars(ampersand($Banner['banner_name']));
                $arrBannersStat['banner_url'      ]   = (strlen($Banner['banner_url']) <61 ? $Banner['banner_url'] : substr($Banner['banner_url'], 0, 28)."[...]".substr($Banner['banner_url'],-24,24) );
                $arrBannersStat['swf_src'         ]   = $Banner['banner_image'];
                $arrBannersStat['swf_width'       ]   = $intWidth;
                $arrBannersStat['swf_height'      ]   = $intHeight;
                $arrBannersStat['banner_prio'     ]   = $GLOBALS['TL_LANG']['tl_banner_stat']['prio'][$Banner['banner_weighting']];
                $arrBannersStat['banner_views'    ]   = ($MaxViewsClicks[0]) ? $Banner['banner_views']  .'<br />'.$GLOBALS['TL_LANG']['tl_banner_stat']['max_yes'] : $Banner['banner_views'];
                $arrBannersStat['banner_clicks'   ]   = ($MaxViewsClicks[1]) ? $Banner['banner_clicks'] .'<br />'.$GLOBALS['TL_LANG']['tl_banner_stat']['max_yes'] : $Banner['banner_clicks'];
                $arrBannersStat['banner_active'   ]   = $Banner['banner_active'];
                $arrBannersStat['banner_pub_class']   = $Banner['banner_published_class'];
                $arrBannersStat['banner_zero'     ]   = $GLOBALS['TL_LANG']['tl_banner_stat']['zero_text'];
                $arrBannersStat['banner_confirm'  ]   = $GLOBALS['TL_LANG']['tl_banner_stat']['zero_confirm'];
                $arrBannersStat['banner_pic'      ]   = false;
                $arrBannersStat['banner_flash'    ]   = true;  // Es ist ein SWF
                $arrBannersStat['banner_text'     ]   = false;
                break;
            default:
                $Banner['banner_image'] = $this->urlEncode($objFile->path);
                
                $arrBannersStat['banner_pic'     ]    = true; 
                $arrBannersStat['banner_flash'   ]    = false;
                $arrBannersStat['banner_text'    ]    = false;
                $arrBannersStat['banner_prio'    ]    = $GLOBALS['TL_LANG']['tl_banner_stat']['prio'][$Banner['banner_weighting']];
                $arrBannersStat['banner_views'   ]    = ($MaxViewsClicks[0]) ? $Banner['banner_views']  .'<br />'.$GLOBALS['TL_LANG']['tl_banner_stat']['max_yes'] : $Banner['banner_views'];
                $arrBannersStat['banner_clicks'  ]    = ($MaxViewsClicks[1]) ? $Banner['banner_clicks'] .'<br />'.$GLOBALS['TL_LANG']['tl_banner_stat']['max_yes'] : $Banner['banner_clicks'];
                $arrBannersStat['banner_active'  ]    = $Banner['banner_active'];
                $arrBannersStat['banner_style'   ]    = 'color:red;font-weight:bold;';
                $arrBannersStat['banner_alt'     ]    = $GLOBALS['TL_LANG']['tl_banner_stat']['read_error'];
                $arrBannersStat['banner_url'     ]    = $Banner['banner_image'];
                break;
        } // switch
        return $arrBannersStat;
    }