function process($file)
 {
     @xtc_set_time_limit(0);
     require DIR_FS_CATALOG . DIR_WS_CLASSES . 'xtcPrice.php';
     $xtPrice = new xtcPrice($_POST['currencies'], $_POST['status']);
     $schema = 'Bestellnummer;Bezeichnung;Preis;Lieferzeit;ProduktLink;FotoLink;Beschreibung' . "\n";
     $export_query = xtc_db_query("SELECT\n                             p.products_id,\n                             pd.products_name,\n                             pd.products_description,\n                             p.products_model,\n                             p.products_image,\n                             p.products_shippingtime,\n                             p.products_price,\n                             p.products_status,\n                             p.products_discount_allowed,\n                             p.products_tax_class_id,\n                             p.products_date_added,\n                             m.manufacturers_name\n                         FROM\n                             " . TABLE_PRODUCTS . " p LEFT JOIN\n                             " . TABLE_MANUFACTURERS . " m\n                           ON p.manufacturers_id = m.manufacturers_id LEFT JOIN\n                             " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                           ON p.products_id = pd.products_id AND\n                            pd.language_id = '" . $_SESSION['languages_id'] . "' LEFT JOIN\n                             " . TABLE_SPECIALS . " s\n                           ON p.products_id = s.products_id\n                         WHERE\n                           p.products_status = 1\n                         ORDER BY\n                            p.products_date_added DESC,\n                            pd.products_name");
     while ($products = xtc_db_fetch_array($export_query)) {
         $products_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, 1, $products['products_tax_class_id'], '');
         // remove trash
         $products_description = strip_tags($products['products_description']);
         $products_description = substr($products_description, 0, 197) . '..';
         $products_description = str_replace(";", ", ", $products_description);
         $products_description = str_replace("'", ", ", $products_description);
         $products_description = str_replace("\n", " ", $products_description);
         $products_description = str_replace("\r", " ", $products_description);
         $products_description = str_replace("\t", " ", $products_description);
         $products_description = str_replace("\v", " ", $products_description);
         $products_description = str_replace("&quot,", " \"", $products_description);
         $products_description = str_replace("&qout,", " \"", $products_description);
         //create content
         $schema .= $products['products_model'] . ';' . $products['products_name'] . ' - ' . $products['manufacturers_name'] . ';' . number_format($products_price, 2, ',', '') . ';' . xtc_get_shipping_status_name($products['products_shippingtime']) . ';' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?' . $_POST['campaign'] . xtc_product_link($products['products_id'], $products['products_name']) . ';' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG_THUMBNAIL_IMAGES . $products['products_image'] . ';' . $products_description . "\n";
     }
     // create File
     $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "w+");
     fputs($fp, $schema);
     fclose($fp);
     switch ($_POST['export']) {
         case 'yes':
             // send File to Browser
             $extension = substr($file, -3);
             $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "rb");
             $buffer = fread($fp, filesize(DIR_FS_DOCUMENT_ROOT . 'export/' . $file));
             fclose($fp);
             header('Content-type: application/x-octet-stream');
             header('Content-disposition: attachment; filename=' . $file);
             echo $buffer;
             exit;
             break;
     }
 }
