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


PHP tep_exit函数代码示例

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


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

示例1: tep_redirect

function tep_redirect($url, $response_code = 0)
{
    $url = str_replace('&', '&', $url);
    if (basename($url) == FILENAME_ERROR_404) {
        $response_code = '301';
    }
    if ($response_code > 0) {
        header('location: ' . $url, true, $response_code);
    } else {
        header('location: ' . $url);
    }
    tep_exit();
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:13,代码来源:general_old.php

示例2: tep_redirect

  function tep_redirect($url) {
    if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
      tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
    }

    if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
      if (HTTP_SERVER != "" && substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
        $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
      }
    }

    header('Location: ' . $url);

    tep_exit();
  }
开发者ID:nixonch,项目名称:a2billing,代码行数:15,代码来源:general.php

示例3: tep_redirect

function tep_redirect($url)
{
    if (strstr($url, "\n") != false || strstr($url, "\r") != false) {
        tep_redirect(tep_href_link('index.php', '', 'NONSSL', false));
    }
    if (ENABLE_SSL == true && getenv('HTTPS') == 'on') {
        // We are loading an SSL page
        if (substr($url, 0, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)) == HTTP_SERVER . DIR_WS_HTTP_CATALOG) {
            // NONSSL url
            $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG));
            // Change it to SSL
        }
    }
    if (strpos($url, '&') !== false) {
        $url = str_replace('&', '&', $url);
    }
    header('Location: ' . $url);
    tep_exit();
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:19,代码来源:general.php

示例4: tep_redirect

function tep_redirect($url)
{
    if (strstr($url, "\n") != false || strstr($url, "\r") != false) {
        tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
    }
    if (ENABLE_SSL == true && getenv('HTTPS') == 'on') {
        // We are loading an SSL page
        if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) {
            // NONSSL url
            $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER));
            // Change it to SSL
        }
    }
    if (false !== strpos($url, '&')) {
        $url = str_replace('&', '&', $url);
    }
    session_write_close();
    header('Location: ' . $url);
    tep_exit();
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:20,代码来源:general.php

示例5: tep_redirect

function tep_redirect($url)
{
    global $request_type;
    if (strstr($url, "\n") != false || strstr($url, "\r") != false) {
        tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
    }
    if (ENABLE_SSL == true && $request_type == 'SSL') {
        // We are loading an SSL page
        if (substr($url, 0, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)) == HTTP_SERVER . DIR_WS_HTTP_CATALOG) {
            // NONSSL url
            $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG));
            // Change it to SSL
        }
    }
    if (strpos($url, '&') !== false) {
        $url = str_replace('&', '&', $url);
    }
    header('Location: ' . $url);
    tep_exit();
}
开发者ID:atmediacom,项目名称:oscommerce2,代码行数:20,代码来源:general.php

示例6: tep_redirect

function tep_redirect($url)
{
    echo '<script language="javascript" >window.location="' . $url . '"; </script>';
    // header('Location: ' . $url);
    tep_exit();
}
开发者ID:rongandat,项目名称:ookcart-project,代码行数:6,代码来源:general.php

示例7: generate

function generate($HTTP_GET_VARS)
{
    global $languages_id, $all_categories, $currency, $currencies, $categories_audio, $customer_discount, $cart, $breadcrumb;
    $customer_discount = $cart->get_customer_discount();
    if (!is_array($customer_discount)) {
        $customer_discount = array();
    }
    $content = FILENAME_PRICELIST;
    $page = tep_db_query_fetch_array("\n\t\t\tSELECT pages_id, \n\t\t\tpages_name, \n\t\t\tpages_additional_description, \n\t\t\tpages_description \n\t\t\tFROM " . TABLE_PAGES . " \n\t\t\tWHERE pages_filename = '" . tep_db_input(basename($content)) . "' \n\t\t\tAND language_id = '" . (int) $languages_id . "'");
    define('ADDITIONAL_DESCRIPTION', $page['pages_additional_description']);
    $translation_query = tep_db_query("\n\t\t\tSELECT pages_translation_key, \n\t\t\tpages_translation_value \n\t\t\tFROM " . TABLE_PAGES_TRANSLATION . " \n\t\t\tWHERE pages_filename = '" . tep_db_input(basename($content)) . "' \n\t\t\tAND language_id = '" . (int) $languages_id . "'");
    while ($translation = tep_db_fetch_array($translation_query)) {
        define($translation['pages_translation_key'], $translation['pages_translation_value']);
    }
    $breadcrumb->add($page['pages_name'], tep_href_link(FILENAME_PRICELIST));
    $fields_array = array();
    $fields_array['products_model'] = TEXT_CHOOSE_MODEL;
    $fields_array['products_name'] = TEXT_CHOOSE_NAME;
    $fields_array['categories_name'] = TEXT_CHOOSE_CATEGORY;
    $fields_array['authors_name'] = TEXT_CHOOSE_AUTHOR;
    $fields_array['manufacturers_name'] = TEXT_CHOOSE_MANUFACTURER;
    $fields_array['series_name'] = TEXT_CHOOSE_SERIE;
    $fields_array['products_description'] = TEXT_CHOOSE_DESCRIPTION;
    $fields_array['products_price'] = TEXT_CHOOSE_PRICE;
    $fields_array['products_year'] = TEXT_CHOOSE_YEAR;
    $fields_array['products_pages_count'] = TEXT_CHOOSE_PAGES_COUNT;
    $fields_array['products_copies'] = TEXT_CHOOSE_COPIES;
    $fields_array['products_covers_name'] = TEXT_CHOOSE_COVER;
    $fields_array['products_formats_name'] = TEXT_CHOOSE_FORMAT;
    $fields_array['products_image'] = TEXT_CHOOSE_IMAGE;
    $fields_array['products_url'] = TEXT_CHOOSE_URL;
    $fileds_required = array('products_model', 'products_name', 'authors_name', 'products_price', 'manufacturers_name');
    $specials_array = array();
    $specials_types_query = tep_db_query("\n\t\t\tSELECT specials_types_id, \n\t\t\tspecials_types_name \n\t\t\tFROM " . TABLE_SPECIALS_TYPES . " \n\t\t\tWHERE specials_types_status = '1' \n\t\t\tAND specials_types_path <> '' \n\t\t\tAND language_id = '" . (int) DEFAULT_LANGUAGE_ID . "'");
    while ($specials_types = tep_db_fetch_array($specials_types_query)) {
        $specials_type_check = tep_db_query_fetch_array("\n\t\t\t\tSELECT count(*) as total \n\t\t\t\tFROM " . TABLE_SPECIALS . " \n\t\t\t\tWHERE specials_types_id = '" . (int) $specials_types['specials_types_id'] . "' \n\t\t\t\tAND status = '1'");
        if ($specials_type_check['total'] > 0) {
            $specials_array[$specials_types['specials_types_id']] = $specials_types['specials_types_name'];
        }
    }
    $specials_periods_array = array(array('id' => 'w', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_WEEK), array('id' => '2w', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_2_WEEK), array('id' => 'm', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_MONTH), array('id' => 'h', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_HALF_YEAR));
    $fields = array();
    //здесь была проверка на выдачу определенных полей
    $categories = array();
    //здесь была проверка на выдачу определенных категорий
    $manufacturers = array();
    //здесь была проверка на выдачу определенных издательств
    $specials = array();
    $specials_periods = array();
    ////здесь была проверка на выдачу определенных типов
    $ff = 'xml';
    $status = 'active';
    $compression_method = '';
    //проверить наличие переменной далее
    $type_info_query = tep_db_query("\n\t\t\tSELECT products_types_id, \n\t\t\tproducts_last_modified \n\t\t\tFROM " . TABLE_PRODUCTS_TYPES . " \n\t\t\tWHERE products_types_status = '1'" . (tep_not_null($HTTP_GET_VARS['type']) ? " AND products_types_path = '" . tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['type'])) . "'" : " AND products_types_default_status = '1'") . " limit 1");
    if (tep_db_num_rows($type_info_query) < 1) {
        tep_exit();
    } else {
        $type_info = tep_db_fetch_array($type_info_query);
        $products_types_id = $type_info['products_types_id'];
        $products_last_modified = strtotime($type_info['products_last_modified']);
    }
    $select_string_select = "SELECT distinct p.products_id";
    $select_string_from = " FROM " . TABLE_PRODUCTS_INFO . " p";
    $select_string_where = " WHERE p.products_types_id = '" . (int) $products_types_id . "' AND p.categories_id <> '4990' \n\tAND p.products_status = '1'" . ($status == 'active' ? " AND p.products_listing_status = '1'" : "") . " AND p.products_price > '0'";
    //Формируем список категорий
    $disabled_categories = array();
    $type_categories_check = tep_db_query_fetch_array("\n\t\t\tSELECT categories_id \n\t\t\tFROM " . TABLE_CATEGORIES . " \n\t\t\tWHERE products_types_id = '" . (int) $products_types_id . "'");
    if ($type_categories_check['categories_id'] > 0) {
        $active_categories = array();
    } else {
        $active_categories = array('0');
    }
    $categories_query = tep_db_query("\n\t\t\tSELECT categories_id, \n\t\t\tcategories_xml_status \n\t\t\tFROM " . TABLE_CATEGORIES . " \n\t\t\tWHERE products_types_id = '" . (int) $products_types_id . "' \n\t\t\tAND categories_status = '1' \n\t\t\tORDER BY parent_id");
    while ($categories = tep_db_fetch_array($categories_query)) {
        if ($categories['categories_xml_status'] < 1 && !in_array($categories['categories_id'], $disabled_categories)) {
            $disabled_categories[] = $categories['categories_id'];
            tep_get_subcategories($disabled_categories, $categories['categories_id']);
        } elseif (!in_array($categories['categories_id'], $disabled_categories)) {
            if (!in_array($categories['categories_id'], $active_categories)) {
                $active_categories[] = $categories['categories_id'];
            }
        }
    }
    $select_string_where .= " AND p.categories_id > '0'";
    if (sizeof($disabled_categories) > 0) {
        $select_string_where .= " AND p.categories_id NOT IN ('" . implode("', '", $disabled_categories) . "')";
    }
    //END Формируем список категорий
    $all_categories = array();
    //Здесь была выборка на разные сайты
    $separator = ';';
    $limit_string = "";
    $select_string = $select_string_select . $select_string_from . $select_string_where;
    $select_string .= " GROUP BY p.products_id";
    if ($HTTP_GET_VARS['file'] !== '') {
        $pricelist_filename = $HTTP_GET_VARS['file'];
    }
    //создаем массив символов которые будем менять
    $from = array('<', '>', '&', '"', '&#34;', '&#60;', '&#62;', '&#034;', '&#060;', '&#062;', "\r\n");
