예제 #1
0
 public static function getAll()
 {
     global $_module, $lC_Database, $lC_Language;
     $media = $_GET['media'];
     $Qgroups = $lC_Database->query('select id, title, sort_order from :table_products_variants_groups where languages_id = :languages_id order by sort_order, title');
     $Qgroups->bindTable(':table_products_variants_groups', TABLE_PRODUCTS_VARIANTS_GROUPS);
     $Qgroups->bindInt(':languages_id', $lC_Language->getID());
     $Qgroups->execute();
     $result = array('aaData' => array());
     while ($Qgroups->next()) {
         $Qentries = $lC_Database->query('select count(*) as total from :table_products_variants_values where products_variants_groups_id = :products_variants_groups_id and  languages_id = :languages_id');
         $Qentries->bindTable(':table_products_variants_values', TABLE_PRODUCTS_VARIANTS_VALUES);
         $Qentries->bindInt(':products_variants_groups_id', $Qgroups->valueInt('id'));
         $Qentries->bindInt(':languages_id', $lC_Language->getID());
         $Qentries->execute();
         $check = '<td><input class="batch" type="checkbox" name="batch[]" value="' . $Qgroups->valueInt('id') . '" id="' . $Qgroups->valueInt('id') . '"></td>';
         $group = '<td>' . lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $_module . '=' . $Qgroups->valueInt('id')), '<span class="icon-folder icon-orange"></span>&nbsp;' . $Qgroups->value('title')) . '</td>';
         $total = '<td>' . $Qentries->valueInt('total') . '</td>';
         $sort = '<td>' . $Qgroups->valueInt('sort_order') . '</td>';
         $action = '<td class="align-right vertical-center">
                <span class="button-group">
                  <a href="' . ((int) ($_SESSION['admin']['access']['product_variants'] < 3) ? '#' : 'javascript://" onclick="editGroup(\'' . $Qgroups->valueInt('id') . '\')') . '" class="button icon-pencil ' . ((int) ($_SESSION['admin']['access']['product_variants'] < 3) ? 'disabled' : NULL) . '">' . ($media === 'mobile-portrait' || $media === 'mobile-landscape' ? NULL : $lC_Language->get('icon_edit')) . '</a>
                </span>
                <span class="button-group">
                  <a href="' . ((int) ($_SESSION['admin']['access']['product_variants'] < 4) ? '#' : 'javascript://" onclick="deleteGroup(\'' . $Qgroups->valueInt('id') . '\', \'' . urlencode($Qgroups->valueProtected('title')) . '\');') . '" class="button icon-trash with-tooltip' . ((int) ($_SESSION['admin']['access']['product_variants'] < 4) ? 'disabled' : NULL) . '" title="' . $lC_Language->get('icon_delete') . '"></a>
                </span>
              </td>';
         $result['aaData'][] = array("{$check}", "{$group}", "{$total}", "{$sort}", "{$action}");
         $Qentries->freeResult();
     }
     $Qgroups->freeResult();
     return $result;
 }
예제 #2
0
 public function initialize()
 {
     global $lC_Database, $lC_Language, $lC_Customer;
     if ($lC_Customer->isLoggedOn()) {
         $Qorders = $lC_Database->query('select distinct op.products_id from :table_orders o, :table_orders_products op, :table_products p where o.customers_id = :customers_id and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = 1 group by products_id order by o.date_purchased desc limit :limit');
         $Qorders->bindTable(':table_orders', TABLE_ORDERS);
         $Qorders->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
         $Qorders->bindTable(':table_products', TABLE_PRODUCTS);
         $Qorders->bindInt(':customers_id', $lC_Customer->getID());
         $Qorders->bindInt(':limit', BOX_ORDER_HISTORY_MAX_LIST);
         $Qorders->execute();
         if ($Qorders->numberOfRows()) {
             $product_ids = '';
             while ($Qorders->next()) {
                 $product_ids .= $Qorders->valueInt('products_id') . ',';
             }
             $product_ids = substr($product_ids, 0, -1);
             $Qproducts = $lC_Database->query('select products_id, products_name, products_keyword from :table_products_description where products_id in (:products_id) and language_id = :language_id order by products_name');
             $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
             $Qproducts->bindRaw(':products_id', $product_ids);
             $Qproducts->bindInt(':language_id', $lC_Language->getID());
             $Qproducts->execute();
             $this->_content = '';
             while ($Qproducts->next()) {
                 $this->_content .= '<li class="box-order-history-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qproducts->value('products_keyword')), $Qproducts->value('products_name')) . '</li>';
             }
         }
     }
 }
예제 #3
0
 public function __construct()
 {
     global $lC_Language, $lC_Statistics, $lC_Vqmod, $breadcrumb_string;
     $this->_page_title = $lC_Language->get('heading_title');
     if (!isset($_GET['module'])) {
         $_GET['module'] = '';
     }
     if (!empty($_GET['module']) && !file_exists('includes/modules/statistics/' . $_GET['module'] . '.php')) {
         $_GET['module'] = '';
     }
     if (empty($_GET['module'])) {
         $this->_page_contents = 'listing.php';
     } else {
         include_once $lC_Vqmod->modCheck('includes/modules/statistics/' . $_GET['module'] . '.php');
         $class = 'lC_Statistics_' . str_replace(' ', '_', ucwords(str_replace('_', ' ', $_GET['module'])));
         $lC_Statistics = new $class();
         $lC_Statistics->activate();
         $breadcrumb_array = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module), $lC_Language->get('heading_title')));
         $breadcrumb_array[] = lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&module=' . $_GET['module']), $lC_Statistics->getTitle());
         $breadcrumb_string = '<ul>';
         foreach ($breadcrumb_array as $key => $value) {
             $breadcrumb_string .= '<li>' . $value . '</li>';
         }
         $breadcrumb_string .= '</ul>';
     }
 }
예제 #4
0
 public function initialize()
 {
     global $lC_Database, $lC_Language, $current_category_id;
     if (isset($current_category_id) && $current_category_id > 0) {
         $Qbestsellers = $lC_Database->query('select distinct p.products_id, pd.products_name, pd.products_keyword from :table_products p, :table_products_description pd, :table_products_to_categories p2c, :table_categories c where p.products_status = 1 and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = :language_id and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and :current_category_id in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit :max_display_bestsellers');
         $Qbestsellers->bindTable(':table_products', TABLE_PRODUCTS);
         $Qbestsellers->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
         $Qbestsellers->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES);
         $Qbestsellers->bindTable(':table_categories', TABLE_CATEGORIES);
         $Qbestsellers->bindInt(':language_id', $lC_Language->getID());
         $Qbestsellers->bindInt(':current_category_id', $current_category_id);
         $Qbestsellers->bindInt(':max_display_bestsellers', BOX_BEST_SELLERS_MAX_LIST);
         if (BOX_BEST_SELLERS_CACHE > 0) {
             $Qbestsellers->setCache('box_best_sellers-' . $current_category_id . '-' . $lC_Language->getCode(), BOX_BEST_SELLERS_CACHE);
         }
         $Qbestsellers->execute();
     } else {
         $Qbestsellers = $lC_Database->query('select p.products_id, pd.products_name, pd.products_keyword from :table_products p, :table_products_description pd where p.products_status = 1 and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_ordered desc, pd.products_name limit :max_display_bestsellers');
         $Qbestsellers->bindTable(':table_products', TABLE_PRODUCTS);
         $Qbestsellers->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
         $Qbestsellers->bindInt(':language_id', $lC_Language->getID());
         $Qbestsellers->bindInt(':max_display_bestsellers', BOX_BEST_SELLERS_MAX_LIST);
         if (BOX_BEST_SELLERS_CACHE > 0) {
             $Qbestsellers->setCache('box_best_sellers-0-' . $lC_Language->getCode(), BOX_BEST_SELLERS_CACHE);
         }
         $Qbestsellers->execute();
     }
     if ($Qbestsellers->numberOfRows() >= BOX_BEST_SELLERS_MIN_LIST) {
         $this->_content = '';
         while ($Qbestsellers->next()) {
             $this->_content .= '<li class="box-best-sellers-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qbestsellers->value('products_keyword')), $Qbestsellers->value('products_name')) . '</li>';
         }
     }
     $Qbestsellers->freeResult();
 }
