Пример #1
0
 /**
  * get image
  */
 public function getImage($variety_id)
 {
     require_once 'models/ecommerce/ecommerce_product_variety_image.php';
     $Image = new ecommerce_product_variety_image();
     $image_list = $Image->listing("node_id={$variety_id}", "priority DESC, id ASC");
     return $image_list[0];
 }
Пример #2
0
 /**
  * Find where the file is used
  *
  * @param string $file
  * file src
  * 
  * @return array
  * file using places list
  */
 function getRelations($file)
 {
     require_once 'models/common/common_file.php';
     $CommonFile = new common_file();
     $file_list['file'] = $CommonFile->getFileLink($file);
     require_once 'models/common/common_image.php';
     $CommonImage = new common_image();
     $file_list['node'] = $CommonImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_product_image.php';
     $ProductImage = new ecommerce_product_image();
     $file_list['product'] = $ProductImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_product_variety_image.php';
     $ProductVarietyImage = new ecommerce_product_variety_image();
     $file_list['product_variety'] = $ProductVarietyImage->getFileLink($file);
     require_once 'models/common/common_taxonomy_label_image.php';
     $TaxonomyImage = new common_taxonomy_label_image();
     $file_list['taxonomy'] = $TaxonomyImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_recipe_image.php';
     $RecipeImage = new ecommerce_recipe_image();
     $file_list['recipe'] = $RecipeImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_store_image.php';
     $StoreImage = new ecommerce_store_image();
     $file_list['store'] = $StoreImage->getFileLink($file);
     require_once 'models/education/education_survey_image.php';
     $SurveyImage = new education_survey_image();
     $file_list['survey'] = $SurveyImage->getFileLink($file);
     $file_list['count'] = count($file_list['file']) + count($file_list['node']) + count($file_list['product']) + count($file_list['product_variety']) + count($file_list['taxonomy']) + count($file_list['recipe']) + count($file_list['store']) + count($file_list['survey']);
     return $file_list;
 }