getUnitConfig()->getTableName(); if ( $this->Application->IsTempMode($this->Prefix) ) { $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix); } $sql = 'SELECT COUNT(*) FROM ' . $table_name . ' WHERE (ItemType = 0) AND (AffiliatePlanId = ' . $this->Application->GetVar('ap_id') . ')'; return $this->Conn->GetOne($sql); } function ItemIcon($params) { /** @var kDBList $object */ $object = $this->getObject($params); if ($object->GetDBField('ItemType') == 2) { $cat_object = $this->Application->recallObject('c'); $cat_object->Load( $object->GetDBField('CategoryId') ); $cat_tag_processor = $this->Application->recallObject('c_TagProcessor'); return $cat_tag_processor->ItemIcon(); } return parent::ItemIcon($params); } }