예제 #5
0
 public function initialize()
 {
     global $lC_Services, $lC_RecentlyVisited, $lC_Language, $lC_Image, $lC_Product;
     if ($lC_Services->isStarted('recently_visited') && $lC_RecentlyVisited->hasHistory()) {
         $this->_content = '';
         if ($lC_RecentlyVisited->hasProducts()) {
             foreach ($lC_RecentlyVisited->getProducts() as $product) {
                 // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
                 $lC_Product = new lC_Product($product['id']);
                 $this->_content .= '<div class="content-recently-visited-container">' . "\n" . '  <div class="content-recently-visited-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Product->getTitle()) . '</div>' . "\n";
                 if ($lC_Product->hasImage()) {
                     $this->_content .= '<div class="content-recently-visited-image">' . (SERVICE_RECENTLY_VISITED_SHOW_PRODUCT_IMAGES == '1' ? lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Image->show($lC_Product->getImage(), $lC_Product->getTitle(), 'class="content-recently-visited-image-src"', 'small')) : NULL) . '</div>' . "\n";
                 }
                 $this->_content .= '  <div class="content-recently-visited-price pricing-row">' . $lC_Product->getPriceFormated(true) . '</div>' . "\n" . '  <div class="content-recently-visited-from">' . sprintf($lC_Language->get('recently_visited_item_in_category'), lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $product['category_path']), $product['category_name'])) . '</div>' . "\n" . '</div>' . "\n";
             }
         }
         if ($lC_RecentlyVisited->hasCategories()) {
             foreach ($lC_RecentlyVisited->getCategories() as $category) {
                 // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
                 if (!empty($category['parent_id'])) {
                     $this->_content .= '<div class="content-recently-visited-container">' . "\n" . '  <div class="content-recently-visited-name">' . sprintf($lC_Language->get('recently_visited_item_in_category'), lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $product['category_path']), $product['category_name'])) . '</div>' . "\n";
                     if (isset($category['image']) && empty($category['image']) === false) {
                         $this->_content .= '<div class="content-recently-visited-image">' . (SERVICE_RECENTLY_VISITED_SHOW_CATEGORY_IMAGES == '1' ? lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $category['id']), lc_image('images/categories/' . $category['image'], $category['name'], null, null, 'class="content-recently-visited-image-src"')) : NULL) . '</div>' . "\n";
                     }
                     $this->_content .= '  <div class="content-recently-visited-price pricing-row"></div>' . "\n" . '  <div class="content-recently-visited-from">' . sprintf($lC_Language->get('recently_visited_item_in_category'), lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $category['parent_id']), $category['parent_name'])) . '</div>' . "\n" . '</div>' . "\n";
                 }
             }
         }
         if ($lC_RecentlyVisited->hasSearches()) {
             foreach ($lC_RecentlyVisited->getSearches() as $searchphrase) {
                 //          $this->_content .= '<div class="content-recently-visited-searches">' . lc_link_object(lc_href_link(FILENAME_SEARCH, 'keywords=' . $searchphrase['keywords']), lc_output_string_protected($searchphrase['keywords'])) . ' <i>(' . number_format($searchphrase['results']) . ' results)</i></div>';
             }
         }
     }
 }
예제 #6
0
 public function initialize()
 {
     global $lC_Cache, $lC_Database, $lC_Services, $lC_Currencies, $lC_Specials, $lC_Language, $lC_Image;
     $this->_title_link = lc_href_link(FILENAME_PRODUCTS, 'new');
     $data = array();
     if ($lC_Cache->isEnabled() && BOX_WHATS_NEW_CACHE > 0 && $lC_Cache->read('box-whats_new-' . $lC_Language->getCode() . '-' . $lC_Currencies->getCode(), BOX_WHATS_NEW_CACHE)) {
         $data = $lC_Cache->getCache();
     } else {
         $Qnew = $lC_Database->query('select products_id from :table_products where products_status = :products_status order by products_date_added desc limit :max_random_select_new');
         $Qnew->bindTable(':table_products', TABLE_PRODUCTS);
         $Qnew->bindInt(':products_status', 1);
         $Qnew->bindInt(':max_random_select_new', BOX_WHATS_NEW_RANDOM_SELECT);
         $Qnew->executeRandomMulti();
         if ($Qnew->numberOfRows()) {
             // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
             $lC_Product = new lC_Product($Qnew->valueInt('products_id'));
             $data = $lC_Product->getData();
             $data['display_price'] = $lC_Product->getPriceFormated(true);
             $data['display_image'] = $lC_Product->getImage();
         }
         if ($lC_Cache->isEnabled()) {
             $lC_Cache->write($data);
         }
     }
     if (!empty($data)) {
         $this->_content = '';
         if (empty($data['display_image']) === false) {
             $this->_content = '<li class="box-whats-new-image"><div class="thumbnail">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $data['keyword']), $lC_Image->show($data['display_image'], $data['name'], 'class="box-whats-new-image-src"')) . '</div></li>';
         }
         $this->_content .= '<li class="box-whats-new-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $data['keyword']), $data['name']) . '</li>';
         $this->_content .= '<li class="box-whats-new-price pricing-row">' . $data['display_price'] . '</li>';
         $this->_content .= '<li class="box-whats-new-buy-now pricing-row buy-btn-div"><button onclick="window.location.href=\'' . lc_href_link(FILENAME_PRODUCTS, $data['keyword'] . '&action=cart_add') . '\'" title="" type="button">' . $lC_Language->get('button_buy_now') . '</button>';
     }
 }