示例#2
0
 function process($file)
 {
     @xtc_set_time_limit(0);
     require DIR_FS_CATALOG . DIR_WS_CLASSES . 'xtcPrice.php';
     $xtPrice = new xtcPrice($_POST['currencies'], $_POST['status']);
     $schema = 'ProduktID|Gewicht|EAN|Hersteller|ProduktBezeichnung|ArtikelNroderHerstellerArtikelNr|Preis|ProduktLangBeschreibung|ProduktKurzBeschreibung|Lieferzeit|Produktlink|FotoLink|Kategoriename' . "\n";
     $export_query = xtc_db_query("SELECT\n                             p.products_id,\n                             pd.products_name,\n                             pd.products_description,\n                             pd.products_short_description,\n                             p.products_weight,\n                             p.products_ean,\n                             p.products_model,\n                             p.products_shippingtime,\n                             p.products_image,\n                             p.products_price,\n                             p.products_status,\n                             p.products_discount_allowed,\n                             p.products_tax_class_id,\n                             IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price,\n                             p.products_date_added,\n                             m.manufacturers_name\n                         FROM\n                             " . TABLE_PRODUCTS . " p LEFT JOIN\n                             " . TABLE_MANUFACTURERS . " m\n                           ON p.manufacturers_id = m.manufacturers_id LEFT JOIN\n                             " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                           ON p.products_id = pd.products_id AND\n                            pd.language_id = '" . $_SESSION['languages_id'] . "' LEFT JOIN\n                             " . TABLE_SPECIALS . " s\n                           ON p.products_id = s.products_id\n                         WHERE\n                           p.products_status = 1\n                         ORDER BY\n                            p.products_date_added DESC,\n                            pd.products_name");
     while ($products = xtc_db_fetch_array($export_query)) {
         $products_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, 1, $products['products_tax_class_id'], '');
         // get product categorie
         $categorie_query = xtc_db_query("SELECT\n                                            categories_id\n                                            FROM " . TABLE_PRODUCTS_TO_CATEGORIES . "\n                                            WHERE products_id='" . $products['products_id'] . "'");
         while ($categorie_data = xtc_db_fetch_array($categorie_query)) {
             $categories = $categorie_data['categories_id'];
         }
         // remove trash in $products_description
         $products_description = strip_tags($products['products_description']);
         $products_description = str_replace(";", ", ", $products_description);
         $products_description = str_replace("'", ", ", $products_description);
         $products_description = str_replace("\n", " ", $products_description);
         $products_description = str_replace("\r", " ", $products_description);
         $products_description = str_replace("\t", " ", $products_description);
         $products_description = str_replace("\v", " ", $products_description);
         $products_description = str_replace("&quot,", " \"", $products_description);
         $products_description = str_replace("&qout,", " \"", $products_description);
         $products_description = str_replace("|", ",", $products_description);
         $products_description = substr($products_description, 0, 253);
         // remove trash in $products_short_description
         $products_short_description = strip_tags($products['products_short_description']);
         $products_short_description = str_replace(";", ", ", $products_short_description);
         $products_short_description = str_replace("'", ", ", $products_short_description);
         $products_short_description = str_replace("\n", " ", $products_short_description);
         $products_short_description = str_replace("\r", " ", $products_short_description);
         $products_short_description = str_replace("\t", " ", $products_short_description);
         $products_short_description = str_replace("\v", " ", $products_short_description);
         $products_short_description = str_replace("&quot,", " \"", $products_short_description);
         $products_short_description = str_replace("&qout,", " \"", $products_short_description);
         $products_short_description = str_replace("|", ",", $products_short_description);
         $products_short_description = substr($products_short_description, 0, 253);
         $cat = $this->buildCAT($categories);
         // creates pathes of images, if images are integrated
         if ($products['products_image'] != '') {
             $image_if_available = HTTP_CATALOG_SERVER . DIR_WS_CATALOG_ORIGINAL_IMAGES . $products['products_image'];
         } else {
             $image_if_available = '';
         }
         //create content
         $schema .= $products['products_id'] . '|' . $products['products_weight'] . '|' . $products['products_ean'] . '|' . $products['manufacturers_name'] . '|' . $products['products_name'] . '|' . $products['products_model'] . '|' . number_format($products_price, 2, ',', '.') . '|' . $products_description . '|' . $products_short_description . '|' . xtc_get_shipping_status_name($products['products_shippingtime']) . '|' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?' . $_POST['campaign'] . xtc_product_link($products['products_id'], $products['products_name']) . '|' . $image_if_available . '|' . substr($cat, 0, strlen($cat) - 2) . "\n";
     }
     // create File
     $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "w+");
     fputs($fp, $schema);
     fclose($fp);
     switch ($_POST['export']) {
         case 'yes':
             // send File to Browser
             $extension = substr($file, -3);
             $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "rb");
             $buffer = fread($fp, filesize(DIR_FS_DOCUMENT_ROOT . 'export/' . $file));
             fclose($fp);
             header('Content-type: application/x-octet-stream');
             header('Content-disposition: attachment; filename=' . $file);
             echo $buffer;
             exit;
             break;
     }
 }
 function process($file)
 {
     global $UseGoogle;
     @xtc_set_time_limit(0);
     require DIR_FS_CATALOG . DIR_WS_CLASSES . 'xtcPrice.php';
     $xtPrice = new xtcPrice("EUR", 1);
     $UseGoogle ? $psmgoogle_link = "utm_source=preissuchmaschine&utm_medium=cpc&utm_campaign=preissuchmaschine&" : ($psmgoogle_link = "");
     $schema = 'ProduktID|Gewicht|EAN|Lagerbestand|Hersteller|ProduktBezeichnung|ArtikelNroderHerstellerArtikelNr|Preis|ProduktLangBeschreibung|ProduktKurzBeschreibung|Lieferzeit|Produktlink|FotoLink|Kategoriename|';
     // run through the payment method titles to display them in the header
     foreach ($this->payment as $payment => $options) {
         // display only the payment methods that are active (if this is desired)
         $schema .= $options['title'] . "|";
     }
     $schema .= "\n";
     $export_query = xtc_db_query("SELECT\r\n                             p.products_id,\r\n                             pd.products_name,\r\n                             pd.products_description,\r\n                             pd.products_short_description,\r\n                             p.products_weight,\r\n                             p.products_ean,\r\n                             p.products_quantity,\r\n                             p.products_model,\r\n                             p.products_shippingtime,\r\n                             p.products_image,\r\n                             p.products_price,\r\n                             p.products_status,\r\n                             p.products_discount_allowed,\r\n                             p.products_tax_class_id,\r\n                             IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price,\r\n                             p.products_date_added,\r\n                             m.manufacturers_name\r\n                         FROM\r\n                             " . TABLE_PRODUCTS . " p LEFT JOIN\r\n                             " . TABLE_MANUFACTURERS . " m\r\n                           ON p.manufacturers_id = m.manufacturers_id LEFT JOIN\r\n                             " . TABLE_PRODUCTS_DESCRIPTION . " pd\r\n                           ON p.products_id = pd.products_id AND\r\n                            pd.language_id = '" . $_SESSION['languages_id'] . "' LEFT JOIN\r\n                             " . TABLE_SPECIALS . " s\r\n                           ON p.products_id = s.products_id\r\n                         WHERE\r\n                           p.products_status = 1\r\n                         ORDER BY\r\n                            p.products_date_added DESC,\r\n                            pd.products_name");
     while ($products = xtc_db_fetch_array($export_query)) {
         $products_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, 1, $products['products_tax_class_id'], '');
         // get product categorie
         $categorie_query = xtc_db_query("SELECT\r\n                                            categories_id\r\n                                            FROM " . TABLE_PRODUCTS_TO_CATEGORIES . "\r\n                                            WHERE products_id='" . $products['products_id'] . "'");
         while ($categorie_data = xtc_db_fetch_array($categorie_query)) {
             $categories = $categorie_data['categories_id'];
         }
         // remove trash in $products_description
         $products_description = strip_tags($products['products_description']);
         $products_description = str_replace(";", ", ", $products_description);
         $products_description = str_replace("'", ", ", $products_description);
         $products_description = str_replace("\n", " ", $products_description);
         $products_description = str_replace("\r", " ", $products_description);
         $products_description = str_replace("\t", " ", $products_description);
         $products_description = str_replace("\v", " ", $products_description);
         $products_description = str_replace("&quot,", " \"", $products_description);
         $products_description = str_replace("&qout,", " \"", $products_description);
         $products_description = str_replace("|", ",", $products_description);
         $products_description = substr($products_description, 0, 253);
         // remove trash in $products_short_description
         $products_short_description = strip_tags($products['products_short_description']);
         $products_short_description = str_replace(";", ", ", $products_short_description);
         $products_short_description = str_replace("'", ", ", $products_short_description);
         $products_short_description = str_replace("\n", " ", $products_short_description);
         $products_short_description = str_replace("\r", " ", $products_short_description);
         $products_short_description = str_replace("\t", " ", $products_short_description);
         $products_short_description = str_replace("\v", " ", $products_short_description);
         $products_short_description = str_replace("&quot,", " \"", $products_short_description);
         $products_short_description = str_replace("&qout,", " \"", $products_short_description);
         $products_short_description = str_replace("|", ",", $products_short_description);
         $products_short_description = substr($products_short_description, 0, 253);
         $cat = $this->buildCAT($categories);
         // creates pathes of images, if images are integrated
         if ($products['products_image'] != '') {
             $image_if_available = HTTP_CATALOG_SERVER . DIR_WS_CATALOG_POPUP_IMAGES . $products['products_image'];
         } else {
             $image_if_available = '';
         }
         //create content
         $schema .= $products['products_id'] . '|' . number_format($products['products_weight'], 2, ',', '.') . '|' . $products['products_ean'] . '|' . $products['products_quantity'] . '|' . $products['manufacturers_name'] . '|' . $products['products_name'] . '|' . $products['products_model'] . '|' . number_format($products_price, 2, ',', '.') . '|' . $products_description . '|' . $products_short_description . '|' . xtc_get_shipping_status_name($products['products_shippingtime']) . '|' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?' . $_POST['campaign'] . $psmgoogle_link . xtc_product_link($products['products_id'], $products['products_name']) . '|' . $image_if_available . '|' . substr($cat, 0, strlen($cat) - 2) . "|";
         foreach ($this->payment as $singlePayment => $options) {
             // display only the payment fee that is active (if this is desired)
             $sc = $this->getShippingCosts($singlePayment, $products_price, $products['products_weight'], $products['products_tax_class_id']);
             $schema .= $sc . "|";
             // if there's one payment with sc > 0.00, display the sc free comment
             // exception: cash on delivery
             if ($singlePayment != 'COD' && $sc > 0.0) {
                 $showScFreeComment = true;
             }
         }
         $schema .= "\n";
     }
     // create File
     $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "w+");
     fputs($fp, $schema);
     fclose($fp);
     switch ($_POST['export']) {
         case 'yes':
             // send File to Browser
             $extension = substr($file, -3);
             $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "rb");
             $buffer = fread($fp, filesize(DIR_FS_DOCUMENT_ROOT . 'export/' . $file));
             fclose($fp);
             header('Content-type: application/x-octet-stream');
             header('Content-disposition: attachment; filename=' . $file);
             echo $buffer;
             exit;
             break;
     }
 }
        }
        $contents[] = array('text' => '<br />' . TEXT_INFO_SHIPPING_STATUS_IMAGE . '<br />' . xtc_draw_file_field('shipping_status_image', $oInfo->shipping_status_image));
        $contents[] = array('text' => '<br />' . TEXT_INFO_SHIPPING_STATUS_NAME . $shipping_status_inputs_string);
        if (DEFAULT_SHIPPING_STATUS_ID != $oInfo->shipping_status_id) {
            $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT);
        }
        $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_UPDATE . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id) . '">' . BUTTON_CANCEL . '</a>');
        break;
    default:
        if (is_object($oInfo)) {
            $heading[] = array('text' => '<b>' . $oInfo->shipping_status_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id . '&action=edit') . '#edit-box">' . BUTTON_EDIT . '</a>');
            $shipping_status_inputs_string = '';
            $languages = xtc_get_languages();
            for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
                $shipping_status_inputs_string .= '<br />' . xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image']) . '&nbsp;' . xtc_get_shipping_status_name($oInfo->shipping_status_id, $languages[$i]['id']);
            }
            $contents[] = array('text' => $shipping_status_inputs_string);
        }
        break;
}
if (xtc_not_null($heading) && xtc_not_null($contents)) {
    echo '<div class="col-md-3 col-sm-12 col-xs-12 pull-right edit-box-class">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '</div>' . "\n";
    ?>
    <script>
        //responsive_table
        $('#responsive_table').addClass('col-md-9');
    </script>               
 function process($file)
 {
     @xtc_set_time_limit(0);
     require DIR_FS_CATALOG . DIR_WS_CLASSES . 'xtcPrice.php';
     $xtPrice = new xtcPrice($_POST['currencies'], $_POST['status']);
     $schema = 'artikelid;hersteller;herstellernummer;bezeichnung;kategorie;beschreibung_kurz;beschreibung_lang;bild_klein;deeplink;preis_val;product_ean;' . 'lagerstand;lieferzeit;vkat;vkat_ausland1a;vkde;vkde_ausland1;freeamount' . "\n";
     # added new fields by geizhals
     $export_query = xtc_db_query("SELECT\n                                           p.products_id,\n                                           pd.products_name,\n                                           pd.products_description,pd.products_short_description,\n                                           p.products_model,p.products_ean,\n                                           p.products_image,\n                                           p.products_price,\n                                           p.products_status,\n                                           p.products_date_available,\n                                           p.products_shippingtime,\n                                           p.products_discount_allowed,\n                                           pd.products_meta_keywords,\n                                           p.products_tax_class_id,\n                                           p.products_date_added,\n                                           m.manufacturers_name,\n                                           p.products_quantity,\n                                           p.products_weight\n                                    FROM\n                                           " . TABLE_PRODUCTS . " p LEFT JOIN\n                                           " . TABLE_MANUFACTURERS . " m\n                                        ON p.manufacturers_id = m.manufacturers_id LEFT JOIN\n                                           " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                                        ON p.products_id = pd.products_id AND\n                                           pd.language_id = '" . $_SESSION['languages_id'] . "' LEFT JOIN\n                                           " . TABLE_SPECIALS . " s\n                                        ON p.products_id = s.products_id\n                                     WHERE p.products_status = 1\n                                     ORDER BY\n                                           p.products_date_added DESC,\n                                           pd.products_name");
     # added p.products_quantity, p.products_weight to select by geizhals
     while ($products = xtc_db_fetch_array($export_query)) {
         $products_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, 1, $products['products_tax_class_id'], '');
         // get product categorie
         $categorie_query = xtc_db_query("SELECT\n                                              categories_id\n                                         FROM " . TABLE_PRODUCTS_TO_CATEGORIES . "\n                                        WHERE products_id='" . $products['products_id'] . "'");
         while ($categorie_data = xtc_db_fetch_array($categorie_query)) {
             $categories = $categorie_data['categories_id'];
         }
         ################## added by geizhals
         $shipping_query = xtc_db_query("SELECT\n                                             shipping_status_name\n                                        FROM " . TABLE_SHIPPING_STATUS . "\n                                       WHERE shipping_status_id=" . $products['products_shippingtime'] . " AND language_id=" . $_SESSION['languages_id']);
         $shipping_data = xtc_db_fetch_array($shipping_query);
         $shipping[] = $shipping_data['shipping_status_name'];
         $vkat_query = xtc_db_query("select configuration_value as vkat from configuration where configuration_key='MODULE_SHIPPING_AP_COST_8'");
         $vkat_data = xtc_db_fetch_array($vkat_query);
         $vkat[] = $vkat_data['vkat'];
         $vkat_ausland_query = xtc_db_query("select configuration_value as vkat from configuration where configuration_key='MODULE_SHIPPING_AP_COST_1'");
         $vkat_ausland_data = xtc_db_fetch_array($vkat_ausland_query);
         $vkat_ausland[] = $vkat_ausland_data['vkat'];
         $vkde_query = xtc_db_query("select configuration_value as vkde from configuration where configuration_key='MODULE_SHIPPING_DP_COST_6'");
         $vkde_data = xtc_db_fetch_array($vkde_query);
         $vkde[] = $vkde_data['vkde'];
         $vkde_ausland_query = xtc_db_query("select configuration_value as vkde from configuration where configuration_key='MODULE_SHIPPING_DP_COST_1'");
         $vkde_ausland_data = xtc_db_fetch_array($vkde_ausland_query);
         $vkde_ausland[] = $vkde_ausland_data['vkde'];
         $free_query = xtc_db_query("select configuration_value as freeamount from configuration where configuration_key='MODULE_SHIPPING_FREEAMOUNT_AMOUNT'");
         $free_data = xtc_db_fetch_array($free_query);
         $free[] = $free_data['freeamount'];
         ################## end added by geizhals
         // remove trash
         $products_description = strip_tags($products['products_description']);
         $products_description = str_replace("<br>", " ", $products_description);
         $products_description = str_replace("<br />", " ", $products_description);
         $products_description = str_replace(";", ", ", $products_description);
         $products_description = str_replace("'", ", ", $products_description);
         $products_description = str_replace("\n", " ", $products_description);
         $products_description = str_replace("\r", " ", $products_description);
         $products_description = str_replace("\t", " ", $products_description);
         $products_description = str_replace("\v", " ", $products_description);
         $products_description = str_replace("&quot,", " \"", $products_description);
         $products_description = str_replace("&qout,", " \"", $products_description);
         $products_description = str_replace(chr(13), " ", $products_description);
         $products_short_description = strip_tags($products['products_short_description']);
         $products_short_description = str_replace("<br>", " ", $products_short_description);
         $products_short_description = str_replace("<br />", " ", $products_short_description);
         $products_short_description = str_replace(";", ", ", $products_short_description);
         $products_short_description = str_replace("'", ", ", $products_short_description);
         $products_short_description = str_replace("\n", " ", $products_short_description);
         $products_short_description = str_replace("\r", " ", $products_short_description);
         $products_short_description = str_replace("\t", " ", $products_short_description);
         $products_short_description = str_replace("\v", " ", $products_short_description);
         $products_short_description = str_replace("&quot,", " \"", $products_short_description);
         $products_short_description = str_replace("&qout,", " \"", $products_short_description);
         $products_short_description = str_replace(chr(13), " ", $products_short_description);
         $products_short_description = substr($products_short_description, 0, 255);
         $products_description = substr($products_description, 0, 65536);
         $cat = $this->buildCAT($categories);
         if ($products['products_image'] != '') {
             $image = HTTP_CATALOG_SERVER . DIR_WS_CATALOG_THUMBNAIL_IMAGES . $products['products_image'];
         } else {
             $image = '';
         }
         //create content
         $schema .= $products['products_id'] . ";" . $products['manufacturers_name'] . ";" . $products['products_model'] . ";" . $products['products_name'] . ";" . substr($cat, 0, strlen($cat) - 2) . ";" . $products_short_description . ";" . $products_description . ";" . $image . ";" . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?' . $_POST['campaign'] . xtc_product_link($products['products_id'], $products['products_name']) . ";" . number_format($products_price, 2, '.', '') . ";" . $products['products_ean'] . ";" . $products['products_quantity'] . ";" . xtc_get_shipping_status_name($products['products_shippingtime']) . ";" . $this->getShipCost($vkat[0], $products['products_weight']) . ";" . $this->getShipCost($vkat_ausland[0], $products['products_weight']) . ";" . $this->getShipCost($vkde[0], $products['products_weight']) . ";" . $this->getShipCost($vkde_ausland[0], $products['products_weight']) . ";" . $free[0] . "\n";
     }
     // create File
     $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "w+");
     fputs($fp, $schema);
     fclose($fp);
     ################## added by geizhals
     // zip file
     $zipfile = new zipfile();
     $filedata = implode("", file(DIR_FS_DOCUMENT_ROOT . 'export/' . $file));
     $zipfile->add_file($filedata, $file);
     header("Content-type: application/octet-stream");
     header("Content-disposition: attachment; filename=zipfile.zip");
     $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file . '.zip', "w+");
     fputs($fp, $zipfile->file());
     fclose($fp);
     ################## end added by geizhals
     switch ($_POST['export']) {
         case 'yes':
             // send File to Browser
             $extension = substr($file, -3);
             $fp = fopen(DIR_FS_DOCUMENT_ROOT . 'export/' . $file, "rb");
             $buffer = fread($fp, filesize(DIR_FS_DOCUMENT_ROOT . 'export/' . $file));
             fclose($fp);
             header('Content-type: application/x-octet-stream');
             header('Content-disposition: attachment; filename=' . $file);
             echo $buffer;
             exit;
             break;
     }
 }