コード例 #1
0
function smarty_function_oos_back_link($params, &$smarty)
{

  $aPages = oos_get_pages();

  if (count($_SESSION['navigation']->path)-2 > 0) {
    $back = count($_SESSION['navigation']->path)-2;
    $link = oos_href_link($_SESSION['navigation']->path[$back]['page'], $_SESSION['navigation']->path[$back]['get'].'&history_back=true', $_SESSION['navigation']->path[$back]['mode']);
  } else {
    if (isset($_SERVER['HTTP_REFERER']) && strstr(HTTP_SERVER, $_SERVER['HTTP_REFERER'])) {
      $link = $_SERVER['HTTP_REFERER'];
    } else {
      $link = oos_href_link($aPages['main']);
    }
  }

  while ( (substr($link, -5) == '&') || (substr($link, -1) == '?') ) {
    if (substr($link, -1) == '?') {
      $link = substr($link, 0, -1);
    } else {
      $link = substr($link, 0, -5);
    }
  }

  return $link;

}
コード例 #2
0
 function create_plugin_instance()
 {
     $aPages = oos_get_pages();
     if (isset($_GET['page']) && $_GET['page'] != $aPages['info_down_for_maintenance']) {
         MyOOS_CoreApi::redirect(oos_href_link($aPages['info_down_for_maintenance'], '', 'NONSSL', true, false));
     }
     return true;
 }
コード例 #3
0
 function create_plugin_instance()
 {
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     if ($_GET['file'] != $aFilename['info_down_for_maintenance']) {
         MyOOS_CoreApi::redirect(oos_href_link($aModules['info'], $aFilename['info_down_for_maintenance'], '', 'NONSSL', true, false));
     }
     return true;
 }
コード例 #4
0
 function create_plugin_instance()
 {
     if (!isset($_SESSION['customer_id']) || !is_numeric($_SESSION['customer_id'])) {
         $aPages = oos_get_pages();
         if (isset($_GET['page']) && $_GET['page'] != $aPages['login']) {
             $_SESSION['navigation']->set_snapshot();
             MyOOS_CoreApi::redirect(oos_href_link($aPages['login'], '', 'SSL'));
         }
     }
     return true;
 }
コード例 #5
0
/**
 * Smarty {css_back_button} function plugin
 *
 * Type:     function
 * Name:     css_back_button
 * @Version:  $Revision: 1.1 $ - changed by $Author: r23 $ on $Date: 2008/01/09 22:03:20 $
 */

function smarty_function_css_back_button($params, &$smarty)
{
    global $oEvent, $spider_kill_sid;

    MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php');

    $title = '';
    $color = 'btnR green';


    foreach($params as $_key => $_val) {
      switch($_key) {

        case 'title':
            $$_key = (string)$_val;
            break;

        case 'color':
            $$_key = (string)$_val;
            break;

        default:
          break;
       }
    }

    $aPages = oos_get_pages();

    if (count($_SESSION['navigation']->path)-2 > 0) {
      $back = count($_SESSION['navigation']->path)-2;
      $link = oos_href_link($_SESSION['navigation']->path[$back]['page'], $_SESSION['navigation']->path[$back]['get'].'&history_back=true', $_SESSION['navigation']->path[$back]['mode']);
    } else {
      if (strstr(HTTP_SERVER, $_SERVER['HTTP_REFERER'])) {
        $link = $_SERVER['HTTP_REFERER'];
      } else {
        $link = oos_href_link($aPages['main']);
      }
    }

    while ( (substr($link, -5) == '&') || (substr($link, -1) == '?') ) {
      if (substr($link, -1) == '?') {
        $link = substr($link, 0, -1);
      } else {
        $link = substr($link, 0, -5);
      }
    }


    $title = decode($title);

    return '<a href="' . $link . '" title="' . $title . '" class="' . $color . '">' . $title . '</a>';


  }
コード例 #6
0
/**
 * Return table heading with sorting capabilities
 *
 * @param $sortby
 * @param $colnum,
 * @param $heading
 * @return string
 */
function oos_create_sort_heading($sortby, $colnum, $heading)
{
    global $sPage, $aLang;
    $sort_prefix = '';
    $sort_suffix = '';
    if ($sortby) {
        $sort_prefix = '<a href="' . oos_href_link($sPage, oos_get_all_get_parameters(array('page', 'info', 'sort')) . 'page=1&amp;sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . $aLang['text_sort_products'] . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? $aLang['text_ascendingly'] : $aLang['text_descendingly']) . $aLang['text_by'] . $heading . '">';
        $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . '</a>';
    }
    return $sort_prefix . $heading . $sort_suffix;
}
コード例 #7
0
 function create_plugin_instance()
 {
     if (!isset($_SESSION['customer_id'])) {
         $aFilename = oos_get_filename();
         $aModules = oos_get_modules();
         if ($_GET['mp'] != $aModules['user']) {
             $_SESSION['navigation']->set_snapshot();
             oos_redirect(oos_href_link($aModules['user'], $aFilename['login'], '', 'SSL'));
         }
     }
     return true;
 }
コード例 #8
0
 function create_plugin_instance()
 {
     global $oBreadcrumb, $aLang, $aCategoryPath;
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aPages = oos_get_pages();
     // include the breadcrumb class and start the breadcrumb trail
     MyOOS_CoreApi::requireOnce('classes/class_breadcrumb.php');
     $oBreadcrumb = new breadcrumb();
     if (isset($_GET['page']) && $_GET['page'] == $aPages['main'] || !isset($_GET['page'])) {
         $oBreadcrumb->add($aLang['header_title_top'], oos_href_link($aPages['main']), bookmark);
     } else {
         $oBreadcrumb->add($aLang['header_title_top'], oos_href_link($aPages['main']));
     }
     // add category names or the manufacturer name to the breadcrumb trail
     if (isset($aCategoryPath) && count($aCategoryPath) > 0) {
         $nLanguageID = isset($_SESSION['language_id']) ? $_SESSION['language_id'] + 0 : 1;
         $nArrayCountCategoryPath = count($aCategoryPath);
         $nCount = $nArrayCountCategoryPath;
         for ($i = 0, $n = $nArrayCountCategoryPath; $i < $n; $i++) {
             $nCount = $nCount - 1;
             $categories_descriptiontable = $oostable['categories_description'];
             $categories_sql = "SELECT categories_name\n                                   FROM {$categories_descriptiontable}\n                                   WHERE categories_id = '" . intval($aCategoryPath[$i]) . "'\n                                   AND categories_languages_id = '" . intval($nLanguageID) . "'";
             $categories = $dbconn->Execute($categories_sql);
             if ($categories->RecordCount() > 0) {
                 if (isset($_GET['page']) && $_GET['page'] == $aPages['shop'] && $nCount == 0) {
                     $oBreadcrumb->add($categories->fields['categories_name'], oos_href_link($aPages['shop'], 'categories=' . implode('_', array_slice($aCategoryPath, 0, $i + 1))), bookmark);
                 } else {
                     $oBreadcrumb->add($categories->fields['categories_name'], oos_href_link($aPages['shop'], 'categories=' . implode('_', array_slice($aCategoryPath, 0, $i + 1))));
                 }
             } else {
                 break;
             }
         }
     } elseif (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) {
         $manufacturers_id = intval($_GET['manufacturers_id']);
         $manufacturerstable = $oostable['manufacturers'];
         $manufacturers_sql = "SELECT manufacturers_name\n                                  FROM {$manufacturerstable}\n                                  WHERE manufacturers_id = '" . intval($manufacturers_id) . "'";
         $manufacturers = $dbconn->Execute($manufacturers_sql);
         if ($manufacturers->RecordCount() > 0) {
             $oBreadcrumb->add($aLang['header_title_catalog'], oos_href_link($aPages['shop']));
             $oBreadcrumb->add($manufacturers->fields['manufacturers_name'], oos_href_link($aPages['shop'], 'manufacturers_id=' . intval($_GET['manufacturers_id'])), bookmark);
         }
     }
     return true;
 }
コード例 #9
0
ファイル: main.php プロジェクト: BackupTheBerlios/oos-svn
/**
 * Return a customer greeting
 *
 * @return string
 */
function oos_customer_greeting()
{
    global $aLang;
    $aPages = oos_get_pages();
    $personal_text = '';
    if (isset($_SESSION['customer_lastname']) && ACCOUNT_GENDER == '1') {
        if ($_SESSION['customer_gender'] == 'm') {
            $personal_text = $aLang['male_address'] . ' ' . $_SESSION['customer_lastname'];
        } else {
            $personal_text = $aLang['female_address'] . ' ' . $_SESSION['customer_lastname'];
        }
    }
    if (isset($_SESSION['customer_lastname']) && isset($_SESSION['customer_id'])) {
        $sGreeting = sprintf($aLang['text_greeting_personal'], $personal_text, oos_href_link($aPages['products_new']));
    } else {
        $sGreeting = sprintf($aLang['text_greeting_guest'], oos_href_link($aPages['login'], '', 'SSL'), oos_href_link($aPages['create_account'], '', 'SSL'));
    }
    return $sGreeting;
}
コード例 #10
0
 function process_button()
 {
     global $oOrder, $oCurrencies;
     if (MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE == 'Selected Language') {
         $my_language = 'EN';
     } else {
         $my_language = MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE;
     }
     if (MODULE_PAYMENT_MONEYBOOKERS_CURRENCY == 'Selected Currency') {
         $my_currency = $_SESSION['currency'];
     } else {
         $my_currency = substr(MODULE_PAYMENT_MONEYBOOKERS_CURRENCY, 5);
     }
     if (!in_array($my_currency, array('EUR', 'USD', 'GBP', 'HKD', 'SGD', 'JPY', 'CAD', 'AUD', 'CHF', 'DKK', 'SEK', 'NOK', 'ILS', 'MYR', 'NZD', 'TWD', 'THB', 'CZK', 'HUF', 'SKK', 'ISK', 'INR'))) {
         $my_currency = 'EUR';
     }
     $aPages = oos_get_pages();
     $process_button_string = oos_draw_hidden_field('pay_to_email', MODULE_PAYMENT_MONEYBOOKERS_ID) . oos_draw_hidden_field('language', $my_language) . oos_draw_hidden_field('amount', number_format($oOrder->info['total'] * $oCurrencies->get_value($my_currency), $oCurrencies->get_decimal_places($my_currency))) . oos_draw_hidden_field('currency', $my_currency) . oos_draw_hidden_field('detail1_description', STORE_NAME) . oos_draw_hidden_field('detail1_text', 'Order - ' . date('d. M Y - H:i')) . oos_draw_hidden_field('firstname', $oOrder->billing['firstname']) . oos_draw_hidden_field('lastname', $oOrder->billing['lastname']) . oos_draw_hidden_field('address', $oOrder->billing['street_address']) . oos_draw_hidden_field('postal_code', $oOrder->billing['postcode']) . oos_draw_hidden_field('city', $oOrder->billing['city']) . oos_draw_hidden_field('country', $oOrder->billing['country']['moneybookers']) . oos_draw_hidden_field('pay_from_email', $oOrder->customer['email_address']) . oos_draw_hidden_field('return', oos_href_link($aPages['checkout_process'], '', 'SSL')) . oos_draw_hidden_field('cancel_return', oos_href_link($aPages['checkout_payment'], '', 'SSL'));
     return $process_button_string;
 }
コード例 #11
0
ファイル: index.php プロジェクト: BackupTheBerlios/oos-svn
				die("Error: Unable to mkdir $sessionPath");
			}
		}
		elseif(!@is_writable($sessionPath))
		{
			die("Error: $sessionPath is not writable");
		}
	}
}



require_once MYOOS_INCLUDE_PATH . '/includes/oos_main.php';


$sPage = oos_var_prep_for_os($sPage);

if (is_readable('includes/pages/' . $sPage . '.php')) {
    if (isset($_GET['history_back'])){
        $_SESSION['navigation']->remove_last_page();
    } else {
        $_SESSION['navigation']->add_current_page();
    }
    require_once MYOOS_INCLUDE_PATH . '/includes/pages/' . $sPage . '.php';

} else {
    MyOOS_CoreApi::redirect(oos_href_link($aPages['error404']));
}

require_once MYOOS_INCLUDE_PATH . '/includes/oos_nice_exit.php';
コード例 #12
0
        $customerstable = $oostable['customers'];
        $dbconn->Execute("UPDATE {$customerstable}\n                      SET customers_newsletter = '0'\n                      WHERE customers_id = '" . $check_customer['customers_id'] . "'");
        MyOOS_CoreApi::redirect(oos_href_link($aPages['newsletters_unsubscribe_success']));
    } else {
        $maillisttable = $oostable['maillist'];
        $sql = "SELECT customers_firstname\n                FROM {$maillisttable}\n                WHERE customers_email_address = '" . oos_db_input($email_address) . "'";
        $check_mail_customer_result = $dbconn->Execute($sql);
        if ($check_mail_customer_result->RecordCount()) {
            $maillisttable = $oostable['maillist'];
            $dbconn->Execute("UPDATE {$maillisttable}\n                             SET customers_newsletter = '0'\n                             WHERE customers_email_address = '" . oos_db_input($email_address) . "'");
            MyOOS_CoreApi::redirect(oos_href_link($aPages['newsletters_unsubscribe_success']));
        }
    }
    MyOOS_CoreApi::redirect(oos_href_link($aPages['subscription_center'], 'email=nonexistent', 'SSL'));
} else {
    $oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aPages['newsletters']), bookmark);
    $aOption['template_main'] = $sTheme . '/modules/subscription_center.html';
    $aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
    $aOption['breadcrumb'] = 'default/system/breadcrumb.html';
    $nPageType = OOS_PAGE_TYPE_SERVICE;
    require 'includes/oos_system.php';
    if (!isset($option)) {
        require 'includes/info_message.php';
        require 'includes/oos_blocks.php';
    }
    // assign Smarty variables;
    $oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'password_forgotten.gif'));
    $oSmarty->assign('oosBreadcrumb', $oSmarty->fetch($aOption['breadcrumb']));
    $oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
    $oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));
    // display the template
コード例 #13
0
    }

    if (is_array($oPaymentModules->modules)) {
      $oPaymentModules_process_button =  $oPaymentModules->process_button();
    }

    $oSmarty->assign('payment_modules_process_button', $oPaymentModules_process_button);


    if (isset($$_SESSION['payment']->form_action_url)) {
        $form_action_url = $$_SESSION['payment']->form_action_url;
    } else {
        $form_action_url = oos_href_link($aPages['checkout_process'], '', 'SSL');
    }
    $oSmarty->assign('form_action_url', $form_action_url);
    $oSmarty->assign('order', $oOrder);

    $oSmarty->assign('oosBreadcrumb', $oSmarty->fetch($aOption['breadcrumb']));
    $oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
    $oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));

    // display the template
    require 'includes/oos_display.php';

} else {
    MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_shipping'], '', 'SSL'));

}


コード例 #14
0
ob_end_clean();
$aOption['template_main'] = $sTheme . '/modules/user_create_account.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_ACCOUNT;
require 'includes/oos_system.php';
if (!isset($option)) {
    require 'includes/info_message.php';
    require 'includes/oos_blocks.php';
    require 'includes/oos_counter.php';
}
$read = '0';
$oSmarty->assign('read', $read);
$oSmarty->assign('oos_js', $javascript);
// assign Smarty variables;
$oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'account.gif'));
$oSmarty->assign('account', $account);
$oSmarty->assign('email_address', $email_address);
if (CUSTOMER_NOT_LOGIN == '1' or MAKE_PASSWORD == '1') {
    $show_password = false;
} else {
    $show_password = '******';
}
$oSmarty->assign('show_password', $show_password);
$oSmarty->assign('snapshot', $snapshot);
$oSmarty->assign('login_orgin_text', sprintf($aLang['text_origin_login'], oos_href_link($aModules['user'], $aFilename['login'], oos_get_all_get_parameters(), 'SSL')));
$oSmarty->assign('newsletter_ids', array(0, 1));
$oSmarty->assign('newsletter', array($aLang['entry_newsletter_no'], $aLang['entry_newsletter_yes']));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
$oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));
// display the template
require 'includes/oos_display.php';
コード例 #15
0
ファイル: psigate.php プロジェクト: BackupTheBerlios/oos-svn
 function process_button()
 {
     global $oOrder, $oCurrencies;
     switch (MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE) {
         case 'Always Good':
             $transaction_mode = '1';
             break;
         case 'Always Duplicate':
             $transaction_mode = '2';
             break;
         case 'Always Decline':
             $transaction_mode = '3';
             break;
         case 'Production':
         default:
             $transaction_mode = '0';
             break;
     }
     switch (MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE) {
         case 'Sale':
             $transaction_type = '0';
             break;
         case 'PostAuth':
             $transaction_type = '2';
             break;
         case 'PreAuth':
         default:
             $transaction_type = '1';
             break;
     }
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     $process_button_string = oos_draw_hidden_field('MerchantID', MODULE_PAYMENT_PSIGATE_MERCHANT_ID) . oos_draw_hidden_field('FullTotal', number_format($oOrder->info['total'] * $oCurrencies->get_value(MODULE_PAYMENT_PSIGATE_CURRENCY), $oCurrencies->currencies[MODULE_PAYMENT_PSIGATE_CURRENCY]['decimal_places'])) . oos_draw_hidden_field('ThanksURL', oos_href_link($aModules['checkout'], $aFilename['checkout_process'], '', 'SSL', true)) . oos_draw_hidden_field('NoThanksURL', oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], 'payment_error=' . $this->code, 'NONSSL', true)) . oos_draw_hidden_field('Bname', $oOrder->billing['firstname'] . ' ' . $oOrder->billing['lastname']) . oos_draw_hidden_field('Baddr1', $oOrder->billing['street_address']) . oos_draw_hidden_field('Bcity', $oOrder->billing['city']) . oos_draw_hidden_field('Bstate', $oOrder->billing['state']) . oos_draw_hidden_field('Bzip', $oOrder->billing['postcode']) . oos_draw_hidden_field('Bcountry', $oOrder->billing['country']['iso_code_2']) . oos_draw_hidden_field('Phone', $oOrder->customer['telephone']) . oos_draw_hidden_field('Email', $oOrder->customer['email_address']) . oos_draw_hidden_field('Sname', $oOrder->delivery['firstname'] . ' ' . $oOrder->delivery['lastname']) . oos_draw_hidden_field('Saddr1', $oOrder->delivery['street_address']) . oos_draw_hidden_field('Scity', $oOrder->delivery['city']) . oos_draw_hidden_field('Sstate', $oOrder->delivery['state']) . oos_draw_hidden_field('Szip', $oOrder->delivery['postcode']) . oos_draw_hidden_field('Scountry', $oOrder->delivery['country']['iso_code_2']) . oos_draw_hidden_field('ChargeType', $transaction_type) . oos_draw_hidden_field('Result', $transaction_mode) . oos_draw_hidden_field('IP', $_SERVER['REMOTE_ADDR']);
     if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') {
         $process_button_string .= oos_draw_hidden_field('CardNumber', $this->cc_card_number) . oos_draw_hidden_field('ExpMonth', $this->cc_expiry_month) . oos_draw_hidden_field('ExpYear', substr($this->cc_expiry_year, -2));
     }
     return $process_button_string;
 }
