本文整理汇总了PHP中olc_smarty_init函数的典型用法代码示例。如果您正苦于以下问题:PHP olc_smarty_init函数的具体用法?PHP olc_smarty_init怎么用?PHP olc_smarty_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了olc_smarty_init函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Smarty
function Smarty()
{
$this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
if (!defined('PROJECT_VERSION')) {
//Not running from olCommerce!
global $cacheid;
olc_smarty_init($this, $cacheid);
}
}
示例2: olc_smarty_init
} else {
$show_form = true;
$bid = $_GET['basket_id'];
}
if ($show_form) {
/*
if ($bid)
{
$where=$where_bid;
}
else
{
$where=$where_cid;
}
*/
olc_smarty_init($module_smarty, $cache_id);
$basket_query = olc_db_query(SELECT_ALL . TABLE_CUSTOMERS_BASKET_SAVE_BASKETS . $where_cid . ' order by basket_date_added DESC');
if (olc_db_num_rows($basket_query)) {
require_once DIR_FS_INC . 'olc_draw_radio_field.inc.php';
require_once DIR_FS_INC . 'olc_draw_checkbox_field.inc.php';
require_once DIR_FS_INC . 'olc_get_prid.inc.php';
require_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php';
$module_content = array();
while ($basket = olc_db_fetch_array($basket_query)) {
$basket_id = $basket['customers_basket_id'];
$show_order_details = $basket_id == $bid;
if ($show_order_details) {
$where_bid = $sql_where . "customers_basket_id='" . $basket_id . APOS;
$products_basket_query = olc_db_query(SELECT_ALL . TABLE_CUSTOMERS_BASKET_SAVE . $where_bid);
if (olc_db_num_rows($products_basket_query) > 0) {
$products_query_sql0 = olc_standard_products_query();
示例3: Copyright
<?php
/* -----------------------------------------------------------------------------------------
$Id: add_a_quickie.php,v 1.2 2004/02/17 16:20:07 fanta2k Exp $
OL-Commerce Version 5.x/AJAX
http://www.ol-commerce.com, http://www.seifenparadies.de
Copyright (c) 2004 OL-Commerce, 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de, info@seifenparadies.de)
-----------------------------------------------------------------------------------------
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
---------------------------------------------------------------------------------------*/
olc_smarty_init($box_smarty, $cacheid);
$box_content = olc_draw_form('quick_add', olc_href_link('index' . PHP), 'get');
$box_smarty->assign('FORM_ACTION', $box_content);
$box_smarty->assign('INPUT_FIELD', olc_draw_hidden_field('action', 'buy_now') . olc_draw_input_field('BUYproducts_model', EMPTY_STRING, 'size=10'));
$box_smarty->assign('SUBMIT_BUTTON', olc_image_submit('button_buy_now.gif', BOX_HEADING_ADD_PRODUCT_ID));
$box_add_a_quickie = $box_smarty->fetch(CURRENT_TEMPLATE_BOXES . 'box_add_a_quickie' . HTML_EXT, $cacheid);
$smarty->assign('box_ADD_A_QUICKIE', $box_add_a_quickie);
示例4: Copyright
OL-Commerce Version 5.x/AJAX
http://www.ol-commerce.com, http://www.seifenparadies.de
Copyright (c) 2004 OL-Commerce , 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de, info@seifenparadies.de)
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(specials.php,v 1.47 2003/05/27); www.oscommerce.com
(c) 2003 nextcommerce (specials.php,v 1.12 2003/08/17); www.nextcommerce.org
(c) 2004 XT - Commerce; www.xt-commerce.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
//W. Kaiser - AJAX
if ($stand_alone || $force_stand_alone) {
olc_smarty_init($smarty, $cacheid);
require DIR_WS_INCLUDES . 'header.php';
$breadcrumb->add($breadcrumb_title, olc_href_link($breadcrumb_link));
}
// get default template
$products_listing_sql = $products_listing_sql_main;
$categories_name = $categories_name_main;
$categories_description = $categories_description_main;
include DIR_FS_INC . 'olc_prepare_products_listing.inc.php';
if ($stand_alone || $force_stand_alone) {
if (NOT_USE_AJAX) {
require BOXES;
}
$smarty->display(INDEX_HTML);
$stand_alone = false;
} else {
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:olc_prepare_specials_whatsnew_modules.inc.php
示例5: olc_smarty_init
// based upon the standard AspEmail(tm) classes.
//
// Copyright (C) 2001 - 2003 Brent R. Matzelle
//
// License: LGPL, see LICENSE
////////////////////////////////////////////////////
/**
* PHPMailer - PHP email transport class
* @package PHPMailer
* @author Brent R. Matzelle
* @copyright 2001 - 2003 Brent R. Matzelle
*/
//W. Kaiser -- eMail-Impressum
global $smarty;
//Central function to initiate a mail-impressum for all eMails sent.
olc_smarty_init($mailer_smarty, $cacheid);
$store_address = EMPTY_STRING;
$store = explode(NEW_LINE, STORE_NAME_ADDRESS);
$lines = sizeof($store) - 1;
$lines_1 = $lines - 1;
$line_city = 2;
for ($i = 0; $i <= $lines; $i++) {
$s = trim($store[$i]);
if ($s) {
if ($i == $lines_1) {
$store_address .= HTML_BR;
if (strpos($s, ENTRY_TELEPHONE_NUMBER) === false) {
$s = ENTRY_TELEPHONE_NUMBER . BLANK . $s;
}
} elseif ($i == $lines) {
if (strpos($s, ENTRY_FAX_NUMBER) === false) {
示例6: my_error_handler
function my_error_handler($errno, $errstr, $errfile = '', $errline = '')
{
if ($errno != E_NOTICE) {
$not_is_warning = $errno != E_WARNING;
$full_errors = $_SESSION[FULL_ERRORS];
if ($not_is_warning or $full_errors) {
$file_line_template = 'TEXT_ERROR_HANDLER_ERROR_TYPE';
if (!defined($file_line_template)) {
define($file_line_template, 'Error <b>#error_nr#<br/><font color="#FF0000">#error_text#</font></b><br/>');
define('TEXT_ERROR_HANDLER_ERROR_FILE', 'File: <b><font color="#0000FF">#file#</font></b>, Line: <b>#line#</b><br/>');
}
$file_line_template = '
' . TEXT_ERROR_HANDLER_ERROR_FILE . '
';
$error_template = '
<table border="0">
<tr>
<td valign="top" nowrap="nowrap"><b><font size="2">#date# </b></font></td>
<td valign="top">
<font size="2">' . TEXT_ERROR_HANDLER_ERROR_TYPE . '@</font>
</td>
</tr>
</table>
';
if (!defined('DIR_FS_DOCUMENT_ROOT')) {
define('PHP', '.php');
define('INC_PHP', '.inc.php');
include 'includes/configure.php';
}
$error_text = str_replace('#date#', date('d-m-Y H:i:s'), $error_template);
$error_text = str_replace('#error_nr#', $errno, $error_text);
$back_slash = '\\';
$errstr = str_replace($back_slash, SLASH, $errstr);
$errstr = str_replace(strtolower(DIR_FS_CATALOG), '...' . SLASH, $errstr);
$error_text = str_replace('#error_text#', $errstr, $error_text);
if ($errfile) {
$errfile = str_replace(strtolower(DIR_FS_CATALOG), EMPTY_STRING, strtolower(str_replace($back_slash, SLASH, $errfile)));
$file_line = str_replace('#file#', $errfile, $file_line_template);
$file_line = str_replace('#line#', $errline, $file_line);
} else {
$file_line = EMPTY_STRING;
}
$error_text = str_replace(ATSIGN, $file_line, $error_text);
if (defined('OL_COMMERCE')) {
if (OL_COMMERCE) {
include_once DIR_FS_INC . 'olc_backtrace.inc.php';
}
}
$error_text .= '<p>' . olc_backtrace() . '</p>';
$s = 'IS_AJAX_PROCESSING';
if (!defined($s)) {
define($s, false);
}
if (IS_AJAX_PROCESSING === true) {
global $smarty;
if (!is_object($smarty)) {
//Include Smarty class
require_once ADMIN_PATH_PREFIX . DIR_WS_CLASSES . 'smarty/Smarty.class.php';
require_once DIR_FS_INC . 'olc_smarty_init.inc.php';
olc_smarty_init($smarty, $cacheid);
}
$_SESSION[DEBUG_OUPUT] .= $error_text;
if (trim($smarty->_tpl_vars[MAIN_CONTENT]) == EMPTY_STRING) {
$smarty->assign(MAIN_CONTENT, QUESTION);
}
if ($not_is_warning) {
$smarty->display(INDEX_HTML);
}
} else {
echo $error_text;
}
if ($not_is_warning) {
exit;
} else {
return;
}
}
if ($error_text) {
if ($handle = fopen(ADMIN_PATH_PREFIX . "cache/cache/" . session_id() . ".log", "a")) {
//$error_text=date('d-m-Y H:i:s').' Fehler '. $errno .COLON_BLANK. $errstr .', Datei: '. $errfile.' - Zeile: '.$errline;
$error_text = str_replace(array('<br>', '<br/>', '<BR>', '<BR/>'), "\r\n", $error_text);
$error_text = strip_tags($error_text) . "\r\n\r\n";
@fwrite($handle, $error_text);
@fclose($handle);
}
}
//end if
}
}
示例7: olc_get_download
require_once DIR_FS_INC . 'olc_image_button.inc.php';
//require_once(DIR_FS_INC.'olc_get_products_attribute_price.inc.php');
require_once DIR_FS_INC . 'olc_draw_form.inc.php';
require_once DIR_FS_INC . 'olc_get_products_price.inc.php';
require_once DIR_FS_INC . 'olc_draw_input_field.inc.php';
require_once DIR_FS_INC . 'olc_image_submit.inc.php';
require_once DIR_FS_INC . 'olc_get_shipping_status_name.inc.php';
require_once DIR_FS_INC . 'olc_check_categories_status.inc.php';
require_once DIR_FS_INC . 'olc_date_short.inc.php';
require_once DIR_FS_INC . 'olc_get_vpe_and_baseprice_info.inc.php';
require_once DIR_FS_INC . 'olc_get_products_mo_images.inc.php';
require_once DIR_FS_INC . 'olc_get_products_stock.inc.php';
if ($_GET['action'] == 'get_download') {
olc_get_download($_GET['cID']);
}
olc_smarty_init($info_smarty, $cacheid);
if (USE_AJAX) {
$gallery_text = 'gallery';
$is_gallery = isset($_GET[$gallery_text]);
if ($is_gallery) {
$line = $_GET['line'];
if ($line) {
$area = PRODUCTS_INFO_LINE . $line;
} else {
$is_gallery = false;
}
}
}
$not_is_gallery = !$is_gallery;
$not_isprint_version = !$isprint_version;
$not_is_gallery_and_not_isprint_version = $not_is_gallery && $not_isprint_version;
示例8: define
define('USE_LAYOUT_DEFINITION', FALSE_STRING_S);
define('USE_SEO', false);
define('NO_BOX_LAYOUT', TRUE_STRING_S);
define('AJAX_DATA_ELEMENTS_TO_CHANGE', EMPTY_STRING);
define('IS_LOCAL_HOST', file_exists('d:\\vb6\\C2.EXE'));
$connected = false;
define('MULTI_DB_SERVER', false);
require_once DIR_FS_INC . 'olc_connect_and_get_config.inc.php';
olc_connect_and_get_config(array(1, 17, 19), $level);
require_once DIR_WS_CLASSES . 'smarty/Smarty.class.php';
require_once DIR_FS_INC . 'olc_smarty_init.inc.php';
include_once DIR_FS_INC . 'olc_start_session.inc.php';
$language_text = 'language';
define('SESSION_LANGUAGE', $_SESSION[$language_text]);
include_once DIR_WS_INCLUDES . 'filenames.php';
olc_smarty_init($smarty, $cacheid, false);
if ($is_products_show) {
require_once DIR_FS_INC . 'olc_get_template.inc.php';
require_once DIR_WS_CLASSES . 'split_page_results.php';
include DIR_WS_INCLUDES . 'write_customers_status.php';
define('SESSION_LANGUAGE_ID', $_SESSION[$language_text . '_id']);
define('SESSION_CURRENCY', $_SESSION['currency']);
define($current_template_text, olc_get_template());
define('FULL_CURRENT_TEMPLATE', TEMPLATE_PATH . CURRENT_TEMPLATE . SLASH);
define('CURRENT_TEMPLATE_MODULE', CURRENT_TEMPLATE . SLASH . 'module' . SLASH);
define('ADMIN_PATH_PREFIX', EMPTY_STRING);
define('MAX_DISPLAY_SEARCH_RESULTS', 1);
define('MINIMUM_SHIP_COST', $_SESSION['minimum_ship_cost']);
include_once DIR_FS_INC . 'olc_get_all_get_params.inc.php';
include_once DIR_FS_INC . 'olc_image_button.inc.php';
include_once DIR_FS_INC . 'olc_get_box_configuration.inc.php';
示例9: Project
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(default.php,v 1.84 2003/05/07); www.oscommerce.com
(c) 2003 nextcommerce (default.php,v 1.11 2003/08/22); www.nextcommerce.org
(c) 2004 XT - Commerce; www.xt-commerce.com
Released under the GNU General Public License
------------------------------------------------------------------------------------------
Third Party contributions:
Enable_Disable_Categories 1.3 Autor: Mikel Williams | mikel@ladykatcostumes.com
Customers Status v3.x (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist
(c) 2004 XT - Commerce; www.xt-commerce.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
if (!$ajax_init) {
olc_smarty_init($default_smarty, $cacheid);
$default_smarty->assign('session', session_id());
$main_content = EMPTY_STRING;
// include needed functions
require_once DIR_FS_INC . 'olc_customer_greeting.inc.php';
require_once DIR_FS_INC . 'olc_get_path.inc.php';
require_once DIR_FS_INC . 'olc_draw_hidden_field.inc.php';
require_once DIR_FS_INC . 'olc_check_categories_status.inc.php';
require_once DIR_FS_INC . 'olc_image_button.inc.php';
if (olc_check_categories_status($current_category_id) >= 1) {
$error = CATEGORIE_NOT_FOUND;
include DIR_WS_MODULES . FILENAME_ERROR_HANDLER;
} else {
if (DO_GROUP_CHECK) {
$group_check_c = " and c." . SQL_GROUP_CONDITION;
$group_check_p = " and p." . SQL_GROUP_CONDITION;
示例10: Coupons
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contributions:
Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
(c) 2004 XT - Commerce; www.xt-commerce.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
olc_smarty_init($gift_smarty, $cacheid);
if (ACTIVATE_GIFT_SYSTEM == TRUE_STRING_S) {
$gift_smarty->assign('ACTIVATE_GIFT', TRUE_STRING_S);
}
if (CUSTOMER_ID) {
$gift_smarty->assign('C_FLAG', TRUE_STRING_S);
$gv_query = olc_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . CUSTOMER_ID . APOS);
$gv_result = olc_db_fetch_array($gv_query);
if ($gv_result['amount'] > 0) {
$gift_smarty->assign('GV_AMOUNT', olc_format_price($gv_result['amount'], true, true));
$gift_smarty->assign('GV_SEND_TO_FRIEND_LINK', HTML_A_START . olc_href_link(FILENAME_GV_SEND) . '">');
}
}
if (isset($_SESSION['gv_id'])) {
$gv_query = olc_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $_SESSION['gv_id'] . APOS);
$coupon = olc_db_fetch_array($gv_query);
示例11: Copyright
http://oscaffiliate.sourceforge.net/
Contribution based on:
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 - 2003 osCommerce
Copyright (c) 2003 netz-designer
Copyright (c) 2005 OL-Commerce, 2006 Dipl.-Ing.(TH) Winfried Kaiser
Copyright (c) 2002 - 2003 osCommerce
Released under the GNU General Public License
---------------------------------------------------------------------------*/
olc_smarty_init($smarty);
$box_smarty->assign('tpl_path', TEMPLATE_PATH . CURRENT_TEMPLATE . '/');
if (isset($_SESSION['affiliate_id'])) {
$box_content = HTML_A_END . HTML_BR;
$box_content = HTML_A_START . olc_href_link(FILENAME_AFFILIATE_SUMMARY, '', SSL) . '">' . BOX_AFFILIATE_SUMMARY . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE_ACCOUNT, '', SSL) . '">' . BOX_AFFILIATE_ACCOUNT . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE_PAYMENT, '', SSL) . '">' . BOX_AFFILIATE_PAYMENT . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE_CLICKS, '', SSL) . '">' . BOX_AFFILIATE_CLICKRATE . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE_SALES, '', SSL) . '">' . BOX_AFFILIATE_SALES . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE_BANNERS) . '">' . BOX_AFFILIATE_BANNERS . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE_CONTACT) . '">' . BOX_AFFILIATE_CONTACT . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_CONTENT, 'coID=902') . '">' . BOX_AFFILIATE_FAQ . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE_LOGOUT) . '">' . BOX_AFFILIATE_LOGOUT . HTML_A_END;
} else {
$box_content .= HTML_A_START . olc_href_link(FILENAME_CONTENT, 'coID=901') . '">' . BOX_AFFILIATE_INFO . $box_content;
$box_content .= HTML_A_START . olc_href_link(FILENAME_AFFILIATE, '', SSL) . '">' . BOX_AFFILIATE_LOGIN . HTML_A_END;