18 require_once SQ_CORE_PACKAGE_PATH.
'/../include/asset.inc';
19 require_once SQ_CORE_PACKAGE_PATH.
'/data_source/data_source/data_source.inc';
45 parent::__construct($assetid);
60 $allowed_link[
'asset'][
'card'] =
'M';
61 $allowed_link[
'asset'][
'exclusive'] = FALSE;
63 $links[SQ_LINK_TYPE_1] = $allowed_link;
64 $links[SQ_LINK_TYPE_2] = $allowed_link;
65 $links[SQ_LINK_TYPE_3] = $allowed_link;
66 $links[SQ_LINK_NOTICE] = $allowed_link;
81 $GLOBALS[
'SQ_SYSTEM']->pm->startTimer($this);
83 $result = parent::getResultSet($this->name);
85 if (empty($result)) $result = $this->
getItems();
86 if (!empty($result)) {
87 parent::setResultSet($result, $this->name);
90 $GLOBALS[
'SQ_SYSTEM']->pm->stopTimer($this);
105 $content = $this->
attr(
'cached_content');
106 $use_header_row = $this->
attr(
'header_row');
108 if (empty($content))
return Array();
112 $new_content = Array();
115 if ($use_header_row) {
116 foreach ($content[0] as $header) {
117 $fields[] = strtolower(str_replace(
' ',
'_', trim($header)));
121 for ($c = 0; $c < count($content[0]) ; $c++) {
122 $fields[$c] =
'field_'.$c;
127 foreach ($content as $record) {
129 if ($rc == 0 && $use_header_row) {
134 for ($f = 0; $f < count($fields); $f++) {
135 $record_id = ($use_header_row ? $rc - 1 : $rc);
136 $new_content[$record_id][trim($fields[$f])] = trim($record[$f]);