本文整理汇总了PHP中osc_href_link函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_href_link函数的具体用法?PHP osc_href_link怎么用?PHP osc_href_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_href_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
function initialize()
{
global $osC_Database, $osC_Language, $osC_Customer;
if ($osC_Customer->isLoggedOn()) {
$Qorders = $osC_Database->query('select distinct op.products_id from :table_orders o, :table_orders_products op, :table_products p where o.customers_id = :customers_id and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = 1 group by products_id order by o.date_purchased desc limit :limit');
$Qorders->bindTable(':table_orders', TABLE_ORDERS);
$Qorders->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
$Qorders->bindTable(':table_products', TABLE_PRODUCTS);
$Qorders->bindInt(':customers_id', $osC_Customer->getID());
$Qorders->bindInt(':limit', BOX_ORDER_HISTORY_MAX_LIST);
$Qorders->execute();
if ($Qorders->numberOfRows()) {
$product_ids = '';
while ($Qorders->next()) {
$product_ids .= $Qorders->valueInt('products_id') . ',';
}
$product_ids = substr($product_ids, 0, -1);
$Qproducts = $osC_Database->query('select products_id, products_name, products_keyword from :table_products_description where products_id in (:products_id) and language_id = :language_id order by products_name');
$Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qproducts->bindRaw(':products_id', $product_ids);
$Qproducts->bindInt(':language_id', $osC_Language->getID());
$Qproducts->execute();
$this->_content = '<ol style="list-style: none; margin: 0; padding: 0;">';
while ($Qproducts->next()) {
$this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qproducts->value('products_id')), $Qproducts->value('products_name')) . '</li>';
}
$this->_content .= '</ol>';
}
}
}
示例2: initialize
function initialize()
{
global $osC_Database, $osC_Services, $osC_Currencies, $osC_Cache, $osC_Language, $osC_Image;
$this->_title_link = osc_href_link(FILENAME_PRODUCTS, 'specials');
if ($osC_Services->isStarted('specials')) {
if (BOX_SPECIALS_CACHE > 0 && $osC_Cache->read('box-specials-' . $osC_Language->getCode() . '-' . $osC_Currencies->getCode(), BOX_SPECIALS_CACHE)) {
$data = $osC_Cache->getCache();
} else {
$Qspecials = $osC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_keyword, s.specials_new_products_price, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd, :table_specials s where s.status = 1 and s.products_id = p.products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by s.specials_date_added desc limit :max_random_select_specials');
$Qspecials->bindTable(':table_products', TABLE_PRODUCTS);
$Qspecials->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
$Qspecials->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qspecials->bindInt(':default_flag', 1);
$Qspecials->bindTable(':table_specials', TABLE_SPECIALS);
$Qspecials->bindInt(':language_id', $osC_Language->getID());
$Qspecials->bindInt(':max_random_select_specials', BOX_SPECIALS_RANDOM_SELECT);
$Qspecials->executeRandomMulti();
$data = array();
if ($Qspecials->numberOfRows()) {
$data = $Qspecials->toArray();
$data['products_price'] = '<s>' . $osC_Currencies->displayPrice($Qspecials->valueDecimal('products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($Qspecials->valueDecimal('specials_new_products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</span>';
$osC_Cache->write('box-specials-' . $osC_Language->getCode() . '-' . $osC_Currencies->getCode(), $data);
}
}
if (empty($data) === false) {
$this->_content = '';
if (empty($data['image']) === false) {
$this->_content = osc_link_object(osc_href_link(FILENAME_PRODUCTS, $data['products_id']), $osC_Image->show($data['image'], $data['products_name'])) . '<br />';
}
$this->_content .= '<span>' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $data['products_id']), $data['products_name']) . '</span><br /><span class="productPrice">' . $data['products_price'] . '</span>';
}
}
}
示例3: _save_orders_returns
function _save_orders_returns()
{
global $messageStack, $osC_Database, $osC_Language, $osC_Customer;
$error = false;
$products = array();
if (isset($_POST['return_items']) && !empty($_POST['return_items'])) {
foreach ($_POST['return_items'] as $orders_products_id => $on) {
if (isset($_POST['quantity'][$orders_products_id]) && $_POST['quantity'][$orders_products_id] > 0) {
$products[$orders_products_id] = $_POST['quantity'][$orders_products_id];
} else {
$messageStack->add($this->_module, sprintf($osC_Language->get('error_quantity_for_return_product'), $_POST['products_name'][$orders_products_id]));
}
}
}
if (sizeof($products) == 0) {
$messageStack->add($this->_module, $osC_Language->get('error_return_items_empty'));
}
if (isset($_POST['comments']) && empty($_POST['comments'])) {
$messageStack->add($this->_module, $osC_Language->get('error_return_comments_empty'));
}
if ($messageStack->size($this->_module) === 0) {
if (toC_Order_Return::saveReturnRequest($_GET['orders_id'], $products, $_POST['comments'])) {
$messageStack->add_session($this->_module, $osC_Language->get('success_account_updated'), 'success');
}
osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'orders=list_return_requests', 'SSL'));
}
}
示例4: initialize
function initialize()
{
global $osC_Cache, $osC_Database, $osC_Services, $osC_Currencies, $osC_Specials, $osC_Language, $osC_Image;
$this->_title_link = osc_href_link(FILENAME_PRODUCTS, 'new');
$data = array();
if (BOX_WHATS_NEW_CACHE > 0 && $osC_Cache->read('box-whats_new-' . $osC_Language->getCode() . '-' . $osC_Currencies->getCode(), BOX_WHATS_NEW_CACHE)) {
$data = $osC_Cache->getCache();
} else {
$Qnew = $osC_Database->query('select products_id from :table_products where products_status = :products_status order by products_date_added desc limit :max_random_select_new');
$Qnew->bindTable(':table_products', TABLE_PRODUCTS);
$Qnew->bindInt(':products_status', 1);
$Qnew->bindInt(':max_random_select_new', BOX_WHATS_NEW_RANDOM_SELECT);
$Qnew->executeRandomMulti();
if ($Qnew->numberOfRows()) {
$osC_Product = new osC_Product($Qnew->valueInt('products_id'));
$data = $osC_Product->getData();
$data['display_price'] = $osC_Product->getPriceFormated(true);
$data['display_image'] = $osC_Product->getImage();
}
$osC_Cache->write($data);
}
if (!empty($data)) {
$this->_content = '';
if (!empty($data['display_image'])) {
$this->_content .= osc_link_object(osc_href_link(FILENAME_PRODUCTS, $data['keyword']), $osC_Image->show($data['display_image'], $data['name'])) . '<br />';
}
$this->_content .= osc_link_object(osc_href_link(FILENAME_PRODUCTS, $data['keyword']), $data['name']) . '<br />' . $data['display_price'];
}
}
示例5: initialize
function initialize()
{
global $osC_Language, $osC_Template, $osC_Product;
if (isset($osC_Product) && is_a($osC_Product, 'osC_Product') && $osC_Template->getModule() != 'tell_a_friend') {
$this->_content = '<form name="tell_a_friend" action="' . osc_href_link(FILENAME_PRODUCTS, 'tell_a_friend&' . $osC_Product->getID()) . '" method="post">' . "\n" . osc_draw_input_field('to_email_address', null, 'style="width: 80%;"') . ' ' . osc_draw_image_submit_button('button_tell_a_friend.gif', $osC_Language->get('box_tell_a_friend_text')) . '<br />' . $osC_Language->get('box_tell_a_friend_text') . "\n" . '</form>' . "\n";
}
}
示例6: execute
function execute()
{
global $osC_Session, $osC_ShoppingCart;
$id = false;
foreach ($_GET as $key => $value) {
if ((ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $key) || ereg('^[a-zA-Z0-9 -_]*$', $key)) && $key != $osC_Session->getName()) {
$id = $key;
}
break;
}
if ($id !== false && osC_Product::checkEntry($id)) {
$osC_Product = new osC_Product($id);
$product_id = $osC_Product->getID();
//gift certificate use timestamp as variant
if ($osC_Product->isGiftCertificate()) {
$product_id .= '#' . $_GET['variants'];
} else {
if (isset($_GET['variants']) && ereg('^([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*$', $_GET['variants'])) {
$product_id .= '#' . $_GET['variants'];
}
}
$osC_ShoppingCart->remove($product_id);
}
osc_redirect(osc_href_link(FILENAME_CHECKOUT));
}
示例7: getOutput
function getOutput()
{
global $osC_Product;
if (!empty($osC_Product)) {
return '<a href="http://twitter.com/home?status=' . urlencode(osc_href_link(FILENAME_PRODUCTS, $osC_Product->getID(), 'NONSSL', false, true, true)) . '" target="_blank">' . $this->getIcon() . '</a>';
}
}
示例8: initialize
function initialize()
{
global $osC_Database, $osC_Language, $osC_Product;
if (isset($osC_Product) && is_a($osC_Product, 'osC_Product')) {
$Qmanufacturer = $osC_Database->query('select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from :table_manufacturers m left join :table_manufacturers_info mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id), :table_products p where p.products_id = :products_id and p.manufacturers_id = m.manufacturers_id');
$Qmanufacturer->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
$Qmanufacturer->bindTable(':table_manufacturers_info', TABLE_MANUFACTURERS_INFO);
$Qmanufacturer->bindTable(':table_products', TABLE_PRODUCTS);
$Qmanufacturer->bindInt(':languages_id', $osC_Language->getID());
$Qmanufacturer->bindInt(':products_id', $osC_Product->getID());
$Qmanufacturer->execute();
if ($Qmanufacturer->numberOfRows()) {
$this->_content = '';
if (!osc_empty($Qmanufacturer->value('manufacturers_image'))) {
$this->_content .= '<div style="text-align: center;">' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), osc_image(DIR_WS_IMAGES . 'manufacturers/' . $Qmanufacturer->value('manufacturers_image'), $Qmanufacturer->value('manufacturers_name'))) . '</div>';
}
$this->_content .= '<ol style="list-style: none; margin: 0; padding: 0;">';
if (!osc_empty($Qmanufacturer->value('manufacturers_url'))) {
$this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $Qmanufacturer->valueInt('manufacturers_id')), sprintf($osC_Language->get('box_manufacturer_info_website'), $Qmanufacturer->value('manufacturers_name')), 'target="_blank"') . '</li>';
}
$this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), $osC_Language->get('box_manufacturer_info_products')) . '</li>';
$this->_content .= '</ol>';
}
}
}
示例9: initialize
function initialize()
{
global $osC_Database, $osC_Services, $osC_Language, $osC_Currencies, $osC_Image, $osC_Specials, $current_category_id;
if ($current_category_id < 1) {
$Qnewproducts = $osC_Database->query('select p.products_id, p.products_tax_class_id, p.products_price, pd.products_name, pd.products_keyword, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_added desc limit :max_display_new_products');
} else {
$Qnewproducts = $osC_Database->query('select distinct p.products_id, p.products_tax_class_id, p.products_price, pd.products_name, pd.products_keyword, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd, :table_products_to_categories p2c, :table_categories c where c.parent_id = :parent_id and c.categories_id = p2c.categories_id and p2c.products_id = p.products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_added desc limit :max_display_new_products');
$Qnewproducts->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES);
$Qnewproducts->bindTable(':table_categories', TABLE_CATEGORIES);
$Qnewproducts->bindInt(':parent_id', $current_category_id);
}
$Qnewproducts->bindTable(':table_products', TABLE_PRODUCTS);
$Qnewproducts->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
$Qnewproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qnewproducts->bindInt(':default_flag', 1);
$Qnewproducts->bindInt(':language_id', $osC_Language->getID());
$Qnewproducts->bindInt(':max_display_new_products', MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY);
if (MODULE_CONTENT_NEW_PRODUCTS_CACHE > 0) {
$Qnewproducts->setCache('new_products-' . $osC_Language->getCode() . '-' . $osC_Currencies->getCode() . '-' . $current_category_id, MODULE_CONTENT_NEW_PRODUCTS_CACHE);
}
$Qnewproducts->execute();
if ($Qnewproducts->numberOfRows()) {
$i = 0;
while ($Qnewproducts->next()) {
if ($i % 3 == 0 && $i != 0) {
$this->_content .= '<div style="clear:both"></div>';
}
$product = new osC_Product($Qnewproducts->valueInt('products_id'));
$this->_content .= '<div style="margin-top: 10px; float:left; width: 33%; text-align: center">' . '<span style="display:block; height: 32px; text-align: center">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qnewproducts->value('products_id')), $Qnewproducts->value('products_name')) . '</span>' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qnewproducts->value('products_id')), $osC_Image->show($Qnewproducts->value('image'), $Qnewproducts->value('products_name')), 'id="productImage' . $Qnewproducts->value('products_id') . '"') . '<span style="display:block; padding: 3px; text-align: center">' . $product->getPriceFormated(true) . '</span>' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qnewproducts->valueInt('products_id') . '&action=cart_add'), osc_draw_image_button('button_add_to_cart.png', $osC_Language->get('button_add_to_cart'), 'class="ajaxAddToCart" id="ac_newproductsmodule_' . $Qnewproducts->value('products_id') . '"')) . '</div>';
$i++;
}
$this->_content .= '<div style="clear:both"></div>';
}
$Qnewproducts->freeResult();
}
示例10: execute
function execute()
{
global $osC_Database, $osC_Session, $osC_NavigationHistory, $osC_Customer;
if (!$osC_Customer->isLoggedOn()) {
$osC_NavigationHistory->setSnapshot();
osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
return false;
}
$id = false;
foreach ($_GET as $key => $value) {
if ((ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $key) || ereg('^[a-zA-Z0-9 -_]*$', $key)) && $key != $osC_Session->getName()) {
$id = $key;
}
break;
}
if ($id !== false && osC_Product::checkEntry($id)) {
$osC_Product = new osC_Product($id);
$Qcheck = $osC_Database->query('select products_id from :table_products_notifications where customers_id = :customers_id and products_id = :products_id limit 1');
$Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
$Qcheck->bindInt(':customers_id', $osC_Customer->getID());
$Qcheck->bindInt(':products_id', $osC_Product->getID());
$Qcheck->execute();
if ($Qcheck->numberOfRows() > 0) {
$Qn = $osC_Database->query('delete from :table_products_notifications where customers_id = :customers_id and products_id = :products_id');
$Qn->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
$Qn->bindInt(':customers_id', $osC_Customer->getID());
$Qn->bindInt(':products_id', $osC_Product->getID());
$Qn->execute();
}
}
osc_redirect(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action'))));
}
示例11: _process
function _process()
{
global $osC_Database, $messageStack, $osC_Language;
$data = array();
$data['url'] = osc_sanitize_string($_POST['url']);
if (isset($_POST['title']) && !empty($_POST['title'])) {
$data['title'] = osc_sanitize_string($_POST['title']);
} else {
$messageStack->add('guestbook', $osC_Language->get('field_guestbook_title_error'));
}
if (isset($_POST['email']) && !empty($_POST['email']) && osc_validate_email_address($_POST['email'])) {
$data['email'] = $_POST['email'];
} else {
$messageStack->add('guestbook', $osC_Language->get('field_guestbook_email_error'));
}
if (isset($_POST['content']) && !empty($_POST['content'])) {
$data['content'] = osc_sanitize_string($_POST['content']);
} else {
$messageStack->add('guestbook', $osC_Language->get('field_guestbook_content_error'));
}
if ($_POST['verify_code'] != $_SESSION['verify_code']) {
$messageStack->add('guestbook', $osC_Language->get('field_guestbook_verify_code_error'));
}
if ($messageStack->size('guestbook') === 0) {
if (toC_Guestbook::saveEntry($data)) {
$messageStack->add_session('guestbook', $osC_Language->get('success_guestbook_saved'), 'success');
}
osc_redirect(osc_href_link(FILENAME_INFO, 'guestbook'));
}
}
示例12: _process
function _process()
{
global $osC_MessageStack, $osC_Database, $osC_Language;
$Qcheck = $osC_Database->query('select customers_id, customers_firstname, customers_lastname, customers_gender, customers_email_address, customers_password from :table_customers where customers_email_address = :customers_email_address limit 1');
$Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qcheck->bindValue(':customers_email_address', $_POST['email_address']);
$Qcheck->execute();
if ($Qcheck->numberOfRows() === 1) {
$password = osc_create_random_string(ACCOUNT_PASSWORD);
if (osC_Account::savePassword($password, $Qcheck->valueInt('customers_id'))) {
if (ACCOUNT_GENDER > -1) {
if ($data['gender'] == 'm') {
$email_text = sprintf($osC_Language->get('email_addressing_gender_male'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
} else {
$email_text = sprintf($osC_Language->get('email_addressing_gender_female'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
}
} else {
$email_text = sprintf($osC_Language->get('email_addressing_gender_unknown'), $Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname')) . "\n\n";
}
$email_text .= sprintf($osC_Language->get('email_password_reminder_body'), getenv('REMOTE_ADDR'), STORE_NAME, $password, STORE_OWNER_EMAIL_ADDRESS);
osc_email($Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname'), $Qcheck->valueProtected('customers_email_address'), sprintf($osC_Language->get('email_password_reminder_subject'), STORE_NAME), $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$osC_MessageStack->add('login', $osC_Language->get('success_password_forgotten_sent'), 'success');
}
osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
} else {
$osC_MessageStack->add('password_forgotten', $osC_Language->get('error_password_forgotten_no_email_address_found'));
}
}
示例13: initialize
function initialize()
{
global $osC_Database, $osC_Language, $osC_Currencies;
$constant = constant('BOX_SHOP_BY_PRICE_' . $osC_Currencies->getCode());
if (!empty($constant)) {
$prices = explode(";", $constant);
if (is_array($prices) && sizeof($prices) > 0) {
$this->_content = '<ol>';
$pfrom = 0;
$pto = 0;
if (isset($_GET['pfrom']) && !empty($_GET['pfrom'])) {
$pfrom = $_GET['pfrom'];
}
if (isset($_GET['pto']) && !empty($_GET['pto'])) {
$pto = $_GET['pto'];
}
for ($n = 0; $n <= sizeof($prices); $n++) {
$filters = array();
if (isset($_GET['cPath']) && !empty($_GET['cPath'])) {
$filters[] = 'cPath=' . $_GET['cPath'];
if (isset($_GET['filter']) && !empty($_GET['filter'])) {
$filters[] = 'filter=' . $_GET['filter'];
}
}
if (isset($_GET['manufacturers']) && !empty($_GET['manufacturers'])) {
$filters[] = 'manufacturers=' . $_GET['manufacturers'];
if (isset($_GET['filter']) && !empty($_GET['filter'])) {
$filters[] = 'filter=' . $_GET['filter'];
}
}
if ($n == 0) {
$price_section = $osC_Currencies->displayRawPrice(0) . ' ~ ' . $osC_Currencies->displayRawPrice($prices[$n]);
if ($pfrom == 0 && $pto == $prices[$n]) {
$price_section = '<b>' . $price_section . '</b>';
}
$params = 'keywords=' . $_GET['keywords'] . '&x=0&y=0&pfrom=' . 0 . '&pto=' . $prices[$n] . '&' . implode('&', $filters);
} else {
if ($n == sizeof($prices)) {
$price_section = $osC_Currencies->displayRawPrice($prices[$n - 1]) . ' + ';
if ($pfrom == $prices[$n - 1] && $pto == 0) {
$price_section = '<b>' . $price_section . '</b>';
}
$params = 'keywords=' . $_GET['keywords'] . '&x=0&y=0&pfrom=' . $prices[$n - 1] . '&pto=' . '&' . implode('&', $filters);
} else {
$price_section = $osC_Currencies->displayRawPrice($prices[$n - 1]) . ' ~ ' . $osC_Currencies->displayRawPrice($prices[$n]);
if ($pfrom == $prices[$n - 1] && $pto == $prices[$n]) {
$price_section = '<b>' . $price_section . '</b>';
}
$params = 'keywords=' . $_GET['keywords'] . '&x=0&y=0&pfrom=' . $prices[$n - 1] . '&pto=' . $prices[$n] . '&' . implode('&', $filters);
}
}
if (defined('BOX_SHOP_BY_PRICE_RECURSIVE') && (int) BOX_SHOP_BY_PRICE_RECURSIVE == 1) {
$params .= '&recursive=1';
}
$this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_SEARCH, $params), $price_section) . '</li>';
}
$this->_content .= '</ol>';
}
}
}
示例14: osC_Index_Manufacturers
function osC_Index_Manufacturers()
{
global $osC_Services, $osC_Language, $breadcrumb, $osC_Manufacturer;
$this->_page_title = sprintf($osC_Language->get('index_heading'), STORE_NAME);
if (is_numeric($_GET[$this->_module])) {
include 'includes/classes/manufacturer.php';
$osC_Manufacturer = new osC_Manufacturer($_GET[$this->_module]);
if ($osC_Services->isStarted('breadcrumb')) {
$breadcrumb->add($osC_Manufacturer->getTitle(), osc_href_link(FILENAME_DEFAULT, $this->_module . '=' . $_GET[$this->_module]));
}
$this->_page_title = $osC_Manufacturer->getTitle();
$this->_page_image = 'manufacturers/' . $osC_Manufacturer->getImage();
$page_title = $osC_Manufacturer->getPageTitle();
if (!empty($page_title)) {
$this->setMetaPageTitle($page_title);
}
$meta_keywords = $osC_Manufacturer->getMetaKeywords();
if (!empty($meta_keywords)) {
$this->addPageTags('keywords', $meta_keywords);
}
$meta_description = $osC_Manufacturer->getMetaDescription();
if (!empty($meta_description)) {
$this->addPageTags('description', $meta_description);
}
$this->_process();
} else {
$this->_page_contents = 'index.php';
}
}
示例15: _process
function _process()
{
global $osC_Database, $osC_Session, $osC_Language, $osC_ShoppingCart, $messageStack, $osC_Customer, $osC_NavigationHistory, $toC_Wishlist;
if (osC_Account::checkEntry($_POST['email_address'])) {
if (osC_Account::checkPassword($_POST['password'], $_POST['email_address'])) {
if (osC_Account::checkStatus($_POST['email_address'])) {
if (SERVICE_SESSION_REGENERATE_ID == '1') {
$osC_Session->recreate();
}
$osC_Customer->setCustomerData(osC_Account::getID($_POST['email_address']));
$Qupdate = $osC_Database->query('update :table_customers set date_last_logon = :date_last_logon, number_of_logons = number_of_logons+1 where customers_id = :customers_id');
$Qupdate->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qupdate->bindRaw(':date_last_logon', 'now()');
$Qupdate->bindInt(':customers_id', $osC_Customer->getID());
$Qupdate->execute();
$osC_ShoppingCart->synchronizeWithDatabase();
$toC_Wishlist->synchronizeWithDatabase();
$osC_NavigationHistory->removeCurrentPage();
if ($osC_NavigationHistory->hasSnapshot()) {
$osC_NavigationHistory->redirectToSnapshot();
} else {
osc_redirect(osc_href_link(FILENAME_DEFAULT, null, 'AUTO'));
}
} else {
$messageStack->add('login', $osC_Language->get('error_login_status_disabled'));
}
} else {
$messageStack->add('login', $osC_Language->get('error_login_no_match'));
}
} else {
$messageStack->add('login', $osC_Language->get('error_login_no_match'));
}
}