61 $sUrl =
$myConfig->getConfigParam(
'sShopURL' ).
$myConfig->getConfigParam(
'sAdminDir' );
62 if (
$myConfig->getConfigParam(
'sAdminSSLURL' ) ) {
63 $sUrl =
$myConfig->getConfigParam(
'sAdminSSLURL' );
66 $sUrl =
oxRegistry::get(
"oxUtilsUrl")->processUrl( $sUrl.
'/index.php' );
67 return $sUrl .
'&cl='.$this->sClassDo.
'&fnc=download';
78 if ( !$sSessionFileName ) {
82 return $sSessionFileName;
103 $oUtils->setHeader(
"Pragma: public" );
104 $oUtils->setHeader(
"Cache-Control: must-revalidate, post-check=0, pre-check=0" );
105 $oUtils->setHeader(
"Expires: 0" );
106 $oUtils->setHeader(
"Content-Disposition: attachment; filename=vouchers.csv");
107 $oUtils->setHeader(
"Content-Type: application/csv" );
109 if ( file_exists( $sFile ) && is_readable( $sFile ) ) {
112 $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 );
174 if ( $iStart == 0 ) {
180 while ( !$rs->EOF ) {
181 $this->
write( current( $rs->fields ) );
200 fwrite( $this->fpFile, $sLine.
"\n");