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


PHP tep_reset_cache_block函数代码示例

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


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

示例1: tep_remove_product

function tep_remove_product($product_id)
{
    $product_image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $product_id . "'");
    $product_image = tep_db_fetch_array($product_image_query);
    $duplicate_image_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " where products_image = '" . tep_db_input($product_image['products_image']) . "'");
    $duplicate_image = tep_db_fetch_array($duplicate_image_query);
    if ($duplicate_image['total'] < 2) {
        if (file_exists(DIR_FS_CATALOG_IMAGES . $product_image['products_image'])) {
            @unlink(DIR_FS_CATALOG_IMAGES . $product_image['products_image']);
        }
    }
    $product_images_query = tep_db_query("select image from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $product_id . "'");
    if (tep_db_num_rows($product_images_query)) {
        while ($product_images = tep_db_fetch_array($product_images_query)) {
            $duplicate_image_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_IMAGES . " where image = '" . tep_db_input($product_images['image']) . "'");
            $duplicate_image = tep_db_fetch_array($duplicate_image_query);
            if ($duplicate_image['total'] < 2) {
                if (file_exists(DIR_FS_CATALOG_IMAGES . $product_images['image'])) {
                    @unlink(DIR_FS_CATALOG_IMAGES . $product_images['image']);
                }
            }
        }
        tep_db_query("delete from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $product_id . "'");
    }
    tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int) $product_id . "' or products_id like '" . (int) $product_id . "{%'");
    tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int) $product_id . "' or products_id like '" . (int) $product_id . "{%'");
    $product_reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where products_id = '" . (int) $product_id . "'");
    while ($product_reviews = tep_db_fetch_array($product_reviews_query)) {
        tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $product_reviews['reviews_id'] . "'");
    }
    tep_db_query("delete from " . TABLE_REVIEWS . " where products_id = '" . (int) $product_id . "'");
    if (USE_CACHE == 'true') {
        tep_reset_cache_block('categories');
        tep_reset_cache_block('also_purchased');
    }
}
开发者ID:tapwag,项目名称:oscommerce_deutsch,代码行数:41,代码来源:general.php

示例2: Copyright

/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2014 osCommerce

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (tep_not_null($action)) {
    if ($action == 'reset') {
        tep_reset_cache_block($_GET['block']);
    }
    tep_redirect(tep_href_link(FILENAME_CACHE));
}
// check if the cache directory exists
if (is_dir(DIR_FS_CACHE)) {
    if (!tep_is_writable(DIR_FS_CACHE)) {
        $messageStack->add(ERROR_CACHE_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_CACHE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
require DIR_WS_INCLUDES . 'template_top.php';
?>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:30,代码来源:cache.php

示例3: tep_db_query

                if (file_exists($image_location)) {
                    @unlink($image_location);
                }
            }
            tep_db_query("delete from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int) $manufacturers_id . "'");
            tep_db_query("delete from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int) $manufacturers_id . "'");
            if (isset($HTTP_POST_VARS['delete_products']) && $HTTP_POST_VARS['delete_products'] == 'on') {
                $products_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where manufacturers_id = '" . (int) $manufacturers_id . "'");
                while ($products = tep_db_fetch_array($products_query)) {
                    tep_remove_product($products['products_id']);
                }
            } else {
                tep_db_query("update " . TABLE_PRODUCTS . " set manufacturers_id = '' where manufacturers_id = '" . (int) $manufacturers_id . "'");
            }
            if (USE_CACHE == 'true') {
                tep_reset_cache_block('manufacturers');
            }
            tep_redirect(tep_href_link(FILENAME_MANUFACTURERS, 'page=' . $HTTP_GET_VARS['page']));
            break;
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
开发者ID:JanZ,项目名称:oscommerce2,代码行数:31,代码来源:manufacturers.php

示例4: Copyright

/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2014 osCommerce

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if (tep_not_null($action)) {
    if ($action == 'reset') {
        tep_reset_cache_block($HTTP_GET_VARS['block']);
    }
    tep_redirect(tep_href_link('cache.php'));
}
// check if the cache directory exists
if (is_dir(DIR_FS_CACHE)) {
    if (!tep_is_writable(DIR_FS_CACHE)) {
        $messageStack->add(ERROR_CACHE_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_CACHE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
require 'includes/template_top.php';
?>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:30,代码来源:cache.php

示例5: elseif

                 }
             } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {
                 $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int) $products_id . "'");
                 $product = tep_db_fetch_array($product_query);
                 tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int) $product['products_tax_class_id'] . "', '" . (int) $product['manufacturers_id'] . "')");
                 $dup_products_id = tep_db_insert_id();
                 $description_query = tep_db_query("select language_id, products_name, products_description, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $products_id . "'");
                 while ($description = tep_db_fetch_array($description_query)) {
                     tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_url, products_viewed) values ('" . (int) $dup_products_id . "', '" . (int) $description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
                 }
                 tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int) $dup_products_id . "', '" . (int) $categories_id . "')");
                 $products_id = $dup_products_id;
             }
             if (USE_CACHE == 'true') {
                 tep_reset_cache_block('categories');
                 tep_reset_cache_block('also_purchased');
             }
         }
         tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id));
         break;
     case 'new_product_preview':
         // copy image only if modified
         $products_image = new upload('products_image');
         $products_image->set_destination(DIR_FS_CATALOG_IMAGES);
         if ($products_image->parse() && $products_image->save()) {
             $products_image_name = $products_image->filename;
         } else {
             $products_image_name = isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '';
         }
         break;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:categories.php