コード例 #16
0
    // assign Smarty variables;
    $oSmarty->assign(
        array(
           'oos_page_split'          => $order_history_split->display_count($order_history_numrows, MAX_DISPLAY_SEARCH_RESULTS, $nCurrentPageNumber, $aLang['text_display_number_of_products']),
           'oos_display_links'       => $order_history_split->display_links($order_history_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $nCurrentPageNumber, oos_get_all_get_parameters(array('nv', 'info'))),
           'oos_page_numrows'        => $order_history_numrows,

           'products_image_box'      => SMALL_IMAGE_WIDTH + 10,
           'oos_order_history_array' => $order_history_array
       )
    );
}

// links breadcrumb
$oBreadcrumb->add($aLang['header_title_catalog'], oos_href_link($aPages['shop']));
$oBreadcrumb->add($aLang['navbar_title']);


$oos_pagetitle = $oBreadcrumb->trail_title(' &raquo; ');
$oos_pagetitle .= '&raquo;' . OOS_META_TITLE;

// assign Smarty variables;
$oSmarty->assign(
      array(
          'pagetitle'         => htmlspecialchars($oos_pagetitle),
          'meta_description'  => htmlspecialchars($oos_meta_description),
          'meta_keywords'     => htmlspecialchars($oos_meta_keywords),
          'oos_breadcrumb'    => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR),
          'oos_heading_title' => $aLang['heading_title'],
          'oos_heading_image' => 'products_new.gif'
コード例 #17
0
}
require 'includes/classes/class_order.php';
$oOrder = new order();
require 'includes/classes/class_order_total.php';
$oOrderTotalModules = new order_total();
$total_weight = $_SESSION['cart']->show_weight();
$total_count = $_SESSION['cart']->count_contents();
$total_count = $_SESSION['cart']->count_contents_virtual();
// load all enabled payment modules
require 'includes/classes/class_payment.php';
$oPaymentModules = new payment();
$selection = $oPaymentModules->selection();
$credit_selection = $oOrderTotalModules->credit_selection();
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title_1'], oos_href_link($aPages['checkout_shipping'], '', 'SSL'));
$oBreadcrumb->add($aLang['navbar_title_2'], oos_href_link($aPages['checkout_payment'], '', 'SSL'));
if (ENABLE_SSL == '1') {
    $condition_link = OOS_HTTPS_SERVER;
} else {
    $condition_link = OOS_HTTP_SERVER;
}
$condition_link .= OOS_SHOP . OOS_MEDIA . $sLanguage . '/' . $aFilename['conditions_download'];
ob_start();
require 'js/checkout_payment.js.php';
print $oPaymentModules->javascript_validation();
$javascript = ob_get_contents();
ob_end_clean();
$aOption['template_main'] = $sTheme . '/modules/checkout_payment.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$aOption['breadcrumb'] = 'default/system/breadcrumb.html';
$nPageType = OOS_PAGE_TYPE_CHECKOUT;
コード例 #18
0
ファイル: oos_main.php プロジェクト: BackupTheBerlios/oos-svn
        $_SESSION['theme'] = oos_var_prep_for_os($_GET['template']);
    } else {
        $_SESSION['theme'] = STORE_TEMPLATES;
    }
}
$sTheme = oos_var_prep_for_os($_SESSION['theme']);
// PAngV
if ($_SESSION['member']->group['show_price'] == 1) {
    if ($_SESSION['member']->group['show_price_tax'] == 1) {
        $sPAngV = $aLang['text_taxt_incl'];
    } else {
        $sPAngV = $aLang['text_taxt_add'];
    }
    if (isset($_SESSION['customers_vat_id_status']) && $_SESSION['customers_vat_id_status'] == 1) {
        $sPAngV = $aLang['tax_info_excl'];
    }
    $sPAngV .= defined('OOS_XHTML') && OOS_XHTML == '1' ? ', <br />' : ', <br>';
    $sPAngV .= sprintf($aLang['text_shipping'], oos_href_link($aModules['info'], $aFilename['information'], 'information_id=1'));
}
// Shopping cart actions
if (isset($_GET['action']) || isset($_POST['action']) && isset($_SESSION['formid']) && $_SESSION['formid'] == $_POST['formid']) {
    require 'includes/oos_cart_actions.php';
}
$products_unitstable = $oostable['products_units'];
$query = "SELECT products_units_id, products_unit_name FROM {$products_unitstable} WHERE languages_id = '" . intval($nLanguageID) . "'";
if (USE_DB_CACHE == '1') {
    $products_units = $dbconn->CacheGetAssoc(3600, $query);
} else {
    $products_units = $dbconn->GetAssoc($query);
}
$aOption = array();
コード例 #19
0
$aOption['template_main'] = $sTheme . '/modules/user_create_account.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$aOption['breadcrumb'] = 'default/system/breadcrumb.html';
$nPageType = OOS_PAGE_TYPE_ACCOUNT;
require 'includes/oos_system.php';
if (!isset($option)) {
    require 'includes/info_message.php';
    require 'includes/oos_blocks.php';
}
$read = '0';
$oSmarty->assign('read', $read);
$oSmarty->assign('oos_js', $javascript);
// assign Smarty variables;
$oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'account.gif'));
$oSmarty->assign('account', $account);
$oSmarty->assign('email_address', $email_address);
if (CUSTOMER_NOT_LOGIN == '1' or MAKE_PASSWORD == '1') {
    $show_password = false;
} else {
    $show_password = '******';
}
$oSmarty->assign('show_password', $show_password);
$oSmarty->assign('snapshot', $snapshot);
$oSmarty->assign('login_orgin_text', sprintf($aLang['text_origin_login'], oos_href_link($aPages['login'], oos_get_all_get_parameters(), 'SSL')));
$oSmarty->assign('newsletter_ids', array(0, 1));
$oSmarty->assign('newsletter', array($aLang['entry_newsletter_no'], $aLang['entry_newsletter_yes']));
$oSmarty->assign('oosBreadcrumb', $oSmarty->fetch($aOption['breadcrumb']));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
$oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));
// display the template
require 'includes/oos_display.php';
コード例 #20
0
require 'includes/languages/' . $sLanguage . '/reviews_product_info.php';
// lets retrieve all $_GET keys and values..
$get_parameters = oos_get_all_get_parameters(array('reviews_id'));
$get_parameters = oos_remove_trailing($get_parameters);
$reviewstable = $oostable['reviews'];
$productstable = $oostable['products'];
$reviews_descriptiontable = $oostable['reviews_description'];
$products_descriptiontable = $oostable['products_description'];
$sql = "SELECT rd.reviews_text, r.reviews_rating, r.reviews_id, r.products_id,\n               r.customers_name, r.date_added, r.last_modified, r.reviews_read,\n               p.products_id, pd.products_name, p.products_model, p.products_image\n          FROM {$reviewstable} r,\n               {$reviews_descriptiontable} rd,\n               {$productstable} p,\n               {$products_descriptiontable} pd\n          WHERE r.reviews_id = '" . intval($_GET['reviews_id']) . "'\n            AND r.reviews_id = rd.reviews_id\n            AND rd.reviews_languages_id = '" . intval($nLanguageID) . "'\n            AND r.products_id = p.products_id\n            AND p.products_status >= '1'\n            AND p.products_id = pd.products_id\n            AND pd.products_languages_id = '" . intval($nLanguageID) . "'";
$reviews_result = $dbconn->Execute($sql);
if (!$reviews_result->RecordCount()) {
    MyOOS_CoreApi::redirect(oos_href_link($aModules['reviews'], $aFilename['reviews_reviews']));
}
$reviews = $reviews_result->fields;
$dbconn->Execute("UPDATE " . $oostable['reviews'] . "\n                  SET reviews_read = reviews_read+1\n                  WHERE reviews_id = '" . $reviews['reviews_id'] . "'");
// links breadcrumb
$oBreadcrumb->add($reviews['products_name'], oos_href_link($aModules['products'], $aFilename['product_info'], 'categories=' . $categories . '&amp;products_id=' . $reviews['products_id']));
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['reviews'], $aFilename['product_reviews'], $get_parameters));
$aOption['template_main'] = $sTheme . '/modules/product_reviews_info.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_REVIEWS;
require 'includes/oos_system.php';
if (!isset($option)) {
    require 'includes/info_message.php';
    require 'includes/oos_blocks.php';
}
$oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => sprintf($aLang['heading_title'], $reviews['products_name']), 'oos_heading_image' => 'reviews.gif', 'popup_window' => 'popup_window.js', 'reviews' => $reviews));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
$oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));
// display the template
require 'includes/oos_display.php';
コード例 #21
0
    }
    // assign Smarty variables;
    $oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'confirmation.gif'));
    if (MODULE_ORDER_TOTAL_INSTALLED) {
        $oOrderTotalModules->process();
        $order_total_output = $oOrderTotalModules->output();
        $oSmarty->assign('order_total_output', $order_total_output);
    }
    if (is_array($oPaymentModules->modules)) {
        if ($confirmation = $oPaymentModules->confirmation()) {
            $oSmarty->assign('confirmation', $confirmation);
        }
    }
    if (isset(${$_SESSION}['payment']->form_action_url)) {
        $form_action_url = ${$_SESSION}['payment']->form_action_url;
    } else {
        $form_action_url = oos_href_link($aModules['checkout'], $aFilename['checkout_process'], '', 'SSL');
    }
    $oSmarty->assign('form_action_url', $form_action_url);
    if (is_array($oPaymentModules->modules)) {
        $oPaymentModules_process_button = $oPaymentModules->process_button();
    }
    $oSmarty->assign('payment_modules_process_button', $oPaymentModules_process_button);
    $oSmarty->assign('order', $oOrder);
    $oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
    $oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));
    // display the template
    require 'includes/oos_display.php';
} else {
    MyOOS_CoreApi::redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_shipping'], '', 'SSL'));
}
コード例 #22
0
            }
            if ($_SESSION['error_cart_msg'] == '') {
                MyOOS_CoreApi::redirect(oos_href_link($goto_file, oos_get_all_get_parameters($parameters), 'NONSSL'));
            } else {
                MyOOS_CoreApi::redirect(oos_href_link($aPages['product_info'], 'products_id=' . $_POST['products_id']));
            }
        }
        break;
    case 'frend_wishlist_add_product':
        if (isset($_POST['products_id']) && is_numeric($_POST['cart_quantity'])) {
            $cart_qty = $_SESSION['cart']->get_quantity(oos_get_uprid($_POST['products_id'], $_POST['id']));
            $news_qty = $cart_qty + $cart_quantity;
            $products_order_min = oos_get_products_quantity_order_min($_POST['products_id']);
            $products_order_units = oos_get_products_quantity_order_units($_POST['products_id']);
            if ($cart_quantity >= $products_order_min or $cart_qty >= $products_order_min) {
                if ($cart_quantity % $products_order_units == 0 and $news_qty >= $products_order_min) {
                    $_SESSION['cart']->add_cart($_POST['products_id'], intval($news_qty), $_POST['id'], true, $_POST['to_wl_id']);
                } else {
                    $_SESSION['error_cart_msg'] = $aLang['error_products_quantity_order_min_text'] . $aLang['error_products_units_invalid'] . $cart_quantity . ' - ' . $aLang['products_order_qty_unit_text_info'] . ' ' . $products_order_units;
                }
            } else {
                $_SESSION['error_cart_msg'] = $aLang['error_products_quantity_order_min_text'] . $aLang['error_products_quantity_invalid'] . $cart_quantity . ' - ' . $aLang['products_order_qty_min_text_info'] . ' ' . $products_order_min;
            }
            if ($_SESSION['error_cart_msg'] == '') {
                MyOOS_CoreApi::redirect(oos_href_link($goto_file, oos_get_all_get_parameters($parameters), 'NONSSL'));
            } else {
                MyOOS_CoreApi::redirect(oos_href_link($aPages['product_info'], 'products_id=' . $_POST['products_id']));
            }
        }
        break;
}
コード例 #23
0
   File: login.php,v 1.12 2002/06/17 23:10:03 harley_vb
   ----------------------------------------------------------------------
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2003 osCommerce
   ----------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
   If you made a translation, please send to
      lang@oos-shop.de
   the translated file.
   ---------------------------------------------------------------------- */
if (isset($_GET['origin']) && $_GET['origin'] == $aFilename['checkout_payment']) {
    $aLang['navbar_title'] = 'Bestellen';
    $aLang['heading_title'] = 'Eine Online-Bestellung ist einfach.';
} else {
    $aLang['navbar_title'] = 'Anmelden';
    $aLang['heading_title'] = 'Melden Sie sich an';
}
$aLang['heading_new_customer'] = 'Neuer Kunde';
$aLang['text_new_customer'] = 'Ich bin ein neuer Kunde.';
$aLang['text_new_customer_introduction'] = 'Durch Ihre Anmeldung bei ' . STORE_NAME . ' sind Sie in der Lage schneller zu bestellen, kennen jederzeit den Status Ihrer Bestellungen und haben immer eine aktuelle &Uuml;bersicht &uuml;ber Ihre bisherigen Bestellungen.';
$aLang['heading_returning_customer'] = 'Bereits Kunde';
$aLang['text_returning_customer'] = 'Ich bin bereits Kunde.';
$aLang['entry_remember_me'] = 'Einlogautomatik<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:win_autologon(\'' . oos_href_link($aModules['main'], $aFilename['info_autologon']) . '\');"><b><u>Zuerst hier lesen!</u></b></a>';
$aLang['text_password_forgotten'] = 'Sie haben Ihr Passwort vergessen? Dann klicken Sie <u>hier</u>.';
$aLang['text_login_error'] = '<strong>FEHLER:</strong> Keine &Uuml;bereinstimmung der eingebenen \'eMail-Adresse\' und/oder dem \'Passwort\'.';
$aLang['text_visitors_cart'] = '<strong>ACHTUNG:</strong> Ihre Besuchereingaben werden automatisch mit Ihrem Kundenkonto verbunden. <a href="javascript:session_win(\'' . oos_href_link($aModules['main'], $aFilename['info_shopping_cart']) . '\');">[Mehr Information]</a>';
コード例 #24
0
ファイル: redirect.php プロジェクト: BackupTheBerlios/oos-svn
            $sql = "SELECT manufacturers_url\n                                      FROM {$manufacturers_infotable}\n                                      WHERE manufacturers_id = '" . intval($manufacturers_id) . "'\n                                        AND manufacturers_languages_id = '" . intval($nLanguageID) . "'";
            $manufacturer_result = $dbconn->Execute($sql);
            if (!$manufacturer_result->RecordCount()) {
                // no url exists for the selected language, lets use the default language then
                $manufacturers_infotable = $oostable['manufacturers_info'];
                $languagestable = $oostable['languages'];
                $sql = "SELECT mi.manufacturers_languages_id, mi.manufacturers_url\n                                          FROM {$manufacturers_infotable} mi,\n                                               {$languagestable} l\n                                          WHERE mi.manufacturers_id = '" . intval($manufacturers_id) . "'\n                                            AND mi.manufacturers_languages_id = l.iso_639_2\n                                            AND l.iso_639_2 = '" . DEFAULT_LANGUAGE . "'";
                $manufacturer_result = $dbconn->Execute($sql);
                if (!$manufacturer_result->RecordCount()) {
                    // no url exists, return to the site
                    MyOOS_CoreApi::redirect(oos_href_link($aPages['main']));
                } else {
                    $manufacturer = $manufacturer_result->fields;
                    $manufacturers_infotable = $oostable['manufacturers_info'];
                    $dbconn->Execute("UPDATE {$manufacturers_infotable} SET url_clicked = url_clicked+1, date_last_click = '" . date("Y-m-d H:i:s", time()) . "' WHERE manufacturers_id = '" . intval($manufacturers_id) . "' AND manufacturers_languages_id = '" . $manufacturer['manufacturers_languages_id'] . "'");
                }
            } else {
                // url exists in selected language
                $manufacturer = $manufacturer_result->fields;
                $manufacturers_infotable = $oostable['manufacturers_info'];
                $dbconn->Execute("UPDATE {$manufacturers_infotable} SET url_clicked = url_clicked+1, date_last_click = '" . date("Y-m-d H:i:s", time()) . "' WHERE manufacturers_id = '" . intval($manufacturers_id) . "' AND manufacturers_languages_id = '" . intval($nLanguageID) . "'");
            }
            MyOOS_CoreApi::redirect($manufacturer['manufacturers_url']);
        } else {
            MyOOS_CoreApi::redirect(oos_href_link($aPages['main']));
        }
        break;
    default:
        MyOOS_CoreApi::redirect(oos_href_link($aPages['main']));
        break;
}
コード例 #25
0
            $new_special_price = $top_viewed['specials_new_products_price'];
            $new_product_special_price = $oCurrencies->display_price($new_special_price, oos_get_tax_rate($top_viewed['products_tax_class_id']));
        } else {
            $new_max_product_discount = min($top_viewed['products_discount_allowed'], $_SESSION['member']->group['discount']);
            if ($new_max_product_discount != 0) {
                $new_special_price = $top_viewed['products_price'] * (100 - $new_max_product_discount) / 100;
                $new_product_discount_price = $oCurrencies->display_price($new_special_price, oos_get_tax_rate($top_viewed['products_tax_class_id']));
            }
        }
        if ($top_viewed['products_base_price'] != 1) {
            $new_base_product_price = $oCurrencies->display_price($top_viewed['products_price'] * $top_viewed['products_base_price'], oos_get_tax_rate($top_viewed['products_tax_class_id']));
            if ($new_special_price != '') {
                $new_base_product_special_price = $oCurrencies->display_price($new_special_price * $top_viewed['products_base_price'], oos_get_tax_rate($top_viewed['products_tax_class_id']));
            }
        }
        $top_viewed_array[] = array('id' => $top_viewed['products_id'], 'name' => $top_viewed['products_name'], 'image' => $top_viewed['products_image'], 'new_product_price' => $new_product_price, 'new_product_units' => $new_product_units, 'new_product_special_price' => $new_product_special_price, 'new_max_product_discount' => $new_max_product_discount, 'new_special_price' => $new_special_price, 'new_product_discount_price' => $new_product_discount_price, 'new_base_product_price' => $new_base_product_price, 'new_base_product_special_price' => $new_base_product_special_price, 'products_base_price' => $top_viewed['products_base_price'], 'new_products_base_unit' => $top_viewed['products_base_unit'], 'date_added' => $top_viewed['products_date_added'], 'manufacturer' => $top_viewed['manufacturers_name']);
        $top_viewed_result->MoveNext();
    }
    // links breadcrumb
    $oBreadcrumb->add($aLang['header_title_catalog'], oos_href_link($aPages['shop']));
    $oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aPages['top_viewed']), bookmark);
    // assign Smarty variables;
    $oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'top_viewed.gif', 'oos_page_split' => $top_viewed_split->display_count($top_viewed_numrows, MAX_DISPLAY_PRODUCTS_NEW, $nCurrentPageNumber, $aLang['text_display_number_of_top_viewed']), 'oos_display_links' => $top_viewed_split->display_links($top_viewed_numrows, MAX_DISPLAY_PRODUCTS_NEW, MAX_DISPLAY_PAGE_LINKS, $nCurrentPageNumber, oos_get_all_get_parameters(array('nv', 'info'))), 'oos_page_numrows' => $top_viewed_numrows, 'products_image_box' => SMALL_IMAGE_WIDTH + 10, 'oos_top_viewed_array' => $top_viewed_array));
}
$oSmarty->assign('oosPageNavigation', $oSmarty->fetch($aOption['page_navigation'], $contents_cache_id));
$oSmarty->assign('oosBreadcrumb', $oSmarty->fetch($aOption['breadcrumb'], $contents_cache_id));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading'], $contents_cache_id));
$oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main'], $contents_cache_id));
$oSmarty->caching = false;
// display the template
require 'includes/oos_display.php';
コード例 #26
0
 /**
  * Funciton to generate category sitemap data
  *
  * @return boolean
  */
 function GenerateCategorySitemap()
 {
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aPages = oos_get_pages();
     $categoriestable = $oostable['categories'];
     $sql = "SELECT categories_id as cID, date_added, last_modified as last_mod\n                 FROM {$categoriestable}\n                 WHERE categories_status = '1'\n                   AND access = '0'\n                 ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";
     if ($categories_query = $dbconn->Execute($sql)) {
         $this->debug['QUERY']['CATEOGRY']['STATUS'] = 'success';
         $this->debug['QUERY']['CATEOGRY']['NUM_ROWS'] = $categories_query->RecordCount();
         $container = array();
         $number = 0;
         while ($result = $categories_query->fields) {
             $location = oos_href_link($aPages['shop'], 'categories=' . $this->GetFullcategories($result['cID']), 'NONSSL', false, true);
             $lastmod = oos_is_not_null($result['last_mod']) ? $result['last_mod'] : $result['date_added'];
             $changefreq = GOOGLE_SITEMAP_CAT_CHANGE_FREQ;
             $priority = 0.5;
             $container[] = array('loc' => htmlspecialchars(utf8_encode($location)), 'lastmod' => date("Y-m-d", strtotime($lastmod)), 'changefreq' => $changefreq, 'priority' => $priority);
             if (sizeof($container) >= 50000) {
                 $type = $number == 0 ? 'categories' : 'categories' . $number;
                 $this->GenerateSitemap($container, $type);
                 $container = array();
                 $number++;
             }
             // Move that ADOdb pointer!
             $categories_query->MoveNext();
         }
         if (sizeof($container) > 1) {
             $type = $number == 0 ? 'categories' : 'categories' . $number;
             return $this->GenerateSitemap($container, $type);
         }
     } else {
         $this->debug['QUERY']['CATEOGRY']['STATUS'] = '0';
         $this->debug['QUERY']['CATEOGRY']['NUM_ROWS'] = '0';
     }
 }
