Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 static function get($id_category, $id_lang)
 {
     $key = 'get(' . $id_category . ',' . $id_lang . ')';
     $value = self::getCache($key);
     if ($value) {
         return $value;
     }
     $value = self::getFluent()->where('id_category = %i', $id_category, 'AND id_lang = %i', $id_lang)->fetch();
     $value['files'] = FilesNode::getAllFiles('category', $id_category);
     $value['first_file'] = isset($value['files'][0]) ? $value['files'][0] : array('src' => 'no-image', 'ext' => 'jpg');
     return self::setCache($key, $value);
 }
Exemplo n.º 3
0
 public function getFiles($id_node)
 {
     $files = FilesNode::getAllFiles('Home', $id_node);
     foreach ($files as $k => $l) {
         $i = dibi::fetch("SELECT title, link, alt, link_name FROM [promo_text] WHERE id_file = %i", $l['id_file']);
         $files[$k]['title'] = $i['title'];
         $files[$k]['link'] = $i['link'];
         $files[$k]['alt'] = $i['alt'];
         $files[$k]['link_name'] = $i['link_name'];
     }
     return $files;
 }
Exemplo n.º 4
0
 public static function getFiles($id_node)
 {
     return FilesNode::getAllFiles(self::MODULE_NAME, $id_node, 'all');
     //		return FilesNode::getAllFiles(self::MODULE_NAME, $id_node);
 }
Exemplo n.º 5
0
 public static function getFiles($id_product)
 {
     $key = 'getFiles(' . $id_product . ')';
     $files = self::loadCache($key);
     if (!$files) {
         $files = self::saveCache($key, FilesNode::getAllFiles(self::MODULE_NAME, $id_product, 'all'));
     }
     return $files;
 }