示例6: tep_remove_product

function tep_remove_product($product_id)
{
    $product_image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $product_id . "'");
    $product_image = tep_db_fetch_array($product_image_query);
    $duplicate_image_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " where products_image = '" . tep_db_input($product_image['products_image']) . "'");
    $duplicate_image = tep_db_fetch_array($duplicate_image_query);
    if ($duplicate_image['total'] < 2) {
        if (file_exists(DIR_FS_CATALOG_IMAGES . $product_image['products_image'])) {
            @unlink(DIR_FS_CATALOG_IMAGES . $product_image['products_image']);
        }
    }
    tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS . " where master_products_id = '" . (int) $product_id . "'");
    // BOF Separate Pricing per Customer
    tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int) $product_id . "'");
    // EOF Separate Pricing per Customer
    tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int) $product_id . "'");
    //Wishlist addition to delete products from the wishlist when deleted
    tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . (int) $product_id . "'");
    $product_reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where products_id = '" . (int) $product_id . "'");
    while ($product_reviews = tep_db_fetch_array($product_reviews_query)) {
        tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $product_reviews['reviews_id'] . "'");
    }
    tep_db_query("delete from " . TABLE_REVIEWS . " where products_id = '" . (int) $product_id . "'");
    if (USE_CACHE == 'true') {
        tep_reset_cache_block('categories');
        tep_reset_cache_block('also_purchased');
    }
}
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:34,代码来源:general.php

示例7: tep_remove_product

function tep_remove_product($product_id)
{
    $product_image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $product_id . "'");
    $product_image = tep_db_fetch_array($product_image_query);
    $duplicate_image_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " where products_image = '" . tep_db_input($product_image['products_image']) . "'");
    $duplicate_image = tep_db_fetch_array($duplicate_image_query);
    if ($duplicate_image['total'] < 2) {
        if (file_exists(DIR_FS_CATALOG_IMAGES . CATEGORY_IMAGES_DIR . $category_image['categories_image'])) {
            @unlink(DIR_FS_CATALOG_IMAGES . CATEGORY_IMAGES_DIR . $category_image['categories_image']);
        }
    }
    tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS . " where products_id = '" . (int) $product_id . "'");
    // LINE ADDED: MOD - Separate Price per Customer
    tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int) $product_id . "'");
    // BOF QPBPP for SPPC
    tep_db_query("delete from " . TABLE_PRODUCTS_PRICE_BREAK . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES . " where products_id = '" . (int) $product_id . "'");
    // EOF QPBPP for SPPC
    tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int) $product_id . "' or products_id like '" . (int) $product_id . "{%'");
    tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int) $product_id . "' or products_id like '" . (int) $product_id . "{%'");
    // BOF: MOD - Wishlist addition to delete products from the wishlist when deleted
    tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . (int) $product_id . "'");
    tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . (int) $product_id . "'");
    // EOF: MOD - Wishlist addition to delete products from the wishlist when deleted
    $product_reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where products_id = '" . (int) $product_id . "'");
    while ($product_reviews = tep_db_fetch_array($product_reviews_query)) {
        tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $product_reviews['reviews_id'] . "'");
    }
    tep_db_query("delete from " . TABLE_REVIEWS . " where products_id = '" . (int) $product_id . "'");
    if (USE_CACHE == 'true') {
        tep_reset_cache_block('categories');
        tep_reset_cache_block('also_purchased');
    }
    //++++ QT Pro: Begin Changed code
    qtpro_doctor_amputate_all_from_product($product_id);
    //++++ QT Pro: End Changed code
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:41,代码来源:general.php

示例8: tep_remove_article

function tep_remove_article($article_id)
{
    tep_db_query("delete from " . TABLE_ARTICLES . " where articles_id = '" . (int) $article_id . "'");
    tep_db_query("delete from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int) $article_id . "'");
    tep_db_query("delete from " . TABLE_ARTICLES_DESCRIPTION . " where articles_id = '" . (int) $article_id . "'");
    $article_reviews_query = tep_db_query("select reviews_id from " . TABLE_ARTICLE_REVIEWS . " where articles_id = '" . (int) $article_id . "'");
    while ($article_reviews = tep_db_fetch_array($article_reviews_query)) {
        tep_db_query("delete from " . TABLE_ARTICLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $article_reviews['reviews_id'] . "'");
    }
    tep_db_query("delete from " . TABLE_ARTICLE_REVIEWS . " where articles_id = '" . (int) $article_id . "'");
    if (USE_CACHE == 'true') {
        tep_reset_cache_block('topics');
        tep_reset_cache_block('also_purchased');
    }
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:15,代码来源:articles.php

示例9: tep_db_prepare_input

         $news_id = tep_db_prepare_input($HTTP_GET_VARS['nID']);
     }
     $sql_data_array = array('news_title' => tep_db_prepare_input($HTTP_POST_VARS['news_title']), 'news_content' => tep_db_prepare_input($HTTP_POST_VARS['news_content']), 'news_status' => tep_db_prepare_input($HTTP_POST_VARS['news_status']), 'source' => tep_db_prepare_input($HTTP_POST_VARS['source']), 'sort_order' => tep_db_prepare_input($HTTP_POST_VARS['sort_order']), 'news_categories_id' => (int) $current_news_categories_id, 'news_categories_path' => tep_get_news_categories_path_toinsert($current_news_categories_id));
     if (isset($HTTP_POST_VARS['icon']) && tep_not_null($HTTP_POST_VARS['icon']) && $HTTP_POST_VARS['icon'] != 'none') {
         $sql_data_array['icon'] = tep_db_prepare_input($HTTP_POST_VARS['icon']);
     }
     if ($action == 'insert_news') {
         $insert_sql_data = array('date_added' => 'now()');
         $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
         tep_db_perform(TABLE_NEWS, $sql_data_array);
         $news_id = tep_db_insert_id();
     } elseif ($action == 'update_news') {
         tep_db_perform(TABLE_NEWS, $sql_data_array, 'update', "news_id = '" . (int) $news_id . "'");
     }
     if (USE_CACHE == 'true') {
         tep_reset_cache_block('news');
     }
     tep_redirect(tep_href_link(FILENAME_NEWS, 'cPath=' . $cPath . '&nID=' . $news_id));
 }
 break;
 //      case 'copy_to_confirm':
 //        if (isset($HTTP_POST_VARS['news_id']) && isset($HTTP_POST_VARS['news_id'])) {
 //          $news_id = tep_db_prepare_input($HTTP_POST_VARS['news_id']);
 //          $news_id = tep_db_prepare_input($HTTP_POST_VARS['news_id']);
 //
 //          if ($HTTP_POST_VARS['copy_as'] == 'link') {
 //            if ($news_id != $current_news_id) {
 //              $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_news . " where news_id = '" . (int)$news_id . "' and news_id = '" . (int)$news_id . "'");
 //              $check = tep_db_fetch_array($check_query);
 //              if ($check['total'] < '1') {
 //                tep_db_query("insert into " . TABLE_PRODUCTS_TO_news . " (news_id, news_id) values ('" . (int)$news_id . "', '" . (int)$news_id . "')");