//.........这里部分代码省略.........
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:101,代码来源:i.ua.functions.php

示例8: tep_db_input

                $sql = "update " . TABLE_PRODUCTS_DESCRIPTION . " set products_description = '" . tep_db_input($products_description) . "' where products_id = '" . (int) $products_id . "' and language_id = '1'";
                tep_db_query($sql);
            }
        }
        tep_exit();
        break;
    case 'subscribe':
        if (tep_session_is_registered('customer_id')) {
            $sub = (int) $HTTP_GET_VARS['sub'];
            $type = (int) $HTTP_GET_VARS['type'];
            //1: Тематики и разделы
            //2: Серии
            //3: Авторы
            //4: Издательство
            $cid = (int) $HTTP_GET_VARS['cid'];
            $tables_array = array(TABLE_CATEGORIES, TABLE_SERIES, TABLE_AUTHORS, TABLE_MANUFACTURERS);
            $params_array = array('categories_id', 'series_id', 'authors_id', 'manufacturers_id');
            $category = tep_db_query("select 1 from " . $tables_array[$type - 1] . " where " . $params_array[$type - 1] . " = '" . $cid . "'");
            if (tep_db_num_rows($category) > 0) {
                if ($sub == 1) {
                    tep_db_query("INSERT INTO subscribe (user_id, category_id, type_id, date_created) VALUES (" . $customer_id . ", " . $cid . ", " . $type . ", NOW());");
                } elseif ($sub == 2) {
                    tep_db_query("delete from subscribe where user_id = '" . $customer_id . "' and category_id = '" . $cid . "' and type_id = '" . $type . "'");
                }
            }
        }
        tep_exit();
        break;
}
tep_exit();
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:30,代码来源:loader.php

