00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00049 require_once (PATH_t3lib.'class.t3lib_xml.php');
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00096 class user_xmlversion {
00097 var $cObj;
00098
00099
00107 function main_xmlversion($content,$conf) {
00108 $className=t3lib_div::makeInstanceClassName('t3lib_xml');
00109 $xmlObj = new $className('typo3_page');
00110 $xmlObj->XMLdebug=0;
00111 $xmlObj->setRecFields('pages','doktype,title,alias,hidden,starttime,endtime,fe_group,url,target,no_cache,shortcut,keywords,description,abstract,author,author_email,newUntil,lastUpdated,cache_timeout');
00112 $xmlObj->setRecFields('tt_content','CType,header,header_link,bodytext,image,imagewidth,imageorient,media,records,colPos,starttime,endtime,fe_group');
00113
00114
00115 $xmlObj->renderHeader();
00116
00117
00118 $xmlObj->addRecord('pages',$GLOBALS['TSFE']->page);
00119
00120
00121 $xmlObj->newLevel('content_records',1);
00122 $xmlObj->renderRecords('pages',$this->getContentResult('pages'));
00123 $xmlObj->renderRecords('tt_content',$this->getContentResult('tt_content'));
00124 $xmlObj->newLevel('content_records');
00125
00126 $xmlObj->renderFooter();
00127
00128 return $xmlObj->getResult();
00129 }
00130
00137 function getContentResult($table) {
00138 global $TCA;
00139 if ($TCA[$table]) {
00140 $orderBy = $TCA[$table]['ctrl']['sortby'] ? 'ORDER BY '.$TCA[$table]['ctrl']['sortby'] : $TCA[$table]['ctrl']['default_sortby'];
00141 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'pid='.intval($GLOBALS['TSFE']->id).$this->cObj->enableFields($table), '', $GLOBALS['TYPO3_DB']->stripOrderBy($orderBy));
00142 return $res;
00143 }
00144 }
00145 }
00146
00147
00148
00149 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['media/scripts/xmlversionLib.inc']) {
00150 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['media/scripts/xmlversionLib.inc']);
00151 }
00152 ?>