Exemplo n.º 1
0
 public function render()
 {
     $this->_getContext($this->controller);
     $path = get_class($this->controller);
     $file = $this->_parseTemplatePath($path);
     if (!file_exists(APP_TEMPLATE_PATH . DS . $file)) {
         throw new AXION_EXCEPTION('没有找到模板文件');
     }
     foreach ($this->context as $k => $v) {
         $this->templateInstance->assign($k, $v);
     }
     $_str_resultHTML = $this->templateInstance->fetch($file);
     return $_str_resultHTML;
 }
Exemplo n.º 2
0
 /**
  * @param $template
  * @param $ary
  * @return mixed
  */
 public static function genHtml($template, $ary)
 {
     $smarty = new smarty();
     $smarty->settemplatedir(BASE_PATH . '/resources/email/');
     $smarty->setcompiledir(BASE_PATH . '/storage/framework/smarty/compile/');
     $smarty->setcachedir(BASE_PATH . '/storage/framework/smarty/cache/');
     // add config
     $smarty->assign('config', Config::getPublicConfig());
     $smarty->assign('analyticsCode', DbConfig::get('analytics-code'));
     foreach ($ary as $key => $value) {
         $smarty->assign($key, $value);
     }
     return $smarty->fetch($template);
 }
    $box_smarty->assign('UST', $_SESSION['cart']->show_tax());
    $box_smarty->assign('SHIPPING_INFO', SHOW_SHIPPING == 'true' ? $main->getShippingLink() : '');
}
$box_smarty->assign('deny_cart', strpos($PHP_SELF, 'checkout') !== false ? 'true' : 'false');
// no cart at the checkout
$box_smarty->assign('products', $products_in_cart);
$box_smarty->assign('PRODUCTS', $qty);
$box_smarty->assign('empty', $qty > 0 ? 'false' : 'true');
$box_smarty->assign('ACTIVATE_GIFT', ACTIVATE_GIFT_SYSTEM == 'true' ? 'true' : false);
// GV Code
if (isset($_SESSION['customer_id'])) {
    $gv_query = xtc_db_query("-- /templates/" . CURRENT_TEMPLATE . "/source/boxes/shopping_cart.php\n                              SELECT amount\n                                FROM " . TABLE_COUPON_GV_CUSTOMER . "\n                               WHERE customer_id = '" . (int) $_SESSION['customer_id'] . "'");
    $gv_result = xtc_db_fetch_array($gv_query);
    if ($gv_result['amount'] > 0) {
        $box_smarty->assign('GV_AMOUNT', $xtPrice->xtcFormat($gv_result['amount'], true, 0, true));
        $box_smarty->assign('GV_SEND_TO_FRIEND_LINK', '<a href="' . xtc_href_link(FILENAME_GV_SEND) . '">');
    }
    if (isset($_SESSION['gv_id'])) {
        $gv_query = xtc_db_query("-- /templates/" . CURRENT_TEMPLATE . "/source/boxes/shopping_cart.php\n                                SELECT coupon_amount\n                                  FROM " . TABLE_COUPONS . "\n                                 WHERE coupon_id = '" . (int) $_SESSION['gv_id'] . "'");
        $coupon = xtc_db_fetch_array($gv_query);
        $box_smarty->assign('COUPON_AMOUNT2', $xtPrice->xtcFormat($coupon['coupon_amount'], true, 0, true));
    }
    if (isset($_SESSION['cc_id'])) {
        $box_smarty->assign('COUPON_HELP_LINK', '<a target="_blank" class="thickbox" title="Information" href="' . xtc_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $_SESSION['cc_id'] . '&KeepThis=true&TB_iframe=true&height=400&width=600', $request_type) . '">Information</a>');
    }
}
$box_smarty->assign('LINK_CART', xtc_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
$box_smarty->caching = 0;
$box_smarty->assign('language', $_SESSION['language']);
$box_shopping_cart = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_cart.html');
$smarty->assign('box_CART', $box_shopping_cart);
Exemplo n.º 4
0
if (!isset($lng) || !is_object($lng)) {
    //EOF - 2010-02-28 - Fix Undefined variable: lng
    include DIR_WS_CLASSES . 'language.php';
    $lng = new language();
}
$languages_string = '';
$count_lng = '';
reset($lng->catalog_languages);
while (list($key, $value) = each($lng->catalog_languages)) {
    $count_lng++;
    //BOF - Dokuman - 2010-01-29 - code optimization
    //$languages_string .= ' <a href="' . xtc_href_link(basename($PHP_SELF), 'language=' . $key.'&'.xtc_get_all_get_params(array('language', 'currency')), $request_type) . '">' . xtc_image('lang/' .  $value['directory'] .'/' . $value['image'], $value['name']) . '</a> ';
    if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
        $languages_string .= ' <a href="' . xtc_href_link(basename($PHP_SELF), 'language=' . $key . '&' . xtc_get_all_get_params(array('language', 'currency')), $request_type) . '">' . xtc_image('lang/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> ';
    } else {
        $languages_string .= ' <a href="' . xtc_href_link(basename($PHP_SELF), 'language=' . $key . '&amp;' . xtc_get_all_get_params(array('language', 'currency')), $request_type) . '">' . xtc_image('lang/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> ';
    }
    //EOF - Dokuman - 2010-01-29 - code optimization
}
// dont show box if there's only 1 language
if ($count_lng > 1) {
    $box_smarty = new smarty();
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $box_content = '';
    $box_smarty->assign('BOX_CONTENT', $languages_string);
    $box_smarty->assign('language', $_SESSION['language']);
    // set cache ID
    $box_smarty->caching = 0;
    $box_languages = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_languages.html');
    $smarty->assign('box_LANGUAGES', $box_languages);
}
Exemplo n.º 5
0
                break;
            }
        }
    }
    //BOF - DokuMan - 2011-01-21 - Fix a notice when there is no category
    //xtc_show_category($first_element);
    if (!empty($first_element)) {
        xtc_show_category($first_element);
    }
    //BOF - DokuMan - 2011-01-21 - Fix a notice when there is no category
    $box_smarty->assign('BOX_CONTENT', $categories_string);
    //DokuMan - 2010-03-02 - BOX_CONTENT on wrong position
}
// set cache ID
//BOF - DokuMan - 2010-02-28 - fix Smarty cache error on unlink
/*
if (!$cache || $rebuild) {
  $box_smarty->assign('BOX_CONTENT', $categories_string);
  if ($rebuild) $box_smarty->clear_cache(CURRENT_TEMPLATE.'/boxes/box_categories.html', $cache_id);
  $box_categories = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_categories.html',$cache_id);
} else {
  $box_categories = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_categories.html', $cache_id);
}
*/
if (!$cache) {
    $box_categories = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_categories.html');
} else {
    $box_categories = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_categories.html', $cache_id);
}
//EOF - DokuMan - 2010-02-28 - fix Smarty cache error on unlink
$smarty->assign('box_CATEGORIES', $box_categories);
   http://www.xt-commerce.com

   Copyright (c) 2003 XT-Commerce
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(add_a_quickie.php,v 1.10 2001/12/19); www.oscommerce.com 

   Released under the GNU General Public License 
   -----------------------------------------------------------------------------------------
   Third Party contribution:
   Add A Quickie v1.0 Autor  Harald Ponce de Leon
    
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
// reset var
$box_smarty = new smarty();
$box_content = '';
$box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
// BOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL
$box_smarty->assign('FORM_ACTION', '<form id="quick_add" method="post" action="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=add_a_quickie', $request_type) . '">');
//$box_smarty->assign('FORM_ACTION','<form id="quick_add" method="post" action="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array ('action')) . 'action=add_a_quickie', 'NONSSL') . '">');
// EOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL
$box_smarty->assign('INPUT_FIELD', xtc_draw_input_field('quickie', '', 'style="width:170px"'));
$box_smarty->assign('SUBMIT_BUTTON', xtc_image_submit('button_add_quick.gif', BOX_HEADING_ADD_PRODUCT_ID));
$box_smarty->assign('FORM_END', '</form>');
$box_smarty->assign('BOX_CONTENT', $box_content);
$box_smarty->assign('language', $_SESSION['language']);
$box_smarty->caching = 0;
$box_add_a_quickie = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_add_a_quickie.html');
$smarty->assign('box_ADD_QUICKIE', $box_add_a_quickie);
Exemplo n.º 7
0
 function prepare_wsdl_data($savefile = false)
 {
     $smarty = new smarty();
     $smarty->compile_dir = find_best_location_in_include_path("templates_c");
     $smarty->assign('WS_SERVICE_NAMESPACE', SW_SOAP_NAMESPACE);
     $smarty->assign('WS_SERVICE_CODE', SW_SOAP_SERVICECODE);
     $smarty->assign('WS_SERVICE_NAME', SW_SOAP_SERVICENAME);
     $smarty->assign('WS_SERVICE_URL', SW_SOAP_SERVICEURL);
     $smarty->debugging = true;
     $cols = array();
     $cols[] = array("name" => "ReportName", "type" => "char", "length" => 0);
     foreach ($this->query->columns as $col) {
         $cols[] = array("name" => $col->query_name, "type" => $col->column_type, "length" => $col->column_length);
     }
     $smarty->assign("COLUMN_ITEMS", $cols);
     $crits = array();
     foreach ($this->query->lookup_queries as $lq) {
         $crits[] = array("name" => $lq->query_name);
     }
     $smarty->assign("CRITERIA_ITEMS", $crits);
     header('Content-Type: text/xml');
     if ($savefile) {
         $data = $smarty->fetch('wsdl.tpl', null, null, false);
         $this->write_report_file($savefile, $data);
     } else {
         $smarty->display('wsdl.tpl');
     }
 }