예제 #7
0
 public function initialize()
 {
     global $lC_Database, $lC_Language, $lC_Currencies, $lC_Image;
     if (MODULE_CONTENT_FEATURED_PRODUCTS_MAX_DISPLAY > 0) {
         $limit = ' limit ' . MODULE_CONTENT_FEATURED_PRODUCTS_MAX_DISPLAY;
     }
     $Qfeatured = $lC_Database->query('select products_id 
                                     from :table_featured_products 
                                    where (str_to_date(expires_date, "%Y-%m-%d") >= str_to_date(now(), "%Y-%m-%d") or expires_date = "0000-00-00 00:00:00") 
                                      and status = 1 
                                 order by rand() asc' . $limit);
     $Qfeatured->bindTable(':table_featured_products', TABLE_FEATURED_PRODUCTS);
     $Qfeatured->bindInt(':max_display_featured_products', MODULE_CONTENT_FEATURED_PRODUCTS_MAX_DISPLAY);
     $Qfeatured->execute();
     if (MODULE_CONTENT_FEATURED_PRODUCTS_CACHE > 0) {
         $Qfeatured->setCache('featured_products-' . $lC_Language->getCode() . '-' . $lC_Currencies->getCode(), MODULE_CONTENT_FEATURED_PRODUCTS_CACHE);
     }
     if ($Qfeatured->numberOfRows() > 0) {
         $this->_content = '';
         while ($Qfeatured->next()) {
             // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
             $lC_Product = new lC_Product($Qfeatured->valueInt('products_id'));
             $this->_content .= '<div class="content-featured-products-container">' . "\n" . '  <div class="content-featured-products-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Product->getTitle()) . '</div>' . "\n";
             if ($lC_Product->hasImage()) {
                 $this->_content .= '  <div class="content-featured-products-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Image->show($lC_Product->getImage(), $lC_Product->getTitle(), 'class="content-featured-products-image-src"')) . '</div>' . "\n";
             }
             $this->_content .= '  <div class="content-featured-products-desc">' . substr(lc_clean_html($lC_Product->getDescription()), 0, 62) . '...</div>' . "\n" . '  <div class="content-featured-products-price pricing-row">' . $lC_Product->getPriceFormated(true) . '</div>' . "\n" . '  <div class="content-featured-products-button pricing-row buy-btn-div"><button class="content-featured-products-add-button" onclick="window.location.href=\'' . lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword() . '&action=cart_add') . '\'" type="button">' . $lC_Language->get('new_products_button_buy_now') . '</button></div>' . "\n" . '</div>' . "\n";
         }
     }
     $Qfeatured->freeResult();
 }
 public function initialize()
 {
     global $lC_Database, $lC_Language, $lC_Product, $lC_Customer;
     $this->_title_link = lc_href_link(FILENAME_ACCOUNT, 'notifications', 'SSL');
     if (isset($lC_Product) && is_a($lC_Product, 'lC_Product')) {
         if ($lC_Customer->isLoggedOn()) {
             $Qcheck = $lC_Database->query('select global_product_notifications from :table_customers where customers_id = :customers_id');
             $Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
             $Qcheck->bindInt(':customers_id', $lC_Customer->getID());
             $Qcheck->execute();
             if ($Qcheck->valueInt('global_product_notifications') === 0) {
                 $Qcheck = $lC_Database->query('select products_id from :table_products_notifications where products_id = :products_id and customers_id = :customers_id limit 1');
                 $Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
                 $Qcheck->bindInt(':products_id', $lC_Product->getID());
                 $Qcheck->bindInt(':customers_id', $lC_Customer->getID());
                 $Qcheck->execute();
                 if ($Qcheck->numberOfRows() > 0) {
                     $this->_content = '<li class="box-product-notifications-remove-image"><span class="box-product_notifications-image-container"></span>' . lc_link_object(lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), lc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), sprintf($lC_Language->get('box_product_notifications_remove'), $lC_Product->getTitle())) . '</li>';
                 } else {
                     $this->_content = '<li class="box-product-notifications-add-image"><span class="box-product_notifications-image-container"></span>' . lc_link_object(lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), lc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), sprintf($lC_Language->get('box_product_notifications_add'), $lC_Product->getTitle())) . '</li>';
                 }
             }
         }
     }
 }
예제 #9
0
 public function initialize()
 {
     global $lC_Database, $lC_Language, $lC_Currencies, $lC_Image;
     $Qupcoming = $lC_Database->query('select p.products_id, pa.value as date_expected from :table_products p, :table_templates_boxes tb, :table_product_attributes pa where tb.code = :code and tb.id = pa.id and to_days(str_to_date(pa.value, "%m/%d/%Y")) >= to_days(now()) and pa.products_id = p.products_id and p.products_status = :products_status order by pa.value limit :max_display_upcoming_products');
     $Qupcoming->bindTable(':table_products', TABLE_PRODUCTS);
     $Qupcoming->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES);
     $Qupcoming->bindTable(':table_product_attributes', TABLE_PRODUCT_ATTRIBUTES);
     $Qupcoming->bindValue(':code', 'date_available');
     $Qupcoming->bindInt(':products_status', 1);
     $Qupcoming->bindInt(':max_display_upcoming_products', MODULE_CONTENT_UPCOMING_PRODUCTS_MAX_DISPLAY);
     if (MODULE_CONTENT_UPCOMING_PRODUCTS_CACHE > 0) {
         $Qupcoming->setCache('upcoming_products-' . $lC_Language->getCode() . '-' . $lC_Currencies->getCode(), MODULE_CONTENT_UPCOMING_PRODUCTS_CACHE);
     }
     $Qupcoming->execute();
     if ($Qupcoming->numberOfRows() > 0) {
         $this->_content = '';
         while ($Qupcoming->next()) {
             // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
             $lC_Product = new lC_Product($Qupcoming->valueInt('products_id'));
             $this->_content .= '<div class="content-upcoming-products-container">' . "\n" . '<div class="content-upcoming-products-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Product->getTitle()) . '</div>' . "\n";
             if ($lC_Product->hasImage()) {
                 $this->_content .= '<div class="content-upcoming-products-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Image->show($lC_Product->getImage(), $lC_Product->getTitle(), 'class="content-upcoming-products-image-src"', 'small')) . '</div>' . "\n";
             }
             $this->_content .= '<div class="content-upcoming-products-price pricing-row">' . $lC_Product->getPriceFormated(true) . '</div>' . "\n" . '<div class="content-upcoming-products-date">' . $Qupcoming->value('date_expected') . '</div>' . "\n" . '</div>' . "\n";
         }
     }
     $Qupcoming->freeResult();
 }
예제 #10
0
 function __construct()
 {
     global $lC_Language, $breadcrumb_string;
     $this->_page_title = $lC_Language->get('heading_title');
     $current_category_id = 0;
     if (is_numeric($_GET[$this->_module])) {
         $current_category_id = $_GET[$this->_module];
     }
     $lC_CategoryTree = new lC_CategoryTree_Admin();
     if (!isset($_GET['action'])) {
         $_GET['action'] = '';
     }
     // check if the categories image directory exists
     if (is_dir('../images/categories')) {
         if (!is_writeable('../images/categories')) {
             $_SESSION['error'] = true;
             $_SESSION['errmsg'] = sprintf($lC_Language->get('ms_error_image_directory_not_writable'), realpath('../images/categories'));
         }
     } else {
         $_SESSION['error'] = true;
         $_SESSION['errmsg'] = sprintf($lC_Language->get('ms_error_image_directory_non_existant'), realpath('../images/categories'));
     }
     // setup the breadcrumb
     $breadcrumb_array = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module), $lC_Language->get('text_top')));
     foreach ($lC_CategoryTree->getPathArray($current_category_id) as $category) {
         $breadcrumb_array[] = lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $category['id']), $category['name']);
     }
     $breadcrumb_string = '<ul>';
     foreach ($breadcrumb_array as $key => $value) {
         $breadcrumb_string .= '<li>' . $value . '</li>';
     }
     $breadcrumb_string .= '</ul>';
 }
예제 #11
0
 public function initialize()
 {
     global $lC_Language, $request_type;
     $this->_content = '';
     foreach ($lC_Language->getAll() as $value) {
         $this->_content .= '<li class="box-languages-selection">' . lc_link_object(lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), lc_get_all_get_params(array('language', 'currency')) . '&language=' . $value['code'], 'AUTO'), $lC_Language->showImage($value['code'])) . '</li>';
     }
 }
예제 #12
0
 public static function getAll()
 {
     global $lC_Language;
     if (!defined('LC_ADMIN_FILE_MANAGER_ROOT_PATH')) {
         define('LC_ADMIN_FILE_MANAGER_ROOT_PATH', substr(DIR_FS_CATALOG, 0, -1));
     }
     $media = $_GET['media'];
     $goto_array = array(array('id' => '', 'text' => $lC_Language->get('top_level')));
     if ($_SESSION['fm_directory'] != LC_ADMIN_FILE_MANAGER_ROOT_PATH) {
         $path_array = explode('/', substr($_SESSION['fm_directory'], strlen(LC_ADMIN_FILE_MANAGER_ROOT_PATH) + 1));
         foreach ($path_array as $value) {
             if (sizeof($goto_array) < 2) {
                 $goto_array[] = array('id' => $value, 'text' => $value);
             } else {
                 $parent = end($goto_array);
                 $goto_array[] = array('id' => $parent['id'] . '/' . $value, 'text' => $parent['id'] . '/' . $value);
             }
         }
     }
     $lC_DirectoryListing = new lC_DirectoryListing($_SESSION['fm_directory']);
     $lC_DirectoryListing->setStats(true);
     $result = array('aaData' => array());
     if ($_SESSION['fm_directory'] != LC_ADMIN_FILE_MANAGER_ROOT_PATH) {
         $files = '<td>' . lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, 'file_manager&goto=' . $goto_array[sizeof($goto_array) - 2]['id']), '<span class="icon-up-fat icon-blue">&nbsp;' . $lC_Language->get('parent_level')) . '</td>';
         $result['aaData'][] = array("{$files}", "", "", "", "", "", "", "");
     }
     $cnt = 0;
     foreach ($lC_DirectoryListing->getFiles() as $file) {
         $file_owner = posix_getpwuid($file['user_id']);
         $group_owner = posix_getgrgid($file['group_id']);
         if ($file['is_directory'] === true) {
             $entry_url = lc_href_link_admin(FILENAME_DEFAULT, 'file_manager&directory=' . $file['name']);
             $files = '<td>' . lc_link_object($entry_url, '<span class="icon-folder icon-orange">&nbsp;' . $file['name']) . '</td>';
         } else {
             $entry_url = lc_href_link_admin(FILENAME_DEFAULT, 'file_manager&entry=' . $file['name'] . '&action=save');
             $files = '<td><a href="javascript:void(0);" onclick="editEntry(\'' . $file['name'] . '\')">' . '<span class="icon-page-list icon-blue">&nbsp;' . $file['name'] . '</a></td>';
         }
         $size = '<td>' . number_format($file['size']) . '</td>';
         $perms = '<td>' . lc_get_file_permissions($file['permissions']) . '</td>';
         $user = '******' . $file_owner['name'] . '</td>';
         $group = '<td>' . $group_owner['name'] . '</td>';
         $write = '<td>' . is_writable($lC_DirectoryListing->getDirectory() . '/' . $file['name']) ? '<span class="icon-tick icon-green">' : '<span class="icon-cross icon-red">' . '</td>';
         $last = '<td>' . lC_DateTime::getShort(@date('Y-m-d H:i:s', $file['last_modified']), true) . '</td>';
         if ($file['is_directory'] === false) {
             $action_links = '<a href="' . ((int) ($_SESSION['admin']['access']['file_manager'] < 3) ? '#' : 'javascript://" onclick="editEntry(\'' . $file['name'] . '\')') . '" class="button icon-pencil' . ((int) ($_SESSION['admin']['access']['file_manager'] < 3) ? ' disabled' : NULL) . '">' . ($media === 'mobile-portrait' || $media === 'mobile-landscape' ? NULL : $lC_Language->get('icon_edit')) . '</a>' . '<a href="' . ((int) ($_SESSION['admin']['access']['file_manager'] < 2) ? '#' : lc_href_link_admin(FILENAME_DEFAULT, 'file_manager&entry=' . $file['name'] . '&action=download')) . '" class="button icon-download with-tooltip' . ((int) ($_SESSION['admin']['access']['file_manager'] < 2) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_download') . '"></a>' . '<a href="' . ((int) ($_SESSION['admin']['access']['file_manager'] < 4) ? '#' : 'javascript://" onclick="deleteEntry(\'' . $file['name'] . '\', \'' . urlencode($file['name']) . '\')"') . '" class="button icon-trash with-tooltip' . ((int) ($_SESSION['admin']['access']['file_manager'] < 4) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_delete') . '"></a>';
         } else {
             $action_links = '<a href="' . ((int) ($_SESSION['admin']['access']['file_manager'] < 4) ? '#' : 'javascript://" onclick="deleteEntry(\'' . $file['name'] . '\', \'' . urlencode($file['name']) . '\')"') . '" class="button icon-trash' . ((int) ($_SESSION['admin']['access']['file_manager'] < 4) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_delete') . '"></a>';
         }
         $action = '<td class="align-right vertical-center"><span class="button-group compact">
                ' . $action_links . '
              </span></td>';
         $result['aaData'][] = array("{$files}", "{$size}", "{$perms}", "{$user}", "{$group}", "{$write}", "{$last}", "{$action}");
         $cnt++;
     }
     $result['total'] = $cnt;
     return $result;
 }
예제 #13
0
 public function initialize()
 {
     global $lC_Database, $lC_Services, $lC_Cache, $lC_Language, $lC_Product, $lC_Image;
     $this->_title_link = lc_href_link(FILENAME_PRODUCTS, 'reviews');
     if ($lC_Services->isStarted('reviews')) {
         if ($lC_Cache->isEnabled() && BOX_REVIEWS_CACHE > 0 && $lC_Cache->read('box-reviews' . (isset($lC_Product) && is_a($lC_Product, 'lC_Product') && $lC_Product->isValid() ? '-' . $lC_Product->getID() : '') . '-' . $lC_Language->getCode(), BOX_REVIEWS_CACHE)) {
             $data = $lC_Cache->getCache();
         } else {
             $data = array();
             $Qreview = $lC_Database->query('select r.reviews_id, r.reviews_rating, p.products_id, pd.products_name, pd.products_keyword, i.image from :table_reviews r, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where r.products_id = p.products_id and p.products_status = 1 and r.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id and r.reviews_status = 1');
             $Qreview->bindTable(':table_reviews', TABLE_REVIEWS);
             $Qreview->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
             $Qreview->bindTable(':table_products', TABLE_PRODUCTS);
             $Qreview->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
             $Qreview->bindInt(':default_flag', 1);
             $Qreview->bindInt(':language_id', $lC_Language->getID());
             $Qreview->bindInt(':language_id', $lC_Language->getID());
             if (isset($lC_Product) && is_a($lC_Product, 'lC_Product') && $lC_Product->isValid()) {
                 $Qreview->appendQuery('and p.products_id = :products_id');
                 $Qreview->bindInt(':products_id', $lC_Product->getID());
             }
             $Qreview->appendQuery('order by r.reviews_id desc limit :max_random_select_reviews');
             $Qreview->bindInt(':max_random_select_reviews', BOX_REVIEWS_RANDOM_SELECT);
             $Qreview->executeRandomMulti();
             if ($Qreview->numberOfRows()) {
                 $Qtext = $lC_Database->query('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews where reviews_id = :reviews_id and languages_id = :languages_id');
                 $Qtext->bindTable(':table_reviews', TABLE_REVIEWS);
                 $Qtext->bindInt(':reviews_id', $Qreview->valueInt('reviews_id'));
                 $Qtext->bindInt(':languages_id', $lC_Language->getID());
                 $Qtext->execute();
                 $data = array_merge($Qreview->toArray(), $Qtext->toArray());
                 $Qtext->freeResult();
                 $Qreview->freeResult();
             }
             if ($lC_Cache->isEnabled()) {
                 $lC_Cache->write($data);
             }
         }
         $this->_content = '';
         if (empty($data)) {
             if (isset($lC_Product) && is_a($lC_Product, 'lC_Product') && $lC_Product->isValid()) {
                 $this->_content = '<li class="box-reviews-write">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, 'reviews=new&' . $lC_Product->getKeyword()), $lC_Language->get('box_reviews_write')) . '</li>' . "\n";
             }
         } else {
             if (!empty($data['image'])) {
                 $this->_content = '<li class="box-reviews-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, 'reviews=' . $data['reviews_id'] . '&' . $data['products_keyword']), $lC_Image->show($data['image'], $data['products_name'], 'class="box-reviews-image-src"')) . '</li>';
             }
             $this->_content .= '<li class="box-reviews-text">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, 'reviews=' . $data['reviews_id'] . '&' . $data['products_keyword']), wordwrap(lc_output_string_protected($data['reviews_text']), 15, "\n") . '...') . "\n" . '<li class="box-reviews-rating">' . $lC_Language->get('box_reviews_average_rating') . ' ' . lc_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $data['reviews_rating'] . '.png', sprintf($lC_Language->get('box_reviews_stars_rating'), $data['reviews_rating'])) . '</li>';
         }
     }
 }
예제 #14
0
 public function initialize()
 {
     global $lC_Language, $lC_ShoppingCart, $lC_Currencies;
     $this->_title_link = lc_href_link(FILENAME_CHECKOUT, null, 'SSL');
     if ($lC_ShoppingCart->hasContents()) {
         $this->_content = '';
         foreach ($lC_ShoppingCart->getProducts() as $products) {
             $this->_content .= '<li class="box-shopping-cart-product">' . $products['quantity'] . '&nbsp;x&nbsp;' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $products['keyword']), $products['name']) . '</li>';
         }
         $this->_content .= '<li class="box-shopping-cart-subtotal">' . $lC_Language->get('box_shopping_cart_subtotal') . ' ' . $lC_Currencies->format($lC_ShoppingCart->getSubTotal()) . '</li>';
     } else {
         $this->_content = '<li class="box-shopping-cart-empty">' . $lC_Language->get('box_shopping_cart_empty') . '</li>';
     }
 }
예제 #15
0
 protected function _setData()
 {
     global $lC_Database, $lC_Currencies;
     $this->_data = array();
     $this->_resultset = $lC_Database->query('select o.orders_id, o.customers_name, ot.value from :table_orders o, :table_orders_total ot where o.orders_id = ot.orders_id and ot.class = :class order by value desc');
     $this->_resultset->bindTable(':table_orders', TABLE_ORDERS);
     $this->_resultset->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
     $this->_resultset->bindValue(':class', 'total');
     $this->_resultset->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
     $this->_resultset->execute();
     while ($this->_resultset->next()) {
         $this->_data[] = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, 'orders&oID=' . $this->_resultset->value('orders_id') . '&action=save'), $this->_icon . '&nbsp;' . $this->_resultset->value('customers_name')), $lC_Currencies->format($this->_resultset->valueInt('value')));
     }
 }
예제 #16
0
 protected function _setData()
 {
     global $lC_Database, $lC_Language;
     $this->_data = array();
     $this->_resultset = $lC_Database->query('select p.products_id, p.products_ordered, pd.products_name from :table_products p, :table_products_description pd where p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_ordered desc, pd.products_name');
     $this->_resultset->bindTable(':table_products', TABLE_PRODUCTS);
     $this->_resultset->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
     $this->_resultset->bindInt(':language_id', $lC_Language->getID());
     $this->_resultset->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
     $this->_resultset->execute();
     while ($this->_resultset->next()) {
         $this->_data[] = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, 'products&pID=' . $this->_resultset->valueInt('products_id') . '&action=preview'), $this->_icon . '&nbsp;' . $this->_resultset->value('products_name')), $this->_resultset->valueInt('products_ordered'));
     }
 }
예제 #17
0
 public function __construct()
 {
     global $lC_Language, $breadcrumb_string;
     $this->_page_title = $lC_Language->get('heading_title');
     $breadcrumb_array = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module), $lC_Language->get('heading_title')));
     if (!empty($_GET[$this->_module]) && is_numeric($_GET[$this->_module])) {
         $this->_page_contents = 'entries.php';
         $this->_page_title = lC_Product_variants_Admin::getData($_GET[$this->_module], null, 'title');
         $breadcrumb_array[] = lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $this->_page_contents), $this->_page_title);
     }
     $breadcrumb_string = '<ul>';
     foreach ($breadcrumb_array as $key => $value) {
         $breadcrumb_string .= '<li>' . $value . '</li>';
     }
     $breadcrumb_string .= '</ul>';
 }
예제 #18
0
 /**
  * Adds an entry to the breadcrumb navigation path
  *
  * @param string  $title  The title of the breadcrumb navigation entry
  * @param string  $link   The link of the breadcrumb navigation entry
  * @param string  $cPath  The cPath used to prefix the breadcrumb
  * @access public
  */
 public function add($title, $link = null, $cPath = null)
 {
     global $lC_Category;
     if ($cPath != null) {
         $cPathArr = explode('_', $cPath);
         $cp = '';
         foreach ($cPathArr as $id) {
             $lC_Category = new lC_Category($id);
             $this->_path[] = lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $cp . $id), $lC_Category->getTitle($id));
             $cp .= $id . '_';
         }
     }
     if (!empty($link)) {
         $title = lc_link_object($link, $title);
     }
     if (!empty($title)) {
         $this->_path[] = $title;
     }
 }
예제 #19
0
 public function getListingOutput()
 {
     global $lC_Database, $lC_Language, $lC_Currencies, $lC_Image, $lC_Featured_products;
     $Qf = $lC_Database->query('select products_id 
                              from :table_featured_products 
                             where (str_to_date(expires_date, "%Y-%m-%d") >= str_to_date(now(), "%Y-%m-%d") or expires_date = "0000-00-00 00:00:00") 
                               and status = 1 
                          order by expires_date desc');
     $Qf->bindTable(':table_featured_products', TABLE_FEATURED_PRODUCTS);
     $Qf->execute();
     while ($Qf->next()) {
         $Qfresults[] = $Qf->valueInt('products_id');
     }
     $output = '';
     if ($Qf->numberOfRows() > 0) {
         foreach ($Qfresults as $featured) {
             $Qfeatured = $lC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_quantity, pd.products_name, pd.products_keyword, pd.products_description, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where p.products_id = :products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id');
             $Qfeatured->bindTable(':table_products', TABLE_PRODUCTS);
             $Qfeatured->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
             $Qfeatured->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
             $Qfeatured->bindInt(':products_id', $featured);
             $Qfeatured->bindInt(':default_flag', 1);
             $Qfeatured->bindInt(':language_id', $lC_Language->getID());
             $Qfeatured->execute();
             while ($Qfeatured->next()) {
                 $output .= '<div class="content-featured-products-listing-container">';
                 $output .= '  <div class="content-featured-products-listing-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qfeatured->value('products_keyword')), $Qfeatured->value('products_name')) . '</div>' . "\n";
                 $output .= '  <div class="content-featured-products-listing-description">' . (strlen(lc_clean_html($Qfeatured->value('products_description'))) > 65 ? substr(lc_clean_html($Qfeatured->value('products_description')), 0, 62) . '...' : lc_clean_html($Qfeatured->value('products_description'))) . '</div>' . "\n";
                 $output .= '  <div class="content-featured-products-listing-price">' . $lC_Currencies->displayPrice($Qfeatured->value('products_price'), $Qfeatured->valueInt('products_tax_class_id')) . '</div>' . "\n";
                 $output .= '  <div class="content-featured-products-listing-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qfeatured->value('products_keyword')), $lC_Image->show($Qfeatured->value('image'), $Qfeatured->value('products_name'))) . '</div>' . "\n";
                 if (DISABLE_ADD_TO_CART == 1 && $Qfeatured->valueInt('products_quantity') < 1) {
                     $output .= '  <div class="content-featured-products-listing-buy-now"><button type="button" class="content-featured-products-listing-buy-now-button" disabled>' . $lC_Language->get('out_of_stock') . '</button></div>' . "\n";
                 } else {
                     $output .= '  <div class="content-featured-products-listing-buy-now"><button type="button" onclick="document.location.href=\'' . lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $Qfeatured->value('products_keyword') . '&' . lc_get_all_get_params(array('action', 'new')) . '&action=cart_add') . '\'" class="content-featured-products-listing-buy-now-button">' . $lC_Language->get('button_buy_now') . '</button></div>' . "\n";
                 }
                 $output .= '</div>' . "\n";
             }
         }
     } else {
         $output .= '<div class="content-specials-listing-name">' . $lC_Language->get('text_no_featured_products') . '</div>';
     }
     return $output;
 }