コード例 #27
0
ファイル: redirect.php プロジェクト: BackupTheBerlios/oos-svn
            $sql = "SELECT manufacturers_url\n                                      FROM {$manufacturers_infotable}\n                                      WHERE manufacturers_id = '" . intval($manufacturers_id) . "'\n                                        AND manufacturers_languages_id = '" . intval($nLanguageID) . "'";
            $manufacturer_result = $dbconn->Execute($sql);
            if (!$manufacturer_result->RecordCount()) {
                // no url exists for the selected language, lets use the default language then
                $manufacturers_infotable = $oostable['manufacturers_info'];
                $languagestable = $oostable['languages'];
                $sql = "SELECT mi.manufacturers_languages_id, mi.manufacturers_url\n                                          FROM {$manufacturers_infotable} mi,\n                                               {$languagestable} l\n                                          WHERE mi.manufacturers_id = '" . intval($manufacturers_id) . "'\n                                            AND mi.manufacturers_languages_id = l.iso_639_2\n                                            AND l.iso_639_2 = '" . DEFAULT_LANGUAGE . "'";
                $manufacturer_result = $dbconn->Execute($sql);
                if (!$manufacturer_result->RecordCount()) {
                    // no url exists, return to the site
                    oos_redirect(oos_href_link($aModules['main'], $aFilename['main']));
                } else {
                    $manufacturer = $manufacturer_result->fields;
                    $manufacturers_infotable = $oostable['manufacturers_info'];
                    $dbconn->Execute("UPDATE {$manufacturers_infotable} SET url_clicked = url_clicked+1, date_last_click = '" . date("Y-m-d H:i:s", time()) . "' WHERE manufacturers_id = '" . intval($manufacturers_id) . "' AND manufacturers_languages_id = '" . $manufacturer['manufacturers_languages_id'] . "'");
                }
            } else {
                // url exists in selected language
                $manufacturer = $manufacturer_result->fields;
                $manufacturers_infotable = $oostable['manufacturers_info'];
                $dbconn->Execute("UPDATE {$manufacturers_infotable} SET url_clicked = url_clicked+1, date_last_click = '" . date("Y-m-d H:i:s", time()) . "' WHERE manufacturers_id = '" . intval($manufacturers_id) . "' AND manufacturers_languages_id = '" . intval($nLanguageID) . "'");
            }
            oos_redirect($manufacturer['manufacturers_url']);
        } else {
            oos_redirect(oos_href_link($aModules['main'], $aFilename['main']));
        }
        break;
    default:
        oos_redirect(oos_href_link($aModules['main'], $aFilename['main']));
        break;
}
コード例 #28
0
    $ticket_status_result = $dbconn->Execute($sql);
    $statuses_array = array();
    while ($ticket_status = $ticket_status_result->fields) {
        $statuses_array[] = array('ticket_edited_by' => $ticket_status['ticket_edited_by'], 'ticket_date_modified' => $ticket_status['ticket_date_modified'], 'ticket_status_id' => $ticket_status['ticket_status_id'], 'ticket_department_id' => $ticket_status['ticket_department_id'], 'ticket_priority_id' => $ticket_status['ticket_priority_id'], 'ticket_status_id' => $ticket_status['ticket_status_id'], 'ticket_department_id' => $ticket_status['ticket_department_id'], 'ticket_priority_id' => $ticket_status['ticket_priority_id'], 'ticket_comments' => $ticket_status['ticket_comments']);
        $ticket_status_result->MoveNext();
    }
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aPages['ticket_create']), bookmark);
$aOption['template_main'] = $sTheme . '/modules/ticket_view.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$aOption['breadcrumb'] = 'default/system/breadcrumb.html';
$nPageType = OOS_PAGE_TYPE_SERVICE;
require 'includes/oos_system.php';
if (!isset($option)) {
    require 'includes/info_message.php';
    require 'includes/oos_blocks.php';
}
// assign Smarty variables;
$oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'contact_us.gif'));
$oSmarty->assign(array('tlid' => $tlid, 'customers_tickets_numrows' => $customers_tickets_numrows, 'ticket' => $ticket, 'text_view_ticket_login' => sprintf($aLang['text_view_ticket_login'], oos_href_link($aPages['ticket_view'], 'login=yes&amp;tlid=' . $tlid, 'SSL'), oos_href_link($aPages['create_account'], '', 'SSL'))));
$oSmarty->assign('customers_tickets_array', $customers_tickets_array);
$oSmarty->assign('statuses_array', $statuses_array);
$oSmarty->assign('ticket_status_array', $ticket_status_array);
$oSmarty->assign('ticket_department_array', $ticket_department_array);
$oSmarty->assign('ticket_priority_array', $ticket_priority_array);
$oSmarty->assign('oosBreadcrumb', $oSmarty->fetch($aOption['breadcrumb']));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
$oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));
// display the template
require 'includes/oos_display.php';
コード例 #29
0
ファイル: specials.php プロジェクト: BackupTheBerlios/oos-svn
    $productstable = $oostable['products'];
    $specialstable = $oostable['specials'];
    $products_descriptiontable = $oostable['products_description'];
    $specials_result_raw = "SELECT p.products_id, pd.products_name, p.products_image, p.products_price,\n                                   p.products_base_price, p.products_base_unit, p.products_tax_class_id,\n                                   p.products_units_id, p.products_image, s.specials_new_products_price,\n                                   substring(pd.products_description, 1, 150) AS products_description\n                            FROM {$productstable} p,\n                                 {$products_descriptiontable} pd,\n                                 {$specialstable} s\n                           WHERE p.products_status >= '1'\n                             AND (p.products_access = '0' OR p.products_access = '" . intval($nGroupID) . "')\n                             AND s.products_id = p.products_id\n                             AND p.products_id = pd.products_id\n                             AND pd.products_languages_id = '" . intval($nLanguageID) . "'\n                             AND s.status = '1'\n                           ORDER BY s.specials_date_added DESC";
    $specials_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SPECIAL_PRODUCTS, $specials_result_raw, $specials_numrows);
    $specials_result = $dbconn->Execute($specials_result_raw);
    $aSpecials = array();
    while ($specials = $specials_result->fields) {
        $specials_base_product_price = '';
        $specials_base_product_special_price = '';
        $specials_product_price = $oCurrencies->display_price($specials['products_price'], oos_get_tax_rate($specials['products_tax_class_id']));
        $specials_product_special_price = $oCurrencies->display_price($specials['specials_new_products_price'], oos_get_tax_rate($specials['products_tax_class_id']));
        if ($specials['products_base_price'] != 1) {
            $specials_base_product_price = $oCurrencies->display_price($specials['products_price'] * $specials['products_base_price'], oos_get_tax_rate($specials['products_tax_class_id']));
            $specials_base_product_special_price = $oCurrencies->display_price($specials['specials_new_products_price'] * $specials['products_base_price'], oos_get_tax_rate($specials['products_tax_class_id']));
        }
        $aSpecials[] = array('products_id' => $specials['products_id'], 'products_image' => $specials['products_image'], 'products_name' => $specials['products_name'], 'products_description' => $specials['products_description'], 'products_base_unit' => $specials['products_base_unit'], 'products_base_price' => $specials['products_base_price'], 'products_price' => $specials_product_price, 'products_special_price' => $specials_product_special_price, 'base_product_price' => $specials_base_product_price, 'base_product_special_price' => $specials_base_product_special_price);
        $specials_result->MoveNext();
    }
    // links breadcrumb
    $oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aPages['specials']), bookmark);
    // assign Smarty variables;
    $oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'specials.gif', 'oos_page_split' => $specials_split->display_count($specials_numrows, MAX_DISPLAY_SPECIAL_PRODUCTS, $_GET['page'], $aLang['text_display_number_of_specials']), 'oos_display_links' => $specials_split->display_links($specials_numrows, MAX_DISPLAY_SPECIAL_PRODUCTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], oos_get_all_get_parameters(array('page', 'info'))), 'oos_page_numrows' => $specials_numrows, 'oos_specials_array' => $aSpecials));
}
$oSmarty->assign('oosPageNavigation', $oSmarty->fetch($aOption['page_navigation'], $contents_cache_id));
$oSmarty->assign('oosBreadcrumb', $oSmarty->fetch($aOption['breadcrumb'], $contents_cache_id));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading'], $contents_cache_id));
$oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main'], $contents_cache_id));
$oSmarty->caching = false;
// display the template
require 'includes/oos_display.php';
コード例 #30
0
            'meta_description'  => htmlspecialchars($oos_meta_description),
            'meta_keywords'     => htmlspecialchars($oos_meta_keywords),
            'oos_breadcrumb'    => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR),
            'oos_heading_title' => $aLang['text_product_not_found'],
            'oos_heading_image' => 'specials.gif'
        )
    );

} else {
    $product_info = $product_info_result->fields;

    // links breadcrumb
    if (SHOW_PRODUCTS_MODEL == '1') {
        $oBreadcrumb->add($product_info['products_model'], oos_href_link($aPages['product_info'], 'categories=' . $categories . '&amp;products_id=' . $nProductsId), bookmark);
    } else {
        $oBreadcrumb->add($product_info['products_name'], oos_href_link($aPages['product_info'], 'categories=' . $categories . '&amp;products_id=' . $nProductsId), bookmark);
    }

    $aOption['template_main'] = $sTheme . '/products/cross_sell_products.html';
    $aOption['also_purchased_products'] = $sTheme . '/products/also_purchased_products.html';
    $aOption['history_products'] = $sTheme . '/products/history_products.html';
    $aOption['xsell_products'] = $sTheme . '/products/xsell_products.html';
    $aOption['up_sell_products'] = $sTheme . '/products/up_sell_products.html';
    $aOption['featured'] = $sTheme . '/modules/products/featured.html';
    $aOption['breadcrumb'] = 'default/system/breadcrumb.html';

    $nPageType = OOS_PAGE_TYPE_PRODUCTS;

    require 'includes/oos_system.php';
    if (!isset($option)) {
        require 'includes/info_message.php';