Exemplo n.º 8
0
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
$box_smarty = new smarty();
$box_content = '';
$box_smarty->assign('tpl_path', DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/');
if (isset($_SESSION['affiliate_id'])) {
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_SUMMARY, '', 'SSL') . '">' . BOX_AFFILIATE_SUMMARY . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_ACCOUNT, '', 'SSL') . '">' . BOX_AFFILIATE_ACCOUNT . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_PAYMENT, '', 'SSL') . '">' . BOX_AFFILIATE_PAYMENT . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_CLICKS, '', 'SSL') . '">' . BOX_AFFILIATE_CLICKRATE . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_SALES, '', 'SSL') . '">' . BOX_AFFILIATE_SALES . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_BANNERS) . '">' . BOX_AFFILIATE_BANNERS . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_CONTACT) . '">' . BOX_AFFILIATE_CONTACT . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_CONTENT, 'coID=902') . '">' . BOX_AFFILIATE_FAQ . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE_LOGOUT) . '">' . BOX_AFFILIATE_LOGOUT . '</a>';
} else {
    $box_content .= '<a href="' . xtc_href_link(FILENAME_CONTENT, 'coID=901') . '">' . BOX_AFFILIATE_INFO . '</a><br>';
    $box_content .= '<a href="' . xtc_href_link(FILENAME_AFFILIATE, '', 'SSL') . '">' . BOX_AFFILIATE_LOGIN . '</a>';
}
//$box_smarty->assign('BOX_TITLE', BOX_HEADING_ADD_PRODUCT_ID);
$box_smarty->assign('BOX_CONTENT', $box_content);
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
$box_smarty->caching = 0;
$box_affiliate = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_affiliate.html');
$smarty->assign('box_AFFILIATE', $box_affiliate);
Exemplo n.º 9
0
    //web28 - 2010-06-23 change unnecessary SSL to NONSSL
}
$orders_contents = substr($orders_contents, 0, -6);
$customers_query = xtc_db_query("select count(*) as count from " . TABLE_CUSTOMERS);
$customers = xtc_db_fetch_array($customers_query);
$products_query = xtc_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'");
$products = xtc_db_fetch_array($products_query);
$reviews_query = xtc_db_query("select count(*) as count from " . TABLE_REVIEWS);
$reviews = xtc_db_fetch_array($reviews_query);
$admin_image = '<a href="' . xtc_href_link_admin(FILENAME_START, '', 'NONSSL') . '">' . xtc_image_button('button_admin.gif', IMAGE_BUTTON_ADMIN) . '</a>';
//web28 - 2010-06-23 change unnecessary SSL to NONSSL
if ($product->isProduct()) {
    $admin_link = '<a href="' . xtc_href_link_admin(FILENAME_EDIT_PRODUCTS, 'cPath=' . $cPath . '&amp;pID=' . $product->data['products_id']) . '&amp;action=new_product' . '" onclick="window.open(this.href); return false;">' . xtc_image_button('edit_product.gif', IMAGE_BUTTON_PRODUCT_EDIT) . '</a>';
} else {
    $admin_link = '';
    //DokuMan  - 2010-03-23 - set undefinded variable
}
$box_content = '<strong>' . BOX_TITLE_STATISTICS . '</strong><br />' . $orders_contents . '<br />' . BOX_ENTRY_CUSTOMERS . ' ' . $customers['count'] . '<br />' . BOX_ENTRY_PRODUCTS . ' ' . $products['count'] . '<br />' . BOX_ENTRY_REVIEWS . ' ' . $reviews['count'] . '<br />' . $admin_image . '<br />' . $admin_link;
$box_content = '';
$box_content .= '<li><a href="' . xtc_href_link_admin(FILENAME_START, '', 'NONSSL') . '">' . IMAGE_BUTTON_ADMIN . '</a></li>';
if ($product->isProduct()) {
    $box_content .= '<li><a href="' . xtc_href_link_admin(FILENAME_EDIT_PRODUCTS, 'cPath=' . $cPath . '&amp;pID=' . $product->data['products_id']) . '&amp;action=new_product' . '" onclick="window.open(this.href); return false;">' . IMAGE_BUTTON_PRODUCT_EDIT . '</a></li>';
}
if ($flag == true) {
    define('SEARCH_ENGINE_FRIENDLY_URLS', true);
}
$box_smarty->assign('BOX_CONTENT', $box_content);
$box_smarty->caching = 0;
$box_smarty->assign('language', $_SESSION['language']);
$box_admin = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_admin.html');
$smarty->assign('box_ADMIN', $box_admin);
Exemplo n.º 10
0
    // get category name
    $categories_query = xtDBquery("select
    			                                        cd.categories_name
    			                                        from ".TABLE_CATEGORIES_DESCRIPTION." cd,
    			                                        ".TABLE_CATEGORIES." c,
    			                                         " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    			                                        WHERE c.categories_id=cd.categories_id
    			                                        and p2c.products_id = '".(int) $_SESSION['tracking']['products_history'][$random_last_viewed]."'
    			                                        and cd.language_id='".(int) $_SESSION['languages_id']."'");
    $categories_data = xtc_db_fetch_array($categories_query,true);
    */
    //EOF - Dokuman - 2010-01-29 - category name selection included in one select statement
    $random_products_price = $xtPrice->xtcGetPrice($random_product['products_id'], $format = true, 1, $random_product['products_tax_class_id'], $random_product['products_price']);
    $category_path = xtc_get_path($random_product['categories_id']);
    if ($random_product['products_name'] != '') {
        $box_smarty->assign('box_content', $product->buildDataArray($random_product));
        $box_smarty->assign('MY_PAGE', 'TEXT_MY_PAGE');
        $box_smarty->assign('WATCH_CATGORY', 'TEXT_WATCH_CATEGORY');
        $box_smarty->assign('MY_PERSONAL_PAGE', xtc_href_link(FILENAME_ACCOUNT));
        //BOF - Dokuman - 2010-01-29 - category name selection included in one select statement
        //$box_smarty->assign('CATEGORY_LINK', xtc_href_link(FILENAME_DEFAULT, xtc_category_link($categories_data['categories_id'], $categories_data['categories_name'])));
        //$box_smarty->assign('CATEGORY_NAME', $categories_data['categories_name']);
        $box_smarty->assign('CATEGORY_LINK', xtc_href_link(FILENAME_DEFAULT, xtc_category_link($random_product['categories_id'], $random_product['categories_name'])));
        $box_smarty->assign('CATEGORY_NAME', $random_product['categories_name']);
        //BOF - Dokuman - 2010-01-29 - category name selection included in one select statement
        $box_smarty->assign('language', $_SESSION['language']);
        $box_smarty->caching = 0;
        $box_last_viewed = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_last_viewed.html');
        $smarty->assign('box_LAST_VIEWED', $box_last_viewed);
    }
}
Exemplo n.º 11
0
// include functions
require_once DIR_FS_INC . 'xtc_hide_session_id.inc.php';
if (isset($xtPrice) && is_object($xtPrice)) {
    $count_cur = '';
    reset($xtPrice->currencies);
    $currencies_array = array();
    while (list($key, $value) = each($xtPrice->currencies)) {
        $count_cur++;
        $currencies_array[] = array('id' => $key, 'text' => $value['title']);
    }
    $hidden_get_variables = '';
    reset($_GET);
    while (list($key, $value) = each($_GET)) {
        if ($key != 'currency' && $key != xtc_session_name() && $key != 'x' && $key != 'y') {
            $hidden_get_variables .= xtc_draw_hidden_field($key, $value);
        }
    }
}
// dont show box if there's only 1 currency
if ($count_cur > 1) {
    // reset var
    $box_smarty = new smarty();
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $box_content = '';
    $box_content = xtc_draw_form('currencies', xtc_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . xtc_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . xtc_hide_session_id() . '</form>';
    $box_smarty->assign('BOX_CONTENT', $box_content);
    $box_smarty->assign('language', $_SESSION['language']);
    $box_smarty->caching = 0;
    $box_currencies = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_currencies.html');
    $smarty->assign('box_CURRENCIES', $box_currencies);
}
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
$box_smarty = new smarty();
$box_content = '';
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . (isset($_GET['manufacturers_id']) ? (int) $_GET['manufacturers_id'] : 0);
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_content_templatebox1.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $content_manager_qry = xtDBquery("SELECT content_title, content_heading, content_text FROM " . TABLE_CONTENT_MANAGER . " WHERE content_group = '12' AND languages_id = '" . $_SESSION["languages_id"] . "'");
    $content_manager_ary = xtc_db_fetch_array($content_manager_qry);
    $box_smarty->assign('BOX_TITLE', !empty($content_manager_ary["content_heading"]) ? $content_manager_ary["content_heading"] : $content_manager_ary["content_title"]);
    $box_smarty->assign('BOX_CONTENT', $content_manager_ary["content_text"]);
}
// set cache ID
if (!$cache) {
    $box_content_templatebox1 = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_content_templatebox1.html');
} else {
    $box_content_templatebox1 = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_content_templatebox1.html', $cache_id);
}
$smarty->assign('box_CONTENT_TEMPLATEBOX1', $box_content_templatebox1);
Exemplo n.º 13
0
$box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$box_content = '';
// include needed functions
require_once DIR_FS_INC . 'xtc_random_select.inc.php';
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
    $fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
    $group_check = " and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