示例9: generate

function generate($HTTP_GET_VARS)
{
    global $languages_id, $all_categories, $currency, $currencies, $categories_audio, $customer_discount, $cart, $breadcrumb;
    $customer_discount = $cart->get_customer_discount();
    if (!is_array($customer_discount)) {
        $customer_discount = array();
    }
    $content = FILENAME_PRICELIST;
    $page = tep_db_query_fetch_array("\n\t\t\tSELECT pages_id, \n\t\t\tpages_name, \n\t\t\tpages_additional_description, \n\t\t\tpages_description \n\t\t\tFROM " . TABLE_PAGES . " \n\t\t\tWHERE pages_filename = '" . tep_db_input(basename($content)) . "' \n\t\t\tAND language_id = '" . (int) $languages_id . "'");
    define('ADDITIONAL_DESCRIPTION', $page['pages_additional_description']);
    $translation_query = tep_db_query("\n\t\t\tSELECT pages_translation_key, \n\t\t\tpages_translation_value \n\t\t\tFROM " . TABLE_PAGES_TRANSLATION . " \n\t\t\tWHERE pages_filename = '" . tep_db_input(basename($content)) . "' \n\t\t\tAND language_id = '" . (int) $languages_id . "'");
    while ($translation = tep_db_fetch_array($translation_query)) {
        define($translation['pages_translation_key'], $translation['pages_translation_value']);
    }
    $breadcrumb->add($page['pages_name'], tep_href_link(FILENAME_PRICELIST));
    $fields_array = array();
    $fields_array['products_model'] = TEXT_CHOOSE_MODEL;
    $fields_array['products_name'] = TEXT_CHOOSE_NAME;
    $fields_array['categories_name'] = TEXT_CHOOSE_CATEGORY;
    $fields_array['authors_name'] = TEXT_CHOOSE_AUTHOR;
    $fields_array['manufacturers_name'] = TEXT_CHOOSE_MANUFACTURER;
    $fields_array['series_name'] = TEXT_CHOOSE_SERIE;
    $fields_array['products_description'] = TEXT_CHOOSE_DESCRIPTION;
    $fields_array['products_price'] = TEXT_CHOOSE_PRICE;
    $fields_array['products_year'] = TEXT_CHOOSE_YEAR;
    $fields_array['products_pages_count'] = TEXT_CHOOSE_PAGES_COUNT;
    $fields_array['products_copies'] = TEXT_CHOOSE_COPIES;
    $fields_array['products_covers_name'] = TEXT_CHOOSE_COVER;
    $fields_array['products_formats_name'] = TEXT_CHOOSE_FORMAT;
    $fields_array['products_image'] = TEXT_CHOOSE_IMAGE;
    $fields_array['products_url'] = TEXT_CHOOSE_URL;
    $fileds_required = array('products_model', 'products_name', 'authors_name', 'products_price', 'manufacturers_name');
    $specials_array = array();
    $specials_types_query = tep_db_query("\n\t\t\tSELECT specials_types_id, \n\t\t\tspecials_types_name \n\t\t\tFROM " . TABLE_SPECIALS_TYPES . " \n\t\t\tWHERE specials_types_status = '1' \n\t\t\tAND specials_types_path <> '' \n\t\t\tAND language_id = '" . (int) DEFAULT_LANGUAGE_ID . "'");
    while ($specials_types = tep_db_fetch_array($specials_types_query)) {
        $specials_type_check = tep_db_query_fetch_array("\n\t\t\t\tSELECT count(*) as total \n\t\t\t\tFROM " . TABLE_SPECIALS . " \n\t\t\t\tWHERE specials_types_id = '" . (int) $specials_types['specials_types_id'] . "' \n\t\t\t\tAND status = '1'");
        if ($specials_type_check['total'] > 0) {
            $specials_array[$specials_types['specials_types_id']] = $specials_types['specials_types_name'];
        }
    }
    $specials_periods_array = array(array('id' => 'w', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_WEEK), array('id' => '2w', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_2_WEEK), array('id' => 'm', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_MONTH), array('id' => 'h', 'text' => ENTRY_PRICELIST_SPECIALS_LAST_HALF_YEAR));
    $fields = array();
    //здесь была проверка на выдачу определенных полей
    $categories = array();
    //здесь была проверка на выдачу определенных категорий
    $manufacturers = array();
    //здесь была проверка на выдачу определенных издательств
    $specials = array();
    $specials_periods = array();
    ////здесь была проверка на выдачу определенных типов
    $ff = 'xml';
    $status = 'active';
    $compression_method = '';
    //проверить наличие переменной далее
    $type_info_query = tep_db_query("SELECT products_types_id, products_last_modified FROM " . TABLE_PRODUCTS_TYPES . " WHERE products_types_status = '1'" . (tep_not_null($HTTP_GET_VARS['type']) ? " and products_types_path = '" . tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['type'])) . "'" : " and products_types_default_status = '1'") . " limit 1");
    if (tep_db_num_rows($type_info_query) < 1) {
        tep_exit();
    } else {
        $type_info = tep_db_fetch_array($type_info_query);
        $products_types_id = $type_info['products_types_id'];
        $products_last_modified = strtotime($type_info['products_last_modified']);
    }
    $select_string_select = "SELECT distinct p.products_id";
    $select_string_from = " FROM " . TABLE_PRODUCTS_INFO . " p";
    $select_string_where = " WHERE p.products_types_id = '" . (int) $products_types_id . "' and p.categories_id <> '4990' and p.products_status = '1'" . ($status == 'active' ? " and p.products_listing_status = '1'" : "") . " and p.products_price > '0'";
    if (sizeof($categories) > 0) {
        $subcategories_array = array();
        reset($categories);
        while (list(, $category_id) = each($categories)) {
            $subcategories_array[] = $category_id;
            tep_get_subcategories($subcategories_array, $category_id);
        }
        $select_string_where .= " and p.categories_id in ('" . implode("', '", $subcategories_array) . "')";
    } else {
        $disabled_categories = array();
        $type_categories_check_query = tep_db_query("SELECT categories_id FROM " . TABLE_CATEGORIES . " WHERE products_types_id = '" . (int) $products_types_id . "'");
        $type_categories_check = tep_db_fetch_array($type_categories_check_query);
        if ($type_categories_check['categories_id'] > 0) {
            $active_categories = array();
        } else {
            $active_categories = array('0');
        }
        $categories_query = tep_db_query("SELECT categories_id, categories_xml_status FROM " . TABLE_CATEGORIES . " WHERE products_types_id = '" . (int) $products_types_id . "' and categories_status = '1' order by parent_id");
        while ($categories = tep_db_fetch_array($categories_query)) {
            if ($categories['categories_xml_status'] < 1 && !in_array($categories['categories_id'], $disabled_categories)) {
                $disabled_categories[] = $categories['categories_id'];
                tep_get_subcategories($disabled_categories, $categories['categories_id']);
            } elseif (!in_array($categories['categories_id'], $disabled_categories)) {
                if (!in_array($categories['categories_id'], $active_categories)) {
                    $active_categories[] = $categories['categories_id'];
                }
            }
        }
        $select_string_where .= " and p.categories_id > '0'";
        if (sizeof($disabled_categories) > 0) {
            $select_string_where .= " and p.categories_id not in ('" . implode("', '", $disabled_categories) . "')";
        }
    }
    //	if ($customer_id==2) { echo $select_string_where; die; }
    $manufacturers_array = array();
//.........这里部分代码省略.........
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:101,代码来源:yandex.functions+copy.php

示例10: tep_redirect

function tep_redirect($url)
{
    header('Location: ' . $url);
    tep_exit();
}
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:5,代码来源:functions.php


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