当前位置: 首页>>代码示例>>PHP>>正文


PHP oos_get_filename函数代码示例

本文整理汇总了PHP中oos_get_filename函数的典型用法代码示例。如果您正苦于以下问题:PHP oos_get_filename函数的具体用法?PHP oos_get_filename怎么用?PHP oos_get_filename使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了oos_get_filename函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create_plugin_instance

 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;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:9,代码来源:oos_event_down_for_maintenance.php

示例2: create_plugin_instance

 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;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:12,代码来源:oos_event_customer_must_login.php

示例3: create_plugin_instance

 function create_plugin_instance()
 {
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     if ($_GET['file'] != $aFilename['login'] && !isset($_SESSION['customer_id'])) {
         $cookie_url_array = parse_url((ENABLE_SSL == true ? OOS_HTTPS_SERVER : OOS_HTTP_SERVER) . substr(OOS_SHOP, 0, -1));
         $cookie_path = $cookie_url_array['path'];
         if (isset($_COOKIE['email_address']) && isset($_COOKIE['password'])) {
             // Get database information
             $dbconn =& oosDBGetConn();
             $oostable =& oosDBGetTables();
             $customerstable = $oostable['customers'];
             $sql = "SELECT customers_id, customers_gender, customers_firstname, customers_lastname,\n                         customers_password, customers_wishlist_link_id, customers_language,\n                         customers_vat_id_status, customers_email_address, customers_default_address_id,\n                         customers_max_order\n                  FROM {$customerstable}\n                  WHERE customers_login = '1'\n                  AND customers_email_address = '" . oos_db_input($_COOKIE['email_address']) . "'";
             $check_customer_result = $dbconn->Execute($sql);
             if ($check_customer_result->RecordCount()) {
                 $check_customer = $check_customer_result->fields;
                 if (oos_validate_password($_COOKIE['password'], $check_customer['customers_password'])) {
                     $address_booktable = $oostable['address_book'];
                     $sql = "SELECT entry_country_id, entry_zone_id\n                      FROM {$address_booktable}\n                      WHERE customers_id = '" . $check_customer['customers_id'] . "'\n                        AND address_book_id = '1'";
                     $check_country = $dbconn->GetRow($sql);
                     if ($check_customer['customers_language'] == '') {
                         $sLanguage = oos_var_prep_for_os($_SESSION['language']);
                         $customerstable = $oostable['customers'];
                         $dbconn->Execute("UPDATE {$customerstable}\n                                  SET customers_language = '" . oos_db_input($sLanguage) . "'\n                                  WHERE customers_id = '" . intval($check_customer['customers_id']) . "'");
                     }
                     $_SESSION['customer_wishlist_link_id'] = $check_customer['customers_wishlist_link_id'];
                     $_SESSION['customer_id'] = $check_customer['customers_id'];
                     $_SESSION['customer_default_address_id'] = $check_customer['customers_default_address_id'];
                     if (ACCOUNT_GENDER == '1') {
                         $_SESSION['customer_gender'] = $check_customer['customers_gender'];
                     }
                     $_SESSION['customer_first_name'] = $check_customer['customers_firstname'];
                     $_SESSION['customer_lastname'] = $check_customer['customers_lastname'];
                     $_SESSION['customer_max_order'] = $check_customer['customers_max_order'];
                     $_SESSION['customer_country_id'] = $check_country['entry_country_id'];
                     $_SESSION['customer_zone_id'] = $check_country['entry_zone_id'];
                     if (ACCOUNT_VAT_ID == '1') {
                         $_SESSION['customers_vat_id_status'] = $check_customer['customers_vat_id_status'];
                     }
                     $_SESSION['member']->restore_group();
                     setcookie('email_address', $email_address, time() + 365 * 24 * 3600, $cookie_path, '', getenv('HTTPS') == 'on' ? 1 : 0);
                     setcookie('password', $check_customer['customers_password'], time() + 365 * 24 * 3600, $cookie_path, '', getenv('HTTPS') == 'on' ? 1 : 0);
                     $customers_infotable = $oostable['customers_info'];
                     $dbconn->Execute("UPDATE {$customers_infotable}\n                                SET customers_info_date_of_last_logon = '" . date("Y-m-d H:i:s", time()) . "',\n                                    customers_info_number_of_logons = customers_info_number_of_logons+1\n                                WHERE customers_info_id = '" . intval($_SESSION['customer_id']) . "'");
                     $_SESSION['cart']->restore_contents();
                     // restore cart contents
                 }
             }
         }
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:52,代码来源:oos_event_autologon.php

示例4: confirm

 function confirm()
 {
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aFilename = oos_get_filename();
     $mail_result1 = $dbconn->Execute("SELECT COUNT(*) AS total FROM " . $oostable['customers'] . " WHERE customers_newsletter = '1'");
     $mail_result2 = $dbconn->Execute("SELECT COUNT(*) AS total FROM " . $oostable['maillist'] . " WHERE customers_newsletter = '1'");
     $mail1 = $mail_result1->fields;
     $mail2 = $mail_result2->fields;
     $mail['total'] = $mail1['total'] + $mail2['total'];
     $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td class="main"><font color="#ff0000"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, $mail['total']) . '</b></font></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><b>' . $this->title . '</b></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><tt>' . nl2br($this->content) . '</tt></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td align="right"><a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '">' . oos_image_button('send_off.gif', IMAGE_SEND) . '</a> <a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">' . oos_image_button('cancel_off.gif', IMAGE_CANCEL) . '</a></td>' . "\n" . '  </tr>' . "\n" . '</table>';
     return $confirm_string;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:14,代码来源:newsletter.php

示例5: smarty_function_categories_link

/**
 * Smarty {categories_link} function plugin
 *
 * Type:     function<br>
 * Name:     categories_link<br>
 * Date:     Oct 27, 2008<br>
 * Purpose:  URL for the categorie info<br>
 * Input:<br>
 *         - categories
 *
 * Examples: {categories_link categories=17}
 * Output:   http:// ... index.php?mp=mp&amp;file=shop&amp;categories=17
 * @author   r23 <info@r23.de>
 * @version  1.0
 * @param array
 * @param Smarty
 * @return string
 * @uses smarty_function_html_href_link()
 */
function smarty_function_categories_link($params, &$smarty)
{
    require_once $smarty->_get_plugin_filepath('function', 'html_href_link');
    $aModules = oos_get_modules();
    $aFilename = oos_get_filename();
    $result = array();
    $link_params = array();
    $link_params = array('modul' => $aModules['main'], 'file' => $aFilename['shop']);
    if (is_array($params)) {
        $result = array_merge($link_params, $params);
    } else {
        $smarty->trigger_error("categories_link: extra attribute '{$params}' must an array", E_USER_NOTICE);
    }
    return smarty_function_html_href_link($result, $smarty);
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:34,代码来源:function.function_categories_link.php

示例6: sendFax

 function sendFax()
 {
     global $email_order;
     $aFilename = oos_get_filename();
     if (isset($_GET['file']) && $_GET['file'] == $aFilename['checkout_process']) {
         $message = "\n";
         $message .= "sender: " . MODULE_ORDER_TOTAL_ORDER2SENDEREMAIL . "\n";
         $message .= "subject: order\n";
         $message .= "user: " . MODULE_ORDER_TOTAL_ORDER2FAX_USERNAME . "\n";
         $message .= "password: " . MODULE_ORDER_TOTAL_ORDER2FAX_PASSWORD . "\n";
         $message .= "job: send\n";
         $message .= "faxnumber: " . MODULE_ORDER_TOTAL_ORDER2FAX_FAXNUMBER . "\n";
         $message .= "message: " . $email_order;
         $header = 'From: ' . MODULE_ORDER_TOTAL_ORDER2SENDEREMAIL . "\r\n" . 'Reply-To: ' . MODULE_ORDER_TOTAL_ORDER2SENDEREMAIL;
         mail('mail2fax@tecspace.net', 'order', $message, $header);
     }
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:17,代码来源:ot_order2fax.php

示例7: oos_secure_input

/**
 * Protects better diverse attempts of Cross-Site Scripting
 * attacks, thanks to webmedic, Timax, larsneo.
 *
 * Lets validate the current php version and set globals
 * accordingly.
 * Do not change this value unless you know what you are
 * doing you have been warned!
 */
function oos_secure_input()
{
    $aFilename = oos_get_filename();
    $aModules = oos_get_modules();
    # Cross-Site Scripting attack defense - Sent by larsneo
    # some syntax checking against injected javascript
    # extended by Neo
    /**
     * Lets now sanitize the GET vars
     */
    if (count($_GET) > 0) {
        foreach ($_GET as $secvalue) {
            if (!is_array($secvalue)) {
                if (eregi("<[^>]*script*\"?[^>]*>", $secvalue) || eregi(".*[[:space:]](or|and)[[:space:]].*(=|like).*", $secvalue) || eregi("<[^>]*object*\"?[^>]*>", $secvalue) || eregi("<[^>]*iframe*\"?[^>]*>", $secvalue) || eregi("<[^>]*applet*\"?[^>]*>", $secvalue) || eregi("<[^>]*meta*\"?[^>]*>", $secvalue) || eregi("<[^>]*style*\"?[^>]*>", $secvalue) || eregi("<[^>]*form*\"?[^>]*>", $secvalue) || eregi("<[^>]*window.*\"?[^>]*>", $secvalue) || eregi("<[^>]*alert*\"?[^>]*>", $secvalue) || eregi("<[^>]*img*\"?[^>]*>", $secvalue) || eregi("<[^>]*document.*\"?[^>]*>", $secvalue) || eregi("<[^>]*cookie*\"?[^>]*>", $secvalue) || eregi("\"", $secvalue)) {
                    MyOOS_CoreApi::redirect(oos_href_link($aModules['main'], $aFilename['main']));
                }
            }
        }
    }
    /**
     * Lets now sanitize the POST vars
     */
    if (count($_POST) > 0) {
        foreach ($_POST as $secvalue) {
            if (!is_array($secvalue)) {
                if (eregi("<[^>]*script*\"?[^>]*>", $secvalue) || eregi("<[^>]*object*\"?[^>]*>", $secvalue) || eregi("<[^>]*iframe*\"?[^>]*>", $secvalue) || eregi("<[^>]*applet*\"?[^>]*>", $secvalue) || eregi("<[^>]*window.*\"?[^>]*>", $secvalue) || eregi("<[^>]*alert*\"?[^>]*>", $secvalue) || eregi("<[^>]*document.*\"?[^>]*>", $secvalue) || eregi("<[^>]*cookie*\"?[^>]*>", $secvalue) || eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) {
                    MyOOS_CoreApi::redirect(oos_href_link($aModules['main'], $aFilename['main']));
                }
            }
        }
    }
    /**
     * Lets now sanitize the COOKIE vars
     */
    if (count($_COOKIE) > 0) {
        foreach ($_COOKIE as $secvalue) {
            if (!is_array($secvalue)) {
                if (eregi("<[^>]*script*\"?[^>]*>", $secvalue) || eregi(".*[[:space:]](or|and)[[:space:]].*(=|like).*", $secvalue) || eregi("<[^>]*object*\"?[^>]*>", $secvalue) || eregi("<[^>]*iframe*\"?[^>]*>", $secvalue) || eregi("<[^>]*applet*\"?[^>]*>", $secvalue) || eregi("<[^>]*meta*\"?[^>]*>", $secvalue) || eregi("<[^>]*style*\"?[^>]*>", $secvalue) || eregi("<[^>]*form*\"?[^>]*>", $secvalue) || eregi("<[^>]*window.*\"?[^>]*>", $secvalue) || eregi("<[^>]*alert*\"?[^>]*>", $secvalue) || eregi("<[^>]*document.*\"?[^>]*>", $secvalue) || eregi("<[^>]*cookie*\"?[^>]*>", $secvalue) || eregi("<[^>]*img*\"?[^>]*>", $secvalue)) {
                    MyOOS_CoreApi::redirect(oos_href_link($aModules['main'], $aFilename['main']));
                }
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:53,代码来源:function_input.php

示例8: create_plugin_instance

 function create_plugin_instance()
 {
     global $oLang, $aLang;
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     if (!isset($_SESSION['language']) || isset($_GET['language'])) {
         MyOOS_CoreApi::requireOnce('classes/class_language.php');
         $oLang = new language();
         if (isset($_GET['language']) && oos_is_not_null($_GET['language'])) {
             $oLang->set($_GET['language']);
         } else {
             $oLang->get_browser_language();
         }
     }
     $sLanguage = oos_var_prep_for_os($_SESSION['language']);
     include 'includes/languages/' . $sLanguage . '.php';
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:20,代码来源:oos_event_language.php

示例9: sendSMS

 function sendSMS()
 {
     $aFilename = oos_get_filename();
     if (isset($_GET['file']) && $_GET['file'] == $aFilename['checkout_process']) {
         $referer = OOS_HTTP_SERVER;
         $user_agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
         $message = "\n";
         $message .= "New order\n";
         $geturl = 'http://www.fittcom.de/cgi/smssend.pl?appid=2&id=' . MODULE_ORDER_TOTAL_ORDER2SMS_ID . '&pw=' . MODULE_ORDER_TOTAL_ORDER2SMS_PASSWORD . '&dnr=' . urlencode(MODULE_ORDER_TOTAL_ORDER2SMS_DNR) . '&snr=' . urlencode(MODULE_ORDER_TOTAL_ORDER2SMS_SNR) . '&msg=' . urlencode($message) . '&msgtype=text&deliverynotify=1&confirmemail=' . MODULE_ORDER_TOTAL_ORDER2SMS_SENDEREMAIL;
         $ch = curl_init();
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($ch, CURLOPT_REFERER, $referer);
         curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
         curl_setopt($ch, CURLOPT_URL, "{$geturl}");
         curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
         curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
         $pre_result = curl_exec($ch);
         curl_close($ch);
     }
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:21,代码来源:ot_order2sms.php

示例10: process_button

 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';
     }
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     $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($aModules['checkout'], $aFilename['checkout_process'], '', 'SSL')) . oos_draw_hidden_field('cancel_return', oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
     return $process_button_string;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:21,代码来源:moneybookers.php

示例11: oos_customer_greeting

/**
 * Return a customer greeting
 *
 * @return string
 */
function oos_customer_greeting()
{
    global $aLang;
    $aFilename = oos_get_filename();
    $aModules = oos_get_modules();
    $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($aModules['products'], $aFilename['products_new']));
    } else {
        $sGreeting = '';
        // $sGreeting = sprintf($aLang['text_greeting_guest'], oos_href_link($aModules['user'], $aFilename['login'], '', 'SSL'), oos_href_link($aModules['user'], $aFilename['create_account'], '', 'SSL'));
    }
    return $sGreeting;
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:26,代码来源:main.php

示例12: smarty_function_css_back_button

/**
 * 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;
        }
    }
    $aModules = oos_get_modules();
    $aFilename = oos_get_filename();
    if (count($_SESSION['navigation']->path) - 2 > 0) {
        $back = count($_SESSION['navigation']->path) - 2;
        $link = oos_href_link($_SESSION['navigation']->path[$back]['modules'], $_SESSION['navigation']->path[$back]['file'], $_SESSION['navigation']->path[$back]['get'] . '&amp;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($aModules['main'], $aFilename['main']);
        }
    }
    while (substr($link, -5) == '&amp;' || 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>';
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:47,代码来源:function.css_back_button.php

示例13: smarty_function_oos_back_link

function smarty_function_oos_back_link($params, &$smarty)
{
    $aModules = oos_get_modules();
    $aFilename = oos_get_filename();
    if (count($_SESSION['navigation']->path) - 2 > 0) {
        $back = count($_SESSION['navigation']->path) - 2;
        $link = oos_href_link($_SESSION['navigation']->path[$back]['modules'], $_SESSION['navigation']->path[$back]['file'], $_SESSION['navigation']->path[$back]['get'] . '&amp;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($aModules['main'], $aFilename['main']);
        }
    }
    while (substr($link, -5) == '&amp;' || substr($link, -1) == '?') {
        if (substr($link, -1) == '?') {
            $link = substr($link, 0, -1);
        } else {
            $link = substr($link, 0, -5);
        }
    }
    return $link;
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:23,代码来源:function.oos_back_link.php

示例14: create_plugin_instance

 function create_plugin_instance()
 {
     global $oBreadcrumb, $aLang, $aCategoryPath;
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     // include the breadcrumb class and start the breadcrumb trail
     MyOOS_CoreApi::requireOnce('classes/class_breadcrumb.php');
     $oBreadcrumb = new breadcrumb();
     $oBreadcrumb->add($aLang['header_title_top'], oos_href_link($aModules['main'], $aFilename['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;
         for ($i = 0, $n = count($aCategoryPath); $i < $n; $i++) {
             $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) {
                 $oBreadcrumb->add($categories->fields['categories_name'], oos_href_link($aModules['main'], $aFilename['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($aModules['main'], $aFilename['shop']));
             $oBreadcrumb->add($manufacturers->fields['manufacturers_name'], oos_href_link($aModules['main'], $aFilename['shop'], 'manufacturers_id=' . $_GET['manufacturers_id']));
         }
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:36,代码来源:oos_event_breadcrumb.php

示例15: confirm

 function confirm()
 {
     $audience = array();
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aFilename = oos_get_filename();
     if ($_GET['global'] == 'true') {
         $products_result = $dbconn->Execute("SELECT distinct customers_id FROM " . $oostable['products_notifications']);
         while ($products = $products_result->fields) {
             $audience[$products['customers_id']] = '1';
             // Move that ADOdb pointer!
             $products_result->MoveNext();
         }
         $customers_result = $dbconn->Execute("SELECT customers_info_id FROM " . $oostable['customers_info'] . " WHERE global_product_notifications = '1'");
         while ($customers = $customers_result->fields) {
             $audience[$customers['customers_info_id']] = '1';
             // Move that ADOdb pointer!
             $customers_result->MoveNext();
         }
     } else {
         $chosen = $_POST['chosen'];
         $ids = implode(',', $chosen);
         $products_result = $dbconn->Execute("SELECT DISTINCT customers_id FROM " . $oostable['products_notifications'] . " WHERE products_id in (" . $ids . ")");
         while ($products = $products_result->fields) {
             $audience[$products['customers_id']] = '1';
             $products_result->MoveNext();
         }
         $customers_result = $dbconn->Execute("SELECT customers_info_id FROM " . $oostable['customers_info'] . " WHERE global_product_notifications = '1'");
         while ($customers = $customers_result->fields) {
             $audience[$customers['customers_info_id']] = '1';
             // Move that ADOdb pointer!
             $customers_result->MoveNext();
         }
     }
     $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td class="main"><font color="#ff0000"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, count($audience)) . '</b></font></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><b>' . $this->title . '</b></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><tt>' . nl2br($this->content) . '</tt></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . oos_draw_form('confirm', $aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . "\n" . '    <td align="right">';
     if (count($audience) > 0) {
         if ($_GET['global'] == 'true') {
             $confirm_string .= oos_draw_hidden_field('global', 'true');
         } else {
             for ($i = 0, $n = count($chosen); $i < $n; $i++) {
                 $confirm_string .= oos_draw_hidden_field('chosen[]', $chosen[$i]);
             }
         }
         $confirm_string .= oos_image_submit('send.gif', IMAGE_SEND) . ' ';
     }
     $confirm_string .= '<a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=send') . '">' . oos_image_button('back.gif', IMAGE_BACK) . '</a> <a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">' . oos_image_button('cancel_off.gif', IMAGE_CANCEL) . '</a></td>' . "\n" . '  </tr>' . "\n" . '</table>';
     return $confirm_string;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:49,代码来源:product_notification.php


注:本文中的oos_get_filename函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。