if ($random_product = xtc_random_select("select\n                                           p.products_id,\n                                           pd.products_name,\n                                           p.products_price,\n                                           p.products_tax_class_id,\n                                           p.products_image,\n                                           s.expires_date,\n                                           p.products_vpe,\n\t\t\t\t                           p.products_vpe_status,\n\t\t\t\t                           p.products_vpe_value,\n                                           s.specials_new_products_price\n                                           from " . TABLE_PRODUCTS . " p,\n                                           " . TABLE_PRODUCTS_DESCRIPTION . " pd,\n                                           " . TABLE_SPECIALS . " s where p.products_status = '1'\n                                           and p.products_id = s.products_id\n                                           and pd.products_id = s.products_id\n                                           and pd.language_id = '" . $_SESSION['languages_id'] . "'\n                                           and s.status = '1'\n                                           " . $group_check . "\n                                           " . $fsk_lock . "                                             \n                                           order by s.specials_date_added\n                                           desc limit " . MAX_RANDOM_SELECT_SPECIALS)) {
    $box_smarty->assign('box_content', $product->buildDataArray($random_product));
    $box_smarty->assign('SPECIALS_LINK', xtc_href_link(FILENAME_SPECIALS));
    $box_smarty->assign('language', $_SESSION['language']);
    if ($random_product["products_id"] != '') {
        // set cache ID
        if (!CacheCheck()) {
            $box_smarty->caching = 0;
            $box_specials = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_specials.html');
        } else {
            $box_smarty->caching = 1;
            $box_smarty->cache_lifetime = CACHE_LIFETIME;
            $box_smarty->cache_modified_check = CACHE_CHECK;
            $cache_id = $_SESSION['language'] . $random_product["products_id"] . $_SESSION['customers_status']['customers_status_name'];
            $box_specials = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_specials.html', $cache_id);
        }
        $smarty->assign('box_SPECIALS', $box_specials);
    }
}
Exemplo n.º 14
0
    $review = xtc_db_fetch_array($review_query, true);
    $review = encode_htmlspecialchars($review['reviews_text']);
    $review = xtc_break_string($review, 15, '-<br />');
    //BOF - Dokuman - 2010-01-29 - show review stars in box
    //$box_content = '<div align="center" class="bewert"><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . xtc_image(DIR_WS_THUMBNAIL_IMAGES . $random_product['products_image'], $random_product['products_name']) . '</a></div><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $review . ' ..</a><br />';
    $box_content = '<div align="center" class="bewert"><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&amp;reviews_id=' . $random_product['reviews_id']) . '">' . xtc_image(DIR_WS_THUMBNAIL_IMAGES . $random_product['products_image'], $random_product['products_name']) . '</a></div><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&amp;reviews_id=' . $random_product['reviews_id']) . '">' . $review . ' ..</a><br /><div align="center">' . xtc_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $random_product['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>';
    //EOF - Dokuman - 2010-01-29 - show review stars in box
} elseif ($product->isProduct()) {
    // Verhindern das Gäste oder Spamer bewerten können. www.aranowa.de
    if (isset($_SESSION['customer_id'])) {
        // display 'write a review' box
        $box_content = '<table border="0" cellspacing="0" cellpadding="2"><tr><td align="left" class="infoBoxContents"><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, xtc_product_link($product->data['products_id'], $product->data['products_name'])) . '">' . BOX_REVIEWS_WRITE_REVIEW . '</a></td></tr></table>';
    }
}
if ($box_content != '') {
    $box_smarty->assign('REVIEWS_LINK', xtc_href_link(FILENAME_REVIEWS));
    $box_smarty->assign('BOX_CONTENT', $box_content);
    $box_smarty->assign('language', $_SESSION['language']);
    // set cache ID
    if (!CacheCheck()) {
        $box_smarty->caching = 0;
        $box_reviews = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_reviews.html');
    } else {
        $box_smarty->caching = 1;
        $box_smarty->cache_lifetime = CACHE_LIFETIME;
        $box_smarty->cache_modified_check = CACHE_CHECK;
        $cache_id = $_SESSION['language'] . $random_product['reviews_id'] . $product->data['products_id'] . $_SESSION['language'];
        $box_reviews = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_reviews.html', $cache_id);
    }
    $smarty->assign('box_REVIEWS', $box_reviews);
}
Exemplo n.º 15
0
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_content.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    //$rebuild = true; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
    if (GROUP_CHECK == 'true') {
        $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
    }
    $content_query = "SELECT\n\t \t\t\t\t\tcontent_id,\n\t \t\t\t\t\tcategories_id,\n\t \t\t\t\t\tparent_id,\n\t \t\t\t\t\tcontent_title,\n\t \t\t\t\t\tcontent_group\n\t \t\t\t\t\tFROM " . TABLE_CONTENT_MANAGER . "\n\t \t\t\t\t\tWHERE languages_id='" . (int) $_SESSION['languages_id'] . "'\n\t \t\t\t\t\tand file_flag=1 " . $group_check . " and content_status=1 order by sort_order";
    $content_query = xtDBquery($content_query);
    $content_string = '<ul class="list-unstyled">';
    while ($content_data = xtc_db_fetch_array($content_query, true)) {
        $SEF_parameter = '';
        if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
            $SEF_parameter = '&content=' . xtc_cleanName($content_data['content_title']);
        }
        $content_string .= '<li><a href="' . xtc_href_link(FILENAME_CONTENT, 'coID=' . $content_data['content_group'] . $SEF_parameter) . '">' . $content_data['content_title'] . '</a></li>';
    }
    if ($content_string != '') {
        $content_string .= '</ul>';
        $box_smarty->assign('BOX_CONTENT', $content_string);
    }
}
//BOF - DokuMan - 2010-02-28 - fix Smarty cache error on unlink
//if ($rebuild) $box_smarty->clear_cache(CURRENT_TEMPLATE.'/boxes/box_content.html', $cache_id);
//$box_content = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_content.html',$cache_id);
if (!$cache) {
    $box_content = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_content.html');
} else {
    $box_content = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_content.html', $cache_id);
}
//EOF - DokuMan - 2010-02-28 - fix Smarty cache error on unlink
$smarty->assign('box_CONTENT', $box_content);
 * $Id: sofort_vorkasse.php 3773 2012-10-10 14:51:44Z gtb-modified $
 */
