Go to the documentation of this file.00001 <?php
00002
00006 class GenExport_Do extends DynExportBase
00007 {
00008
00014 public $sClassDo = "genExport_do";
00015
00021 public $sClassMain = "genExport_main";
00022
00028 public $sExportFileName = "genexport";
00029
00035 protected $_sThisTemplate = "dynbase_do.tpl";
00036
00044 public function nextTick($iCnt)
00045 {
00046 $iExportedItems = $iCnt;
00047 $blContinue = false;
00048 if ($oArticle = $this->getOneArticle($iCnt, $blContinue)) {
00049 $myConfig = oxRegistry::getConfig();
00050 $oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
00051 $oSmarty->assign("sCustomHeader", oxRegistry::getSession()->getVariable("sExportCustomHeader"));
00052 $oSmarty->assign_by_ref("linenr", $iCnt);
00053 $oSmarty->assign_by_ref("article", $oArticle);
00054 $oSmarty->assign("spr", $myConfig->getConfigParam('sCSVSign'));
00055 $oSmarty->assign("encl", $myConfig->getConfigParam('sGiCsvFieldEncloser'));
00056 $this->write($oSmarty->fetch("genexport.tpl", $this->getViewId()));
00057
00058 return ++$iExportedItems;
00059 }
00060
00061 return $blContinue;
00062 }
00063
00069 public function write($sLine)
00070 {
00071 $sLine = $this->removeSID($sLine);
00072
00073 $sLine = str_replace(array("\r\n", "\n"), "", $sLine);
00074 $sLine = str_replace("<br>", "\n", $sLine);
00075
00076 fwrite($this->fpFile, $sLine . "\r\n");
00077 }
00078 }