00001 <?php
00002
00006 class GenExport_Do extends DynExportBase
00007 {
00008 public $sClass_do = "genExport_do";
00009 public $sClass_main = "genExport_main";
00010 public $sExportFileName = "genexport";
00011
00016 protected $_sThisTemplate = "dynbase_do.tpl";
00017
00025 public function nextTick( $iCnt )
00026 {
00027 $myConfig = oxConfig::getInstance();
00028 $iExportedItems = $iCnt;
00029 if ( $oArticle = $this->getOneArticle( $iCnt, $blContinue ) ) {
00030 $smarty = oxUtilsView::getInstance()->getSmarty();
00031 $smarty->assign_by_ref( "linenr", $iCnt );
00032 $smarty->assign_by_ref( "article", $oArticle );
00033 $smarty->assign( "spr", $myConfig->getConfigParam( 'sCSVSign' ) );
00034 $smarty->assign( "encl", $myConfig->getConfigParam( 'sGiCsvFieldEncloser' ) );
00035 $this->write( $smarty->fetch( "genexport.tpl", $this->getViewID() ) );
00036 return ++$iExportedItems;
00037 }
00038
00039 return $blContinue;
00040 }
00041
00049 public function write( $sLine )
00050 {
00051 $sLine = $this->removeSID( $sLine);
00052
00053 $sLine = str_replace( array("\r\n","\n"), "", $sLine);
00054 $sLine = str_replace( "<br>", "\n", $sLine);
00055
00056 fwrite( $this->fpFile, $sLine."\r\n");
00057 }
00058
00059 }