예제 #20
0
 public function initialize()
 {
     global $lC_Database, $lC_Language, $lC_Image, $lC_carousel, $lC_Services;
     $caption_enabled = defined('MODULE_CONTENT_MAINPAGE_CAROUSEL_CAPTION') && @constant('MODULE_CONTENT_MAINPAGE_CAROUSEL_CAPTION') == '1' ? true : false;
     $indicator_enabled = defined('MODULE_CONTENT_MAINPAGE_CAROUSEL_INDICATOR') && @constant('MODULE_CONTENT_MAINPAGE_CAROUSEL_INDICATOR') == '1' ? true : false;
     if ($lC_Services->isStarted('banner')) {
         $Qbanner = $lC_Database->query('select * from :table_banners where status = 1 and banners_group = :banners_group');
         $Qbanner->bindTable(':table_banners', TABLE_BANNERS);
         $Qbanner->bindValue(':banners_group', 'banner_slider');
         $Qbanner->execute();
         $this->_content .= '<div id="CarouselModule" class="carousel slide" data-ride="carousel">';
         $this->_content .= '<div class="carousel-inner" role="listbox">';
         $n = 0;
         while ($Qbanner->next()) {
             $this->_content .= '<div class="item ' . ($n == 0 ? 'active' : '') . '">';
             $this->_content .= lc_link_object(lc_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $Qbanner->valueInt('banners_id')), lc_image(DIR_WS_IMAGES . $Qbanner->value('banners_image'), $Qbanner->value('banners_title')), $Qbanner->valueInt('banners_target') === 1 ? ' target="_blank" ' : ' target="_self" ');
             if ($caption_enabled === true) {
                 $this->_content .= '<div class="carousel-caption">' . $Qbanner->value('banners_title') . '</div>';
             }
             $this->_content .= '</div>';
             $n++;
         }
         $this->_content .= '</div>';
         if ($Qbanner->numberOfRows() > 0) {
             $this->_content .= '<ol class="carousel-indicators">';
             for ($i = 0; $i < $n; $i++) {
                 $this->_content .= '<li data-target="#CarouselModule" data-slide-to="' . $i . '"' . ($n == 0 ? ' class="active"' : '') . '></li>';
             }
             $this->_content .= '</ol>';
             $this->_content .= '  <a class="left carousel-control" href="#CarouselModule" role="button" data-slide="prev">';
             $this->_content .= '    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>';
             $this->_content .= '    <span class="sr-only">Previous</span>';
             $this->_content .= '  </a>';
             $this->_content .= '  <a class="right carousel-control" href="#CarouselModule" role="button" data-slide="next">';
             $this->_content .= '    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>';
             $this->_content .= '    <span class="sr-only">Next</span>';
             $this->_content .= '  </a>';
         }
         $this->_content .= '</div>';
     }
 }
예제 #21
0
 public function __construct()
 {
     global $lC_Language, $breadcrumb_string;
     $this->_page_title = $lC_Language->get('heading_title');
     $breadcrumb_array = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module), $lC_Language->get('heading_title')));
     if (!empty($_GET[$this->_module]) && is_numeric($_GET[$this->_module]) && lC_Languages_Admin::exists($_GET[$this->_module])) {
         $this->_page_title = lC_Languages_Admin::get($_GET[$this->_module], 'name');
         $this->_page_contents = 'groups.php';
         $breadcrumb_array[] = lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $this->_page_contents), $this->_page_title);
         if (isset($_GET['group']) && !empty($_GET['group']) && lC_Languages_Admin::isDefinitionGroup($_GET[$this->_module], $_GET['group'])) {
             $this->_page_title = $_GET['group'];
             $this->_page_contents = 'definitions.php';
             $breadcrumb_array[] = lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $this->_page_contents), $this->_page_title);
         }
     }
     $breadcrumb_string = '<ul>';
     foreach ($breadcrumb_array as $key => $value) {
         $breadcrumb_string .= '<li>' . lc_output_utf8_decoded($value) . '</li>';
     }
     $breadcrumb_string .= '</ul>';
     if (!isset($_GET['action'])) {
         $_GET['action'] = '';
     }
     if (!empty($_GET['action'])) {
         switch ($_GET['action']) {
             case 'import':
                 $lang = isset($_GET['language_import']) && $_GET['language_import'] != NULL ? $_GET['language_import'] : $_POST['language_import'];
                 $type = isset($_GET['import_type']) && $_GET['import_type'] != NULL ? $_GET['import_type'] : $_POST['import_type'];
                 try {
                     lC_Languages_Admin::import($lang, $type);
                 } catch (Exception $e) {
                     $_SESSION['error'] = true;
                     $_SESSION['errmsg'] = $lC_Language->get('ms_error_action_not_performed');
                 }
                 break;
             case 'export':
                 lC_Languages_Admin::export($_GET['lid'], $_POST['groups'], isset($_POST['include_data']) && $_POST['include_data'] == 'on');
                 break;
         }
     }
 }
