category_path.php

来自「this the oscommerce 3.0 aplha 4」· PHP 代码 · 共 52 行

PHP
52
字号
<?php/*  $Id: category_path.php 1498 2007-03-29 14:04:50Z hpdl $  osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com  Copyright (c) 2007 osCommerce  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License v2 (1991)  as published by the Free Software Foundation.*/  class osC_Services_category_path {    function start() {      global $osC_CategoryTree;      osC_Services_category_path::process();      include('includes/classes/category_tree.php');      $osC_CategoryTree = new osC_CategoryTree();      return true;    }    function process($id = null) {      global $cPath, $cPath_array, $current_category_id, $osC_CategoryTree;      $cPath = '';      $cPath_array = array();      $current_category_id = 0;      if (isset($_GET['cPath'])) {        $cPath = $_GET['cPath'];      } elseif (!empty($id)) {        $cPath = $osC_CategoryTree->buildBreadcrumb($id);      }      if (!empty($cPath)) {        $cPath_array = array_unique(array_filter(explode('_', $cPath), 'is_numeric'));        $cPath = implode('_', $cPath_array);        $current_category_id = end($cPath_array);      }    }    function stop() {      return true;    }  }?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?