开发者ID:quangbt2005,项目名称:belamdep,代码行数:31,代码来源:news.php

示例10: tep_reset_cache_block

                if (USE_CACHE == 'true') {
                    tep_reset_cache_block('pages');
                }
                tep_redirect(tep_href_link(FILENAME_PAGES, 'pID=' . $pages_id));
            }
            break;
        case 'delete_page_confirm':
            if (isset($_POST['pages_id'])) {
                $pages_id = tep_db_prepare_input($_POST['pages_id']);
                if ($pages_id != 1 && $pages_id != 2) {
                    tep_db_query("delete from " . TABLE_PAGES . " where pages_id = '" . (int) $pages_id . "'");
                    tep_db_query("delete from " . TABLE_PAGES_DESCRIPTION . " where pages_id = '" . (int) $pages_id . "'");
                }
            }
            if (USE_CACHE == 'true') {
                tep_reset_cache_block('pages');
            }
            tep_redirect(tep_href_link(FILENAME_PAGES));
            break;
        case 'new_page_preview':
            $pages_image = new upload('pages_image');
            $pages_image->set_destination(DIR_FS_CATALOG_IMAGES);
            if ($pages_image->parse() && $pages_image->save()) {
                $pages_image_name = $pages_image->filename;
            } else {
                $pages_image_name = isset($_POST['pages_previous_image']) ? $_POST['pages_previous_image'] : '';
            }
            break;
    }
}
// check if the catalog image directory exists
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:pages.php

示例11: tep_get_properties

            $properties = tep_get_properties($selectors_id);
            for ($i = 0, $n = sizeof($properties); $i < $n; $i++) {
                $property_element_array = $HTTP_POST_VARS['property_element'];
                $property_value_array = $HTTP_POST_VARS['property_value'];
                $property_id = $properties[$i]['properties_id'];
                $sql_data_array = array('property_element' => tep_db_prepare_input($property_element_array[$property_id]), 'property_value' => tep_db_prepare_input($property_value_array[$property_id]));
                tep_db_perform(TABLE_BTS_CSS_PROPERTIES, $sql_data_array, 'update', "properties_id = '" . (int) $property_id . "' and selectors_id = '" . (int) $selectors_id . "'");
            }
            tep_redirect(tep_href_link(FILENAME_BTS_CSS, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'selID=' . $selectors_id));
            break;
        case 'deleteconfirm':
            $selectors_id = tep_db_prepare_input($HTTP_GET_VARS['selID']);
            tep_db_query("delete from " . TABLE_BTS_CSS_SELECTORS . " where selectors_id = '" . (int) $selectors_id . "'");
            tep_db_query("delete from " . TABLE_BTS_CSS_PROPERTIES . " where selectors_id = '" . (int) $selectors_id . "'");
            if (USE_CACHE == 'true') {
                tep_reset_cache_block('css');
            }
            tep_redirect(tep_href_link(FILENAME_BTS_CSS, 'page=' . $HTTP_GET_VARS['page']));
            break;
    }
}
require DIR_WS_INCLUDES . 'bootstrap_top.php';
?>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE;
?>
开发者ID:osc2nuke,项目名称:demobts,代码行数:31,代码来源:bts_css_ORG.php