예제 #22
0
 public function initialize()
 {
     global $lC_Database, $lC_Cache, $lC_Language, $lC_Currencies, $lC_Image, $current_category_id;
     $data = array();
     if ($lC_Cache->isEnabled() && MODULE_CONTENT_NEW_PRODUCTS_CACHE > 0 && $lC_Cache->read('new_products-' . $lC_Language->getCode() . '-' . $lC_Currencies->getCode() . '-' . $current_category_id, MODULE_CONTENT_NEW_PRODUCTS_CACHE)) {
         $data = $lC_Cache->getCache();
     } else {
         if ($current_category_id < 1) {
             $Qproducts = $lC_Database->query('select products_id from :table_products where products_status = :products_status and parent_id = :parent_id order by products_date_added desc limit :max_display_new_products');
         } else {
             $Qproducts = $lC_Database->query('select distinct p2c.products_id from :table_products p, :table_products_to_categories p2c, :table_categories c where c.parent_id = :category_parent_id and c.categories_id = p2c.categories_id and p2c.products_id = p.products_id and p.products_status = :products_status and p.parent_id = :parent_id order by p.products_date_added desc limit :max_display_new_products');
             $Qproducts->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES);
             $Qproducts->bindTable(':table_categories', TABLE_CATEGORIES);
             $Qproducts->bindInt(':category_parent_id', $current_category_id);
         }
         $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);
         $Qproducts->bindInt(':products_status', 1);
         $Qproducts->bindInt(':parent_id', 0);
         $Qproducts->bindInt(':max_display_new_products', MAX_DISPLAY_PRODUCTS_NEW);
         $Qproducts->execute();
         while ($Qproducts->next()) {
             // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
             $lC_Product = new lC_Product($Qproducts->valueInt('products_id'));
             $data[$lC_Product->getID()] = $lC_Product->getData();
             $data[$lC_Product->getID()]['display_price'] = $lC_Product->getPriceFormated(true);
             $data[$lC_Product->getID()]['display_image'] = $lC_Product->getImage();
         }
         if ($lC_Cache->isEnabled()) {
             $lC_Cache->write($data);
         }
     }
     if (!empty($data)) {
         $this->_content = '';
         foreach ($data as $product) {
             $this->_content .= '<div class="content-new-products-container">' . "\n";
             $this->_content .= '  <div class="content-new-products-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $product['keyword']), $lC_Image->show($product['display_image'], $product['name'], 'class="content-new-products-image-src"')) . '</div>' . "\n" . '  <div class="content-new-products-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $product['keyword']), $product['name']) . '</div>' . "\n" . '  <div class="content-new-products-desc">' . (strlen(lc_clean_html($product['description'])) > 65 ? substr(lc_clean_html($product['description']), 0, 62) . '...' : lc_clean_html($product['description'])) . '</div>' . "\n" . '  <div class="content-new-products-price pricing-row">' . $product['display_price'] . '</div>' . "\n" . '  <div class="content-new-products-button pricing-row buy-btn-div"><button class="content-new-products-add-button" onclick="window.location.href=\'' . lc_href_link(FILENAME_PRODUCTS, $product['keyword'] . '&action=cart_add') . '\'" type="button">' . $lC_Language->get('new_products_button_buy_now') . '</button></div>' . "\n";
             $this->_content .= '</div>' . "\n";
         }
     }
 }
예제 #23
0
 public function initialize()
 {
     global $lC_Language, $lC_Template, $lC_ShoppingCart;
     $steps = array();
     if ($lC_ShoppingCart->getContentType() != 'virtual' || defined('SKIP_CHECKOUT_SHIPPING_PAGE') && SKIP_CHECKOUT_SHIPPING_PAGE == '1') {
         $steps[] = array('title' => $lC_Language->get('box_ordering_steps_delivery'), 'code' => 'shipping', 'active' => $lC_Template->getModule() == 'shipping' || $lC_Template->getModule() == 'shipping_address' ? true : false);
     }
     $steps[] = array('title' => $lC_Language->get('box_ordering_steps_payment'), 'code' => 'payment', 'active' => $lC_Template->getModule() == 'payment' || $lC_Template->getModule() == 'payment_address' ? true : false);
     $steps[] = array('title' => $lC_Language->get('box_ordering_steps_confirmation'), 'code' => 'confirmation', 'active' => $lC_Template->getModule() == 'confirmation' ? true : false);
     $steps[] = array('title' => $lC_Language->get('box_ordering_steps_complete'), 'active' => $lC_Template->getModule() == 'success' ? true : false);
     $content = '';
     $counter = 0;
     foreach ($steps as $step) {
         $counter++;
         if (isset($step['code'])) {
             $content .= '<li class="box-checkout-trail-title">' . lc_link_object(lc_href_link(FILENAME_CHECKOUT, $step['code'], 'SSL'), $step['title']) . '</li>';
         } else {
             $content .= '<li class="box-checkout-trail-title">' . lc_link_object(lc_href_link('#'), $step['title']) . '</li>';
         }
     }
     $this->_content = $content;
 }
예제 #24
0
 public function initialize()
 {
     global $lC_Database, $lC_Services, $lC_Currencies, $lC_Cache, $lC_Language, $lC_Image;
     $this->_title_link = lc_href_link(FILENAME_PRODUCTS, 'specials');
     if ($lC_Services->isStarted('specials')) {
         if ($lC_Cache->isEnabled() && BOX_SPECIALS_CACHE > 0 && $lC_Cache->read('box-specials-' . $lC_Language->getCode() . '-' . $lC_Currencies->getCode(), BOX_SPECIALS_CACHE)) {
             $data = $lC_Cache->getCache();
         } else {
             $Qspecials = $lC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_keyword, s.specials_new_products_price, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd, :table_specials s where s.status = 1 and s.products_id = p.products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by s.specials_date_added desc limit :max_random_select_specials');
             $Qspecials->bindTable(':table_products', TABLE_PRODUCTS);
             $Qspecials->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
             $Qspecials->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
             $Qspecials->bindInt(':default_flag', 1);
             $Qspecials->bindTable(':table_specials', TABLE_SPECIALS);
             $Qspecials->bindInt(':language_id', $lC_Language->getID());
             $Qspecials->bindInt(':max_random_select_specials', BOX_SPECIALS_RANDOM_SELECT);
             $Qspecials->executeRandomMulti();
             $data = array();
             if ($Qspecials->numberOfRows()) {
                 // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
                 $data = $Qspecials->toArray();
                 $data['products_price'] = '<s>' . $lC_Currencies->displayPrice($Qspecials->valueDecimal('products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</s>&nbsp;<span class="box-specials-price">' . $lC_Currencies->displayPrice($Qspecials->valueDecimal('specials_new_products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</span>';
                 if ($lC_Cache->isEnabled()) {
                     $lC_Cache->write($data);
                 }
             }
         }
         if (empty($data) === false) {
             $this->_content = '';
             if (empty($data['image']) === false) {
                 $this->_content = '<li class="box-specials-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $data['products_keyword']), $lC_Image->show($data['image'], $data['products_name'], 'class="box-specials-image-src"')) . '</li>';
             }
             $this->_content .= '<li class="box-specials-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $data['products_keyword']), $data['products_name']) . '</li>';
             $this->_content .= '<li class="box-products-price pricing-row">' . $data['products_price'] . '</li>';
             $this->_content .= '<li class="box-specials-buy-now pricing-row buy-btn-div"><button onclick="window.location.href=\'' . lc_href_link(FILENAME_PRODUCTS, $data['products_keyword'] . '&action=cart_add') . '\'" title="" type="button">' . $lC_Language->get('button_buy_now') . '</button>';
         }
     }
 }
예제 #25
0
 public function initialize()
 {
     global $lC_Database, $lC_Language, $lC_CategoryTree;
     $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 and c.categories_visibility_box = 1 order by sort_order, cd.categories_name');
     $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);
     $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
     $Qcategories->bindInt(':parent_id', 0);
     $Qcategories->bindInt(':language_id', $lC_Language->getID());
     $Qcategories->execute();
     $number_of_categories = $Qcategories->numberOfRows();
     $rows = 0;
     $output = '';
     while ($Qcategories->next()) {
         $url = $Qcategories->value('categories_custom_url') != null ? $Qcategories->value('categories_custom_url') : FILENAME_DEFAULT . '?cPath=' . $lC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'));
         $image = $Qcategories->value('categories_image') != null ? $Qcategories->value('categories_image') : 'no_image.png';
         $output .= '<div class="content-categories-container">' . "\n";
         if (file_exists(DIR_WS_IMAGES . 'categories/' . $image)) {
             $output .= '  <div class="content-categories-image">' . lc_link_object(lc_href_link($url), lc_image(DIR_WS_IMAGES . 'categories/' . $image, $Qcategories->value('categories_name'), null, null, 'class="content-categories-image-src padding-top"')) . '</div>' . "\n";
         }
         $output .= '  <div class="content-categories-name">' . lc_link_object(lc_href_link($url), $Qcategories->value('categories_name')) . '</div>' . "\n" . '</div>' . "\n";
     }
     $this->_content = $output;
 }
예제 #26
0
 public function initialize()
 {
     global $lC_Database, $lC_Language, $lC_Product;
     if (isset($lC_Product) && is_a($lC_Product, 'lC_Product')) {
         $Qmanufacturer = $lC_Database->query('select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from :table_manufacturers m left join :table_manufacturers_info mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id), :table_products p  where p.products_id = :products_id and p.manufacturers_id = m.manufacturers_id');
         $Qmanufacturer->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
         $Qmanufacturer->bindTable(':table_manufacturers_info', TABLE_MANUFACTURERS_INFO);
         $Qmanufacturer->bindTable(':table_products', TABLE_PRODUCTS);
         $Qmanufacturer->bindInt(':languages_id', $lC_Language->getID());
         $Qmanufacturer->bindInt(':products_id', $lC_Product->getID());
         $Qmanufacturer->execute();
         if ($Qmanufacturer->numberOfRows()) {
             $this->_content = '';
             if (!lc_empty($Qmanufacturer->value('manufacturers_image'))) {
                 $this->_content .= '<li class="box-manufacturers-info-image">' . lc_link_object(lc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), lc_image(DIR_WS_IMAGES . 'manufacturers/' . $Qmanufacturer->value('manufacturers_image'), $Qmanufacturer->value('manufacturers_name'))) . '</li>' . "\n";
             }
             if (!lc_empty($Qmanufacturer->value('manufacturers_url'))) {
                 $this->_content .= '<li class="box-manufacturers-info-url">' . lc_link_object(lc_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $Qmanufacturer->valueInt('manufacturers_id')), sprintf($lC_Language->get('box_manufacturer_info_website'), $Qmanufacturer->value('manufacturers_name')), 'target="_blank"') . '</li>' . "\n";
             }
             $this->_content .= '<li class="box-manufacturers-info-link">' . lc_link_object(lc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), $lC_Language->get('box_manufacturer_info_products')) . '</li>' . "\n";
         }
     }
 }
예제 #27
0
 public static function getAll()
 {
     global $lC_Language, $lC_Vqmod;
     $media = $_GET['media'];
     $lC_DirectoryListing = new lC_DirectoryListing('includes/modules/statistics');
     $lC_DirectoryListing->setIncludeDirectories(false);
     $lC_DirectoryListing->setCheckExtension('php');
     $cnt = 0;
     foreach ($lC_DirectoryListing->getFiles() as $file) {
         include $lC_Vqmod->modCheck('includes/modules/statistics/' . $file['name']);
         $class = 'lC_Statistics_' . str_replace(' ', '_', ucwords(str_replace('_', ' ', substr($file['name'], 0, strrpos($file['name'], '.')))));
         if (class_exists($class)) {
             $module = new $class();
             $name = '<td>' . lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, 'statistics&module=' . substr($file['name'], 0, strrpos($file['name'], '.'))), $module->getIcon() . '&nbsp;' . $module->getTitle()) . '</td>';
             $action = '<td class="align-right vertical-center"><span class="button-group">
                  <a href="' . ((int) ($_SESSION['admin']['access']['banner_manager'] < 3) ? '#' : lc_href_link_admin(FILENAME_DEFAULT, 'statistics&module=' . substr($file['name'], 0, strrpos($file['name'], '.')))) . '" class="button icon-gear' . ((int) ($_SESSION['admin']['access']['banner_manager'] < 3) ? ' disabled' : NULL) . '">' . ($media === 'mobile-portrait' || $media === 'mobile-landscape' ? NULL : $lC_Language->get('icon_run')) . '</a>
                </span></td>';
             $result['aaData'][] = array("{$name}", "{$action}");
             $cnt++;
         }
     }
     $result['total'] = $cnt;
     return $result;
 }
예제 #28
0
 public function initialize()
 {
     global $lC_Database, $lC_Currencies, $lC_Language, $lC_Image;
     $this->_title_link = lc_href_link(FILENAME_PRODUCTS, 'featured_products');
     $Qfeatured = $lC_Database->query('select products_id 
                                   from :table_featured_products 
                                  where str_to_date(expires_date, "%Y-%m-%d") >= str_to_date(now(), "%Y-%m-%d") 
                                    and status = 1 
                                  order by rand() 
                                  limit 1');
     $Qfeatured->bindTable(':table_featured_products', TABLE_FEATURED_PRODUCTS);
     $Qfeatured->execute();
     if ($Qfeatured->numberOfRows() > 0) {
         // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
         $lC_Product = new lC_Product($Qfeatured->valueInt('products_id'));
         $this->_content = '';
         if ($lC_Product->hasImage()) {
             $this->_content = '<li class="box-featured-products-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Image->show($lC_Product->getImage(), $lC_Product->getTitle(), 'class="content-featured-products-image-src"')) . '</li>';
         }
         $this->_content .= '<li class="box-featured-products-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Product->getTitle()) . '</li>';
         $this->_content .= '<li class="box-featured-products-price pricing-row">' . $lC_Product->getPriceFormated(true) . '</li>';
         $this->_content .= '<li class="box-featured-products-buy-now pricing-row buy-btn-div"><button onclick="window.location.href=\'' . lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword() . '&action=cart_add') . '\'" type="button">' . $lC_Language->get('button_buy_now') . '</button>';
     }
 }
예제 #29
0
                  <div id="fileUploaderImageContainer" class="small-margin-top">
                    <noscript>
                      <p><?php 
echo $lC_Language->get('ms_error_javascript_not_enabled_for_upload');
?>
</p>
                    </noscript>
                  </div>
                </center>
              </div>
              <div class="new-row-mobile eight-columns twelve-columns-mobile">
                <div id="languageTabs" class="standard-tabs">
                  <ul class="tabs">
                    <?php 
foreach ($lC_Language->getAll() as $l) {
    echo '<li>' . lc_link_object('#languageTabs_' . $l['code'], $lC_Language->showImage($l['code']) . '&nbsp;' . $l['name']) . '</li>';
}
?>
                  </ul>
                  <div class="clearfix tabs-content">
                    <?php 
foreach ($lC_Language->getAll() as $l) {
    ?>
                      <div id="languageTabs_<?php 
    echo $l['code'];
    ?>
" class="with-padding">
                        <p class="button-height block-label">
                          <label class="label" for="<?php 
    echo 'categories_name[' . $l['id'] . ']';
    ?>
예제 #30
0
파일: info.php 프로젝트: rajeshb001/loaded7
?>
</li>
      <li><?php 
echo lc_link_object(lc_href_link(FILENAME_INFO, 'cookie'), $lC_Language->get('info_cookie_usage_heading'));
?>
</li>
      <li><?php 
echo lc_link_object(lc_href_link(FILENAME_INFO, 'ssl_check'), $lC_Language->get('breadcrumb_ssl_check'));
?>
</li>
      <li><?php 
echo lc_link_object(lc_href_link(FILENAME_INFO, 'contact'), $lC_Language->get('text_contact'));
?>
</li>
      <li><?php 
echo lc_link_object(lc_href_link(FILENAME_INFO, 'sitemap'), $lC_Language->get('text_sitemap'));
?>
</li>
    </ul>
    <div class="button-set clearfix">
      <form action="<?php 
echo lc_href_link(FILENAME_PRODUCTS, 'new', 'AUTO');
?>
" method="post"><button onclick="$(this).closest('form').submit();" class="pull-right btn btn-lg btn-primary" type="submit"><?php 
echo $lC_Language->get('button_go_shopping');
?>
</button></form>
    </div>
  </div>
</div>
<!--content/info/info.php end-->