function process($file)
 {
     @olc_set_time_limit(0);
     $schema = 'Artikelnr;Produktname;Preis;Link;Beschreibung;Lieferstatus;Kategorie;Hersteller;Bild' . NEW_LINE;
     $export_query = olc_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_price,\n                             p.products_status,\n                             p.products_shippingtime,\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_LANGUAGE_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 = olc_db_fetch_array($export_query)) {
         $products_price = olc_get_products_price_export($products['products_id'], 1, true, $_POST['status'], 1, $_POST['currencies'], true);
         // 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(APOS, ", ", $products_description);
         $products_description = str_replace(NEW_LINE, BLANK, $products_description);
         $products_description = str_replace("\r", BLANK, $products_description);
         $products_description = str_replace("\t", BLANK, $products_description);
         $products_description = str_replace("\v", BLANK, $products_description);
         $products_description = str_replace("&quot,", " \"", $products_description);
         $products_description = str_replace("&qout,", " \"", $products_description);
         // get product categorie
         $categorie_query = olc_db_query("SELECT\n                                            categories_id\n                                            FROM " . TABLE_PRODUCTS_TO_CATEGORIES . "\n                                            WHERE products_id='" . $products['products_id'] . APOS);
         while ($categorie_data = olc_db_fetch_array($categorie_query)) {
             $categories = $categorie_data['categories_id'];
         }
         $categorie_query = olc_db_query("SELECT\n                                            categories_name\n                                            FROM " . TABLE_CATEGORIES_DESCRIPTION . "\n                                            WHERE categories_id='" . $categories . "'\n                                            and language_id='" . SESSION_LANGUAGE_ID . APOS);
         $categorie_data = olc_db_fetch_array($categorie_query);
         //create content
         $schema .= $products['products_model'] . ';' . $products['products_name'] . ';' . $products_price . ';' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id=' . $products['products_id'] . ';' . $products_description . ';' . olc_get_shipping_status_name($products['products_shippingtime']) . ';' . $categorie_data['categories_name'] . ';' . $products['manufacturers_name'] . ';' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG_THUMBNAIL_IMAGES . $products['products_image'] . NEW_LINE;
     }
     // 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;
     }
 }
        $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_SHIPPING_STATUS . HTML_B_END);
        $contents = array('form' => olc_draw_form('status', FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id . '&action=deleteconfirm'));
        $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
        $contents[] = array('text' => '<br/><b>' . $oInfo->shipping_status_name . HTML_B_END);
        if ($remove_status) {
            $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
        }
        break;
    default:
        if (is_object($oInfo)) {
            $heading[] = array('text' => HTML_B_START . $oInfo->shipping_status_name . HTML_B_END);
            $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
            $shipping_status_inputs_string = '';
            $languages = olc_get_languages();
            for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
                $shipping_status_inputs_string .= HTML_BR . olc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image']) . HTML_NBSP . olc_get_shipping_status_name($oInfo->shipping_status_id, $languages[$i]['id']);
            }
            $contents[] = array('text' => $shipping_status_inputs_string);
        }
        break;
}
if (olc_not_null($heading) && olc_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . NEW_LINE;
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . NEW_LINE;
}
?>
          </tr>
        </table></td>
      </tr>
         //W. Kaiser - AJAX
         $products_url = $product_info['products_url'];
         if ($products_url) {
             $info_smarty->assign('PRODUCTS_URL', sprintf(TEXT_MORE_INFORMATION, olc_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), NONSSL, true, false)));
         }
     }
 }
 $info_smarty->assign('PRODUCTS_NAME', $products_name);
 $products_short_description = stripslashes(str_replace('\\r\\n', $replace_string, $product_info['products_short_description']));
 $products_short_description = str_replace('>rn<', $replace_string_1, $products_short_description);
 $products_short_description = str_replace('>n<', $replace_string_1, $products_short_description);
 $products_short_description = str_replace(HTML_AMP, AMP, $products_short_description);
 $products_short_description = str_replace('\\', EMPTY_STRING, $products_short_description);
 $info_smarty->assign('PRODUCTS_SHORT_DESCRIPTION', $products_short_description);
 if (ACTIVATE_SHIPPING_STATUS == TRUE_STRING_S) {
     $shipping_status = olc_get_shipping_status_name($product_info['products_shippingtime']);
     $info_smarty->assign('SHIPPING_NAME', $shipping_status['name']);
     $image = $shipping_status['image'];
     if ($image) {
         $info_smarty->assign('SHIPPING_IMAGE', CURRENT_TEMPLATE_IMG . $image);
     }
 }
 if ($product_info['products_fsk18'] == '1') {
     $info_smarty->assign('PRODUCTS_FSK18', TRUE_STRING_S);
 }
 if ($is_pop_up) {
     $products_status = 0;
 } else {
     $products_status = $product_info['products_status'];
 }
 $products_date_available = $product_info['products_date_available'];
示例#4
0
     }
     if (strlen($products_date_available) > 0) {
         if ($do_boxes) {
             $NewDelta = TEXT_DATE_AVAILABLE_SHORT;
         } else {
             $NewDelta = TEXT_DATE_AVAILABLE;
         }
         $products_date_available = sprintf($NewDelta, olc_date_short($products_date_available));
     }
 }
 if ($not_do_boxes) {
     if ($is_listing) {
         $products_price_special_info = str_replace(TEMPLATE_SPECIAL_PRICE_DATE_1 . BLANK, TEMPLATE_SPECIAL_PRICE_DATE_1 . HTML_BR, $products_price_special_info);
     }
     if (ACTIVATE_SHIPPING_STATUS == TRUE_STRING_S) {
         $shipping_status = olc_get_shipping_status_name($products_listing['products_shippingtime']);
         $shipping_status_name = $shipping_status['name'];
         $shipping_status_image = $shipping_status['image'];
         if ($shipping_status_image) {
             $shipping_status_image = CURRENT_TEMPLATE_IMG . $shipping_status_image;
         }
     }
     //	W. Kaiser
     $NewDelta = "+1 month ";
     $ShowNewMarker = false;
     if ($product_available) {
         if (!$ShowNewMarker) {
             $ShowNewMarker = $ThisDay <= date("Y-m-d", strtotime($NewDelta . $products_listing['products_date_added']));
         }
         if ($products_price_real == 0) {
             $products_price = EMPTY_STRING;