= '0' or p.products_status <= '4') ORDER BY p.products_date_added DESC, pd.products_name"; $products_result = $dbconn->Execute($products_sql); while ($products = $products_result->fields) { $sStr = $products['products_description']; $o42_cu_chars['ecto'] = array( '&euro', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', 'ß', '©', '™', '®' ); $o42_cu_chars['perma'] = array( '€', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', 'ß', '©', '™ ', '®' ); $sStr = str_replace($o42_cu_chars['ecto'], $o42_cu_chars['perma'], $sStr); $schema .= $products['products_model'] . ';' . $sStr . "\n"; // Move that ADOdb pointer! $products_result->MoveNext(); } // Close result set $products_result->Close(); $psm_file = OOS_PSM_PATH . OOS_PSM_FILE . '.csv'; if ($fp = fopen($psm_file, 'w')) { fputs($fp, $schema); fclose($fp); $messageStack->add_session(SUCCESS_DATABASE_SAVED, 'success'); } oos_redirect_admin(oos_href_link_admin($aFilename['export_preissuchmaschine'])); break; case 'download': $extension = substr($_GET['file'], -3); if ($extension == 'csv') { if ($fp = fopen(OOS_PSM_PATH . $_GET['file'], 'rb')) { $buffer = fread($fp, filesize(OOS_PSM_PATH . $_GET['file'])); fclose($fp); header('Content-type: application/x-octet-stream'); header('Content-disposition: attachment; filename=' . $_GET['file']); echo $buffer; exit; } } else { $messageStack->add(ERROR_DOWNLOAD_LINK_NOT_ACCEPTABLE, 'error'); } break; case 'deleteconfirm': if (strstr($_GET['file'], '..')) oos_redirect_admin(oos_href_link_admin($aFilename['export_preissuchmaschine'])); oos_remove(OOS_PSM_PATH . $_GET['file']); if (!$oos_remove_error) { $messageStack->add_session(SUCCESS_PSM_DELETED, 'success'); oos_redirect_admin(oos_href_link_admin($aFilename['export_preissuchmaschine'])); } break; } } // check if the preissuchmaschine directory exists $dir_ok = false; if (is_dir(oos_get_local_path(OOS_PSM_PATH))) { $dir_ok = true; if (!is_writeable(oos_get_local_path(OOS_PSM_PATH))) $messageStack->add(ERROR_PSM_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_PSM_DIRECTORY_DOES_NOT_EXIST, 'error'); } $no_js_general = true; require 'includes/oos_header.php'; ?>
'' . TEXT_INFO_HEADING_NEW_PSM . ''); $contents = array('form' => oos_draw_form('make_file', $aFilename['export_preissuchmaschine'], 'action=make_file_now')); $contents[] = array('text' => TEXT_INFO_NEW_INFO); $contents[] = array('align' => 'center', 'text' => '
' . oos_image_swap_submits('backup','backup_off.gif', IMAGE_BACKUP) . ' ' . oos_image_swap_button('cancel','cancel_off.gif', IMAGE_CANCEL) . ''); break; case 'delete': $heading[] = array('text' => '' . $psmInfo->date . ''); $contents = array('form' => oos_draw_form('delete', $aFilename['export_preissuchmaschine'], 'file=' . $psmInfo->file . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '
' . $psmInfo->file . ''); $contents[] = array('align' => 'center', 'text' => '
' . oos_image_swap_submits('delete','delete_off.gif', IMAGE_DELETE) . ' ' . oos_image_swap_button('cancel','cancel_off.gif', IMAGE_CANCEL) . ''); break; default: if (isset($psmInfo) && is_object($psmInfo)) { $heading[] = array('text' => '' . $psmInfo->date . ''); $contents[] = array('align' => 'center', 'text' => '' . oos_image_swap_button('delete','delete_off.gif', IMAGE_DELETE) . ''); $contents[] = array('text' => '
' . TEXT_INFO_DATE . ' ' . $psmInfo->date); $contents[] = array('text' => TEXT_INFO_SIZE . ' ' . $psmInfo->size); } break; } if ( (oos_is_not_null($heading)) && (oos_is_not_null($contents)) ) { echo ' ' . "\n"; } ?>
read()) { if ( ($file != 'dummy') && (!is_dir(OOS_PSM_PATH . $file)) ) { $contents[] = $file; } } sort($contents); for ($files = 0, $count = count($contents); $files < $count; $files++) { $entry = $contents[$files]; $check = 0; if (((!$_GET['file']) || ($_GET['file'] == $entry)) && (!$psmInfo) && ($action != 'make_file') && ($action != 'restorelocal')) { $file_array['file'] = $entry; $file_array['date'] = date(PHP_DATE_TIME_FORMAT, filemtime(OOS_PSM_PATH . $entry)); $file_array['size'] = number_format(filesize(OOS_PSM_PATH . $entry)) . ' bytes'; $psmInfo = new objectInfo($file_array); } if (isset($psmInfo) && is_object($psmInfo) && ($entry == $psmInfo->file)) { echo ' ' . "\n"; $onclick_link = 'file=' . $psmInfo->file . '&action=restore'; } else { echo ' ' . "\n"; $onclick_link = 'file=' . $entry; } ?> close(); } ?>
 
' . oos_image(OOS_IMAGES . 'icons/file_download.gif', ICON_FILE_DOWNLOAD) . ' ' . $entry; ?> bytes file) ) { echo oos_image(OOS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . oos_image(OOS_IMAGES . 'icon_information.gif', IMAGE_ICON_INFO) . ''; } ?> 
' . oos_image_swap_button('backup','backup_off.gif', IMAGE_BACKUP) . ''; ?>
' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo '