[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 init_seo_config.php

Zen Cart 源代码 init_seo_config.php




下载文件

文件名: init_seo_config.php
文件类型: PHP文件
文件大小: 844 Bytes
MD5: cf7b88c98ace84230d2335bf57a71543

init_seo_config.php - 关闭高亮
  1. <?php
  2. if (!defined('IS_ADMIN_FLAG')) {
  3.     die('Illegal Access');
  4. }
  5.  
  6. // Remove the configured extension if present
  7. if(isset($_GET['main_page'])) {
  8.     if(defined('SEO_URL_END') && SEO_URL_END != '') {
  9.         $pos = strrpos($_GET['main_page'], SEO_URL_END);
  10.         if($pos !== false) {
  11.             $_GET['main_page'] = substr($_GET['main_page'], 0, $pos);
  12.         }
  13.     }
  14.  
  15.     if($_GET['main_page'] == FILENAME_PRODUCT_INFO) {
  16.         // Retrieve the product type handler from the database
  17.         $type = $db->Execute(
  18.             'SELECT `pt`.`type_handler` ' .
  19.             'FROM `'. TABLE_PRODUCTS .'` AS `p` ' .
  20.             'LEFT JOIN `'. TABLE_PRODUCT_TYPES .'` AS `pt` ON `pt`.`type_id` = `p`.`products_type` ' .
  21.             'WHERE `p`. `products_id` = \'' . (int)$_GET['products_id'] . '\' LIMIT 1'
  22.         );
  23.         if(!$type->EOF) {
  24.             $_GET['main_page'] = $type->fields['type_handler'] . '_info';
  25.         }
  26.     }
  27. }