示例12: tep_redirect

            tep_redirect(tep_href_link(FILENAME_AUTHORS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'auID=' . $authors_id));
            break;
        case 'deleteconfirm':
            $authors_id = tep_db_prepare_input($_GET['auID']);
            tep_db_query("delete from " . TABLE_AUTHORS . " where authors_id = '" . (int) $authors_id . "'");
            tep_db_query("delete from " . TABLE_AUTHORS_INFO . " where authors_id = '" . (int) $authors_id . "'");
            if (isset($_POST['delete_articles']) && $_POST['delete_articles'] == 'on') {
                $articles_query = tep_db_query("select articles_id from " . TABLE_ARTICLES . " where authors_id = '" . (int) $authors_id . "'");
                while ($articles = tep_db_fetch_array($articles_query)) {
                    tep_remove_article($articles['articles_id']);
                }
            } else {
                tep_db_query("update " . TABLE_ARTICLES . " set authors_id = '' where authors_id = '" . (int) $authors_id . "'");
            }
            if (USE_CACHE == 'true') {
                tep_reset_cache_block('authors');
            }
            tep_redirect(tep_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page']));
            break;
    }
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:authors.php

示例13: echo

    echo ($form_action == 'insert' ? tep_image_submit('button_save.gif', IMAGE_SAVE) : tep_image_submit('button_update.gif', IMAGE_UPDATE)) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_MM_RESPONSEMAIL, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . (isset($HTTP_GET_VARS['nID']) ? 'nID=' . $HTTP_GET_VARS['nID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
    ?>
            		</td>
          		</tr>
        	</table>
        </td>
      	</form>
      </tr>
<?php 
} elseif ($action == 'setflag') {
    if ($HTTP_GET_VARS['flag'] == '0' || $HTTP_GET_VARS['flag'] == '1') {
        if (isset($HTTP_GET_VARS['nID'])) {
            tep_mm_set_mailstatus($HTTP_GET_VARS['nID'], $HTTP_GET_VARS['flag']);
        }
        if (USE_CACHE == 'true') {
            tep_reset_cache_block('topics');
        }
    }
    if ($HTTP_GET_VARS['flag'] == '1') {
        $newstatus = 'Active';
    } else {
        $newstatus = 'Inactive';
    }
    echo '<tr><td class="main">Status changed to: <strong>' . $newstatus . '</strong><a href="' . tep_href_link(FILENAME_MM_RESPONSEMAIL, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID']) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a></td></tr>';
} elseif ($action == 'preview') {
    $nID = tep_db_prepare_input($HTTP_GET_VARS['nID']);
    $mail_query = tep_db_query("select title, htmlcontent, txtcontent, template from " . TABLE_MM_RESPONSEMAIL . " where mail_id = '" . (int) $nID . "'");
    $mail = tep_db_fetch_array($mail_query);
    $template_name = $mail['template'];
    $template_query = tep_db_query("select title, htmlheader, htmlfooter, txtheader, txtfooter from " . TABLE_MM_TEMPLATES . " where title = '" . $template_name . "'");
    $template = tep_db_fetch_array($template_query);
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:31,代码来源:mm_responsemail.php

示例14: process_row


//.........这里部分代码省略.........
        // /////////////////////
        // or do product deletes
    } elseif ($items[$filelayout['v_status']] == EP_DELETE_IT) {
        // Get the ID
        $sql = "SELECT p.products_id as v_products_id    FROM " . TABLE_PRODUCTS . " as p WHERE p.products_model = '" . $items[$filelayout['v_products_model']] . "'";
        $result = tep_db_query($sql);
        $row = tep_db_fetch_array($result);
        if (tep_db_num_rows($result) == 1) {
            tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $row['v_products_id'] . "'");
            $product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $row['v_products_id'] . "'");
            $product_categories = tep_db_fetch_array($product_categories_query);
            if ($product_categories['total'] == '0') {
                // gather product attribute data
                $result = tep_db_query("select pov.products_options_values_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on pa.options_values_id=pov.products_options_values_id where pa.products_id = '" . (int) $row['v_products_id'] . "'");
                $remove_attribs = array();
                while ($tmp_attrib = tep_db_fetch_array($result)) {
                    $remove_attribs[] = $tmp_attrib;
                }
                // check each attribute name for links to other products
                foreach ($remove_attribs as $rakey => $ravalue) {
                    $product_attribs_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " where options_values_id = '" . (int) $ravalue['products_options_values_id'] . "'");
                    $product_attribs = tep_db_fetch_array($product_attribs_query);
                    // if no other products linked, remove attribute name
                    if ((int) $product_attribs['total'] == 1) {
                        tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int) $ravalue['products_options_values_id'] . "'");
                    }
                }
                // remove attribute records
                tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int) $row['v_products_id'] . "'");
                // remove product
                tep_remove_product($row['v_products_id']);
            }
            if (USE_CACHE == 'true') {
                tep_reset_cache_block('categories');
                tep_reset_cache_block('also_purchased');
            }
            echo "Deleted product " . $items[$filelayout['v_products_model']] . " from the database<br />";
        } else {
            echo "Did not delete " . $items['v_products_model'] . " since it is not unique<br> ";
        }
        // //////////////////////////////////
        // or do regular product processing
        // //////////////////////////////////
    } else {
        // /////////////////////////////////////////////////////////////////////
        //
        // Start: Support for other contributions in products table
        //
        // /////////////////////////////////////////////////////////////////////
        $ep_additional_select = '';
        if (EP_ADDITIONAL_IMAGES == true) {
            $ep_additional_select .= 'p.products_image_description as v_products_image_description,';
        }
        if (EP_MORE_PICS_6_SUPPORT == true) {
            $ep_additional_select .= 'p.products_subimage1 as v_products_subimage1,p.products_subimage2 as v_products_subimage2,p.products_subimage3 as v_products_subimage3,p.products_subimage4 as v_products_subimage4,p.products_subimage5 as v_products_subimage5,p.products_subimage6 as v_products_subimage6,';
        }
        if (EP_ULTRPICS_SUPPORT == true) {
            $ep_additional_select .= 'products_image_med as v_products_image_med,products_image_lrg as v_products_image_lrg,products_image_sm_1 as v_products_image_sm_1,products_image_xl_1 as v_products_image_xl_1,products_image_sm_2 as v_products_image_sm_2,products_image_xl_2 as v_products_image_xl_2,products_image_sm_3 as v_products_image_sm_3,products_image_xl_3 as v_products_image_xl_3,products_image_sm_4 as v_products_image_sm_4,products_image_xl_4 as v_products_image_xl_4,products_image_sm_5 as v_products_image_sm_5,products_image_xl_5 as v_products_image_xl_5,products_image_sm_6 as v_products_image_sm_6,products_image_xl_6 as v_products_image_xl_6,';
        }
        if (EP_PDF_UPLOAD_SUPPORT == true) {
            $ep_additional_select .= 'p.products_pdfupload as v_products_pdfupload, p.products_fileupload as v_products_fileupload,';
        }
        if (EP_MVS_SUPPORT == true) {
            $ep_additional_select .= 'vendors_id as v_vendor_id,';
        }
        foreach ($custom_fields[TABLE_PRODUCTS] as $key => $name) {
开发者ID:digideskio,项目名称:oscmax2,代码行数:67,代码来源:easypopulate.php


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