• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP oos_var_prep_for_os函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: set

 function set($sLang = '')
 {
     if (!empty($sLang) && $this->exists($sLang) === true) {
         $this->language = $this->get($sLang);
     } else {
         $this->language = $this->get(DEFAULT_LANGUAGE);
     }
     /*
             if (!isset($_COOKIE['language']) || (isset($_COOKIE['language']) && ($_COOKIE['language'] != $this->language['iso_639_2']))) {
               oos_setcookie('language', $this->language['iso_639_2'], time()+60*60*24*90);
             }
     */
     $_SESSION['language'] = $this->language['iso_639_2'];
     $_SESSION['language_id'] = $this->language['id'];
     $_SESSION['iso_639_1'] = $this->language['iso_639_1'];
     $_SESSION['languages_name'] = $this->language['name'];
     if (isset($_SESSION['customer_id'])) {
         $dbconn =& oosDBGetConn();
         $oostable =& oosDBGetTables();
         $sLanguage = oos_var_prep_for_os($this->language['iso_639_2']);
         $customerstable = $oostable['customers'];
         $query = "UPDATE {$customerstable} SET customers_language =? WHERE customers_id =?";
         $result =& $dbconn->Execute($query, array($sLanguage, (int) $_SESSION['customer_id']));
     }
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:25,代码来源:class_language.php


示例2: payment

 function payment($module = '')
 {
     global $aLang;
     if (defined('MODULE_PAYMENT_INSTALLED') && !empty($_SESSION['member']->group['payment'])) {
         $this->modules = explode(';', $_SESSION['member']->group['payment']);
         $include_modules = array();
         if (!empty($module) && in_array($module . '.' . substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '.') + 1), $this->modules)) {
             $this->selected_module = $module;
             $include_modules[] = array('class' => $module, 'file' => $module . '.php');
         } else {
             reset($this->modules);
             while (list(, $value) = each($this->modules)) {
                 $class = substr($value, 0, strrpos($value, '.'));
                 $include_modules[] = array('class' => $class, 'file' => $value);
             }
         }
         $sLanguage = oos_var_prep_for_os($_SESSION['language']);
         $nArrayCountModules = count($include_modules);
         for ($i = 0, $n = $nArrayCountModules; $i < $n; $i++) {
             include 'includes/languages/' . $sLanguage . '/modules/payment/' . $include_modules[$i]['file'];
             include 'includes/modules/payment/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
         // if there is only one payment method, select it as default because in
         // checkout_confirmation.php the $payment variable is being assigned the
         if (oos_count_payment_modules() == 1 && !is_object($_SESSION['payment'])) {
             $_SESSION['payment'] = $include_modules[0]['class'];
         }
         if (!empty($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:33,代码来源:class_payment.php


示例3: __construct

    public function __construct($module = '')
    {
        global $aLang;

        if (defined('MODULE_SHIPPING_INSTALLED') && oos_is_not_null(MODULE_SHIPPING_INSTALLED)) {
            $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

            $include_modules = array();

            if ( (!empty($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1)), $this->modules)) ) {
                $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1)));
            } else {
                reset($this->modules);
                while (list(, $value) = each($this->modules)) {
                    $class = substr($value, 0, strrpos($value, '.'));
                    $include_modules[] = array('class' => $class, 'file' => $value);
                }
            }

            $sLanguage = oos_var_prep_for_os($_SESSION['language']);

            $nArrayCountModules = count($include_modules);
            for ($i=0, $n=$nArrayCountModules; $i<$n; $i++) {
                include 'includes/languages/' . $sLanguage . '/modules/shipping/' . $include_modules[$i]['file'];
                include 'includes/modules/shipping/' . $include_modules[$i]['file'];

                $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:class_shipping.php


示例4: smarty_outputfilter_highlight

function smarty_outputfilter_highlight($source, &$smarty)
{
    $highlight = $_REQUEST['highlight'];
    if (isset($_GET['keywords'])) {
        $highlight .= oos_var_prep_for_os($_GET['keywords']);
    }
    $highlight = strip_tags($highlight);
    $sStrSize = strlen($highlight);
    if ($sStrSize <= 5) {
        return $source;
    }
    if (eregi(oos_server_get_var('HTTP_HOST'), oos_server_get_var('HTTP_REFERER'))) {
        if (!isset($highlight) || empty($highlight)) {
            return $source;
        }
    } else {
        MyOOS_CoreApi::requireOnce('classes/class_referrer.php');
        $referrer = new referrer();
        $highlight .= $referrer->getKeywords();
    }
    $words = $highlight;
    if (!isset($highlight) || empty($highlight)) {
        return $source;
    }
    // Pull out the script blocks
    preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
    $_script_blocks = $match[0];
    $source = preg_replace("!<script[^>]+>.*?</script>!is", '@@@=====@@@', $source);
    preg_match_all("!<a onmouseo[^>]+>.*!is", $source, $match);
    $_onmouse_block = $match[0];
    $source = preg_replace("!<a onmouseo[^>]+>.*!is", '@@@#=====#@@@', $source);
    // pull out all html tags
    preg_match_all("'<[\\/\\!]*?[^<>]*'si", $source, $match);
    $_tag_blocks = $match[0];
    $source = preg_replace("'<[\\/\\!]*?[^<>]*'si", '@@@:=====:@@@', $source);
    // This array is used to choose colors for supplied highlight terms
    $colorArr = array('#ffff66', '#ff9999', '#A0FFFF', '#ff66ff', '#99ff99');
    // Wrap all the highlight words with tags bolding them and changing
    // their background colors
    $wordArr = split(" ", addslashes($words));
    $i = 0;
    foreach ($wordArr as $word) {
        $word = preg_quote($word);
        $source = preg_replace('~(' . $word . ')~si', '<span style="color:black;background-color:' . $colorArr[$i] . ';">$1</span>', $source);
        $i++;
    }
    // replace script blocks
    foreach ($_script_blocks as $curr_block) {
        $source = preg_replace("!@@@=====@@@!", $curr_block, $source, 1);
    }
    foreach ($_onmouse_block as $curr_block) {
        $source = preg_replace("!@@@#=====#@@@!", $curr_block, $source, 1);
    }
    foreach ($_tag_blocks as $curr_block) {
        $source = preg_replace("!@@@:=====:@@@!", $curr_block, $source, 1);
    }
    return $source;
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:58,代码来源:outputfilter.highlight.php


示例5: 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


示例6: smarty_function_swap_product_image

/**
 * Smarty {swap_product_image} function plugin
 *
 * Type:     function<br>
 * Name:     swap_product_image<br>
 * Date:     Oct 09, 2006<br>
 * Purpose:  format HTML tags for the image<br>
 * Input:<br>
 *         - image = image width (optional, default actual width)
 *         - border = border width (optional, default 0)
 *         - height = image height (optional, default actual height)
 *
 * Examples: {swap_product_image id="featured" image=$random.products_image alt=$random.products_name|strip_tags}
 * Output:   <img id="featured" src="images/product_image.jpg" border="0" alt="products_name" onmouseover="imgSwap(this)" onmouseout="imgSwap(this)"/>
 * @author   r23 <[email protected]>
 * @version  1.0
 * @param array
 * @param Smarty
 * @return string
 * @uses smarty_function_escape_special_chars()
 */
function smarty_function_swap_product_image($params, &$smarty)
{
    MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php');

    $basedir = OOS_IMAGES;
    $height = SMALL_IMAGE_HEIGHT;
    $width = SMALL_IMAGE_WIDTH;
    $border = 0;
    $alt = '';
    $image = '';
    $extra = '';

    $sLanguage = oos_var_prep_for_os($_SESSION['language']);

    foreach($params as $_key => $_val) {
      switch($_key) {
        case 'id':
        case 'image':
        case 'border':
        case 'height':
        case 'width':
        case 'basedir':
        case 'alt':
           if (!is_array($_val)) {
             $$_key = smarty_function_escape_special_chars($_val);
           } else {
             $smarty->trigger_error("small_product_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
           }
           break;

        default:
           if (!is_array($_val)) {
             $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
           } else {
             $smarty->trigger_error("small_product_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
           }
           break;
      }
    }

    $image = $basedir . $image;

    if ((empty($image) || ($image == OOS_IMAGES)) && (IMAGE_REQUIRED == '0')) {
        return false;
    }

    return '<img id="'.$id.'" src="'.$image.'" alt="'.$alt.'" border="'.$border.'" width="'.$width.'" height="'.$height.'"'.$extra.' onmouseover="imgSwap(this)" onmouseout="imgSwap(this)" />';

}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:70,代码来源:function.swap_product_image.php


示例7: create_plugin_instance

 function create_plugin_instance()
 {
     global $oCurrencies;
     MyOOS_CoreApi::requireOnce('classes/class_currencies.php');
     $oCurrencies = new currencies();
     // currency
     if (!isset($_SESSION['currency']) || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == '1' && LANGUAGE_CURRENCY != $_SESSION['currency']) {
         if (isset($_GET['currency']) && oos_currency_exits($_GET['currency'])) {
             $_SESSION['currency'] = oos_var_prep_for_os($_GET['currency']);
         } else {
             $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == '1' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
         }
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:15,代码来源:oos_event_currencies.php


示例8: smarty_function_html_iframe

/**
 * Smarty {html_iframe} function plugin
 *
 * Type:     function<br>
 * Name:     html_image_button<br>
 * Date:     September 15, 2003
 * Input:<br>
 *         - button = button (and path) of image (required)
 *         - border = border width (optional, default 0)
 *         - height = image height (optional, default actual height)
 *         - basedir = base directory
 *
 * Examples: {html_iframe doc="gpl.html" class="license" frameborder="0" scrolling="auto"}
 * @author r23 <[email protected]>
 * @version  1.0
 * @param array
 * @param Smarty
 * @return string
 * @uses smarty_function_escape_special_chars()
 */
function smarty_function_html_iframe($params, &$smarty)
{
    MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php');

    $doc = '';
    $class = 'license';
    $frameborder = 0;
    $height = '';
    $scrolling = 'auto';
    $extra = '';
    // $sTheme = oos_var_prep_for_os($_SESSION['theme']);
    $sLanguage = oos_var_prep_for_os($_SESSION['language']);
    $dir = OOS_SHOP . OOS_MEDIA . $sLanguage . '/';

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

            case 'doc':
            case 'class':
            case 'frameborder':
            case 'scrolling':
                if(!is_array($_val)) {
                 $$_key = smarty_function_escape_special_chars($_val);
                } else {
                  $smarty->trigger_error("html_iframe: attribute '$_key' cannot be an array", E_USER_NOTICE);
                }
                break;

            default:
                if(!is_array($_val)) {
                    $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
                } else {
                    $smarty->trigger_error("html_iframe: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
                }
                break;
        }
    }

    if (empty($doc)) {
        $smarty->trigger_error("html_iframe: missing 'doc' parameter", E_USER_NOTICE);
        return;
    }

    return '<iframe src="'.$dir.$doc.'" class="'.$class.'" frameborder="'.$frameborder.'" scrolling="'.$scrolling.'"'.$extra.' /></iframe>';


}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:67,代码来源:function.html_iframe.php


示例9: credit_selection

 function credit_selection()
 {
     global $aLang;
     global $oCurrencies;
     $sTheme = oos_var_prep_for_os($_SESSION['theme']);
     $sLanguage = oos_var_prep_for_os($_SESSION['language']);
     $image_submit = '<input type="image" name="submit_redeem" onClick="submitFunction()" src="' . 'themes/' . $sTheme . '/images/buttons/' . $sLanguage . '/redeem.gif" border="0" alt="' . $aLang['image_button_redeem_voucher'] . '" title = "' . $aLang['image_button_redeem_voucher'] . '">';
     $selection_string = '';
     $selection_string .= '<tr>' . "\n";
     $selection_string .= '  <td width="10"></td>';
     $selection_string .= '  <td class="main">' . "\n";
     $selection_string .= $aLang['text_enter_coupon_code'] . oos_draw_input_field('gv_redeem_code') . '</td>';
     $selection_string .= '  <td align="right">' . $image_submit . '</td>';
     $selection_string .= '  <td width="10"></td>';
     $selection_string .= '</tr>' . "\n";
     return $selection_string;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:17,代码来源:ot_coupon.php


示例10: create_plugin_instance

 function create_plugin_instance()
 {
     global $categories, $aCategoryPath, $nCurrentCategoryId;
     $categories = '';
     $aCategoryPath = array();
     $nCurrentCategoryId = 0;
     if (isset($_GET['categories'])) {
         $categories = oos_var_prep_for_os($_GET['categories']);
     } elseif (isset($_GET['products_id']) && !isset($_GET['manufacturers_id'])) {
         $categories = oos_get_product_path($_GET['products_id']);
     }
     if (!empty($categories)) {
         $aCategoryPath = array_unique(array_filter(explode('_', $categories), 'is_numeric'));
         $categories = implode('_', $aCategoryPath);
         $nCurrentCategoryId = end($aCategoryPath);
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:18,代码来源:oos_event_category_path.php


示例11: create_plugin_instance

 function create_plugin_instance()
 {
     global $oLang, $aLang;
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aPages = oos_get_pages();
     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,代码行数:19,代码来源:oos_event_language.php


示例12: create_plugin_instance

 function create_plugin_instance()
 {
     global $categories, $aCategoryPath, $nCurrentCategoryId;
     MyOOS_CoreApi::requireOnce('classes/class_category_tree.php');
     if (isset($_GET['categories'])) {
         $categories = oos_var_prep_for_os($_GET['categories']);
     } elseif (isset($_GET['products_id']) && !isset($_GET['manufacturers_id'])) {
         $categories = oos_get_product_path($_GET['products_id']);
     } else {
         $categories = '';
     }
     if (!empty($categories)) {
         $aCategoryPath = oos_parse_category_path($categories);
         $categories = implode('_', $aCategoryPath);
         $nCurrentCategoryId = end($aCategoryPath);
     } else {
         $nCurrentCategoryId = 0;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:20,代码来源:oos_event_category_path.php


示例13: load_plugin

 function load_plugin($sInstance, $sPluginPath = '')
 {
     $sName = 'oos_event_' . $sInstance;
     if (!class_exists($sName)) {
         if (empty($sPluginPath)) {
             $sPluginPath = $sName;
         }
         $sPluginPath = oos_var_prep_for_os($sPluginPath);
         $sName = oos_var_prep_for_os($sName);
         if (is_readable('includes/plugins/' . $sPluginPath . '/' . $sName . '.php')) {
             MyOOS_CoreApi::requireOnce('plugins/' . $sPluginPath . '/' . $sName . '.php');
         }
         if (!class_exists($sName)) {
             return false;
         }
     }
     if (@call_user_func(array('oos_event_' . $sInstance, 'create_plugin_instance'))) {
         $this->aPlugins[] = $sName;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:21,代码来源:class_plugin_event.php


示例14: smarty_function_html_image_submit

/**
 * Smarty {html_image_submit} function plugin
 *
 * Type:     function<br>
 * Name:     html_image_submit<br>
 * Date:     September 15, 2003
 * Input:<br>
 *         - button = button (and path) of image (required)
 *         - border = border width (optional, default 0)
 *         - height = image height (optional, default actual height)
 *         - basedir = base directory
 *
 * Examples: {html_image_submit image="masthead.gif"}
 * @author r23 <[email protected]>
 * @author credits to Monte Ohrt <[email protected]>
 * @author credits to Duda <[email protected]> - wrote first image function
 *           in repository, helped with lots of functionality
 * @version  1.0
 * @param array
 * @param Smarty
 * @return string
 * @uses smarty_function_escape_special_chars()
 */
function smarty_function_html_image_submit($params, &$smarty)
{
    MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php');
    $image = '';
    $alt = '';
    $border = 0;
    $extra = '';
    $sTheme = oos_var_prep_for_os($_SESSION['theme']);
    $sLanguage = oos_var_prep_for_os($_SESSION['language']);
    $basedir = STATIC1_HTTP_SERVER . '/themes/' . $sTheme . '/images/buttons/' . $sLanguage . '/';
    foreach ($params as $_key => $_val) {
        switch ($_key) {
            case 'image':
            case 'basedir':
                ${$_key} = $_val;
                break;
            case 'alt':
                if (!is_array($_val)) {
                    ${$_key} = smarty_function_escape_special_chars($_val);
                } else {
                    $smarty->trigger_error("html_image_submit: extra attribute '{$_key}' cannot be an array", E_USER_NOTICE);
                }
                break;
            default:
                if (!is_array($_val)) {
                    $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
                } else {
                    $smarty->trigger_error("html_image_submit: extra attribute '{$_key}' cannot be an array", E_USER_NOTICE);
                }
                break;
        }
    }
    if (empty($image)) {
        $smarty->trigger_error("html_image_submit: missing 'button' parameter", E_USER_NOTICE);
        return;
    }
    $sSlash = defined('OOS_XHTML') && OOS_XHTML == '1' ? ' /' : '';
    return '<input type="image" src="' . $basedir . $image . '" alt="' . $alt . '" ' . $extra . $sSlash . '>';
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:62,代码来源:function.html_image_submit.php


示例15: intval

        }


// optional Product List Filter
        $product_filter_select = '';
        if (PRODUCT_LIST_FILTER > 0) {
            $filterlist_result = $dbconn->Execute($filterlist_sql);
            if ($filterlist_result->RecordCount() > 1) {
                $product_filter_select .= '            <td align="center" class="main">' . $aLang['text_show'] . '<select size="1" onChange="if(options[selectedIndex].value) window.location.href=(options[selectedIndex].value)">';
                if (isset($_GET['manufacturers_id'])) {
                    $manufacturers_id = intval($_GET['manufacturers_id']);
                    $arguments = 'manufacturers_id=' . intval($manufacturers_id);
                } else {
                    $arguments = 'categories=' . $categories;
                }
                $arguments .= '&amp;sort=' . oos_var_prep_for_os($_GET['sort']);

                $option_url = oos_href_link($aPages['shop'], $arguments);

                if (!isset($_GET['filter_id'])) {
                     $product_filter_select .= '<option value="' . $option_url . '" selected="selected">' . $aLang['text_all'] . '</option>';
                } else {
                     $product_filter_select .= '<option value="' . $option_url . '">' . $aLang['text_all'] . '</option>';
                }

                $product_filter_select .= '<option value="">---------------</option>';
                while ($filterlist = $filterlist_result->fields)
                {
                    $option_url = oos_href_link($aPages['shop'], $arguments . '&amp;filter_id=' . $filterlist['id']);
                    if (isset($_GET['filter_id']) && ($_GET['filter_id'] == $filterlist['id'])) {
                        $product_filter_select .= '<option value="' . $option_url . '" selected="selected">' . $filterlist['name'] . '</option>';
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:shop.php


示例16: defined

defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
if (!$oEvent->installed_plugin('reviews')) {
    $_SESSION['navigation']->remove_current_page();
    oos_redirect(oos_href_link($aModules['main'], $aFilename['main']));
}
if (!isset($_SESSION['customer_id'])) {
    $_SESSION['navigation']->set_snapshot();
    oos_redirect(oos_href_link($aModules['user'], $aFilename['login'], '', 'SSL'));
}
if (isset($_GET['products_id'])) {
    $get_parameters = 'products_id=' . oos_var_prep_for_os($_GET['products_id']);
    if (!isset($nProductsId)) {
        $nProductsId = oos_get_product_id($_GET['products_id']);
    }
} elseif (isset($_POST['products_id'])) {
    $get_parameters = 'products_id=' . oos_var_prep_for_os($_POST['products_id']);
    if (!isset($nProductsId)) {
        $nProductsId = oos_get_product_id($_POST['products_id']);
    }
} else {
    oos_redirect(oos_href_link($aModules['main'], $aFilename['main']));
}
require 'includes/languages/' . $sLanguage . '/reviews_product_write.php';
$productstable = $oostable['products'];
$products_descriptiontable = $oostable['products_description'];
$sql = "SELECT pd.products_name, p.products_image\n        FROM {$productstable} p,\n             {$products_descriptiontable} pd\n        WHERE p.products_id = '" . intval($nProductsId) . "'\n          AND pd.products_id = p.products_id\n          AND pd.products_languages_id = '" . intval($nLanguageID) . "'\n          AND p.products_status >= '1'";
$product_result = $dbconn->Execute($sql);
$valid_product = $product_result->RecordCount() > 0;
$product_info = $product_result->fields;
if (isset($_POST['action']) && $_POST['action'] == 'process' && (isset($_SESSION['formid']) && $_SESSION['formid'] == $_POST['formid'])) {
    $rating = oos_prepare_input($_POST['rating']);
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:product_write.php


示例17: oos_template_exits

/**
 * Checks to see if the tempalte exists
 */
function oos_template_exits($sStr)
{

    $sDir = OOS_TEMP_PATH;
    if (substr($sDir, -1) != "/") {
        $sDir = $sDir."/";
    }

    $sDir .= 'shop/';

    if (is_readable($sDir . 'templates/' . oos_var_prep_for_os($sStr) . '/theme.html')) {
        return true;
    } else {
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:19,代码来源:function_kernel.php


示例18: smarty_function_customers_image

/**
 * Smarty {customers_image} function plugin
 *
 * Type:     function<br>
 * Name:     customers_image<br>
 * Date:     Apr 16, 2009<br>
 * Purpose:  format HTML tags for the image<br>
 * Input:<br>
 *         - image =image width (optional, default actual width)
 *         - border = border width (optional, default 0)
 *         - height = image height (optional, default actual height)
 *
 * Examples: {customers_image file="images/masthead.gif"}
 * Output:   <img src="images/masthead.gif" border=0 width=100 height=80>
 * @author   r23 <[email protected]>
 * @version  1.0
 * @param array
 * @param Smarty
 * @return string
 * @uses smarty_function_escape_special_chars()
 */
function smarty_function_customers_image($params, &$smarty)
{
    MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php');

    $basedir = OOS_IMAGES . OOS_CUSTOMERS_IMAGES;
    $height = '150';
    $width = '';
    $border = 0;
    $alt = '';
    $image = '';
    $extra = '';

    $sLanguage = oos_var_prep_for_os($_SESSION['language']);

    foreach($params as $_key => $_val) {
      switch($_key) {
        case 'image':
        case 'border':
        case 'height':
        case 'width':
        case 'basedir':
        case 'alt':
           if (!is_array($_val)) {
             $$_key = smarty_function_escape_special_chars($_val);
           } else {
             $smarty->trigger_error("customers_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
           }
           break;

        default:
           if (!is_array($_val)) {
             $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
           } else {
             $smarty->trigger_error("customers_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
           }
           break;
      }
    }

    $image = $basedir . $image;


    if ((empty($image) || ($image == $basedir)) && (IMAGE_REQUIRED == '0')) {
        return false;
    }

    if ((empty($image) || ($image == $basedir)) && (IMAGE_REQUIRED == '1')) {
      $image = OOS_IMAGES . 'member.jpg';

      $image_size = @getimagesize($image);
      $width = $image_size[0];
      $height = $image_size[1];
    } elseif ( (CONFIG_CALCULATE_IMAGE_SIZE == '1') && (empty($width) || empty($height)) ) {
      if (file_exists(OOS_ABSOLUTE_PATH . $image)) {
        $image_size = @getimagesize($image);
        if (empty($width) && oos_is_not_null($height)) {
          $ratio = $height / $image_size[1];
          $width = $image_size[0] * $ratio;
        } elseif (!empty($width) && empty($height)) {
          $ratio = $width / $image_size[0];
          $height = $image_size[1] * $ratio;
        } elseif (empty($width) && empty($height)) {
          $width = $image_size[0];
          $height = $image_size[1];
        }
      } elseif (IMAGE_REQUIRED == '1') {
        $image = OOS_IMAGES . 'member.jpg';

        $image_size = @getimagesize($image);
        $width = $image_size[0];
        $height = $image_size[1];
      } else {
        return false;
      }
    }

    $sSlash = (defined('OOS_XHTML') && (OOS_XHTML == '1') ? ' /' : '');

    return '<img src="'.$image.'" alt="'.$alt.'" border="'.$border.'" width="'.$width.'" height="'.$height.'"'.$extra.$sSlash.'>';
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:101,代码来源:function.customers_image.php


示例19: before_process

    function before_process() {
      global $oOrder;

      if ( (defined('MODULE_PAYMENT_CC_EMAIL')) && (oos_validate_is_email(MODULE_PAYMENT_CC_EMAIL)) ) {
        $len = strlen($_POST['cc_number']);

        $this->cc_middle = substr($_POST['cc_number'], 4, ($len-8));
        $oOrder->info['cc_number'] = substr($_POST['cc_number'], 0, 4) . str_repeat('X', (strlen($_POST['cc_number']) - 8)) . substr($_POST['cc_number'], -4);

        $this->cc_cvv = oos_var_prep_for_os($_POST['cc_cvv']);
        $this->cc_start = oos_var_prep_for_os($_POST['cc_start']);
        $this->cc_issue = oos_var_prep_for_os($_POST['cc_issue']);

      }
    }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:15,代码来源:cc.php


示例20: oos_draw_input_field

            $your_email_address_prompt = $account_values['customers_email_address'];
        } else {
            $your_name_prompt = oos_draw_input_field('yourname', $fromname_error == '1' ? $yourname : $_GET['yourname']);
            if ($fromname_error == '1') {
                $your_name_prompt .= '&nbsp;<span class="errorText">' . $aLang['text_required'] . '</span>';
            }
            $your_email_address_prompt = oos_draw_input_field('from', $fromemail_error == '1' ? $from : $_GET['from']);
            if ($fromemail_error == '1') {
                $your_email_address_prompt .= $aLang['entry_email_address_check_error'];
            }
        }
    }
}
if (isset($_GET['send_to'])) {
    if (oos_validate_is_email(trim($_GET['send_to']))) {
        $friendemail = oos_var_prep_for_os($_GET['send_to']);
    }
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['tell_a_friend'], $aFilename['tell_a_friend'], 'send_to=' . $friendemail . '&amp;products_id=' . $_GET['products_id']));
$aOption['template_main'] = $sTheme . '/modules/tell_a_friend.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_PRODUCTS;
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' => sprintf($aLang['heading_title'], $product_info['products_name']), 'oos_heading_image' => 'specials.gif', 'valid_product' => $valid_product, 'product_info' => $product_info, 'action' => $action, 'your_name_prompt' => $your_name_prompt, 'your_email_address_prompt' => $your_email_address_prompt, 'friendname' => $friendname, 'friendemail' => $friendemail, 'yourmessage' => $yourmessage, 'oos_friendemail' => sprintf($aLang['text_email_successful_sent'], stripslashes($products_name), $friendemail), 'error' => $error, 'friendemail_error' => $friendemail_error, 'friendname_error' => $friendname_error, 'fromemail_error' => $fromemail_error, 'fromname_error' => $fromname_error));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:tell_a_friend.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP op_attr函数代码示例发布时间:2022-05-24
下一篇:
PHP oos_validate_is_email函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap