Projekt

Allgemein

Profil

GX-Bug #46734 » SliderBoxContentView.inc.php

Torben Wark, 02.06.2016 11:02

 
1
<?php
2

    
3
/* --------------------------------------------------------------
4
  SpecialsBoxContentView.inc.php 2014-07-17 gambio
5
  Gambio GmbH
6
  http://www.gambio.de
7
  Copyright (c) 2014 Gambio GmbH
8
  Released under the GNU General Public License (Version 2)
9
  [http://www.gnu.org/licenses/gpl-2.0.html]
10
  --------------------------------------------------------------
11

    
12

    
13
  based on:
14
  (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
15
  (c) 2002-2003 osCommerce(specials.php,v 1.30 2003/02/10); www.oscommerce.com
16
  (c) 2003	 nextcommerce (specials.php,v 1.10 2003/08/17); www.nextcommerce.org
17
  (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: specials.php 1292 2005-10-07 16:10:55Z mz $)
18

    
19
  Released under the GNU General Public License
20
  ---------------------------------------------------------------------------------------
21
 * 
22
 * #########################################################################################################
23
 * Project: developers
24
 * #########################################################################################################
25
 * 
26
 * SliderBoxContentView.inc.php
27
 * 
28
 * 01.06.2016 www.indiv-style.de
29
 * 
30
 * Copyright by H&S eCom 
31
 * @author little Pit(S.B.)
32
 * 
33
 * #########################################################################################################
34
 */
35

    
36
class SliderBoxContentView extends ContentView {
37

    
38
    public function __construct() {
39
        parent::__construct();
40
        $this->Slider_Box_Content();
41
    }
42

    
43
    public function Slider_Box_Content() {
44
        // on index.php? (home or category)
45
        if (strpos(strtolower(gm_get_env_info("PHP_SELF")), FILENAME_DEFAULT) !== false && isset($_GET['manufacturers_id']) == false) {
46
            if (empty($_GET['cPath']) == true && isset($_GET['filter_fv_id']) == false && isset($_GET['filter_price_min']) == false && isset($_GET['filter_price_max']) == false) {
47
                # use default slider for home
48

    
49
                $t_slider_set_id = (int) gm_get_conf('GM_SLIDER_INDEX_ID');
50
            } else {
51
                # look for slider_id for category
52
                $coo_cat_slider_handler = MainFactory::create_object('CategorySliderHandler');
53
                $t_slider_set_id = $coo_cat_slider_handler->get_category_slider_id($_GET['cPath']);
54
            }
55
        }
56
        
57
        // slider for productinfo
58
        if (strpos(strtolower(gm_get_env_info("PHP_SELF")), FILENAME_PRODUCT_INFO) !== false && isset($_GET['manufacturers_id']) == false) {
59
            if ($_GET['products_id'] != 0) {
60
                # look for slider_id for product
61
                $coo_product_slider_handler = MainFactory::create_object('ProductSliderHandler');
62
                $t_slider_set_id = $coo_product_slider_handler->get_product_slider_id($_GET['products_id']);
63
            }
64
        }
65

    
66
        // slider for content
67
        if (strpos(strtolower(gm_get_env_info("PHP_SELF")), FILENAME_CONTENT) !== false && isset($_GET['manufacturers_id']) == false) {
68
            if (!empty($_GET['coID'])) {
69
                # look for slider_id for content
70
                $coo_content_slider_handler = MainFactory::create_object('ContentSliderHandler');
71
                $t_slider_set_id = $coo_content_slider_handler->get_content_slider_id($_GET['coID']);
72
            }
73
        }
74

    
75
        // slider for blog
76
        if (strpos(strtolower(gm_get_env_info("PHP_SELF")), 'blog.php') !== false && isset($_GET['blog_cat']) == true && isset($_GET['manufacturers_id']) == false) {
77
            if (!empty($_GET['blog_cat']) && empty($_GET['blog_item'])) {
78
                # look for slider_id for content
79
                $coo_blogcat_slider_handler = MainFactory::create_object('BlogcatSliderHandler');
80
                $t_slider_set_id = $coo_blogcat_slider_handler->get_blog_cat_slider_id($_GET['blog_cat']);
81
            } elseif (!empty($_GET['blog_cat']) && !empty($_GET['blog_item'])) {
82
                # look for slider_id for content
83
                $coo_blogitem_slider_handler = MainFactory::create_object('BlogitemSliderHandler');
84
                $t_slider_set_id = $coo_blogitem_slider_handler->get_blog_item_slider_id($_GET['blog_item']);
85
            }
86
        }
87
        $this->box_content = $t_slider_set_id;
88
    }
89

    
90
}
(2-2/2)