require_once DIR_FS_CATALOG . 'callback/sofort/helperFunctions.php';
include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/sofort_sofortvorkasse.php';
// create module_smarty elements
$module_smarty = new smarty();
// include boxes
require_once DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
$module_smarty->assign('TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_TEXT);
$module_smarty->assign('HOLDER', HelperFunctions::htmlMask($_GET['holder']));
$module_smarty->assign('HOLDER_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_HOLDER_TEXT);
$module_smarty->assign('ACCOUNT_NUMBER', HelperFunctions::htmlMask($_GET['account_number']));
$module_smarty->assign('ACCOUNT_NUMBER_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_ACCOUNT_NUMBER_TEXT);
$module_smarty->assign('IBAN', HelperFunctions::htmlMask($_GET['iban']));
$module_smarty->assign('IBAN_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_IBAN_TEXT);
$module_smarty->assign('BANK_CODE', HelperFunctions::htmlMask($_GET['bank_code']));
$module_smarty->assign('BANK_CODE_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_BANK_CODE_TEXT);
$module_smarty->assign('BIC', HelperFunctions::htmlMask($_GET['bic']));
$module_smarty->assign('BIC_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_BIC_TEXT);
$module_smarty->assign('AMOUNT', number_format(HelperFunctions::htmlMask($_GET['amount']), 2, ',', '.') . ' &euro;');
$module_smarty->assign('AMOUNT_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_AMOUNT_TEXT);
$module_smarty->assign('REASON_1', HelperFunctions::htmlMask($_GET['reason_1']));
$module_smarty->assign('REASON_1_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_REASON_1_TEXT);
$module_smarty->assign('REASON_2', HelperFunctions::htmlMask($_GET['reason_2']));
$module_smarty->assign('REASON_2_TEXT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_REASON_2_TEXT);
$module_smarty->assign('REASONS_HINT', MODULE_PAYMENT_SOFORT_SV_CHECKOUT_REASON_HINT);
$module_smarty->assign('language', $_SESSION['language']);
$module_smarty->caching = 0;
$module = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/sofort_vorkasse.html');
$smarty->assign('MODULE_sofort_vorkasse', $module);
unset($_SESSION['sofort']['sofort_transaction']);
Exemplo n.º 17
0
$box_smarty->assign('tpl_path', DIR_WS_BASE . 'templates/' . CURRENT_TEMPLATE . '/');
// include needed functions
require_once DIR_FS_INC . 'xtc_random_select.inc.php';
// query restrictions
$fsk_lock = $_SESSION['customers_status']['customers_fsk18_display'] == '0' ? 'AND p.products_fsk18 != 1' : '';
$group_check = GROUP_CHECK == 'true' ? 'AND p.group_permission_' . $_SESSION['customers_status']['customers_status_id'] . ' = 1' : '';
$current_prd = isset($_GET['products_id']) && (int) $_GET['products_id'] > 0 ? 'AND p.products_id != ' . (int) $_GET['products_id'] : '';
if (MAX_DISPLAY_NEW_PRODUCTS_DAYS != '0') {
    $days = "AND p.products_date_added > '" . date("Y.m.d", mktime(1, 1, 1, date("m"), date("d") - MAX_DISPLAY_NEW_PRODUCTS_DAYS, date("Y"))) . "'";
} else {
    $days = '';
}
// get random product data
if ($random_product = xtc_random_select("-- templates/xtc5/source/boxes/whats_new.php\n                                        SELECT distinct\n                                              p.products_id,\n                                              p.products_image,                                              \n                                              p.products_tax_class_id,\n                                              p.products_vpe,\n                                              p.products_vpe_status,\n                                              p.products_vpe_value,\n                                              p.products_price,\n                                              pd.products_name\n                                         FROM " . TABLE_PRODUCTS . " p\n                                    LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd \n                                           ON (p.products_id = pd.products_id AND pd.language_id = '" . (int) $_SESSION['languages_id'] . "' AND pd.products_name != '')\n                                    LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n                                           ON p.products_id = p2c.products_id\n                                    LEFT JOIN " . TABLE_CATEGORIES . " c\n                                           ON c.categories_id = p2c.categories_id AND c.categories_status = 1\n                                        WHERE p.products_status = 1\n                                          " . $fsk_lock . "\n                                          " . $group_check . "\n                                          " . $current_prd . "\n                                          " . $days . "                                           \n                                     ORDER BY p.products_date_added desc\n                                        LIMIT " . MAX_RANDOM_SELECT_NEW)) {
    $whats_new_price = $xtPrice->xtcGetPrice($random_product['products_id'], $format = true, 1, $random_product['products_tax_class_id'], $random_product['products_price']);
    $box_smarty->assign('box_content', $product->buildDataArray($random_product));
    $box_smarty->assign('LINK_NEW_PRODUCTS', xtc_href_link(FILENAME_PRODUCTS_NEW));
    $box_smarty->assign('language', $_SESSION['language']);
    // set cache ID
    if (!CacheCheck()) {
        $box_smarty->caching = 0;
        $box_whats_new = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_whatsnew.html');
    } else {
        $box_smarty->caching = 1;
        $box_smarty->cache_lifetime = CACHE_LIFETIME;
        $box_smarty->cache_modified_check = CACHE_CHECK;
        $cache_id = $_SESSION['language'] . $random_product['products_id'] . $_SESSION['customers_status']['customers_status_name'];
        $box_whats_new = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_whatsnew.html', $cache_id);
    }
    $smarty->assign('box_WHATSNEW', $box_whats_new);
}
Exemplo n.º 18
0
        }
        $box_smarty->assign('box_content', $box_content);
    }
    //BOF - DokuMan - 2010-07-12 - fix Smarty cache error on unlink
    // set cache ID
    /*
     if (!$cache || $rebuild) {
      if (count($box_content)>0) {
        if ($rebuild)  $box_smarty->clear_cache(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html', $cache_id);
        $box_best_sellers = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html',$cache_id);
        $smarty->assign('box_BESTSELLERS', $box_best_sellers);
      }
    } else {
      $box_best_sellers = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html', $cache_id);
      $smarty->assign('box_BESTSELLERS', $box_best_sellers);
    }
    */
    if (count($box_content) > 0) {
        $box_best_sellers = '';
        // set cache ID
        if (!$cache) {
            if ($box_content != '') {
                $box_best_sellers = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_best_sellers.html');
            }
        } else {
            $box_best_sellers = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_best_sellers.html', $cache_id);
        }
        $smarty->assign('box_BESTSELLERS', $box_best_sellers);
    }
}
//EOF - DokuMan - 2010-07-12 - fix Smarty cache error on unlink
Exemplo n.º 19
0
                $url = xtc_href_link($imagesliders_data['imagesliders_url']);
            } elseif ($imagesliders_data['imagesliders_url_typ'] == '2') {
                $url = xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link((int) $imagesliders_data['imagesliders_url'], xtc_get_products_name((int) $imagesliders_data['imagesliders_url'])));
            } elseif ($imagesliders_data['imagesliders_url_typ'] == '3') {
                $url = xtc_href_link(FILENAME_DEFAULT, xtc_category_link((int) $imagesliders_data['imagesliders_url'], xtc_get_categories_name((int) $imagesliders_data['imagesliders_url'])));
            } elseif ($imagesliders_data['imagesliders_url_typ'] == '4') {
                $content_querys = "SELECT content_title FROM " . TABLE_CONTENT_MANAGER . " WHERE languages_id='" . (int) $_SESSION['languages_id'] . "' and content_group = '" . (int) $imagesliders_data['imagesliders_url'] . "' and content_status=1 order by sort_order";
                $content_querys = xtDBquery($content_querys);
                $content_title = xtc_db_fetch_array($content_querys, true);
                $SEF = '';
                if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
                    $SEF = '&content=' . xtc_cleanName($content_title['content_title']);
                }
                $url = xtc_href_link(FILENAME_CONTENT, 'coID=' . (int) $imagesliders_data['imagesliders_url'] . $SEF);
            }
        }
        $imagesliders_data['imagesliders_image_url'] = DIR_WS_IMAGES . $imagesliders_data['imagesliders_image'];
        $imagesliders_data['imagesliders_image_url_link'] = $url;
        $imagesliders_data['imagesliders_image_url_target'] = $target;
        $imagesliders_array[] = $imagesliders_data;
    }
    if (count($imagesliders_array) > 0) {
        $box_smarty->assign('BOX_IMAGESLIDER_ARRAY', $imagesliders_array);
    }
}
if (!$cache) {
    $box_imagesliders = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_imagesliders.html');
} else {
    $box_imagesliders = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_imagesliders.html', $cache_id);
}
$smarty->assign('box_IMAGESLIDER', $box_imagesliders);
Exemplo n.º 20
0
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(search.php,v 1.22 2003/02/10); www.oscommerce.com 
   (c) 2003	 nextcommerce (search.php,v 1.9 2003/08/17); www.nextcommerce.org

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box_smarty = new smarty();
$box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$box_content = '';
require_once DIR_FS_INC . 'xtc_image_submit.inc.php';
require_once DIR_FS_INC . 'xtc_hide_session_id.inc.php';
// BOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL
$box_smarty->assign('FORM_ACTION', xtc_draw_form('quick_find', xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get') . xtc_hide_session_id());
//$box_smarty->assign('FORM_ACTION', xtc_draw_form('quick_find', xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . xtc_hide_session_id());
// BOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL
//BOF - Dokuman - 14.08.2009 - Put dynamic "search"-text into box
//$box_smarty->assign('INPUT_SEARCH', xtc_draw_input_field('keywords', '', 'size="20" maxlength="30"'));
//BOF - web28 - 2010-04-11 - change input html size to css width
//$box_smarty->assign('INPUT_SEARCH', xtc_draw_input_field('keywords', IMAGE_BUTTON_SEARCH, 'size="20" maxlength="30" onfocus="if(this.value==this.defaultValue) this.value=\'\';" onblur="if(this.value==\'\') this.value=this.defaultValue;"'));
$box_smarty->assign('INPUT_SEARCH', xtc_draw_input_field('keywords', '', 'placeholder="' . IMAGE_BUTTON_SEARCH . '" class="form-control"'));
//EOF - web28 - 2010-04-11 - change input html size to css width
//EOF - Dokuman - 14.08.2009 - Put dynamic "search"-text into box
$box_smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_quick_find.gif', IMAGE_BUTTON_SEARCH));
$box_smarty->assign('FORM_END', '</form>');
$box_smarty->assign('LINK_ADVANCED', xtc_href_link(FILENAME_ADVANCED_SEARCH));
$box_smarty->assign('BOX_CONTENT', $box_content);
$box_smarty->assign('language', $_SESSION['language']);
$box_smarty->caching = 0;
$box_search = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_search.html');
$smarty->assign('box_SEARCH', $box_search);
Exemplo n.º 21
0
$smarty->right_delimiter = '}>';
$pagedata = array('_PAGE_' => (isset($_GET['act']) ? $_GET['act'] : 'dashboard') . '.html');
ob_start();
error_reporting(E_ALL);
$pagedata['nav'][] = array('label' => 'link_' . __LINE__, 'link' => 'page.php?act=test&p[0]=' . __LINE__);
$pagedata['nav'][] = array('label' => 'link_' . __LINE__, 'link' => 'page.php?act=test&p[0]=' . __LINE__);
$pagedata['nav'][] = array('label' => 'link_' . __LINE__, 'link' => 'page.php?act=test&p[0]=' . __LINE__);
$pagedata['nav'][] = array('label' => 'link_' . __LINE__, 'link' => 'page.php?act=test&p[0]=' . __LINE__);
$pagedata['nav'][] = array('label' => 'link_' . __LINE__, 'link' => 'page.php?act=test&p[0]=' . __LINE__);
if (count($pagedata['nav']) > 2) {
    $pagedata['_top_nav'] = $pagedata['nav'][count($pagedata['nav']) - 2];
}
foreach ($pagedata as $k => $v) {
    $smarty->assign($k, $v);
}
if (isset($_GET['_ajax'])) {
    $content = $smarty->fetch('page.html');
} else {
    $content = $smarty->fetch('singlepage.html');
}
$etag = md5($content);
header('Etag: ' . $etag);
//header("Cache-Control: no-cache, must-revalidate"); // 强制更新
//header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
//header("Pragma: no-cache");
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {
    header('HTTP/1.1 304 Not Modified', true, 304);
    exit(0);
} else {
    echo $content;
}
Exemplo n.º 22
0
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_information.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    //$rebuild = true; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
    if (GROUP_CHECK == 'true') {
        $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
    }
    $content_query = "SELECT\n\t \t\t\t\t\tcontent_id,\n\t \t\t\t\t\tcategories_id,\n\t \t\t\t\t\tparent_id,\n\t \t\t\t\t\tcontent_title,\n\t \t\t\t\t\tcontent_group\n\t \t\t\t\t\tFROM " . TABLE_CONTENT_MANAGER . "\n\t \t\t\t\t\tWHERE languages_id='" . (int) $_SESSION['languages_id'] . "'\n\t \t\t\t\t\tand file_flag=0 " . $group_check . " and content_status=1 order by sort_order";
    $content_query = xtDBquery($content_query);
    $content_string = '<ul class="list-unstyled">';
    while ($content_data = xtc_db_fetch_array($content_query, true)) {
        $SEF_parameter = '';
        if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
            $SEF_parameter = '&product=' . xtc_cleanName($content_data['content_title']);
        }
        $content_string .= '<li><a href="' . xtc_href_link(FILENAME_CONTENT, 'coID=' . $content_data['content_group'] . $SEF_parameter) . '">' . $content_data['content_title'] . '</a></li>';
    }
    if ($content_string != '') {
        $content_string .= '</ul>';
        $box_smarty->assign('BOX_CONTENT', $content_string);
    }
}
//BOF - DokuMan - 2010-02-28 - fix Smarty cache error on unlink
//if ($rebuild) $box_smarty->clear_cache(CURRENT_TEMPLATE.'/boxes/box_information.html', $cache_id);
//$box_information = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_information.html',$cache_id);
if (!$cache) {
    $box_information = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_information.html');
} else {
    $box_information = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_information.html', $cache_id);
}
//EOF - DokuMan - 2010-02-28 - fix Smarty cache error on unlink
$smarty->assign('box_INFORMATION', $box_information);
    $cache_id = $_SESSION['language'] . $product->data['products_id'];
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_manufacturers_info.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $rebuild = true;
    $manufacturer_query = xtDBquery("select\n                                            m.manufacturers_id,\n                                            m.manufacturers_name,\n                                            m.manufacturers_image,\n                                            mi.manufacturers_url\n                                       FROM " . TABLE_MANUFACTURERS . " m\n                                  LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi\n                                         ON (m.manufacturers_id = mi.manufacturers_id\n                                        AND mi.languages_id = '" . (int) $_SESSION['languages_id'] . "'),\n                                            " . TABLE_PRODUCTS . " p\n                                       WHERE p.products_id = '" . $product->data['products_id'] . "'\n                                         AND p.manufacturers_id = m.manufacturers_id");
    if (xtc_db_num_rows($manufacturer_query, true)) {
        $manufacturer = xtc_db_fetch_array($manufacturer_query, true);
        $image = 'aaa';
        if (xtc_not_null($manufacturer['manufacturers_image'])) {
            $image = DIR_WS_IMAGES . $manufacturer['manufacturers_image'];
            // BOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
            if (!file_exists($image)) {
                $image = DIR_WS_IMAGES . 'manufacturers/noimage.gif';
            }
            // EOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
        }
        $box_smarty->assign('IMAGE', $image);
        $box_smarty->assign('NAME', $manufacturer['manufacturers_name']);
        if ($manufacturer['manufacturers_url'] != '') {
            $box_smarty->assign('URL', '<a href="' . xtc_href_link(FILENAME_REDIRECT, 'action=manufacturer&' . xtc_manufacturer_link($manufacturer['manufacturers_id'], $manufacturer['manufacturers_name'])) . '" onclick="window.open(this.href); return false;">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturer['manufacturers_name']) . '</a>');
        }
        $box_smarty->assign('LINK_MORE', '<a href="' . xtc_href_link(FILENAME_DEFAULT, xtc_manufacturer_link($manufacturer['manufacturers_id'], $manufacturer['manufacturers_name'])) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a>');
    }
}
if ($cache && !$rebuild) {
    $box_manufacturers_info = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_manufacturers_info.html', $cache_id);
} else {
    $box_manufacturers_info = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_manufacturers_info.html');
}
$smarty->assign('box_MANUFACTURERS_INFO', $box_manufacturers_info);
Exemplo n.º 24
0
        }
        sort($files);
        $category['categories_template'] = $files[0];
    }
    $max_per_row = MAX_DISPLAY_CATEGORIES_PER_ROW;
    $width = $max_per_row ? intval(100 / $max_per_row) . '%' : '';
    $default_smarty->assign('TR_COLS', $max_per_row);
    $default_smarty->assign('TD_WIDTH', $width);
    $default_smarty->assign('CATEGORIES_NAME', $category['categories_name']);
    $default_smarty->assign('CATEGORIES_HEADING_TITLE', $category['categories_heading_title']);
    $default_smarty->assign('CATEGORIES_IMAGE', $image);
    $default_smarty->assign('CATEGORIES_DESCRIPTION', $category['categories_description']);
    $default_smarty->assign('language', $_SESSION['language']);
    $default_smarty->assign('module_content', $categories_content);
    $default_smarty->caching = 0;
    $main_content = $default_smarty->fetch(CURRENT_TEMPLATE . '/module/categorie_listing/' . $category['categories_template']);
    $smarty->assign('main_content', $main_content);
    /**
     * list of products
     *
     */
} elseif ($category_depth == 'products' || isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
    $select = '';
    $from = '';
    $where = '';
    // fsk18 lock
    if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
        $fsk_lock = ' AND p.products_fsk18!=1';
    }
    // group check
    if (GROUP_CHECK == 'true') {
Exemplo n.º 25
0
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommercebased on original files from OSCommerce CVS 2.2 2002/08/28 02:14:35 www.oscommerce.com 
   (c) 2003 nextcommerce (loginbox.php,v 1.10 2003/08/17); www.nextcommerce.org
   (c) 2006 XT-Commerce

   Released under the GNU General Public License 
   -----------------------------------------------------------------------------------------
   Third Party contributions:
   Loginbox V1.0          Aubrey Kilian <*****@*****.**>

   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
if (!isset($_SESSION['customer_id'])) {
    require_once DIR_FS_INC . 'xtc_image_submit.inc.php';
    require_once DIR_FS_INC . 'xtc_draw_password_field.inc.php';
    $box_smarty = new smarty();
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $box_smarty->assign('FORM_ACTION', '<form id="loginbox" method="post" action="' . xtc_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . '">');
    $box_smarty->assign('FIELD_EMAIL', xtc_draw_input_field('email_address', '', 'maxlength="50" style="width: 100%!important;""'));
    $box_smarty->assign('FIELD_PWD', xtc_draw_password_field('password', '', 'maxlength="30" style="width: 100%!important;""'));
    $box_smarty->assign('BUTTON', xtc_image_submit('button_login_small.gif', IMAGE_BUTTON_LOGIN));
    $box_smarty->assign('LINK_LOST_PASSWORD', xtc_href_link(FILENAME_PASSWORD_DOUBLE_OPT, '', 'SSL'));
    $box_smarty->assign('FORM_END', '</form>');
    $box_smarty->assign('BOX_CONTENT', '');
    $box_smarty->caching = 0;
    $box_smarty->assign('language', $_SESSION['language']);
    $box_loginbox = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_login.html');
    $smarty->assign('box_LOGIN', $box_loginbox);
}
Exemplo n.º 26
0
   (c) 2002-2003 osCommerce www.oscommerce.com 
   (c) 2003	 nextcommerce www.nextcommerce.org

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box_smarty = new smarty();
$box_content = '';
$rebuild = false;
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'];
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_newsletter.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $rebuild = true;
    $box_smarty->assign('FORM_ACTION', xtc_draw_form('sign_in', xtc_href_link(FILENAME_NEWSLETTER, '', 'SSL')));
    // web28 - 2010-09-21 - change NONSSL -> SSL
    $box_smarty->assign('FIELD_EMAIL', xtc_draw_input_field('email', '', 'maxlength="50" style="width:170px;"'));
    $box_smarty->assign('BUTTON', xtc_image_submit('button_login_newsletter.gif', IMAGE_BUTTON_LOGIN_NEWSLETTER));
    $box_smarty->assign('FORM_END', '</form>');
}
$box_newsletter = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_newsletter.html', $cache_id);
$smarty->assign('box_NEWSLETTER', $box_newsletter);