category.php

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

PHP
57
字号
<?php/*  $Id: account.php 207 2005-09-26 01:29:31 +0200 (Mo, 26 Sep 2005) hpdl $  osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com  Copyright (c) 2005 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_Category {    var $_data = array();    function osC_Category($id) {      global $osC_CategoryTree;      if ($osC_CategoryTree->exists($id)) {        $this->_data = $osC_CategoryTree->getData($id);      }    }    function getID() {      return $this->_data['id'];    }    function getTitle() {      return $this->_data['name'];    }    function getImage() {      return $this->_data['image'];    }    function hasParent() {      if ($this->_data['parent_id'] > 0) {        return true;      }      return false;    }    function getParent() {      return $this->_data['parent_id'];    }    function getPath() {      global $osC_CategoryTree;      return $osC_CategoryTree->buildBreadcrumb($this->_data['id']);    }  }?>

⌨️ 快捷键说明

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