当前位置: 首页>>代码示例>>PHP>>正文


PHP Files::gURL方法代码示例

本文整理汇总了PHP中Files::gURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Files::gURL方法的具体用法?PHP Files::gURL怎么用?PHP Files::gURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Files的用法示例。


在下文中一共展示了Files::gURL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getImages

 public static function getImages($id_node)
 {
     $images = FilesNode::getAllFiles(self::MODULE_NAME, $id_node);
     foreach ($images as $k => $image) {
         $images[$k]['thumb'] = Files::gURL($image['src'], $image['ext'], 220, 165, 5);
         $images[$k]['big'] = Files::gURL($image['src'], $image['ext'], 800, 600);
     }
     return $images;
 }
开发者ID:oaki,项目名称:demoshop,代码行数:9,代码来源:GalleryControl.php

示例2: renderList

 function renderList($categories)
 {
     $this->template->blog_box = dibi::fetchAll("SELECT * FROM `menu_item` \nLEFT JOIN node USING (id_menu_item)\nLEFT JOIN article USING (id_node)\nWHERE \nmenu_item.url_identifier = %s", $categories, "\nORDER BY id_node DESC\n");
     foreach ($this->template->blog_box as $article) {
         $article['url'] = $this->getPresenter()->link('Blog:current', array('categories' => $categories, 'url_identifier' => $article->url_identifier));
         if ($image = FilesNode::getOneFirstFile('article', $article->id_node)) {
             $article['image_url'] = Files::gURL($image->src, $image->ext, 220, 160, 6);
         }
     }
     $session = NEnvironment::getSession("Front_List");
     $session['back_url'] = $_SERVER['REQUEST_URI'];
 }
开发者ID:oaki,项目名称:demoshop,代码行数:12,代码来源:Front_BlogPresenter.php

示例3: renderDefault

 function renderDefault($query)
 {
     $this->template->query = $query;
     if ($query != '') {
         $vp = new VisualPaginator($this, 'vp');
         try {
             $datasource = ProductModel::searching($this->id_lang, $query);
             $paginator = $vp->getPaginator();
             $paginator->itemsPerPage = 2;
             $paginator->itemCount = $itemsCount = count($datasource);
             if ($itemsCount == 0) {
                 throw new ProductException(_('Hľadaný výraz sa nenašiel.'));
             }
             $this->template->searchingItems = $datasource->applyLimit($paginator->itemsPerPage, $paginator->offset)->fetchAll();
             //zisti pre kazdy clanok url_identifier
             foreach ($this->template->searchingItems as $k => $i) {
                 $this->template->searchingItems[$k]['url'] = $this->getPresenter()->link('Eshop:current', array('categories' => $i['category_link_rewrite'], 'url_identifier' => $i['link_rewrite']));
                 $image = FilesNode::getOneFirstFile('product', $i['id_product']);
                 if ($image) {
                     $image['thumbs'] = Files::gURL($image['src'], $image['ext'], 100, 70, 5);
                     $this->template->searchingItems[$k]['image'] = $image;
                 }
             }
         } catch (ProductException $e) {
             $this->flashMessage($e->getMessage());
         }
     } else {
         $this->redirect('Homepage');
     }
     //
     //		try{
     //
     //			$this->template->searching_list = ProductModel::searching($this->lang, $query)->fetchAll();
     //			if(empty($this->template->searching_list)){
     //				$this->flashMessage('Hľadaný výraz sa nenašiel.');
     //			}
     //			foreach($this->template->searching_list as $k=>$l){
     //
     //				$this->template->searching_list[$k]['url'] = $this->link('List:current',
     //					array('categories'=> MenuModel::getUrl($l['id_menu_item']) ,
     //					'url_identifier'=>$l['url_identifier']) );
     //
     //			}
     //
     //		}catch(ProductException $e){
     //			$this->flashMessage($e->getMessage());
     //		}
     //
 }
开发者ID:oaki,项目名称:demoshop,代码行数:49,代码来源:SearchingPresenter.php

示例4: img

 /**
  * Formats and splits given string according to $lengths and $functions
  *
  * @param string $subject
  * @param array|int $lengths
  * @param string $delimiter
  * @param array $functions
  * @return string
  */
 public static function img($image_array, $width, $height, $flags = 0, $dir = 'dir', $mode = 'full_path')
 {
     return Files::gURL($image_array['src'], $image_array['ext'], $width, $height, $flags, $dir, $mode);
 }
开发者ID:oaki,项目名称:demoshop,代码行数:13,代码来源:ImageHelper.php

示例5: getImage

 public static function getImage($id_node)
 {
     $image = FilesNode::getOneFirstFile(self::MODULE_NAME, $id_node);
     $image['thumb'] = Files::gURL(@$image['src'], @$image['ext'], 220, 160, 6);
     $image['big'] = Files::gURL(@$image['src'], @$image['ext'], 800, 600);
     return $image;
 }
开发者ID:oaki,项目名称:demoshop,代码行数:7,代码来源:ProductControl.php


注:本文中的Files::gURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。