本文整理汇总了PHP中tep_session_name函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_session_name函数的具体用法?PHP tep_session_name怎么用?PHP tep_session_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_session_name函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
global $PHP_SELF, $currencies, $request_type, $currency, $oscTemplate;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (isset($currencies) && is_object($currencies) && count($currencies->currencies) > 1) {
reset($currencies->currencies);
$currencies_array = array();
while (list($key, $value) = each($currencies->currencies)) {
$currencies_array[] = array('id' => $key, 'text' => $value['title']);
}
$hidden_get_variables = '';
reset($_GET);
while (list($key, $value) = each($_GET)) {
if (is_string($value) && $key != 'currency' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
$hidden_get_variables .= tep_draw_hidden_field($key, $value);
}
}
$form_output = tep_draw_form('currencies', tep_href_link($PHP_SELF, '', $request_type, false), 'get') . tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onchange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id() . '</form>';
ob_start();
include 'includes/modules/boxes/templates/currencies.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:25,代码来源:bm_currencies.php
示例2: b_shop_currencies
function b_shop_currencies()
{
global $currencies, $currencies, $currency, $xoopsConfig, $HTTP_GET_VARS, $PHP_SELF, $languages_id;
if (isset($_GET['currency'])) {
$_SESSION['currency'] = $_GET['currency'];
}
$currency = isset($_GET['currency']) ? $_GET['currency'] : $_SESSION['currency'];
$block = array();
$block['title'] = BOX_HEADING_CURRENCIES;
$block['datum'] = "2003-04-03";
if (!isset($currencies) || !is_object($currencies)) {
$currencies = new currencies();
}
$block['content'] = "<form name=\"currencies\" action=\"{$PHP_SELF}\" method=\"GET\">";
$block['content'] .= "<select name=\"currency\" onChange=\"this.form.submit();\">";
reset($currencies->currencies);
$currencies_array = array();
while (list($key, $value) = each($currencies->currencies)) {
$block['content'] .= "<option value=\"{$key}\"";
if ($key == $currency) {
$block['content'] .= " selected";
}
$block['content'] .= ">" . $value['title'] . "</option>";
}
$block['content'] .= "</select>";
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if ($key != 'currency' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
$block['content'] .= "<input type=\"hidden\" name=\"{$key}\" value=\"{$value}\">";
}
}
$block['content'] .= "</form>";
return $block;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:34,代码来源:currencies.php
示例3: get_admin_link
function get_admin_link($page = '', $parameters = '', $add_session_id = true)
{
global $request_type, $session_started, $SID;
if (!tep_not_null($page)) {
$page = PAGE_DEFAULT;
}
$link = _HTTP_ADMIN_SITE_ROOT . '/?';
if (tep_not_null($parameters)) {
$link .= $page . '&' . tep_output_string($parameters);
$separator = '&';
} else {
$link .= $page;
$separator = '&';
}
while (substr($link, -1) == '&' || substr($link, -1) == '?') {
$link = substr($link, 0, -1);
}
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ($add_session_id == true && $session_started == true && SESSION_FORCE_COOKIE_USE == 'False') {
if (tep_not_null($SID)) {
$_sid = $SID;
} elseif ($request_type == 'NONSSL' && $connection == 'SSL' && ENABLE_SSL == true || $request_type == 'SSL' && $connection == 'NONSSL') {
if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
$_sid = tep_session_name() . '=' . tep_session_id();
}
}
}
if (isset($_sid)) {
$link .= $separator . tep_output_string($_sid);
}
return $link;
}
开发者ID:rongandat,项目名称:e-global-cya,代码行数:32,代码来源:adminfuncs.php
示例4: execute
function execute()
{
global $PHP_SELF, $lng, $request_type, $oscTemplate, $language, $request_type, $HTTP_GET_VARS, $current_lang_key;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (!isset($lng) || isset($lng) && !is_object($lng)) {
include DIR_WS_CLASSES . 'language.php';
$lng = new language();
}
if (count($lng->catalog_languages) > 1) {
reset($lng->catalog_languages);
$languages_array = array();
while (list($key, $value) = each($lng->catalog_languages)) {
$languages_array[] = array('id' => $key, 'text' => $value['name']);
}
foreach ($lng->catalog_languages as $key => $value) {
if ($value['directory'] == $language) {
$current_lang_key = $key;
break;
}
}
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if (is_string($value) && $key != 'language' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
$hidden_get_variables .= tep_draw_hidden_field($key, $value);
}
}
$data = '<div class="headerBox languages">' . ' <span class="headerTitle languages-title">' . MODULE_BOXES_HEADER_LANGUAGES_BOX_TITLE . '</span>' . ' <div class="headerBoxContents">' . ' ' . tep_draw_form('languages', tep_href_link($PHP_SELF, '', $request_type, false), 'get') . ' ' . tep_draw_pull_down_menu('language', $languages_array, $current_lang_key, 'onchange="this.form.submit();"') . $hidden_get_variables . tep_hide_session_id() . '</form>' . ' </div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:templatemonster,项目名称:oscommerce,代码行数:31,代码来源:h_languages.php
示例5: tep_session_start
function tep_session_start()
{
global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;
$sane_session_id = true;
if (isset($HTTP_GET_VARS[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_GET_VARS[tep_session_name()]) == false) {
unset($HTTP_GET_VARS[tep_session_name()]);
$sane_session_id = false;
}
} elseif (isset($HTTP_POST_VARS[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_POST_VARS[tep_session_name()]) == false) {
unset($HTTP_POST_VARS[tep_session_name()]);
$sane_session_id = false;
}
} elseif (isset($HTTP_COOKIE_VARS[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_COOKIE_VARS[tep_session_name()]) == false) {
$session_data = session_get_cookie_params();
setcookie(tep_session_name(), '', time() - 42000, $session_data['path'], $session_data['domain']);
$sane_session_id = false;
}
}
if ($sane_session_id == false) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}
return session_start();
}
开发者ID:quangbt2005,项目名称:belamdep,代码行数:26,代码来源:sessions.php
示例6: osc_href_link
function osc_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true)
{
if (!tep_not_null($page)) {
die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
}
if ($connection == 'NONSSL') {
$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL == true) {
$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
} else {
$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
}
} else {
die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
}
if (tep_not_null($parameters)) {
$link .= $page . '?' . tep_output_string($parameters);
$separator = '&';
} else {
$link .= $page;
$separator = '?';
}
while (substr($link, -1) == '&' || substr($link, -1) == '?') {
$link = substr($link, 0, -1);
}
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ($add_session_id == true && usu::$session_started == true && SESSION_FORCE_COOKIE_USE == 'False') {
if (tep_not_null(usu::$sid)) {
$_sid = usu::$sid;
} elseif (usu::$request_type == 'NONSSL' && $connection == 'SSL' && ENABLE_SSL == true || usu::$request_type == 'SSL' && $connection == 'NONSSL') {
if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
$_sid = tep_session_name() . '=' . tep_session_id();
}
}
}
//commented out SEARCH_ENGINE_FRIENDLY_URLS since removed from oscmax 2.1 sql file
/* if ( ( SEARCH_ENGINE_FRIENDLY_URLS == 'true' ) && ( $search_engine_safe == true ) ) {
while ( strstr( $link, '&&' ) ) $link = str_replace( '&&', '&', $link );
$link = str_replace( '?', '/', $link );
$link = str_replace( '&', '/', $link );
$link = str_replace( '=', '/', $link );
$separator = '?';
}
*/
if (isset($_sid)) {
$link .= $separator . tep_output_string($_sid);
}
usu::$performance['std_url_array'][] = $link;
if (defined('SEO_URLS_USE_W3C_VALID') && SEO_URLS_USE_W3C_VALID == 'true') {
return htmlspecialchars(utf8_encode($link));
}
return $link;
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:56,代码来源:Usu_General_Functions.php
示例7: tep_doautologin
function tep_doautologin()
{
global $HTTP_COOKIE_VARS, $cart, $cart_cs, $cart_fv, $cart_pr, $customer_id, $customer_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id;
global $navigation;
if (isset($HTTP_COOKIE_VARS['osC_AutoCookieLogin'])) {
$ip_address = tep_get_ip_address();
$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where md5(CONCAT(customers_id,customers_email_address,customers_password,'" . $ip_address . "'))= '" . $HTTP_COOKIE_VARS['osC_AutoCookieLogin'] . "'");
if (tep_db_num_rows($check_customer_query)) {
$check_customer = tep_db_fetch_array($check_customer_query);
if (SESSION_RECREATE == 'True') {
tep_session_recreate();
}
$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $check_customer['customers_id'] . "' and address_book_id = '" . (int) $check_customer['customers_default_address_id'] . "'");
$check_country = tep_db_fetch_array($check_country_query);
$customer_id = $check_customer['customers_id'];
$customer_default_address_id = $check_customer['customers_default_address_id'];
$customer_first_name = $check_customer['customers_firstname'];
$customer_country_id = $check_country['entry_country_id'];
$customer_zone_id = $check_country['entry_zone_id'];
if (!tep_session_is_registered('customer_id')) {
tep_session_register('customer_id');
}
if (!tep_session_is_registered('customer_default_address_id')) {
tep_session_register('customer_default_address_id');
}
if (!tep_session_is_registered('customer_first_name')) {
tep_session_register('customer_first_name');
}
if (!tep_session_is_registered('customer_country_id')) {
tep_session_register('customer_country_id');
}
if (!tep_session_is_registered('customer_zone_id')) {
tep_session_register('customer_zone_id');
}
tep_autologincookie(true);
// Save cookie
tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int) $customer_id . "'");
$cart->restore_contents();
// restore cart contents
$cart_cs->restore_contents();
$cart_fv->restore_contents();
$cart_pr->restore_contents();
if (sizeof($navigation->snapshot) > 0) {
$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
$navigation->clear_snapshot();
tep_redirect($origin_href);
} else {
// tep_redirect(tep_href_link(FILENAME_DEFAULT));
tep_redirect(substr(tep_href_link(getenv('REQUEST_URI')), strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)));
}
}
}
}
开发者ID:rongandat,项目名称:scalaprj,代码行数:53,代码来源:autologin.php
示例8: display_links
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
{
global $PHP_SELF;
if (tep_not_null($parameters) && substr($parameters, -1) != '&') {
$parameters .= '&';
}
// calculate number of pages needing links
$num_pages = ceil($query_numrows / $max_rows_per_page);
$pages_array = array();
for ($i = 1; $i <= $num_pages; $i++) {
$pages_array[] = array('id' => $i, 'text' => $i);
}
if ($num_pages > 1) {
$display_links = tep_draw_form('pages', basename($PHP_SELF), '', 'get');
if ($current_page_number > 1) {
$display_links .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> ';
} else {
$display_links .= PREVNEXT_BUTTON_PREV . ' ';
}
$display_links .= sprintf(TEXT_RESULT_PAGE, tep_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
if ($current_page_number < $num_pages && $num_pages != 1) {
$display_links .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
} else {
$display_links .= ' ' . PREVNEXT_BUTTON_NEXT;
}
if ($parameters != '') {
if (substr($parameters, -1) == '&') {
$parameters = substr($parameters, 0, -1);
}
$pairs = explode('&', $parameters);
while (list(, $pair) = each($pairs)) {
list($key, $value) = explode('=', $pair);
$display_links .= tep_draw_hidden_field(rawurldecode($key), rawurldecode($value));
}
}
if (SID) {
$display_links .= tep_draw_hidden_field(tep_session_name(), tep_session_id());
}
$display_links .= '</form>';
} else {
$display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
}
return $display_links;
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:44,代码来源:split_page_results.php
示例9: process
function process()
{
global $order, $cart, $buysafe_result, $currencies, $WantsBond, $PHP_SELF;
if (is_array($buysafe_result) && $buysafe_result['IsBuySafeEnabled'] == 'true') {
$WantsBond = $buysafe_result['BondCostDisplayText'] != '' ? true : false;
if (strstr($PHP_SELF, FILENAME_CHECKOUT_CONFIRMATION)) {
$hidden_fields = '';
if (is_array($_POST) && sizeof($_POST) > 0) {
reset($_POST);
while (list($key, $value) = each($_POST)) {
if (strlen($value) > 0 && $key != tep_session_name() && $key != 'WantsBond' && $key != 'x' && $key != 'y') {
$hidden_fields .= tep_draw_hidden_field($key, stripslashes($value));
}
}
}
$regs = array();
preg_match_all("'<BondingSignal[^>]*?>.*?</BondingSignal>'", $_SESSION['nusoap_response'], $regs);
$rollover = end($regs[0]);
$rollover = strip_tags(substr($rollover, strpos($rollover, '>') + 1));
$rollover = html_entity_decode($rollover);
$output_title = tep_draw_form('buysafe_confirmation', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post') . tep_draw_hidden_field('WantsBond', $WantsBond ? $WantsBond : 'false') . $hidden_fields . '
<script src="' . MODULE_ADDONS_BUYSAFE_ROLLOVER_URL . '" type="text/javascript" language="javascript" charset="utf-8"></script>
<script language="JavaScript" type="text/javascript">
<!--
function buySAFEOnClick() {
if (document.buysafe_confirmation.WantsBond.value == \'false\') {
document.buysafe_confirmation.WantsBond.value = \'true\';
} else {
document.buysafe_confirmation.WantsBond.value = \'false\';
}
document.buysafe_confirmation.submit();
}
//-->
</script>' . $rollover . '</form>';
} else {
$output_title = $buysafe_result['CartLineDisplayText'];
}
$this->output[] = array('title' => $output_title, 'text' => $buysafe_result['BondCostDisplayText'], 'value' => $buysafe_result['BondCostDisplayText'] ? $buysafe_result['TotalBondCost'] : 0);
if ($buysafe_result['BondCostDisplayText'] && $buysafe_result['TotalBondCost']) {
$order->info['total'] += $buysafe_result['TotalBondCost'];
}
}
// end if (is_array($buysafe_result))
}
开发者ID:resultsonlyweb,项目名称:loaded6-template,代码行数:44,代码来源:ot_buysafe.php
示例10: execute
function execute()
{
global $PHP_SELF, $currencies, $HTTP_GET_VARS, $request_type, $currency, $oscTemplate;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (isset($currencies) && is_object($currencies) && count($currencies->currencies) > 1) {
reset($currencies->currencies);
$currencies_array = array();
while (list($key, $value) = each($currencies->currencies)) {
$currencies_array[] = array('id' => $key, 'text' => $value['title']);
}
$hidden_get_variables = '';
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if (is_string($value) && $key != 'currency' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
$hidden_get_variables .= tep_draw_hidden_field($key, $value);
}
}
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_CURRENCIES_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' ' . tep_draw_form('currencies', tep_href_link($PHP_SELF, '', $request_type, false), 'get') . ' ' . tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onchange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id() . '</form>' . ' </div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:22,代码来源:bm_currencies.php
示例11: tep_href_link
}
$auth->login($get_forum_username['username_clean'], $_POST['password'], $remember, 1, 0);
}
/*FORUM*/
// navigation history
$extra_link_data = '';
if (isset($_GET['language'])) {
$extra_link_data = 'language=' . $_GET['language'];
}
if (sizeof($navigation->snapshot) > 0 && !strstr($navigation->snapshot['page'], 'login.php')) {
$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())) . '&' . $extra_link_data, $navigation->snapshot['mode']);
tep_redirect($origin_href);
} else {
if (sizeof($navigation->path) > 0 && !strstr($navigation->path[$last]['page'], 'login.php')) {
$last = sizeof($navigation->path) - 1;
$origin_href = tep_href_link($navigation->path[$last]['page'], tep_array_to_string($navigation->path[$last]['get'], array(tep_session_name())) . '&' . $extra_link_data, $navigation->path[$last]['mode']);
tep_redirect($origin_href);
} else {
if (strstr($_SERVER['HTTP_REFERER'], 'logoff.php')) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, $extra_link_data));
} else {
tep_redirect(tep_href_link(FILENAME_DEFAULT, $extra_link_data));
}
}
}
}
}
}
}
if ($error == true) {
$messageStack->add('login', Translate('Fout: er kon niet ingelogd worden met het ingegeven e-mailadres en wachtwoord. Gelieve opnieuw te proberen'));
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:31,代码来源:login.php
示例12: sprintf
line-height: 1.5;
}
</style>
<p class="pageHeading"><?php
echo STORE_NAME;
?>
</p>
<p class="main" align="center"><?php
echo MODULE_PAYMENT_WORLDPAY_JUNIOR_TEXT_SUCCESSFUL_TRANSACTION;
?>
</p>
<p align="center"><input type="button" value="<?php
echo sprintf(MODULE_PAYMENT_WORLDPAY_JUNIOR_TEXT_CONTINUE_BUTTON, addslashes(STORE_NAME));
?>
" onclick="document.location.href='<?php
echo tep_href_link(FILENAME_CHECKOUT_PROCESS, tep_session_name() . '=' . $HTTP_POST_VARS['M_sid'] . '&hash=' . $HTTP_POST_VARS['hash'], 'SSL', false);
?>
';"></p>
<p> </p>
<WPDISPLAY ITEM=banner>
<?php
}
}
}
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:junior_callback.php
示例13: mkdir
mkdir($categories_cache_dir, 0777);
}
$categories_cache_dir .= $products_types['products_types_id'] . '/';
if (!is_dir($categories_cache_dir)) {
mkdir($categories_cache_dir, 0777);
}
$categories_cache_filename = $categories_cache_dir . 'tree_0.html';
$include_categories_cache_filename = false;
if (file_exists($categories_cache_filename)) {
if (date('Y-m-d H:i:s', filemtime($categories_cache_filename)) > $products_types['products_last_modified']) {
$include_categories_cache_filename = true;
}
}
if ($include_categories_cache_filename == false) {
$categories_string = tep_show_category(0, 1, '', $products_types['products_types_id'], true);
$categories_string = str_replace('?' . tep_session_name() . '=' . tep_session_id(), '', $categories_string);
$fp = fopen($categories_cache_filename, 'w');
fwrite($fp, $categories_string);
fclose($fp);
} else {
$categories_string = '';
$fp = fopen($categories_cache_filename, 'r');
while (!feof($fp)) {
$categories_string .= fgets($fp, 400);
}
fclose($fp);
}
if ($products_types['products_types_default_status'] == '0') {
echo ' <div class="li"><div class="level_1"><a href="' . tep_href_link(FILENAME_CATEGORIES, 'tPath=' . $products_types['products_types_id'] . '&view=all') . '" class="active">' . TEXT_ALL_CATEGORY_PRODUCTS . '</a></div></div>' . "\n";
} elseif ($products_types['products_types_default_status'] == '1') {
$specials_types_query = tep_db_query("select specials_types_id, specials_types_path, specials_types_name from " . TABLE_SPECIALS_TYPES . " where specials_types_id in ('" . implode("', '", $active_specials_types_array) . "') and language_id = '" . (int) DEFAULT_LANGUAGE_ID . "' order by sort_order, specials_types_name limit 4");
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:loader.php
示例14: tep_redirect
tep_redirect($_SERVER['HTTP_REFERER']);
}
} elseif (!tep_session_is_registered('enable_ssl')) {
if ($request_type == 'SSL') {
$enable_ssl = 'on';
tep_session_register('enable_ssl');
} elseif (isset($HTTP_GET_VARS['ssl']) && ($HTTP_GET_VARS['ssl'] == 'on' || $HTTP_GET_VARS['ssl'] == 'off')) {
$enable_ssl = $HTTP_GET_VARS['ssl'];
if (!tep_session_is_registered('enable_ssl')) {
tep_session_register('enable_ssl');
}
if (strpos($_SERVER['HTTP_REFERER'], str_replace('http://', '', HTTP_SERVER)) !== false) {
tep_redirect($_SERVER['HTTP_REFERER']);
}
} else {
$session_name = tep_session_name();
$session_id = tep_session_id();
$link = REQUEST_URI;
if (strpos($link, $session_name) === false) {
if (strpos($link, '?') !== false) {
$link .= '&' . $session_name . '=' . $session_id;
} else {
$link .= '?' . $session_name . '=' . $session_id;
}
}
if (strpos($link, '?') !== false) {
$link .= '&ssl=ssl_value';
} else {
$link .= '?ssl=ssl_value';
}
$javascript = 'ssl_check.js.php';
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:application_top.php
示例15: tep_hide_session_id
function tep_hide_session_id()
{
global $session_started, $SID;
if ($session_started == true && tep_not_null($SID)) {
return tep_draw_hidden_field(tep_session_name(), tep_session_id());
}
}
开发者ID:eosc,项目名称:EosC-2.3,代码行数:7,代码来源:html_output.php
示例16: before_process
function before_process()
{
global $HTTP_POST_VARS;
if ($HTTP_POST_VARS['valid'] == 'true') {
if ($remote_host = getenv('REMOTE_HOST')) {
if ($remote_host != 'secpay.com') {
$remote_host = gethostbyaddr($remote_host);
}
if ($remote_host != 'secpay.com') {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_session_name() . '=' . $HTTP_POST_VARS[tep_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false));
}
} else {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_session_name() . '=' . $HTTP_POST_VARS[tep_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false));
}
}
}
开发者ID:respencer,项目名称:oscommerce2,代码行数:16,代码来源:secpay.php
示例17: tep_get_params
function tep_get_params($exclude_array = '')
{
global $_GET;
if (!is_array($exclude_array)) {
$exclude_array = array();
}
$get_url = '';
if (is_array($_GET) && sizeof($_GET) > 0) {
reset($_GET);
while (list($key, $value) = each($_GET)) {
if (strlen($value) > 0 && $key != tep_session_name() && $key != 'error' && !in_array($key, $exclude_array) && $key != 'x' && $key != 'y') {
$get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';
}
}
}
return $get_url;
}
开发者ID:rongandat,项目名称:ookcart-project,代码行数:17,代码来源:general.php
示例18: tep_session_name
tep_session_name('osCsid');
tep_session_save_path(SESSION_WRITE_DIRECTORY);
// set the session cookie parameters
if (function_exists('session_set_cookie_params')) {
session_set_cookie_params(0, $cookie_path, $cookie_domain);
} elseif (function_exists('ini_set')) {
ini_set('session.cookie_lifetime', '0');
ini_set('session.cookie_path', $cookie_path);
ini_set('session.cookie_domain', $cookie_domain);
}
@ini_set('session.use_only_cookies', SESSION_FORCE_COOKIE_USE == 'True' ? 1 : 0);
// set the session ID if it exists
if (isset($HTTP_POST_VARS[tep_session_name()])) {
tep_session_id($HTTP_POST_VARS[tep_session_name()]);
} elseif ($request_type == 'SSL' && isset($HTTP_GET_VARS[tep_session_name()])) {
tep_session_id($HTTP_GET_VARS[tep_session_name()]);
}
// start the session
$session_started = false;
if (SESSION_FORCE_COOKIE_USE == 'True') {
tep_setcookie('cookie_test', 'please_accept_for_session', time() + 60 * 60 * 24 * 30, $cookie_path, $cookie_domain);
if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
tep_session_start();
$session_started = true;
}
} elseif (SESSION_BLOCK_SPIDERS == 'True') {
$user_agent = strtolower(getenv('HTTP_USER_AGENT'));
$spider_flag = false;
if (tep_not_null($user_agent)) {
$spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
for ($i = 0, $n = sizeof($spiders); $i < $n; $i++) {
开发者ID:grum1965,项目名称:Plaster-Ceiling-Roses,代码行数:31,代码来源:application_top.php
示例19: define
define($configuration['cfgKey'], $configuration['cfgValue']);
}
// define our general functions used application-wide
require DIR_WS_FUNCTIONS . 'general.php';
require DIR_WS_FUNCTIONS . 'html_output.php';
// initialize the logger class
require DIR_WS_CLASSES . 'logger.php';
// include shopping cart class
require DIR_WS_CLASSES . 'shopping_cart.php';
// define how the session functions will be used
require DIR_WS_FUNCTIONS . 'sessions.php';
// set the cookie domain
$cookie_domain = $request_type == 'NONSSL' ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN;
$cookie_path = $request_type == 'NONSSL' ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH;
// set the session name and save path
tep_session_name('osCAdminID');
tep_session_save_path(SESSION_WRITE_DIRECTORY);
// set the session cookie parameters
if (function_exists('session_set_cookie_params')) {
session_set_cookie_params(0, $cookie_path, $cookie_domain);
} elseif (function_exists('ini_set')) {
ini_set('session.cookie_lifetime', '0');
ini_set('session.cookie_path', $cookie_path);
ini_set('session.cookie_domain', $cookie_domain);
}
@ini_set('session.use_only_cookies', SESSION_FORCE_COOKIE_USE == 'True' ? 1 : 0);
// lets start our session
tep_session_start();
if (PHP_VERSION >= 4.3 && function_exists('ini_get') && ini_get('register_globals') == false) {
extract($_SESSION, EXTR_OVERWRITE + EXTR_REFS);
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:31,代码来源:application_top.php
示例20: process_button
function process_button($transactionID = 0, $key = "") {
// Change made by using PlugnPay API Connection
$card_cvv=$_POST['cvv'];
$process_button_string = tep_draw_hidden_field('credit_card_type', $_POST['credit_card_type']) .
tep_draw_hidden_field('card_owner', $_POST['plugnpay_cc_owner']) .
tep_draw_hidden_field('card_cvv', $_POST['cvv']) .
tep_draw_hidden_field('transactionID', $transactionID) .
tep_draw_hidden_field('key', $key) .
tep_draw_hidden_field('sess_id', tep_session_id()) .
tep_draw_hidden_field('card_number', $this->cc_card_number) .
tep_draw_hidden_field('card_exp', $this->cc_expiry_month . substr($this->cc_expiry_year, -2));
$process_button_string .= tep_draw_hidden_field(tep_session_name(), tep_session_id());
return $process_button_string;
}
开发者ID:nixonch,项目名称:a2billing,代码行数:16,代码来源:plugnpay.php
注:本文中的tep_session_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论