63 $sUrl =
$myConfig->getConfigParam(
'sShopURL') .
$myConfig->getConfigParam(
'sAdminDir');
64 if (
$myConfig->getConfigParam(
'sAdminSSLURL')) {
65 $sUrl =
$myConfig->getConfigParam(
'sAdminSSLURL');
68 $sUrl =
oxRegistry::get(
"oxUtilsUrl")->processUrl($sUrl .
'/index.php');
70 return $sUrl .
'&cl=' . $this->sClassDo .
'&fnc=download';
81 if (!$sSessionFileName) {
86 return $sSessionFileName;
105 $oUtils->setHeader(
"Pragma: public");
106 $oUtils->setHeader(
"Cache-Control: must-revalidate, post-check=0, pre-check=0");
107 $oUtils->setHeader(
"Expires: 0");
108 $oUtils->setHeader(
"Content-Disposition: attachment; filename=vouchers.csv");
109 $oUtils->setHeader(
"Content-Type: application/csv");
111 if (file_exists($sFile) && is_readable($sFile)) {
114 $oUtils->showMessageAndExit(
"");
125 $this->fpFile = @fopen($this->_sFilePath,
"a");
126 if (!isset($this->fpFile) || !$this->fpFile) {
128 $this->
stop(ERR_FILEIO);
133 ftruncate($this->fpFile, 0);
136 if (($iExportedItems = $this->
exportVouchers($iStart)) ===
false) {
138 $this->
stop(ERR_SUCCESS);
144 $this->_aViewData[
'refresh'] = 0;
145 $this->_aViewData[
'iStart'] = $iStart + $iExportedItems;
146 $this->_aViewData[
'iExpItems'] = $iStart + $iExportedItems;
148 fclose($this->fpFile);
167 $sSelect =
"select oxvouchernr from oxvouchers where oxvoucherserieid = " . $oDb->quote($oSerie->getId());
168 $rs = $oDb->selectLimit($sSelect, $this->iExportPerTick, $iStart);
181 $this->
write(current($rs->fields));
198 fwrite($this->fpFile, $sLine .
"\n");