Installationsanleitung: Updatepack von xtcModified V1.05 SP1b auf V1.05 SP1c
@compatible xtcModified V1.05 SP1b (c) 2009-2012 Alkim MediaDieses Dokument ist durch Urheberrecht geschützt und darf ohne ausdrückliche Erlaubnis weder kopiert noch vervielfältigt oder Dritten zugänglich gemacht werden!
Alkim Media * Geschäftsführerin: Thekla Alkim * Perleberger Straße 62b * 16866 Kyritz * www.alkim.de * info@alkim.de
2. new_files und new_dirs kopieren.
3. changed_files kopieren, oder bei nicht standard-version folgende änderungen durchführen. Dabei ist zu beachten, dass grüner Text hinzugefügt und roter Text entfernt wird!
NEW FILES:
admin/images/icon_arrow_grey.gif
admin/images/icons/folder_parent.gif
admin/includes/head.php
admin/includes/modules/export/wein2.php
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/xtc_access.php
export/_error_reporting.admin
xtc_installer/version105sp1c
admin/images/icons/folder_parent.gif
admin/includes/head.php
admin/includes/modules/export/wein2.php
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/xtc_access.php
export/_error_reporting.admin
xtc_installer/version105sp1c
NEW DIRS:
admin/includes/modules/export/idealo_lib
CHANGED FILES:
_.htaccess
admin/categories.php
admin/content_manager.php
admin/customers.php
admin/customers_status.php
admin/includes/application_top.php
admin/includes/classes/box.php
admin/includes/classes/categories.php
admin/includes/classes/image_manipulator_GD1.php
admin/includes/classes/image_manipulator_GD2.php
admin/includes/classes/language.php
admin/includes/classes/order.php
admin/includes/classes/phplot.php
admin/includes/classes/split_page_results.php
admin/includes/classes/table_block.php
admin/includes/functions/general.php
admin/includes/functions/sessions.php
admin/includes/header.php
admin/includes/modules/categories_specials.php
admin/includes/modules/categories_view.php
admin/includes/modules/export/billiger.php
admin/includes/modules/export/froogle.php
admin/includes/modules/export/geizhals.php
admin/includes/modules/export/golem.php
admin/includes/modules/export/googlebase.php
admin/includes/modules/export/guenstiger.php
admin/includes/modules/export/idealo.php
admin/includes/modules/export/image_processing_step.php
admin/includes/modules/export/kelkoo.php
admin/includes/modules/export/metashopper.php
admin/includes/modules/export/milando.php
admin/includes/modules/export/preisauskunft.php
admin/includes/modules/export/preisroboter.php
admin/includes/modules/export/preissuchmaschine.php
admin/includes/modules/export/preistrend.php
admin/includes/modules/export/shopboy.php
admin/includes/modules/export/wein.php
admin/includes/modules/fckeditor/editor/dialog/fck_about.html
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/config.php
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/io.php
admin/includes/modules/new_attributes_include.php
admin/manufacturers.php
admin/module_newsletter.php
admin/new_attributes.php
admin/orders.php
admin/orders_edit.php
admin/orders_edit_address.php
admin/print_order.php
admin/print_packingslip.php
advanced_search_result.php
checkout_confirmation.php
checkout_payment.php
checkout_process.php
checkout_shipping.php
create_account.php
create_guest_account.php
inc/xtc_count_cart.inc.php
inc/xtc_count_modules.inc.php
inc/xtc_db_error.inc.php
inc/xtc_draw_selection_field.inc.php
inc/xtc_get_tax_rate_from_desc.inc.php
inc/xtc_href_link.inc.php
inc/xtc_href_link_from_admin.inc.php
inc/xtc_wysiwyg.inc.php
includes/application_top.php
includes/application_top_callback.php
includes/application_top_export.php
includes/center_modules.php
includes/classes/class.inputfilter.php
includes/classes/language.php
includes/classes/order.php
includes/classes/order_total.php
includes/classes/payment.php
includes/classes/product.php
includes/classes/shipping.php
includes/classes/shopping_cart.php
includes/classes/Smarty_2.6.26/plugins/outputfilter.note.php
includes/classes/split_page_results.php
includes/classes/xtcPrice.php
includes/data/blz.csv
includes/functions/sessions.php
includes/header.php
includes/modules/default.php
includes/modules/error_handler.php
includes/modules/metatags.php
includes/modules/order_total/ot_coupon.php
includes/modules/product_attributes.php
includes/modules/product_listing.php
includes/tracking.php
index.php
lang/english/admin/customers.php
lang/english/admin/orders.php
lang/english/admin/orders_edit.php
lang/english/english.php
lang/german/admin/customers.php
lang/german/admin/orders.php
lang/german/admin/orders_edit.php
lang/german/german.php
login_admin.php
print_order.php
print_product_info.php
product_info.php
reviews.php
send_order.php
templates/xtc5/admin/print_order.html
templates/xtc5/admin/print_packingslip.html
templates/xtc5/css/javascript.css
templates/xtc5/javascript/thickbox.js
templates/xtc5/source/boxes/manufacturer_info.php
templates/xtc5/stylesheet.css
xtc_installer/includes/application.php
xtc_installer/index.php
xtc_installer/install_finished.php
xtc_installer/install_step1.php
xtc_installer/install_step2.php
xtc_installer/install_step4.php
xtc_installer/install_step5.php
xtc_installer/xtcommerce.sql
INSTALLATION:
1. Datenkbankerweiterungen durchführenDazu bitte die _Updateanleitung auf neuere Version.txt beachten!
3. changed_files kopieren, oder bei nicht standard-version folgende änderungen durchführen. Dabei ist zu beachten, dass grüner Text hinzugefügt und roter Text entfernt wird!
_.htaccessTop ca. Zeile 1
# $Id: .htaccess,v 1.5 2005/05/19 17:09:19 Administrator Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
#<Directory "/usr/local/apache/htdocs">
# AllowOverride Options
#</Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#<IfModule mod_php4.c>
# php_value session.use_trans_sid 0
# php_value register_globals 1
#</IfModule>
#-- set expire header for image, pdf, js and css files for 30 days
#<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif|js|css)$" >
# Header set Cache-Control "max-age=2592000, public"
#</FilesMatch>
#-- Turn off ETags in HTTP-header
#FileETag None
##-- $Id: _.htaccess 2670 2012-02-23 12:53:47Z dokuman $
#-- Call time pass reference error ?!
#php_flag allow_call_time_pass_reference On
#-- XTC Session only on first visit
#php_flag session.use_trans_sid 0
##-- Main Defaults
AddDefaultCharset ISO-8859-15
ServerSignature Off
##-- Turn off ETags in HTTP-header (use both directives)
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None
#-----------------------------------------
#- SEO Hartmut König
#-----------------------------------------
#-- ! Comment this line, if you get an ERROR 500 !
#Options +FollowSymlinks
##-- When caching of gzipped JS and CSS files is used, enable this setting
<IfModule mod_headers.c>
# Header set Vary Accept-Encoding
</IfModule>
# http://httpd.apache.org/docs/misc/rewriteguide.html
RewriteEngine on
##-- Enable the compression for any type of content
<IfModule mod_deflate.c>
<FilesMatch "\\.(js|css|html|htm|php|xml|jpg|jpeg|png|gif)$">
# SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
#-- Sitemap
RewriteRule ^sitemap(.*)\.html$ /shop_content.php?coID=8 [qsappend,L]
##-- Customization of HTTP request and response headers
<IfModule mod_headers.c>
<FilesMatch "\\.(ico|jpe?g|png|gif|swf|flv)$">
Header set Cache-Control "max-age=2592000, public"
</FilesMatch>
<FilesMatch "\\.(css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
<FilesMatch "\\.(js)$">
Header set Cache-Control "max-age=216000, private"
</FilesMatch>
<FilesMatch "\\.(xml|txt)$">
Header set Cache-Control "max-age=216000, public, must-revalidate"
</FilesMatch>
<FilesMatch "\\.(html|htm|php)$">
Header set Cache-Control "max-age=1, private, must-revalidate"
</FilesMatch>
</IfModule>
##-- Kategorien
RewriteCond %{REQUEST_URI} (.*):::([_0-9]+):([_0-9]+)\.html$
RewriteRule (.*):::([_0-9]+):([_0-9]+)\.html$ /index.php?cPath=$2&page=$3 [qsappend,L]
RewriteCond %{REQUEST_URI} (.*):::([_0-9]+)\.html$
RewriteRule (.*):::([_0-9]+)\.html$ /index.php?cPath=$2 [qsappend,L]
##-- Generation of Expires and Cache-Control HTTP headers
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
</IfModule>
##-- Produkte
RewriteRule (.*)::(.+)\.html$ /product_info.php?products_id=$2 [qsappend,L]
##-- Configure php_flags if necessary
## BEGIN - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
#<IfModule mod_php.c>
##-- Warn when arguments are passed by reference at function call time (from PHP5 allow_call_time_pass_reference is deprecated)
#php_flag allow_call_time_pass_reference on
##-- Disable transparent sid support PHP-default is off (XTC Session only on first visit)
#php_flag session.use_trans_sid off
##-- set suhosin flags because of errors with attributes (for webhosters with suhosin hardening patch enabled)
#php_value suhosin.post.max_array_depth 0
#php_value suhosin.post.max_array_index_length 0
#php_value suhosin.post.max_vars 0
#php_value suhosin.request.max_array_depth 0
#php_value suhosin.request.max_array_index_length 0
#php_value suhosin.request.max_vars 0
##-- set suhosin flags to have unencrypted session data, affecting "whos_online" & "shopping cart" (for webhosters with suhosin hardening patch enabled)patch enabled
#php_value suhosin.session.encrypt Off
#php_value suhosin.session.cryptkey ''
##-- Content
RewriteRule (.*):_:([0-9]+)\.html$ /shop_content.php?coID=$2 [qsappend,L]
## END - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
#</IfModule>
##-- Manufacturers
RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+):([_0-9]+)\.html$
RewriteRule (.*):.:([_0-9]+):([_0-9]+)\.html$ /index.php?manufacturers_id=$2&page=$3 [qsappend,L]
RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+)\.html$
RewriteRule (.*):.:([0-9]+)\.html$ /index.php?manufacturers_id=$2 [qsappend,L]
##-- when using Provider 1&1 set the following lines to activate PHP5
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
##-- Fehlerseiten auf die Sitemap lotsen
##-- Redirect error pages to Sitemap
ErrorDocument 400 /sitemap.html?error=400
ErrorDocument 401 /sitemap.html?error=401
ErrorDocument 402 /sitemap.html?error=402
ErrorDocument 403 /sitemap.html?error=403
ErrorDocument 404 /sitemap.html?error=404
ErrorDocument 500 /sitemap.html?error=500
##-- BOF - Tomcraft - 2009-09-09 - Use canonical URLs
# (don't use if your shop runs on a subdomain!)
#
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]
#
##-- EOF - Tomcraft - 2009-09-09 - Use canonical URLs
##-----------------------------------------
##- SEO Shopstat Modul (Hartmut König)
##-----------------------------------------
<IfModule mod_rewrite.c>
##-- Documentation http://httpd.apache.org/docs/misc/rewriteguide.html
RewriteEngine On
##-- EXAMPLE: If your shop is located at "http://www.yourdomain.com/shop",
##-- set the following line like e.g.: RewriteBase /shop
RewriteBase /
##-- Use canonical URLs
##-- redirect to www-domain, when www is missing and no subdomain given and not using an ssl-proxy
#RewriteCond %{HTTP:X-Forwarded-Server} !^ssl\.webpack\.de$ [NC]
#RewriteCond %{HTTP:X-Forwarded-Server} !^sslsites\.de$ [NC]
#RewriteCond %{HTTP_HOST} !^www\..* [NC]
#RewriteCond %{HTTP_HOST} !^.*\..*\..* [NC]
#RewriteCond %{HTTP_HOST} !^localhost(.*)$ [NC]
#RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
#-- redirect /folder/index.php to /folder/ (i.e. hide index.php)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html$ http://%{HTTP_HOST}/$1 [R=301,L]
##-- Sitemap
RewriteRule ^sitemap(.*)\.html$ shop_content.php?coID=8 [QSA,L]
##----------------------------------------------------------------------------------
##-- When working with SEO-Urls you can decide, wheter to use a colon ":" or a dash "-" symbol
##-- (Windows Servers might have problems with colon as delimiter!)
##-- Change the delimiter symbol also in file "/inc/shopstat_functions.inc.php"
##----------------------------------------------------------------------------------
##-- Use colon delimiter ":" for SEO-URLS (default setting)
##-- Categories (:::)
RewriteCond %{REQUEST_URI} (.*):::([_0-9]+):([_0-9]+)\.html$
RewriteRule (.*):::([_0-9]+):([_0-9]+)\.html$ index.php?cPath=$2&page=$3 [QSA,L]
RewriteCond %{REQUEST_URI} (.*):::([_0-9]+)\.html$
RewriteRule (.*):::([_0-9]+)\.html$ index.php?cPath=$2 [QSA,L]
##-- Products (::)
RewriteRule (.*)::(.+)\.html$ product_info.php?products_id=$2 [QSA,L]
##-- Content (:_:)
RewriteRule (.*):_:([0-9]+)\.html$ shop_content.php?coID=$2 [QSA,L]
##-- Manufacturers (:.:)
RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+):([_0-9]+)\.html$
RewriteRule (.*):.:([_0-9]+):([_0-9]+)\.html$ index.php?manufacturers_id=$2&page=$3 [QSA,L]
RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+)\.html$
RewriteRule (.*):.:([0-9]+)\.html$ index.php?manufacturers_id=$2 [QSA,L]
##-- Use dash delimiter "-" for SEO-URLS
##-- Categories (---)
#RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)-([_0-9]+)\.html$
#RewriteRule (.*)---([_0-9]+)-([_0-9]+)\.html$ index.php?cPath=$2&page=$3 [QSA,L]
#RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)\.html$
#RewriteRule (.*)---([_0-9]+)\.html$ index.php?cPath=$2 [QSA,L]
##-- Products (--)
#RewriteRule (.*)--(.+)\.html$ product_info.php?products_id=$2 [QSA,L]
##-- Content (-_-)
#RewriteRule (.*)-_-([0-9]+)\.html$ shop_content.php?coID=$2 [QSA,L]
##-- Manufacturers (-.-)
#RewriteCond %{REQUEST_URI} (.*)-.-([_0-9]+)-([_0-9]+)\.html$
#RewriteRule (.*)-.-([_0-9]+)-([_0-9]+)\.html$ index.php?manufacturers_id=$2&page=$3 [QSA,L]
#RewriteCond %{REQUEST_URI} (.*)-.-([_0-9]+)\.html$
#RewriteRule (.*)-.-([0-9]+)\.html$ index.php?manufacturers_id=$2 [QSA,L]
</IfModule>
admin/categories.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: categories.php 1249 2005-09-27 12:06:40Z gwinger $
$Id: categories.php 2645 2012-01-31 21:08:03Z Tomcraft1980 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(categories.php,v 1.140 2003/03/24); www.oscommerce.com
(c) 2003 nextcommerce (categories.php,v 1.37 2003/08/18); www.nextcommerce.org
Released under the GNU General Public License
(c) 2002-2003 osCommerce(categories.php,v 1.26 2003/05/17); www.oscommerce.com
(c) 2003 nextcommerce (categories.php,v 1.9 2003/08/18); www.nextcommerce.org
(c) 2006 XT-Commerce (categories.php 1123 2005-07-27)
--------------------------------------------------------------
Third Party contribution:
Enable_Disable_Categories 1.3 Autor: Mikel Williams | mikel@ladykatcostumes.com
New Attribute Manager v4b Autor: Mike G | mp3man@internetwork.net | http://downloads.ephing.com
ca. Zeile 24
Released under the GNU General Public License
--------------------------------------------------------------*/
require_once ('includes/application_top.php');
require_once ('includes/classes/'.FILENAME_IMAGEMANIPULATOR);
require_once ('includes/classes/categories.php');
require_once (DIR_WS_CLASSES.FILENAME_IMAGEMANIPULATOR);
require_once (DIR_WS_CLASSES.'categories.php');
require_once (DIR_FS_INC.'xtc_get_tax_rate.inc.php');
require_once (DIR_FS_INC.'xtc_get_products_mo_images.inc.php');
require_once (DIR_WS_CLASSES.'currencies.php');
require_once (DIR_FS_INC.'xtc_wysiwyg.inc.php');
ca. Zeile 257
// --- MULTI COPY ---
if (isset ($_POST['multi_copy_confirm'])) {
//copy multi_categories
if (is_array($_POST['multi_categories']) && (is_array($_POST['dest_cat_ids']) || xtc_not_null($_POST['dest_category_id']))) {
//BOF - DokuMan - 2010-09-27 - do not create copied categories under TOP-category, but in the chosen category
if (!isset($_POST['dest_cat_ids']) and isset($_POST['dest_category_id'])) {
$_POST['dest_cat_ids'] = array($_POST['dest_category_id']);
}
//EOF - DokuMan - 2010-09-27 - do not create copied categories under TOP-category, but in the chosen category
$_SESSION['copied'] = array ();
foreach ($_POST['multi_categories'] AS $category_id) {
if (is_array($_POST['dest_cat_ids'])) {
foreach ($_POST['dest_cat_ids'] AS $dest_category_id) {
if ($_POST['copy_as'] == 'link') {
$catfunc->copy_category($category_id, $dest_category_id, 'link');
}
elseif ($_POST['copy_as'] == 'duplicate') {
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->copy_category($category_id, $dest_category_id, 'duplicate');
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
}
}
elseif (xtc_not_null($_POST['dest_category_id'])) {
} elseif (xtc_not_null($_POST['dest_category_id'])) {
$dest_category_id = xtc_db_prepare_input($_POST['dest_category_id']); // web28 - 2012-04-14 - BUGFIX $dest_category_id
if ($_POST['copy_as'] == 'link') {
$catfunc->copy_category($category_id, $dest_category_id, 'link');
}
elseif ($_POST['copy_as'] == 'duplicate') {
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->copy_category($category_id, $dest_category_id, 'duplicate');
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
ca. Zeile 293
foreach ($_POST['dest_cat_ids'] AS $dest_category_id) {
$dest_category_id = xtc_db_prepare_input($dest_category_id);
if ($_POST['copy_as'] == 'link') {
$catfunc->link_product($product_id, $dest_category_id);
}
elseif ($_POST['copy_as'] == 'duplicate') {
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->duplicate_product($product_id, $dest_category_id);
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
}
}
elseif (xtc_not_null($_POST['dest_category_id'])) {
} elseif (xtc_not_null($_POST['dest_category_id'])) {
$dest_category_id = xtc_db_prepare_input($_POST['dest_category_id']);
if ($_POST['copy_as'] == 'link') {
$catfunc->link_product($product_id, $dest_category_id);
}
elseif ($_POST['copy_as'] == 'duplicate') {
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->duplicate_product($product_id, $dest_category_id);
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
admin/content_manager.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: content_manager.php 1304 2005-10-12 18:04:43Z mz $
$Id: content_manager.php 2811 2012-05-01 12:01:22Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommercecoding standards www.oscommerce.com
(c) 2003 nextcommerce (content_manager.php,v 1.18 2003/08/25); www.nextcommerce.org
(c) 2006 XT-Commerce (content_manager.php 1304 2005-10-12)
Released under the GNU General Public License
--------------------------------------------------------------
Third Party contribution:
ca. Zeile 24
require_once(DIR_FS_INC . 'xtc_format_filesize.inc.php');
require_once(DIR_FS_INC . 'xtc_filesize.inc.php');
require_once(DIR_FS_INC . 'xtc_wysiwyg.inc.php');
$action = (isset($_GET['action']) ? $_GET['action'] : '');
$special = (isset($_GET['special']) ? $_GET['special'] : '');
$id = (isset($_GET['id']) ? $_GET['id'] : '');
$g_coID = (isset($_GET['coID']) ? (int)$_GET['coID'] : '');
$languages = xtc_get_languages();
if ($_GET['special']=='delete') {
xtc_db_query("DELETE FROM ".TABLE_CONTENT_MANAGER." where content_id='".(int)$_GET['coID']."'");
if ($special=='delete') {
xtc_db_query("DELETE FROM ".TABLE_CONTENT_MANAGER." where content_id='".$g_coID."'");
xtc_redirect(xtc_href_link(FILENAME_CONTENT_MANAGER));
} // if get special
if ($_GET['special']=='delete_product') {
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_CONTENT." where content_id='".(int)$_GET['coID']."'");
if ($special=='delete_product') {
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_CONTENT." where content_id='".$g_coID."'");
xtc_redirect(xtc_href_link(FILENAME_CONTENT_MANAGER,'pID='.(int)$_GET['pID']));
} // if get special
if ($_GET['id']=='update' or $_GET['id']=='insert') {
if ($id=='update' or $id=='insert') {
// set allowed c.groups
$group_ids='';
if(isset($_POST['groups'])) foreach($_POST['groups'] as $b){
$group_ids .= 'c_'.$b."_group ,";
ca. Zeile 65
$select_file=xtc_db_prepare_input($_POST['select_file']);
$file_flag=xtc_db_prepare_input($_POST['file_flag']);
$parent_check=xtc_db_prepare_input($_POST['parent_check']);
$parent_id=xtc_db_prepare_input($_POST['parent']);
$content_query = xtc_db_query("SELECT MAX(content_group) AS content_group FROM ".TABLE_CONTENT_MANAGER."");
$content_data = mysql_fetch_row($content_query);
if ($_POST['content_group'] == '0' || $_POST['content_group'] == '') {
$group_id = $content_data[0] + 1;
} else {
$group_id=xtc_db_prepare_input($_POST['content_group']);
}
$group_ids = $group_ids;
$sort_order=xtc_db_prepare_input($_POST['sort_order']);
$content_meta_title = xtc_db_prepare_input($_POST['cont_meta_title']);
$content_meta_description = xtc_db_prepare_input($_POST['cont_meta_description']);
$content_meta_keywords = xtc_db_prepare_input($_POST['cont_meta_keywords']);
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
if ($languages[$i]['code']==$content_language) $content_language=$languages[$i]['id'];
if ($languages[$i]['code']==$content_language) {
$content_language=$languages[$i]['id'];
}
} // for
$error=false; // reset error flag
if (strlen($content_title) < 1) {
ca. Zeile 94
} else{
$parent_id='0';
} // if
if ($error == false) {
// file upload
if ($select_file!='default') $content_file_name=$select_file;
if ($content_file = &xtc_try_upload('file_upload', DIR_FS_CATALOG.'media/content/')) {
if ($select_file!='default') {
$content_file_name=$select_file;
}
$accepted_file_upload_files_extensions = array("xls","xla","hlp","chm","ppt","ppz","pps","pot","doc","dot","pdf","rtf","swf","cab","tar","zip","au","snd","mp2","rpm","stream","wav","gif","jpeg","jpg","jpe","png","tiff","tif","bmp","csv","txt","rtf","tsv","mpeg","mpg","mpe","qt","mov","avi","movie","rar","7z");
$accepted_file_upload_files_mime_types = array("application/msexcel","application/mshelp","application/mspowerpoint","application/msword","application/pdf","application/rtf","application/x-shockwave-flash","application/x-tar","application/zip","audio/basic","audio/x-mpeg","audio/x-pn-realaudio-plugin","audio/x-qt-stream","audio/x-wav","image/gif","image/jpeg","image/png","image/tiff","image/bmp","text/comma-separated-values","text/plain","text/rtf","text/tab-separated-values","video/mpeg","video/quicktime","video/x-msvideo","video/x-sgi-movie","application/x-rar-compressed","application/x-7z-compressed");
if ($content_file = &xtc_try_upload('file_upload', DIR_FS_CATALOG.'media/content/','',$accepted_file_upload_files_extensions,$accepted_file_upload_files_mime_types)) {
$content_file_name=$content_file->filename;
} // if
}
// update data in table
$sql_data_array = array(
'languages_id' => $content_language,
'content_title' => $content_title,
'content_heading' => $content_header,
ca. Zeile 122
'file_flag' => $file_flag,
'content_meta_title' => $content_meta_title,
'content_meta_description' => $content_meta_description,
'content_meta_keywords' => $content_meta_keywords);
if ($_GET['id']=='update') {
if ($id=='update') {
xtc_db_perform(TABLE_CONTENT_MANAGER, $sql_data_array, 'update', "content_id = '" . $coID . "'");
} else {
xtc_db_perform(TABLE_CONTENT_MANAGER, $sql_data_array);
} // if get id
xtc_redirect(xtc_href_link(FILENAME_CONTENT_MANAGER));
} // if error
} // if
if ($_GET['id']=='update_product' or $_GET['id']=='insert_product') {
if ($id=='update_product' or $id=='insert_product') {
// set allowed c.groups
$group_ids='';
if(isset($_POST['groups'])) foreach($_POST['groups'] as $b){
$group_ids .= 'c_'.$b."_group ,";
ca. Zeile 168
$error = true;
$messageStack->add(ERROR_TITLE,'error');
} // if
if ($error == false) {
/* mkdir() wont work with php in safe_mode
if (!is_dir(DIR_FS_CATALOG.'media/products/'.$product.'/')) {
$old_umask = umask(0);
xtc_mkdirs(DIR_FS_CATALOG.'media/products/'.$product.'/',0777);
umask($old_umask);
}
*/
// mkdir() wont work with php in safe_mode
//if (!is_dir(DIR_FS_CATALOG.'media/products/'.$product.'/')) {
// $old_umask = umask(0);
// xtc_mkdirs(DIR_FS_CATALOG.'media/products/'.$product.'/',0777);
// umask($old_umask);
//}
if ($select_file=='default') {
if ($content_file = &xtc_try_upload('file_upload', DIR_FS_CATALOG.'media/products/')) {
$accepted_file_upload_files_extensions = array("xls","xla","hlp","chm","ppt","ppz","pps","pot","doc","dot","pdf","rtf","swf","cab","tar","zip","au","snd","mp2","rpm","stream","wav","gif","jpeg","jpg","jpe","png","tiff","tif","bmp","csv","txt","rtf","tsv","mpeg","mpg","mpe","qt","mov","avi","movie","rar","7z");
$accepted_file_upload_files_mime_types = array("application/msexcel","application/mshelp","application/mspowerpoint","application/msword","application/pdf","application/rtf","application/x-shockwave-flash","application/x-tar","application/zip","audio/basic","audio/x-mpeg","audio/x-pn-realaudio-plugin","audio/x-qt-stream","audio/x-wav","image/gif","image/jpeg","image/png","image/tiff","image/bmp","text/comma-separated-values","text/plain","text/rtf","text/tab-separated-values","video/mpeg","video/quicktime","video/x-msvideo","video/x-sgi-movie","application/x-rar-compressed","application/x-7z-compressed");
if ($content_file = &xtc_try_upload('file_upload', DIR_FS_CATALOG.'media/products/','',$accepted_file_upload_files_extensions,$accepted_file_upload_files_mime_types)) {
$content_file_name=$content_file->filename;
$old_filename=$content_file->filename;
$timestamp=str_replace('.','',microtime());
$timestamp=str_replace(' ','',$timestamp);
ca. Zeile 192
$rename_string=DIR_FS_CATALOG.'media/products/'.$content_file_name;
rename(DIR_FS_CATALOG.'media/products/'.$old_filename,$rename_string);
copy($rename_string,DIR_FS_CATALOG.'media/products/backup/'.$content_file_name);
}
if ($content_file_name=='') $content_file_name=$filename;
if ($content_file_name=='')
$content_file_name=$filename;
} else {
$content_file_name=$select_file;
}
// if
// update data in table
// set allowed c.groups
$group_ids='';
if(isset($_POST['groups'])) foreach($_POST['groups'] as $b){
$group_ids .= 'c_'.$b."_group ,";
ca. Zeile 222
'content_link' => $content_link,
'file_comment' => $file_comment,
'languages_id' => $content_language);
if ($_GET['id']=='update_product') {
if ($id=='update_product') {
xtc_db_perform(TABLE_PRODUCTS_CONTENT, $sql_data_array, 'update', "content_id = '" . $coID . "'");
$content_id = xtc_db_insert_id();
} else {
xtc_db_perform(TABLE_PRODUCTS_CONTENT, $sql_data_array);
ca. Zeile 231
$content_id = xtc_db_insert_id();
} // if get id
// rename filename
xtc_redirect(xtc_href_link(FILENAME_CONTENT_MANAGER,'pID='.$product));
}// if error
}
require (DIR_WS_INCLUDES.'head.php');
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<?php if (USE_WYSIWYG=='true') {
if (USE_WYSIWYG=='true') {
$query=xtc_db_query("SELECT code FROM ". TABLE_LANGUAGES ." WHERE languages_id='".$_SESSION['languages_id']."'");
$data=xtc_db_fetch_array($query);
if ($_GET['action']!='new_products_content' && $_GET['action']!='') echo xtc_wysiwyg('content_manager',$data['code']);
if ($_GET['action']=='new_products_content') echo xtc_wysiwyg('products_content',$data['code']);
// BOF - Tomcraft - 2009-06-18 - change due to update on base version of content_manager.php
if ($_GET['action']=='edit_products_content') echo xtc_wysiwyg('products_content',$data['code']);
// EOF - Tomcraft - 2009-06-18 - change due to update on base version of content_manager.php
} ?>
if ($action != 'new_products_content' && $action != '')
echo xtc_wysiwyg('content_manager',$data['code']);
if ($action =='new_products_content')
echo xtc_wysiwyg('products_content',$data['code']);
if ($action =='edit_products_content')
echo xtc_wysiwyg('products_content',$data['code']);
}
?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<body>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php');?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php');?>
<!-- left_navigation_eof //-->
</table></td>
</table>
</td>
<!-- body_text //-->
<td class="boxCenter" width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<td class="boxCenter" width="100%" valign="top">
<div style="max-width:1240px; min-width:980px;">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS.'heading_content.gif'); ?></td>
<td class="pageHeading"><?php echo HEADING_TITLE;?></td>
ca. Zeile 296
<table width="100%" border="0">
<tr>
<td>
<?php
if (!$_GET['action']) {
if (!$action) {
?>
<div class="pageHeading"><br /><?php echo HEADING_CONTENT; ?><br /></div>
<div class="main"><?php echo CONTENT_NOTE; ?></div>
<?php
xtc_spaceUsed(DIR_FS_CATALOG.'media/content/');
echo '<div class="main">'.USED_SPACE.xtc_format_filesize($total).'</div>';
$total_space_media_content = xtc_spaceUsed(DIR_FS_CATALOG.'media/content/'); // DokuMan - 2011-09-06 - sum up correct filesize avoiding global variable
echo '<div class="main">'.USED_SPACE.xtc_format_filesize($total_space_media_content).'</div>';
?>
<?php
// Display Content
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
ca. Zeile 331
content_meta_keywords
FROM ".TABLE_CONTENT_MANAGER."
WHERE languages_id='".$languages[$i]['id']."'
AND parent_id='0'
order by sort_order
ORDER BY content_group,sort_order
");
while ($content_data=xtc_db_fetch_array($content_query)) {
$content[]=array(
'CONTENT_ID' =>$content_data['content_id'] ,
'PARENT_ID' => $content_data['parent_id'],
'GROUP_IDS' => $content_data['group_ids'],
ca. Zeile 380
if ($content[$ii]['CONTENT_FILE']=='') $content[$ii]['CONTENT_FILE']='database';
?>
<td class="dataTableContent" align="left"><?php echo $content[$ii]['CONTENT_ID']; ?></td>
<td bgcolor="<?php echo substr((6543216554/$content[$ii]['CONTENT_GROUP']),0,6); ?>" class="dataTableContent" align="left"> </td>
<td class="dataTableContent" align="left"><?php echo $content[$ii]['CONTENT_TITLE']; ?>
<td class="dataTableContent" align="left">
<?php echo $content[$ii]['CONTENT_TITLE']; ?>
<?php
if ($content[$ii]['CONTENT_DELETE']=='0'){
echo '<font color="#ff0000">*</font>';
} ?>
ca. Zeile 397
<?php
if ($content[$ii]['CONTENT_DELETE']=='1'){
?>
<a href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'special=delete&coID='.$content[$ii]['CONTENT_ID']); ?>" onclick="return confirm('<?php echo CONFIRM_DELETE; ?>')">
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<?php echo xtc_image(DIR_WS_ICONS.'delete.gif','Delete','','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
//} // if content
?>
-->
<?php echo xtc_image(DIR_WS_ICONS.'delete.gif', ICON_DELETE,'','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
<?php
echo xtc_image(DIR_WS_ICONS.'delete.gif', ICON_DELETE,'','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
} // if content
?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<a href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'action=edit&coID='.$content[$ii]['CONTENT_ID']); ?>">
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif','Edit','','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>'; ?>
-->
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif', ICON_EDIT,'','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>'; ?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'coID='.$content[$ii]['CONTENT_ID']); ?>', 'popup', 'toolbar=0, width=640, height=600')"><?php echo xtc_image(DIR_WS_ICONS.'preview.gif','Preview','','','style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>'; ?>
-->
<!-- BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //-->
<!--
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'coID='.$content[$ii]['CONTENT_ID']); ?>', 'popup', 'toolbar=0, width=640, height=600')"><?php echo xtc_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW,'','','style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>'; ?>
//-->
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'coID='.$content[$ii]['CONTENT_ID']); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600')"><?php echo xtc_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW,'','','style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>'; ?>
<!-- EOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //-->
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<?php
echo xtc_image(DIR_WS_ICONS.'icon_edit.gif', ICON_EDIT,'','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>';
?>
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'coID='.$content[$ii]['CONTENT_ID']); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600')">
<?php
echo xtc_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW,'','','style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>';
?>
</td>
</tr>
<?php
$content_1=array();
$content_1_query=xtc_db_query("SELECT
content_id,
ca. Zeile 449
content_meta_keywords
FROM ".TABLE_CONTENT_MANAGER."
WHERE languages_id='".$i."'
AND parent_id='".$content[$ii]['CONTENT_ID']."'
order by sort_order
ORDER BY content_group,sort_order
");
while ($content_1_data=xtc_db_fetch_array($content_1_query)) {
$content_1[]=array(
'CONTENT_ID' =>$content_1_data['content_id'] ,
'PARENT_ID' => $content_1_data['parent_id'],
'GROUP_IDS' => $content_1_data['group_ids'],
ca. Zeile 489
<?php
if ($content_1[$a]['CONTENT_DELETE']=='1'){
?>
<a href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'special=delete&coID='.$content_1[$a]['CONTENT_ID']); ?>" onclick="return confirm('<?php echo CONFIRM_DELETE; ?>')">
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<?php echo xtc_image(DIR_WS_ICONS.'delete.gif','Delete','','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
//} // if content
?>
-->
<?php echo xtc_image(DIR_WS_ICONS.'delete.gif', ICON_DELETE,'','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
<?php
echo xtc_image(DIR_WS_ICONS.'delete.gif', ICON_DELETE,'','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
} // if content
?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<a href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'action=edit&coID='.$content_1[$a]['CONTENT_ID']); ?>">
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif','Edit','','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>'; ?>
-->
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif', ICON_EDIT,'','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>'; ?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!-- BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //-->
<!--
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'coID='.$content_1[$a]['CONTENT_ID']); ?>', 'popup', 'toolbar=0, width=640, height=600')">
//-->
<?php
echo xtc_image(DIR_WS_ICONS.'icon_edit.gif', ICON_EDIT,'','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>';
?>
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'coID='.$content_1[$a]['CONTENT_ID']); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600')">
<!-- EOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //-->
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<?php echo xtc_image(DIR_WS_ICONS.'preview.gif','Preview','','','style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>'; ?>
-->
<?php echo xtc_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW,'','','style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>'; ?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<?php
echo xtc_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW,'','','style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>';
?>
</td>
</tr>
<?php
}
} // for content
} // for language
ca. Zeile 529
} // for content
} // for language
?>
</table>
<?php
}
} else {
switch ($_GET['action']) {
switch ($action) {
// Diplay Editmask
case 'new':
case 'edit':
if ($_GET['action']!='new') {
if ($action != 'new') {
$content_query=xtc_db_query("SELECT
content_id,
categories_id,
parent_id,
ca. Zeile 559
content_meta_title,
content_meta_description,
content_meta_keywords
FROM ".TABLE_CONTENT_MANAGER."
WHERE content_id='".(int)$_GET['coID']."'");
WHERE content_id='".$g_coID."'");
$content=xtc_db_fetch_array($content_query);
}
$languages_array = array();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
if ($languages[$i]['id']==$content['languages_id']) {
$languages_selected=$languages[$i]['code'];
$languages_id=$languages[$i]['id'];
}
ca. Zeile 575
$languages_id=$languages[$i]['id'];
}
$languages_array[] = array('id' => $languages[$i]['code'],
'text' => $languages[$i]['name']);
} // for
if ($languages_id!='') $query_string='languages_id='.$languages_id.' AND';
$query_string = '';
if (!empty($languages_id)) {
$query_string='languages_id='.$languages_id.' AND';
}
$categories_query=xtc_db_query("SELECT
content_id,
content_title
FROM ".TABLE_CONTENT_MANAGER."
WHERE ".$query_string." parent_id='0'
AND content_id!='".(int)$_GET['coID']."'");
AND content_id!='".$g_coID."'");
while ($categories_data=xtc_db_fetch_array($categories_query)) {
$categories_array[]=array(
'id'=>$categories_data['content_id'],
$categories_array[]=array('id'=>$categories_data['content_id'],
'text'=>$categories_data['content_title']);
}
?>
<br /><br />
<?php
if ($_GET['action']!='new') {
echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit&id=update&coID='.$_GET['coID'],'post','enctype="multipart/form-data"').xtc_draw_hidden_field('coID',$_GET['coID']);
if ($action != 'new') {
echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit&id=update&coID='.$g_coID,'post','enctype="multipart/form-data"').xtc_draw_hidden_field('coID',$g_coID);
} else {
echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit&id=insert','post','enctype="multipart/form-data"').xtc_draw_hidden_field('coID',$_GET['coID']);
} ?>
<table class="main" width="100%" border="0">
echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit&id=insert','post','enctype="multipart/form-data"').xtc_draw_hidden_field('coID',$g_coID);
}
?>
<table class="main" width="980" border="0">
<tr>
<td width="10%"><?php echo TEXT_LANGUAGE; ?></td>
<td width="90%"><?php echo xtc_draw_pull_down_menu('language',$languages_array,$languages_selected); ?></td>
</tr>
<?php
if ($content['content_delete']!=0 or $_GET['action']=='new') {
if ($content['content_delete']!=0 or $action == 'new') {
?>
<tr>
<td width="10%"><?php echo TEXT_GROUP; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('content_group',$content['content_group'],'size="5"'); ?><?php echo TEXT_GROUP_DESC; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('content_group',isset($content['content_group'])?$content['content_group']:'','size="5"'); ?><?php echo TEXT_GROUP_DESC; ?></td>
</tr>
<?php
} else {
echo xtc_draw_hidden_field('content_group',$content['content_group']);
ca. Zeile 637
<td width="90%"><?php echo xtc_draw_pull_down_menu('parent',$categories_array,$content['parent_id']); ?><?php echo xtc_draw_checkbox_field('parent_check', 'yes',false).' '.TEXT_PARENT_DESCRIPTION; ?></td>
</tr>
*/
?>
<tr>
<td width="10%"><?php echo TEXT_SORT_ORDER; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('sort_order',$content['sort_order'],'size="5"'); ?></td>
<td width="90%"><?php echo xtc_draw_input_field('sort_order',isset($content['sort_order'])?$content['sort_order']:'','size="5"'); ?></td>
</tr>
<tr>
<td valign="top" width="10%"><?php echo TEXT_STATUS; ?></td>
<td width="90%"><?php
if ($content['content_status']=='1') {
<td width="90%">
<?php
if (isset($content['content_status']) && $content['content_status']=='1') {
echo xtc_draw_checkbox_field('status', 'yes',true).' '.TEXT_STATUS_DESCRIPTION;
} else {
echo xtc_draw_checkbox_field('status', 'yes',false).' '.TEXT_STATUS_DESCRIPTION;
}
?><br /><br /></td>
?>
<br /><br />
</td>
</tr>
<?php
if (GROUP_CHECK=='true') {
$customers_statuses_array = xtc_get_customers_statuses();
$customers_statuses_array=array_merge(array(array('id'=>'all','text'=>TXT_ALL)),$customers_statuses_array);
ca. Zeile 680
</tr>
<?php
}
?>
<tr>
<td width="10%"><?php echo TEXT_TITLE; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_title',$content['content_title'],'size="60"'); ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_title',isset($content['content_title'])?$content['content_title']:'','size="60"'); ?></td>
</tr>
<tr>
<td width="10%"><?php echo TEXT_HEADING; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_heading',$content['content_heading'],'size="60"'); ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_heading',isset($content['content_heading'])?$content['content_heading']:'','size="60"'); ?></td>
</tr>
<tr>
<td width="10%"><?php echo 'Meta Title'; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_meta_title',$content['content_meta_title'],'size="60"'); ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_meta_title',isset($content['content_meta_title'])?$content['content_meta_title']:'','size="60"'); ?></td>
</tr>
<tr>
<td width="10%"><?php echo 'Meta Description'; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_meta_description',$content['content_meta_description'],'size="60"'); ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_meta_description',isset($content['content_meta_description'])?$content['content_meta_description']:'','size="60"'); ?></td>
</tr>
<tr>
<td width="10%"><?php echo 'Meta Keywords'; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_meta_keywords',$content['content_meta_keywords'],'size="60"'); ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_meta_keywords',isset($content['content_meta_keywords'])?$content['content_meta_keywords']:'','size="60"'); ?></td>
</tr>
<tr>
<td width="10%" valign="top"><?php echo TEXT_UPLOAD_FILE; ?></td>
<td width="90%"><?php echo xtc_draw_file_field('file_upload').' '.TEXT_UPLOAD_FILE_LOCAL; ?></td>
ca. Zeile 715
<?php
if ($dir= opendir(DIR_FS_CATALOG.'media/content/')){
while (($file = readdir($dir)) !==false) {
if (is_file( DIR_FS_CATALOG.'media/content/'.$file) and ($file !="index.html")){
$files[]=array(
'id' => $file,
$files[]=array('id' => $file,
'text' => $file);
}//if
} // while
closedir($dir);
// BOF - Tomcraft - 2010-06-17 - Sort files for media-content alphabetically in content manager
sort($files);
// EOF - Tomcraft - 2010-06-17 - Sort files for media-content alphabetically in content manager
sort($files);// Tomcraft - 2010-06-17 - Sort files for media-content alphabetically in content manager
}
// set default value in dropdown!
if ($content['content_file']=='') {
if (empty($content['content_file'])) {
$default_array[]=array('id' => 'default','text' => TEXT_SELECT);
$default_value='default';
if (count($files) == 0)
{
if (count($files) == 0) {
$files = $default_array;
}
else
{
} else {
$files=array_merge($default_array,$files);
}
} else {
$default_array[]=array('id' => 'default','text' => TEXT_NO_FILE);
$default_value=$content['content_file'];
if (count($files) == 0)
{
if (count($files) == 0) {
$files = $default_array;
}
else
{
} else {
$files=array_merge($default_array,$files);
}
}
echo '<br />'.TEXT_CHOOSE_FILE_SERVER.'</br>';
echo xtc_draw_pull_down_menu('select_file',$files,$default_value);
if ($content['content_file']!='') {
if (!empty($content['content_file'])) {
echo TEXT_CURRENT_FILE.' <b>'.$content['content_file'].'</b><br />';
}
?>
</td>
</td>
</tr>
<tr>
<td width="10%" valign="top"></td>
<td colspan="90%" valign="top"><br /><?php echo TEXT_FILE_DESCRIPTION; ?></td>
ca. Zeile 767
<td colspan="90%" valign="top"><br /><?php echo TEXT_FILE_DESCRIPTION; ?></td>
</tr>
<tr>
<td width="10%" valign="top"><?php echo TEXT_CONTENT; ?></td>
<td width="90%">
<?php
echo xtc_draw_textarea_field('cont','','100%','35',$content['content_text']);
echo xtc_draw_textarea_field('cont','','100%','35',isset($content['content_text'])?$content['content_text']:'');
?>
</td>
</tr>
<tr>
<td colspan="2" align="right" class="main"><?php echo '<input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_SAVE . '"/>'; ?><a class="button" onclick="this.blur();" href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER); ?>"><?php echo BUTTON_BACK; ?></a></td>
</tr>
</table>
ca. Zeile 784
</table>
</form>
<?php
break;
case 'edit_products_content':
case 'new_products_content':
if ($_GET['action']=='edit_products_content') {
if ($action =='edit_products_content') {
$content_query=xtc_db_query("SELECT
content_id,
products_id,
group_ids,
ca. Zeile 799
content_link,
languages_id,
file_comment,
content_read
FROM ".TABLE_PRODUCTS_CONTENT."
WHERE content_id='".(int)$_GET['coID']."'");
WHERE content_id='".$g_coID."'
LIMIT 1"); //DokuMan - 2011-05-13 - added LIMIT 1
$content=xtc_db_fetch_array($content_query);
}
// get products names.
$products_query=xtc_db_query("SELECT
products_id,
products_name
ca. Zeile 811
$products_query=xtc_db_query("SELECT
products_id,
products_name
FROM ".TABLE_PRODUCTS_DESCRIPTION."
WHERE language_id='".(int)$_SESSION['languages_id']."'");
WHERE language_id='".(int)$_SESSION['languages_id']."'
ORDER BY products_name"); // Tomcraft - 2010-09-15 - Added default sort order to products_name for product-content in content-manager
$products_array=array();
while ($products_data=xtc_db_fetch_array($products_query)) {
$products_array[]=array(
'id' => $products_data['products_id'],
$products_array[]=array('id' => $products_data['products_id'],
'text' => $products_data['products_name']);
}
// get languages
ca. Zeile 834
$languages_id=$languages[$i]['id'];
}
$languages_array[] = array('id' => $languages[$i]['code'],
'text' => $languages[$i]['name']);
} // for
}
// get used content files
$content_files_query=xtc_db_query("SELECT DISTINCT
content_name,
ca. Zeile 844
content_file
FROM ".TABLE_PRODUCTS_CONTENT."
WHERE content_file!=''");
$content_files=array();
while ($content_files_data=xtc_db_fetch_array($content_files_query)) {
$content_files[]=array(
'id' => $content_files_data['content_file'],
$content_files[]=array('id' => $content_files_data['content_file'],
'text' => $content_files_data['content_name']);
}
// add default value to array
ca. Zeile 858
$default_value='default';
$content_files=array_merge($default_array,$content_files);
// mask for product content
if ($_GET['action']!='new_products_content') {
?>
<?php echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit_products_content&id=update_product&coID='.$_GET['coID'],'post','enctype="multipart/form-data"').xtc_draw_hidden_field('coID',$_GET['coID']); ?>
<?php
if ($action !='new_products_content') {
echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit_products_content&id=update_product&coID='.$g_coID,'post','enctype="multipart/form-data"').xtc_draw_hidden_field('coID',$g_coID);
} else {
?>
<?php echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit_products_content&id=insert_product','post','enctype="multipart/form-data"'); ?>
<?php
echo xtc_draw_form('edit_content',FILENAME_CONTENT_MANAGER,'action=edit_products_content&id=insert_product','post','enctype="multipart/form-data"');
}
?>
<div class="main"><?php echo TEXT_CONTENT_DESCRIPTION; ?></div>
<table class="main" width="100%" border="0">
<table class="main" width="980" border="0">
<tr>
<td width="10%"><?php echo TEXT_PRODUCT; ?></td>
<td width="90%"><?php echo xtc_draw_pull_down_menu('product',$products_array,$content['products_id']); ?></td>
</tr>
ca. Zeile 913
<tr>
<td width="10%"><?php echo TEXT_LINK; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('cont_link',$content['content_link'],'size="60"'); ?></td>
</tr>
<tr>
<td width="10%" valign="top"><?php echo TEXT_FILE_DESC; ?></td>
<td width="90%"><?php
echo xtc_draw_textarea_field('file_comment','','100','30',$content['file_comment']);
?></td>
<td width="90%"><?php echo xtc_draw_textarea_field('file_comment','','100','30',$content['file_comment']); ?></td>
</tr>
<tr>
<td width="10%"><?php echo TEXT_CHOOSE_FILE; ?></td>
<td width="90%"><?php echo xtc_draw_pull_down_menu('select_file',$content_files,$default_value); ?><?php echo ' '.TEXT_CHOOSE_FILE_DESC; ?></td>
ca. Zeile 933
if ($content['content_file']!='') {
?>
<tr>
<td width="10%"><?php echo TEXT_FILENAME; ?></td>
<td width="90%" valign="top"><?php echo xtc_draw_hidden_field('file_name',$content['content_file']).xtc_image(DIR_WS_CATALOG.'admin/images/icons/icon_'.str_replace('.','',strstr($content['content_file'],'.')).'.gif').$content['content_file']; ?></td>
<td width="90%" valign="top"><?php echo xtc_draw_hidden_field('file_name',$content['content_file']).xtc_image('../'. DIR_WS_IMAGES. 'icons/icon_'.str_replace('.','',strstr($content['content_file'],'.')).'.gif').$content['content_file']; //DokuMan - 2011-09-06 - change path ?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2" align="right" class="main"><?php echo '<input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_SAVE . '"/>'; ?><a class="button" onclick="this.blur();" href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER); ?>"><?php echo BUTTON_BACK; ?></a></td>
</tr>
</form>
</table>
</form>
<?php
break;
}
}
if (!$_GET['action']) {
if (!$action) {
?>
<br/>
<a class="button" onclick="this.blur();" href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'action=new'); ?>"><?php echo BUTTON_NEW_CONTENT; ?></a>
<?php
}
?>
</td>
</tr>
</table>
<?php
if (!$_GET['action']) {
if (!$action) {
// products content
// load products_ids into array
$products_id_query=xtc_db_query("SELECT DISTINCT
pc.products_id,
pd.products_name
FROM ".TABLE_PRODUCTS_CONTENT." pc, ".TABLE_PRODUCTS_DESCRIPTION." pd
WHERE pd.products_id=pc.products_id and pd.language_id='".(int)$_SESSION['languages_id']."'");
FROM ".TABLE_PRODUCTS_CONTENT." pc,
".TABLE_PRODUCTS_DESCRIPTION." pd
WHERE pd.products_id=pc.products_id
AND pd.language_id='".(int)$_SESSION['languages_id']."'");
$products_ids=array();
while ($products_id_data=xtc_db_fetch_array($products_id_query)) {
$products_ids[]=array(
'id'=>$products_id_data['products_id'],
$products_ids[]=array('id'=>$products_id_data['products_id'],
'name'=>$products_id_data['products_name']);
} // while
?>
<div class="pageHeading"><br /><?php echo HEADING_PRODUCTS_CONTENT; ?><br /></div>
<?php
xtc_spaceUsed(DIR_FS_CATALOG.'media/products/');
echo '<div class="main">'.USED_SPACE.xtc_format_filesize($total).'</div></br>';
$total_space_media_products = xtc_spaceUsed(DIR_FS_CATALOG.'media/products/'); // DokuMan - 2011-09-06 - sum up correct filesize avoiding global variable
echo '<div class="main">'.USED_SPACE.xtc_format_filesize($total_space_media_products).'</div></br>';
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" nowrap width="5%" ><?php echo TABLE_HEADING_PRODUCTS_ID; ?></td>
ca. Zeile 1015
languages_id,
file_comment,
content_read
FROM ".TABLE_PRODUCTS_CONTENT."
WHERE products_id='".$_GET['pID']."' order by content_name");
WHERE products_id='".$_GET['pID']."'
ORDER BY content_name");
$content_array='';
while ($content_data=xtc_db_fetch_array($content_query)) {
$content_array[]=array(
'id'=> $content_data['content_id'],
$content_array[]=array('id'=> $content_data['content_id'],
'name'=> $content_data['content_name'],
'file'=> $content_data['content_file'],
'link'=> $content_data['content_link'],
'comment'=> $content_data['file_comment'],
ca. Zeile 1049
<td class="dataTableHeadingContent" nowrap align="middle" width="20%" ><?php echo TABLE_HEADING_CONTENT_LINK; ?></td>
<td class="dataTableHeadingContent" nowrap width="5%" ><?php echo TABLE_HEADING_CONTENT_HITS; ?></td>
<td class="dataTableHeadingContent" nowrap width="20%" ><?php echo TABLE_HEADING_CONTENT_ACTION; ?></td>
</tr>
<?php
for ($ii=0,$nn=sizeof($content_array); $ii<$nn; $ii++) {
echo '<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\'" onmouseout="this.className=\'dataTableRow\'">' . "\n";
?>
<td class="dataTableContent" align="left"><?php echo $content_array[$ii]['id']; ?> </td>
<td class="dataTableContent" align="left"><?php
<td class="dataTableContent" align="left">
<?php
if ($content_array[$ii]['file']!='') {
echo xtc_image(DIR_WS_CATALOG.'admin/images/icons/icon_'.str_replace('.','',strstr($content_array[$ii]['file'],'.')).'.gif');
echo xtc_image('../'. DIR_WS_IMAGES.'icons/icon_'.str_replace('.','',strstr($content_array[$ii]['file'],'.')).'.gif'); //web28 - 2010-09-03 - change path
} else {
echo xtc_image(DIR_WS_CATALOG.'admin/images/icons/icon_link.gif');
echo xtc_image('../'. DIR_WS_IMAGES.'icons/icon_link.gif'); //web28 - 2010-09-03 - change path
}
for ($xx=0,$zz=sizeof($languages); $xx<$zz;$xx++){
if ($languages[$xx]['id']==$content_array[$ii]['languages_id']) {
$lang_dir=$languages[$xx]['directory'];
break;
ca. Zeile 1082
<td class="dataTableContent" align="left"><?php echo xtc_image(DIR_WS_CATALOG.'lang/'.$lang_dir.'/admin/images/icon.gif'); ?></td>
<td class="dataTableContent" align="left"><?php echo $content_array[$ii]['name']; ?></td>
<td class="dataTableContent" align="left"><?php echo $content_array[$ii]['file']; ?></td>
<td class="dataTableContent" align="left"><?php echo xtc_filesize($content_array[$ii]['file']); ?></td>
<td class="dataTableContent" align="left" align="middle"><?php
<td class="dataTableContent" align="left" align="middle">
<?php
if ($content_array[$ii]['link']!='') {
echo '<a href="'.$content_array[$ii]['link'].'" target="new">'.$content_array[$ii]['link'].'</a>';
}
?>
</td>
</td>
<td class="dataTableContent" align="left"><?php echo $content_array[$ii]['read']; ?></td>
<td class="dataTableContent" align="left">
<a href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'special=delete_product&coID='.$content_array[$ii]['id']).'&pID='.$products_ids[$i]['id']; ?>" onclick="return confirm('<?php echo CONFIRM_DELETE; ?>')">
<?php
// BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons
// echo xtc_image(DIR_WS_ICONS.'delete.gif','Delete','','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
echo xtc_image(DIR_WS_ICONS.'delete.gif', ICON_DELETE,'','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
// EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons
?>
<a href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'action=edit_products_content&coID='.$content_array[$ii]['id']); ?>">
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif','Edit','','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>'; ?>
-->
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif', ICON_EDIT,'','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>'; ?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<?php
echo xtc_image(DIR_WS_ICONS.'icon_edit.gif', ICON_EDIT,'','','style="cursor:pointer"').' '.TEXT_EDIT.'</a>';
// display preview button if filetype
// .gif,.jpg,.png,.html,.htm,.txt,.tif,.bmp
// BOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
if ( preg_match('/.gif/i',$content_array[$ii]['file'])
ca. Zeile 1126
preg_match('/.bmp/i',$content_array[$ii]['file'])
) {
// EOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
?>
<!-- BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //-->
<!--
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'pID=media&coID='.$content_array[$ii]['id']); ?>', 'popup', 'toolbar=0, width=640, height=600')">
//-->
<a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW,'pID=media&coID='.$content_array[$ii]['id']); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600')">
<!-- EOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //-->
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<?php echo xtc_image(DIR_WS_ICONS.'preview.gif','Preview','','',' style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>'; ?>
-->
<?php echo xtc_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW,'','',' style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>'; ?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<?php
echo xtc_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW,'','',' style="cursor:pointer"').' '.TEXT_PREVIEW.'</a>';
}
?>
</td>
</tr>
<?php
} // for content_array
echo '</table></td></tr>';
echo ' </table>';
echo ' </td>';
echo '</tr>';
}
} // for
}
?>
ca. Zeile 1157
}
} // for
}
?>
</table>
<a class="button" onclick="this.blur();" href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER,'action=new_products_content'); ?>"><?php echo BUTTON_NEW_CONTENT; ?></a>
<?php
} // if !$_GET['action']
} // if !$action
?>
</td>
</tr>
</table></td>
</table>
</td>
<!-- body_text_eof //-->
</tr>
</table>
</div>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
admin/customers.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: customers.php 1296 2005-10-08 17:52:26Z mz $
$Id: customers.php 2655 2012-02-06 09:50:24Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(customers.php,v 1.76 2003/05/04); www.oscommerce.com
(c) 2003 nextcommerce (customers.php,v 1.22 2003/08/24); www.nextcommerce.org
(c) 2006 XT-Commerce (customers.php 1296 2005-10-08)
Released under the GNU General Public License
--------------------------------------------------------------
Third Party contribution:
ca. Zeile 42
//EOC web28 2011-10-31 - FIX customer groups
$processed = false;
$error = false;
$entry_vat_error_text ='';
$action = (isset($_GET['action']) ? $_GET['action'] : '');
if (isset($_GET['special']) && $_GET['special'] == 'remove_memo') {
$mID = xtc_db_prepare_input($_GET['mID']);
xtc_db_query("DELETE from ".TABLE_CUSTOMERS_MEMO." where memo_id = '".(int)$mID."'");
xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_MEMO." WHERE memo_id = '".(int)$mID."'");
xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, 'cID='.(int) $_GET['cID'].'&action=edit'));
}
if ($action == 'edit' || $action == 'update') {
ca. Zeile 64
if ($action) {
switch ($action) {
case 'new_order' :
$customers1_query = xtc_db_query("select * from ".TABLE_CUSTOMERS." where customers_id = '".(int)$_GET['cID']."'");
$customers1_query = xtc_db_query("SELECT * FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".(int)$_GET['cID']."'");
$customers1 = xtc_db_fetch_array($customers1_query);
//BOC - web28 - 2012-04-08 - set order addresses to customers default address
$customers_query = xtc_db_query("SELECT * FROM ".TABLE_ADDRESS_BOOK."
WHERE customers_id = '".(int)$_GET['cID']."'
AND address_book_id = '".(int)$customers1['customers_default_address_id']."'
");
//EOC - web28 - 2012-04-08 - set order addresses to customers default address
//TODO set order addresses to last orders addresses (customers, delivery, billing)
$customers_query = xtc_db_query("select * from ".TABLE_ADDRESS_BOOK." where customers_id = '".(int)$_GET['cID']."'");
$customers = xtc_db_fetch_array($customers_query);
//BOF - web28 - 2011-06-10 add missing iso_code2
$country_query = xtc_db_query("select countries_name,
countries_iso_code_2
from ".TABLE_COUNTRIES."
where countries_id = '".(int)$customers['entry_country_id']."'");
$country_query = xtc_db_query("SELECT countries_name,
countries_iso_code_2,
address_format_id
FROM ".TABLE_COUNTRIES."
WHERE countries_id = '".(int)$customers['entry_country_id']."'");
//EOF - web28 - 2011-06-10 add missing iso_code2
$country = xtc_db_fetch_array($country_query);
$stat_query = xtc_db_query("select * from ".TABLE_CUSTOMERS_STATUS." where customers_status_id = '".(int)$customers1[customers_status]."' ");
$stat_query = xtc_db_query("SELECT * FROM ".TABLE_CUSTOMERS_STATUS." WHERE customers_status_id = '".(int)$customers1['customers_status']."' ");
$stat = xtc_db_fetch_array($stat_query);
// BOF - DokuMan - 2009-05-22 - BUGFIX: first and last name were not saved when creating manual orders
//$sql_data_array = array ('customers_id' => xtc_db_prepare_input($customers['customers_id']), 'customers_cid' => xtc_db_prepare_input($customers1['customers_cid']), 'customers_vat_id' => xtc_db_prepare_input($customers1['customers_vat_id']), 'customers_status' => xtc_db_prepare_input($customers1['customers_status']), 'customers_status_name' => xtc_db_prepare_input($stat['customers_status_name']), 'customers_status_image' => xtc_db_prepare_input($stat['customers_status_image']), 'customers_status_discount' => xtc_db_prepare_input($stat['customers_status_discount']), 'customers_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']), 'customers_company' => xtc_db_prepare_input($customers['entry_company']), 'customers_street_address' => xtc_db_prepare_input($customers['entry_street_address']), 'customers_suburb' => xtc_db_prepare_input($customers['entry_suburb']), 'customers_city' => xtc_db_prepare_input($customers['entry_city']), 'customers_postcode' => xtc_db_prepare_input($customers['entry_postcode']), 'customers_state' => xtc_db_prepare_input($customers['entry_state']), 'customers_country' => xtc_db_prepare_input($country['countries_name']), 'customers_telephone' => xtc_db_prepare_input($customers1['customers_telephone']), 'customers_email_address' => xtc_db_prepare_input($customers1['customers_email_address']), 'customers_address_format_id' => '5', 'customers_ip' => '0', 'delivery_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']), 'delivery_company' => xtc_db_prepare_input($customers['entry_company']), 'delivery_street_address' => xtc_db_prepare_input($customers['entry_street_address']), 'delivery_suburb' => xtc_db_prepare_input($customers['entry_suburb']), 'delivery_city' => xtc_db_prepare_input($customers['entry_city']), 'delivery_postcode' => xtc_db_prepare_input($customers['entry_postcode']), 'delivery_state' => xtc_db_prepare_input($customers['entry_state']), 'delivery_country' => xtc_db_prepare_input($country['countries_name']), 'delivery_address_format_id' => '5', 'billing_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']), 'billing_company' => xtc_db_prepare_input($customers['entry_company']), 'billing_street_address' => xtc_db_prepare_input($customers['entry_street_address']), 'billing_suburb' => xtc_db_prepare_input($customers['entry_suburb']), 'billing_city' => xtc_db_prepare_input($customers['entry_city']), 'billing_postcode' => xtc_db_prepare_input($customers['entry_postcode']), 'billing_state' => xtc_db_prepare_input($customers['entry_state']), 'billing_country' => xtc_db_prepare_input($country['countries_name']), 'billing_address_format_id' => '5', 'payment_method' => 'cod', 'cc_type' => '', 'cc_owner' => '', 'cc_number' => '', 'cc_expires' => '', 'cc_start' => '', 'cc_issue' => '', 'cc_cvv' => '', 'comments' => '', 'last_modified' => 'now()', 'date_purchased' => 'now()', 'orders_status' => '1', 'orders_date_finished' => '', 'currency' => 'EUR', 'currency_value' => '1.0000', 'account_type' => '0', 'payment_class' => 'cod', 'shipping_method' => 'Pauschale Versandkosten', 'shipping_class' => 'flat_flat', 'customers_ip' => '', 'language' => 'german');
$sql_data_array = array (
'customers_id' => xtc_db_prepare_input($customers['customers_id']),
'customers_cid' => xtc_db_prepare_input($customers1['customers_cid']),
'customers_vat_id' => xtc_db_prepare_input($customers1['customers_vat_id']),
ca. Zeile 103
'customers_state' => xtc_db_prepare_input($customers['entry_state']),
'customers_country' => xtc_db_prepare_input($country['countries_name']),
'customers_telephone' => xtc_db_prepare_input($customers1['customers_telephone']),
'customers_email_address' => xtc_db_prepare_input($customers1['customers_email_address']),
'customers_address_format_id' => '5',
'customers_ip' => '0',
'customers_address_format_id' => xtc_db_prepare_input($country['address_format_id']), //web28 - 2012-04-08 fix country address_format_id
'delivery_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']),
'delivery_lastname' => xtc_db_prepare_input($customers['entry_lastname']),
'delivery_firstname' => xtc_db_prepare_input($customers['entry_firstname']),
'delivery_company' => xtc_db_prepare_input($customers['entry_company']),
ca. Zeile 116
'delivery_postcode' => xtc_db_prepare_input($customers['entry_postcode']),
'delivery_state' => xtc_db_prepare_input($customers['entry_state']),
'delivery_country' => xtc_db_prepare_input($country['countries_name']),
'delivery_country_iso_code_2' => xtc_db_prepare_input($country['countries_iso_code_2']), //web28 - 2011-06-10 add missing iso_code2
'delivery_address_format_id' => '5',
'delivery_address_format_id' => xtc_db_prepare_input($country['address_format_id']), //web28 - 2012-04-08 fix country address_format_id
'billing_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']),
'billing_lastname' => xtc_db_prepare_input($customers['entry_lastname']),
'billing_firstname' => xtc_db_prepare_input($customers['entry_firstname']),
'billing_company' => xtc_db_prepare_input($customers['entry_company']),
ca. Zeile 128
'billing_postcode' => xtc_db_prepare_input($customers['entry_postcode']),
'billing_state' => xtc_db_prepare_input($customers['entry_state']),
'billing_country' => xtc_db_prepare_input($country['countries_name']),
'billing_country_iso_code_2' => xtc_db_prepare_input($country['countries_iso_code_2']), //web28 - 2011-06-10 add missing iso_code2
'billing_address_format_id' => '5',
'billing_address_format_id' => xtc_db_prepare_input($country['address_format_id']), //web28 - 2012-04-08 fix country address_format_id
'payment_method' => 'cod',
'cc_type' => '',
'cc_owner' => '',
'cc_number' => '',
ca. Zeile 142
'last_modified' => 'now()',
'date_purchased' => 'now()',
'orders_status' => '1',
'orders_date_finished' => '',
'currency' => 'EUR',
'currency' => DEFAULT_CURRENCY, //Web28 - 2012-02-26 - BUGFIX: DEFAULT_CURRENCY
'currency_value' => '1.0000',
'account_type' => '0',
'payment_class' => 'cod',
'shipping_method' => 'Pauschale Versandkosten',
'shipping_method' => MODULE_SHIPPING_FLAT_TEXT_TITLE, //Web28 - 2012-02-26 - BUGFIX: Use Session language
'shipping_class' => 'flat_flat',
'customers_ip' => '',
'language' => 'german'
'language' => $_SESSION['language'] //Web28 - 2012-02-26 - BUGFIX: Use Session language
);
// EOF - DokuMan - 2009-05-22 - BUGFIX: first and last name were not saved when creating manual orders
$insert_sql_data = array ('currency_value' => '1.0000');
$sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data);
xtc_db_perform(TABLE_ORDERS, $sql_data_array);
$orders_id = xtc_db_insert_id();
$sql_data_array = array ('orders_id' => (int)$orders_id, 'title' => '<b>Summe</b>:', 'text' => '0', 'value' => '0', 'class' => 'ot_total');
//BOC - Web28 - 2012-02-26 - BUGFIX: Use Session language
require_once (DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/order_total/ot_total.php');
$sql_data_array = array ('orders_id' => (int)$orders_id, 'title' => MODULE_ORDER_TOTAL_TOTAL_TITLE.':', 'text' => '0', 'value' => '0', 'class' => 'ot_total');
//EOC - Web28 - 2012-02-26 - BUGFIX: Use Session language
$insert_sql_data = array ('sort_order' => MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER);
$sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data);
xtc_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
$sql_data_array = array ('orders_id' => (int)$orders_id, 'title' => '<b>Zwischensumme</b>:', 'text' => '0', 'value' => '0', 'class' => 'ot_subtotal');
//BOC - Web28 - 2012-02-26 - BUGFIX: Use Session language
require_once (DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/order_total/ot_subtotal.php');
$sql_data_array = array ('orders_id' => (int)$orders_id, 'title' => '<b>'.MODULE_ORDER_TOTAL_SUBTOTAL_TITLE.'</b>:', 'text' => '0', 'value' => '0', 'class' => 'ot_subtotal');
//EOC - Web28 - 2012-02-26 - BUGFIX: Use Session language
$insert_sql_data = array ('sort_order' => MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER);
$sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data);
xtc_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
ca. Zeile 176
break;
case 'statusconfirm' :
$customers_id = xtc_db_prepare_input($_GET['cID']);
$customer_updated = false;
$check_status_query = xtc_db_query("select customers_firstname, customers_lastname, customers_email_address , customers_status, member_flag from ".TABLE_CUSTOMERS." where customers_id = '".xtc_db_input($_GET['cID'])."'");
$check_status_query = xtc_db_query("SELECT customers_firstname,
customers_lastname,
customers_email_address,
customers_status,
member_flag
FROM ".TABLE_CUSTOMERS."
WHERE customers_id = '".xtc_db_input($_GET['cID'])."'");
$check_status = xtc_db_fetch_array($check_status_query);
if ($check_status['customers_status'] != $status) {
xtc_db_query("update ".TABLE_CUSTOMERS." set customers_status = '".xtc_db_input($_POST['status'])."' where customers_id = '".xtc_db_input($_GET['cID'])."'");
xtc_db_query("UPDATE ".TABLE_CUSTOMERS." SET customers_status = '".xtc_db_input($_POST['status'])."' WHERE customers_id = '".xtc_db_input($_GET['cID'])."'");
// create insert for admin access table if customers status is set to 0
if ($_POST['status'] == 0) {
xtc_db_query("INSERT into ".TABLE_ADMIN_ACCESS." (customers_id,start) VALUES ('".xtc_db_input($_GET['cID'])."','1')");
xtc_db_query("INSERT INTO ".TABLE_ADMIN_ACCESS." (customers_id,start) VALUES ('".xtc_db_input($_GET['cID'])."','1')");
} else {
xtc_db_query("DELETE from ".TABLE_ADMIN_ACCESS." where customers_id = '".xtc_db_input($_GET['cID'])."'");
xtc_db_query("DELETE FROM ".TABLE_ADMIN_ACCESS." WHERE customers_id = '".xtc_db_input($_GET['cID'])."'");
}
//Temporarily set due to above commented lines
$customer_notified = '0';
xtc_db_query("insert into ".TABLE_CUSTOMERS_STATUS_HISTORY." (customers_id, new_value, old_value, date_added, customer_notified) values ('".xtc_db_input($_GET['cID'])."', '".xtc_db_input($_POST['status'])."', '".$check_status['customers_status']."', now(), '".$customer_notified."')");
xtc_db_query("INSERT INTO ".TABLE_CUSTOMERS_STATUS_HISTORY." (customers_id, new_value, old_value, date_added, customer_notified) VALUES ('".xtc_db_input($_GET['cID'])."', '".xtc_db_input($_POST['status'])."', '".$check_status['customers_status']."', now(), '".$customer_notified."')");
$customer_updated = true;
}
xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, 'page='.(int)$_GET['page'].'&cID='.(int)$_GET['cID']));
break;
ca. Zeile 200
case 'update' :
$customers_id = xtc_db_prepare_input($_GET['cID']);
$customers_cid = xtc_db_prepare_input($_POST['csID']);
$customers_vat_id = xtc_db_prepare_input($_POST['customers_vat_id']);
$customers_vat_id_status = xtc_db_prepare_input($_POST['customers_vat_id_status']);
$customers_vat_id_status = (isset($_POST['customers_vat_id_status']) ? xtc_db_prepare_input($_POST['customers_vat_id_status']) : '');
$customers_firstname = xtc_db_prepare_input($_POST['customers_firstname']);
$customers_lastname = xtc_db_prepare_input($_POST['customers_lastname']);
$customers_email_address = xtc_db_prepare_input($_POST['customers_email_address']);
$customers_telephone = xtc_db_prepare_input($_POST['customers_telephone']);
$customers_fax = xtc_db_prepare_input($_POST['customers_fax']);
$customers_newsletter = xtc_db_prepare_input($_POST['customers_newsletter']);
$customers_newsletter = (isset($_POST['customers_newsletter']) ? xtc_db_prepare_input($_POST['customers_newsletter']) : '');
$customers_gender = xtc_db_prepare_input($_POST['customers_gender']);
$customers_dob = xtc_db_prepare_input($_POST['customers_dob']);
$default_address_id = xtc_db_prepare_input($_POST['default_address_id']);
$entry_street_address = xtc_db_prepare_input($_POST['entry_street_address']);
$entry_suburb = xtc_db_prepare_input($_POST['entry_suburb']);
$entry_postcode = xtc_db_prepare_input($_POST['entry_postcode']);
ca. Zeile 217
$entry_suburb = xtc_db_prepare_input($_POST['entry_suburb']);
$entry_postcode = xtc_db_prepare_input($_POST['entry_postcode']);
$entry_city = xtc_db_prepare_input($_POST['entry_city']);
$entry_country_id = xtc_db_prepare_input($_POST['entry_country_id']);
$entry_company = xtc_db_prepare_input($_POST['entry_company']);
$entry_state = xtc_db_prepare_input($_POST['entry_state']);
$entry_zone_id = xtc_db_prepare_input($_POST['entry_zone_id']);
$entry_state = (isset($_POST['entry_state']) ? xtc_db_prepare_input($_POST['entry_state']) : '');
$entry_zone_id = (isset($_POST['entry_zone_id']) ? xtc_db_prepare_input($_POST['entry_zone_id']) : '');
$memo_title = xtc_db_prepare_input($_POST['memo_title']);
$memo_text = xtc_db_prepare_input($_POST['memo_text']);
$payment_unallowed = xtc_db_prepare_input($_POST['payment_unallowed']);
$shipping_unallowed = xtc_db_prepare_input($_POST['shipping_unallowed']);
$password = xtc_db_prepare_input($_POST['entry_password']);
if ($memo_text != '' && $memo_title != '') {
$sql_data_array = array ('customers_id' => (int)$_GET['cID'], 'memo_date' => date("Y-m-d"), 'memo_title' => $memo_title, 'memo_text' => $memo_text, 'poster_id' => (int)$_SESSION['customer_id']);
xtc_db_perform(TABLE_CUSTOMERS_MEMO, $sql_data_array);
}
ca. Zeile 250
} else {
$entry_lastname_error = false;
}
//BOF - DokuMan - 2011-08-26 - error flag for $entry_gender_error was missing
if (ACCOUNT_GENDER == 'true') {
if (($customers_gender != 'm') && ($customers_gender != 'f')) {
$error = true;
$entry_gender_error = true;
} else {
$entry_gender_error = false;
}
}
//EOF - DokuMan - 2011-08-26 - error flag for $entry_gender_error was missing
if (ACCOUNT_DOB == 'true') {
if (checkdate(substr(xtc_date_raw($customers_dob), 4, 2), substr(xtc_date_raw($customers_dob), 6, 2), substr(xtc_date_raw($customers_dob), 0, 4))) {
$entry_date_of_birth_error = false;
} else {
ca. Zeile 263
// New VAT Check
if (xtc_get_geo_zone_code($entry_country_id) != '6') {
require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'vat_validation.php');
$vatID = new vat_validation($customers_vat_id, $customers_id, '', $entry_country_id);
$customers_vat_id_status = isset($vatID->vat_info['vat_id_status']) ? $vatID->vat_info['vat_id_status'] : '';
$customers_vat_id_status = $vatID->vat_info['vat_id_status'];
// BOF - Dokuman - 2011-09-13 - display correct error code of VAT ID check
switch ($customers_vat_id_status) {
case '0' :
$entry_vat_error_text = TEXT_VAT_FALSE;
break;
case '1' :
$entry_vat_error_text = TEXT_VAT_TRUE;
break;
case '8' :
$entry_vat_error_text = TEXT_VAT_UNKNOWN_COUNTRY;
break;
case '94' :
$entry_vat_error_text = TEXT_VAT_INVALID_INPUT;
break;
case '95' :
$entry_vat_error_text = TEXT_VAT_SERVICE_UNAVAILABLE;
break;
case '96' :
$entry_vat_error_text = TEXT_VAT_MS_UNAVAILABLE;
break;
case '97' :
$entry_vat_error_text = TEXT_VAT_TIMEOUT;
break;
case '98' :
$entry_vat_error_text = TEXT_VAT_SERVER_BUSY;
break;
case '99' :
$entry_vat_error_text = TEXT_VAT_NO_PHP5_SOAP_SUPPORT;
break;
}
// EOF - Dokuman - 2011-09-13 - display correct error code of VAT ID check
// BOF - DokuMan - 2009-08-09 - Code optimization
//$error = $vatID->vat_info['error'];
//if($error==1){
if($vatID->vat_info['error']==1){
// EOF - DokuMan - 2009-08-09 - Code optimization
$entry_vat_error = true;
$error = true;
}
}
// New VAT CHECK END
if (strlen($customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
ca. Zeile 327
$entry_state_error = true;
} else {
$zone_id = 0;
$entry_state_error = false;
$check_query = xtc_db_query("select count(*) as total from ".TABLE_ZONES." where zone_country_id = '".xtc_db_input($entry_country_id)."'");
$check_query = xtc_db_query("SELECT count(*) as total FROM ".TABLE_ZONES." WHERE zone_country_id = '".xtc_db_input($entry_country_id)."'");
$check_value = xtc_db_fetch_array($check_query);
$entry_state_has_zones = ($check_value['total'] > 0);
if ($entry_state_has_zones == true) {
$zone_query = xtc_db_query("select zone_id from ".TABLE_ZONES." where zone_country_id = '".xtc_db_input($entry_country_id)."' and zone_name = '".xtc_db_input($entry_state)."'");
$zone_query = xtc_db_query("SELECT zone_id FROM ".TABLE_ZONES." WHERE zone_country_id = '".xtc_db_input($entry_country_id)."' AND zone_name = '".xtc_db_input($entry_state)."'");
if (xtc_db_num_rows($zone_query) == 1) {
$zone_values = xtc_db_fetch_array($zone_query);
$entry_zone_id = $zone_values['zone_id'];
} else {
$zone_query = xtc_db_query("select zone_id from ".TABLE_ZONES." where zone_country_id = '".xtc_db_input($entry_country)."' and zone_code = '".xtc_db_input($entry_state)."'");
$zone_query = xtc_db_query("SELECT zone_id FROM ".TABLE_ZONES." WHERE zone_country_id = '".xtc_db_input($entry_country)."' AND zone_code = '".xtc_db_input($entry_state)."'");
if (xtc_db_num_rows($zone_query) >= 1) {
$zone_values = xtc_db_fetch_array($zone_query);
$zone_id = $zone_values['zone_id'];
} else {
ca. Zeile 360
$entry_telephone_error = true;
} else {
$entry_telephone_error = false;
}
/*
if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
$error = true;
$entry_password_error = true;
} else {
$entry_password_error = false;
}
*/
// BOF - DokuMan - 2009-05-22 - Bugfix #0000218 - force to enter password when editing users
if (strlen($password) > 0 && strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
$error = true;
ca. Zeile 378
$entry_password_error = false;
}
// EOF - DokuMan - 2009-05-22 - Bugfix #0000218 - force to enter password when editing users
$check_email = xtc_db_query("select customers_email_address from ".TABLE_CUSTOMERS." where customers_email_address = '".xtc_db_input($customers_email_address)."' and customers_id <> '".xtc_db_input($customers_id)."'");
$check_email = xtc_db_query("SELECT customers_email_address
FROM ".TABLE_CUSTOMERS."
WHERE customers_email_address = '".xtc_db_input($customers_email_address)."'
AND customers_id <> '".xtc_db_input($customers_id)."'");
if (xtc_db_num_rows($check_email)) {
$error = true;
$entry_email_address_exists = true;
} else {
ca. Zeile 446
$sql_data_array['entry_state'] = $entry_state;
}
}
xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '".xtc_db_input($customers_id)."' and address_book_id = '".xtc_db_input($default_address_id)."'");
xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '".xtc_db_input($customers_id)."' AND address_book_id = '".xtc_db_input($default_address_id)."'");
xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.(int)$customers_id));
} elseif ($error == true) {
$cInfo = new objectInfo($_POST);
$processed = true;
ca. Zeile 458
case 'deleteconfirm' :
$customers_id = xtc_db_prepare_input($_GET['cID']);
if ($_POST['delete_reviews'] == 'on') {
$reviews_query = xtc_db_query("select reviews_id from ".TABLE_REVIEWS." where customers_id = '".xtc_db_input($customers_id)."'");
$reviews_query = xtc_db_query("SELECT reviews_id FROM ".TABLE_REVIEWS." WHERE customers_id = '".xtc_db_input($customers_id)."'");
while ($reviews = xtc_db_fetch_array($reviews_query)) {
xtc_db_query("delete from ".TABLE_REVIEWS_DESCRIPTION." where reviews_id = '".$reviews['reviews_id']."'");
xtc_db_query("DELETE FROM ".TABLE_REVIEWS_DESCRIPTION." WHERE reviews_id = '".$reviews['reviews_id']."'");
}
xtc_db_query("delete from ".TABLE_REVIEWS." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_REVIEWS." WHERE customers_id = '".xtc_db_input($customers_id)."'");
} else {
xtc_db_query("update ".TABLE_REVIEWS." set customers_id = null where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("UPDATE ".TABLE_REVIEWS." SET customers_id = null WHERE customers_id = '".xtc_db_input($customers_id)."'");
}
xtc_db_query("delete from ".TABLE_ADDRESS_BOOK." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS_INFO." where customers_info_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS_BASKET." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS_BASKET_ATTRIBUTES." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_PRODUCTS_NOTIFICATIONS." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_WHOS_ONLINE." where customer_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS_STATUS_HISTORY." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS_IP." where customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("delete from ".TABLE_ADMIN_ACCESS." where customers_id = '".xtc_db_input($customers_id)."'");
//BOF - DokuMan - 2011-04-15 - also delete the newsletter entry of the customer
xtc_db_query("delete from ".TABLE_NEWSLETTER_RECIPIENTS." where customers_id = '".xtc_db_input($customers_id)."'");
//EOF - DokuMan - 2011-04-15 - also delete the newsletter entry of the customer
xtc_db_query("DELETE FROM ".TABLE_ADDRESS_BOOK." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_INFO." WHERE customers_info_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_BASKET." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_BASKET_ATTRIBUTES." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_NOTIFICATIONS." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_WHOS_ONLINE." WHERE customer_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_STATUS_HISTORY." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_IP." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_ADMIN_ACCESS." WHERE customers_id = '".xtc_db_input($customers_id)."'");
xtc_db_query("DELETE FROM ".TABLE_NEWSLETTER_RECIPIENTS." WHERE customers_id = '".xtc_db_input($customers_id)."'"); // DokuMan - 2011-04-15 - also delete the newsletter entry of the customer
xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action'))));
break;
default :
$customers_query = xtc_db_query("
select c.payment_unallowed, # Tomcraft 2011-03-18 - Added missing payment_unallowed
c.shipping_unallowed, # Tomcraft 2011-03-18 - Added missing payment_unallowed
c.customers_vat_id, # web28 2011-06-10 - Added missing customers_vat_id
c.customers_id,
-- admin/customers.php
SELECT c.customers_id,
c.customers_cid,
c.customers_status, # web28 2011-10-31 - Added missing customers_status
c.customers_vat_id,
c.customers_status, # DokuMan 2011-12-13 - Added missing customers_status
c.customers_gender,
c.customers_firstname,
c.customers_lastname,
c.customers_dob,
c.customers_email_address,
c.customers_default_address_id,
c.customers_telephone,
c.customers_fax,
c.customers_newsletter,
c.payment_unallowed, # Tomcraft 2011-03-18 - Added missing payment_unallowed
c.shipping_unallowed, # Tomcraft 2011-03-18 - Added missing payment_unallowed
a.entry_company,
a.entry_street_address,
a.entry_suburb,
a.entry_postcode,
a.entry_city,
a.entry_state,
a.entry_zone_id,
a.entry_country_id,
c.customers_telephone,
c.customers_fax,
c.customers_newsletter,
c.customers_default_address_id
from ".TABLE_CUSTOMERS." c
a.entry_zone_id
FROM ".TABLE_CUSTOMERS." c
LEFT JOIN ".TABLE_ADDRESS_BOOK." a
ON c.customers_default_address_id = a.address_book_id
where a.customers_id = c.customers_id
and c.customers_id = ".(int)$_GET['cID']);
WHERE a.customers_id = c.customers_id
AND c.customers_id = ".(int)$_GET['cID']);
$customers = xtc_db_fetch_array($customers_query);
$cInfo = new objectInfo($customers);
}
}
ca. Zeile 535
<!--
function check_form() {
var error = 0;
var error_message = "<?php echo xtc_js_lang(JS_ERROR); ?>";
var customers_firstname = document.customers.customers_firstname.value;
var customers_lastname = document.customers.customers_lastname.value;
<?php if (ACCOUNT_COMPANY == 'true') echo 'var entry_company = document.customers.entry_company.value;' . "\n"; ?>
<?php if (ACCOUNT_DOB == 'true') echo 'var customers_dob = document.customers.customers_dob.value;' . "\n"; ?>
<?php
if (ACCOUNT_COMPANY == 'true')
echo 'var entry_company = document.customers.entry_company.value;' . "\n";
?>
<?php
if (ACCOUNT_DOB == 'true')
echo 'var customers_dob = document.customers.customers_dob.value;' . "\n";
?>
var customers_email_address = document.customers.customers_email_address.value;
var entry_street_address = document.customers.entry_street_address.value;
var entry_postcode = document.customers.entry_postcode.value;
var entry_city = document.customers.entry_city.value;
var customers_telephone = document.customers.customers_telephone.value;
<?php if (ACCOUNT_GENDER == 'true') { ?>
<?php
if (ACCOUNT_GENDER == 'true') { ?>
if (document.customers.customers_gender[0].checked || document.customers.customers_gender[1].checked) {
} else {
error_message = error_message + "<?php echo xtc_js_lang(JS_GENDER); ?>";
error = 1;
}
<?php } ?>
<?php
}
?>
if (customers_firstname == "" || customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) {
error_message = error_message + "<?php echo xtc_js_lang(JS_FIRST_NAME); ?>";
error = 1;
ca. Zeile 564
error_message = error_message + "<?php echo xtc_js_lang(JS_LAST_NAME); ?>";
error = 1;
}
<?php if (ACCOUNT_DOB == 'true') { ?>
<?php
if (ACCOUNT_DOB == 'true') { ?>
if (customers_dob == "" || customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) {
error_message = error_message + "<?php echo xtc_js_lang(JS_DOB); ?>";
error = 1;
}
<?php } ?>
<?php
}
?>
if (customers_email_address == "" || customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) {
error_message = error_message + "<?php echo xtc_js_lang(JS_EMAIL_ADDRESS); ?>";
error = 1;
ca. Zeile 636
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
</table>
</td>
<!-- body_text //-->
<td class="boxCenter" width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<td class="boxCenter" width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if ($action == 'edit' || $action == 'update') {
if (!is_object($cInfo)) { //DokuMan - 2010-03-17 - check if $cinfo is an object
$customers_query = xtc_db_query("select c.payment_unallowed,
c.shipping_unallowed,
c.customers_gender,
//if (!is_object($cInfo)) { //DokuMan - 2010-10-01 - remove check if $cinfo is an object, otherwise customer status will be blank
$customers_query = xtc_db_query("-- admin/customers.php
SELECT c.customers_id,
c.customers_cid,
c.customers_vat_id,
c.customers_vat_id_status,
c.customers_status,
c.member_flag,
c.customers_gender,
c.customers_firstname,
c.customers_cid,
c.customers_lastname,
c.customers_dob,
c.customers_email_address,
c.customers_default_address_id,
c.customers_telephone,
c.customers_fax,
c.customers_newsletter,
c.member_flag,
c.payment_unallowed,
c.shipping_unallowed,
a.entry_company,
a.entry_street_address,
a.entry_suburb,
a.entry_postcode,
a.entry_city,
a.entry_state,
a.entry_zone_id,
a.entry_country_id,
c.customers_telephone,
c.customers_fax,
c.customers_newsletter,
c.customers_default_address_id
from ".TABLE_CUSTOMERS." c
left join ".TABLE_ADDRESS_BOOK." a
on c.customers_default_address_id = a.address_book_id
where a.customers_id = c.customers_id
and c.customers_id = '".(int)$_GET['cID']."'");
a.entry_zone_id
FROM ".TABLE_CUSTOMERS." c
LEFT JOIN ".TABLE_ADDRESS_BOOK." a
ON c.customers_default_address_id = a.address_book_id
WHERE a.customers_id = c.customers_id
AND c.customers_id = '".(int)$_GET['cID']."'"
);
$customers = xtc_db_fetch_array($customers_query);
$cInfo = new objectInfo($customers);
} //DokuMan - 2010-03-17 - check if $cinfo is an object
//} //DokuMan - 2010-10-01 - remove check if $cinfo is an object, otherwise customer status will be blank
$newsletter_array = array (array ('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array ('id' => '0', 'text' => ENTRY_NEWSLETTER_NO));
?>
<tr>
<td>
ca. Zeile 694
<td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS.'heading_customers.gif'); ?></td>
<td class="pageHeading"><?php echo $cInfo->customers_lastname.' '.$cInfo->customers_firstname; ?></td>
</tr>
<tr>
<td class="main" valign="top">Customers</td>
<td class="main" valign="top"><?php echo BOX_HEADING_CUSTOMERS; ?></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
ca. Zeile 706
</tr>
<tr>
<td colspan="3" class="main"><?php echo HEADING_TITLE_STATUS .': ' . $customers_statuses_id_array[$customers['customers_status']]['text'] ; ?></td><?php// web28 - 2011-10-31 - change $customers_statuses_array to $customers_statuses_id_array?>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr><?php echo xtc_draw_form('customers', FILENAME_CUSTOMERS, xtc_get_all_get_params(array('action')) . 'action=update', 'post', 'onSubmit="return check_form();"') . xtc_draw_hidden_field('default_address_id', $cInfo->customers_default_address_id); ?>
<?php echo xtc_draw_form('customers', FILENAME_CUSTOMERS, xtc_get_all_get_params(array('action')) . 'action=update', 'post', 'onSubmit="return check_form();"') . xtc_draw_hidden_field('default_address_id', $cInfo->customers_default_address_id); ?>
<tr>
<td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<td class="formArea">
<table border="0" cellspacing="2" cellpadding="2">
<?php
if (ACCOUNT_GENDER == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_GENDER; ?></td>
ca. Zeile 722
if (ACCOUNT_GENDER == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_GENDER; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_gender_error == true) {
echo xtc_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender).' '.MALE.' '.xtc_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender).' '.FEMALE.' '.ENTRY_GENDER_ERROR;
} else {
ca. Zeile 734
}
} else {
echo xtc_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender).' '.MALE.' '.xtc_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender).' '.FEMALE;
}
?></td>
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main" bgcolor="#FFCC33"><?php echo ENTRY_CID; ?></td>
ca. Zeile 743
}
?>
<tr>
<td class="main" bgcolor="#FFCC33"><?php echo ENTRY_CID; ?></td>
<td class="main" width="100%" bgcolor="#FFCC33"><?php
<td class="main" width="100%" bgcolor="#FFCC33">
<?php
echo xtc_draw_input_field('csID', $cInfo->customers_cid, 'maxlength="32"', false);
?></td>
?>
</td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
<td class="main"><?php
<td class="main">
<?php
//BOF - DokuMan - 2010-11-01 - enhance eror-reporting on firstname
if ($error == true) {
if ($entry_firstname_error == true) {
echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"').' '.ENTRY_FIRST_NAME_ERROR;
} else {
echo $cInfo->customers_lastname.xtc_draw_hidden_field('customers_firstname');
}
} else {
echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true);
}
?></td>
//EOF - DokuMan - 2010-11-01 - enhance eror-reporting on firstname
?>
</td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_lastname_error == true) {
echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"').' '.ENTRY_LAST_NAME_ERROR;
} else {
ca. Zeile 772
}
} else {
echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true);
}
?></td>
?>
</td>
</tr>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
ca. Zeile 780
if (ACCOUNT_DOB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_date_of_birth_error == true) {
echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"').' '.ENTRY_DATE_OF_BIRTH_ERROR;
} else {
ca. Zeile 791
}
} else {
echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"', true);
}
?></td>
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
ca. Zeile 799
}
?>
<tr>
<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_email_address_error == true) {
echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"').' '.ENTRY_EMAIL_ADDRESS_ERROR;
}
elseif ($entry_email_address_check_error == true) {
} elseif ($entry_email_address_check_error == true) {
echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"').' '.ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
}
elseif ($entry_email_address_exists == true) {
} elseif ($entry_email_address_exists == true) {
echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"').' '.ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
} else {
echo $customers_email_address.xtc_draw_hidden_field('customers_email_address');
}
} else {
echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"', true);
}
?></td>
?>
</td>
</tr>
</table></td>
</table>
</td>
</tr>
<?php
if (ACCOUNT_COMPANY == 'true') {
?>
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
ca. Zeile 831
<tr>
<td class="formAreaTitle"><?php echo CATEGORY_COMPANY; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<td class="formArea">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_COMPANY; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_company_error == true) {
echo xtc_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"').' '.ENTRY_COMPANY_ERROR;
echo xtc_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="64"').' '.ENTRY_COMPANY_ERROR;
} else {
echo $cInfo->entry_company.xtc_draw_hidden_field('entry_company');
}
} else {
echo xtc_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"');
echo xtc_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="64"');
}
?></td>
?>
</td>
</tr>
<?php if(ACCOUNT_COMPANY_VAT_CHECK == 'true'){ ?>
<?php
if(ACCOUNT_COMPANY_VAT_CHECK == 'true'){
// BOF - Dokuman - 2011-08-26 - show error code of VAT ID check FROM DB (only in 'edit' process, not in 'update') //web28 - 2012-04-08 - and only when customers_vat_id is not empty
if ($action == 'edit' && $cInfo->customers_vat_id != '') {
// BOF - Dokuman - 2011-09-13 - display correct error code of VAT ID check
switch ($cInfo->customers_vat_id_status) {
case '0' :
$entry_vat_error_text = TEXT_VAT_FALSE;
break;
case '1' :
$entry_vat_error_text = TEXT_VAT_TRUE;
break;
case '8' :
$entry_vat_error_text = TEXT_VAT_UNKNOWN_COUNTRY;
break;
case '94' :
$entry_vat_error_text = TEXT_VAT_INVALID_INPUT;
break;
case '95' :
$entry_vat_error_text = TEXT_VAT_SERVICE_UNAVAILABLE;
break;
case '96' :
$entry_vat_error_text = TEXT_VAT_MS_UNAVAILABLE;
break;
case '97' :
$entry_vat_error_text = TEXT_VAT_TIMEOUT;
break;
case '98' :
$entry_vat_error_text = TEXT_VAT_SERVER_BUSY;
break;
case '99' :
$entry_vat_error_text = TEXT_VAT_NO_PHP5_SOAP_SUPPORT;
break;
}
// EOF - Dokuman - 2011-09-13 - display correct error code of VAT ID check
}
// EOF - Dokuman - 2011-08-26 - show error code of VAT ID check FROM DB (only in 'edit' process, not in 'update')
?>
<tr>
<td class="main"><?php echo ENTRY_VAT_ID; ?></td>
<td class="main"><?php
<td class="main">
<?php
// BOF - Dokuman - 2011-07-28 - display correct error code of VAT ID check
echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').' '.$entry_vat_error_text;
/*
if ($error == true) {
if ($entry_vat_error == true) {
echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').' '.ENTRY_VAT_ID_ERROR;
echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').' '.$entry_vat_error_text;
} else {
echo $cInfo->customers_vat_id.xtc_draw_hidden_field('customers_vat_id');
}
} else {
echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"');
}
?></td>
*/
// EOF - Dokuman - 2011-07-28 - display correct error code of VAT ID check
?>
</td>
</tr>
<?php } ?>
</table></td>
<?php
}
?>
</table>
</td>
</tr>
<?php
}
?>
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
ca. Zeile 879
<tr>
<td class="formAreaTitle"><?php echo CATEGORY_ADDRESS; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<td class="formArea">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_street_address_error == true) {
echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"').' '.ENTRY_STREET_ADDRESS_ERROR;
} else {
ca. Zeile 893
}
} else {
echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true);
}
?></td>
?>
</td>
</tr>
<?php
if (ACCOUNT_SUBURB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_SUBURB; ?></td>
ca. Zeile 901
if (ACCOUNT_SUBURB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_SUBURB; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_suburb_error == true) {
echo xtc_draw_input_field('suburb', $cInfo->entry_suburb, 'maxlength="32"').' '.ENTRY_SUBURB_ERROR;
} else {
ca. Zeile 912
}
} else {
echo xtc_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"');
}
?></td>
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
ca. Zeile 920
}
?>
<tr>
<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_post_code_error == true) {
echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"').' '.ENTRY_POST_CODE_ERROR;
} else {
ca. Zeile 931
}
} else {
echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true);
}
?></td>
?>
</td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_CITY; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_city_error == true) {
echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"').' '.ENTRY_CITY_ERROR;
} else {
ca. Zeile 946
}
} else {
echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true);
}
?></td>
?>
</td>
</tr>
<?php
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_STATE; ?></td>
ca. Zeile 954
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_STATE; ?></td>
<td class="main"><?php
<td class="main">
<?php
$entry_state = xtc_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state);
if ($error == true) {
if ($entry_state_error == true) {
if ($entry_state_has_zones == true) {
$zones_array = array ();
$zones_query = xtc_db_query("select zone_name from ".TABLE_ZONES." where zone_country_id = '".xtc_db_input($cInfo->entry_country_id)."' order by zone_name");
$zones_query = xtc_db_query("SELECT zone_name FROM ".TABLE_ZONES." WHERE zone_country_id = '".xtc_db_input($cInfo->entry_country_id)."' order by zone_name");
while ($zones_values = xtc_db_fetch_array($zones_query)) {
$zones_array[] = array ('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
}
echo xtc_draw_pull_down_menu('entry_state', $zones_array).' '.ENTRY_STATE_ERROR;
ca. Zeile 975
}
} else {
echo xtc_draw_input_field('entry_state', xtc_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state));
}
?></td>
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
ca. Zeile 983
}
?>
<tr>
<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_country_error == true) {
echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries(), $cInfo->entry_country_id).' '.ENTRY_COUNTRY_ERROR;
echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id).' '.ENTRY_COUNTRY_ERROR; //Web28 - 2012-04-17 - NEW: show only active language
} else {
echo xtc_get_country_name($cInfo->entry_country_id).xtc_draw_hidden_field('entry_country_id');
}
} else {
echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries(), $cInfo->entry_country_id);
echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id); //Web28 - 2012-04-17 - NEW: show only active language
}
?></td>
?>
</td>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="formAreaTitle"><?php echo CATEGORY_CONTACT; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<td class="formArea">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($error == true) {
if ($entry_telephone_error == true) {
echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"').' '.ENTRY_TELEPHONE_NUMBER_ERROR;
} else {
ca. Zeile 1019
}
} else {
echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"', true);
}
?></td>
?>
</td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($processed == true) {
echo $cInfo->customers_fax.xtc_draw_hidden_field('customers_fax');
} else {
echo xtc_draw_input_field('customers_fax', $cInfo->customers_fax, 'maxlength="32"');
}
?></td>
?>
</td>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="formAreaTitle"><?php echo CATEGORY_OPTIONS; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<td class="formArea">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_PAYMENT_UNALLOWED; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($processed == true) {
echo $cInfo->payment_unallowed.xtc_draw_hidden_field('payment_unallowed');
} else {
echo xtc_draw_input_field('payment_unallowed', $cInfo->payment_unallowed, 'maxlength="255"');
}
?></td>
?>
</td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_SHIPPING_UNALLOWED; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($processed == true) {
echo $cInfo->shipping_unallowed.xtc_draw_hidden_field('shipping_unallowed');
} else {
echo xtc_draw_input_field('shipping_unallowed', $cInfo->shipping_unallowed, 'maxlength="255"');
}
?></td>
?>
</td>
</tr>
<tr>
<td class="main" bgcolor="#FFCC33"><?php echo ENTRY_NEW_PASSWORD; ?></td>
<td class="main" bgcolor="#FFCC33"><?php
<td class="main" bgcolor="#FFCC33">
<?php
if ($error == true) {
if ($entry_password_error == true) {
echo xtc_draw_input_field('entry_password', $customers_password).' '.ENTRY_PASSWORD_ERROR;
} else {
ca. Zeile 1078
}
} else {
echo xtc_draw_input_field('entry_password');
}
?></td>
?>
</td>
<?php
// BOF - Christian - 2009-06-26 - delete Newsletter Funktion...
/*
<tr>
<td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
<td class="main"><?php
<td class="main">
<?php
if ($processed == true) {
if ($cInfo->customers_newsletter == '1') {
echo ENTRY_NEWSLETTER_YES;
} else {
ca. Zeile 1098
echo xtc_draw_hidden_field('customers_newsletter');
} else {
echo xtc_draw_pull_down_menu('customers_newsletter', $newsletter_array, $cInfo->customers_newsletter);
}
?></td>
?>
</td>
</tr>
*/
// EOF - Christian - 2009-06-26 - delete Newsletter Funktion...
?>
</tr>
<tr>
<?php include(DIR_WS_MODULES . FILENAME_CUSTOMER_MEMO); ?>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td align="right" class="main"><input type="submit" class="button" onclick="this.blur();" value="<?php echo BUTTON_UPDATE; ?>"><?php echo ' <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('action'))) .'">' . BUTTON_CANCEL . '</a>'; ?></td>
</tr></form>
</tr>
</form>
<?php
} else {
?>
<tr>
<td>
ca. Zeile 1126
<td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS.'heading_customers.gif'); ?></td>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
</tr>
<tr>
<td class="main" valign="top">Customers</td>
<td class="main" valign="top"><?php echo BOX_HEADING_CUSTOMERS; ?></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<?php echo xtc_draw_form('search', FILENAME_CUSTOMERS, '', 'get'); ?>
<td class="pageHeading"><?php echo '<a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CREATE_ACCOUNT) . '">' . BUTTON_CREATE_ACCOUNT . '</a>'; ?></td>
ca. Zeile 1139
<td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . xtc_draw_input_field('search').xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()); ?></td>
</form>
</tr>
<tr>
<?php echo xtc_draw_form('status', FILENAME_CUSTOMERS, '', 'get'); ?>
<?php
<?php echo xtc_draw_form('status', FILENAME_CUSTOMERS, '', 'get');
$select_data = array ();
$select_data = array (array ('id' => '99', 'text' => TEXT_SELECT), array ('id' => '100', 'text' => TEXT_ALL_CUSTOMERS));
//BOF - GTB - 2011-02-03 - show selected customer group
//$select_data = array (array ('id' => '99', 'text' => TEXT_SELECT), array ('id' => '100', 'text' => TEXT_ALL_CUSTOMERS));
$select_data = array (array ('id' => '', 'text' => TEXT_SELECT), array ('id' => '100', 'text' => TEXT_ALL_CUSTOMERS));
//<td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status',xtc_array_merge($select_data, $customers_statuses_array), '99', 'onChange="this.form.submit();"').xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()); </td>
//EOF - GTB - 2011-02-03 - show selected customer group
?>
<td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status',xtc_array_merge($select_data, $customers_statuses_array), '99', 'onChange="this.form.submit();"').xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()); ?></td>
</form></tr>
</table></td>
<td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status',xtc_array_merge($select_data, $customers_statuses_array), isset($_GET['status']) ? $_GET['status'] : '', 'onChange="this.form.submit();"').xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()); ?></td>
</form>
</tr>
</table>
</td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" width="40"><?php echo TABLE_HEADING_ACCOUNT_TYPE; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERSCID.xtc_sorting(FILENAME_CUSTOMERS,'customers_cid'); ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_LASTNAME.xtc_sorting(FILENAME_CUSTOMERS,'customers_lastname'); ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIRSTNAME.xtc_sorting(FILENAME_CUSTOMERS,'customers_firstname'); ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_EMAIL.xtc_sorting(FILENAME_CUSTOMERS,'customers_email_address'); ?></td><?php// web28 - 2010-05-28 - added customers_email_address ?>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_EMAIL.xtc_sorting(FILENAME_CUSTOMERS,'customers_email_address'); ?></td>
<td class="dataTableHeadingContent"><?php echo TEXT_INFO_COUNTRY.xtc_sorting(FILENAME_CUSTOMERS,'customers_country'); ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_UMSATZ; ?></td>
<td class="dataTableHeadingContent" align="left"><?php echo HEADING_TITLE_STATUS; ?></td>
<?php if (ACCOUNT_COMPANY_VAT_CHECK == 'true') {?>
<?php
if (ACCOUNT_COMPANY_VAT_CHECK == 'true') {
?>
<td class="dataTableHeadingContent" align="left"><?php echo HEADING_TITLE_VAT; ?></td>
<?php } ?>
<?php
}
?>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACCOUNT_CREATED.xtc_sorting(FILENAME_CUSTOMERS,'date_account_created'); ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
</tr>
<?php
ca. Zeile 1168
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACCOUNT_CREATED.xtc_sorting(FILENAME_CUSTOMERS,'date_account_created'); ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
</tr>
<?php
$search = '';
if (($_GET['search']) && (xtc_not_null($_GET['search']))) {
if (isset($_GET['search']) && (xtc_not_null($_GET['search']))) {
$keywords = xtc_db_input(xtc_db_prepare_input($_GET['search']));
$search = "and (c.customers_lastname like '%".$keywords."%' or c.customers_firstname like '%".$keywords."%' or c.customers_email_address like '%".$keywords."%')";
$search = "AND (c.customers_lastname like '%".$keywords."%' or c.customers_firstname like '%".$keywords."%' or c.customers_email_address like '%".$keywords."%')";
//BOF - web28 - 2010-05-29 added for ADMIN SEARCH BAR
if( $_GET['asb'] == 'asb') {
$search = "and (c.customers_lastname like '%".$keywords."%' or c.customers_firstname like '%".$keywords."%')";
if(isset($_GET['asb']) && $_GET['asb'] == 'asb') {
$search = "AND (c.customers_lastname like '%".$keywords."%' or c.customers_firstname like '%".$keywords."%')";
}
//EOF - web28 - 2010-05-29 added for ADMIN SEARCH BAR
}
//BOF - web28 - 2010-05-29 added for ADMIN SEARCH BAR
if (($_GET['search_email']) && (xtc_not_null($_GET['search_email']))) {
if (isset($_GET['search_email']) && (xtc_not_null($_GET['search_email']))) {
$keywords = xtc_db_input(xtc_db_prepare_input($_GET['search_email']));
$search = "and (c.customers_email_address like '%".$keywords."%')";
$search = "AND (c.customers_email_address like '%".$keywords."%')";
}
//BOF - web28 - 2010-05-29 added for ADMIN SEARCH BAR
if ($_GET['status'] && $_GET['status'] != '100' or $_GET['status'] == '0') {
//EOF - web28 - 2010-05-29 added for ADMIN SEARCH BAR
if (isset($_GET['status']) && ($_GET['status'] != '100' || $_GET['status'] == '0')) {
$status = xtc_db_prepare_input($_GET['status']);
// echo $status;
$search = "and c.customers_status = '".$status."'";
$search = "AND c.customers_status = '".$status."'";
}
if ($_GET['sorting']) {
if (isset($_GET['sorting']) && xtc_not_null($_GET['sorting'])) {
switch ($_GET['sorting']) {
case 'customers_firstname' :
$sort = 'order by c.customers_firstname';
break;
case 'customers_firstname-desc' :
ca. Zeile 1219
break;
case 'date_account_created-desc' :
$sort = 'order by ci.customers_info_date_account_created DESC';
break;
// BOF - DokuMan - 2012-02-06 - added customers_cid
case 'customers_cid' :
$sort = 'order by c.customers_cid';
break;
case 'customers_cid-desc' :
$sort = 'order by c.customers_cid DESC';
break;
// EOF - DokuMan - 2012-02-06 - added customers_cid
case 'customers_email_address-desc' :
$sort = 'order by c.customers_email_address DESC';
break;
case 'customers_email_address' :
$sort = 'order by c.customers_email_address';
break;
}
} else {
$sort = 'order by ci.customers_info_date_account_created DESC'; // vr - 2010-02-22 - default sort order
}
// BOF - vr - 2010-02-22 - default sort order
else
$sort = 'order by ci.customers_info_date_account_created DESC';
// EOF - vr - 2010-02-22 - default sort order
$customers_query_raw = "select
c.account_type,
// BOF - vr - 2010-02-22 - removed group by part to prevent folding of customers records with the same creation timestamp
$customers_query_raw = "-- admin/customers.php
SELECT
c.customers_id,
c.customers_cid,
c.customers_vat_id,
c.customers_vat_id_status,
c.customers_lastname,
c.customers_status,
c.customers_firstname,
c.customers_lastname,
c.customers_email_address,
a.entry_country_id,
c.customers_status,
c.member_flag,
c.account_type,
a.entry_country_id,
ci.customers_info_date_account_created
from
FROM
".TABLE_CUSTOMERS." c ,
".TABLE_ADDRESS_BOOK." a,
".TABLE_CUSTOMERS_INFO." ci
Where
c.customers_id = a.customers_id
and c.customers_default_address_id = a.address_book_id
and ci.customers_info_id = c.customers_id
WHERE c.customers_id = a.customers_id
AND c.customers_default_address_id = a.address_book_id
AND ci.customers_info_id = c.customers_id
".$search."
".$sort;
// EOF - vr - 2010-02-22 - removed group by part to prevent folding of customers records with the same creation timestamp
$customers_split = new splitPageResults($_GET['page'], '100', $customers_query_raw, $customers_query_numrows);
$customers_query = xtc_db_query($customers_query_raw);
while ($customers = xtc_db_fetch_array($customers_query)) {
$info_query = xtc_db_query("select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons from ".TABLE_CUSTOMERS_INFO." where customers_info_id = '".(int)$customers['customers_id']."'");
$info_query = xtc_db_query("-- admin/customers.php
SELECT
customers_info_date_account_created as date_account_created,
customers_info_date_account_last_modified as date_account_last_modified,
customers_info_date_of_last_logon as date_last_logon,
customers_info_number_of_logons as number_of_logons
FROM ".TABLE_CUSTOMERS_INFO."
WHERE customers_info_id = '".(int)$customers['customers_id']."'");
$info = xtc_db_fetch_array($info_query);
// BOF - JUNG GESTALTEN - 27.11.2008 - KUNDENUMSÄTZE
$umsatz_query = xtc_db_query("select sum(op.final_price) as ordersum from " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where '".(int)$customers['customers_id']."' = o.customers_id and o.orders_id = op.orders_id");
// BOF - DokuMan - 2011-09-12 - optimize sql query for customers sales volume - thx to GTB
$umsatz_query = xtc_db_query("-- admin/customers.php
SELECT SUM(op.final_price) as ordersum
FROM ".TABLE_ORDERS_PRODUCTS." op
JOIN ".TABLE_ORDERS." o ON o.orders_id = op.orders_id
WHERE '".(int)$customers['customers_id']."' = o.customers_id");
$umsatz = xtc_db_fetch_array($umsatz_query);
// EOF - JUNG GESTALTEN - 27.11.2008 - KUNDENUMSÄTZE
// EOF - DokuMan - 2011-09-12 - optimize sql query for customers sales volume - thx to GTB
if (((!$_GET['cID']) || (@ $_GET['cID'] == $customers['customers_id'])) && (!$cInfo)) {
$country_query = xtc_db_query("select countries_name from ".TABLE_COUNTRIES." where countries_id = '".(int)$customers['entry_country_id']."'");
if ((!isset($_GET['cID']) || (@$_GET['cID'] == $customers['customers_id'])) && !isset($cInfo)) {
$country_query = xtc_db_query("SELECT countries_name FROM ".TABLE_COUNTRIES." WHERE countries_id = '".(int)$customers['entry_country_id']."'");
$country = xtc_db_fetch_array($country_query);
$reviews_query = xtc_db_query("select count(*) as number_of_reviews from ".TABLE_REVIEWS." where customers_id = '".(int)$customers['customers_id']."'");
$reviews_query = xtc_db_query("SELECT count(*) as number_of_reviews FROM ".TABLE_REVIEWS." WHERE customers_id = '".(int)$customers['customers_id']."'");
$reviews = xtc_db_fetch_array($reviews_query);
$customer_info = xtc_array_merge($country, $info, $reviews);
$cInfo_array = xtc_array_merge($customers, $customer_info);
$cInfo = new objectInfo($cInfo_array);
}
if ((is_object($cInfo)) && ($customers['customers_id'] == $cInfo->customers_id)) {
if (isset($cInfo) && is_object($cInfo) && ($customers['customers_id'] == $cInfo->customers_id)) {
echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'" onclick="document.location.href=\''.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=edit').'\'">'."\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\''.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID')).'cID='.$customers['customers_id']).'\'">'."\n";
}
if ($customers['account_type'] == 1) {
echo '<td class="dataTableContent">';
echo TEXT_GUEST;
} else {
echo '<td class="dataTableContent">';
echo TEXT_ACCOUNT;
}
$account_type = ($customers['account_type'] == 1) ? TEXT_GUEST : TEXT_ACCOUNT;
?>
</td>
<td class="dataTableContent"><b><?php echo $customers['customers_lastname']; ?></b></td>
<td class="dataTableContent" style="width:40px;"><?php echo $account_type; ?></td>
<td class="dataTableContent" style="width:80px;"><?php echo $customers['customers_cid']; ?> </td>
<td class="dataTableContent"><?php echo $customers['customers_lastname']; ?></td>
<td class="dataTableContent"><?php echo $customers['customers_firstname']; ?></td>
<td class="dataTableContent"><?php echo $customers['customers_email_address']; ?></td><?php// web28 - 2010-05-28 - added customers_email_address ?>
<td class="dataTableContent"><?php echo $customers['customers_email_address']; ?></td>
<td class="dataTableContent"><?php echo xtc_get_country_name($customers['entry_country_id']); ?></td>
<?php if ($umsatz['ordersum'] !='') { ?>
<?php
if ($umsatz['ordersum'] !='') {
?>
<td class="dataTableContent"><?php if ($umsatz['ordersum']>0) { echo $currencies->format($umsatz['ordersum']);} ?></td>
<?php } else { ?>
<?php
} else {
?>
<td class="dataTableContent"> --- </td>
<?php } ?>
<?php
}
?>
<td class="dataTableContent" align="left"><?php echo $customers_statuses_id_array[$customers['customers_status']]['text'] . ' (' . $customers['customers_status'] . ')' ; ?></td><?php// web28 - 2011-10-31 - change $customers_statuses_array to $customers_statuses_id_array?>
<?php if (ACCOUNT_COMPANY_VAT_CHECK == 'true') {?>
<?php
if (ACCOUNT_COMPANY_VAT_CHECK == 'true') {
?>
<td class="dataTableContent" align="left">
<?php
if ($customers['customers_vat_id']) {
echo $customers['customers_vat_id'].'<br /><span style="font-size:8pt"><nobr>('.xtc_validate_vatid_status($customers['customers_id']).')</nobr></span>';
}
?>
ca. Zeile 1317
echo $customers['customers_vat_id'].'<br /><span style="font-size:8pt"><nobr>('.xtc_validate_vatid_status($customers['customers_id']).')</nobr></span>';
}
?>
</td>
<?php } ?>
<td class="dataTableContent" align="right"><?php echo xtc_date_short($info['date_account_created']); ?></td>
<td class="dataTableContent" align="right"><?php if ( (is_object($cInfo)) && ($customers['customers_id'] == $cInfo->customers_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT); } else { echo '<a href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
<?php
}
?>
<td class="dataTableContent" align="right"><?php echo xtc_date_short($info['date_account_created']); ?> </td>
<td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($customers['customers_id'] == $cInfo->customers_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT); } else { echo '<a href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
</tr>
<?php
}
?>
<tr>
<?php// BOF - web28 - 2010-05-28 - added customers_email_address
//<td colspan="6"><table border="0" width="100%" cellspacing="0" cellpadding="2">
?>
<td colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php// BOF - web28 - 2010-05-28 - added customers_email_address ?>
<td colspan="7">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText" valign="top"><?php echo $customers_split->display_count($customers_query_numrows, '100', $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS); ?></td>
<td class="smallText" align="right"><?php echo $customers_split->display_links($customers_query_numrows, '100', MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xtc_get_all_get_params(array('page', 'info', 'x', 'y', 'cID'))); ?></td>
</tr>
<?php
if (xtc_not_null($_GET['search'])) {
if (isset($_GET['search'])) {
?>
<tr>
<td align="right" colspan="2"><?php echo '<a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS) . '">' . BUTTON_RESET . '</a>'; ?></td>
</tr>
ca. Zeile 1343
<tr>
<td align="right" colspan="2"><?php echo '<a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS) . '">' . BUTTON_RESET . '</a>'; ?></td>
</tr>
<?php
}
?>
</table></td>
</table>
</td>
</tr>
</table></td>
</table>
</td>
<?php
$heading = array ();
$contents = array ();
switch ($action) {
case 'confirm' :
ca. Zeile 1366
break;
case 'editstatus' :
if ($_GET['cID'] != 1) {
$customers_history_query = xtc_db_query("select new_value, old_value, date_added, customer_notified from ".TABLE_CUSTOMERS_STATUS_HISTORY." where customers_id = '".xtc_db_input($_GET['cID'])."' order by customers_status_history_id desc");
$customers_history_query = xtc_db_query("SELECT new_value, old_value, date_added, customer_notified FROM ".TABLE_CUSTOMERS_STATUS_HISTORY." WHERE customers_id = '".xtc_db_input($_GET['cID'])."' order by customers_status_history_id desc");
$heading[] = array ('text' => '<b>'.TEXT_INFO_HEADING_STATUS_CUSTOMER.'</b>');
$contents = array ('form' => xtc_draw_form('customers', FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=statusconfirm'));
$contents[] = array ('text' => '<br />'.xtc_draw_pull_down_menu('status', $customers_statuses_array, $cInfo->customers_status));
$contents[] = array ('text' => '<table nowrap border="0" cellspacing="0" cellpadding="0"><tr><td style="border-bottom: 1px solid; border-color: #000000;" nowrap class="smallText" align="center"><b>'.TABLE_HEADING_NEW_VALUE.' </b></td><td style="border-bottom: 1px solid; border-color: #000000;" nowrap class="smallText" align="center"><b>'.TABLE_HEADING_DATE_ADDED.'</b></td></tr>');
ca. Zeile 1384
$contents[] = array ('text' => '<tr>'."\n".' <td class="smallText" colspan="2">'.TEXT_NO_CUSTOMER_HISTORY.'</td>'."\n".' </tr>'."\n");
}
$contents[] = array ('text' => '</table>');
$contents[] = array ('align' => 'center', 'text' => '<br /><input type="submit" class="button" value="'.BUTTON_UPDATE.'"><a class="button" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id).'">'.BUTTON_CANCEL.'</a>');
$status = xtc_db_prepare_input($_POST['status']); // maybe this line not needed to recheck...
$status = isset($_POST['status']) ? xtc_db_prepare_input($_POST['status']) : ''; // maybe this line not needed to recheck...
}
break;
default :
//BOF - DokuMan - 2010-11-01 - seems to be for debugging porpoises only
/*
if (isset($_GET['cID'])) {
$customer_status = xtc_get_customer_status($_GET['cID']);
$cs_id = $customer_status['customers_status'];
$cs_member_flag = $customer_status['member_flag'];
$cs_name = $customer_status['customers_status_name'];
ca. Zeile 1399
$cs_ot_discount_flag = $customer_status['customers_status_ot_discount_flag'];
$cs_ot_discount = $customer_status['customers_status_ot_discount'];
$cs_staffelpreise = $customer_status['customers_status_staffelpreise'];
$cs_payment_unallowed = $customer_status['customers_status_payment_unallowed'];
// echo 'customer_status ' . $cID . 'variables = ' . $cs_id . $cs_member_flag . $cs_name . $cs_discount . $cs_image . $cs_ot_discount;
if (is_object($cInfo)) {
}
*/
//echo 'customer_status ' . $_GET['cID'] . 'variables = ' . $cs_id . $cs_member_flag . $cs_name . $cs_discount . $cs_image . $cs_ot_discount;
//EOF - DokuMan - 2010-11-01 - seems to be for debugging porpoises only
if (isset($cInfo) && is_object($cInfo)) {
$heading[] = array ('text' => '<b>'.$cInfo->customers_firstname.' '.$cInfo->customers_lastname.'</b>');
if ($cInfo->customers_id != 1) {
$contents[] = array ('align' => 'center', 'text' => '<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=edit').'">'.BUTTON_EDIT.'</a>');
}
ca. Zeile 1413
}
if ($cInfo->customers_id != 1) {
$contents[] = array ('align' => 'center', 'text' => '<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=confirm').'">'.BUTTON_DELETE.'</a>');
}
if ($cInfo->customers_id != 1 /*&& $_SESSION['customer_id'] == 1*/
) {
if ($cInfo->customers_id != 1) {
$contents[] = array ('align' => 'center', 'text' => '<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=editstatus').'">'.BUTTON_STATUS.'</a>');
}
// elari cs v3.x changed for added accounting module
if ($cInfo->customers_id != 1) {
if ($cInfo->customers_id != 1 && $cInfo->customers_status == 0) { // h-h-h - 2011-10-06 - show only if customer is admin - thx to Webkiste
$contents[] = array ('align' => 'center', 'text' => '<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_ACCOUNTING, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id).'">'.BUTTON_ACCOUNTING.'</a>');
}
// elari cs v3.x changed for added iplog module
$contents[] = array ('align' => 'center', 'text' => '<table><tr><td style="text-align: center;"><a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_ORDERS, 'cID='.$cInfo->customers_id).'">'.BUTTON_ORDERS.'</a></td><td style="text-align: center;"><a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_MAIL, 'selected_box=tools&customer='.$cInfo->customers_email_address).'">'.BUTTON_EMAIL.'</a></td></tr><tr><td style="text-align: center;"><a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=iplog').'">'.BUTTON_IPLOG.'</a></td><td style="text-align: center;"><a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=new_order').'" onclick="return confirm(\''.NEW_ORDER.'\')">'.BUTTON_NEW_ORDER.'</a></td></tr></table>');
$contents[] = array (
'align' => 'center',
'text' => '<table>
<tr>
<td style="text-align: center;">
<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_ORDERS, 'cID='.$cInfo->customers_id).'">'.BUTTON_ORDERS.'</a>
</td>
<td style="text-align: center;">
<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_MAIL, 'selected_box=tools&customer='.$cInfo->customers_email_address).'">'.BUTTON_EMAIL.'</a>
</td>
</tr>
<tr>
<td style="text-align: center;">
<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=iplog').'">'.BUTTON_IPLOG.'</a></td>
<td style="text-align: center;">
<a class="button" onclick="this.blur();" href="'.xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$cInfo->customers_id.'&action=new_order').'" onclick="return confirm(\''.NEW_ORDER.'\')">'.BUTTON_NEW_ORDER.'</a>
</td>
</tr>
</table>'
);
//BOF - DokuMan - 2010-11-02 - Workaround for customer details not showing on iplog-Box
if ($action == 'iplog') {
$info_query = xtc_db_query("SELECT
customers_info_date_account_created as date_account_created,
customers_info_date_account_last_modified as date_account_last_modified,
customers_info_date_of_last_logon as date_last_logon,
customers_info_number_of_logons as number_of_logons
FROM ".TABLE_CUSTOMERS_INFO." WHERE customers_info_id = '".$cInfo->customers_id."'");
$info = xtc_db_fetch_array($info_query);
$country_query = xtc_db_query("SELECT countries_name FROM ".TABLE_COUNTRIES." WHERE countries_id = '".(int)$cInfo->entry_country_id."'");
$country = xtc_db_fetch_array($country_query);
$reviews_query = xtc_db_query("SELECT COUNT(*) as number_of_reviews FROM ".TABLE_REVIEWS." WHERE customers_id = '".(int)$cInfo->customers_id."'");
$reviews = xtc_db_fetch_array($reviews_query);
$contents[] = array ('text' => '<br />'.TEXT_DATE_ACCOUNT_CREATED.' '.xtc_date_short($info['date_account_created']));
$contents[] = array ('text' => '<br />'.TEXT_DATE_ACCOUNT_LAST_MODIFIED.' '.xtc_date_short($info['date_account_last_modified']));
$contents[] = array ('text' => '<br />'.TEXT_INFO_DATE_LAST_LOGON.' '.xtc_date_short($info['date_last_logon']));
$contents[] = array ('text' => '<br />'.TEXT_INFO_NUMBER_OF_LOGONS.' '.$info['number_of_logons']);
$contents[] = array ('text' => '<br />'.TEXT_INFO_COUNTRY.' '.$country['countries_name']);
$contents[] = array ('text' => '<br />'.TEXT_INFO_NUMBER_OF_REVIEWS.' '.$reviews['number_of_reviews']);
} else {
//EOF - DokuMan - 2010-11-02 - Workaround for customer details not showing on iplog-Box
$contents[] = array ('text' => '<br />'.TEXT_DATE_ACCOUNT_CREATED.' '.xtc_date_short($cInfo->date_account_created));
$contents[] = array ('text' => '<br />'.TEXT_DATE_ACCOUNT_LAST_MODIFIED.' '.xtc_date_short($cInfo->date_account_last_modified));
$contents[] = array ('text' => '<br />'.TEXT_INFO_DATE_LAST_LOGON.' '.xtc_date_short($cInfo->date_last_logon));
// BOF - Tomcraft - 2011-01-16 - Additionally show time for customers last logon time
//$contents[] = array ('text' => '<br />'.TEXT_INFO_DATE_LAST_LOGON.' '.xtc_date_short($cInfo->date_last_logon));
$contents[] = array ('text' => '<br />'.TEXT_INFO_DATE_LAST_LOGON.' '.xtc_datetime_short($cInfo->date_last_logon));
// EOF - Tomcraft - 2011-01-16 - Additionally show time for customers last logon time
$contents[] = array ('text' => '<br />'.TEXT_INFO_NUMBER_OF_LOGONS.' '.$cInfo->number_of_logons);
$contents[] = array ('text' => '<br />'.TEXT_INFO_COUNTRY.' '.$cInfo->countries_name);
$contents[] = array ('text' => '<br />'.TEXT_INFO_NUMBER_OF_REVIEWS.' '.$cInfo->number_of_reviews);
//BOF - DokuMan - 2010-11-02 - Workaround for customer details not showing on iplog-Box
}
//EOF - DokuMan - 2010-11-02 - Workaround for customer details not showing on iplog-Box
}
if ($action == 'iplog') {
if (isset ($_GET['cID'])) {
ca. Zeile 1449
$contents[] = array ('text' => '<tr>'."\n".'<td class="smallText">'.$customers_log_info['customers_ip_date'].' '.$customers_log_info['customers_ip'].' '.$customers_log_info['customers_advertiser']);
}
}
}
break;
}
break;
}
if ((xtc_not_null($heading)) && (xtc_not_null($contents))) {
echo ' <td width="25%" valign="top">'."\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' </td>'."\n";
}
?>
</tr>
ca. Zeile 1462
echo ' </td>'."\n";
}
?>
</tr>
</table></td>
</table>
</td>
</tr>
<?php
}
?>
</table></td>
</table>
</td>
<!-- body_text_eof //-->
</tr>
</table>
<!-- body_eof //-->
admin/customers_status.phpTop ca. Zeile 201
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" align="left" width=""><?php echo 'cID'; ?></td>
<td class="dataTableHeadingContent" align="left" width=""><?php echo 'icon'; ?></td>
<td class="dataTableHeadingContent" align="left" width=""><?php echo 'user'; ?></td>
<td class="dataTableHeadingContent" align="left" width=""><?php echo TABLE_HEADING_CUSTOMERS_STATUS; ?></td>
<td class="dataTableHeadingContent" align="center" width=""><?php echo TABLE_HEADING_TAX_PRICE; ?></td>
ca. Zeile 239
} else {
echo '<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CUSTOMERS_STATUS, 'page=' . $_GET['page'] . '&cID=' . $customers_status['customers_status_id']) . '\'">' . "\n";
}
//BOC - web28 2011-10-26 - show customers group
echo '<td class="dataTableContent" align="left">';
echo $customers_status['customers_status_id'];
echo '</td>';
//EOC - web28 2011-10-26 - show customers group
echo '<td class="dataTableContent" align="left">';
if ($customers_status['customers_status_image'] != '') {
echo xtc_image(DIR_WS_ICONS . $customers_status['customers_status_image'] , IMAGE_ICON_INFO);
}
ca. Zeile 416
for ($i=0; $i<sizeof($languages); $i++) {
$customers_status_inputs_string .= '<br />' . xtc_image(DIR_WS_CATALOG.'lang/'. $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . xtc_get_customers_status_name($cInfo->customers_status_id, $languages[$i]['id']);
}
$contents[] = array('text' => $customers_status_inputs_string);
//BOC - web28 - add price infos
$contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_SHOW_PRICE_INTRO. '<br />' . ENTRY_CUSTOMERS_STATUS_SHOW_PRICE . ': ' . $customers_status_show_price_array[$cInfo->customers_status_show_price]['text'] . ' (' . $cInfo->customers_status_show_price . ')');
$contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_SHOW_PRICE_TAX_INTRO. '<br />' . ENTRY_CUSTOMERS_STATUS_SHOW_PRICE_TAX . ': ' . $customers_status_show_price_tax_array[$cInfo->customers_status_show_price_tax]['text'] . ' (' . $cInfo->customers_status_show_price_tax . ')');
$contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_ADD_TAX_INTRO. '<br />' . ENTRY_CUSTOMERS_STATUS_ADD_TAX . ': ' . $customers_status_add_tax_ot_array[$cInfo->customers_status_add_tax_ot]['text'] . ' (' . $cInfo->customers_status_add_tax_ot . ')');
//EOC - web28 - add price infos
$contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE_INTRO . '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE . ' ' . $cInfo->customers_status_discount . '%');
$contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_OT_XMEMBER_INTRO . '<br />' . ENTRY_OT_XMEMBER . ' ' . $customers_status_ot_discount_flag_array[$cInfo->customers_status_ot_discount_flag]['text'] . ' (' . $cInfo->customers_status_ot_discount_flag . ')' . ' - ' . $cInfo->customers_status_ot_discount . '%');
$contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_GRADUATED_PRICES_INTRO . '<br />' . ENTRY_GRADUATED_PRICES . ' ' . $customers_status_graduated_prices_array[$cInfo->customers_status_graduated_prices]['text'] . ' (' . $cInfo->customers_status_graduated_prices . ')' );
$contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_ATTRIBUTES_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_DISCOUNT_ATTRIBUTES . ' ' . $customers_status_discount_attributes_array[$cInfo->customers_status_discount_attributes]['text'] . ' (' . $cInfo->customers_status_discount_attributes . ')' );
admin/includes/application_top.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: application_top.php 1323 2005-10-27 17:58:08Z mz $
$Id: application_top.php 2798 2012-04-28 09:45:32Z web28 $
http://www.xtc-modified.org
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
ca. Zeile 20
Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
Released under the GNU General Public License
--------------------------------------------------------------*/
// Define the project version
define('PROJECT_VERSION', 'xtcModified v1.05 dated: 2010-07-18 SP1c');
// Start the clock for the page parse time log
define('PAGE_PARSE_START_TIME', microtime());
define('PAGE_PARSE_START_TIME', microtime(true));
// security
define('_VALID_XTC',true);
// Set the level of error reporting
// set the level of error reporting
if (file_exists('../export/_error_reporting.all') || file_exists('../export/_error_reporting.admin')) {
error_reporting(E_ALL & ~E_NOTICE);
//error_reporting(-1); // Development value
} else {
error_reporting(0);
}
// Disable use_trans_sid as xtc_href_link() does this manually
if (function_exists('ini_set')) {
ini_set('session.use_trans_sid', 0);
ca. Zeile 48
} else {
require('includes/configure.php');
}
// BOF - Tomcraft - 2009-11-08 - FIX for PHP5.3 date_default_timezone_set
// solve compatibility issues
require_once (DIR_WS_FUNCTIONS.'compatibility.php');
// default time zone
if (version_compare(PHP_VERSION, '5.1.0', '>=')) {
date_default_timezone_set('Europe/Berlin');
}
// EOF - Tomcraft - 2009-11-08 - FIX for PHP5.3 date_default_timezone_set
define('SQL_CACHEDIR',DIR_FS_CATALOG.'cache/');
// Base/PHP_SELF/SSL-PROXY
$PHP_SELF = $_SERVER['SCRIPT_NAME'];
// Define the project version
define('PROJECT_VERSION', 'xtcModified v1.05 dated: 2010-07-18 SP1b');
//compatibility for xtcModified 1.06 files
define('DIR_WS_BASE', '');
// BOF - Tomcraft - 2009-11-09 - Added missing definition for TAX_DECIMAL_PLACES
define('TAX_DECIMAL_PLACES', 0);
// EOF - Tomcraft - 2009-11-09 - Added missing definition for TAX_DECIMAL_PLACES
// SQL caching dir
define('SQL_CACHEDIR',DIR_FS_CATALOG.'cache/');
// Set the length of the redeem code, the longer the more secure
//define('SECURITY_CODE_LENGTH', '6'); //DokuMan - 2010-10-29 - constant already defined in database
define('TAX_DECIMAL_PLACES', 0);
// Used in the "Backup Manager" to compress backups
define('LOCAL_EXE_GZIP', '/usr/bin/gzip');
define('LOCAL_EXE_GUNZIP', '/usr/bin/gunzip');
ca. Zeile 145
define('FILENAME_BLACKLIST', 'blacklist.php');
define('FILENAME_PRODUCTS_VPE','products_vpe.php');
define('FILENAME_CAMPAIGNS_REPORT','stats_campaigns.php');
define('FILENAME_XSELL_GROUPS','cross_sell_groups.php');
// GOOGLE SITEMAP - JUNG GESTALTEN - 07.10.2008
define('FILENAME_GOOGLE_SITEMAP', '../google_sitemap.php');
// BOF - web28 - 2010-05-06 - PayPal API Modul
define('FILENAME_PAYPAL','paypal.php');
define('FILENAME_PAYPAL_CHECKOUT', 'paypal_checkout.php');
// EOF - web28 - 2010-05-06 - PayPal API Modul
// define the database table names used in the project
// BOF - 2010-01-20 - vr - revised unified version based on database_tables.php and admin/incudes/application_top.php,
// list of TABLE MAPPINGS is now MAINTAINED in database_tables.php ONLY
// list of project database tables
require_once('../' . DIR_WS_INCLUDES . 'database_tables.php');
// BOF - 2010-01-20 vr - revised unified version based on database_tables.php and admin/incudes/application_top.php,
// include needed functions
require_once(DIR_FS_INC . 'xtc_db_connect.inc.php');
require_once(DIR_FS_INC . 'xtc_db_close.inc.php');
ca. Zeile 186
require_once(DIR_FS_INC . 'xtc_get_qty.inc.php');
require_once(DIR_FS_INC . 'xtc_product_link.inc.php');
require_once(DIR_FS_INC . 'xtc_cleanName.inc.php');
require_once(DIR_FS_INC . 'xtc_get_top_level_domain.inc.php');
require_once (DIR_FS_INC . 'xtc_update_whos_online.inc.php');
// customization for the design layout
define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)
// design layout (wide of boxes in pixels) (default: 125)
define('BOX_WIDTH', 125);
// Define how do we update currency exchange rates
// Possible values are 'oanda' 'xe' or ''
define('CURRENCY_SERVER_PRIMARY', 'oanda');
define('CURRENCY_SERVER_BACKUP', 'xe');
// Use the DB-Logger
//define('STORE_DB_TRANSACTIONS', 'false'); //DokuMan - 2010-10-29 - constant already defined in database
// include the database functions
// require(DIR_WS_FUNCTIONS . 'database.php');
// make a connection to the database... now
xtc_db_connect() or die('Unable to connect to database server!');
// set application wide parameters
$configuration_query = xtc_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION . '');
// BOF - Tomcraft - 2009-10-03 - Paypal Express Modul (Cache im Admin AUS!)
/*
while ($configuration = xtc_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
*/
while ($configuration = xtc_db_fetch_array($configuration_query)) {
if ($configuration['cfgKey'] != 'STORE_DB_TRANSACTIONS') {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
}
// EOF - Tomcraft - 2009-10-03 - Paypal Express Modul (Cache im Admin AUS!)
define('FILENAME_IMAGEMANIPULATOR',IMAGE_MANIPULATOR);
// move to xtc_db_queryCached.inc.php
function xtDBquery($query) {
if (DB_CACHE=='true') {
$result=xtc_db_queryCached($query);
//echo 'cached query: '.$query.'<br />';
} else {
$result=xtc_db_query($query);
}
return $result;
ca. Zeile 234
// initialize the logger class
require(DIR_WS_CLASSES . 'logger.php');
// include shopping cart class
// shopping cart class
require(DIR_WS_CLASSES . 'shopping_cart.php');
// some code to solve compatibility issues
require(DIR_WS_FUNCTIONS . 'compatibility.php');
// todo
require(DIR_WS_FUNCTIONS . 'general.php');
// define how the session functions will be used
require(DIR_WS_FUNCTIONS . 'sessions.php');
// define our general functions used application-wide
ca. Zeile 251
require(DIR_WS_FUNCTIONS . 'html_output.php');
// set the session name and save path
session_name('XTCsid');
if (STORE_SESSIONS != 'mysql')
if (STORE_SESSIONS != 'mysql') {
session_save_path(SESSION_WRITE_DIRECTORY);
}
//BOF - DokuMan - 2010-10-29 - added missing variables for determining $current_domain
// set the type of request (secure or not)
if (file_exists(DIR_WS_INCLUDES . 'request_type.php')) {
include (DIR_WS_INCLUDES . 'request_type.php');
}
else {
} else {
$request_type = 'NONSSL';
}
// set the top level domains
$http_domain = xtc_get_top_level_domain(HTTP_SERVER);
//$https_domain = xtc_get_top_level_domain(HTTPS_SERVER);
//$current_domain = (($request_type == 'NONSSL') ? $http_domain : $https_domain);
ca. Zeile 266
$http_domain = xtc_get_top_level_domain(HTTP_SERVER);
//$https_domain = xtc_get_top_level_domain(HTTPS_SERVER);
//$current_domain = (($request_type == 'NONSSL') ? $http_domain : $https_domain);
$current_domain = $http_domain; //currently no https_domain support
//EOF - DokuMan - 2010-10-29 - added missing variables for determining $current_domain
// set the session cookie parameters
if (function_exists('session_set_cookie_params')) {
session_set_cookie_params(0, '/', (xtc_not_null($current_domain) ? '.' . $current_domain : ''));
ca. Zeile 284
} elseif (($request_type == 'SSL') && isset($_GET[session_name()])) {
session_id($_GET[session_name()]);
}
//BOF - DokuMan - 2011-01-06 - set session.use_only_cookies when force cookie is enabled
@ini_set('session.use_only_cookies', (SESSION_FORCE_COOKIE_USE == 'True') ? 1 : 0);
//EOF - DokuMan - 2011-01-06 - set session.use_only_cookies when force cookie is enabled
@ini_set('session.use_only_cookies', (SESSION_FORCE_COOKIE_USE == 'True') ? 1 : 0); //DokuMan - 2011-01-06 - set session.use_only_cookies when force cookie is enabled
// start the session
$session_started = false;
if (SESSION_FORCE_COOKIE_USE == 'True') {
xtc_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, '/', $current_domain);
//BOF - Hetfield - 2009-08-16 - fix for some admin-login problems
//if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
if (isset($_COOKIE['cookie_test'])) {
//EOF - Hetfield - 2009-08-16 - fix for some admin-login problems
session_start();
$session_started = true;
}
} elseif (CHECK_CLIENT_AGENT == 'True') {
ca. Zeile 316
// verify the ssl_session_id if the feature is enabled
if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) {
$ssl_session_id = getenv('SSL_SESSION_ID');
if (!isset($_SESSION['SESSION_SSL_ID'])) { // Hetfield - 2009-08-19 - removed deprecated function session_is_registered to be ready for PHP >= 5.3
if (!isset($_SESSION['SESSION_SSL_ID'])) {
$_SESSION['SESSION_SSL_ID'] = $ssl_session_id;
}
if ($_SESSION['SESSION_SSL_ID'] != $ssl_session_id) {
session_destroy();
xtc_redirect(xtc_href_link(FILENAME_SSL_CHECK));
}
ca. Zeile 341
xtc_redirect(xtc_href_link(FILENAME_LOGIN));
}
}
// verify the IP address if the feature is enabled
if (SESSION_CHECK_IP_ADDRESS == 'True') {
$ip_address = xtc_get_ip_address();
if (!isset($_SESSION['SESSION_IP_ADDRESS'])) { // Hetfield - 2009-08-19 - removed deprecated function session_is_registered to be ready for PHP >= 5.3
if (!isset($_SESSION['SESSION_IP_ADDRESS'])) {
$_SESSION['SESSION_IP_ADDRESS'] = $ip_address;
}
if ($_SESSION['SESSION_IP_ADDRESS'] != $ip_address) {
session_destroy();
xtc_redirect(xtc_href_link(FILENAME_LOGIN));
}
ca. Zeile 357
}
// set the language
if (!isset($_SESSION['language']) || isset($_GET['language'])) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language($_GET['language']);
if (!isset($_GET['language']))
if (!isset($_GET['language'])) {
$lng->get_browser_language();
}
$_SESSION['language'] = $lng->language['directory'];
$_SESSION['languages_id'] = $lng->language['id'];
$_SESSION['language_charset'] = $lng->language['language_charset']; //web28 - 2012-04-29 - add $_SESSION['language_charset']
$_SESSION['language_code'] = $lng->language['code']; //web28 - 2010-09-05 - add $_SESSION['language_code']
}
// include the language translations
require(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'.$_SESSION['language'] . '.php');
require(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/buttons.php');
//BOF - GTB - 2010-11-26 - Security Fix - PHP_SELF
$current_page = basename($_SERVER['SCRIPT_NAME']);
//$current_page = preg_split('/\?/', basename($_SERVER['PHP_SELF'])); $current_page = $current_page[0]; // for BadBlue(Win32) webserver compatibility // Hetfield - 2009-08-18 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3
//EOF - GTB - 2010-11-26 - Security Fix - PHP_SELF
if (file_exists(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'.$current_page)) {
include(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'. $current_page);
}
// write customers status in session
require('../' . DIR_WS_INCLUDES . 'write_customers_status.php');
// include the who's online functions
xtc_update_whos_online();
// for tracking of customers
$_SESSION['user_info'] = array();
if (!isset($_SESSION['user_info']['user_ip'])) {
$_SESSION['user_info']['user_ip'] = $_SERVER['REMOTE_ADDR'];
// $user_info['user_ip_date'] = value will be in fact added when login ;
$_SESSION['user_info']['user_host'] = gethostbyaddr($_SERVER['REMOTE_ADDR']);
//$_SESSION['user_info']['user_host'] = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$_SESSION['user_info']['user_host'] = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : '';
$_SESSION['user_info']['advertiser'] = isset($_GET['ad']) ? $_GET['ad'] : '';
$_SESSION['user_info']['referer_url'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
}
ca. Zeile 420
// file uploading class
require(DIR_WS_CLASSES . 'upload.php');
// calculate category path
if (isset($_GET['cPath'])) {
$cPath = $_GET['cPath'];
} else {
$cPath = '';
}
$cPath = isset($_GET['cPath']) ? $_GET['cPath'] : '';
if (strlen($cPath) > 0) {
$cPath_array = explode('_', $cPath);
$current_category_id = $cPath_array[(sizeof($cPath_array)-1)];
} else {
ca. Zeile 435
// default open navigation box
if (!isset($_SESSION['selected_box'])) {
$_SESSION['selected_box'] = 'configuration';
}
if (isset($_GET['selected_box'])) {
$_SESSION['selected_box'] = xtc_db_prepare_input($_GET['selected_box']);
} else if(!empty($_GET['selected_box'])) {
$_SESSION['selected_box'] = $_GET['selected_box'];
}
// the following cache blocks are used in the Tools->Cache section
// ('language' in the filename is automatically replaced by available languages)
$cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true),
array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true),
array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true)
);
$cache_blocks = array (array ('title' => TEXT_CACHE_CATEGORIES,
'code' => 'categories',
'file' => 'categories_box-language.cache',
'multiple' => true),
array ('title' => TEXT_CACHE_MANUFACTURERS,
'code' => 'manufacturers',
'file' => 'manufacturers_box-language.cache',
'multiple' => true),
array ('title' => TEXT_CACHE_ALSO_PURCHASED,
'code' => 'also_purchased',
'file' => 'also_purchased-language.cache',
'multiple' => true));
// check if a default currency is set
if (!defined('DEFAULT_CURRENCY')) {
$messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');
ca. Zeile 471
if (xtc_check_permission($pagename) == '0') {
xtc_redirect(xtc_href_link(FILENAME_LOGIN));
}
// Include Template Engine
// BOF - Tomcraft - 2009-05-26 - update smarty template engine to 2.6.26
// require(DIR_FS_CATALOG.DIR_WS_CLASSES . 'Smarty_2.6.22/Smarty.class.php');
require(DIR_FS_CATALOG.DIR_WS_CLASSES . 'Smarty_2.6.26/Smarty.class.php');
// EOF - Tomcraft - 2009-05-26 - update smarty template engine to 2.6.26
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
// xs:booster
define('FILENAME_XTBOOSTER','xtbooster.php');
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
?>
admin/includes/classes/box.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: box.php 950 2005-05-14 16:45:21Z mz $
$Id: box.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
ca. Zeile 23
$contents = array();
$contents[] = array('text' => SOME_TEXT);
$box = new box;
echo $box->infoBox($heading, $contents);
echo box::infoBoxSt($heading, $contents);
--------------------------------------------------------------
*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
class box extends tableBlock {
function box() {
$this->heading = array();
$this->contents = array();
}
private static $heading = array ();
private static $contents = array ();
function infoBox($heading, $contents) {
$this->table_row_parameters = 'class="infoBoxHeading"';
$this->table_data_parameters = 'class="infoBoxHeading"';
$this->heading = $this->tableBlock($heading);
// cYbercOsmOnauT - 2011-02-07 - Fallback method for old calls
public function infoBox($heading, $contents) {
return self::infoBoxSt($heading, $contents);
}
$this->table_row_parameters = '';
$this->table_data_parameters = 'class="infoBoxContent"';
$this->contents = $this->tableBlock($contents);
public static function infoBoxSt($heading, $contents) {
// Clean old values
self::$heading = array ();
self::$contents = array ();
self::$table_row_parameters = 'class="infoBoxHeading"';
self::$table_data_parameters = 'class="infoBoxHeading"';
self::$heading = parent::constructor($heading);
self::$table_row_parameters = '';
self::$table_data_parameters = 'class="infoBoxContent"';
self::$contents = parent::constructor($contents);
return $this->heading . $this->contents;
return self::$heading . self::$contents;
}
function menuBox($heading, $contents) {
$this->table_data_parameters = 'class="menuBoxHeading"';
public static function menuBox($heading, $contents) {
self::$table_data_parameters = 'class="menuBoxHeading"';
if (isset($heading[0]['link'])) {
$this->table_data_parameters .= ' onmouseover="this.style.cursor=\'pointer\'" onclick="document.location.href=\'' . $heading[0]['link'] . '\'"';
self::$table_data_parameters .= ' onmouseover="this.style.cursor=\'pointer\'" onclick="document.location.href=\'' . $heading[0]['link'] . '\'"';
$heading[0]['text'] = ' <a href="' . $heading[0]['link'] . '" class="menuBoxHeadingLink">' . $heading[0]['text'] . '</a> ';
} else {
}
else {
$heading[0]['text'] = ' ' . $heading[0]['text'] . ' ';
}
$this->heading = $this->tableBlock($heading);
self::$heading = parent::constructor($heading);
$this->table_data_parameters = 'class="menuBoxContent"';
$this->contents = $this->tableBlock($contents);
self::$table_data_parameters = 'class="menuBoxContent"';
self::$contents = parent::constructor($contents);
return $this->heading . $this->contents;
return self::$heading . self::$contents;
}
}
?>
admin/includes/classes/categories.phpTop ca. Zeile 217
SET categories_image = ''
WHERE categories_id = '".(int) $categories_id."'");
}
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, xtc_get_path($categories_id).'&cID='.$categories_id)); //web28 2012-04-14 new redirect
} // insert_category ends
// ----------------------------------------------------------------------------------------------------- //
ca. Zeile 326
}
//copy descriptions
while ($cdcopy_values = xtc_db_fetch_array($cdcopy_query)) {
xtDBquery("INSERT INTO ".TABLE_CATEGORIES_DESCRIPTION." (categories_id, language_id, categories_name, categories_heading_title, categories_description, categories_meta_title, categories_meta_description, categories_meta_keywords) VALUES ('".$new_cat_id."' , '".$cdcopy_values['language_id']."' , '".addslashes($cdcopy_values['categories_name'])."' , '".addslashes($cdcopy_values['categories_heading_title'])."' , '".addslashes($cdcopy_values['categories_description'])."' , '".addslashes($cdcopy_values['categories_meta_title'])."' , '".addslashes($cdcopy_values['categories_meta_description'])."' , '".addslashes($cdcopy_values['categories_meta_keywords'])."')");
xtDBquery("INSERT INTO ".TABLE_CATEGORIES_DESCRIPTION." (categories_id,
language_id,
categories_name,
categories_heading_title,
categories_description,
categories_meta_title,
categories_meta_description,
categories_meta_keywords
) VALUES (
'".$new_cat_id."' ,
'".$cdcopy_values['language_id']."' ,
'".addslashes($cdcopy_values['categories_name'])."' ,
'".addslashes($cdcopy_values['categories_heading_title'])."' ,
'".addslashes($cdcopy_values['categories_description'])."' ,
'".addslashes($cdcopy_values['categories_meta_title'])."' ,
'".addslashes($cdcopy_values['categories_meta_description'])."' ,
'".addslashes($cdcopy_values['categories_meta_keywords'])."'
)");
}
//get child categories of current category
$crcopy_query = xtDBquery("SELECT categories_id FROM ".TABLE_CATEGORIES." WHERE parent_id = '".$src_category_id."'");
ca. Zeile 392
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_IMAGES." WHERE products_id = '".xtc_db_input($product_id)."'");
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_TO_CATEGORIES." WHERE products_id = '".xtc_db_input($product_id)."'");
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_DESCRIPTION." WHERE products_id = '".xtc_db_input($product_id)."'");
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id = '".xtc_db_input($product_id)."'");
//BOF - GTB - 2010-09-15 - delete also Products with attribs
xtc_db_query("DELETE FROM " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . xtc_db_input($product_id) . "' OR products_id LIKE '" . xtc_db_input($product_id) . "{%'");
xtc_db_query("DELETE FROM " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . xtc_db_input($product_id) . "' OR products_id LIKE '" . xtc_db_input($product_id) . "{%'");
//xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_BASKET." WHERE products_id = '".xtc_db_input($product_id)."'");
//xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_BASKET_ATTRIBUTES." WHERE products_id = '".xtc_db_input($product_id)."'");
//EOF - GTB - 2010-09-15 - delete also Products with attribs
//BOF - Dokuman - 2009-11-04 - fix typo customers_status_array -> customers_statuses_array
//$customers_status_array = xtc_get_customers_statuses();
//for ($i = 0, $n = sizeof($customers_status_array); $i < $n; $i ++) {
xtc_db_query("DELETE FROM " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . xtc_db_input($product_id) . "' OR products_id LIKE '" . xtc_db_input($product_id) . "{%'"); //GTB - 2010-09-15 - delete also Products with attribs
xtc_db_query("DELETE FROM " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . xtc_db_input($product_id) . "' OR products_id LIKE '" . xtc_db_input($product_id) . "{%'"); //GTB - 2010-09-15 - delete also Products with attribs
$customers_statuses_array = xtc_get_customers_statuses();
for ($i = 0, $n = sizeof($customers_statuses_array); $i < $n; $i ++) {
//EOF - Dokuman - 2009-11-04 - fix typo customers_status_array -> customers_statuses_array
if (isset($customers_statuses_array[$i]['id']))
xtc_db_query("delete from personal_offers_by_customers_status_".$customers_statuses_array[$i]['id']." where products_id = '".xtc_db_input($product_id)."'");
}
ca. Zeile 470
$products_status = xtc_db_prepare_input($products_data['products_status']);
}
if ($products_data['products_startpage'] == 0 ) {
//BOF - Dokuman - 2009-11-12 - BUGFIX #0000351: When products disable display on startpage, should update table products_to_categories
$this->set_product_remove_startpage_sql($products_data['products_id'], 0);
//EOF - Dokuman - 2009-11-12 - BUGFIX #0000351: When products disable display on startpage, should update table products_to_categories
$this->set_product_remove_startpage_sql($products_data['products_id'], 0); //Dokuman - 2009-11-12 - BUGFIX #0000351: When products disable display on startpage, should update table products_to_categories
$products_status = xtc_db_prepare_input($products_data['products_status']);
}
if (PRICE_IS_BRUTTO == 'true' && $products_data['products_price']) {
ca. Zeile 516
$permission_array = array_merge($permission_array, array ('group_permission_'.$customers_statuses_array[$i]['id'] => $permission[$customers_statuses_array[$i]['id']]));
}
}
//
$sql_data_array = array ('products_quantity' => xtc_db_prepare_input($products_data['products_quantity']), 'products_model' => xtc_db_prepare_input($products_data['products_model']), 'products_ean' => xtc_db_prepare_input($products_data['products_ean']), 'products_price' => xtc_db_prepare_input($products_data['products_price']), 'products_sort' => xtc_db_prepare_input($products_data['products_sort']), 'products_shippingtime' => xtc_db_prepare_input($products_data['shipping_status']), 'products_discount_allowed' => xtc_db_prepare_input($products_data['products_discount_allowed']), 'products_date_available' => $products_date_available, 'products_weight' => xtc_db_prepare_input($products_data['products_weight']), 'products_status' => $products_status, 'products_startpage' => xtc_db_prepare_input($products_data['products_startpage']), 'products_startpage_sort' => xtc_db_prepare_input($products_data['products_startpage_sort']), 'products_tax_class_id' => xtc_db_prepare_input($products_data['products_tax_class_id']), 'product_template' => xtc_db_prepare_input($products_data['info_template']), 'options_template' => xtc_db_prepare_input($products_data['options_template']), 'manufacturers_id' => xtc_db_prepare_input($products_data['manufacturers_id']), 'products_fsk18' => xtc_db_prepare_input($products_data['fsk18']), 'products_vpe_value' => xtc_db_prepare_input($products_data['products_vpe_value']), 'products_vpe_status' => xtc_db_prepare_input($products_data['products_vpe_status']), 'products_vpe' => xtc_db_prepare_input($products_data['products_vpe']));
$sql_data_array = array ('products_quantity' => xtc_db_prepare_input($products_data['products_quantity']),
'products_model' => xtc_db_prepare_input($products_data['products_model']),
'products_ean' => xtc_db_prepare_input($products_data['products_ean']),
'products_price' => xtc_db_prepare_input($products_data['products_price']),
'products_sort' => xtc_db_prepare_input($products_data['products_sort']),
'products_shippingtime' => xtc_db_prepare_input($products_data['shipping_status']),
'products_discount_allowed' => xtc_db_prepare_input($products_data['products_discount_allowed']),
'products_date_available' => $products_date_available,
'products_weight' => xtc_db_prepare_input($products_data['products_weight']),
'products_status' => $products_status,
'products_startpage' => xtc_db_prepare_input($products_data['products_startpage']),
'products_startpage_sort' => xtc_db_prepare_input($products_data['products_startpage_sort']),
'products_tax_class_id' => xtc_db_prepare_input($products_data['products_tax_class_id']),
'product_template' => xtc_db_prepare_input($products_data['info_template']),
'options_template' => xtc_db_prepare_input($products_data['options_template']),
'manufacturers_id' => xtc_db_prepare_input($products_data['manufacturers_id']),
'products_fsk18' => xtc_db_prepare_input($products_data['fsk18']),
'products_vpe_value' => xtc_db_prepare_input($products_data['products_vpe_value']),
'products_vpe_status' => xtc_db_prepare_input($products_data['products_vpe_status']),
'products_vpe' => xtc_db_prepare_input($products_data['products_vpe'])
);
$sql_data_array = array_merge($sql_data_array, $permission_array);
//get the next ai-value from table products if no products_id is set
if (!$products_id || $products_id == '') {
$new_pid_query = xtc_db_query("SHOW TABLE STATUS LIKE '".TABLE_PRODUCTS."'");
ca. Zeile 565
WHERE products_image = '".$products_data['del_pic']."'");
$dup_check = xtc_db_fetch_array($dup_check_query);
if ($dup_check['total'] < 2)
@ xtc_del_image_file($products_data['del_pic']);
//BOF - DokuMan - 2010-09-17 - ticket #66: noimg.gif is not shown if product image is deleted
//xtc_db_query("UPDATE ".TABLE_PRODUCTS."
// SET products_image = ''
// WHERE products_id = '".xtc_db_input($products_id)."'");
xtc_db_query("UPDATE ".TABLE_PRODUCTS."
SET products_image = NULL
WHERE products_id = '".xtc_db_input($products_id)."'");
//EOF - DokuMan - 2010-09-17 - ticket #66: noimg.gif is not shown if product image is deleted
}
if ($products_data['del_mo_pic'] != '') {
foreach ($products_data['del_mo_pic'] AS $dummy => $val) {
ca. Zeile 641
$products_id = xtc_db_insert_id();
xtc_db_query("INSERT INTO ".TABLE_PRODUCTS_TO_CATEGORIES."
SET products_id = '".$products_id."',
categories_id = '".$dest_category_id."'");
// web28 - 2012-03-11 - link product to startpage
if ($products_data['products_startpage'] == 1 ) {
xtc_db_query("INSERT INTO ".TABLE_PRODUCTS_TO_CATEGORIES."
SET products_id = '".$products_id."',
categories_id = '0'");
}
}
elseif ($action == 'update') {
$update_sql_data = array ('products_last_modified' => 'now()');
$sql_data_array = xtc_array_merge($sql_data_array, $update_sql_data);
xtc_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', 'products_id = \''.xtc_db_input($products_id).'\'');
}
// BOF - Tomcraft - 2009-11-06 - Included specials
//Included specials
if (file_exists("includes/modules/categories_specials.php")) {
require_once("includes/modules/categories_specials.php");
saveSpecialsData($products_id);
}
// EOF - Tomcraft - 2009-11-06 - Included specials
$languages = xtc_get_languages();
// Here we go, lets write Group prices into db
// start
ca. Zeile 766
xtc_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', 'products_id = \''.xtc_db_input($products_id).'\' and language_id = \''.$language_id.'\'');
}
}
//BOF - web28- 2010-08-20 - add redirect by update button
//redirect by update button
if(isset($products_data['prod_update'])) {
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath='.$_GET['cPath'].'&action=new_product&pID='.$products_id));
}
//EOF - web28- 2010-08-20 - add redirect by update button
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, xtc_get_path($dest_categories_id).'&pID='.$products_id)); //web28 2012-04-14 new redirect
} // insert_product ends
// ----------------------------------------------------------------------------------------------------- //
ca. Zeile 787
$product = xtc_db_fetch_array($product_query);
if ($dest_categories_id == 0) { $startpage = 1; $products_status = 1; } else { $startpage= 0; $products_status = $product['products_status'];}
//BOF - Dokuman - 2009-08-19 BUGFIX: Verpackungseinheit (VPE) wird bei Kategorien/Artikeln nicht mitkopiert
/*
$sql_data_array=array('products_quantity'=>$product['products_quantity'],
'products_model'=>$product['products_model'],
'products_ean'=>$product['products_ean'],
'products_shippingtime'=>$product['products_shippingtime'],
'products_sort'=>$product['products_sort'],
'products_startpage'=>$startpage,
'products_sort'=>$product['products_sort'],
'products_price'=>$product['products_price'],
'products_discount_allowed'=>$product['products_discount_allowed'],
'products_date_added'=>'now()',
'products_date_available'=>$product['products_date_available'],
'products_weight'=>$product['products_weight'],
'products_status'=>$products_status,
'products_tax_class_id'=>$product['products_tax_class_id'],
'manufacturers_id'=>$product['manufacturers_id'],
'product_template'=>$product['product_template'],
'options_template'=>$product['options_template'],
'products_fsk18'=>$product['products_fsk18'],
);
*/
$sql_data_array=array('products_quantity'=>$product['products_quantity'],
'products_model'=>$product['products_model'],
'products_ean'=>$product['products_ean'],
'products_shippingtime'=>$product['products_shippingtime'],
ca. Zeile 831
'products_vpe'=>$product['products_vpe'],
'products_vpe_value'=>$product['products_vpe_value'],
'products_vpe_status'=>$product['products_vpe_status']
);
//EOF - Dokuman - 2009-08-19 BUGFIX: Verpackungseinheit (VPE) wird bei Kategorien/Artikeln nicht mitkopiert
$customers_statuses_array = xtc_get_customers_statuses();
for ($i = 0; $n = sizeof($customers_statuses_array), $i < $n; $i ++) {
admin/includes/classes/image_manipulator_GD1.phpTop ca. Zeile 42
$this->i = $this->h[0];
$this->j = $this->h[1];
$this->k = $this->h[2];
//BOF -web28- 2011-03-27 - OPTION DO NOT ENLARGE SMALL PICTURES
//if(PRODUCT_IMAGE_NO_ENLARGE_UNDER_DEFAULT == 'false'){
if($this->i < $this->m) {$this->m = $this->i;}
if($this->j < $this->n) {$this->n = $this->j;}
//}
//EOF -web28- 2011-03-27 - OPTION DO NOT ENLARGE SMALL PICTURES
$this->o = ($this->i / $this->m);
$this->p = ($this->j / $this->n);
$this->q = ($this->o > $this->p) ? $this->m : round($this->i / $this->p); // width
$this->r = ($this->o > $this->p) ? round($this->j / $this->o) : $this->n; // height
admin/includes/classes/image_manipulator_GD2.phpTop ca. Zeile 42
$this->i = $this->h[0];
$this->j = $this->h[1];
$this->k = $this->h[2];
//BOF -web28- 2011-03-27 - OPTION DO NOT ENLARGE SMALL PICTURES
//if(PRODUCT_IMAGE_NO_ENLARGE_UNDER_DEFAULT == 'false'){
if($this->i < $this->m) {$this->m = $this->i;}
if($this->j < $this->n) {$this->n = $this->j;}
//}
//EOF -web28- 2011-03-27 - OPTION DO NOT ENLARGE SMALL PICTURES
if($this->m == '0'){
$this->z = ($this->j / $this->n);
$this->m = ($this->i / $this->z);
}
admin/includes/classes/language.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: language.php 1760 2011-02-03 08:39:01Z franky-n-xtcm $
$Id: language.php 2800 2012-04-28 11:51:51Z web28 $
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
ca. Zeile 66
'zh-tw' => array('zh[-_]tw|chinese traditional', 'chinese_big5', 'zh-TW'),
'zh' => array('zh|chinese simplified', 'chinese_gb', 'zh'));
$this->catalog_languages = array();
//BOF - web28 - 2010-08-19 - added status
$languages_query = xtc_db_query("select languages_id, name, code, image, directory, status from " . TABLE_LANGUAGES . " order by sort_order");
$languages_query = xtc_db_query("SELECT * FROM " . TABLE_LANGUAGES . " ORDER BY sort_order");
while ($languages = xtc_db_fetch_array($languages_query)) {
$this->catalog_languages[$languages['code']] = array('id' => $languages['languages_id'],
'name' => $languages['name'],
'image' => $languages['image'],
'status' => $languages['status'],
'code' => $languages['code'], //web28 - 2010-09-05 - add $languages['code']
'language_charset' => $languages['language_charset'], //web28 - 2012-04-29 - add $languages['language_charset']
'directory' => $languages['directory']);
}
//EOF - web28 - 2010-08-19 - added status
$this->browser_languages = '';
$this->language = '';
if ( (!empty($lng)) && (isset($this->catalog_languages[$lng])) ) {
$this->language = $this->catalog_languages[$lng];
ca. Zeile 91
//BOF - DokuMan - 2010-08-04 - use $_SERVER here for better windows environment compatiblity
//$this->browser_languages = explode(',', getenv('HTTP_ACCEPT_LANGUAGE'));
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$this->browser_languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
//BOF - DokuMan - 2010-08-04 - use $_SERVER here for better windows environment compatiblity
for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
//EOF - DokuMan - 2010-08-04 - use $_SERVER here for better windows environment compatiblity
//BOF - DokuMan - 2011-12-19 - precount for performance
//for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
$n=sizeof($this->browser_languages);
for ($i=0; $i<$n; $i++) {
//EOF - DokuMan - 2011-12-19 - precount for performance
reset($this->languages);
while (list($key, $value) = each($this->languages)) {
if (preg_match('/^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { // Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
$this->language = $this->catalog_languages[$key];
admin/includes/classes/order.phpTop ca. Zeile 49
");
$order = xtc_db_fetch_array($order_query);
$totals_query = xtc_db_query("SELECT title, text, value
$totals_query = xtc_db_query("SELECT title,
text,
value
FROM " . TABLE_ORDERS_TOTAL . "
WHERE orders_id = '" . xtc_db_input($order_id) . "'
ORDER BY sort_order
");
ca. Zeile 61
'value' => $totals['value'],
'text' => $totals['text']);
}
$this->info = array('currency' => $order['currency'],
$order['order_id'] = $order_id;
$this->info = array('order_id' => $order['order_id'], //DokuMan - 2011-08-31 - fix order_id assignment
'currency' => $order['currency'],
'currency_value' => $order['currency_value'],
'payment_method' => $order['payment_method'],
'payment_class' => $order['payment_class'],
'shipping_class' => $order['shipping_class'],
ca. Zeile 82
'orders_status' => $order['orders_status'],
'last_modified' => $order['last_modified']);
$this->customer = array('id' => $order['customers_id'], //web28 - 2011-10-11 - fix gender in email
'customers_status' => $order['customers_status'], //web28 - 2011-10-11 - add customers_status
'name' => $order['customers_name'],
'lastname' => $order['customers_lastname'],
'firstname' => $order['customers_firstname'],
'company' => $order['customers_company'],
'csID' => $order['customers_cid'],
'vat_id' => $order['customers_vat_id'],
'shop_id' => $order['shop_id'],
//'shop_id' => $order['shop_id'], //DokuMan - 2011-12-08 - shop_id does not exist?
'ID' => $order['customers_id'],
'cIP' => $order['customers_ip'],
'street_address' => $order['customers_street_address'],
'suburb' => $order['customers_suburb'],
ca. Zeile 119
//EOF - web28 - 2010-06-10 - PayPal IPN Modul Email send by admin
'format_id' => $order['delivery_address_format_id']);
$this->billing = array('name' => $order['billing_name'],
//BOF - web28 - 2010-06-10 - PayPal IPN Modul Email send by admin
'firstname' => $order['delivery_firstname'],
'lastname' => $order['delivery_lastname'],
//BOF - web28 - 2010-06-10 - PayPal IPN Modul Email send by admin //DokuMan - 2011-11-18 - from SP1b
'firstname' => $order['billing_firstname'],
'lastname' => $order['billing_lastname'],
//EOF - web28 - 2010-06-10 - PayPal IPN Modul Email send by admin
'company' => $order['billing_company'],
'street_address' => $order['billing_street_address'],
'suburb' => $order['billing_suburb'],
ca. Zeile 133
'country' => $order['billing_country'],
'format_id' => $order['billing_address_format_id']);
$index = 0;
$orders_products_query = xtc_db_query("SELECT orders_products_id,products_id, products_name,
products_model, products_price, products_tax,
products_quantity, final_price,allow_tax, products_discount_made
$orders_products_query = xtc_db_query("SELECT orders_products_id,
products_id,
products_name,
products_model,
products_price,
products_tax,
products_quantity,
final_price,
allow_tax,
products_discount_made
FROM ".TABLE_ORDERS_PRODUCTS."
WHERE orders_id ='".xtc_db_input($order_id)."'
");
ca. Zeile 153
'final_price' => $orders_products['final_price'],
'allow_tax' => $orders_products['allow_tax']);
$subindex = 0;
$attributes_query = xtc_db_query("SELECT products_options, products_options_values,
options_values_price, price_prefix
$attributes_query = xtc_db_query("SELECT products_options,
products_options_values,
options_values_price,
price_prefix
FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
WHERE orders_id = '" . xtc_db_input($order_id) . "'
and orders_products_id = '" . $orders_products['orders_products_id'] . "'
AND orders_products_id = '" . $orders_products['orders_products_id'] . "'
");
if (xtc_db_num_rows($attributes_query)) {
while ($attributes = xtc_db_fetch_array($attributes_query)) {
ca. Zeile 174
}
$index++;
}
}
//BOF - web28 - 2010-03-20 - Send ORDER BY Admin
//BOF - web28 - 2010-03-20 - Send Order by Admin
function getOrderData($oID) {
global $xtPrice;
require_once(DIR_FS_INC . 'xtc_get_attributes_model.inc.php');
$order_query = "SELECT products_id,
orders_products_id,
ca. Zeile 185
orders_products_id,
products_model,
products_name,
final_price,
products_tax,
products_shipping_time,
products_quantity
FROM ".TABLE_ORDERS_PRODUCTS."
WHERE orders_id='".(int) $oID."'";
ca. Zeile 215
'PRODUCTS_ATTRIBUTES' => $attributes_data,
'PRODUCTS_ATTRIBUTES_MODEL' => $attributes_model,
'PRODUCTS_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price'], true),
'PRODUCTS_SINGLE_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price']/$order_data_values['products_quantity'], true),
'PRODUCTS_TAX' => ($order_data_values['products_tax'] > 0.00) ? number_format($order_data_values['products_tax'], TAX_DECIMAL_PLACES):0,
'PRODUCTS_QTY' => $order_data_values['products_quantity']
);
}
return $order_data;
}
function getTotalData($oID) {
global $xtPrice,$db;
ca. Zeile 226
}
function getTotalData($oID) {
global $xtPrice,$db;
// get order_total data
$order_total_query = "SELECT title, text, class,
value, sort_order
$order_total_query = "SELECT title,
text,
class,
value,
sort_order
FROM ".TABLE_ORDERS_TOTAL."
WHERE orders_id='".(int) $oID."'
ORDER BY sort_order ASC";
$order_total = array ();
$order_total_query = xtc_db_query($order_total_query);
while ($order_total_values = xtc_db_fetch_array($order_total_query)) {
$order_total[] = array (
'TITLE' => $order_total_values['title'],
while ($order_total_values = xtc_db_fetch_array($order_total_query)) {
$order_total[] = array ('TITLE' => $order_total_values['title'],
'CLASS' => $order_total_values['class'],
'VALUE' => $order_total_values['value'],
'TEXT' => $order_total_values['text']
);
ca. Zeile 255
}
//EOF - web28 - 2010-06-10 - PayPal IPN Modul Email send by admin
}
//BOF - web28 - 2010-06-10 - PayPal IPN Modul Email send by admin
return array('data' => $order_total,
'total' => $total,
'shipping' => $shipping
'shipping' => $shipping //web28 - 2010-06-10 - PayPal IPN Modul Email send by admin
);
//EOF - web28 - 2010-06-10 - PayPal IPN Modul Email send by admin
}
//BOF - web28 - 2010-03-20 - Send ORDER BY Admin
//BOF - web28 - 2010-03-20 - Send Order by Admin
}
?>
admin/includes/classes/phplot.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: phplot.php 950 2005-05-14 16:45:21Z mz $
$Id: phplot.php 1927 2011-05-10 10:51:11Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(phplot.php,v 1.1 2002/05/07); www.oscommerce.com
(c) 2003 nextcommerce (phplot.php,v 1.4 2003/08/14); www.nextcommerce.org
(c) 2006 xt-commerce (phplot.php 950 2005-05-14)
Released under the GNU General Public License
PHPLOT 4.4.6 Copyright (c) 1998-2001 Afan Ottenheimer
ca. Zeile 173
//BEGIN CODE
//////////////////////////////////////////////////////
//Constructor: Setup Img pointer, Colors and Size of Image
function PHPlot($which_width=600,$which_height=400,$which_output_file="",$which_input_file="") {
$this->SetRGBArray('2');
$this->background_done = 0; //Set to 1 after background image first drawn
if ($which_output_file != "") { $this->SetOutputFile($which_output_file); };
if ($which_output_file != "") {
$this->SetOutputFile($which_output_file);
}
if ($which_input_file != "") {
$this->SetInputFile($which_input_file) ;
} else {
$this->SetImageArea($which_width, $which_height);
ca. Zeile 266
function SetLegendWorld($which_x,$which_y,$which_type='') {
//which_type not yet used
//Must be called after scales are set up.
if ($this->scale_is_set != 1) { $this->SetTranslation(); };
if ($this->scale_is_set != 1) {
$this->SetTranslation();
}
$this->legend_x_pos = $this->xtr($which_x);
$this->legend_y_pos = $this->ytr($which_y);
return true;
}
ca. Zeile 630
function DrawXLabel() {
if ($this->use_ttf == 1) {
$xpos = $this->xtr(($this->plot_max_x + $this->plot_min_x)/2.0) ;
$ypos = $this->ytr($this->plot_min_y) + $this->x_label_height/2.0;
$this->DrawText($this->x_label_ttffont, $this->x_label_angle,
$xpos, $ypos, $this->ndx_label_color, $this->x_label_ttffont_size, $this->x_label_txt,'center');
$this->DrawText($this->x_label_ttffont,
$this->x_label_angle,
$xpos, $ypos, $this->ndx_label_color,
$this->x_label_ttffont_size,
$this->x_label_txt,'center');
} else {
//$xpos = 0.0 - (ImageFontWidth($this->small_font)*strlen($this->x_label_txt)/2.0) + $this->xtr(($this->plot_max_x+$this->plot_min_x)/2.0) ;
$xpos = 0.0 + $this->xtr(($this->plot_max_x+$this->plot_min_x)/2.0) ;
$ypos = ($this->ytr($this->plot_min_y) + $this->x_label_height/2);
$this->DrawText($this->small_font, $this->x_label_angle,
$xpos, $ypos, $this->ndx_label_color, "", $this->x_label_txt, 'center');
$this->DrawText($this->small_font,
$this->x_label_angle,
$xpos, $ypos,
$this->ndx_label_color,
"",
$this->x_label_txt, 'center');
}
return true;
}
ca. Zeile 649
if ($this->use_ttf == 1) {
$size = $this->TTFBBoxSize($this->y_label_ttffont_size, 90, $this->y_label_ttffont, $this->y_label_txt);
$xpos = 8 + $size[0];
$ypos = ($size[1])/2 + $this->ytr(($this->plot_max_y + $this->plot_min_y)/2.0) ;
$this->DrawText($this->y_label_ttffont, 90,
$xpos, $ypos, $this->ndx_label_color, $this->y_label_ttffont_size, $this->y_label_txt);
$this->DrawText($this->y_label_ttffont,
90,
$xpos, $ypos,
$this->ndx_label_color,
$this->y_label_ttffont_size,
$this->y_label_txt);
} else {
$xpos = 8;
$ypos = (($this->small_font_width*strlen($this->y_label_txt)/2.0) +
$this->ytr(($this->plot_max_y + $this->plot_min_y)/2.0) );
$this->DrawText($this->small_font, 90,
$xpos, $ypos, $this->ndx_label_color, $this->y_label_ttffont_size, $this->y_label_txt);
$this->DrawText($this->small_font,
90,
$xpos, $ypos,
$this->ndx_label_color,
$this->y_label_ttffont_size,
$this->y_label_txt);
}
return true;
}
ca. Zeile 662
return true;
}
function DrawText($which_font,$which_angle,$which_xpos,$which_ypos,$which_color,$which_size,$which_text,$which_halign='left',$which_valign='') {
if ($this->use_ttf == 1 ) {
$size = $this->TTFBBoxSize($which_size, $which_angle, $which_font, $which_text);
if ($which_valign == 'bottom') {
$which_ypos = $which_ypos + ImageFontHeight($which_font);
$which_ypos = $which_ypos + ImageFontHeight((int)$which_font);
}
if ($which_halign == 'center') {
$which_xpos = $which_xpos - $size[0]/2;
}
ImageTTFText($this->img, $which_size, $which_angle,
$which_xpos, $which_ypos, $which_color, $which_font, $which_text);
} else {
if ($which_valign == 'top') {
$which_ypos = $which_ypos - ImageFontHeight($which_font);
$which_ypos = $which_ypos - ImageFontHeight((int)$which_font);
}
$which_text = preg_replace("/\r/","",$which_text); // Hetfield - 2009-08-18 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
$str = explode("\n",$which_text); //multiple lines submitted by Remi Ricard // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3
$height = ImageFontHeight($which_font);
$width = ImageFontWidth($which_font);
$height = ImageFontHeight((int)$which_font);
$width = ImageFontWidth((int)$which_font);
if ($which_angle == 90) { //Vertical Code Submitted by Marlin Viss
for($i=0;$i<count($str);$i++) {
ImageStringUp($this->img, $which_font, ($i*$height + $which_xpos), $which_ypos, $str[$i], $which_color);
}
} else {
for($i=0;$i<count($str);$i++) {
if ($which_halign == 'center') {
$xpos = $which_xpos - strlen($str[$i]) * $width/2;
ImageString($this->img, $which_font, $xpos, ($i*$height + $which_ypos), $str[$i], $which_color);
ImageString($this->img, (int)$which_font, $xpos, ($i*$height + $which_ypos), $str[$i], $which_color);
} else {
ImageString($this->img, $which_font, $which_xpos, ($i*$height + $which_ypos), $str[$i], $which_color);
ImageString($this->img, (int)$which_font, $which_xpos, ($i*$height + $which_ypos), $str[$i], $which_color);
}
}
}
}
return true;
}
function DrawTitle() {
if ($this->use_ttf == 1 ) {
$xpos = ($this->plot_area[0] + $this->plot_area_width / 2);
ca. Zeile 709
$xpos, $ypos, $this->ndx_title_color, $this->title_ttffont_size, $this->title_txt,'center');
} else {
$xpos = ($this->plot_area[0] + $this->plot_area_width / 2);
$ypos = ImageFontHeight($this->title_font);
$this->DrawText($this->title_font, $this->title_angle,
$xpos, $ypos, $this->ndx_title_color, '', $this->title_txt,'center');
$this->DrawText($this->title_font,
$this->title_angle,
$xpos, $ypos,
$this->ndx_title_color,
'',
$this->title_txt,'center');
}
return true;
}
function DrawPlotAreaBackground() {
ImageFilledRectangle($this->img,$this->plot_area[0],
ca. Zeile 718
}
function DrawPlotAreaBackground() {
ImageFilledRectangle($this->img,$this->plot_area[0],
$this->plot_area[1],$this->plot_area[2],$this->plot_area[3],
$this->plot_area[1],
$this->plot_area[2],$this->plot_area[3],
$this->ndx_plot_bg_color);
}
function SetBackgroundColor($which_color) {
ca. Zeile 1008
}
if ($x2 && $y2) {
$this->plot_area = array($x1,$y1,$x2,$y2);
} else {
$this->plot_area = array($this->x_left_margin, $this->y_top_margin,
$this->plot_area = array($this->x_left_margin,
$this->y_top_margin,
$this->image_width - $this->x_right_margin,
$this->image_height - $this->y_bot_margin
);
}
ca. Zeile 1087
function DrawError($error_message) {
// prints the error message inline into
// the generated image
if (($this->img) == "") { $this->InitImage(); } ;
if (($this->img) == "") {
$this->InitImage();
}
$ypos = $this->image_height/2;
if ($this->use_ttf == 1) {
ImageRectangle($this->img, 0,0,$this->image_width,$this->image_height,ImageColorAllocate($this->img,255,255,255));
ImageTTFText($this->img, $this->small_ttffont_size, 0, $xpos, $ypos, ImageColorAllocate($this->img,0,0,0), $this->axis_ttffont, $error_message);
} else {
ca. Zeile 1226
}
function SetDataType($which_dt) {
//The next three lines are for past compatibility.
if ($which_dt == "text-linear") { $which_dt = "text-data"; };
if ($which_dt == "linear-linear") { $which_dt = "data-data"; };
if ($which_dt == "linear-linear-error") { $which_dt = "data-data-error"; };
if ($which_dt == "text-linear") {
$which_dt = "text-data";
}
if ($which_dt == "linear-linear") {
$which_dt = "data-data";
}
if ($which_dt == "linear-linear-error") {
$which_dt = "data-data-error";
}
$this->data_type = $which_dt; //text-data, data-data, data-data-error
return true;
}
ca. Zeile 1247
//User Defined Array
$this->rgb_array = $which_color_array;
return true;
} elseif ($which_color_array == 2) { //Use the small predefined color array
$this->rgb_array = array(
"white" => array(255, 255, 255),
$this->rgb_array = array("white" => array(255, 255, 255),
"snow" => array(255, 250, 250),
"PeachPuff" => array(255, 218, 185),
"ivory" => array(255, 255, 240),
"lavender" => array(230, 230, 250),
ca. Zeile 1322
}
function SetRgbColor($color_asked) {
//Returns an array in R,G,B format 0-255
if ($color_asked == "") { $color_asked = array(0,0,0); };
if ($color_asked == "") {
$color_asked = array(0,0,0);
}
if ( count($color_asked) == 3 ) { //already array of 3 rgb
$ret_val = $color_asked;
} else { // is asking for a color by string
if(substr($color_asked,0,1) == "#") { //asking in #FFFFFF format.
ca. Zeile 1395
}
return false;
} //function SetErrorBarColors
function DrawPlotBorder() {
switch ($this->plot_border_type) {
case "left" :
ImageLine($this->img, $this->plot_area[0],$this->ytr($this->plot_min_y),
$this->plot_area[0],$this->ytr($this->plot_max_y),$this->ndx_grid_color);
ImageLine($this->img,
$this->plot_area[0],
$this->ytr($this->plot_min_y),
$this->plot_area[0],
$this->ytr($this->plot_max_y),
$this->ndx_grid_color);
break;
case "none":
//Draw No Border
break;
ca. Zeile 1483
$yaxis_x = $this->xtr($this->y_axis_position);
} else {
$yaxis_x = $this->plot_area[0];
}
ImageLine($this->img, $yaxis_x, $this->plot_area[1],
$yaxis_x, $this->plot_area[3], $this->ndx_grid_color);
ImageLine($this->img,
$yaxis_x,
$this->plot_area[1],
$yaxis_x,
$this->plot_area[3],
$this->ndx_grid_color);
//$yaxis_x, $this->plot_area[3], 9);
if ($this->draw_vert_ticks == 1) {
$this->DrawVerticalTicks();
}
} //function DrawYAxis
function DrawXAxis() {
//Draw Tick and Label for Y axis
ca. Zeile 1500
$ylab =$this->FormatYTickLabel($this->x_axis_position);
if ($this->skip_bottom_tick != 1) {
$this->DrawVerticalTick($ylab,$this->x_axis_position);
}
//Draw X Axis at Y=$x_axis_postion
ImageLine($this->img,$this->plot_area[0]+1,$this->ytr($this->x_axis_position),
$this->xtr($this->plot_max_x)-1,$this->ytr($this->x_axis_position),$this->ndx_tick_color);
ImageLine($this->img,
$this->plot_area[0]+1,
$this->ytr($this->x_axis_position),
$this->xtr($this->plot_max_x)-1,
$this->ytr($this->x_axis_position),
$this->ndx_tick_color);
//X Ticks and Labels
if ($this->data_type != 'text-data') { //labels for text-data done at data drawing time for speed.
$this->DrawHorizontalTicks();
}
ca. Zeile 1517
//Ticks and lables are drawn on the left border of PlotArea.
//Left Bottom
ImageLine($this->img,$this->plot_area[0],
$this->plot_area[3]+$this->tick_length,
$this->plot_area[0],$this->plot_area[3],$this->ndx_tick_color);
$this->plot_area[0],
$this->plot_area[3],
$this->ndx_tick_color);
switch ($this->x_grid_label_type) {
case "title":
$xlab = $this->data_values[0][0];
break;
ca. Zeile 1589
$x_pixels = $this->xtr($x_tmp);
//Bottom Tick
ImageLine($this->img,$x_pixels,$this->plot_area[3] + $this->tick_length,
$x_pixels,$this->plot_area[3], $this->ndx_tick_color);
ImageLine($this->img,$x_pixels,
$this->plot_area[3] + $this->tick_length,
$x_pixels,
$this->plot_area[3],
$this->ndx_tick_color);
//Top Tick
//ImageLine($this->img,($this->xtr($this->plot_max_x)+$this->tick_length),
// $y_pixels,$this->xtr($this->plot_max_x)-1,$y_pixels,$this->ndx_tick_color);
if ($this->draw_x_grid == 1) {
ImageLine($this->img,$x_pixels,$this->plot_area[1],
$x_pixels,$this->plot_area[3], $this->ndx_light_grid_color);
ImageLine($this->img,$x_pixels,
$this->plot_area[1],
$x_pixels,$this->plot_area[3],
$this->ndx_light_grid_color);
}
if ($this->x_datalabel_angle == 90) { //Vertical Code Submitted by Marlin Viss
ImageStringUp($this->img, $this->small_font,
( $x_pixels - $this->small_font_height/2),
( $this->small_font_width*strlen($xlab) + $this->plot_area[3] + $this->small_font_height),$xlab, $this->ndx_text_color);
( $this->small_font_width*strlen($xlab) + $this->plot_area[3] + $this->small_font_height),
$xlab,
$this->ndx_text_color);
} else {
ImageString($this->img, $this->small_font,
( $x_pixels - $this->small_font_width*strlen($xlab)/2) ,
( $this->small_font_height + $this->plot_area[3]),$xlab, $this->ndx_text_color);
( $this->small_font_height + $this->plot_area[3]),
$xlab,
$this->ndx_text_color);
}
$i++;
$x_tmp += $delta_x;
}
} // function DrawHorizontalTicks
function FormatYTickLabel($which_ylab) {
switch ($this->y_grid_label_type) {
ca. Zeile 1658
} else {
//Ticks and lables are drawn on the left border of PlotArea.
$yaxis_x = $this->plot_area[0];
}
$y_pixels = $this->ytr($which_ypos);
//Lines Across the Plot Area
if ($this->draw_y_grid == 1) {
ImageLine($this->img,$this->plot_area[0]+1,$y_pixels,
$this->plot_area[2]-1,$y_pixels,$this->ndx_light_grid_color);
ImageLine($this->img,$this->plot_area[0]+1,
$y_pixels,
$this->plot_area[2]-1,
$y_pixels,
$this->ndx_light_grid_color);
}
//Ticks to the Left of the Plot Area
if (($this->vert_tick_position == "plotleft") || ($this->vert_tick_position == "both") ) {
ImageLine($this->img,(-$this->tick_length+$yaxis_x),
$y_pixels,$yaxis_x,
$y_pixels, $this->ndx_tick_color);
ImageLine($this->img,
(-$this->tick_length+$yaxis_x),
$y_pixels,
$yaxis_x,
$y_pixels,
$this->ndx_tick_color);
}
//Ticks to the Right of the Plot Area
if (($this->vert_tick_position == "plotright") || ($this->vert_tick_position == "both") ) {
ImageLine($this->img,($this->plot_area[2]+$this->tick_length),
$y_pixels,$this->plot_area[2],
$y_pixels,$this->ndx_tick_color);
ImageLine($this->img,
($this->plot_area[2]+$this->tick_length),
$y_pixels,
$this->plot_area[2],
$y_pixels,
$this->ndx_tick_color);
}
//Ticks on the Y Axis
if (($this->vert_tick_position == "yaxis") ) {
ImageLine($this->img,($yaxis_x - $this->tick_length),
$y_pixels,$yaxis_x,$y_pixels,$this->ndx_tick_color);
ImageLine($this->img,
($yaxis_x - $this->tick_length),
$y_pixels,
$yaxis_x,
$y_pixels,
$this->ndx_tick_color);
}
//DataLabel
//ajo working
//$this->DrawText($this->y_label_ttffont, 0,($yaxis_x - $this->y_label_width - $this->tick_length/2),
// $y_pixels, $this->ndx_text_color, $this->axis_ttffont_size, $which_ylab);
ImageString($this->img, $this->small_font, ($yaxis_x - $this->y_label_width - $this->tick_length/2),
( -($this->small_font_height/2.0) + $y_pixels),$which_ylab, $this->ndx_text_color);
ImageString($this->img, $this->small_font,
($yaxis_x - $this->y_label_width - $this->tick_length/2),
( -($this->small_font_height/2.0) + $y_pixels),
$which_ylab,
$this->ndx_text_color);
}
function DrawVerticalTicks() {
if ($this->skip_top_tick != 1) { //If tick increment doesn't hit the top
//Left Top
//ImageLine($this->img,(-$this->tick_length+$this->xtr($this->plot_min_x)),
// $this->ytr($this->plot_max_y),$this->xtr($this->plot_min_x),$this->ytr($this->plot_max_y),$this->ndx_tick_color);
ca. Zeile 1702
//Left Top
//ImageLine($this->img,(-$this->tick_length+$this->xtr($this->plot_min_x)),
// $this->ytr($this->plot_max_y),$this->xtr($this->plot_min_x),$this->ytr($this->plot_max_y),$this->ndx_tick_color);
//$ylab = $this->FormatYTickLabel($plot_max_y);
//Right Top
//ImageLine($this->img,($this->xtr($this->plot_max_x)+$this->tick_length),
// $this->ytr($this->plot_max_y),$this->xtr($this->plot_max_x-1),$this->ytr($this->plot_max_y),$this->ndx_tick_color);
//Draw Grid Line at Top
ImageLine($this->img,$this->plot_area[0]+1,$this->ytr($this->plot_max_y),
$this->plot_area[2]-1,$this->ytr($this->plot_max_y),$this->ndx_light_grid_color);
ImageLine($this->img,
$this->plot_area[0]+1,
$this->ytr($this->plot_max_y),
$this->plot_area[2]-1,
$this->ytr($this->plot_max_y),
$this->ndx_light_grid_color);
}
if ($this->skip_bottom_tick != 1) {
//Right Bottom
//ImageLine($this->img,($this->xtr($this->plot_max_x)+$this->tick_length),
// $this->ytr($this->plot_min_y),$this->xtr($this->plot_max_x),
ca. Zeile 1718
//Right Bottom
//ImageLine($this->img,($this->xtr($this->plot_max_x)+$this->tick_length),
// $this->ytr($this->plot_min_y),$this->xtr($this->plot_max_x),
// $this->ytr($this->plot_min_y),$this->ndx_tick_color);
//Draw Grid Line at Bottom of Plot
ImageLine($this->img,$this->xtr($this->plot_min_x)+1,$this->ytr($this->plot_min_y),
$this->xtr($this->plot_max_x),$this->ytr($this->plot_min_y),$this->ndx_light_grid_color);
ImageLine($this->img,
$this->xtr($this->plot_min_x)+1,
$this->ytr($this->plot_min_y),
$this->xtr($this->plot_max_x),
$this->ytr($this->plot_min_y),
$this->ndx_light_grid_color);
}
// maxy is always > miny so delta_y is always positive
if ($this->vert_tick_increment) {
$delta_y = $this->vert_tick_increment;
} elseif ($this->num_vert_ticks) {
ca. Zeile 1738
SetType($y_tmp,'double');
if ($this->skip_bottom_tick == 1) {
$y_tmp += $delta_y;
}
while ($y_tmp <= $this->plot_max_y){
//For log plots:
if (($this->yscale_type == "log") && ($this->plot_min_y == 1) &&
($delta_y%10 == 0) && ($y_tmp == $this->plot_min_y)) {
if (($this->yscale_type == "log") && ($this->plot_min_y == 1) && ($delta_y%10 == 0) && ($y_tmp == $this->plot_min_y)) {
$y_tmp = $y_tmp - 1; //Set first increment to 9 to get: 1,10,20,30,...
}
$ylab = $this->FormatYTickLabel($y_tmp);
$this->DrawVerticalTick($ylab,$y_tmp);
$y_tmp += $delta_y;
}
return true;
} // function DrawVerticalTicks
function SetTranslation() {
if ($this->xscale_type == "log") {
ca. Zeile 1841
//xpos comes in in PIXELS not in world coordinates.
//Draw an x data label centered at xlab
if ($this->use_ttf) {
$xlab_size = $this->TTFBBoxSize($this->axis_ttffont_size,
$this->x_datalabel_angle, $this->axis_ttffont, $xlab); //An array
$this->x_datalabel_angle,
$this->axis_ttffont,
$xlab); //An array
$y = $this->plot_area[3] + $xlab_size[1] + 4; //in pixels
$x = $xpos - $xlab_size[0]/2;
ImageTTFText($this->img, $this->axis_ttffont_size,
$this->x_datalabel_angle, $x, $y, $this->ndx_text_color, $this->axis_ttffont, $xlab);
ImageTTFText($this->img,
$this->axis_ttffont_size,
$this->x_datalabel_angle,
$x,
$y,
$this->ndx_text_color,
$this->axis_ttffont,
$xlab);
} else {
$xlab_size = array(ImageFontWidth($this->axis_font)*StrLen($xlab), $this->small_font_height*3);
if ($this->x_datalabel_angle == 90) {
$y = $this->plot_area[3] + ImageFontWidth($this->axis_font)*StrLen($xlab); //in pixels
ca. Zeile 1894
}
$i++;
}
}
$color_index = 0;
$start_angle = 0;
reset($sumarr);
$end_angle = 0;
while (list(, $val) = each($sumarr)) {
if ($color_index >= count($this->ndx_data_color)) $color_index=0; //data_color = array
if ($color_index >= count($this->ndx_data_color))
$color_index=0; //data_color = array
$label_txt = number_format(($val / $total * 100), $this->y_precision, ".", ",") . "%";
$val = 360 * ($val / $total);
$end_angle += $val;
$mid_angle = $end_angle - ($val / 2);
$slicecol = $this->ndx_data_color[$color_index];
//Need this again for FillToBorder
ImageArc($this->img, $xpos, $ypos, $diameter, $diameter, 0, 360, $this->ndx_grid_color);
$out_x = $radius * cos(deg2rad($end_angle));
$out_y = - $radius * sin(deg2rad($end_angle));
$mid_x = $xpos + ($radius/2 * cos(deg2rad($mid_angle))) ;
$mid_y = $ypos + (- $radius/2 * sin(deg2rad($mid_angle)));
$label_x = $xpos + ($radius * cos(deg2rad($mid_angle))) * $this->label_scale_position;
$label_y = $ypos + (- $radius * sin(deg2rad($mid_angle))) * $this->label_scale_position;
$out_x = $xpos + $out_x;
$out_y = $ypos + $out_y;
ImageLine($this->img, $xpos, $ypos, $out_x, $out_y, $this->ndx_grid_color);
//ImageLine($this->img, $xpos, $ypos, $label_x, $label_y, $this->ndx_grid_color);
ImageFillToBorder($this->img, $mid_x, $mid_y, $this->ndx_grid_color, $slicecol);
if ($this->use_ttf) {
ImageTTFText($this->img, $this->axis_ttffont_size, 0, $label_x, $label_y, $this->ndx_grid_color, $this->axis_ttffont, $label_txt);
} else {
ImageString($this->img, $this->small_font, $label_x, $label_y, $label_txt, $this->ndx_grid_color);
ca. Zeile 1966
//Draw Data Label
if ( $this->draw_data_labels == 1) {
$this->DrawDataLabel($lab,$x_now,$y_now);
}
if ($color_index >= count($this->ndx_data_color)) { $color_index=0;};
if ($color_index >= count($this->ndx_data_color)) {
$color_index=0;
}
$barcol = $this->ndx_data_color[$color_index];
$error_barcol = $this->ndx_error_bar_color[$color_index];
//echo "start = $start_lines<br />";
if ($start_lines == 1) {
for ($width = 0; $width < $this->line_width; $width++) {
ImageLine($this->img, $x_now_pixels, $y_now_pixels + $width,
ca. Zeile 2004
if ($key == 0) {
} elseif ($key == 1) {
$xpos = $val;
} elseif ($key%3 == 2) {
if ($color_index >= count($this->ndx_data_color)) $color_index=0;
if ($color_index >= count($this->ndx_data_color))
$color_index=0;
$barcol = $this->ndx_data_color[$color_index];
$error_barcol = $this->ndx_error_bar_color[$color_index];
$ypos = $val;
$color_index++;
$this->DrawDot($xpos,$ypos,$this->point_shape,$barcol);
} elseif ($key%3 == 0) {
$this->DrawYErrorBar($xpos,$ypos,$val,$this->error_bar_shape,$error_barcol);
ca. Zeile 2036
} else {
if ($this->data_type == "text-data") {
$xpos = ($j+.5);
}
if ($color_index >= count($this->ndx_data_color)) $color_index=0;
if ($color_index >= count($this->ndx_data_color))
$color_index=0;
$barcol = $this->ndx_data_color[$color_index];
//if (is_numeric($v)) //PHP4 only
if ((strval($v) != "") ) { //Allow for missing Y data
$this->DrawDot($xpos,$v,$this->point_shape,$barcol);
}
ca. Zeile 2059
function DrawThinBarLines() {
//A clean,fast routine for when you just want charts like stock volume charts
//Data must be text-data since I didn't see a graphing need for equally spaced thin lines.
//If you want it - then write to afan@jeo.net and I might add it.
if ($this->data_type != "data-data") { $this->DrawError('Data Type for ThinBarLines must be data-data'); };
if ($this->data_type != "data-data") {
$this->DrawError('Data Type for ThinBarLines must be data-data');
}
$y1 = $this->ytr($this->x_axis_position);
reset($this->data_values);
while (list(, $row) = each($this->data_values)) {
$color_index = 0;
while (list($k, $v) = each($row)) {
ca. Zeile 2075
if ( ($this->draw_x_data_labels == 1) ) { //See "labels_note1 above.
$this->DrawXDataLabel($xlab,$xpos);
}
} else {
if ($color_index >= count($this->ndx_data_color)) $color_index=0;
if ($color_index >= count($this->ndx_data_color))
$color_index=0;
$barcol = $this->ndx_data_color[$color_index];
ImageLine($this->img,$xpos,$y1,$xpos,$this->ytr($v),$barcol);
$color_index++;
}
}
ca. Zeile 2133
ImageArc($this->img, $x1 + $half_point, $y1 + $half_point, $this->point_size, $this->point_size, 0, 360, $color);
ImageFillToBorder($this->img, $x1 + $half_point, $y1 + $half_point, $color, $color);
break;
case "diamond":
$arrpoints = array(
$x1,$y1 + $half_point,
$arrpoints = array($x1,$y1 + $half_point,
$x1 + $half_point, $y1,
$x2,$y1 + $half_point,
$x1 + $half_point, $y2
);
ca. Zeile 2209
for ($i = 0; $i < $this->records_per_group; $i++) {
$posarr[$i][] = $this->xtr($this->max_x); //x final
$posarr[$i][] = $this->ytr($this->x_axis_position); //y final
}
$color_index=0;
//foreach($posarr as $row)
reset($posarr);
while (list(, $row) = each($posarr)) {
if ($color_index >= count($this->ndx_data_color)) $color_index=0;
if ($color_index >= count($this->ndx_data_color))
$color_index=0;
$barcol = $this->ndx_data_color[$color_index];
//echo "$row[0],$row[1],$row[2],$row[3],$row[4],$row[5],$row[6],$row[7],$row[8],$row[9],$row[10],$row[11],$row[12], $barcol<br />";
ImageFilledPolygon($this->img, $row, (count($row)) / 2, $barcol);
$color_index++;
ca. Zeile 2302
// Draw Lines
if ($this->data_type == "text-data") {
$x_now = $this->xtr($j+.5);
}
//if (is_numeric($v)) //PHP4 only
if ((strval($v) != "") ) { //Allow for missing Y data
$y_now = $this->ytr($v);
if ($color_index >= count($this->ndx_data_color)) { $color_index=0;} ;
if ($color_index >= count($this->ndx_data_color)) {
$color_index=0;} ;
$barcol = $this->ndx_data_color[$color_index];
if ($start_lines == 1) {
for ($width = 0; $width < $this->line_width; $width++) {
if ($this->line_style[$i] == "dashed") {
$this->DrawDashedLine($x_now, $y_now + $width, $lastx[$i], $lasty[$i] + $width, 4,4, $barcol);
ca. Zeile 2406
} else {
$y1 = $this->ytr($v);
$y2 = $this->ytr($this->x_axis_position);
}
if ($color_index >= count($this->ndx_data_color)) $color_index=0;
if ($colbarcount >= count($this->ndx_data_border_color)) $colbarcount=0;
if ($color_index >= count($this->ndx_data_color))
$color_index=0;
if ($colbarcount >= count($this->ndx_data_border_color))
$colbarcount=0;
$barcol = $this->ndx_data_color[$color_index];
$bordercol = $this->ndx_data_border_color[$colbarcount];
if ((strval($v) != "") ) { //Allow for missing Y data
if ($this->shading > 0) {
for($i=0;$i<($this->shading);$i++) {
//Shading set in SetDefaultColors
ca. Zeile 2425
ImageRectangle($this->img, $x1, $y1, $x2, $y2, $bordercol);
if ($this->draw_data_labels == '1') { //ajo
$y1 = $this->ytr($this->label_scale_position * $v);
//$this->DrawDataLabel($v,$j + .5,$v*$this->label_scale_position);
$this->DrawText($this->x_label_ttffont, $this->x_label_angle,
$x1+$this->record_bar_width/2, $y1, $this->ndx_label_color, $this->x_label_ttffont_size, $v,'center','top');
$this->DrawText($this->x_label_ttffont,
$this->x_label_angle,
$x1+$this->record_bar_width/2,
$y1,
$this->ndx_label_color,
$this->x_label_ttffont_size,
$v,
'center',
'top');
}
}
$color_index++;
$colbarcount++;
}
}
ca. Zeile 2465
//Lower Right
$box_end_y = $box_start_y + $this->small_font_height*(count($this->legend)+1) + 2*$vert_margin;
//$box_end_x = $this->plot_area[2] - 5;
$box_end_x = $box_start_x + $this->small_font_width*($max_legend_length+4) - 5;
// Draw box for legend
ImageFilledRectangle($this->img,
$box_start_x, $box_start_y,$box_end_x,
$box_end_y, $this->ndx_bg_color);
$box_start_x,
$box_start_y,
$box_end_x,
$box_end_y,
$this->ndx_bg_color);
ImageRectangle($this->img,
$box_start_x, $box_start_y,$box_end_x,
$box_end_y, $this->ndx_grid_color);
$box_start_x,
$box_start_y,
$box_end_x,
$box_end_y,
$this->ndx_grid_color);
$color_index=0;
$i = 0;
reset($this->legend);
while (list(,$leg) = each($this->legend)) {
$y_pos = $box_start_y + $this->small_font_height*($i)*($line_spacing) + $vert_margin;
ImageString($this->img, $this->small_font,
ImageString($this->img,
$this->small_font,
$box_start_x + $this->small_font_width*( $max_legend_length - strlen($leg) + 1 ) ,
$y_pos,
$leg, $this->ndx_text_color);
$leg,
$this->ndx_text_color);
if ($color_index >= count($this->ndx_data_color)) $color_index=0;
// Draw a box in the data color
ImageFilledRectangle($this->img,
$box_end_x - $this->small_font_width*2,
admin/includes/classes/split_page_results.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: split_page_results.php 950 2005-05-14 16:45:21Z mz $
$Id: split_page_results.php 2135 2011-08-31 12:37:03Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(split_page_results.php,v 1.13 2003/05/05); www.oscommerce.com
(c) 2003 nextcommerce (split_page_results.php,v 1.6 2003/08/18); www.nextcommerce.org
(c) 2006 xt:Commerce (split_page_results.php 950 2005-05-14); www.xt-commerce.com
Released under the GNU General Public License
--------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
ca. Zeile 15
Released under the GNU General Public License
--------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
class splitPageResults {
function splitPageResults(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows) {
if (empty($current_page_number)) $current_page_number = 1;
if (empty($current_page_number))
$current_page_number = 1;
$pos_to = strlen($sql_query);
$pos_from = strpos($sql_query, ' from', 0);
$pos_group_by = strpos($sql_query, ' group by', $pos_from);
if (($pos_group_by < $pos_to) && ($pos_group_by != false)) $pos_to = $pos_group_by;
$pos_having = strpos($sql_query, ' having', $pos_from);
if (($pos_having < $pos_to) && ($pos_having != false)) $pos_to = $pos_having;
$pos_order_by = strpos($sql_query, ' order by', $pos_from);
if (($pos_order_by < $pos_to) && ($pos_order_by != false)) $pos_to = $pos_order_by;
$pos_from = stripos($sql_query, ' from', 0);
$pos_group_by = stripos($sql_query, ' group by', $pos_from);
if (($pos_group_by < $pos_to) && ($pos_group_by != false))
$pos_to = $pos_group_by;
$pos_having = stripos($sql_query, ' having', $pos_from);
if (($pos_having < $pos_to) && ($pos_having != false))
$pos_to = $pos_having;
$pos_order_by = stripos($sql_query, ' order by', $pos_from);
if (($pos_order_by < $pos_to) && ($pos_order_by != false))
$pos_to = $pos_order_by;
$reviews_count_query = xtc_db_query("select count(*) as total " . substr($sql_query, $pos_from, ($pos_to - $pos_from)));
$reviews_count = xtc_db_fetch_array($reviews_count_query);
$query_num_rows = $reviews_count['total'];
$num_pages = ceil($query_num_rows / $max_rows_per_page);
if ($current_page_number > $num_pages) {
$current_page_number = $num_pages;
}
ca. Zeile 39
if ($current_page_number > $num_pages) {
$current_page_number = $num_pages;
}
$offset = ($max_rows_per_page * ($current_page_number - 1));
if ($offset < 0) $offset=0;
if ($offset < 0)
$offset=0;
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;
}
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page') {
global $PHP_SELF; //Security Fix - Base / PHP_SELF
if ( xtc_not_null($parameters) && (substr($parameters, -1) != '&') ) $parameters .= '&';
if ( xtc_not_null($parameters) && (substr($parameters, -1) != '&') )
$parameters .= '&';
// calculate number of pages needing links
$num_pages = ceil($query_numrows / $max_rows_per_page);
$pages_array = array();
for ($i=1; $i<=$num_pages; $i++) {
$pages_array[] = array('id' => $i, 'text' => $i);
}
ca. Zeile 54
$pages_array = array();
for ($i=1; $i<=$num_pages; $i++) {
$pages_array[] = array('id' => $i, 'text' => $i);
}
if ($num_pages > 1) {
$display_links = xtc_draw_form('pages', basename($_SERVER['PHP_SELF']), '', 'get');
$display_links = xtc_draw_form('pages', basename($PHP_SELF), '', 'get');
if ($current_page_number > 1) {
$display_links .= '<a href="' . xtc_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> ';
$display_links .= '<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> '; //Security Fix - Base / PHP_SELF
} else {
$display_links .= PREVNEXT_BUTTON_PREV . ' ';
}
$display_links .= sprintf(TEXT_RESULT_PAGE, xtc_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
if (($current_page_number < $num_pages) && ($num_pages != 1)) {
$display_links .= ' <a href="' . xtc_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
$display_links .= ' <a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>'; //Security Fix - Base / PHP_SELF
} else {
$display_links .= ' ' . PREVNEXT_BUTTON_NEXT;
}
if ($parameters != '') {
if (substr($parameters, -1) == '&') $parameters = substr($parameters, 0, -1);
if (substr($parameters, -1) == '&')
$parameters = substr($parameters, 0, -1);
$pairs = explode('&', $parameters);
while (list(, $pair) = each($pairs)) {
list($key,$value) = explode('=', $pair);
$display_links .= xtc_draw_hidden_field(rawurldecode($key), rawurldecode($value));
}
}
if (SID) $display_links .= xtc_draw_hidden_field(session_name(), session_id());
if (SID)
$display_links .= xtc_draw_hidden_field(session_name(), session_id());
$display_links .= '</form>';
} else {
$display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
}
ca. Zeile 93
}
function display_count($query_numrows, $max_rows_per_page, $current_page_number, $text_output) {
$to_num = ($max_rows_per_page * $current_page_number);
if ($to_num > $query_numrows) $to_num = $query_numrows;
if ($to_num > $query_numrows)
$to_num = $query_numrows;
$from_num = ($max_rows_per_page * ($current_page_number - 1));
if ($to_num == 0) {
$from_num = 0;
} else {
admin/includes/classes/table_block.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: table_block.php 950 2005-05-14 16:45:21Z mz $
$Id: table_block.php 1797 2011-02-12 15:31:48Z franky-n-xtcm $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(table_block.php,v 1.5 2003/06/02); www.oscommerce.com
(c) 2003 nextcommerce (table_block.php,v 1.8 2003/08/18); www.nextcommerce.org
(c) 2006 XT-Commerce (table_block.php 950 2005-05-14)
Released under the GNU General Public License
--------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
class tableBlock {
var $table_border = '0';
var $table_width = '100%';
var $table_cellspacing = '0';
var $table_cellpadding = '2';
var $table_parameters = '';
var $table_row_parameters = '';
var $table_data_parameters = '';
protected static $table_border = '0';
protected static $table_width = '100%';
protected static $table_cellspacing = '0';
protected static $table_cellpadding = '2';
protected static $table_parameters = '';
protected static $table_row_parameters = '';
protected static $table_data_parameters = '';
// cYbercOsmOnauT - 2011-02-07 - Fallback method for old calls
public function tableBlock($contents = '') {
return self::constructor($contents);
}
function tableBlock($contents) {
protected static function constructor($contents) {
$tableBox_string = '';
$form_set = false;
if (isset($contents['form'])) {
$tableBox_string .= $contents['form'] . "\n";
$form_set = true;
ca. Zeile 30
$form_set = false;
if (isset($contents['form'])) {
$tableBox_string .= $contents['form'] . "\n";
$form_set = true;
xtc_array_shift($contents);
array_shift($contents);
}
$tableBox_string .= '<table class="contentTable" border="' . $this->table_border . '" width="' . $this->table_width . '" cellspacing="' . $this->table_cellspacing . '" cellpadding="' . $this->table_cellpadding . '"';
if ($this->table_parameters != '') $tableBox_string .= ' ' . $this->table_parameters;
$tableBox_string .= '<table class="contentTable" border="' . self::$table_border . '" width="' . self::$table_width . '" cellspacing="' . self::$table_cellspacing . '" cellpadding="' . self::$table_cellpadding . '"';
if (self::$table_parameters != '')
$tableBox_string .= ' ' . self::$table_parameters;
$tableBox_string .= '>' . "\n";
for ($i = 0, $n = sizeof($contents); $i < $n; $i++) {
for ($i = 0; $i < sizeof($contents); $i++) {
$tableBox_string .= ' <tr';
if ($this->table_row_parameters != '') $tableBox_string .= ' ' . $this->table_row_parameters;
if (isset($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
if (self::$table_row_parameters != '')
$tableBox_string .= ' ' . self::$table_row_parameters;
if (isset($contents[$i]['params']))
$tableBox_string .= ' ' . $contents[$i]['params'];
$tableBox_string .= '>' . "\n";
if (!isset($contents[$i][0])) $contents[$i][0] = '';
if (!isset($contents[$i][0]))
$contents[$i][0] = '';
if (is_array($contents[$i][0])) {
for ($x = 0, $y = sizeof($contents[$i]); $x < $y; $x++) {
for ($x = 0; $i < sizeof($contents[$i]); $x++) {
if ($contents[$i][$x]['text']) {
$tableBox_string .= ' <td ';
if ($contents[$i][$x]['align'] != '') $tableBox_string .= ' align="' . $contents[$i][$x]['align'] . '"';
if ($contents[$i][$x]['align'] != '')
$tableBox_string .= ' align="' . $contents[$i][$x]['align'] . '"';
if ($contents[$i][$x]['params']) {
$tableBox_string .= ' ' . $contents[$i][$x]['params'];
} elseif ($this->table_data_parameters != '') {
$tableBox_string .= ' ' . $this->table_data_parameters;
} elseif (self::$table_data_parameters != '') {
$tableBox_string .= ' ' . self::$table_data_parameters;
}
$tableBox_string .= '>';
if ($contents[$i][$x]['form']) $tableBox_string .= $contents[$i][$x]['form'];
if ($contents[$i][$x]['form'])
$tableBox_string .= $contents[$i][$x]['form'];
$tableBox_string .= $contents[$i][$x]['text'];
if ($contents[$i][$x]['form']) $tableBox_string .= '</form>';
if ($contents[$i][$x]['form'])
$tableBox_string .= '</form>';
$tableBox_string .= '</td>' . "\n";
}
}
} else {
$tableBox_string .= ' <td ';
if (!isset($contents[$i]['align'])) $contents[$i]['align'] = '';
if ($contents[$i]['align'] != '') $tableBox_string .= ' align="' . $contents[$i]['align'] . '"';
if (!isset($contents[$i]['align']))
$contents[$i]['align'] = '';
if ($contents[$i]['align'] != '')
$tableBox_string .= ' align="' . $contents[$i]['align'] . '"';
if (isset($contents[$i]['params'])) {
$tableBox_string .= ' ' . $contents[$i]['params'];
} elseif ($this->table_data_parameters != '') {
$tableBox_string .= ' ' . $this->table_data_parameters;
} elseif (self::$table_data_parameters != '') {
$tableBox_string .= ' ' . self::$table_data_parameters;
}
$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
}
$tableBox_string .= ' </tr>' . "\n";
}
$tableBox_string .= '</table>' . "\n";
if ($form_set) $tableBox_string .= '</form>' . "\n";
if ($form_set)
$tableBox_string .= '</form>' . "\n";
return $tableBox_string;
}
}
?>
admin/includes/functions/general.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: general.php 1316 2005-10-21 15:30:58Z mz $
$Id: general.php 2752 2012-04-12 13:36:46Z tonne1 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(general.php,v 1.156 2003/05/29); www.oscommerce.com
(c) 2003 nextcommerce (general.php,v 1.35 2003/08/1); www.nextcommerce.org
(c) 2006 XT-Commerce (general.php 1316 2005-10-21)
Released under the GNU General Public License
--------------------------------------------------------------
Third Party contributions:
ca. Zeile 25
Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
Released under the GNU General Public License
--------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
function clear_string($value) {
/**
* clear_string()
*
* @param mixed $value
* @return
*/
function clear_string($value) {
$string = str_replace("'", '', $value);
$string = str_replace(')', '', $string);
$string = str_replace('(', '', $string);
$array = explode(',', $string);
return $array;
}
// Parse the data used in the html tags to ensure the tags will not break
/**
* xtc_parse_input_field_data()
*
* @param mixed $data
* @param mixed $parse
* @return
*/
function xtc_parse_input_field_data($data, $parse) {
return strtr(trim($data), $parse);
}
/**
* xtc_output_string()
*
* @param mixed $string
* @param bool $translate
* @param bool $protected
* @return
*/
function xtc_output_string($string, $translate = false, $protected = false) {
if ($protected == true) {
return htmlspecialchars($string);
} else {
if ($translate == false) {
return xtc_parse_input_field_data($string, array('"' => '"'));
} else {
return xtc_parse_input_field_data($string, $translate);
}
}
}
/**
* check_stock()
*
* @param mixed $products_id
* @return
*/
function check_stock($products_id) {
unset ($stock_flag);
$stock_query = xtc_db_query("SELECT products_quantity FROM ".TABLE_PRODUCTS." where products_id = '".$products_id."'");
$stock_values = xtc_db_fetch_array($stock_query);
ca. Zeile 54
$attribute_stock_query = xtc_db_query("SELECT attributes_stock, options_values_id FROM ".TABLE_PRODUCTS_ATTRIBUTES." where products_id = '".$products_id."'");
while ($attribute_stock_values = xtc_db_fetch_array($attribute_stock_query)) {
if ($attribute_stock_values['attributes_stock'] <= '0') {
$stock_flag = 'true';
$which_attribute_query = xtDBquery("SELECT products_options_values_name FROM ".TABLE_PRODUCTS_OPTIONS_VALUES." WHERE products_options_values_id = '".$attribute_stock_values['options_values_id']."' AND language_id = '".$_SESSION['languages_id']."'");
$which_attribute_query = xtDBquery("SELECT products_options_values_name FROM ".TABLE_PRODUCTS_OPTIONS_VALUES." WHERE products_options_values_id = '".$attribute_stock_values['options_values_id']."' AND language_id = '".(int)$_SESSION['languages_id']."'");
$which_attribute = xtc_db_fetch_array($which_attribute_query);
$stock_warn .= ', '.$which_attribute['products_options_values_name'];
}
}
}
if ($stock_flag == 'true' && $products_id != '') {
if (isset($stock_flag) && $stock_flag == 'true' && $products_id != '') {
return '<div class="stock_warn">'.$stock_warn.'</div>';
} else {
return xtc_image(DIR_WS_IMAGES.'icon_status_green.gif', $stock_values['products_quantity'].' '.IMAGE_ICON_STATUS_GREEN_STOCK, 10, 10);
}
}
// Set Categorie Status
/**
* xtc_set_categories_status()
*
* @param mixed $categories_id
* @param mixed $status
* @return
*/
function xtc_set_categories_status($categories_id, $status) {
if ($status == '1') {
return xtc_db_query("update ".TABLE_CATEGORIES." set categories_status = '1' where categories_id = '".$categories_id."'");
}
elseif ($status == '0') {
} elseif ($status == '0') {
return xtc_db_query("update ".TABLE_CATEGORIES." set categories_status = '0' where categories_id = '".$categories_id."'");
} else {
return -1;
}
}
/**
* xtc_set_groups()
*
* @param mixed $categories_id
* @param mixed $permission_array
* @return
*/
function xtc_set_groups($categories_id, $permission_array) {
// get products in categorie
$products_query = xtc_db_query("SELECT products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." where categories_id='".$categories_id."'");
while ($products = xtc_db_fetch_array($products_query)) {
xtc_db_perform(TABLE_PRODUCTS, $permission_array, 'update', 'products_id = \''.$products['products_id'].'\'');
ca. Zeile 93
$categories_query = xtc_db_query("SELECT categories_id FROM ".TABLE_CATEGORIES." where parent_id='".$categories_id."'");
while ($categories = xtc_db_fetch_array($categories_query)) {
xtc_set_groups($categories['categories_id'], $permission_array);
}
}
// Set Admin Access Rights
/**
* xtc_set_admin_access()
*
* @param mixed $fieldname
* @param mixed $status
* @param mixed $cID
* @return
*/
function xtc_set_admin_access($fieldname, $status, $cID) {
if ($status == '1') {
return xtc_db_query("update ".TABLE_ADMIN_ACCESS." set ".$fieldname." = '1' where customers_id = '".$cID."'");
} else {
ca. Zeile 106
}
}
// Check whether a referer has enough permission to open an admin page
/**
* xtc_check_permission()
*
* @param mixed $pagename
* @return
*/
function xtc_check_permission($pagename) {
if ($pagename != 'index') {
$access_permission_query = xtc_db_query("select ".$pagename." from ".TABLE_ADMIN_ACCESS." where customers_id = '".$_SESSION['customer_id']."'");
$access_permission = xtc_db_fetch_array($access_permission_query);
ca. Zeile 121
xtc_redirect(xtc_href_link(FILENAME_LOGIN));
}
}
////
// Redirect to another page or site
/**
* xtc_redirect()
*
* @param mixed $url
* @return
*/
function xtc_redirect($url) {
global $logger;
header('Location: '.$url);
if (STORE_PAGE_PARSE_TIME == 'true') {
if (!is_object($logger))
$logger = new logger;
$logger->timer_stop();
ca. Zeile 133
if (!is_object($logger))
$logger = new logger;
$logger->timer_stop();
}
exit;
}
/**
* xtc_customers_name()
*
* @param mixed $customers_id
* @return
*/
function xtc_customers_name($customers_id) {
$customers = xtc_db_query("select customers_firstname, customers_lastname from ".TABLE_CUSTOMERS." where customers_id = '".$customers_id."'");
$customers_values = xtc_db_fetch_array($customers);
return $customers_values['customers_firstname'].' '.$customers_values['customers_lastname'];
}
/**
* xtc_get_path()
*
* @param string $current_category_id
* @return
*/
function xtc_get_path($current_category_id = '') {
global $cPath_array;
if ($current_category_id == '') {
if (empty($current_category_id)) {
$cPath_new = implode('_', $cPath_array);
} else {
if (sizeof($cPath_array) == 0) {
$cPath_new = $current_category_id;
ca. Zeile 173
$cPath_new = substr($cPath_new, 1);
}
}
}
return 'cPath='.$cPath_new;
}
/**
* xtc_get_all_get_params()
*
* @param string $exclude_array
* @return
*/
function xtc_get_all_get_params($exclude_array = '') {
if ($exclude_array == '')
if (empty($exclude_array))
$exclude_array = array ();
$get_url = '';
reset($_GET);
while (list ($key, $value) = each($_GET)) {
if (($key != session_name()) && ($key != 'error') && (!xtc_in_array($key, $exclude_array)))
if (($key != session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)))
$get_url .= $key.'='.$value.'&';
}
return $get_url;
}
/**
* xtc_date_long()
*
* @param mixed $raw_date
* @return
*/
function xtc_date_long($raw_date) {
if (($raw_date == '0000-00-00 00:00:00') || ($raw_date == ''))
if (($raw_date == '0000-00-00 00:00:00') || empty($raw_date))
return false;
$year = (int) substr($raw_date, 0, 4);
$month = (int) substr($raw_date, 5, 2);
$day = (int) substr($raw_date, 8, 2);
$hour = (int) substr($raw_date, 11, 2);
ca. Zeile 203
$day = (int) substr($raw_date, 8, 2);
$hour = (int) substr($raw_date, 11, 2);
$minute = (int) substr($raw_date, 14, 2);
$second = (int) substr($raw_date, 17, 2);
return strftime(DATE_FORMAT_LONG, mktime($hour, $minute, $second, $month, $day, $year));
}
////
// Output a raw date string in the selected locale date format
// $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS
// NOTE: Includes a workaround for dates before 01/01/1970 that fail on windows servers
/**
* xtc_date_short()
*
* @param mixed $raw_date
* @return
*/
function xtc_date_short($raw_date) {
if (($raw_date == '0000-00-00 00:00:00') || ($raw_date == ''))
if (($raw_date == '0000-00-00 00:00:00') || empty($raw_date))
return false;
$year = substr($raw_date, 0, 4);
$month = (int) substr($raw_date, 5, 2);
$day = (int) substr($raw_date, 8, 2);
$hour = (int) substr($raw_date, 11, 2);
ca. Zeile 221
$day = (int) substr($raw_date, 8, 2);
$hour = (int) substr($raw_date, 11, 2);
$minute = (int) substr($raw_date, 14, 2);
$second = (int) substr($raw_date, 17, 2);
if (@ date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) {
return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
} else {
return preg_replace('/2037'.'$/', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); // Hetfield - 2009-08-19 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
return preg_replace('/2037$/', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); // Hetfield - 2009-08-19 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
}
}
/**
* xtc_datetime_short()
*
* @param mixed $raw_datetime
* @return
*/
function xtc_datetime_short($raw_datetime) {
if (($raw_datetime == '0000-00-00 00:00:00') || ($raw_datetime == ''))
if (($raw_datetime == '0000-00-00 00:00:00') || empty($raw_datetime))
return false;
$year = (int) substr($raw_datetime, 0, 4);
$month = (int) substr($raw_datetime, 5, 2);
$day = (int) substr($raw_datetime, 8, 2);
$hour = (int) substr($raw_datetime, 11, 2);
ca. Zeile 240
$day = (int) substr($raw_datetime, 8, 2);
$hour = (int) substr($raw_datetime, 11, 2);
$minute = (int) substr($raw_datetime, 14, 2);
$second = (int) substr($raw_datetime, 17, 2);
return strftime(DATE_TIME_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
}
/**
* xtc_array_merge()
*
* @param mixed $array1
* @param mixed $array2
* @param string $array3
* @return
*/
function xtc_array_merge($array1, $array2, $array3 = '') {
if (!is_array($array1)) { $array1 = array (); }
if (!is_array($array2)) { $array2 = array (); }
if (!is_array($array3)) { $array3 = array (); }
if (!is_array($array1)) {
$array1 = array ();
}
if (!is_array($array2)) {
$array2 = array ();
}
if (!is_array($array3)) {
$array3 = array ();
}
if (function_exists('array_merge')) {
$array_merged = array_merge($array1, $array2, $array3);
} else {
while (list ($key, $val) = each($array1))
ca. Zeile 278
return false;
}
/**
* xtc_get_category_tree()
*
* @param string $parent_id
* @param string $spacing
* @param string $exclude
* @param string $category_tree_array
* @param bool $include_itself
* @return
*/
function xtc_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) {
if (!is_array($category_tree_array))
$category_tree_array = array ();
if ((sizeof($category_tree_array) < 1) && ($exclude != '0'))
$category_tree_array[] = array ('id' => '0', 'text' => TEXT_TOP);
ca. Zeile 284
if (!is_array($category_tree_array))
$category_tree_array = array ();
if ((sizeof($category_tree_array) < 1) && ($exclude != '0'))
$category_tree_array[] = array ('id' => '0', 'text' => TEXT_TOP);
if ($include_itself) {
$category_query = xtc_db_query("select cd.categories_name from ".TABLE_CATEGORIES_DESCRIPTION." cd where cd.language_id = '".$_SESSION['languages_id']."' and cd.categories_id = '".$parent_id."'");
$category_query = xtc_db_query("select cd.categories_name from ".TABLE_CATEGORIES_DESCRIPTION." cd where cd.language_id = '".(int)$_SESSION['languages_id']."' and cd.categories_id = '".$parent_id."'");
$category = xtc_db_fetch_array($category_query);
$category_tree_array[] = array ('id' => $parent_id, 'text' => $category['categories_name']);
}
$categories_query = xtc_db_query("select c.categories_id, cd.categories_name, c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.categories_id = cd.categories_id and cd.language_id = '".$_SESSION['languages_id']."' and c.parent_id = '".$parent_id."' order by c.sort_order, cd.categories_name");
$categories_query = xtc_db_query("select c.categories_id, cd.categories_name, c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.categories_id = cd.categories_id and cd.language_id = '".(int)$_SESSION['languages_id']."' and c.parent_id = '".$parent_id."' order by c.sort_order, cd.categories_name");
while ($categories = xtc_db_fetch_array($categories_query)) {
if ($exclude != $categories['categories_id'])
$category_tree_array[] = array ('id' => $categories['categories_id'], 'text' => $spacing.$categories['categories_name']);
$category_tree_array = xtc_get_category_tree($categories['categories_id'], $spacing.' ', $exclude, $category_tree_array);
ca. Zeile 297
if ($exclude != $categories['categories_id'])
$category_tree_array[] = array ('id' => $categories['categories_id'], 'text' => $spacing.$categories['categories_name']);
$category_tree_array = xtc_get_category_tree($categories['categories_id'], $spacing.' ', $exclude, $category_tree_array);
}
return $category_tree_array;
}
/**
* xtc_draw_products_pull_down()
*
* @param mixed $name
* @param string $parameters
* @param string $exclude
* @return
*/
function xtc_draw_products_pull_down($name, $parameters = '', $exclude = '') {
global $currencies;
if ($exclude == '') {
if (empty($exclude)) {
$exclude = array ();
}
$select_string = '<select name="'.$name.'"';
if ($parameters) {
$select_string .= ' '.$parameters;
}
$select_string .= '>';
$products_query = xtc_db_query("select p.products_id, pd.products_name,p.products_tax_class_id, p.products_price from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd where p.products_id = pd.products_id and pd.language_id = '".$_SESSION['languages_id']."' order by products_name");
$products_query = xtc_db_query("select p.products_id, pd.products_name,p.products_tax_class_id, p.products_price from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd where p.products_id = pd.products_id and pd.language_id = '".(int)$_SESSION['languages_id']."' order by products_name");
while ($products = xtc_db_fetch_array($products_query)) {
if (!xtc_in_array($products['products_id'], $exclude)) {
if (!in_array($products['products_id'], $exclude)) {
//brutto admin:
if (PRICE_IS_BRUTTO == 'true') {
$products['products_price'] = xtc_round($products['products_price'] * ((100 + xtc_get_tax_rate($products['products_tax_class_id'])) / 100), PRICE_PRECISION);
}
ca. Zeile 323
$select_string .= '<option value="'.$products['products_id'].'">'.$products['products_name'].' ('.xtc_round($products['products_price'], PRICE_PRECISION).')</option>';
}
}
$select_string .= '</select>';
return $select_string;
}
/**
* xtc_options_name()
*
* @param mixed $options_id
* @return
*/
function xtc_options_name($options_id) {
$options = xtc_db_query("select products_options_name from ".TABLE_PRODUCTS_OPTIONS." where products_options_id = '".$options_id."' and language_id = '".$_SESSION['languages_id']."'");
$options = xtc_db_query("select products_options_name from ".TABLE_PRODUCTS_OPTIONS." where products_options_id = '".$options_id."' and language_id = '".(int)$_SESSION['languages_id']."'");
$options_values = xtc_db_fetch_array($options);
return $options_values['products_options_name'];
}
/**
* xtc_values_name()
*
* @param mixed $values_id
* @return
*/
function xtc_values_name($values_id) {
$values = xtc_db_query("select products_options_values_name from ".TABLE_PRODUCTS_OPTIONS_VALUES." where products_options_values_id = '".$values_id."' and language_id = '".$_SESSION['languages_id']."'");
$values = xtc_db_query("select products_options_values_name from ".TABLE_PRODUCTS_OPTIONS_VALUES." where products_options_values_id = '".$values_id."' and language_id = '".(int)$_SESSION['languages_id']."'");
$values_values = xtc_db_fetch_array($values);
return $values_values['products_options_values_name'];
}
/**
* xtc_info_image()
*
* @param mixed $image
* @param mixed $alt
* @param string $width
* @param string $height
* @return
*/
function xtc_info_image($image, $alt, $width = '', $height = '') {
if (($image) && (file_exists(DIR_FS_CATALOG_IMAGES.$image))) {
$image = xtc_image(DIR_WS_CATALOG_IMAGES.$image, $alt, $width, $height);
} else {
ca. Zeile 349
$image = xtc_image(DIR_WS_CATALOG_IMAGES.$image, $alt, $width, $height);
} else {
$image = TEXT_IMAGE_NONEXISTENT;
}
return $image;
}
/**
* xtc_info_image_c()
*
* @param mixed $image
* @param mixed $alt
* @param string $width
* @param string $height
* @return
*/
function xtc_info_image_c($image, $alt, $width = '', $height = '') {
if (($image) && (file_exists(DIR_FS_CATALOG_IMAGES.'categories/'.$image))) {
$image = xtc_image(DIR_WS_CATALOG_IMAGES.'categories/'.$image, $alt, $width, $height);
} else {
ca. Zeile 359
$image = xtc_image(DIR_WS_CATALOG_IMAGES.'categories/'.$image, $alt, $width, $height);
} else {
$image = TEXT_IMAGE_NONEXISTENT;
}
return $image;
}
/**
* xtc_product_thumb_image()
*
* @param mixed $image
* @param mixed $alt
* @param string $width
* @param string $height
* @return
*/
function xtc_product_thumb_image($image, $alt, $width = '', $height = '') {
if (($image) && (file_exists(DIR_FS_CATALOG_THUMBNAIL_IMAGES.$image))) {
$image = xtc_image(DIR_WS_CATALOG_THUMBNAIL_IMAGES.$image, $alt, $width, $height);
} else {
ca. Zeile 369
$image = xtc_image(DIR_WS_CATALOG_THUMBNAIL_IMAGES.$image, $alt, $width, $height);
} else {
$image = TEXT_IMAGE_NONEXISTENT;
}
return $image;
}
/**
* xtc_break_string()
*
* @param mixed $string
* @param mixed $len
* @param string $break_char
* @return
*/
function xtc_break_string($string, $len, $break_char = '-') {
$l = 0;
$output = '';
for ($i = 0; $i < strlen($string); $i ++) {
ca. Zeile 389
$output .= $break_char;
}
$output .= $char;
}
return $output;
}
/**
* xtc_get_country_name()
*
* @param mixed $country_id
* @return
*/
function xtc_get_country_name($country_id) {
$country_query = xtc_db_query("select countries_name from ".TABLE_COUNTRIES." where countries_id = '".$country_id."'");
if (!xtc_db_num_rows($country_query)) {
return $country_id;
} else {
$country = xtc_db_fetch_array($country_query);
ca. Zeile 404
return $country['countries_name'];
}
}
/**
* xtc_get_zone_name()
*
* @param mixed $country_id
* @param mixed $zone_id
* @param mixed $default_zone
* @return
*/
function xtc_get_zone_name($country_id, $zone_id, $default_zone) {
$zone_query = xtc_db_query("select zone_name from ".TABLE_ZONES." where zone_country_id = '".$country_id."' and zone_id = '".$zone_id."'");
if (xtc_db_num_rows($zone_query)) {
$zone = xtc_db_fetch_array($zone_query);
ca. Zeile 414
return $default_zone;
}
}
/**
* xtc_browser_detect()
*
* @param mixed $component
* @return
*/
function xtc_browser_detect($component) {
return stristr($_SERVER['HTTP_USER_AGENT'], $component);
}
/**
* xtc_tax_classes_pull_down()
*
* @param mixed $parameters
* @param string $selected
* @return
*/
function xtc_tax_classes_pull_down($parameters, $selected = '') {
$select_string = '<select '.$parameters.'>';
$classes_query = xtc_db_query("select tax_class_id, tax_class_title from ".TABLE_TAX_CLASS." order by tax_class_title");
while ($classes = xtc_db_fetch_array($classes_query)) {
ca. Zeile 429
$select_string .= ' SELECTED';
$select_string .= '>'.$classes['tax_class_title'].'</option>';
}
$select_string .= '</select>';
return $select_string;
}
/**
* xtc_geo_zones_pull_down()
*
* @param mixed $parameters
* @param string $selected
* @return
*/
function xtc_geo_zones_pull_down($parameters, $selected = '') {
$select_string = '<select '.$parameters.'>';
$zones_query = xtc_db_query("select geo_zone_id, geo_zone_name from ".TABLE_GEO_ZONES." order by geo_zone_name");
while ($zones = xtc_db_fetch_array($zones_query)) {
ca. Zeile 443
$select_string .= ' SELECTED';
$select_string .= '>'.$zones['geo_zone_name'].'</option>';
}
$select_string .= '</select>';
return $select_string;
}
/**
* xtc_get_geo_zone_name()
*
* @param mixed $geo_zone_id
* @return
*/
function xtc_get_geo_zone_name($geo_zone_id) {
$zones_query = xtc_db_query("select geo_zone_name from ".TABLE_GEO_ZONES." where geo_zone_id = '".$geo_zone_id."'");
if (!xtc_db_num_rows($zones_query)) {
$geo_zone_name = $geo_zone_id;
} else {
$zones = xtc_db_fetch_array($zones_query);
ca. Zeile 456
} else {
$zones = xtc_db_fetch_array($zones_query);
$geo_zone_name = $zones['geo_zone_name'];
}
return $geo_zone_name;
}
/**
* xtc_address_format()
*
* @param mixed $address_format_id
* @param mixed $address
* @param mixed $html
* @param mixed $boln
* @param mixed $eoln
* @return
*/
function xtc_address_format($address_format_id, $address, $html, $boln, $eoln) {
$address_format_query = xtc_db_query("select address_format as format from ".TABLE_ADDRESS_FORMAT." where address_format_id = '".$address_format_id."'");
$address_format = xtc_db_fetch_array($address_format_query);
$company = addslashes($address['company']);
$firstname = addslashes($address['firstname']);
$cid = addslashes($address['csID']);
$lastname = addslashes($address['lastname']);
$street = addslashes($address['street_address']);
$suburb = addslashes($address['suburb']);
$city = addslashes($address['city']);
$state = addslashes($address['state']);
$country_id = $address['country_id'];
$zone_id = $address['zone_id'];
$postcode = addslashes($address['postcode']);
$company = isset($address['company']) ? addslashes($address['company']) : '';
$firstname = isset($address['firstname']) ? addslashes($address['firstname']) : '';
$cid = isset($address['csID']) ? addslashes($address['csID']) : '';
$lastname = isset($address['lastname']) ? addslashes($address['lastname']) : '';
$street = isset($address['street_address']) ? addslashes($address['street_address']) : '';
$suburb = isset($address['suburb']) ? addslashes($address['suburb']) : '';
$city = isset($address['city']) ? addslashes($address['city']) : '';
$state = isset($address['state']) ? addslashes($address['state']) : '';
$country_id = isset($address['country_id']) ? $address['country_id'] : '';
$zone_id = isset($address['zone_id']) ? $address['zone_id'] : '';
$postcode = isset($address['postcode']) ? addslashes($address['postcode']) : '';
$zip = $postcode;
$country = xtc_get_country_name($country_id);
$country = isset($address['country_id']) ? xtc_get_country_name($country_id) : '';
$state = xtc_get_zone_code($country_id, $zone_id, $state);
if ($html) {
// HTML Mode
$HR = '<hr />';
$hr = '<hr />';
ca. Zeile 483
if ($html) {
// HTML Mode
$HR = '<hr />';
$hr = '<hr />';
if (($boln == '') && ($eoln == "\n")) { // Values not specified, use rational defaults
if ((empty($boln)) && ($eoln == "\n")) { // Values not specified, use rational defaults
$CR = '<br />';
$cr = '<br />';
$eoln = $cr;
} else { // Use values supplied
ca. Zeile 498
$cr = $CR;
$HR = '----------------------------------------';
$hr = '----------------------------------------';
}
$statecomma = '';
$streets = $street;
if ($suburb != '')
if (!empty($suburb))
$streets = $street.$cr.$suburb;
if ($firstname == '')
if (empty($firstname))
$firstname = addslashes($address['name']);
if ($country == '')
if (empty($country))
$country = addslashes($address['country']);
if ($state != '')
if (!empty($state))
$statecomma = $state.', ';
$fmt = $address_format['format'];
eval ("\$address = \"$fmt\";");
$address = stripslashes($address);
if ((ACCOUNT_COMPANY == 'true') && (xtc_not_null($company))) {
$address = $company.$cr.$address;
}
return $address;
}
////////////////////////////////////////////////////////////////////////////////////////////////
ca. Zeile 534
//
// Description : Function to retrieve the state/province code (as in FL for Florida etc)
//
////////////////////////////////////////////////////////////////////////////////////////////////
/**
* xtc_get_zone_code()
*
* @param mixed $country
* @param mixed $zone
* @param mixed $def_state
* @return
*/
function xtc_get_zone_code($country, $zone, $def_state) {
$state_prov_query = xtc_db_query("select zone_code from ".TABLE_ZONES." where zone_country_id = '".$country."' and zone_id = '".$zone."'");
if (!xtc_db_num_rows($state_prov_query)) {
$state_prov_code = $def_state;
} else {
$state_prov_values = xtc_db_fetch_array($state_prov_query);
ca. Zeile 544
} else {
$state_prov_values = xtc_db_fetch_array($state_prov_query);
$state_prov_code = $state_prov_values['zone_code'];
}
return $state_prov_code;
}
/**
* xtc_get_uprid()
*
* @param mixed $prid
* @param mixed $params
* @return
*/
function xtc_get_uprid($prid, $params) {
$uprid = $prid;
if ((is_array($params)) && (!strstr($prid, '{'))) {
while (list ($option, $value) = each($params)) {
ca. Zeile 555
while (list ($option, $value) = each($params)) {
$uprid = $uprid.'{'.$option.'}'.$value;
}
}
return $uprid;
}
/**
* xtc_get_prid()
*
* @param mixed $uprid
* @return
*/
function xtc_get_prid($uprid) {
$pieces = explode('{', $uprid);
return $pieces[0];
}
/**
* xtc_get_languages()
*
* @return
*/
function xtc_get_languages() {
// BOF - Tomcraft - 2009-11-08 - Added option to deactivate languages
//$languages_query = xtc_db_query("select languages_id, name, code, image, directory from ".TABLE_LANGUAGES." order by sort_order");
$languages_query = xtc_db_query("select languages_id, name, code, image, directory from ".TABLE_LANGUAGES." where status = '1' order by sort_order");
// EOF - Tomcraft - 2009-11-08 - Added option to deactivate languages
while ($languages = xtc_db_fetch_array($languages_query)) {
$languages_array[] = array ('id' => $languages['languages_id'], 'name' => $languages['name'], 'code' => $languages['code'], 'image' => $languages['image'], 'directory' => $languages['directory']);
$languages_array[] = array ('id' => $languages['languages_id'],
'name' => $languages['name'],
'code' => $languages['code'],
'image' => $languages['image'],
'directory' => $languages['directory']
);
}
return $languages_array;
}
/**
* xtc_get_categories_name()
*
* @param mixed $category_id
* @param mixed $language_id
* @return
*/
function xtc_get_categories_name($category_id, $language_id) {
$category_query = xtc_db_query("select categories_name from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id = '".$category_id."' and language_id = '".$language_id."'");
$category = xtc_db_fetch_array($category_query);
return $category['categories_name'];
}
/**
* xtc_get_categories_heading_title()
*
* @param mixed $category_id
* @param mixed $language_id
* @return
*/
function xtc_get_categories_heading_title($category_id, $language_id) {
$category_query = xtc_db_query("select categories_heading_title from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id = '".$category_id."' and language_id = '".$language_id."'");
$category = xtc_db_fetch_array($category_query);
return $category['categories_heading_title'];
}
/**
* xtc_get_categories_description()
*
* @param mixed $category_id
* @param mixed $language_id
* @return
*/
function xtc_get_categories_description($category_id, $language_id) {
$category_query = xtc_db_query("select categories_description from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id = '".$category_id."' and language_id = '".$language_id."'");
$category = xtc_db_fetch_array($category_query);
return $category['categories_description'];
}
/**
* xtc_get_categories_meta_title()
*
* @param mixed $category_id
* @param mixed $language_id
* @return
*/
function xtc_get_categories_meta_title($category_id, $language_id) {
$category_query = xtc_db_query("select categories_meta_title from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id = '".$category_id."' and language_id = '".$language_id."'");
$category = xtc_db_fetch_array($category_query);
return $category['categories_meta_title'];
}
/**
* xtc_get_categories_meta_description()
*
* @param mixed $category_id
* @param mixed $language_id
* @return
*/
function xtc_get_categories_meta_description($category_id, $language_id) {
$category_query = xtc_db_query("select categories_meta_description from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id = '".$category_id."' and language_id = '".$language_id."'");
$category = xtc_db_fetch_array($category_query);
return $category['categories_meta_description'];
}
/**
* xtc_get_categories_meta_keywords()
*
* @param mixed $category_id
* @param mixed $language_id
* @return
*/
function xtc_get_categories_meta_keywords($category_id, $language_id) {
$category_query = xtc_db_query("select categories_meta_keywords from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id = '".$category_id."' and language_id = '".$language_id."'");
$category = xtc_db_fetch_array($category_query);
return $category['categories_meta_keywords'];
}
/**
* xtc_get_orders_status_name()
*
* @param mixed $orders_status_id
* @param string $language_id
* @return
*/
function xtc_get_orders_status_name($orders_status_id, $language_id = '') {
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$orders_status_query = xtc_db_query("select orders_status_name from ".TABLE_ORDERS_STATUS." where orders_status_id = '".$orders_status_id."' and language_id = '".$language_id."'");
$orders_status = xtc_db_fetch_array($orders_status_query);
ca. Zeile 624
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$orders_status_query = xtc_db_query("select orders_status_name from ".TABLE_ORDERS_STATUS." where orders_status_id = '".$orders_status_id."' and language_id = '".$language_id."'");
$orders_status = xtc_db_fetch_array($orders_status_query);
return $orders_status['orders_status_name'];
}
/**
* xtc_get_cross_sell_name()
*
* @param mixed $cross_sell_group
* @param string $language_id
* @return
*/
function xtc_get_cross_sell_name($cross_sell_group, $language_id = '') {
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$cross_sell_query = xtc_db_query("select groupname from ".TABLE_PRODUCTS_XSELL_GROUPS." where products_xsell_grp_name_id = '".$cross_sell_group."' and language_id = '".$language_id."'");
$cross_sell = xtc_db_fetch_array($cross_sell_query);
ca. Zeile 634
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$cross_sell_query = xtc_db_query("select groupname from ".TABLE_PRODUCTS_XSELL_GROUPS." where products_xsell_grp_name_id = '".$cross_sell_group."' and language_id = '".$language_id."'");
$cross_sell = xtc_db_fetch_array($cross_sell_query);
return $cross_sell['groupname'];
}
/**
* xtc_get_shipping_status_name()
*
* @param mixed $shipping_status_id
* @param string $language_id
* @return
*/
function xtc_get_shipping_status_name($shipping_status_id, $language_id = '') {
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$language_id = (int)$_SESSION['languages_id'];
$shipping_status_query = xtc_db_query("select shipping_status_name from ".TABLE_SHIPPING_STATUS." where shipping_status_id = '".$shipping_status_id."' and language_id = '".$language_id."'");
$shipping_status = xtc_db_fetch_array($shipping_status_query);
return $shipping_status['shipping_status_name'];
}
/**
* xtc_get_orders_status()
*
* @return
*/
function xtc_get_orders_status() {
$orders_status_array = array ();
$orders_status_query = xtc_db_query("select orders_status_id, orders_status_name from ".TABLE_ORDERS_STATUS." where language_id = '".$_SESSION['languages_id']."' order by orders_status_id");
$orders_status_query = xtc_db_query("select orders_status_id, orders_status_name from ".TABLE_ORDERS_STATUS." where language_id = '".(int)$_SESSION['languages_id']."' order by orders_status_id");
while ($orders_status = xtc_db_fetch_array($orders_status_query)) {
$orders_status_array[] = array ('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']);
}
return $orders_status_array;
}
/**
* xtc_get_cross_sell_groups()
*
* @return
*/
function xtc_get_cross_sell_groups() {
$cross_sell_array = array ();
$cross_sell_query = xtc_db_query("select products_xsell_grp_name_id, groupname from ".TABLE_PRODUCTS_XSELL_GROUPS." where language_id = '".$_SESSION['languages_id']."' order by products_xsell_grp_name_id");
$cross_sell_query = xtc_db_query("select products_xsell_grp_name_id, groupname from ".TABLE_PRODUCTS_XSELL_GROUPS." where language_id = '".(int)$_SESSION['languages_id']."' order by products_xsell_grp_name_id");
while ($cross_sell = xtc_db_fetch_array($cross_sell_query)) {
$cross_sell_array[] = array ('id' => $cross_sell['products_xsell_grp_name_id'], 'text' => $cross_sell['groupname']);
}
return $cross_sell_array;
}
/**
* xtc_get_products_vpe_name()
*
* @param mixed $products_vpe_id
* @param string $language_id
* @return
*/
function xtc_get_products_vpe_name($products_vpe_id, $language_id = '') {
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$language_id = (int)$_SESSION['languages_id'];
$products_vpe_query = xtc_db_query("select products_vpe_name from ".TABLE_PRODUCTS_VPE." where products_vpe_id = '".$products_vpe_id."' and language_id = '".$language_id."'");
$products_vpe = xtc_db_fetch_array($products_vpe_query);
return $products_vpe['products_vpe_name'];
}
/**
* xtc_get_shipping_status()
*
* @return
*/
function xtc_get_shipping_status() {
$shipping_status_array = array ();
$shipping_status_query = xtc_db_query("select shipping_status_id, shipping_status_name from ".TABLE_SHIPPING_STATUS." where language_id = '".$_SESSION['languages_id']."' order by shipping_status_id");
$shipping_status_query = xtc_db_query("select shipping_status_id, shipping_status_name from ".TABLE_SHIPPING_STATUS." where language_id = '".(int)$_SESSION['languages_id']."' order by shipping_status_id");
while ($shipping_status = xtc_db_fetch_array($shipping_status_query)) {
$shipping_status_array[] = array ('id' => $shipping_status['shipping_status_id'], 'text' => $shipping_status['shipping_status_name']);
}
return $shipping_status_array;
}
/**
* xtc_get_products_name()
*
* @param mixed $product_id
* @param integer $language_id
* @return
*/
function xtc_get_products_name($product_id, $language_id = 0) {
if ($language_id == 0)
$language_id = $_SESSION['languages_id'];
$language_id = (int)$_SESSION['languages_id'];
$product_query = xtc_db_query("select products_name from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_name'];
}
/**
* xtc_get_products_description()
*
* @param mixed $product_id
* @param mixed $language_id
* @return
*/
function xtc_get_products_description($product_id, $language_id) {
$product_query = xtc_db_query("select products_description from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_description'];
}
/**
* xtc_get_products_short_description()
*
* @param mixed $product_id
* @param mixed $language_id
* @return
*/
function xtc_get_products_short_description($product_id, $language_id) {
$product_query = xtc_db_query("select products_short_description from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_short_description'];
}
/**
* xtc_get_products_keywords()
*
* @param mixed $product_id
* @param mixed $language_id
* @return
*/
function xtc_get_products_keywords($product_id, $language_id) {
$product_query = xtc_db_query("select products_keywords from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_keywords'];
}
/**
* xtc_get_products_meta_title()
*
* @param mixed $product_id
* @param mixed $language_id
* @return
*/
function xtc_get_products_meta_title($product_id, $language_id) {
$product_query = xtc_db_query("select products_meta_title from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_meta_title'];
}
/**
* xtc_get_products_meta_description()
*
* @param mixed $product_id
* @param mixed $language_id
* @return
*/
function xtc_get_products_meta_description($product_id, $language_id) {
$product_query = xtc_db_query("select products_meta_description from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_meta_description'];
}
/**
* xtc_get_products_meta_keywords()
*
* @param mixed $product_id
* @param mixed $language_id
* @return
*/
function xtc_get_products_meta_keywords($product_id, $language_id) {
$product_query = xtc_db_query("select products_meta_keywords from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_meta_keywords'];
}
/**
* xtc_get_products_url()
*
* @param mixed $product_id
* @param mixed $language_id
* @return
*/
function xtc_get_products_url($product_id, $language_id) {
$product_query = xtc_db_query("select products_url from ".TABLE_PRODUCTS_DESCRIPTION." where products_id = '".$product_id."' and language_id = '".$language_id."'");
$product = xtc_db_fetch_array($product_query);
return $product['products_url'];
}
////
// Return the manufacturers URL in the needed language
// TABLES: manufacturers_info
/**
* xtc_get_manufacturer_url()
*
* @param mixed $manufacturer_id
* @param mixed $language_id
* @return
*/
function xtc_get_manufacturer_url($manufacturer_id, $language_id) {
$manufacturer_query = xtc_db_query("select manufacturers_url from ".TABLE_MANUFACTURERS_INFO." where manufacturers_id = '".$manufacturer_id."' and languages_id = '".$language_id."'");
$manufacturer = xtc_db_fetch_array($manufacturer_query);
return $manufacturer['manufacturers_url'];
}
////
// Wrapper for class_exists() function
// This function is not available in all PHP versions so we test it before using it.
/**
* xtc_class_exists()
*
* @param mixed $class_name
* @return
*/
function xtc_class_exists($class_name) {
if (function_exists('class_exists')) {
return class_exists($class_name);
} else {
return true;
}
}
////
// Returns an array with countries
// TABLES: countries
function xtc_get_countries($default = '') {
/**
* xtc_get_countries()
*
* @param string $default
* @param int $status
* @return
*/
function xtc_get_countries($default = '', $status = '') {
$status = (!empty($status)) ? " where status = '" . $status ."' " : '';
$countries_array = array ();
if ($default) {
$countries_array[] = array ('id' => STORE_COUNTRY, 'text' => $default);
}
$countries_query = xtc_db_query("select countries_id, countries_name from ".TABLE_COUNTRIES." order by countries_name");
$countries_query = xtc_db_query("select countries_id, countries_name from ".TABLE_COUNTRIES." $status order by countries_name");
while ($countries = xtc_db_fetch_array($countries_query)) {
$countries_array[] = array ('id' => $countries['countries_id'], 'text' => $countries['countries_name']);
}
return $countries_array;
}
////
// return an array with country zones
/**
* xtc_get_country_zones()
*
* @param mixed $country_id
* @return
*/
function xtc_get_country_zones($country_id) {
$zones_array = array ();
$zones_query = xtc_db_query("select zone_id, zone_name from ".TABLE_ZONES." where zone_country_id = '".$country_id."' order by zone_name");
while ($zones = xtc_db_fetch_array($zones_query)) {
ca. Zeile 801
$zones_query = xtc_db_query("select zone_id, zone_name from ".TABLE_ZONES." where zone_country_id = '".$country_id."' order by zone_name");
while ($zones = xtc_db_fetch_array($zones_query)) {
$zones_array[] = array ('id' => $zones['zone_id'], 'text' => $zones['zone_name']);
}
return $zones_array;
}
/**
* xtc_prepare_country_zones_pull_down()
*
* @param string $country_id
* @return
*/
function xtc_prepare_country_zones_pull_down($country_id = '') {
// preset the width of the drop-down for Netscape
$pre = '';
if ((!xtc_browser_detect('MSIE')) && (xtc_browser_detect('Mozilla/4'))) {
ca. Zeile 827
$zones[] = array ('id' => '', 'text' => $pre);
}
}
}
return $zones;
}
////
// Get list of address_format_id's
/**
* xtc_get_address_formats()
*
* @return
*/
function xtc_get_address_formats() {
$address_format_query = xtc_db_query("select address_format_id from ".TABLE_ADDRESS_FORMAT." order by address_format_id");
$address_format_array = array ();
while ($address_format_values = xtc_db_fetch_array($address_format_query)) {
ca. Zeile 842
}
return $address_format_array;
}
////
// Alias function for Store configuration values in the Administration Tool
/**
* xtc_cfg_pull_down_country_list()
*
* @param mixed $country_id
* @return
*/
function xtc_cfg_pull_down_country_list($country_id) {
return xtc_draw_pull_down_menu('configuration_value', xtc_get_countries(), $country_id);
}
/**
* xtc_cfg_pull_down_zone_list()
*
* @param mixed $zone_id
* @return
*/
function xtc_cfg_pull_down_zone_list($zone_id) {
return xtc_draw_pull_down_menu('configuration_value', xtc_get_country_zones(STORE_COUNTRY), $zone_id);
}
/**
* xtc_cfg_pull_down_tax_classes()
*
* @param mixed $tax_class_id
* @param string $key
* @return
*/
function xtc_cfg_pull_down_tax_classes($tax_class_id, $key = '') {
$name = (($key) ? 'configuration['.$key.']' : 'configuration_value');
$tax_class_array = array (array ('id' => '0', 'text' => TEXT_NONE));
$tax_class_query = xtc_db_query("select tax_class_id, tax_class_title from ".TABLE_TAX_CLASS." order by tax_class_title");
while ($tax_class = xtc_db_fetch_array($tax_class_query)) {
$tax_class_array[] = array ('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']);
ca. Zeile 860
$tax_class_query = xtc_db_query("select tax_class_id, tax_class_title from ".TABLE_TAX_CLASS." order by tax_class_title");
while ($tax_class = xtc_db_fetch_array($tax_class_query)) {
$tax_class_array[] = array ('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']);
}
return xtc_draw_pull_down_menu($name, $tax_class_array, $tax_class_id);
}
////
// Function to read in text area in admin
//BOF - web28- 2010-07-06 - added missing code
//function xtc_cfg_textarea($text) {
//return xtc_draw_textarea_field('configuration_value', false, 35, 5, $text);
//}
/**
* xtc_cfg_textarea()
*
* @param mixed $text
* @param string $key
* @return
*/
function xtc_cfg_textarea($text, $key = '') {
$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');
$name = (!empty($key)) ? 'configuration[' . $key . ']' : 'configuration_value'; //web28 - 2011-04-26 - fixed set undefined $key
return xtc_draw_textarea_field($name, false, 35, 3, $text, 'class="textareaModule"');
}
//EOF - web28- 2010-07-06 - added missing code
/**
* xtc_cfg_get_zone_name()
*
* @param mixed $zone_id
* @return
*/
function xtc_cfg_get_zone_name($zone_id) {
$zone_query = xtc_db_query("select zone_name from ".TABLE_ZONES." where zone_id = '".$zone_id."'");
if (!xtc_db_num_rows($zone_query)) {
return $zone_id;
} else {
$zone = xtc_db_fetch_array($zone_query);
ca. Zeile 887
return $zone['zone_name'];
}
}
////
// Sets the status of a banner
/**
* xtc_set_banner_status()
*
* @param mixed $banners_id
* @param mixed $status
* @return
*/
function xtc_set_banner_status($banners_id, $status) {
if ($status == '1') {
return xtc_db_query("update ".TABLE_BANNERS." set status = '1', expires_impressions = NULL, expires_date = NULL, date_status_change = NULL where banners_id = '".$banners_id."'");
}
elseif ($status == '0') {
} elseif ($status == '0') {
return xtc_db_query("update ".TABLE_BANNERS." set status = '0', date_status_change = now() where banners_id = '".$banners_id."'");
} else {
return -1;
}
}
////
// Sets the status of a product on special
/**
* xtc_set_specials_status()
*
* @param mixed $specials_id
* @param mixed $status
* @return
*/
function xtc_set_specials_status($specials_id, $status) {
if ($status == '1') {
return xtc_db_query("update ".TABLE_SPECIALS." set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '".$specials_id."'");
}
elseif ($status == '0') {
} elseif ($status == '0') {
return xtc_db_query("update ".TABLE_SPECIALS." set status = '0', date_status_change = now() where specials_id = '".$specials_id."'");
} else {
return -1;
}
}
////
// Sets timeout for the current script.
// Cant be used in safe mode.
/**
* xtc_set_time_limit()
*
* @param mixed $limit
* @return
*/
function xtc_set_time_limit($limit) {
if (!get_cfg_var('safe_mode')) {
@ set_time_limit($limit);
}
}
////
// Alias function for Store configuration values in the Administration Tool
/**
* xtc_cfg_select_option()
*
* @param mixed $select_array
* @param mixed $key_value
* @param string $key
* @return
*/
function xtc_cfg_select_option($select_array, $key_value, $key = '') {
$string = '';
for ($i = 0, $n = sizeof($select_array); $i < $n; $i ++) {
$name = (($key) ? 'configuration['.$key.']' : 'configuration_value');
// BOF vr - 2010-02-04 admin configuration pages 3 column layout - modified by web28 2010-06-09
/*$string .= '<br /><input type="radio" name="'.$name.'" value="'.$select_array[$i].'"';
if ($key_value == $select_array[$i])
$string .= ' CHECKED';
$string .= '> '.$select_array[$i];*/
if ($i == 0)
if ($i == 0) {
$string .= '<input type="radio" name="'.$name.'" value="'.$select_array[$i].'"';
else
} else {
$string .= '<br /><input type="radio" name="'.$name.'" value="'.$select_array[$i].'"';
}
if ($key_value == $select_array[$i])
$string .= ' CHECKED';
$string .= '> '.$select_array[$i];
// EOF vr - 2010-02-04 admin configuration pages 3 column layout - modified by web28 2010-06-09
ca. Zeile 941
$string .= ' CHECKED';
$string .= '> '.$select_array[$i];
// EOF vr - 2010-02-04 admin configuration pages 3 column layout - modified by web28 2010-06-09
}
return $string;
}
////
// Alias function for module configuration keys
/**
* xtc_mod_select_option()
*
* @param mixed $select_array
* @param mixed $key_name
* @param mixed $key_value
* @return
*/
function xtc_mod_select_option($select_array, $key_name, $key_value) {
reset($select_array);
while (list ($key, $value) = each($select_array)) {
if (is_int($key))
ca. Zeile 957
if ($key_value == $key)
$string .= ' CHECKED';
$string .= '> '.$value;
}
return $string;
}
////
// Retreive server information
/**
* xtc_get_system_information()
*
* @return
*/
function xtc_get_system_information() {
$db_query = xtc_db_query("select now() as datetime");
$db = xtc_db_fetch_array($db_query);
list ($system, $host, $kernel) = preg_split('/[\s,]+/', @ exec('uname -a'), 5);
return array ('date' => xtc_datetime_short(date('Y-m-d H:i:s')), 'system' => $system, 'kernel' => $kernel, 'host' => $host, 'ip' => gethostbyname($host), 'uptime' => @ exec('uptime'), 'http_server' => $_SERVER['SERVER_SOFTWARE'], 'php' => PHP_VERSION, 'zend' => (function_exists('zend_version') ? zend_version() : ''), 'db_server' => DB_SERVER, 'db_ip' => gethostbyname(DB_SERVER), 'db_version' => 'MySQL '. (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''), 'db_date' => xtc_datetime_short($db['datetime']));
//get server uptime on Windows & Unix/Linux systems
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$uptime = @exec("net statistics srv | find /i \"Stat\"");
} else {
$uptime = @exec('uptime');
}
return array (
//System information
'date' => date('Y-m-d H:i:s O T'), //DokuMan - 2011-05-10 - Update date with timezone
'os' => PHP_OS,
'system' => php_uname('s'),
'kernel' => php_uname('v'),
'host' => php_uname('n'),
'ip' => gethostbyname(php_uname('n')),
'uptime' => $uptime,
'http_server' => $_SERVER['SERVER_SOFTWARE'],
//MYSQL information
'db_server' => DB_SERVER, 'db_ip' => gethostbyname(DB_SERVER),
'db_version' => 'MySQL '. (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''),
'db_date' => $db['datetime'], //DokuMan - 2011-05-10 - Update date with timezone
//PHP information
'php' => PHP_VERSION,
'zend' => (function_exists('zend_version') ? zend_version() : ''),
'sapi' => PHP_SAPI,
'int_size' => defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '',
'safe_mode' => (int) @ini_get('safe_mode'),
'open_basedir' => (int) @ini_get('open_basedir'),
'memory_limit' => @ini_get('memory_limit'),
'error_reporting' => error_reporting(),
'display_errors' => (int)@ini_get('display_errors'),
'allow_url_fopen' => (int) @ini_get('allow_url_fopen'),
'allow_url_include' => (int) @ini_get('allow_url_include'),
'file_uploads' => (int) @ini_get('file_uploads'),
'upload_max_filesize' => @ini_get('upload_max_filesize'),
'post_max_size' => @ini_get('post_max_size'),
'disable_functions' => @ini_get('disable_functions'),
'disable_classes' => @ini_get('disable_classes'),
'enable_dl' => (int) @ini_get('enable_dl'),
'magic_quotes_gpc' => (int) @ini_get('magic_quotes_gpc'),
'register_globals' => (int) @ini_get('register_globals'),
'filter.default' => @ini_get('filter.default'),
'zend.ze1_compatibility_mode' => (int) @ini_get('zend.ze1_compatibility_mode'),
'unicode.semantics' => (int) @ini_get('unicode.semantics'),
'zend_thread_safty' => (int) function_exists('zend_thread_id'),
'extensions' => get_loaded_extensions());
}
function xtc_array_shift(& $array) {
if (function_exists('array_shift')) {
ca. Zeile 1006
return $reversed_array;
}
}
/**
* xtc_generate_category_path()
*
* @param mixed $id
* @param string $from
* @param string $categories_array
* @param integer $index
* @return
*/
function xtc_generate_category_path($id, $from = 'category', $categories_array = '', $index = 0) {
if (!is_array($categories_array))
$categories_array = array ();
if ($from == 'product') {
$categories_query = xtc_db_query("select categories_id from ".TABLE_PRODUCTS_TO_CATEGORIES." where products_id = '".$id."'");
while ($categories = xtc_db_fetch_array($categories_query)) {
if ($categories['categories_id'] == '0') {
ca. Zeile 1017
while ($categories = xtc_db_fetch_array($categories_query)) {
if ($categories['categories_id'] == '0') {
$categories_array[$index][] = array ('id' => '0', 'text' => TEXT_TOP);
} else {
$category_query = xtc_db_query("select cd.categories_name, c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.categories_id = '".$categories['categories_id']."' and c.categories_id = cd.categories_id and cd.language_id = '".$_SESSION['languages_id']."'");
$category_query = xtc_db_query("select cd.categories_name, c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.categories_id = '".$categories['categories_id']."' and c.categories_id = cd.categories_id and cd.language_id = '".(int)$_SESSION['languages_id']."'");
$category = xtc_db_fetch_array($category_query);
$categories_array[$index][] = array ('id' => $categories['categories_id'], 'text' => $category['categories_name']);
if ((xtc_not_null($category['parent_id'])) && ($category['parent_id'] != '0'))
$categories_array = xtc_generate_category_path($category['parent_id'], 'category', $categories_array, $index);
$categories_array[$index] = xtc_array_reverse($categories_array[$index]);
$categories_array[$index] = array_reverse($categories_array[$index]);
}
$index ++;
}
}
elseif ($from == 'category') {
$category_query = xtc_db_query("select cd.categories_name, c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.categories_id = '".$id."' and c.categories_id = cd.categories_id and cd.language_id = '".$_SESSION['languages_id']."'");
} elseif ($from == 'category') {
$category_query = xtc_db_query("select cd.categories_name, c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.categories_id = '".$id."' and c.categories_id = cd.categories_id and cd.language_id = '".(int)$_SESSION['languages_id']."'");
$category = xtc_db_fetch_array($category_query);
$categories_array[$index][] = array ('id' => $id, 'text' => $category['categories_name']);
if ((xtc_not_null($category['parent_id'])) && ($category['parent_id'] != '0'))
$categories_array = xtc_generate_category_path($category['parent_id'], 'category', $categories_array, $index);
ca. Zeile 1034
$categories_array[$index][] = array ('id' => $id, 'text' => $category['categories_name']);
if ((xtc_not_null($category['parent_id'])) && ($category['parent_id'] != '0'))
$categories_array = xtc_generate_category_path($category['parent_id'], 'category', $categories_array, $index);
}
return $categories_array;
}
/**
* xtc_output_generated_category_path()
*
* @param mixed $id
* @param string $from
* @return
*/
function xtc_output_generated_category_path($id, $from = 'category') {
$calculated_category_path_string = '';
$calculated_category_path = xtc_generate_category_path($id, $from);
for ($i = 0, $n = sizeof($calculated_category_path); $i < $n; $i ++) {
ca. Zeile 1047
$calculated_category_path_string .= $calculated_category_path[$i][$j]['text'].' > ';
}
$calculated_category_path_string = substr($calculated_category_path_string, 0, -16).'<br />';
}
$calculated_category_path_string = substr($calculated_category_path_string, 0, -4);
$calculated_category_path_string = substr($calculated_category_path_string, 0, -6); //DokuMan - remove <br /> from description
if (strlen($calculated_category_path_string) < 1)
$calculated_category_path_string = TEXT_TOP;
return $calculated_category_path_string;
}
//deletes all product image files by filename
ca. Zeile 1056
return $calculated_category_path_string;
}
//deletes all product image files by filename
/**
* xtc_del_image_file()
*
* @param mixed $image
* @return
*/
function xtc_del_image_file($image) {
if (file_exists(DIR_FS_CATALOG_POPUP_IMAGES.$image)) {
@ unlink(DIR_FS_CATALOG_POPUP_IMAGES.$image);
}
ca. Zeile 1071
@ unlink(DIR_FS_CATALOG_INFO_IMAGES.$image);
}
}
function xtc_remove_order($order_id, $restock = false) {
/**
* xtc_remove_order()
*
* @param mixed $order_id
* @param bool $restock
* @return
*/
function xtc_remove_order($order_id, $restock = false) {
if ($restock == 'on') {
xtc_db_query("update ".TABLE_PRODUCTS." p
join ".TABLE_ORDERS_PRODUCTS." o on o.products_id = p.products_id
set p.products_quantity = p.products_quantity + o.products_quantity,
p.products_ordered = p.products_ordered - o.products_quantity
where o.orders_id = '".xtc_db_input($order_id)."'");
}
xtc_db_query("delete from ".TABLE_ORDERS." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_PRODUCTS." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_STATUS_HISTORY." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_TOTAL." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_PRODUCTS_DOWNLOAD." where orders_id = '".xtc_db_input($order_id)."'");
}
/**
* xtc_reverse_order()
*
* @param mixed $order_id
* @param bool $restock
* @return
*/
function xtc_reverse_order($order_id, $restock = false, $order_status_id) {
if ($restock == 'on') {
$order_query = xtc_db_query("select products_id, products_quantity from ".TABLE_ORDERS_PRODUCTS." where orders_id = '".xtc_db_input($order_id)."'");
while ($order = xtc_db_fetch_array($order_query)) {
xtc_db_query("update ".TABLE_PRODUCTS." set products_quantity = products_quantity + ".$order['products_quantity'].", products_ordered = products_ordered - ".$order['products_quantity']." where products_id = '".$order['products_id']."'");
}
}
xtc_db_query("delete from ".TABLE_ORDERS." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_PRODUCTS." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_STATUS_HISTORY." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete from ".TABLE_ORDERS_TOTAL." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("update ".TABLE_ORDERS." set orders_status = ".$order_status_id." where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("update ".TABLE_ORDERS_TOTAL." set value = '0.0000' where orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("update ".TABLE_ORDERS_TOTAL." set text = '' where orders_id = '".xtc_db_input($order_id)."'");
}
/**
* xtc_reset_cache_block()
*
* @param mixed $cache_block
* @return
*/
function xtc_reset_cache_block($cache_block) {
global $cache_blocks;
for ($i = 0, $n = sizeof($cache_blocks); $i < $n; $i ++) {
if ($cache_blocks[$i]['code'] == $cache_block) {
if ($cache_blocks[$i]['multiple']) {
if ($dir = @ opendir(DIR_FS_CACHE)) {
ca. Zeile 1097
while ($cache_file = readdir($dir)) {
$cached_file = $cache_blocks[$i]['file'];
$languages = xtc_get_languages();
for ($j = 0, $k = sizeof($languages); $j < $k; $j ++) {
$cached_file_unlink = preg_replace('/-language/', '-'.$languages[$j]['directory'], $cached_file); // Hetfield - 2009-08-19 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
$cached_file_unlink = preg_replace('/-language/i', '-'.$languages[$j]['directory'], $cached_file); // Hetfield - 2009-08-19 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
if (preg_match('/^'.$cached_file_unlink.'/', $cache_file)) { // Hetfield - 2009-08-19 - replaced deprecated function ereg with preg_match to be ready for PHP >= 5.3
@ unlink(DIR_FS_CACHE.$cache_file);
}
}
ca. Zeile 1109
} else {
$cached_file = $cache_blocks[$i]['file'];
$languages = xtc_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) {
$cached_file = preg_replace('/-language/', '-'.$languages[$i]['directory'], $cached_file); // Hetfield - 2009-08-19 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
$cached_file = preg_replace('/-language/i', '-'.$languages[$i]['directory'], $cached_file); // Hetfield - 2009-08-19 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
@ unlink(DIR_FS_CACHE.$cached_file);
}
}
break;
}
}
}
/**
* xtc_get_file_permissions()
*
* @param mixed $mode
* @return
*/
function xtc_get_file_permissions($mode) {
// determine type
if (($mode & 0xC000) == 0xC000) { // unix domain socket
$type = 's';
}
elseif (($mode & 0x4000) == 0x4000) { // directory
} elseif (($mode & 0x4000) == 0x4000) { // directory
$type = 'd';
}
elseif (($mode & 0xA000) == 0xA000) { // symbolic link
} elseif (($mode & 0xA000) == 0xA000) { // symbolic link
$type = 'l';
}
elseif (($mode & 0x8000) == 0x8000) { // regular file
} elseif (($mode & 0x8000) == 0x8000) { // regular file
$type = '-';
}
elseif (($mode & 0x6000) == 0x6000) { //bBlock special file
} elseif (($mode & 0x6000) == 0x6000) { //bBlock special file
$type = 'b';
}
elseif (($mode & 0x2000) == 0x2000) { // character special file
} elseif (($mode & 0x2000) == 0x2000) { // character special file
$type = 'c';
}
elseif (($mode & 0x1000) == 0x1000) { // named pipe
} elseif (($mode & 0x1000) == 0x1000) { // named pipe
$type = 'p';
} else { // unknown
$type = '?';
}
ca. Zeile 1162
if ($mode & 0x400)
$group['execute'] = ($group['execute'] == 'x') ? 's' : 'S';
if ($mode & 0x200)
$world['execute'] = ($world['execute'] == 'x') ? 't' : 'T';
return $type.$owner['read'].$owner['write'].$owner['execute'].$group['read'].$group['write'].$group['execute'].$world['read'].$world['write'].$world['execute'];
}
/**
* xtc_array_slice()
*
* @param mixed $array
* @param mixed $offset
* @param string $length
* @return
*/
function xtc_array_slice($array, $offset, $length = '0') {
if (function_exists('array_slice')) {
return array_slice($array, $offset, $length);
} else {
ca. Zeile 1185
return $new_array;
}
}
/**
* xtc_remove()
*
* @param mixed $source
* @return
*/
function xtc_remove($source) {
global $messageStack, $xtc_remove_error;
if (isset ($xtc_remove_error))
$xtc_remove_error = false;
if (is_dir($source)) {
$dir = dir($source);
while ($file = $dir->read()) {
if (($file != '.') && ($file != '..')) {
ca. Zeile 1221
}
}
}
////
// Wrapper for constant() function
// Needed because its only available in PHP 4.0.4 and higher.
/**
* xtc_constant()
*
* @param mixed $constant
* @return
*/
function xtc_constant($constant) {
if (function_exists('constant')) {
$temp = constant($constant);
} else {
ca. Zeile 1233
}
return $temp;
}
////
// Output the tax percentage with optional padded decimals
/**
* xtc_display_tax_value()
*
* @param mixed $value
* @param mixed $padding
* @return
*/
function xtc_display_tax_value($value, $padding = TAX_DECIMAL_PLACES) {
if (strpos($value, '.')) {
$loop = true;
while ($loop) {
ca. Zeile 1263
$value .= '0';
}
}
}
return $value;
}
/**
* xtc_get_tax_class_title()
*
* @param mixed $tax_class_id
* @return
*/
function xtc_get_tax_class_title($tax_class_id) {
if ($tax_class_id == '0') {
return TEXT_NONE;
} else {
ca. Zeile 1278
return $classes['tax_class_title'];
}
}
/**
* xtc_banner_image_extension()
*
* @return
*/
function xtc_banner_image_extension() {
if (function_exists('imagetypes')) {
if (imagetypes() & IMG_PNG) {
return 'png';
}
elseif (imagetypes() & IMG_JPG) {
} elseif (imagetypes() & IMG_JPG) {
return 'jpg';
}
elseif (imagetypes() & IMG_GIF) {
} elseif (imagetypes() & IMG_GIF) {
return 'gif';
}
}
elseif (function_exists('imagecreatefrompng') && function_exists('imagepng')) {
} elseif (function_exists('imagecreatefrompng') && function_exists('imagepng')) {
return 'png';
}
elseif (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg')) {
} elseif (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg')) {
return 'jpg';
}
elseif (function_exists('imagecreatefromgif') && function_exists('imagegif')) {
} elseif (function_exists('imagecreatefromgif') && function_exists('imagegif')) {
return 'gif';
}
return false;
}
////
// Wrapper function for round()
/**
* xtc_round()
*
* @param mixed $value
* @param mixed $precision
* @return
*/
function xtc_round($value, $precision) {
return round($value, $precision);
}
ca. Zeile 1309
function xtc_round($value, $precision) {
return round($value, $precision);
}
// Calculates Tax rounding the result
/**
* xtc_calculate_tax()
*
* @param mixed $price
* @param mixed $tax
* @return
*/
function xtc_calculate_tax($price, $tax) {
global $currencies;
return xtc_round($price * $tax / 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
}
/**
* xtc_call_function()
*
* @param mixed $function
* @param mixed $parameter
* @param string $object
* @return
*/
function xtc_call_function($function, $parameter, $object = '') {
if ($object == '') {
if (empty($object)) {
return call_user_func($function, $parameter);
} else {
return call_user_func(array ($object, $function), $parameter);
}
}
/**
* xtc_get_zone_class_title()
*
* @param mixed $zone_class_id
* @return
*/
function xtc_get_zone_class_title($zone_class_id) {
if ($zone_class_id == '0') {
return TEXT_NONE;
} else {
ca. Zeile 1338
return $classes['geo_zone_name'];
}
}
/**
* xtc_cfg_pull_down_template_sets()
*
* @return
*/
function xtc_cfg_pull_down_template_sets() {
$name = (($key) ? 'configuration['.$key.']' : 'configuration_value');
$name = (isset($key) ? 'configuration['.$key.']' : 'configuration_value'); //DokuMan - set undefined $key
if ($dir = opendir(DIR_FS_CATALOG.'templates/')) {
while (($templates = readdir($dir)) !== false) {
if (is_dir(DIR_FS_CATALOG.'templates/'."//".$templates) and ($templates != "CVS") and ($templates != ".") and ($templates != "..")) {
$templates_array[] = array ('id' => $templates, 'text' => $templates);
ca. Zeile 1352
return xtc_draw_pull_down_menu($name, $templates_array, CURRENT_TEMPLATE);
}
}
/**
* xtc_cfg_pull_down_zone_classes()
*
* @param mixed $zone_class_id
* @param string $key
* @return
*/
function xtc_cfg_pull_down_zone_classes($zone_class_id, $key = '') {
$name = (($key) ? 'configuration['.$key.']' : 'configuration_value');
$zone_class_array = array (array ('id' => '0', 'text' => TEXT_NONE));
$zone_class_query = xtc_db_query("select geo_zone_id, geo_zone_name from ".TABLE_GEO_ZONES." order by geo_zone_name");
while ($zone_class = xtc_db_fetch_array($zone_class_query)) {
$zone_class_array[] = array ('id' => $zone_class['geo_zone_id'], 'text' => $zone_class['geo_zone_name']);
ca. Zeile 1360
$zone_class_query = xtc_db_query("select geo_zone_id, geo_zone_name from ".TABLE_GEO_ZONES." order by geo_zone_name");
while ($zone_class = xtc_db_fetch_array($zone_class_query)) {
$zone_class_array[] = array ('id' => $zone_class['geo_zone_id'], 'text' => $zone_class['geo_zone_name']);
}
return xtc_draw_pull_down_menu($name, $zone_class_array, $zone_class_id);
}
/**
* xtc_cfg_pull_down_order_statuses()
*
* @param mixed $order_status_id
* @param string $key
* @return
*/
function xtc_cfg_pull_down_order_statuses($order_status_id, $key = '') {
$name = (($key) ? 'configuration['.$key.']' : 'configuration_value');
$statuses_array = array (array ('id' => '1', 'text' => TEXT_DEFAULT));
$statuses_query = xtc_db_query("select orders_status_id, orders_status_name from ".TABLE_ORDERS_STATUS." where language_id = '".$_SESSION['languages_id']."' order by orders_status_name");
$statuses_query = xtc_db_query("select orders_status_id, orders_status_name from ".TABLE_ORDERS_STATUS." where language_id = '".(int)$_SESSION['languages_id']."' order by orders_status_name");
while ($statuses = xtc_db_fetch_array($statuses_query)) {
$statuses_array[] = array ('id' => $statuses['orders_status_id'], 'text' => $statuses['orders_status_name']);
}
return xtc_draw_pull_down_menu($name, $statuses_array, $order_status_id);
}
/**
* xtc_get_order_status_name()
*
* @param mixed $order_status_id
* @param string $language_id
* @return
*/
function xtc_get_order_status_name($order_status_id, $language_id = '') {
if ($order_status_id < 1)
return TEXT_DEFAULT;
if (!is_numeric($language_id))
$language_id = $_SESSION['languages_id'];
$status_query = xtc_db_query("select orders_status_name from ".TABLE_ORDERS_STATUS." where orders_status_id = '".$order_status_id."' and language_id = '".$language_id."'");
$status = xtc_db_fetch_array($status_query);
return $status['orders_status_name'];
}
////
ca. Zeile 1411
} else {
return mt_rand();
}
}
// nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
/**
* xtc_convert_linefeeds()
*
* @param mixed $from
* @param mixed $to
* @param mixed $string
* @return
*/
function xtc_convert_linefeeds($from, $to, $string) {
if ((PHP_VERSION < "4.0.5") && is_array($from)) {
return preg_replace('/('.implode('|', $from).')/', $to, $string); // Hetfield - 2009-08-19 - replaced deprecated function ereg_replace with preg_replace to be ready for PHP >= 5.3
} else {
ca. Zeile 1461
return $customers_statuses_array;
//EOC - Web28 - 2011-10-29 - BUGFIX $customers_statuses_array
}
/**
* xtc_get_customer_status()
*
* @param mixed $customers_id
* @return
*/
function xtc_get_customer_status($customers_id) {
$customer_status_array = array ();
$customer_status_query = xtc_db_query("select customers_status, member_flag, customers_status_name, customers_status_public, customers_status_image, customers_status_discount, customers_status_ot_discount_flag, customers_status_ot_discount, customers_status_graduated_prices FROM ".TABLE_CUSTOMERS." left join ".TABLE_CUSTOMERS_STATUS." on customers_status = customers_status_id where customers_id='".$customers_id."' and language_id = '".$_SESSION['languages_id']."'");
$customer_status_query = xtc_db_query("select customers_status,
member_flag, customers_status_name,
customers_status_public,
customers_status_image,
customers_status_discount,
customers_status_ot_discount_flag,
customers_status_ot_discount,
customers_status_graduated_prices
FROM ".TABLE_CUSTOMERS."
left join ".TABLE_CUSTOMERS_STATUS." on customers_status = customers_status_id
where customers_id='".$customers_id."'
and language_id = '".(int)$_SESSION['languages_id']."'");
$customer_status_array = xtc_db_fetch_array($customer_status_query);
return $customer_status_array;
}
/**
* xtc_get_customers_status_name()
*
* @param mixed $customers_status_id
* @param string $language_id
* @return
*/
function xtc_get_customers_status_name($customers_status_id, $language_id = '') {
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$customers_status_query = xtc_db_query("select customers_status_name from ".TABLE_CUSTOMERS_STATUS." where customers_status_id = '".$customers_status_id."' and language_id = '".$language_id."'");
$customers_status = xtc_db_fetch_array($customers_status_query);
ca. Zeile 1479
return $customers_status['customers_status_name'];
}
//to set customers status in admin for default value, newsletter, guest...
/**
* xtc_cfg_pull_down_customers_status_list()
*
* @param mixed $customers_status_id
* @param string $key
* @return
*/
function xtc_cfg_pull_down_customers_status_list($customers_status_id, $key = '') {
$name = (($key) ? 'configuration['.$key.']' : 'configuration_value');
return xtc_draw_pull_down_menu($name, xtc_get_customers_statuses(), $customers_status_id);
}
// Function for collecting ip
// return all log info for a customer_id
/**
* xtc_get_user_info()
*
* @param mixed $customer_id
* @return
*/
function xtc_get_user_info($customer_id) {
$user_info_array = xtc_db_query("select customers_ip, customers_ip_date, customers_host, customers_advertiser, customers_referer_url FROM ".TABLE_CUSTOMERS_IP." where customers_id = '".$customer_id."'");
return $user_info_array;
}
//---------------------------------------------------------------kommt wieder raus spaeter!!
/**
* xtc_get_uploaded_file()
*
* @param mixed $filename
* @return
*/
function xtc_get_uploaded_file($filename) {
if (isset ($_FILES[$filename])) {
$uploaded_file = array ('name' => $_FILES[$filename]['name'], 'type' => $_FILES[$filename]['type'], 'size' => $_FILES[$filename]['size'], 'tmp_name' => $_FILES[$filename]['tmp_name']);
}
elseif (isset ($_FILES[$filename])) {
} elseif (isset ($_FILES[$filename])) {
$uploaded_file = array ('name' => $_FILES[$filename]['name'], 'type' => $_FILES[$filename]['type'], 'size' => $_FILES[$filename]['size'], 'tmp_name' => $_FILES[$filename]['tmp_name']);
} else {
$uploaded_file = array ('name' => $GLOBALS[$filename.'_name'], 'type' => $GLOBALS[$filename.'_type'], 'size' => $GLOBALS[$filename.'_size'], 'tmp_name' => $GLOBALS[$filename]);
}
ca. Zeile 1501
$uploaded_file = array ('name' => $_FILES[$filename]['name'], 'type' => $_FILES[$filename]['type'], 'size' => $_FILES[$filename]['size'], 'tmp_name' => $_FILES[$filename]['tmp_name']);
} else {
$uploaded_file = array ('name' => $GLOBALS[$filename.'_name'], 'type' => $GLOBALS[$filename.'_type'], 'size' => $GLOBALS[$filename.'_size'], 'tmp_name' => $GLOBALS[$filename]);
}
return $uploaded_file;
}
/**
* get_group_price()
*
* @param mixed $group_id
* @param mixed $product_id
* @return
*/
function get_group_price($group_id, $product_id) {
// well, first try to get group price from database
$group_price_query = xtc_db_query("SELECT personal_offer FROM ".TABLE_PERSONAL_OFFERS_BY.$group_id." WHERE products_id = '".$product_id."' and quantity=1");
$group_price_data = xtc_db_fetch_array($group_price_query);
ca. Zeile 1516
if (!xtc_db_num_rows($group_price_query)) {
xtc_db_query("INSERT INTO ".TABLE_PERSONAL_OFFERS_BY.$group_id." (price_id, products_id, quantity, personal_offer) VALUES ('', '".$product_id."', '1', '0.00')");
$group_price_query = xtc_db_query("SELECT personal_offer FROM ".TABLE_PERSONAL_OFFERS_BY.$group_id." WHERE products_id = '".$product_id."' ORDER BY quantity ASC");
$group_price_data = xtc_db_fetch_array($group_price_query);
} else
} else {
if (xtc_db_num_rows($group_price_query) > 1) {
while ($data = xtc_db_fetch_array($group_price_query)) {
$group_price_data['personal_offer'] = $data['personal_offer'];
}
ca. Zeile 1527
xtc_db_query("INSERT INTO ".TABLE_PERSONAL_OFFERS_BY.$group_id." (price_id, products_id, quantity, personal_offer) VALUES ('', '".$product_id."', '1', '".$group_price_data['personal_offer']."')");
$group_price_query = xtc_db_query("SELECT personal_offer FROM ".TABLE_PERSONAL_OFFERS_BY.$group_id." WHERE products_id = '".$product_id."' ORDER BY quantity ASC");
$group_price_data = xtc_db_fetch_array($group_price_query);
}
}
return $group_price_data['personal_offer'];
}
/**
* format_price()
*
* @param mixed $price_string
* @param mixed $price_special
* @param mixed $currency
* @param mixed $allow_tax
* @param mixed $tax_rate
* @return
*/
function format_price($price_string, $price_special, $currency, $allow_tax, $tax_rate) {
// calculate currencies
$currencies_query = xtc_db_query("SELECT
symbol_left,
$currencies_query = xtc_db_query("SELECT symbol_left,
symbol_right,
decimal_places,
value
FROM
".TABLE_CURRENCIES."
WHERE
code = '".$currency."'");
FROM ".TABLE_CURRENCIES."
WHERE code = '".$currency."'");
$currencies_value = xtc_db_fetch_array($currencies_query);
$currencies_data = array ();
$currencies_data = array ('SYMBOL_LEFT' => $currencies_value['symbol_left'], 'SYMBOL_RIGHT' => $currencies_value['symbol_right'], 'DECIMAL_PLACES' => $currencies_value['decimal_places'], 'VALUE' => $currencies_value['value']);
// round price
if ($allow_tax == 1)
$price_string = $price_string / ((100 + $tax_rate) / 100);
$price_string = precision($price_string, $currencies_data['DECIMAL_PLACES']);
ca. Zeile 1556
}
return $price_string;
}
/**
* precision()
*
* @param mixed $number
* @param mixed $places
* @return
*/
function precision($number, $places) {
$number = number_format($number, $places, '.', '');
return $number;
}
/**
* xtc_get_lang_definition()
*
* @param mixed $search_lang
* @param mixed $lang_array
* @param mixed $modifier
* @return
*/
function xtc_get_lang_definition($search_lang, $lang_array, $modifier) {
$search_lang = $search_lang.$modifier;
return $lang_array[$search_lang];
}
/**
* xtc_CheckExt()
*
* @param mixed $filename
* @param mixed $ext
* @return
*/
function xtc_CheckExt($filename, $ext) {
$passed = FALSE;
$testExt = "\.".$ext."$";
if (preg_match('/'.$testExt.'/i', $filename)) { // Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
ca. Zeile 1575
}
return $passed;
}
/**
* xtc_get_status_users()
*
* @param mixed $status_id
* @return
*/
function xtc_get_status_users($status_id) {
$status_query = xtc_db_query("SELECT count(customers_status) as count FROM ".TABLE_CUSTOMERS." WHERE customers_status = '".$status_id."'");
$status_data = xtc_db_fetch_array($status_query);
return $status_data['count'];
}
function xtc_mkdirs($path, $perm) {
/**
* xtc_mkdirs()
*
* @param mixed $path
* @param mixed $perm
* @return
*/
function xtc_mkdirs($path, $perm) {
if (is_dir($path)) {
return true;
} else {
//$path=dirname($path);
if (!mkdir($path, $perm))
return false;
mkdir($path, $perm);
ca. Zeile 1594
return true;
}
}
/**
* xtc_spaceUsed()
*
* @param mixed $dir
* @return float
*/
function xtc_spaceUsed($dir) {
$totalspaceUsed = ''; //DokuMan - 2011-09-06 - sum up correct filesize avoiding global variable
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (is_dir($dir.$file) && $file != '.' && $file != '..') {
xtc_spaceUsed($dir.$file.'/');
} else {
$GLOBALS['total'] += filesize($dir.$file);
//BOF - DokuMan - 2011-09-06 - sum up correct filesize avoiding global variable
//$GLOBALS['total'] += filesize($dir.$file);
$totalspaceUsed += filesize($dir.$file);
//EOF - DokuMan - 2011-09-06 - sum up correct filesize avoiding global variable
}
}
closedir($dh);
}
}
return $totalspaceUsed; //DokuMan - 2011-09-06 - sum up correct filesize avoiding global variable
}
/**
* create_coupon_code()
*
* @param string $salt
* @param mixed $length
* @return
*/
function create_coupon_code($salt = "secret", $length = SECURITY_CODE_LENGTH) {
$ccid = md5(uniqid("", "salt"));
$ccid .= md5(uniqid("", "salt"));
$ccid .= md5(uniqid("", "salt"));
ca. Zeile 1627
return $id1;
}
// Update the Customers GV account
/**
* xtc_gv_account_update()
*
* @param mixed $customer_id
* @param mixed $gv_id
* @return
*/
function xtc_gv_account_update($customer_id, $gv_id) {
$customer_gv_query = xtc_db_query("select amount from ".TABLE_COUPON_GV_CUSTOMER." where customer_id = '".$customer_id."'");
$coupon_gv_query = xtc_db_query("select coupon_amount from ".TABLE_COUPONS." where coupon_id = '".$gv_id."'");
$coupon_gv = xtc_db_fetch_array($coupon_gv_query);
ca. Zeile 1641
}
}
// Output a day/month/year dropdown selector
/**
* xtc_draw_date_selector()
*
* @param mixed $prefix
* @param string $date
* @return
*/
function xtc_draw_date_selector($prefix, $date = '') {
$month_array = array ();
$month_array[1] = _JANUARY;
$month_array[2] = _FEBRUARY;
ca. Zeile 1686
$date_selector .= '</select>';
return $date_selector;
}
/**
* xtc_getDownloads()
*
* @return
*/
function xtc_getDownloads() {
$files = array ();
$dir = DIR_FS_CATALOG.'download/';
if ($fp = opendir($dir)) {
while ($file = readdir($fp)) {
if (is_file($dir.$file) && $file != '.htaccess') {
ca. Zeile 1703
}
return $files;
}
function xtc_try_upload($file = '', $destination = '', $permissions = '777', $extensions = '') {
$file_object = new upload($file, $destination, $permissions, $extensions);
if ($file_object->filename != '')
/**
* xtc_try_upload()
*
* @param string $file
* @param string $destination
* @param string $permissions
* @param string $extensions
* @param string $mime_types
* @return
*/
function xtc_try_upload($file = '', $destination = '', $permissions = '777', $extensions = '', $mime_types = '') {
$file_object = new upload($file, $destination, $permissions, $extensions, $mime_types);
if ($file_object->filename != '') {
return $file_object;
else
} else {
return false;
}
}
/**
* xtc_button()
*
* @param mixed $value
* @param string $type
* @param string $parameter
* @return
*/
function xtc_button($value, $type='submit', $parameter='') {
return '<input type="'.$type.'" class="button" onclick="this.blur();" value="' . $value . '" ' . $parameter . ' >';
}
/**
* xtc_button_link()
*
* @param mixed $value
* @param string $href
* @param string $parameter
* @return
*/
function xtc_button_link($value, $href='javascript:void(null)', $parameter='') {
return '<a href="'.$href.'" class="button" onclick="this.blur()" '.$parameter.' >'.$value.'</a>';
}
//BOF - DokuMan - 2011-01-06 - added missing function xtc_get_products_special_price
// Return a product's special price (returns nothing if there is no offer)
/**
* xtc_get_products_special_price()
*
* @param mixed $product_id
* @return
*/
function xtc_get_products_special_price($product_id){
$product_query = xtc_db_query("select specials_new_products_price from " . TABLE_SPECIALS . "where products_id = '" . (int)$product_id . "' and status = 1");
$product = xtc_db_fetch_array($product_query);
return $product['specials_new_products_price'];
}
//EOF - DokuMan - 2011-01-06 - added missing function xtc_get_products_special_price
//BOF - franky_n - 2011-01-17 - added value correction function for wrong input prices, weight, dicscount
/**
* xtc_convert_value()
*
* @param mixed $number
* @return
*/
function xtc_convert_value($number) {
// Correct wrong input number
if ((strpos($number, ",")) && (strpos($number, "."))) {
// if price scheme like 1.000,00 change to 1000.00
$number = str_replace(".","", $number);
$number = str_replace(",",".", $number);
}
if (strpos($number, ",")) {
// if price scheme like 1000,00 change to 1000.00
$number = str_replace(",",".", $number);
}
return $number;
}
//EOF - franky_n - 2011-01-17 - added value correction function for wrong input prices, weight, dicscount
//--------------------------------------------------------------------------------------Ende
//BOF - DokuMan - 2011-03-16 - added GEOIP-function
/**
* xtc_get_geoip_data()
*
* @param mixed $host
* @return
*
* Usage:
* $response = xtc_get_geoip_data(192.168.0.1);
* $data = unserialize($response);
* returns an array (
'geoplugin_city' => 'Mannheim',
'geoplugin_region' => 'Baden-Württemberg',
'geoplugin_areaCode' => '0',
'geoplugin_dmaCode' => '0',
'geoplugin_countryCode' => 'DE',
'geoplugin_countryName' => 'Germany',
'geoplugin_continentCode' => 'EU',
'geoplugin_latitude' => '49.488300323486',
'geoplugin_longitude' => '8.4646997451782',
'geoplugin_regionCode' => '01',
'geoplugin_regionName' => 'Baden-Württemberg',
'geoplugin_currencyCode' => 'EUR',
'geoplugin_currencySymbol' => '€',
'geoplugin_currencyConverter' => 0.7195162136,
)
*
*/
function xtc_get_geoip_data($ip) {
$host = 'http://www.geoplugin.net/php.gp?ip='.$ip;
if (function_exists('curl_init') ) {
//use cURL to fetch data
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'geoPlugin PHP Class v1.0');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, '1');
$response = curl_exec($ch);
curl_close ($ch);
unset($ch);
} else if (ini_get('allow_url_fopen') ) {
//fall back to file_get_contents()
$response = file_get_contents($host, 'r');
} else {
trigger_error('geoPlugin class Error: Cannot retrieve data. Either compile PHP with cURL support or enable allow_url_fopen in php.ini ', E_USER_ERROR);
return;
}
return $response;
}
//EOF - DokuMan - 2011-01-06 - added GEOIP-function
?>
admin/includes/functions/sessions.phpTop ca. Zeile 14
Released under the GNU General Public License
--------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
if (!defined('SESSION_LIFE_ADMIN')) {
define('SESSION_LIFE_ADMIN', '7200'); //120 Minuten
}
if (STORE_SESSIONS == 'mysql') {
//BOF - web28 - 2010-07-20 - change admin login timeout
//if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
//$SESS_LIFE = 1440;
//}
$SESS_LIFE = 7200; //120 MInuten
$SESS_LIFE = (int)SESSION_LIFE_ADMIN;
//EOF - web28 - 2010-07-20 - change admin login timeout
function _sess_open($save_path, $session_name) {
return true;
ca. Zeile 68
return true;
}
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
register_shutdown_function('session_write_close'); //DokuMan - 2010-01-28 - fix for procedural mysqli function
}
function xtc_session_start() {
return session_start();
ca. Zeile 135
function xtc_session_recreate() {
if (PHP_VERSION >= 4.1) {
$session_backup = $_SESSION;
unset($_COOKIE[xtc_session_name()]);
xtc_session_destroy();
if (STORE_SESSIONS == 'mysql') {
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
register_shutdown_function('session_write_close'); //DokuMan - 2010-01-28 - fix for procedural mysqli function
}
xtc_session_start();
$_SESSION = $session_backup;
unset($session_backup);
}
}
admin/includes/header.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: header.php 1025 2005-07-14 11:57:54Z gwinger $
$Id: header.php 2638 2012-01-30 16:47:35Z hhacker $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010-2012 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(header.php,v 1.19 2002/04/13); www.oscommerce.com
(c) 2003 nextcommerce (header.php,v 1.17 2003/08/24); www.nextcommerce.org
(c) 2002-2003 osCommerce, www.oscommerce.com
(c) 2003 nextcommerce; www.nextcommerce.org
(c) 2006 xt:Commerce; www.xt-commerce.com
Released under the GNU General Public License
--------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
if ($messageStack->size > 0) {
echo $messageStack->output();
}
// BOF - Tomcraft - 2009-11-02 - Admin language switch
if (!isset($lng) && !is_object($lng)) {
// Admin Language Switch
if (!isset($lng) || (isset($lng) && !is_object($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
}
$languages_string = '';
$count_lng='';
if (!isset($_GET['action']) || $_GET['action'] == 'edit') {
reset($lng->catalog_languages);
if (count($lng->catalog_languages) > 1) {
while (list($key, $value) = each($lng->catalog_languages)) {
$count_lng++;
if ( $value['status'] != 0 ){
$languages_string .= ' <a href="' . xtc_href_link($current_page, 'language=' . $key.'&'.xtc_get_all_get_params(array('language', 'currency')), 'NONSSL') . '">' . xtc_image('../lang/' . $value['directory'] .'/admin/images/' . $value['image'], $value['name']) . '</a>';
}
//if ($count_lng > 1 ) echo $languages_string;
// EOF - Tomcraft - 2009-11-02 - Admin language switch
}
}
}
// BOF - Tomcraft - 2009-11-02 - JavaScript WEICHE - Admin Umschaltauswahl
// Admin Menu
if (USE_ADMIN_TOP_MENU != 'false') {
?>
<script src="includes/liststyle_menu/topmenu.js" type="text/javascript"></script>
<script language="javascript">
ca. Zeile 44
document.write('<link href="includes/liststyle_menu/liststyle_top.css" rel="stylesheet" type="text/css" />');
//-->
</script>
<?php
} else echo '<link href="includes/liststyle_menu/liststyle_left.css" rel="stylesheet" type="text/css" />';
// EOF - Tomcraft - 2009-11-02 - JavaScript WEICHE - Admin Umschaltauswahl
} else {
echo '<link href="includes/liststyle_menu/liststyle_left.css" rel="stylesheet" type="text/css" />';
}
?>
<!-- BOF - Tomcraft - 2009-11-02 - JavaScript WEICHE //-->
<noscript>
<link href="includes/liststyle_menu/liststyle_left.css" rel="stylesheet" type="text/css" />
</noscript>
<!-- EOF - Tomcraft - 2009-11-02 - JavaScript WEICHE //-->
<!-- BOF - web28 - 2010-04-10 - added ADMIN SEARCH BAR//-->
<!--div id="top1"></div-->
<div id="top1"><?php include(DIR_WS_INCLUDES . "admin_search_bar.php");?></div>
<!-- EOF - web28 - 2010-04-10 - added ADMIN SEARCH BAR//-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" style="margin-bottom: 5px;">
<tr>
<td><?php echo xtc_image(DIR_WS_IMAGES . 'logo.gif', 'xt:Commerce').'<br> '.$languages_string ; ?></td>
<td><?php echo xtc_image(DIR_WS_IMAGES . 'logo.gif', 'xtcModified').'<br /> '.$languages_string ; ?></td>
<td valign="bottom" align="left" width="100%">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<!-- BOF - web28 - 2010-06-20 - added xtc_href_link to fastmenu//-->
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('orders.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_orders.jpg" alt="<?php echo (BOX_ORDERS) ; ?>" width="40" height="40" border="0">
</a>
<br>
<br />
<?php echo (BOX_ORDERS) ; ?>
</td>
<!--td class="fastmenu" align="center">
<a href="orders_status.php">
<img src="images/icons/fastnav/icon_order_status.jpg" alt="<?php echo (BOX_ORDERS_STATUS) ; ?>" width="40" height="40" border="0">
</a>
<br>
<?php //echo (BOX_ORDERS_STATUS) ; ?>
</td>
<td class="fastmenu" align="center">
<a href="shipping_status.php">
<img src="images/icons/fastnav/icon_shipping_status.jpg" alt="<?php echo (BOX_SHIPPING_STATUS) ; ?>" width="40" height="40" border="0">
</a>
<br>
<?php //echo (BOX_SHIPPING_STATUS) ; ?>
</td-->
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('content_manager.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_content.jpg" alt="<?php echo (BOX_CONTENT) ; ?>" width="40" height="40" border="0">
</a>
<br>
<br />
<?php echo (BOX_CONTENT) ; ?>
</td>
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('backup.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_backup.jpg" alt="<?php echo (BOX_BACKUP) ; ?>" width="40" height="40" border="0">
</a>
<br>
<br />
<?php echo (BOX_BACKUP) ; ?>
</td>
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('customers.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_customers.jpg" alt="<?php echo (BOX_CUSTOMERS) ; ?>" width="40" height="40" border="0">
</a>
<br>
<br />
<?php echo (BOX_CUSTOMERS) ; ?>
</td>
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('categories.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_categories.jpg" alt="<?php echo (BOX_CATEGORIES) ; ?>" width="40" height="40" border="0">
</a>
<br>
<br />
<?php echo (BOX_CATEGORIES) ; ?>
</td>
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('../index.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_shop.jpg" width="40" height="40" border="0">
</a>
<br>
<br />
Shop
</td>
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('../logoff.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_logout.jpg" width="40" height="40" border="0">
</a>
<br>
<br />
Logout
</td>
<td class="fastmenu" align="center">
<a href="<?php echo xtc_href_link('credits.php', '', 'NONSSL') ; ?>">
<img src="images/icons/fastnav/icon_credits.jpg" width="40" height="40" border="0">
</a>
<br>
<br />
Credits
</td>
<!-- EOF - web28 - 2010-06-20 - added xtc_href_link to fastmenu //-->
</tr>
</table>
</td>
</tr>
ca. Zeile 143
</td>
</tr>
</table>
</div>
<div id="top2"></div>
<?php
if (USE_ADMIN_TOP_MENU != 'false') {
// BOF - vr/web28 - 2009-12-13 - escape some characters
// BOF - Hetfield 2009-12-16 - rename $content in $menucontent because $content already exist
?>
<script language="javascript">
<!--
document.write('<?php ob_start(); require(DIR_WS_INCLUDES . "column_left.php"); $menucontent = ob_get_clean(); echo addslashes($menucontent);?>');
//-->
</script>
<?php
// EOF - Hetfield 2009-12-16 - rename $content in $menucontent because $content already exist
// EOF - vr/web28 - 2009-12-13 - escape some characters
}
?>
admin/includes/modules/categories_specials.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: categories_specials.php 2360 2011-11-18 15:10:57Z franky-n-xtcm $
xtcModified - community made shopping
http://www.xtc-modified.org
// (c) 2006 Web4Business GmbH - Designs - Modules. www.web4business.ch
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
Released under the GNU General Public License
--------------------------------------------------------------
Third Party contribution:
(c) 2006 Web4Business GmbH - Designs - Modules. www.web4business.ch
--------------------------------------------------------------*/
defined("_VALID_XTC") or die("Direct access to this location isn't allowed.");
function showSpecialsBox() {
global $pInfo; //web28 - 2010-07-27 - show products_price
// include localized categories specials strings
require_once(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/categories_specials.php');
//BOF web28 - 2010-07-27 - show products_price
if (PRICE_IS_BRUTTO == 'true') {
$products_price_sp = xtc_round($pInfo->products_price * ((100 + xtc_get_tax_rate($pInfo->products_tax_class_id)) / 100), PRICE_PRECISION);
$products_price_netto_sp = TEXT_NETTO.'<strong>'.($pInfo->products_price*(xtc_get_tax_rate($sInfo->products_tax_class_id)+100)/100).'</strong> ';
} else {
$products_price_sp = xtc_round($pInfo->products_price, PRICE_PRECISION);
$products_price_netto_sp = '';
}
//EOF web28 - 2010-07-27 - show products_price
// if editing an existing product
if(isset($_GET['pID'])) {
$specials_query = "select p.products_tax_class_id,
$specials_query = "SELECT p.products_tax_class_id,
p.products_id,
pd.products_name,
p.products_price,
pd.products_name,
s.specials_id,
s.specials_quantity,
s.specials_new_products_price,
s.specials_date_added,
s.specials_last_modified,
s.expires_date,
s.status
from " . TABLE_PRODUCTS . " p,
FROM " . TABLE_PRODUCTS . " p,
" . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_SPECIALS . "
s where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id = s.products_id
and s.products_id = '" . (int)$_GET['pID'] . "'";
" . TABLE_SPECIALS . " s
WHERE p.products_id = pd.products_id
AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
AND p.products_id = s.products_id
AND s.products_id = '" . (int)$_GET['pID'] . "'"; //DokuMan - 2011-11-8 - added missing s.status from SP1b
$specials_query = xtDBquery($specials_query);
// if there exists already a special for this product
if(xtc_db_num_rows($specials_query, true) > 0) {
$special = xtc_db_fetch_array($specials_query, true);
$sInfo = new objectInfo($special);
}
}
ca. Zeile 42
$special = xtc_db_fetch_array($specials_query, true);
$sInfo = new objectInfo($special);
}
}
$price=$sInfo->products_price;
$new_price=$sInfo->specials_new_products_price;
$new_price_netto = ''; //web28 - 2010-07-27 - show special_price netto
if (PRICE_IS_BRUTTO=='true') {
$price_netto=xtc_round($price,PRICE_PRECISION);
$new_price_netto=xtc_round($new_price,PRICE_PRECISION);
if ($price > 0) {
$new_price_netto= TEXT_NETTO.'<strong>'.xtc_round($new_price,PRICE_PRECISION).'</strong>'; //web28 - 2010-07-27 - show special_price netto
}
$price= ($price*(xtc_get_tax_rate($sInfo->products_tax_class_id)+100)/100);
$new_price= ($new_price*(xtc_get_tax_rate($sInfo->products_tax_class_id)+100)/100);
}
$price=xtc_round($price,PRICE_PRECISION);
$new_price=xtc_round($new_price,PRICE_PRECISION);
// build the expires date in the format YYYY-MM-DD
if(isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0 and $sInfo->expires_date != 0) {
$expires_date = substr($sInfo->expires_date, 0, 4)."-".
substr($sInfo->expires_date, 5, 2)."-".
substr($sInfo->expires_date, 8, 2);
} else {
$expires_date = "";
}
ca. Zeile 69
} else {
$expires_date = "";
}
($sInfo->status == 1) ? $status = 'checked="checked"' : $status='';
if ($sInfo->status == 1) {
$status = 'checked="checked"';
} else {
$status='';
}
// tell the storing script if to update existing special,
// or to insert a new one
echo xtc_draw_hidden_field('specials_action',
((isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0)
((isset($_GET['pID']) && xtc_db_num_rows($specials_query, true) > 0)
? "update"
: "insert"
)
);
if(isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0)
echo xtc_draw_hidden_field('tax_rate', xtc_get_tax_rate($pInfo->products_tax_class_id)); //web28 - 2010-07-27 - add hidden field
echo xtc_draw_hidden_field('products_price_hidden', $pInfo->products_price); //web28 - 2010-07-27 - FIX wrong specials price
if(isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0) {
echo xtc_draw_hidden_field('specials_id', $sInfo->specials_id);
}
?>
<script type="text/javascript">
var specialExpires = new ctlSpiffyCalendarBox("specialExpires", "new_product", "specials_expires","btnDate2","<?php echo $expires_date; ?>",2);
ca. Zeile 110
<div id="special">
<div style="padding: 8px 0px 3px 5px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main"><strong><?php echo SPECIALS_TITLE; ?></strong></td>
<td class="main">
<strong><?php echo SPECIALS_TITLE; ?></strong>
</td>
</tr>
</table>
</div>
<table bgcolor="f3f3f3" style="width: 100%; border: 1px solid; border-color: #aaaaaa; padding:5px;">
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="0" style="border: 0px dotted black;">
<?php //BOF - web28 - 2010-07-27 - show products_price ?>
<tr>
<td class="main" style="width:270px;"><?php echo TEXT_SPECIALS_SPECIAL_PRICE; ?> </td>
<td class="main" style="width:250px;"><?php echo xtc_draw_input_field('specials_price', $new_price, 'style="width: 135px"');?> </td>
<td class="main" style="width:340px;"> <?php if(isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0) { ?>
<input type="checkbox" name="specials_delete" value="true" id="input_specials_delete" onclick="if(this.checked==true)return confirm('<?php echo TEXT_INFO_DELETE_INTRO; ?>');"style="vertical-align:middle;"/>
<label for="input_specials_delete"> <?php echo TEXT_INFO_HEADING_DELETE_SPECIALS; ?></label>
<?php } ?></td>
<td class="main"><?php echo TEXT_PRODUCTS_PRICE; ?> </td>
<td class="main"><?php echo $products_price_sp; ?> <?php echo $products_price_netto_sp; ?></td>
<td class="main"> </td>
</tr>
<?php //EOF - web28 - 2010-07-27 - show products_price ?>
<tr>
<td class="main"><?php echo TEXT_SPECIALS_SPECIAL_QUANTITY; ?> </td>
<td class="main"><?php echo xtc_draw_input_field('specials_quantity', $sInfo->specials_quantity, 'style="width: 135px"');?> </td>
<td class="main"> </td>
<td class="main" style="width:270px;">
<?php echo TEXT_SPECIALS_SPECIAL_PRICE; ?>
</td>
<td class="main" style="width:250px;">
<?php echo xtc_draw_input_field('specials_price', $new_price, 'style="width: 135px"'). ' ' . $new_price_netto;?>
</td>
<td class="main" style="width:340px;">
<?php if(isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0) { ?>
<input type="checkbox" name="specials_delete" value="true" id="input_specials_delete" onclick="if(this.checked==true)return confirm('<?php echo TEXT_INFO_DELETE_INTRO; ?>');"style="vertical-align:middle;"/><label for="input_specials_delete"> <?php echo TEXT_INFO_HEADING_DELETE_SPECIALS; ?></label>
<?php } ?>
</td>
</tr>
<tr>
<td class="main">
<?php echo TEXT_SPECIALS_SPECIAL_QUANTITY; ?>
</td>
<td class="main">
<?php echo xtc_draw_input_field('specials_quantity', $sInfo->specials_quantity, 'style="width: 135px"');?>
</td>
<td class="main">
</td>
</tr>
<?php if(isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0) { ?>
<tr>
<td class="main"><?php echo TEXT_INFO_DATE_ADDED; ?></td>
ca. Zeile 144
<td class="main"> </td>
</tr>
<?php } ?>
<tr>
<td class="main"><?php echo TEXT_SPECIALS_EXPIRES_DATE; ?></td>
<td class="main"><script type="text/javascript">specialExpires.writeControl(); specialExpires.dateFormat="yyyy-MM-dd";</script>
<td class="main">
<?php echo TEXT_SPECIALS_EXPIRES_DATE; ?>
</td>
<td class="main">
<script type="text/javascript">specialExpires.writeControl(); specialExpires.dateFormat="yyyy-MM-dd";</script>
<noscript>
<?php echo xtc_draw_input_field('specials_expires', $expires_date ,'style="width: 135px"'); ?>
</noscript>
</td>
<td class="main"> </td>
<td class="main">
<?php if(isset($_GET['pID']) and xtc_db_num_rows($specials_query, true) > 0) { ?>
<input type="checkbox" name="specials_status" value="1" id="input_specials_status" style="vertical-align:middle;" <?php echo $status;?>/><label for="input_specials_status"> <?php echo TEXT_EDIT_STATUS; ?></label>
<?php } ?>
</td>
</tr>
<tr>
<td colspan="3" class="main" style="padding:3px; background: #D8D8D8;">
<?php echo TEXT_SPECIALS_PRICE_TIP; ?>
ca. Zeile 157
<td colspan="3" class="main" style="padding:3px; background: #D8D8D8;">
<?php echo TEXT_SPECIALS_PRICE_TIP; ?>
</td>
</tr>
</table>
</td></tr></table>
</td>
</tr>
</table>
</div>
<?php
}
ca. Zeile 164
</div>
<?php
}
function saveSpecialsData($products_id) {
// decide whether to insert a new special,
// or to update an existing one
if($_POST['specials_action'] == "insert"
and isset($_POST['specials_price'])
and !empty($_POST['specials_price'])) {
if($_POST['specials_action'] == "insert" && isset($_POST['specials_price']) && !empty($_POST['specials_price'])) {
// insert a new special, code taken from /admin/specials.php, and modified
if(!isset($_POST['specials_quantity']) or empty($_POST['specials_quantity']))
if(!isset($_POST['specials_quantity']) or empty($_POST['specials_quantity'])) {
$_POST['specials_quantity'] = 0;
}
if (PRICE_IS_BRUTTO=='true' && substr($_POST['specials_price'], -1) != '%'){
$sql="select tr.tax_rate from " . TABLE_TAX_RATES . " tr, " . TABLE_PRODUCTS . " p where tr.tax_class_id = p. products_tax_class_id and p.products_id = '". $products_id . "' ";
$tax_query = xtc_db_query($sql);
$tax = xtc_db_fetch_array($tax_query);
$_POST['specials_price'] = ($_POST['specials_price']/($tax['tax_rate']+100)*100);
$_POST['specials_price'] = ($_POST['specials_price']/($_POST['tax_rate']+100)*100); //web28 - 2010-07-27 - tax_rate from hidden field
}
if (substr($_POST['specials_price'], -1) == '%') {
$new_special_insert_query = xtc_db_query("select products_id,products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'");
$new_special_insert = xtc_db_fetch_array($new_special_insert_query);
$_POST['products_price'] = $new_special_insert['products_price'];
$_POST['specials_price'] = ($_POST['products_price'] - (($_POST['specials_price'] / 100) * $_POST['products_price']));
$_POST['specials_price'] = ($_POST['products_price_hidden'] - (($_POST['specials_price'] / 100) * $_POST['products_price_hidden'])); //web28 - 2010-07-27 - products_price_hidden from hidden field
}
$expires_date = '';
if ($_POST['specials_expires']) {
$expires_date = str_replace("-", "", $_POST['specials_expires']);
}
ca. Zeile 199
$expires_date = '';
if ($_POST['specials_expires']) {
$expires_date = str_replace("-", "", $_POST['specials_expires']);
}
xtc_db_query("insert into " . TABLE_SPECIALS . " (products_id,
specials_quantity,
specials_new_products_price,
specials_date_added,
expires_date,
status
) values (
'" . $products_id . "',
'" . (int)$_POST['specials_quantity'] . "',
'" . $_POST['specials_price'] . "',
now(),
'" . $expires_date . "',
'1'
)");
}
elseif($_POST['specials_action'] == "update"
and isset($_POST['specials_price']) and isset($_POST['specials_quantity'])) {
xtc_db_query("INSERT INTO " . TABLE_SPECIALS . "
SET products_id = '" . $products_id . "',
specials_quantity = '" . (int)$_POST['specials_quantity'] . "',
specials_new_products_price = '" . $_POST['specials_price'] . "',
specials_date_added = now(),
expires_date = '" . $expires_date . "',
status = '1'");
} elseif($_POST['specials_action'] == "update" && isset($_POST['specials_price']) && isset($_POST['specials_quantity'])) {
// update the existing special for this product, code taken from /admin/specials.php, and modified
if (PRICE_IS_BRUTTO=='true' && substr($_POST['specials_price'], -1) != '%'){
$sql="select tr.tax_rate from " . TABLE_TAX_RATES . " tr, " . TABLE_PRODUCTS . " p where tr.tax_class_id = p. products_tax_class_id and p.products_id = '". $products_id . "' ";
$sql="SELECT tr.tax_rate
FROM " . TABLE_TAX_RATES . " tr,
" . TABLE_PRODUCTS . " p
WHERE tr.tax_class_id = p. products_tax_class_id
AND p.products_id = '". $products_id . "' ";
$tax_query = xtc_db_query($sql);
$tax = xtc_db_fetch_array($tax_query);
$_POST['specials_price'] = ($_POST['specials_price']/($tax[tax_rate]+100)*100);
$_POST['specials_price'] = ($_POST['specials_price']/($_POST['tax_rate']+100)*100); //web28 - 2010-07-27 - tax_rate from hidden field
}
if (substr($_POST['specials_price'], -1) == '%') {
$_POST['specials_price'] = ($_POST['products_price'] - (($_POST['specials_price'] / 100) * $_POST['products_price']));
$_POST['specials_price'] = ($_POST['products_price_hidden'] - (($_POST['specials_price'] / 100) * $_POST['products_price_hidden'])); //web28 - 2010-07-27 - products_price_hidden from hidden field
}
$expires_date = 'NULL';
if ($_POST['specials_expires'] && $_POST['specials_status'] == 1) {
if ($_POST['specials_expires'] && $_POST['specials_status'] == 1) { //DokuMan - 2011-11-8 - from SP1b
$expires_date = str_replace("-", "", $_POST['specials_expires']);
$expires_date = "'".$expires_date."'";
}
//BOF BUGFIX - Änderungen wurden bei Update nicht übernommen
//xtc_db_query("update " . TABLE_SPECIALS . " set specials_quantity = '" . $_POST['specials_quantity'] . "', specials_new_products_price = '" . $_POST['specials_price'] . "', specials_last_modified = now(), expires_date = '" . $expires_date . "' where specials_id = '" . $products_id . "'");
xtc_db_query("update " . TABLE_SPECIALS . "
set specials_quantity = '" . (int)$_POST['specials_quantity'] . "',
xtc_db_query("UPDATE " . TABLE_SPECIALS . "
SET specials_quantity = '" . (int)$_POST['specials_quantity'] . "',
specials_new_products_price = '" . $_POST['specials_price'] . "',
specials_last_modified = now(),
expires_date = " . $expires_date . ",
expires_date = '" . $expires_date . "',
status = '" . xtc_db_input($_POST['specials_status']) . "'
where specials_id = '" . xtc_db_input($_POST['specials_id']) . "'");
WHERE specials_id = '" . xtc_db_input($_POST['specials_id']) . "'"); //DokuMan - 2011-11-8 - added missing status from SP1b
//BOF BUGFIX - Änderungen wurden bei Update nicht übernommen
}
if(isset($_POST['specials_delete'])) {
// delete existing special for this product, code taken from /admin/specials.php, and modified
xtc_db_query("delete from " . TABLE_SPECIALS . " where specials_id = '" . xtc_db_input($_POST['specials_id']) . "'");
xtc_db_query("DELETE FROM " . TABLE_SPECIALS . " WHERE specials_id = '" . xtc_db_input($_POST['specials_id']) . "'");
}
}
?>
admin/includes/modules/categories_view.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: categories_view.php 901 2005-04-29 10:32:14Z novalis $
$Id: categories_view.php 2718 2012-03-15 19:25:37Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(categories.php,v 1.140 2003/03/24); www.oscommerce.com
(c) 2003 nextcommerce (categories.php,v 1.37 2003/08/18); www.nextcommerce.org
(c) 2006 XT-Commerce
Released under the GNU General Public License
--------------------------------------------------------------
Third Party contribution:
ca. Zeile 22
Released under the GNU General Public License
--------------------------------------------------------------*/
defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');
$action = (isset($_GET['action']) ? $_GET['action'] : '');
$search = (isset($_GET['search']) ? $_GET['search'] : '');
// get sorting option and switch accordingly
if ($_GET['sorting']) {
switch ($_GET['sorting']){
$sorting = (isset($_GET['sorting']) ? $_GET['sorting'] : '');
if (xtc_not_null($sorting)) {
switch ($sorting) {
case 'model' :
$catsort = 'c.sort_order ASC';
$prodsort = 'p.products_model ASC';
break;
ca. Zeile 35
$prodsort = 'p.products_model DESC';
break;
case 'sort' :
$catsort = 'c.sort_order ASC';
$prodsort = 'p.products_sort ASC';
$prodsort = (isset($_GET['cPath']) && $_GET['cPath'] != '0') ? 'p.products_sort ASC' : 'p.products_startpage_sort ASC'; //web28 2012-03-11 Fix products_startpage_sort
break;
case 'sort-desc' :
$catsort = 'c.sort_order DESC';
$prodsort = 'p.products_sort DESC';
$prodsort = (isset($_GET['cPath']) && $_GET['cPath'] != '0') ? 'p.products_sort DESC' : 'p.products_startpage_sort DESC'; //web28 2012-03-11 Fix products_startpage_sort
break;
case 'name' :
$catsort = 'cd.categories_name ASC';
$prodsort = 'pd.products_name ASC';
break;
ca. Zeile 87
break;
}
} else {
$catsort = 'c.sort_order, cd.categories_name ASC';
$prodsort = 'p.products_sort, pd.products_name ASC';
$prodsort = (isset($_GET['cPath']) && $_GET['cPath'] != '0') ? 'p.products_sort, pd.products_name ASC' : 'p.products_startpage_sort, pd.products_name ASC'; //web28 2012-03-11 Fix products_startpage_sort
}
?>
// BOF DokuMan - 2011-03-05 - show category name in heading title
$category_query_name = xtc_db_query("SELECT categories_name
FROM " . TABLE_CATEGORIES_DESCRIPTION . "
WHERE categories_id = '" . $current_category_id . "'
AND language_id = " . (int)$_SESSION['languages_id']);
$category_name = xtc_db_fetch_array($category_query_name);
// EOF DokuMan - 2011-03-05 - show category name in heading title
?>
<!-- categories_view HTML part begin -->
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
ca. Zeile 98
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading">
<?php echo HEADING_TITLE; ?>
<?php echo HEADING_TITLE. ' - '.$category_name['categories_name']; //DokuMan - 2011-03-05 - show category name in heading title ?>
</td>
<td class="pageHeading" align="right">
<?php echo xtc_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?>
</td>
ca. Zeile 110
<tr>
<td class="smallText" align="right">
<?php
echo xtc_draw_form('search', FILENAME_CATEGORIES, '', 'get');
echo HEADING_TITLE_SEARCH . ' ' . xtc_draw_input_field('search', $_GET['search']).xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
echo HEADING_TITLE_SEARCH . ' ' . xtc_draw_input_field('search', $search).xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
?>
</form>
</td>
</tr>
ca. Zeile 136
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<!-- categories & products column STARTS -->
<td valign="top">
<!-- categories and products table -->
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<!-- BOF - Tomcraft - 2009-11-06 - changed layout //-->
<!--
<td class="dataTableHeadingContent" width="22" align="center">
//-->
<td class="dataTableHeadingContent" width="4%" align="center">
<!-- EOF - Tomcraft - 2009-11-06 - changed layout //-->
<?php echo TABLE_HEADING_EDIT; ?>
<input type="checkbox" onclick="javascript:CheckAll(this.checked);">
</td>
<!-- BOF - Tomcraft - 2009-11-06 - changed layout //-->
<!--
<td class="dataTableHeadingContent" width="22" align="center">
<?php echo TABLE_HEADING_PRODUCTS_MODEL.xtc_sorting(FILENAME_CATEGORIES,'model'); ?>
</td>
<td class="dataTableHeadingContent" align="center" width="12%">
//-->
<td class="dataTableHeadingContent" width="10%" align="center">
<?php echo TABLE_HEADING_PRODUCTS_MODEL.xtc_sorting(FILENAME_CATEGORIES,'model'); ?>
</td>
<td class="dataTableHeadingContent" align="center" width="10%">
<!-- EOF - Tomcraft - 2009-11-06 - changed layout //-->
<?php echo TABLE_HEADING_SORT.xtc_sorting(FILENAME_CATEGORIES,'sort'); ?>
</td>
<td class="dataTableHeadingContent" align="center" width="30%">
<?php echo TABLE_HEADING_CATEGORIES_PRODUCTS.xtc_sorting(FILENAME_CATEGORIES,'name'); ?>
ca. Zeile 190
</td>
<td class="dataTableHeadingContent" align="center" width="10%">
<?php echo TABLE_HEADING_PRICE.xtc_sorting(FILENAME_CATEGORIES,'price'); ?>
</td>
<!-- BOF - Tomcraft - 2009-11-06 - changed layout //-->
<!--
<td class="dataTableHeadingContent" align="center" width="10%">
<?php echo '% max' . xtc_sorting(FILENAME_CATEGORIES,'discount'); ?>
</td>
//-->
<td class="dataTableHeadingContent" align="center" width="12%">
<?php echo '% max' . xtc_sorting(FILENAME_CATEGORIES,'discount'); ?>
</td>
<!-- EOF - Tomcraft - 2009-11-06 - changed layout //-->
<td class="dataTableHeadingContent" width="10%" align="center">
<?php echo TABLE_HEADING_ACTION; ?>
</td>
</tr>
ca. Zeile 204
<td class="dataTableHeadingContent" width="10%" align="center">
<?php echo TABLE_HEADING_ACTION; ?>
</td>
</tr>
<?php
//multi-actions form STARTS
if (xtc_not_null($_POST['multi_categories']) || xtc_not_null($_POST['multi_products'])) {
$action = "action=multi_action_confirm&" . xtc_get_all_get_params(array('cPath', 'action')) . 'cPath=' . $cPath;
if ((isset($_POST['multi_categories']) && xtc_not_null($_POST['multi_categories'])) || (isset($_POST['multi_products']) && xtc_not_null($_POST['multi_products']))) {
$action_multi = "action=multi_action_confirm&" . xtc_get_all_get_params(array('cPath', 'action')) . 'cPath=' . $cPath;
} else {
$action = "action=multi_action&" . xtc_get_all_get_params(array('cPath', 'action')) . 'cPath=' . $cPath;
$action_multi = "action=multi_action&" . xtc_get_all_get_params(array('cPath', 'action')) . 'cPath=' . $cPath;
}
echo xtc_draw_form('multi_action_form', FILENAME_CATEGORIES, $action, 'post', 'onsubmit="javascript:return CheckMultiForm()"');
echo xtc_draw_form('multi_action_form', FILENAME_CATEGORIES, $action_multi, 'post', 'onsubmit="javascript:return CheckMultiForm()"');
//add current category id in $_POST
echo '<input type="hidden" id="cPath" name="cPath" value="' . $cPath . '">';
// ----------------------------------------------------------------------------------------------------- //
ca. Zeile 220
// ----------------------------------------------------------------------------------------------------- //
// WHILE loop to display categories STARTS
// ----------------------------------------------------------------------------------------------------- //
$categories_count = 0;
$rows = 0;
if ($_GET['search']) {
$categories_query = xtc_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' and cd.categories_name like '%" . xtc_db_prepare_input($_GET['search']) . "%' order by " . $catsort);
if (xtc_not_null($search)) { // web28 2010-11-23 FIX wrong isset -> xtc_not_null
$categories_query = xtc_db_query("SELECT c.categories_id,
cd.categories_name,
c.categories_image,
c.parent_id,
c.sort_order,
c.date_added,
c.last_modified,
c.categories_status
FROM " . TABLE_CATEGORIES . " AS c,
" . TABLE_CATEGORIES_DESCRIPTION . " AS cd
WHERE c.categories_id = cd.categories_id
AND cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
AND cd.categories_name like '%" . xtc_db_prepare_input($search) . "%'
ORDER BY " . $catsort);
} else {
$categories_query = xtc_db_query("SELECT c.categories_id,
cd.categories_name,
c.categories_image,
c.parent_id,
c.sort_order,
c.date_added,
c.last_modified,
c.categories_status
FROM " . TABLE_CATEGORIES . " AS c,
" . TABLE_CATEGORIES_DESCRIPTION . " AS cd
WHERE c.parent_id = '" . (int)$current_category_id . "'
AND c.categories_id = cd.categories_id
AND cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
ORDER BY " . $catsort);
}
//BOF - web28- 2010-11-24 FIX undefined $cPath_back
$cPath_back = '';
if ($cPath_array) {
for($i = 0, $n = sizeof($cPath_array) - 1; $i < $n; $i++) {
if ($cPath_back == '') {
$cPath_back .= $cPath_array[$i];
} else {
$categories_query = xtc_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' order by " . $catsort);
$cPath_back .= '_' . $cPath_array[$i];
}
}
}
if ($cPath_back != '') {
$cPath_back = 'cPath=' . $cPath_back;
}
//EOF - web28- 2010-11-24 FIX undefined $cPath_back
// BOC - web28 - 2012-03-11 - added "go to parent category" icon
if (!xtc_not_null($search) && count($cPath_array) > 0 && $_GET['cPath'] != '0') {
?>
<tr class="dataTableRow" onmouseover="this.className='dataTableRowOver';this.style.cursor='pointer'" onmouseout="this.className='dataTableRow'">
<td class="categories_view_data">--</td>
<td class="categories_view_data">--</td>
<td class="categories_view_data" style="text-align: center;">--</td>
<td class="categories_view_data" style="text-align: left; padding-left: 5px;">
<?php
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) .$cPath_back.'&cID='.$categories['parent_id']). '">'.xtc_image(DIR_WS_ICONS . 'folder_parent.gif', ICON_FOLDER) .' ..</a>';
?>
</td>
<td class="categories_view_data">--</td>
<td class="categories_view_data">--</td>
<td class="categories_view_data">--</td>
<td class="categories_view_data">--</td>
<td class="categories_view_data">--</td>
<td class="categories_view_data">--</td>
</tr>
<?php
}
// EOC - web28 - 2012-03-11 - added "go to parent category" icon
while ($categories = xtc_db_fetch_array($categories_query)) {
$categories_count++;
$rows++;
if (xtc_not_null($search)) {
$cPath = $categories['parent_id'];
}
if ($_GET['search']) $cPath = $categories['parent_id'];
if ( ((!$_GET['cID']) && (!$_GET['pID']) || (@$_GET['cID'] == $categories['categories_id'])) && (!$cInfo) && (substr($_GET['action'], 0, 4) != 'new_') ) {
if (((!isset($_GET['cID']) || $_GET['cID'] == '') && !isset($_GET['pID']) || (isset($_GET['cID']) && ($_GET['cID'] == $categories['categories_id']))) && !isset($cInfo) && (substr($action, 0, 4) != 'new_') ) {
$cInfo = new objectInfo($categories);
}
if ( (is_object($cInfo)) && ($categories['categories_id'] == $cInfo->categories_id) ) {
if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) {
echo '<tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'">' . "\n";
} else {
echo '<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'">' . "\n";
}
ca. Zeile 244
echo '<tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'">' . "\n";
} else {
echo '<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'">' . "\n";
}
?>
<td class="categories_view_data"><input type="checkbox" name="multi_categories[]" value="<?php echo $categories['categories_id'] . '" '; if (is_array($_POST['multi_categories'])) { if (in_array($categories['categories_id'], $_POST['multi_categories'])) { echo 'checked="checked"'; } } ?>></td>
<td class="categories_view_data">--</td> <td class="categories_view_data"><?php echo $categories['sort_order']; ?></td>
<td class="categories_view_data"><input type="checkbox" name="multi_categories[]" value="<?php echo $categories['categories_id'] . '" '; if (isset($_POST['multi_categories']) && is_array($_POST['multi_categories'])) { if (in_array($categories['categories_id'], $_POST['multi_categories'])) { echo 'checked="checked"'; } } ?>></td>
<td class="categories_view_data">--</td>
<td class="categories_view_data"><?php echo $categories['sort_order']; ?></td>
<td class="categories_view_data" style="text-align: left; padding-left: 5px;">
<?php
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . xtc_get_path($categories['categories_id'])) . '">' . xtc_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '<a> <b><a href="'.xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) .'">' . $categories['categories_name'] . '</a></b>';
?>
ca. Zeile 268
<td class="categories_view_data">
<?php
//show status icons (green & red circle) with links
if ($categories['categories_status'] == '1') {
echo xtc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setcflag&flag=0&cID=' . $categories['categories_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
echo xtc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setcflag&flag=0&cID=' . $categories['categories_id'] . '&cPath=' . $cPath) . '"> ' . xtc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
} else {
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setcflag&flag=1&cID=' . $categories['categories_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . xtc_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
}
?>
ca. Zeile 281
<td class="categories_view_data">--</td>
<td class="categories_view_data">
<?php
//if active category, show arrow, else show symbol with link (action col)
if ( (is_object($cInfo)) && ($categories['categories_id'] == $cInfo->categories_id) ) {
// BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons
// echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', '');
if (isset($cInfo) && (is_object($cInfo)) && ($categories['categories_id'] == $cInfo->categories_id) ) {
echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT);
// EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons
} else {
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_arrow_grey.gif', IMAGE_ICON_INFO) . '</a>';
}
?>
</td>
</tr>
ca. Zeile 301
// ----------------------------------------------------------------------------------------------------- //
//get products data
$products_count = 0;
if ($_GET['search']) {
if (xtc_not_null($search)) {
$products_query = xtc_db_query("
SELECT
p.products_tax_class_id,
p.products_id,
pd.products_name,
p.products_sort,
p.products_quantity,
p.products_image,
p.products_model,
p.products_price,
p.products_discount_allowed,
p.products_date_added,
p.products_last_modified,
p.products_date_available,
p.products_status,
p.products_startpage,
p.products_startpage_sort,
p2c.categories_id FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
WHERE p.products_id = pd.products_id AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "' AND
p.products_id = p2c.products_id AND (pd.products_name like '%" . xtc_db_prepare_input($_GET['search']) . "%' OR "
// BOF - web28 - 2010-04-10 - change for ADMIN SEARCH BAR
// p.products_model = '" . $_GET['search'] . "') ORDER BY " . $prodsort);
. "p.products_model like '%" . xtc_db_prepare_input($_GET['search']) . "%') ORDER BY " . $prodsort);
//EOF - web28 - 2010-04-10 - change for ADMIN SEARCH BAR
p2c.categories_id
FROM " . TABLE_PRODUCTS . " p,
" . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
WHERE p.products_id = pd.products_id
AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
AND p.products_id = p2c.products_id
AND (pd.products_name like '%" . xtc_db_prepare_input($_GET['search']) . "%' OR " . "p.products_model like '%" . xtc_db_prepare_input($_GET['search']) . "%')
ORDER BY " . $prodsort);
} else {
$products_query = xtc_db_query("
SELECT
p.products_tax_class_id,
$products_query = xtc_db_query(" SELECT p.products_tax_class_id,
p.products_sort,
p.products_id,
pd.products_name,
p.products_quantity,
ca. Zeile 345
p.products_last_modified,
p.products_date_available,
p.products_status,
p.products_startpage,
p.products_startpage_sort FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
WHERE p.products_id = pd.products_id AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "' AND
p.products_id = p2c.products_id AND p2c.categories_id = '" . (int)$current_category_id . "' ORDER BY " . $prodsort);
p.products_startpage_sort
FROM " . TABLE_PRODUCTS . " p,
" . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
WHERE p.products_id = pd.products_id
AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
AND p.products_id = p2c.products_id
AND p2c.categories_id = '" . (int)$current_category_id . "'
ORDER BY " . $prodsort);
}
// ----------------------------------------------------------------------------------------------------- //
// WHILE loop to display products STARTS
ca. Zeile 357
while ($products = xtc_db_fetch_array($products_query)) {
$products_count++;
$rows++;
// Get categories_id for product if search
if ($_GET['search']) $cPath=$products['categories_id'];
if ( ((!$_GET['pID']) && (!$_GET['cID']) || (@$_GET['pID'] == $products['products_id'])) && (!$pInfo) && (!$cInfo) && (substr($_GET['action'], 0, 4) != 'new_') ) {
if (xtc_not_null($search)) {
$cPath=$products['categories_id'];
}
if ( (!isset($_GET['pID']) && !isset($_GET['cID']) || (@$_GET['pID'] == $products['products_id'])) && !isset($pInfo) && !isset($cInfo) && (substr($action, 0, 4) != 'new_') ) {
// find out the rating average from customer reviews
$reviews_query = xtc_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$products['products_id'] . "'");
$reviews_query = xtc_db_query("SELECT (avg(reviews_rating) / 5 * 100) AS average_rating FROM " . TABLE_REVIEWS . " WHERE products_id = '" . (int)$products['products_id'] . "'");
$reviews = xtc_db_fetch_array($reviews_query);
$pInfo_array = xtc_array_merge($products, $reviews);
$pInfo = new objectInfo($pInfo_array);
}
if ( (is_object($pInfo)) && ($products['products_id'] == $pInfo->products_id) ) {
if (isset($pInfo) && (is_object($pInfo)) && ($products['products_id'] == $pInfo->products_id) ) {
echo '<tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'" >' . "\n";
} else {
echo '<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" >' . "\n";
}
ca. Zeile 374
echo '<tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'" >' . "\n";
} else {
echo '<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" >' . "\n";
}
//checkbox again after submit and before final submit
unset($is_checked);
if (is_array($_POST['multi_products'])) {
if (isset($_POST['multi_products']) && is_array($_POST['multi_products'])) {
if (in_array($products['products_id'], $_POST['multi_products'])) {
$is_checked = ' checked="checked"';
}
}
?>
<td class="categories_view_data">
<input type="checkbox" name="multi_products[]" value="<?php echo $products['products_id']; ?>" <?php echo $is_checked; ?>>
<input type="checkbox" name="multi_products[]" value="<?php echo $products['products_id']; ?>" <?php echo (isset($is_checked) ? $is_checked : ''); ?>>
</td>
<?php if ($products['products_model'] !='' ){ ?>
<?php
if ($products['products_model'] !='' ){
?>
<td class="categories_view_data">
<?php echo $products['products_model']; ?>
</td>
<?php } else { ?>
<?php
} else {
?>
<td class="categories_view_data" width="22">--</td>
<?php } ?>
<?php
}
?>
<td class="categories_view_data">
<?php
if ($current_category_id == 0){
echo $products['products_startpage_sort'];
ca. Zeile 409
<?php
// check product and attributes stock
if (STOCK_CHECK == 'true') { ?>
<td class="categories_view_data">
<?php echo check_stock($products['products_id']); ?>
<?php echo check_stock($products['products_id']);
echo ' '.TXT_STK.$products['products_quantity']; //BOF - DokuMan - 2012-03-05 - added products quantity to list view
?>
</td>
<?php } ?>
<?php
}
?>
<td class="categories_view_data">
<?php
if ($products['products_status'] == '1') {
echo xtc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setpflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
echo xtc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setpflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '"> ' . xtc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
} else {
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setpflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . xtc_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setpflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . ' </a>' . xtc_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
}
?>
</td>
<td class="categories_view_data">
<?php
if ($products['products_startpage'] == '1') {
echo xtc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setsflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
echo xtc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setsflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '"> ' . xtc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
} else {
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setsflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . xtc_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'action=setsflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . ' </a>' . xtc_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
}
?>
</td>
<td class="categories_view_data">
ca. Zeile 444
?>
</td>
<td class="categories_view_data">
<?php
if ( (is_object($pInfo)) && ($products['products_id'] == $pInfo->products_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; }
if (isset($pInfo) && (is_object($pInfo)) && ($products['products_id'] == $pInfo->products_id) ) {
echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', '');
} else {
echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_arrow_grey.gif', IMAGE_ICON_INFO) . '</a>';
}
?>
</td>
</tr>
<?php
// ----------------------------------------------------------------------------------------------------- //
} //WHILE loop to display products ENDS
// ----------------------------------------------------------------------------------------------------- //
if ($cPath_array) {
unset($cPath_back);
for($i = 0, $n = sizeof($cPath_array) - 1; $i < $n; $i++) {
if ($cPath_back == '') {
$cPath_back .= $cPath_array[$i];
} else {
$cPath_back .= '_' . $cPath_array[$i];
}
}
}
$cPath_back = ($cPath_back) ? 'cPath=' . $cPath_back : '';
?>
</tr>
</table>
<!-- categories and products table ENDS -->
ca. Zeile 479
<?php echo TEXT_CATEGORIES . ' ' . $categories_count . '<br />' . TEXT_PRODUCTS . ' ' . $products_count; ?>
</td>
<td align="right" class="smallText">
<?php
if ($cPath) echo '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . $cPath_back . '&cID=' . $current_category_id) . '">' . BUTTON_BACK . '</a> ';
if ($cPath) {
echo '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . $cPath_back . '&cID=' . $current_category_id) . '">' . BUTTON_BACK . '</a> ';
}
echo '<a class="button" href="javascript:SwitchCheck()" onclick="this.blur()">' . BUTTON_REVERSE_SELECTION . '</a> ';
echo '<a class="button" href="javascript:SwitchProducts()" onclick="this.blur()">' . BUTTON_SWITCH_PRODUCTS . '</a> ';
echo '<a class="button" href="javascript:SwitchCategories()" onclick="this.blur()">' . BUTTON_SWITCH_CATEGORIES . '</a> ';
?>
ca. Zeile 494
<?php
$heading = array();
$contents = array();
switch ($_GET['action']) {
switch ($action) {
case 'copy_to':
//close multi-action form, not needed here
$heading[] = array('text' => '</form><b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
$contents = array('form' => xtc_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . xtc_draw_hidden_field('products_id', $pInfo->products_id));
$contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
$contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . xtc_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
ca. Zeile 507
if (QUICKLINK_ACTIVATED=='true') {
$contents[] = array('text' => '<hr noshade>');
$contents[] = array('text' => '<b>'.TEXT_MULTICOPY.'</b><br />'.TEXT_MULTICOPY_DESC);
$cat_tree=xtc_get_category_tree();
$cat_tree=xtc_get_category_tree('0','','0');
$tree='';
for ($i=0;$n=sizeof($cat_tree),$i<$n;$i++) {
$tree .='<input type="checkbox" name="cat_ids[]" value="'.$cat_tree[$i]['id'].'"><font size="1">'.$cat_tree[$i]['text'].'</font><br />';
}
$contents[] = array('text' => $tree.'<br /><hr noshade>');
$contents[] = array('text' => '<b>'.TEXT_SINGLECOPY.'</b><br />'.TEXT_SINGLECOPY_DESC);
}
$contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . xtc_draw_pull_down_menu('categories_id', xtc_get_category_tree(), $current_category_id));
$contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . xtc_draw_pull_down_menu('categories_id', xtc_get_category_tree('0','','0'), $current_category_id));
$contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . xtc_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . xtc_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
$contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_COPY . '"/> <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . BUTTON_CANCEL . '</a>');
break;
ca. Zeile 528
// --------------------
if (xtc_not_null($_POST['multi_move'])) {
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_ELEMENTS . '</b>');
$contents[] = array('text' => '<table width="100%" border="0">');
if (is_array($_POST['multi_categories'])) {
foreach ($_POST['multi_categories'] AS $multi_category) {
$category_query = xtc_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$multi_category . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
$category_query = xtc_db_query("SELECT c.categories_id,
cd.categories_name,
c.categories_image,
c.parent_id,
c.sort_order,
c.date_added,
c.last_modified,
c.categories_status
FROM " . TABLE_CATEGORIES . " AS c,
" . TABLE_CATEGORIES_DESCRIPTION . " AS cd
WHERE c.categories_id = '" . (int)$multi_category . "'
AND c.categories_id = cd.categories_id
AND cd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
$category = xtc_db_fetch_array($category_query);
$category_childs = array('childs_count' => $catfunc->count_category_childs($multi_category));
$category_products = array('products_count' => $catfunc->count_category_products($multi_category, true));
$cInfo_array = xtc_array_merge($category, $category_childs, $category_products);
$cInfo = new objectInfo($cInfo_array);
$contents[] = array('text' => '<tr><td style="border-bottom: 1px solid Black; margin-bottom: 10px;" class="infoBoxContent"><b>' . $cInfo->categories_name . '</b></td></tr>');
if ($cInfo->childs_count > 0) $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_CHILDS, $cInfo->childs_count) . '</td></tr>');
if ($cInfo->products_count > 0) $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
if ($cInfo->childs_count > 0) {
$contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_CHILDS, $cInfo->childs_count) . '</td></tr>');
}
if ($cInfo->products_count > 0) {
$contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
}
}
$category_tree = xtc_get_category_tree();
}
if (is_array($_POST['multi_products'])) {
foreach ($_POST['multi_products'] AS $multi_product) {
ca. Zeile 552
$product_categories = xtc_output_generated_category_path($multi_product, 'product');
$product_categories_string = '<tr><td class="infoBoxContent">' . $product_categories . '</td></tr>';
$contents[] = array('text' => $product_categories_string);
}
$category_tree = xtc_get_category_tree('0','','0');
}
$contents[] = array('text' => '<tr><td class="infoBoxContent"><strong>' . TEXT_MOVE_ALL . '</strong></td></tr><tr><td>' . xtc_draw_pull_down_menu('move_to_category_id', xtc_get_category_tree(), $current_category_id) . '</td></tr>');
$contents[] = array('text' => '<tr><td class="infoBoxContent"><strong>' . TEXT_MOVE_ALL . '</strong></td></tr><tr><td>' . xtc_draw_pull_down_menu('move_to_category_id', $category_tree, $current_category_id) . '</td></tr>');
//close list table
$contents[] = array('text' => '</table>');
//add current category id, for moving products
$contents[] = array('text' => '<input type="hidden" name="src_category_id" value="' . $current_category_id . '">');
ca. Zeile 570
// multi_delete confirm
// --------------------
if (xtc_not_null($_POST['multi_delete'])) {
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ELEMENTS . '</b>');
$contents[] = array('text' => '<a class="button" href="javascript:SwitchCheckDeleteConfirm()" onclick="this.blur()">' . BUTTON_REVERSE_SELECTION . '</a>');
$contents[] = array('text' => '<table width="100%" border="0">');
if (is_array($_POST['multi_categories'])) {
foreach ($_POST['multi_categories'] AS $multi_category) {
$category_query = xtc_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$multi_category . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
$category_query = xtc_db_query("SELECT c.categories_id,
cd.categories_name,
c.categories_image,
c.parent_id,
c.sort_order,
c.date_added,
c.last_modified,
c.categories_status
FROM " . TABLE_CATEGORIES . " AS c,
" . TABLE_CATEGORIES_DESCRIPTION . " AS cd
WHERE c.categories_id = '" . (int)$multi_category . "'
AND c.categories_id = cd.categories_id
AND cd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
$category = xtc_db_fetch_array($category_query);
$category_childs = array('childs_count' => $catfunc->count_category_childs($multi_category));
$category_products = array('products_count' => $catfunc->count_category_products($multi_category, true));
$cInfo_array = xtc_array_merge($category, $category_childs, $category_products);
$cInfo = new objectInfo($cInfo_array);
$contents[] = array('text' => '<tr><td style="border-bottom: 1px solid Black; margin-bottom: 10px;" class="infoBoxContent"><b>' . $cInfo->categories_name . '</b></td></tr>');
if ($cInfo->childs_count > 0) $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_DELETE_WARNING_CHILDS, $cInfo->childs_count) . '</td></tr>');
if ($cInfo->products_count > 0) $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
if ($cInfo->childs_count > 0) {
$contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_DELETE_WARNING_CHILDS, $cInfo->childs_count) . '</td></tr>');
}
if ($cInfo->products_count > 0) {
$contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
}
}
}
if (is_array($_POST['multi_products'])) {
ca. Zeile 618
// multi_copy confirm
// --------------------
if (xtc_not_null($_POST['multi_copy'])) {
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
$contents[] = array('text' => '<a class="button" href="javascript:SwitchCheckCopyConfirm()" onclick="this.blur()">' . BUTTON_REVERSE_SELECTION . '</a>');
$contents[] = array('text' => '<table width="100%" border="0">');
if (is_array($_POST['multi_categories'])) {
foreach ($_POST['multi_categories'] AS $multi_category) {
$category_query = xtc_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$multi_category . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
$category_query = xtc_db_query("SELECT c.categories_id,
cd.categories_name,
c.categories_image,
c.parent_id,
c.sort_order,
c.date_added,
c.last_modified,
c.categories_status
FROM " . TABLE_CATEGORIES . " AS c,
" . TABLE_CATEGORIES_DESCRIPTION . " AS cd
WHERE c.categories_id = '" . (int)$multi_category . "'
AND c.categories_id = cd.categories_id
AND cd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
$category = xtc_db_fetch_array($category_query);
$category_childs = array('childs_count' => $catfunc->count_category_childs($multi_category));
$category_products = array('products_count' => $catfunc->count_category_products($multi_category, true));
$cInfo_array = xtc_array_merge($category, $category_childs, $category_products);
$cInfo = new objectInfo($cInfo_array);
$contents[] = array('text' => '<tr><td style="border-bottom: 1px solid Black; margin-bottom: 10px;" class="infoBoxContent"><b>' . $cInfo->categories_name . '</b></td></tr>');
if ($cInfo->childs_count > 0) $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_CHILDS, $cInfo->childs_count) . '</td></tr>');
if ($cInfo->products_count > 0) $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
if ($cInfo->childs_count > 0) {
$contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_CHILDS, $cInfo->childs_count) . '</td></tr>');
}
if ($cInfo->products_count > 0) {
$contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
}
}
}
if (is_array($_POST['multi_products'])) {
ca. Zeile 650
$contents[] = array('text' => '</table>');
if (QUICKLINK_ACTIVATED=='true') {
$contents[] = array('text' => '<hr noshade>');
$contents[] = array('text' => '<b>'.TEXT_MULTICOPY.'</b><br />'.TEXT_MULTICOPY_DESC);
if (is_array($_POST['multi_products'])) {
$cat_tree=xtc_get_category_tree('0','','0');
} else {
$cat_tree=xtc_get_category_tree();
}
$tree='';
for ($i=0;$n=sizeof($cat_tree),$i<$n;$i++) {
$tree .= '<input type="checkbox" name="dest_cat_ids[]" value="'.$cat_tree[$i]['id'].'"><font size="1">'.$cat_tree[$i]['text'].'</font><br />';
}
$contents[] = array('text' => $tree.'<br /><hr noshade>');
$contents[] = array('text' => '<b>'.TEXT_SINGLECOPY.'</b><br />'.TEXT_SINGLECOPY_DESC);
}
$contents[] = array('text' => '<br />' . TEXT_SINGLECOPY_CATEGORY . '<br />' . xtc_draw_pull_down_menu('dest_category_id', xtc_get_category_tree(), $current_category_id) . '<br /><hr noshade>');
if (is_array($_POST['multi_products'])) {
$category_tree=xtc_get_category_tree('0','','0');
} else {
$category_tree=xtc_get_category_tree();
}
$contents[] = array('text' => '<br />' . TEXT_SINGLECOPY_CATEGORY . '<br />' . xtc_draw_pull_down_menu('dest_category_id', $category_tree, $current_category_id) . '<br /><hr noshade>');
$contents[] = array('text' => '<strong>' . TEXT_HOW_TO_COPY . '</strong><br />' . xtc_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . xtc_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE . '<br /><hr noshade>');
$contents[] = array('align' => 'center', 'text' => '<input class="button" type="submit" name="multi_copy_confirm" value="' . BUTTON_COPY . '"> <a class="button" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&cID=' . $cInfo->categories_id) . '">' . BUTTON_CANCEL . '</a>');
//close multi-action form
$contents[] = array('text' => '</form>');
ca. Zeile 669
break;
default:
if ($rows > 0) {
if (is_object($cInfo)) {
if (isset($cInfo) && is_object($cInfo)) {
// category info box contents
$heading[] = array('align' => 'center', 'text' => '<b>' . $cInfo->categories_name . '</b>');
//Multi Element Actions
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%;">' . TEXT_MARKED_ELEMENTS . '</div>');
$contents[] = array('align' => 'center', 'text' => '<input type="submit" class="button" name="multi_delete" onclick="this.blur();" value="'. BUTTON_DELETE . '"> <input type="submit" class="button" onclick="this.blur();" name="multi_move" value="' . BUTTON_MOVE . '"> <input type="submit" class="button" onclick="this.blur();" name="multi_copy" value="' . BUTTON_COPY . '">');
$contents[] = array('align' => 'center', 'text' => '<input type="submit" class="button" name="multi_status_on" onclick="this.blur();" value="'. BUTTON_STATUS_ON . '"> <input type="submit" class="button" onclick="this.blur();" name="multi_status_off" value="' . BUTTON_STATUS_OFF . '">');
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
if (MODULE_XTBOOSTER_STATUS=='True') {
if (defined('MODULE_XTBOOSTER_STATUS') && MODULE_XTBOOSTER_STATUS == 'True') {
$contents[] = array('align' => 'center', 'text' => xtc_button(BUTTON_XTBOOSTER_MULTI, 'submit', 'name="multi_xtb"'));
}
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
$contents[] = array('text' => '</form>');
ca. Zeile 687
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; border-top: 1px solid Black; margin-top: 5px;">' . TEXT_ACTIVE_ELEMENT . '</div>');
$contents[] = array('align' => 'center', 'text' => '<a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=edit_category') . '">' . BUTTON_EDIT . '</a>');
//Insert new Element Actions
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; border-top: 1px solid Black; margin-top: 5px;">' . TEXT_INSERT_ELEMENT . '</div>');
if (!$_GET['search']) {
$contents[] = array('align' => 'center', 'text' => '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '">' . BUTTON_NEW_CATEGORIES . '</a> <a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '">' . BUTTON_NEW_PRODUCTS . '</a>');
if (!xtc_not_null($search)) {
$buttons_new_elements = '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '">' . BUTTON_NEW_CATEGORIES . '</a>';
if ($cPath != '0') {
$buttons_new_elements .= ' ';
$buttons_new_elements .= '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '">' . BUTTON_NEW_PRODUCTS . '</a>';
}
$contents[] = array('align' => 'center', 'text' => $buttons_new_elements);
}
//Informations
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; border-top: 1px solid Black; margin-top: 5px;">' . TEXT_INFORMATIONS . '</div>');
$contents[] = array('text' => '<div style="padding-left: 50px;">' . TEXT_DATE_ADDED . ' ' . xtc_date_short($cInfo->date_added) . '</div>');
if (xtc_not_null($cInfo->last_modified)) $contents[] = array('text' => '<div style="padding-left: 50px;">' . TEXT_LAST_MODIFIED . ' ' . xtc_date_short($cInfo->last_modified) . '</div>');
$contents[] = array('align' => 'center', 'text' => '<div style="padding: 10px;">' . xtc_info_image_c($cInfo->categories_image, $cInfo->categories_name, 200) . '</div><div style="padding-bottom: 10px;">' . $cInfo->categories_image . '</div>');
} elseif (is_object($pInfo)) {
if (xtc_not_null($cInfo->last_modified)) {
$contents[] = array('text' => '<div style="padding-left: 50px;">' . TEXT_LAST_MODIFIED . ' ' . xtc_date_short($cInfo->last_modified) . '</div>');
}
$contents[] = array('align' => 'center', 'text' => '<div style="padding: 10px;">' . xtc_image(DIR_WS_CATALOG.DIR_WS_IMAGES.'categories/'.$cInfo->categories_image, $cInfo->categories_name, '','',$box_cat_image_size) . '</div><div style="padding-bottom: 10px;">' . $cInfo->categories_image . '</div>'); //web28 -2011-06-06- set image size by css size
} elseif (isset($pInfo) && is_object($pInfo)) {
// product info box contents
$heading[] = array('align' => 'center', 'text' => '<b>' . xtc_get_products_name($pInfo->products_id, $_SESSION['languages_id']) . '</b>');
//Multi Element Actions
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%;">' . TEXT_MARKED_ELEMENTS . '</div>');
$contents[] = array('align' => 'center', 'text' => xtc_button(BUTTON_DELETE, 'submit', 'name="multi_delete"').' '.xtc_button(BUTTON_MOVE, 'submit', 'name="multi_move"').' '.xtc_button(BUTTON_COPY, 'submit', 'name="multi_copy"'));
$contents[] = array('align' => 'center', 'text' => '<input type="submit" class="button" name="multi_status_on" onclick="this.blur();" value="'. BUTTON_STATUS_ON . '"> <input type="submit" class="button" onclick="this.blur();" name="multi_status_off" value="' . BUTTON_STATUS_OFF . '">');
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
if (MODULE_XTBOOSTER_STATUS=='True') {
if (defined('MODULE_XTBOOSTER_STATUS') && MODULE_XTBOOSTER_STATUS=='True') {
$contents[] = array('align' => 'center', 'text' => xtc_button(BUTTON_XTBOOSTER_MULTI, 'submit', 'name="multi_xtb"'));
}
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
$contents[] = array('text' => '</form>');
//Single Product Actions
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; border-top: 1px solid Black; margin-top: 5px;">' . TEXT_ACTIVE_ELEMENT . '</div>');
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
// $contents[] = array('align' => 'center', 'text' => '<table><tr><td><a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . BUTTON_EDIT . '</a></td><td><form action="' . FILENAME_NEW_ATTRIBUTES . '" name="edit_attributes" method="post"><input type="hidden" name="action" value="edit"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_EDIT_ATTRIBUTES . '"></form></td></tr><tr><td colspan="2" style="text-align: center;"><form action="' . FILENAME_CATEGORIES . '" name="edit_crossselling" method="GET"><input type="hidden" name="action" value="edit_crossselling"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_EDIT_CROSS_SELLING . '"></form></td></tr></table>');
if (MODULE_XTBOOSTER_STATUS=='True') {
if (defined('MODULE_XTBOOSTER_STATUS') && MODULE_XTBOOSTER_STATUS=='True') {
$contents[] = array('align' => 'center', 'text' => '<table><tr><td><a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . BUTTON_EDIT . '</a></td><td><form action="' . FILENAME_NEW_ATTRIBUTES . '" name="edit_attributes" method="post"><input type="hidden" name="action" value="edit"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_EDIT_ATTRIBUTES . '"></form></td></tr><tr><td colspan="2" style="text-align: center;"><form action="' . FILENAME_CATEGORIES . '" name="edit_crossselling" method="GET"><input type="hidden" name="action" value="edit_crossselling"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_EDIT_CROSS_SELLING . '"></form> <form action="' . FILENAME_XTBOOSTER . '" name="edit_xtbooster" method="POST"><input type="hidden" name="action" value="edit_xtbooster"><input type="hidden" name="xtb_module" value="add"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_EDIT_XTBOOSTER . '"></form></td></tr></table>');
}
else {
} else {
$contents[] = array('align' => 'center', 'text' => '<table><tr><td><a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . BUTTON_EDIT . '</a></td><td><form action="' . FILENAME_NEW_ATTRIBUTES . '" name="edit_attributes" method="post"><input type="hidden" name="action" value="edit"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_EDIT_ATTRIBUTES . '"></form></td></tr><tr><td colspan="2" style="text-align: center;"><form action="' . FILENAME_CATEGORIES . '" name="edit_crossselling" method="GET"><input type="hidden" name="action" value="edit_crossselling"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_EDIT_CROSS_SELLING . '"></form></td></tr></table>');
}
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
//Insert new Element Actions
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; border-top: 1px solid Black; margin-top: 5px;">' . TEXT_INSERT_ELEMENT . '</div>');
if (!$_GET['search']) {
$contents[] = array('align' => 'center', 'text' => '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '">' . BUTTON_NEW_CATEGORIES . '</a> <a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '">' . BUTTON_NEW_PRODUCTS . '</a>');
if (!xtc_not_null($search)) {
$buttons_new_elements = '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '">' . BUTTON_NEW_CATEGORIES . '</a>';
if ($cPath != '0') {
$buttons_new_elements .= ' ';
$buttons_new_elements .= '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '">' . BUTTON_NEW_PRODUCTS . '</a>';
}
$contents[] = array('align' => 'center', 'text' => $buttons_new_elements);
}
//Informations
$contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; border-top: 1px solid Black; margin-top: 5px;">' . TEXT_INFORMATIONS . '</div>');
$contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_DATE_ADDED . ' ' . xtc_date_short($pInfo->products_date_added) . '</div>');
if (xtc_not_null($pInfo->products_last_modified)) $contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_LAST_MODIFIED . ' ' . xtc_date_short($pInfo->products_last_modified) . '</div>');
if (date('Y-m-d') < $pInfo->products_date_available) $contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_DATE_AVAILABLE . ' ' . xtc_date_short($pInfo->products_date_available) . '</div>');
if (xtc_not_null($pInfo->products_last_modified)) {
$contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_LAST_MODIFIED . ' ' . xtc_date_short($pInfo->products_last_modified) . '</div>');
}
if (date('Y-m-d') < $pInfo->products_date_available) {
$contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_DATE_AVAILABLE . ' ' . xtc_date_short($pInfo->products_date_available) . '</div>');
}
// START IN-SOLUTION Berechung des Bruttopreises
$price = $pInfo->products_price;
$price = xtc_round($price,PRICE_PRECISION);
$price_string = '' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($price);
if (PRICE_IS_BRUTTO=='true' && ($_GET['read'] == 'only' || $_GET['action'] != 'new_product_preview') ){
if (PRICE_IS_BRUTTO=='true' && ($_GET['read'] == 'only' || $action != 'new_product_preview') ){
$price_netto = xtc_round($price,PRICE_PRECISION);
$tax_query = xtc_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_class_id = '" . $pInfo->products_tax_class_id . "' ");
$tax = xtc_db_fetch_array($tax_query);
$price = ($price*($tax[tax_rate]+100)/100);
ca. Zeile 753
} else {
// create category/product info
$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');
$contents[] = array('text' => sprintf(TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS, xtc_get_categories_name($current_category_id, $_SESSION['languages_id'])));
$contents[] = array('align' => 'center', 'text' => '<BR /><a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '">' . BUTTON_NEW_CATEGORIES . '</a> <a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '">' . BUTTON_NEW_PRODUCTS . '</a><BR /><BR />');
$buttons_new_elements = '<br /><a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '">' . BUTTON_NEW_CATEGORIES . '</a>';
if ($cPath != '0') {
$buttons_new_elements .= ' ';
$buttons_new_elements .= '<a class="button" onclick="this.blur()" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '">' . BUTTON_NEW_PRODUCTS . '</a><br /><br />';
}
break;
$contents[] = array('align' => 'center', 'text' => $buttons_new_elements);
}
break;
} //end switch
if ((xtc_not_null($heading)) && (xtc_not_null($contents))) {
//display info box
echo '<td width="265" valign="top" style="padding-left: 5px;">' . "\n";
$box = new box;
admin/includes/modules/export/billiger.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: billiger.php 639 2009-04-06 23:44:06Z gunah $
$Id: billiger.php 2020 2011-06-24 10:10:55Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2005 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(cod.php,v 1.28 2003/02/14); www.oscommerce.com
(c) 2003 nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
(c) 2006 xt-commerce; www.xt-commerce.com
(c) 2008 modified by m3WebWork.de - version 1.1
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 72
require(DIR_FS_CATALOG . DIR_WS_CLASSES . 'xtcPrice.php');
$xtPrice = new xtcPrice($_POST['currencies'], $_POST['status']);
// query
//BOF - DokuMan - 2011-06-24 - fix sql query (thx to franky_n)
/*
$export_query = xtc_db_query("SELECT
p.products_id,
p.products_model,
p.products_ean,
ca. Zeile 107
lng.languages_id = pd.language_id
ORDER BY
p.products_date_added DESC,
pd.products_name");
*/
$export_query =xtc_db_query("SELECT
p.products_id,
pd.products_name,
pd.products_description,
pd.products_short_description,
p.products_model,
p.products_ean,
p.products_image,
p.products_price,
p.products_status,
p.products_date_available,
p.products_shippingtime,
p.products_discount_allowed,
pd.products_meta_keywords,
p.products_tax_class_id,
p.products_date_added,
p.products_weight,
m.manufacturers_name
FROM
" . TABLE_PRODUCTS . " p LEFT JOIN
" . TABLE_MANUFACTURERS . " m
ON p.manufacturers_id = m.manufacturers_id LEFT JOIN
" . TABLE_PRODUCTS_DESCRIPTION . " pd
ON p.products_id = pd.products_id AND
pd.language_id = '".(int)$_SESSION['languages_id']."' LEFT JOIN
" . TABLE_SPECIALS . " s
ON p.products_id = s.products_id
WHERE
p.products_status = 1
ORDER BY
p.products_date_added DESC,
pd.products_name");
//BOF - DokuMan - 2011-06-24 - fix sql query (thx to franky_n)
// csv schema / headline
$schema = 'id;hersteller;modell_nr;name;kategorie;beschreibung;bild_klein;bild_gross;link;lieferzeit;lieferkosten;preis;waehrung;aufbauservice;24_Std_service;EAN;ASIN;ISBN;PZN;ISMN;EPC;VIN';
$schema .= "\n";
// parse data
admin/includes/modules/export/froogle.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: froogle.php 1188 2005-08-28 14:24:34Z matthias $
$Id: froogle.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/geizhals.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: geizhals.php 1188 2005-08-28 14:24:34Z matthias $
$Id: geizhals.php 1508 2010-11-20 20:16:09Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(cod.php,v 1.28 2003/02/14); www.oscommerce.com
(c) 2003 nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
(c) 2006 xt-commerce; www.xt-commerce.com
based on:
billiger.php
added fields for geizhals specific export and included zip capability;
named module geizhals.php
updated version by franky_n
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
define('MODULE_GEIZHALS_TEXT_DESCRIPTION', 'Export - Geizhals.at (; getrennt)<br /><strong>Format:</strong><br />Artikelnr;Hersteller;Bezeichnung;Preis; Verfügbarkeit;deeplink;optionale Beschreibung');
define('MODULE_GEIZHALS_TEXT_DESCRIPTION', 'Export - Geizhals.de (; getrennt)');
define('MODULE_GEIZHALS_TEXT_TITLE', 'Geizhals.at - CSV');
define('MODULE_GEIZHALS_FILE_TITLE' , '<hr noshade>Dateiname');
define('MODULE_GEIZHALS_FILE_DESC' , 'Geben Sie einen Dateinamen ein, falls die Exportadatei am Server gespeichert werden soll.<br />(Verzeichnis export/)');
define('MODULE_GEIZHALS_FILE_DESC' , 'Geben Sie einen Dateinamen ein, falls die Exportadatei am Server gespeichert werden soll.<br>(Verzeichnis export/)');
define('MODULE_GEIZHALS_STATUS_DESC','Modulstatus');
define('MODULE_GEIZHALS_STATUS_TITLE','Status');
define('MODULE_GEIZHALS_CURRENCY_TITLE','Währung');
define('MODULE_GEIZHALS_CURRENCY_DESC','Welche Währung soll exportiert werden?');
define('EXPORT_YES','Nur Herunterladen');
define('EXPORT_NO','Am Server Speichern');
define('CURRENCY','<hr noshade><strong>Währung:</strong>');
define('CURRENCY','<hr noshade><b>Währung:</b>');
define('CURRENCY_DESC','Währung in der Exportdatei');
define('EXPORT','Bitte den Sicherungsprozess AUF KEINEN FALL unterbrechen. Dieser kann einige Minuten in Anspruch nehmen.');
define('EXPORT_TYPE','<hr noshade><strong>Speicherart:</strong>');
define('EXPORT_STATUS_TYPE','<hr noshade><strong>Kundengruppe:</strong>');
define('EXPORT_STATUS','Bitte wählen Sie die Kundengruppe, die Basis für den Exportierten Preis bildet. (Falls Sie keine Kundengruppenpreise haben, wählen Sie <i>Gast</i>):</strong>');
define('CAMPAIGNS','<hr noshade><strong>Kampagnen:</strong>');
define('EXPORT_TYPE','<hr noshade><b>Speicherart:</b>');
define('EXPORT_STATUS_TYPE','<hr noshade><b>Kundengruppe:</b>');
define('EXPORT_STATUS','Bitte wählen Sie die Kundengruppe, die Basis für den Exportierten Preis bildet. (Falls Sie keine Kundengruppenpreise haben, wählen Sie <i>Gast</i>):</b>');
define('CAMPAIGNS','<hr noshade><b>Kampagnen:</b>');
define('CAMPAIGNS_DESC','Mit Kampagne zur Nachverfolgung verbinden.');
define('DATE_FORMAT_EXPORT', '%d.%m.%Y'); // this is used for strftime()
// include needed functions
class geizhals {
ca. Zeile 48
$this->title = MODULE_GEIZHALS_TEXT_TITLE;
$this->description = MODULE_GEIZHALS_TEXT_DESCRIPTION;
$this->sort_order = MODULE_GEIZHALS_SORT_ORDER;
$this->enabled = ((MODULE_GEIZHALS_STATUS == 'True') ? true : false);
$this->CAT=array();
$this->PARENT=array();
}
ca. Zeile 53
}
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 = 'Artikelnr;Hersteller;Bezeichnung;Preis;Verfügbarkeit;deeplink;optionale Beschreibung' . "\n";
$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
p.products_id,
pd.products_name,
pd.products_description,
p.products_model,
p.products_shippingtime,
pd.products_description,pd.products_short_description,
p.products_model,p.products_ean,
p.products_image,
p.products_price,
p.products_status,
p.products_date_available,
p.products_shippingtime,
p.products_discount_allowed,
pd.products_meta_keywords,
p.products_tax_class_id,
p.products_date_added,
m.manufacturers_name
m.manufacturers_name,
p.products_quantity,
p.products_weight
FROM
" . TABLE_PRODUCTS . " p LEFT JOIN
" . TABLE_MANUFACTURERS . " m
ON p.manufacturers_id = m.manufacturers_id LEFT JOIN
ca. Zeile 81
ON p.products_id = pd.products_id AND
pd.language_id = '".$_SESSION['languages_id']."' LEFT JOIN
" . TABLE_SPECIALS . " s
ON p.products_id = s.products_id
WHERE
p.products_status = 1
WHERE p.products_status = 1
ORDER BY
p.products_date_added DESC,
pd.products_name");
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
categories_id
FROM ".TABLE_PRODUCTS_TO_CATEGORIES."
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
shipping_status_name
FROM ".TABLE_SHIPPING_STATUS."
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
$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("<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("","," \"",$products_description);
$products_description = str_replace("&qout,"," \"",$products_description);
$products_description = str_replace(chr(13)," ",$products_description);
//-- SNAKELAB ----//
require_once(DIR_FS_INC . 'xtc_href_link_from_admin.inc.php');
$link = xtc_href_link_from_admin('product_info.php', 'products_id=' . $products['products_id']);
(preg_match("/\?/",$link)) ? $link .= '&' : $link .= '?';
$link .= 'referer='.$this->code;
(!empty($_POST['campaign']))
? $link .= '&'.$_POST['campaign']
: false;
//$link .= '&language='.$this->language;
//-- SNAKELAB ----//
$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("","," \"",$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_model'] . ';' .
$products['manufacturers_name'] .';'.
$products['products_name'] . ';' .
number_format($products_price,2,'.',''). ';' .
xtc_get_shipping_status_name($products['products_shippingtime']). ';' .
$link.';'.
$products_description . "\n";
$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
ca. Zeile 151
exit;
break;
}
}
################## added by geizhals
function getShipCost($table, $weight) {
$vals=explode(',',$table); //Dokuman - 2010-11-20 - replace deprecated function split() with explode()
$ret='n/a';
foreach($vals as &$val) {
list($kg,$cost)=explode(':',$val); //Dokuman - 2010-11-20 - replace deprecated function split() with explode()
if($weight <= $kg) {
$ret = $cost;
break;
}
}
return $ret;
}
################## end added by geizhals
function buildCAT($catID) {
if (isset($this->CAT[$catID])) {
return $this->CAT[$catID];
} else {
$cat=array();
$tmpID=$catID;
while ($this->getParent($catID)!=0 || $catID!=0) {
$cat_select=xtc_db_query("SELECT categories_name FROM ".TABLE_CATEGORIES_DESCRIPTION." WHERE categories_id='".$catID."' and language_id='".$_SESSION['languages_id']."'");
$cat_data=xtc_db_fetch_array($cat_select);
$catID=$this->getParent($catID);
$cat[]=$cat_data['categories_name'];
}
$catStr='';
for ($i=count($cat);$i>0;$i--) {
$catStr.=$cat[$i-1].' > ';
}
$this->CAT[$tmpID]=$catStr;
return $this->CAT[$tmpID];
}
}
function display() {
function getParent($catID) {
if (isset($this->PARENT[$catID])) {
return $this->PARENT[$catID];
} else {
$parent_query=xtc_db_query("SELECT parent_id FROM ".TABLE_CATEGORIES." WHERE categories_id='".$catID."'");
$parent_data=xtc_db_fetch_array($parent_query);
$this->PARENT[$catID]=$parent_data['parent_id'];
return $parent_data['parent_id'];
}
}
function display() {
$customers_statuses_array = xtc_get_customers_statuses();
// build Currency Select
$curr='';
$currencies=xtc_db_query("SELECT code FROM ".TABLE_CURRENCIES);
while ($currencies_data=xtc_db_fetch_array($currencies)) {
ca. Zeile 162
// build Currency Select
$curr='';
$currencies=xtc_db_query("SELECT code FROM ".TABLE_CURRENCIES);
while ($currencies_data=xtc_db_fetch_array($currencies)) {
$curr.=xtc_draw_radio_field('currencies', $currencies_data['code'],true).$currencies_data['code'].'<br />';
$curr.=xtc_draw_radio_field('currencies', $currencies_data['code'],true).$currencies_data['code'].'<br>';
}
$campaign_array = array(array('id' => '', 'text' => TEXT_NONE));
$campaign_query = xtc_db_query("select campaigns_name, campaigns_refID from ".TABLE_CAMPAIGNS." order by campaigns_id");
while ($campaign = xtc_db_fetch_array($campaign_query)) {
$campaign_array[] = array ('id' => 'refID='.$campaign['campaigns_refID'].'&', 'text' => $campaign['campaigns_name'],);
ca. Zeile 171
while ($campaign = xtc_db_fetch_array($campaign_query)) {
$campaign_array[] = array ('id' => 'refID='.$campaign['campaigns_refID'].'&', 'text' => $campaign['campaigns_name'],);
}
return array('text' => EXPORT_STATUS_TYPE.'<br />'.
EXPORT_STATUS.'<br />'.
xtc_draw_pull_down_menu('status',$customers_statuses_array, '1').'<br />'.
CURRENCY.'<br />'.
CURRENCY_DESC.'<br />'.
return array('text' => EXPORT_STATUS_TYPE.'<br>'.
EXPORT_STATUS.'<br>'.
xtc_draw_pull_down_menu('status',$customers_statuses_array, '1').'<br>'.
CURRENCY.'<br>'.
CURRENCY_DESC.'<br>'.
$curr.
CAMPAIGNS.'<br />'.
CAMPAIGNS_DESC.'<br />'.
xtc_draw_pull_down_menu('campaign',$campaign_array).'<br />'.
EXPORT_TYPE.'<br />'.
EXPORT.'<br />'.
xtc_draw_radio_field('export', 'no',false).EXPORT_NO.'<br />'.
xtc_draw_radio_field('export', 'yes',true).EXPORT_YES.'<br />'.
'<br />' . xtc_button(BUTTON_EXPORT) .
CAMPAIGNS.'<br>'.
CAMPAIGNS_DESC.'<br>'.
xtc_draw_pull_down_menu('campaign',$campaign_array).'<br>'.
EXPORT_TYPE.'<br>'.
EXPORT.'<br>'.
xtc_draw_radio_field('export', 'no',false).EXPORT_NO.'<br>'.
xtc_draw_radio_field('export', 'yes',true).EXPORT_YES.'<br>'.
'<br>' . xtc_button(BUTTON_EXPORT) .
xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=geizhals')));
}
function check() {
if (!isset($this->_check)) {
ca. Zeile 210
function keys() {
return array('MODULE_GEIZHALS_STATUS','MODULE_GEIZHALS_FILE');
}
}
################## added by geizhals
/*
Zip file creation class makes zip files on the fly...
use the functions add_dir() and add_file() to build the zip file;
see example code below
by Eric Mueller
http://www.themepark.com
v1.1 9-20-01
- added comments to example
v1.0 2-5-01
initial version with:
- class appearance
- add_file() and file() methods
- gzcompress() output hacking
by Denis O.Philippov, webmaster@atlant.ru, http://www.atlant.ru
*/
// official ZIP file format: http://www.pkware.com/appnote.txt
class zipfile {
var $datasec = array(); // array to store compressed data
var $ctrl_dir = array(); // central directory
var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"; //end of Central directory record
var $old_offset = 0;
// adds "directory" to archive - do this before putting any files in directory!
// $name - name of directory... like this: "path/"
// ...then you can add files using add_file with names like "path/file.txt"
function add_dir($name) {
$name = str_replace("\\", "/", $name);
$fr = "\x50\x4b\x03\x04";
$fr .= "\x0a\x00"; // ver needed to extract
$fr .= "\x00\x00"; // gen purpose bit flag
$fr .= "\x00\x00"; // compression method
$fr .= "\x00\x00\x00\x00"; // last mod time and date
$fr .= pack("V",0); // crc32
$fr .= pack("V",0); //compressed filesize
$fr .= pack("V",0); //uncompressed filesize
$fr .= pack("v", strlen($name) ); //length of pathname
$fr .= pack("v", 0 ); //extra field length
$fr .= $name;
// end of "local file header" segment
// no "file data" segment for path
// "data descriptor" segment (optional but necessary if archive is not served as file)
$fr .= pack("V",$crc); //crc32
$fr .= pack("V",$c_len); //compressed filesize
$fr .= pack("V",$unc_len); //uncompressed filesize
// add this entry to array
$this -> datasec[] = $fr;
$new_offset = strlen(implode("", $this->datasec));
// now add to central record
$cdrec = "\x50\x4b\x01\x02";
$cdrec .="\x00\x00"; // version made by
$cdrec .="\x0a\x00"; // version needed to extract
$cdrec .="\x00\x00"; // gen purpose bit flag
$cdrec .="\x00\x00"; // compression method
$cdrec .="\x00\x00\x00\x00"; // last mod time & date
$cdrec .= pack("V",0); // crc32
$cdrec .= pack("V",0); //compressed filesize
$cdrec .= pack("V",0); //uncompressed filesize
$cdrec .= pack("v", strlen($name) ); //length of filename
$cdrec .= pack("v", 0 ); //extra field length
$cdrec .= pack("v", 0 ); //file comment length
$cdrec .= pack("v", 0 ); //disk number start
$cdrec .= pack("v", 0 ); //internal file attributes
$ext = "\x00\x00\x10\x00";
$ext = "\xff\xff\xff\xff";
$cdrec .= pack("V", 16 ); //external file attributes - 'directory' bit set
$cdrec .= pack("V", $this -> old_offset ); //relative offset of local header
$this -> old_offset = $new_offset;
$cdrec .= $name;
// optional extra field, file comment goes here
// save to array
$this -> ctrl_dir[] = $cdrec;
}
// adds "file" to archive
// $data - file contents
// $name - name of file in archive. Add path if your want
function add_file($data, $name) {
$name = str_replace("\\", "/", $name);
//$name = str_replace("\\", "\\\\", $name);
$fr = "\x50\x4b\x03\x04";
$fr .= "\x14\x00"; // ver needed to extract
$fr .= "\x00\x00"; // gen purpose bit flag
$fr .= "\x08\x00"; // compression method
$fr .= "\x00\x00\x00\x00"; // last mod time and date
$unc_len = strlen($data);
$crc = crc32($data);
$zdata = gzcompress($data);
$zdata = substr( substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug
$c_len = strlen($zdata);
$fr .= pack("V",$crc); // crc32
$fr .= pack("V",$c_len); //compressed filesize
$fr .= pack("V",$unc_len); //uncompressed filesize
$fr .= pack("v", strlen($name) ); //length of filename
$fr .= pack("v", 0 ); //extra field length
$fr .= $name;
// end of "local file header" segment
// "file data" segment
$fr .= $zdata;
// "data descriptor" segment (optional but necessary if archive is not served as file)
$fr .= pack("V",$crc); //crc32
$fr .= pack("V",$c_len); //compressed filesize
$fr .= pack("V",$unc_len); //uncompressed filesize
// add this entry to array
$this -> datasec[] = $fr;
$new_offset = strlen(implode("", $this->datasec));
// now add to central directory record
$cdrec = "\x50\x4b\x01\x02";
$cdrec .="\x00\x00"; // version made by
$cdrec .="\x14\x00"; // version needed to extract
$cdrec .="\x00\x00"; // gen purpose bit flag
$cdrec .="\x08\x00"; // compression method
$cdrec .="\x00\x00\x00\x00"; // last mod time & date
$cdrec .= pack("V",$crc); // crc32
$cdrec .= pack("V",$c_len); //compressed filesize
$cdrec .= pack("V",$unc_len); //uncompressed filesize
$cdrec .= pack("v", strlen($name) ); //length of filename
$cdrec .= pack("v", 0 ); //extra field length
$cdrec .= pack("v", 0 ); //file comment length
$cdrec .= pack("v", 0 ); //disk number start
$cdrec .= pack("v", 0 ); //internal file attributes
$cdrec .= pack("V", 32 ); //external file attributes - 'archive' bit set
$cdrec .= pack("V", $this -> old_offset ); //relative offset of local header
$this -> old_offset = $new_offset;
$cdrec .= $name;
// optional extra field, file comment goes here
// save to central directory
$this -> ctrl_dir[] = $cdrec;
}
function file() { // dump out file
$data = implode("", $this -> datasec);
$ctrldir = implode("", $this -> ctrl_dir);
return
$data.
$ctrldir.
$this -> eof_ctrl_dir.
pack("v", sizeof($this -> ctrl_dir)). // total # of entries "on this disk"
pack("v", sizeof($this -> ctrl_dir)). // total # of entries overall
pack("V", strlen($ctrldir)). // size of central dir
pack("V", strlen($data)). // offset to start of central dir
"\x00\x00"; // .zip file comment length
}
}
################## end by geizhals
?>
admin/includes/modules/export/golem.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: golem.php 1188 2005-08-28 14:24:34Z matthias $
$Id: golem.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/googlebase.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: googlebase.php 1000 2009-09-25 17:06:30Z Hetfield $
$Id: googlebase.php 2124 2011-08-29 10:14:43Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(cod.php,v 1.28 2003/02/14); www.oscommerce.com
(c) 2003 nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
(c) 2005 (froogle.php, v 1188 2005/08/28); matthias - www.xt-commerce.com
-------------------------------------------------------------------------------------------------------------------------
(c) 2006 xt-commerce; www.xt-commerce.com
-----------------------------------------------------------------------------------------
Erweiterung der googlebase.php (c)2009 by Hetfield - http://www.MerZ-IT-SerVice.de um folgende Funktionen:
- Gewichts- oder preisabhängige Vesandkosten mit Berücksichtigung der Versandkostenfrei-Grenze
- Beachtung des Mindermengenzuschlags
- Zustand 'neu' fest hinterlegt
ca. Zeile 22
- Anzeige Gewicht
- Anzeige EAN
- Auswahl der verschiedenen suchmaschinenfreundlichen URL für den Exportlink (Original/keine, Shopstat oder DirectURL)
- Umlautproblematik und str_replace-Wahnsinn beseitigt
-------------------------------------------------------------------------------------------------------------------------
updated version by franky_n
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
define('MODULE_GOOGLEBASE_TEXT_TITLE', 'Google Base - TXT / XML<br/>Exportmodul für Google Base / inkl. Felder "Zustand" und "Versandkosten"');
define('MODULE_GOOGLEBASE_TEXT_DESCRIPTION', 'Export - Google Base (Tab getrennt)');
define('MODULE_GOOGLEBASE_TEXT_TITLE', 'Google Base - TXT<br/>Exportmodul für Google Base / inkl. Felder "Zustand" und "Versandkosten"');
define('MODULE_GOOGLEBASE_FILE_TITLE' , '<hr noshade>Dateiname');
define('MODULE_GOOGLEBASE_FILE_DESC' , 'Geben Sie einen Dateinamen ein, falls die Exportdatei am Server gespeichert werden soll.<br />(Verzeichnis export/)');
define('MODULE_GOOGLEBASE_STATUS_DESC','Modulstatus');
define('MODULE_GOOGLEBASE_STATUS_TITLE','Status');
define('MODULE_GOOGLEBASE_STATUS_DESC','Modulstatus');
define('MODULE_GOOGLEBASE_CURRENCY_TITLE','Währung');
define('MODULE_GOOGLEBASE_CURRENCY_DESC','Welche Währung soll exportiert werden?');
define('MODULE_GOOGLEBASE_SHIPPING_COST_TITLE','<hr noshade><b>Versandkosten</b>');
define('MODULE_GOOGLEBASE_SHIPPING_COST_DESC','Die Versandkosten basieren auf dem Artikelpreis oder dem Artikelgewicht. Beispiel: 25:4.90,50:9.90,etc.. Bis 25 werden 4.90 verrechnet, darüber bis 50 werden 9.90 verrechnet, etc.');
define('MODULE_GOOGLEBASE_SHIPPING_ART_TITLE','<hr noshade><b>Versandkosten-Methode</b>');
define('MODULE_GOOGLEBASE_SHIPPING_ART_DESC','Die Versandkosten basieren auf dem Artikelpreis oder dem Artikelgewicht.');
define('MODULE_GOOGLEBASE_SUMAURL_TITLE','<hr noshade><b>Suchmaschinenfreundliche URL</b>');
define('MODULE_GOOGLEBASE_SUMAURL_DESC','Wählen Sie aus, ob und welche Erweiterung Sie für suchmaschinenfreundliche URL in Ihrem Shop nutzen');
define('MODULE_GOOGLEBASE_FORMAT_TITLE','Exportformat');
define('MODULE_GOOGLEBASE_FORMAT_DESC','Welches Format soll exportiert werden?');
define('EXPORT_YES','Nur Herunterladen');
define('EXPORT_NO','Am Server Speichern');
define('CURRENCY','<hr noshade><b>Währung:</b>');
define('CURRENCY_DESC','Währung in der Exportdatei');
ca. Zeile 71
$this->sort_order = MODULE_GOOGLEBASE_SORT_ORDER;
$this->enabled = ((MODULE_GOOGLEBASE_STATUS == 'True') ? true : false);
$this->CAT=array();
$this->PARENT=array();
}
function process($file) {
function process($file = MODULE_GOOGLEBASE_FILE) {
// Read Modules
$module_type = 'payment';
$module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
$module_file_extension = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '.'));
$directory_array = array();
if ($dir = @dir($module_directory)) {
while ($module_file = $dir->read()) {
if (!is_dir($module_directory . $module_file)) {
if (substr($module_file, strrpos($module_file, '.')) == $module_file_extension) {
$directory_array[] = $module_file;
}
}
}
sort($directory_array);
$dir->close();
}
$installed_modules = array();
$module_info = array();
for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
$module_file = $directory_array[$i];
include(DIR_FS_LANGUAGES . $_SESSION['language'] . '/modules/' . $module_type . '/' . $module_file);
include($module_directory . $module_file);
$class = substr($module_file, 0, strrpos($module_file, '.'));
if (xtc_class_exists($class)) {
$module = new $class();
$module_info[] = array($module->code => $module->title);
}
}
@xtc_set_time_limit(0);
require(DIR_FS_CATALOG.DIR_WS_CLASSES . 'xtcPrice.php');
$xtPrice = new xtcPrice($_POST['currencies'],$_POST['status']);
ca. Zeile 85
require_once(DIR_FS_CATALOG.'inc/bluegate_seo.inc.php');
$bluegateSeo = new BluegateSeo();
}
$schema = "beschreibung".chr(9)."id".chr(9)."link".chr(9)."preis".chr(9)."w".chr(228)."hrung".chr(9)."titel".chr(9)."zustand".chr(9)."bild_url".chr(9)."ean".chr(9)."gewicht".chr(9)."marke".chr(9)."versand".chr(9)."zahlungsmethode".chr(13);
$schema_txt_de = "beschreibung".chr(9)."id".chr(9)."link".chr(9)."preis".chr(9)."w".chr(228)."hrung".chr(9)."titel".chr(9)."zustand".chr(9)."bild_url".chr(9)."ean".chr(9)."gewicht".chr(9)."marke".chr(9)."versand".chr(9)."zahlungsmethode".chr(9)."zahlungsrichtlinien".chr(13);
$schema_xml_de = '<?xml version="1.0" encoding="UTF-8"?>'."\n".
'<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">'."\n".
"\t".'<channel>'."\n".
"\t"."\t".'<title>'.htmlspecialchars(TITLE).'</title>'."\n".
"\t"."\t".'<description>'.META_DESCRIPTION.'</description>'."\n".
"\t"."\t".'<link>'.HTTP_SERVER.'</link>'."\n";
if ($_POST['shippingcosts'] != MODULE_GOOGLEBASE_SHIPPING_COST) {
xtc_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . xtc_db_input($_POST['shippingcosts']) . "' where configuration_key = 'MODULE_GOOGLEBASE_SHIPPING_COST'");
}
$zahlungsmethode = '';
if (defined('MODULE_PAYMENT_INSTALLED') && xtc_not_null(MODULE_PAYMENT_INSTALLED)) {
$creditcard_modules = array('cc', 'moneybookers_cc', 'amoneybookers', 'uos_kreditkarte_modul', 'uos_transfer_modul', 'uos_utdirekt_kk_modul', 'worldpay', 'ipayment', 'iclear', 'paymentpartner_cc', 'wire_card_c3');
$other_payments = '';
$creditcard_modules = array('cc', 'moneybookers_cc', 'amoneybookers', 'worldpay', 'ipayment', 'iclear', 'paymentpartner_cc', 'wire_card_c3');
$americanexpress_modules = array('cc', 'moneybookers_cc', 'amoneybookers', 'ipayment');
$lastschrift_modules = array('banktransfer', 'uos_lastschrift_modul', 'uos_lastschrift_de_modul', 'uos_lastschrift_at_modul', 'uos_utdirekt_ls_modul', 'ipaymentelv', 'paymentpartner_dd');
$ueberweisung_modules = array('moneyorder', 'sofortueberweisungvorkasse', 'eustandardtransfer', 'uos_vorkasse_modul', 'uos_utdirekt_vk_modul');
$lastschrift_modules = array('banktransfer', 'ipaymentelv', 'paymentpartner_dd');
$ueberweisung_modules = array('moneyorder', 'sofortueberweisungvorkasse', 'eustandardtransfer');
$cash_modules = array('cash');
$scheck_modules = array('moneyorder');
$customers_status_query = xtc_db_query("SELECT customers_status_payment_unallowed FROM " . TABLE_CUSTOMERS_STATUS . " WHERE customers_status_id = '" . (int)$_POST['status'] . "' AND language_id = '" . (int)$_SESSION['languages_id'] . "'");
$customers_status_value = xtc_db_fetch_array($customers_status_query);
ca. Zeile 105
$unallowed_payment_modules = explode(',', $customers_status_value['customers_status_payment_unallowed']);
for ($i = 0, $n = sizeof($installedpayments); $i < $n; $i++) {
$installedpayments[$i] = str_replace('.php','',$installedpayments[$i]);
if (!in_array($installedpayments[$i], $unallowed_payment_modules)) {
if (in_array($installedpayments[$i], $creditcard_modules)) { $cc = true; }
if (in_array($installedpayments[$i], $americanexpress_modules)) { $ae = true; }
if (in_array($installedpayments[$i], $lastschrift_modules)) { $la = true; }
if (in_array($installedpayments[$i], $ueberweisung_modules)) { $uw = true; }
if (in_array($installedpayments[$i], $cash_modules)) { $ca = true; }
if (in_array($installedpayments[$i], $scheck_modules)) { $sc = true; }
if (in_array($installedpayments[$i], $creditcard_modules)) { $cc = true; } else
if (in_array($installedpayments[$i], $americanexpress_modules)) { $ae = true; } else
if (in_array($installedpayments[$i], $lastschrift_modules)) { $la = true; } else
if (in_array($installedpayments[$i], $ueberweisung_modules)) { $uw = true; } else
if (in_array($installedpayments[$i], $cash_modules)) { $ca = true; } else
if (in_array($installedpayments[$i], $scheck_modules)) { $sc = true; } else {
$number_module_info = (count($module_info)-1);
foreach ($module_info as $module_key) {
foreach ($module_key as $module_attr => $module_desc) {
if ($installedpayments[$i] == $module_attr) {
if ($number_module_info != $module_key) {
$other_payments .= $module_desc .', ';
}
}
}
}
}
}
}
if ($cc == true) { $creditcard = 'Visa,MasterCard,'; } else { $creditcard = ''; }
if ($ae == true) { $americanexpress = 'AmericanExpress,'; } else { $americanexpress = ''; }
ca. Zeile 121
if ($ca == true) { $cash = 'Barzahlung,'; } else { $cash = ''; }
if ($sc == true) { $scheck = 'Scheck'; } else { $scheck = ''; }
$zahlungsmethode = $creditcard.$americanexpress.$lastschrift.$ueberweisung.$cash.$scheck;
if (substr($zahlungsmethode, -1) == ',') { $zahlungsmethode = substr($zahlungsmethode, 0, -1); }
if (substr($other_payments, -2) == ', ') { $other_payments = substr($other_payments, 0, -2); }
$zahlungsrichtlinie = 'Wir unterstützen neben den Zahlungsarten '.$zahlungsmethode.' auch noch folgende Zahlungsarten '.$other_payments;
}
$export_query = xtc_db_query("SELECT
p.products_id,
ca. Zeile 257
}
}
//create content
$schema .= $products_description."\t".
$schema_txt_de .= $products_description."\t".
$products['products_id']."\t".
$productURL . "\t" .
number_format($products_price,2,'.','')."\t".
$_POST['currencies']."\t".
ca. Zeile 269
$products['products_ean']."\t".
$weight."\t".
$products['manufacturers_name']."\t".
$_POST['shipping_country'].":::".number_format($versand,2,'.','')."\t" .
$zahlungsmethode."\n";
$zahlungsmethode."\t".
$zahlungsrichtlinie."\n";
$schema_xml_de .= "\t"."\t".'<item>'."\n".
"\t"."\t"."\t".'<beschreibung>'.$products_description.'</beschreibung>'."\n".
"\t"."\t"."\t".'<g:id>'.$products['products_id'].'</g:id>'."\n".
"\t"."\t"."\t".'<link>'.str_replace('&', '&', $productURL).'</link>'."\n".
"\t"."\t"."\t".'<g:preis>'.number_format($products_price,2,'.','').'</g:preis>'."\n".
"\t"."\t"."\t".'<g:währung>'.$_POST['currencies'].'</g:währung>'."\n".
"\t"."\t"."\t".'<titel>'.$products_name.'</titel>'."\n".
"\t"."\t"."\t".'<g:zustand>'.'neu'.'</g:zustand>'."\n".
"\t"."\t"."\t".'<g:bild_url>'.$image.'</g:bild_url>'."\n" .
"\t"."\t"."\t".'<g:ean>'.$products['products_ean'].'</g:ean>'."\n".
"\t"."\t"."\t".'<g:gewicht>'.$weight.'</g:gewicht>'."\n".
"\t"."\t"."\t".'<g:marke>'.$products['manufacturers_name'].'</g:marke>'."\n".
"\t"."\t"."\t".'<g:versand>'.$_POST['shipping_country'].':::'.number_format($versand,2,'.','').'</g:versand>'."\n" .
"\t"."\t"."\t".'<g:zahlungsmethode>'.$zahlungsmethode.'</g:zahlungsmethode>'."\n" .
"\t"."\t"."\t".'<g:payment_notes>'.$zahlungsrichtlinie.'</g:payment_notes>'."\n".
"\t"."\t".'</item>'."\n";
}
$schema_xml_de .= "\t".'</channel>'."\n".
'</rss>'."\n";
// create File
$fp = fopen(DIR_FS_DOCUMENT_ROOT.'export/' . $file, "w+");
fputs($fp,$schema);
if (MODULE_GOOGLEBASE_FORMAT == 'TXT') {
fputs($fp,$schema_txt_de);
} else {
fputs($fp,$schema_xml_de);
}
fclose($fp);
switch ($_POST['export']) {
case 'yes':
ca. Zeile 387
function install() {
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_GOOGLEBASE_FILE', 'googlebase.txt', '6', '1', '', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_GOOGLEBASE_STATUS', 'True', '6', '1', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_GOOGLEBASE_SHIPPING_COST', '25:6.90,50:9.90,10000:0.00', '6', '1', '', '', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_GOOGLEBASE_FORMAT', 'TXT', '6', '1', 'xtc_cfg_select_option(array(\'TXT\', \'XML\'), ', now())");
}
function remove() {
xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_GOOGLEBASE_SHIPPING_COST'");
}
function keys() {
return array('MODULE_GOOGLEBASE_STATUS','MODULE_GOOGLEBASE_FILE');
return array('MODULE_GOOGLEBASE_STATUS','MODULE_GOOGLEBASE_FORMAT','MODULE_GOOGLEBASE_FILE');
}
}
?>
admin/includes/modules/export/guenstiger.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: guenstiger.php 2124 2011-08-29 10:14:43Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(cod.php,v 1.28 2003/02/14); www.oscommerce.com
(c) 2003 nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
(c) 2006 xt-commerce; www.xt-commerce.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
ca. Zeile 39
define('MODULE_GUENSTIGER_GTGOOGLE_YES','<span style="color:#006">Aktivieren</span>');
define('MODULE_GUENSTIGER_EXPORT_TYPE','<hr noshade><b>Speicherart:</b>');
define('MODULE_GUENSTIGER_CAMPAIGNS','<span style="color:#006"><hr noshade><b>Kampagnen:</b> (automatisch)</span>');
define('MODULE_GUENSTIGER_CAMPAIGNS_LINK',HTTP_CATALOG_SERVER.DIR_WS_CATALOG."admin/stats_campaigns.php?report=2&startD=1&startM=".date("m")."&startY=".date("Y")."&status=0&campaign=psm&endD=".date("d")."&endM=".date("m")."&endY=".date("Y"));
//BOF - web28 - 2010-09-06 - Fix admin to DIR_WS_ADMIN
//define('MODULE_GUENSTIGER_CAMPAIGNS_LINK',HTTP_CATALOG_SERVER.DIR_WS_CATALOG."admin/stats_campaigns.php?report=2&startD=1&startM=".date("m")."&startY=".date("Y")."&status=0&campaign=psm&endD=".date("d")."&endM=".date("m")."&endY=".date("Y"));
define('MODULE_GUENSTIGER_CAMPAIGNS_LINK',HTTP_CATALOG_SERVER.DIR_WS_ADMIN."stats_campaigns.php?report=2&startD=1&startM=".date("m")."&startY=".date("Y")."&status=0&campaign=psm&endD=".date("d")."&endM=".date("m")."&endY=".date("Y"));
//EOF - web28 - 2010-09-06 - Fix admin to DIR_WS_ADMIN
define('MODULE_GUENSTIGER_CAMPAIGNS_DESC','<span style="color:#006"><i>(nur in Kooperation mit Preissuchmaschine.de relevant)</i><br>Durch unsere automatische Kampagneneinrichtung können Sie jederzeit die von der <a href="campaigns.php"><i>Kampagne</i></a> Preissuchmaschine.de in Ihren Onlineshop weitergeleiteten Nutzer auswerten. Sie sollten über folgenden Link den durch uns generierten Warenkorbumsatz jederzeit nachvollziehen können:<br><br><a style="text-decoration:underline:color:#006" href=\''.MODULE_GUENSTIGER_CAMPAIGNS_LINK.'\'><i><b>Kampagnen-Report</b></i></a><br><br></span>');
define('MODULE_GUENSTIGER_EXPORT_LINK_SEND','<a style="text-decoration:underline" href=\'mailto:haendlerinfo@guenstiger.de?SUBJECT=Anfrage - Interesse an einer eventuellen Onlinekooperation&BODY=' . str_replace("<-SHOP->",HTTP_CATALOG_SERVER . DIR_WS_CATALOG,str_replace("<-LINK->",HTTP_CATALOG_SERVER . DIR_WS_CATALOG . MODULE_GUENSTIGER_EXPORT_LINK . MODULE_GUENSTIGER_FILE,MODULE_GUENSTIGER_EMAIL)) . '\'><br><br><i><b>zur Anfrage</b> </i></a>(sofern noch nicht erfolgt)');
ca. Zeile 94
'PAYPAL' => array('active' => false,
'title' => 'PayPal'),
'MONEYBOOKERS' => array('active' => false,
'title' => 'Moneybookers'),
'UOS_GIROPAY' => array('active' => false,
'title' => 'Giropay')
);
admin/includes/modules/export/idealo.phpTop ca. Zeile 1
<?php
/*
* export module for php version 4.x
*/
/* -----------------------------------------------------------------------------------------
XT-Commerce - community made shopping
http://www.xt-commerce.com
$Id: idealo.php 2275 2011-10-11 12:20:52Z dokuman $
Copyright (c) 2005 XT-Commerce
(c) idealo 2009, provided as is, no warranty
-----------------------------------------------------------------------------------------
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(cod.php,v 1.28 2003/02/14); www.oscommerce.com
(c) 2003 nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
(c) 2006 xt-commerce; www.xt-commerce.com
(c) 2009 idealo, provided as is, no warranty
Extended by
- Jens-Uwe Rumstich (Idealo Internet GmbH, http://www.idealo.de)
- Andreas Geisler (Idealo Internet GmbH, http://www.idealo.de)
- Christoph Zurek (Idealo Internet GmbH, http://www.idealo.de)
v1.4
export module for php version 5.x
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
include 'idealo_lib/zip.php';
// module display config
define('MODULE_IDEALO_TEXT_DESCRIPTION', 'Export - Idealo (Semikolon getrennt)');
define('MODULE_IDEALO_TEXT_TITLE', 'Idealo - CSV');
define('MODULE_IDEALO_TEXT_DESCRIPTION', 'Export - Idealo');
define('MODULE_IDEALO_TEXT_TITLE', 'Idealo - CSV (v. 1.4 / 20.09.2011, <a href="http://www.idealo.de/preisvergleich/ShopRegister.html" target="_blank">aktuelle Version</a>)');
define('MODULE_IDEALO_FILE_TITLE' , '<hr noshade>Dateiname');
define('MODULE_IDEALO_FILE_DESC' , 'Geben Sie einen Dateinamen ein, falls die Exportadatei am Server gespeichert werden soll.<br>(Verzeichnis export/)');
define('FIELDSEPARATOR', '<b>Spaltentrenner</b>');
define('FIELDSEPARATOR_HINT', 'Beispiel:<br>; (Semikolon)<br>, (Komma)<br>\t (Tab)<br>...<br>Wird das Feld leer gelassen, wird Tab als Trenner genutzt.');
define('FIELDSEPARATOR_HINT', 'Beispiel:<br>; (Semikolon)<br>, (Komma)<br>| (Pipe)<br>...');
define('QUOTING','<b>Quoting</b>');
define('QUOTING_HINT','Beispiel:<br>" (Anführungszeichen)<br>\' (Hochkomma)<br># (Raute)<br>... <br>Wird das Feld leer gelassen, wird nicht gequotet.');
define('CODEXTRAFEE', '<b>Zustellergebühr bei Nachnahme</b>');
define('CODEXTRAFEE_HINT', 'Die Gebühren die zusätzlich vom Zusteller für Nachnahme verlangt werden.<br />Beispiel: "2" wenn die Zustellergebühren 2 Euro betragen');
define('PAYPALEXTRAFEE', '<b>Zusatzgebühren bei PayPal</b>');
define('PAYPALEXTRAFEE_HINT', 'Die Gebühren die zusätzlich zu den normalen Versandkosten anfallen.');
define('PAYPALEXTRAFEE_INPUT_FIX', 'EUR fixe Gebühren (Bsp.: 5.00 oder 3 ...)');
define('PAYPALEXTRAFEE_INPUT_NOFIX', '% vom Warenwert (Bsp.:3.5 oder 1 ...)');
define('PAYPALEXTRAFEE_RADIO_SCINCLUSIVE', '<b>inkl.</b> VK');
define('PAYPALEXTRAFEE_RADIO_SCNOTINCLUSIVE', '<b>exkl.</b> VK');
define('PAYPAL_MAXPRICELIMIT', '<b>Oberste Preisgrenze für PayPal</b>');
define('PAYPAL_MAXPRICEVALUE', 'Der max. Warenwert bis zu dem das Bezahlen mit PayPal möglich ist.');
define('PAYPAL_MAXPRICEEXAMPLE', ' EUR (Beispiel: "500" oder "99.99" ...)');
define('CCEXTRAFEE', '<b>Zusatzgebühren bei Kreditkarte</b>');
define('CCEXTRAFEE_HINT', 'Die Gebühren die zusätzlich zu den normalen Versandkosten anfallen.');
define('CCEXTRAFEE_INPUT_FIX', 'EUR fixe Gebühren (Bsp.: 5.00 oder 3 ...)');
define('CCEXTRAFEE_INPUT_NOFIX', '% vom Warenwert <b>inkl.</b> VK (Bsp.:3.5 oder 1 ...)');
define('CCEXTRAFEE_RADIO_SCINCLUSIVE', '<b>inkl.</b> VK');
define('CCEXTRAFEE_RADIO_SCNOTINCLUSIVE', '<b>exkl.</b> VK');
define('CC_MAXPRICELIMIT', '<b>Oberste Preisgrenze für Kreditkarte</b>');
define('CC_MAXPRICEVALUE', 'Der max. Warenwert bis zu dem das Bezahlen mit Kreditkarte möglich ist.');
define('CC_MAXPRICEEXAMPLE', ' EUR (Beispiel: "500" oder "99.99" ...)');
define('SHIPPINGCOMMENT', '<b>Versandkommentar</b>');
define('SHIPPINGCOMMENT_HINT', 'Max. 100 Zeichen');
define('FREESHIPPINGCOMMENT', '<b>Kommentar zur Versankosten-Grenze</b>');
define('FREESHIPPINGCOMMENT_HINT', 'Wird bei allen Angeboten angezeigt, die unter der Versandkostenfreiheits-Grenze liegen.<br>Max. 100 Zeichen');
ca. Zeile 44
define('MODULE_IDEALO_CURRENCY_TITLE','Währung');
define('MODULE_IDEALO_CURRENCY_DESC','Welche Währung soll exportiert werden?');
define('EXPORT_YES','Nur Herunterladen');
define('EXPORT_NO','Am Server Speichern');
define('CURRENCY','<hr noshade><b>Währung:</b>');
define('CURRENCY_DESC','Währung in der Exportdatei');
define('CURRENCY','EUR');
define('CSV_TYPE', '<hr noshade><b>CSV-Art:</b>');
define('CSV_TEXT', 'Die CSV-Datei kann statisch erzeugt und unter einem Link abgelegt werden oder dynamisch bei jeder Anfrage aktuallisiert erzeugt werden.');
define('EXPORT','Bitte den Sicherungsprozess AUF KEINEN FALL unterbrechen. Dieser kann einige Minuten in Anspruch nehmen.');
define('EXPORT_TYPE','<hr noshade><b>Speicherart:</b>');
define('EXPORT_STATUS_TYPE','<hr noshade><b>Kundengruppe:</b>');
define('EXPORT_STATUS','Bitte wählen Sie die Kundengruppe, die Basis für den Exportierten Preis bildet. (Falls Sie keine Kundengruppenpreise haben, wählen Sie <i>Gast</i>):</b>');
define('CAMPAIGNS','<hr noshade><b>Kampagnen:</b>');
define('CAMPAIGNS_DESC','Mit Kampagne zur Nachverfolgung verbinden.');
define('DATE_FORMAT_EXPORT', '%d.%m.%Y'); // this is used for strftime()
define('DISPLAY_PRICE_WITH_TAX','true');
define('COMMENTLENGTH', 100);
define('DYNAMIC_TYPE', '<hr noshade><b>Livedatei:</b>');
define('DYNAMIC', 'Waehlen Sie bitte aus, wie die Datei erzeugt werden soll');
define('DYNAMIC_YES', 'Datei beim Update live erzeugen');
define('DYNAMIC_NO', 'Datei per Hand erzeugen');
define('LINK_TO_DYNAMIC_MODULE', ' Link zum dyn. Modul');
define('PATH', '/export/idealo/idealo_dynamic.php'); // subpath to the livemodule
define('MODULE_NOT_FOUND', '<hr noshade><b>Modul "idealo_dynamic.php" nicht vorhanden!</b>');
define('COSTUMER_STATUS', '1'); // consumer stat 1 = Gast.
define('PACK_TEXT', '<hr noshade><b>Datei komprimieren?</b>');
// header
define('ARTICLE_ID','artikelId');
define('BRAND','hersteller');
define('PRODUCT_NAME','bezeichnung');
define('CATEGORIE','kategorie');
define('DESCRIPTION_SHORT','beschreibung_kurz');
define('DESCRIPTION_SHORT_LONG','beschreibung_lang');
define('IMAGE','bild');
define('DEEPLINK','deeplink');
define('PRICE','preis');
define('EAN','ean');
define('DELIVERY','lieferzeit');
// check if separator is already in db
$separator_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_SEPARATOR' LIMIT 1");
$separator_db = xtc_db_fetch_array($separator_query); // false if 'MODULE_IDEALO_SEPARATOR' doesn't exist
// check if a quoting character is already in db
$quoting_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_QUOTING' LIMIT 1");
$quoting_db = xtc_db_fetch_array($quoting_query); // false if 'MODULE_IDEALO_QUOTING doesn't exist
// check if a quoting character is already in db
$language_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_LANGUAGE' LIMIT 1");
$language_db = xtc_db_fetch_array($language_query); // false if 'MODULE_IDEALO_LANGUAGE doesn't exist
// check if codextrafee is already in db
$codextrafee_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CODEXTRAFEE' LIMIT 1");
$codextrafee_db = xtc_db_fetch_array($codextrafee_input_query); // false if 'MODULE_IDEALO_CODEXTRAFEE' doesn't exist
// check if paypalextrafee_fix is already in db
$paypalextrafee_input_fix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_FIX' LIMIT 1");
$paypalextrafee_input_fix_db = xtc_db_fetch_array($paypalextrafee_input_fix_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_FIX' doesn't exist
// check if paypalextrafee_nofix is already in db
$paypalextrafee_input_nofix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX' LIMIT 1");
$paypalextrafee_input_nofix_db = xtc_db_fetch_array($paypalextrafee_input_nofix_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX' doesn't exist
// check if paypalextrafee_nofix_scinclusive is already in db
$paypalextrafee_input_nofix_scinclusive_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE' LIMIT 1");
$paypalextrafee_input_nofix_scinclusive_db = xtc_db_fetch_array($paypalextrafee_input_nofix_scinclusive_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE' doesn't exist
// check if paypalmaxpricelimit is already in db
$paypalmaxpricelimit_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALMAXPRICELIMIT' LIMIT 1");
$paypalmaxpricelimit_db = xtc_db_fetch_array($paypalmaxpricelimit_query); // false if 'MODULE_IDEALO_PAYPALMAXPRICELIMIT' doesn't exist
// check if ccextrafee_fix is already in db
$ccextrafee_input_fix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_FIX' LIMIT 1");
$ccextrafee_input_fix_db = xtc_db_fetch_array($ccextrafee_input_fix_query); // false if 'MODULE_IDEALO_CCEXTRAFEE_FIX' doesn't exist
// check if ccextrafee_nofix is already in db
$ccextrafee_input_nofix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_NOFIX' LIMIT 1");
$ccextrafee_input_nofix_db = xtc_db_fetch_array($ccextrafee_input_nofix_query); // false if 'MODULE_IDEALO_CCEXTRAFEE_NOFIX' doesn't exist
// check if ccextrafee_nofix_scinclusive is already in db
$ccextrafee_input_nofix_scinclusive_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_NOFIX_SCINCLUSIVE' LIMIT 1");
$ccextrafee_input_nofix_scinclusive_db = xtc_db_fetch_array($ccextrafee_input_nofix_scinclusive_query); // false if 'MODULE_IDEALO_CCEXTRAFEE_NOFIX_SCINCLUSIVE' doesn't exist
// check if ccmaxpricelimit is already in db
$ccmaxpricelimit_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCMAXPRICELIMIT' LIMIT 1");
$ccmaxpricelimit_db = xtc_db_fetch_array($ccmaxpricelimit_query); // false if 'MODULE_IDEALO_CCMAXPRICELIMIT' doesn't exist
// check if shippinglimit_input is already in db
$shipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_SHIPPINGCOMMENT' LIMIT 1");
$shipping_comment_db = xtc_db_fetch_array($shipping_input_query); // false if 'MODULE_IDEALO_SHIPPINGCOMMENT' doesn't exist
// check admin file config
// check if freeshippinglimit_input is already in db
$freeshipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_FREESHIPPINGCOMMENT' LIMIT 1");
$freeshipping_comment_db = xtc_db_fetch_array($freeshipping_input_query); // false if 'MODULE_IDEALO_FREESHIPPINGCOMMENT' doesn't exist
// check if livedata module is already in db
$h_string = 'select configuration_value from `'. TABLE_CONFIGURATION . '` where `configuration_key` = \'MODULE_IDEALO_LIVEDATA_MODULE\' LIMIT 1';
$livedata_query = xtc_db_query($h_string);
$livedata_db = xtc_db_fetch_array($livedata_query);
// check if livedata setting is already in db
$h_string = 'select configuration_value from `'. TABLE_CONFIGURATION . '` where `configuration_key` = \'MODULE_IDEALO_LIVEDATA_SETTING\' LIMIT 1';
$livedata_setting_query = xtc_db_query($h_string);
$livedata_setting_db = xtc_db_fetch_array($livedata_setting_query);
// check if zip setting is already in db
$h_string = 'select `configuration_value` from `'. TABLE_CONFIGURATION . '` where `configuration_key` = \'IDEALO_ZIP_SETTING\' LIMIT 1';
$zip_setting_query = xtc_db_query($h_string);
$zip_setting_db = xtc_db_fetch_array($zip_setting_query );
/*
* SEPARATOR
*/
// is a specific separator set?
if( isset($_POST['separator_input']) && $_POST['separator_input'] != '' ) {
if( isset($_POST['separator_input'])) {
// db does not care for extra slashes
$dbValue = $_POST['separator_input'];
// check if slashes need to be stripped
if( $_POST['separator_input'] != stripslashes($_POST['separator_input']) ) {
$_POST['separator_input'] = stripslashes($_POST['separator_input']);
}
// hack
if( $_POST['separator_input'] == '\t' ) {
$_POST['separator_input'] = "\t";
}
// does a dataset exist?
if( $separator_db !== false ) {
// update value if $_POST['separator_input'] != $separator_db
if( $_POST['separator_input'] != $separator_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $dbValue . "'
where configuration_key = 'MODULE_IDEALO_SEPARATOR'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_SEPARATOR', '" . $dbValue . "', 6, 1, '', now()) ");
}
$separator = $_POST['separator_input'];
} else {
// if nothing is entered by the admin: $separator gets \t as default
$separator = "\t";
// if nothing is entered by the admin: $separator gets | as default
$separator = "|";
}
/*
* QUOTING
*/
// is a specific quoting character set?
if( isset($_POST['quoting_input']) && $_POST['quoting_input'] != '' ) {
if( isset($_POST['quoting_input'])) {
// does a dataset exist?
if( $quoting_db !== false ) {
// update value if $_POST['quoting_input'] != $quoting_db
if( $_POST['quoting_input'] != $quoting_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['quoting_input'] . "'
where configuration_key = 'MODULE_IDEALO_QUOTING'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_QUOTING', '" . $_POST['quoting_input'] . "', 6, 1, '', now()) ");
}
$quoting = stripcslashes($_POST['quoting_input']);
} else {
// if nothing is entered by the admin: $quoting is disabled
$quoting = "";
}
/*
* CODEXTRAFEE
*/
// is an extra fee for "cash on delivery" set?
if( isset($_POST['codextrafee_input'])) {
// does a dataset exist?
if( $codextrafee_db !== false ) {
// update value if $_POST['codextrafee_input'] != $quoting_db
if( $_POST['codextrafee_input'] != $codextrafee_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['codextrafee_input'] . "'
where configuration_key = 'MODULE_IDEALO_CODEXTRAFEE'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_CODEXTRAFEE', '" . $_POST['codextrafee_input'] . "', 6, 1, '', now()) ");
}
$codextrafee = stripcslashes($_POST['codextrafee_input']);
} else {
// if nothing is entered by the admin: $quoting is disabled
$codextrafee = "";
}
/*
* PAYPALEXTRAFEE_FIX
*/
// is a fix fee for paypal set?
if( isset($_POST['paypal_extrafee_fix'])) {
// does a dataset exist?
if( $paypalextrafee_input_fix_db !== false ) {
// update value if $_POST['paypal_extrafee_fix'] != $quoting_db
if( $_POST['paypal_extrafee_fix'] != $paypalextrafee_input_fix_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['paypal_extrafee_fix'] . "'
where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_FIX'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_PAYPALEXTRAFEE_FIX', '" . $_POST['paypal_extrafee_fix'] . "', 6, 1, '', now()) ");
}
$paypal_extrafee_fix = stripcslashes($_POST['paypal_extrafee_fix']);
} else {
$paypal_extrafee_fix = "";
}
/*
* PAYPALEXTRAFEE_NOFIX
*/
// is a fee for paypal set that depends on then price+shipping cost?
if( isset($_POST['paypal_extrafee_nofix'])) {
// does a dataset exist?
if( $paypalextrafee_input_nofix_db !== false ) {
// update value if $_POST['paypal_extrafee_nofix'] != $quoting_db
if( $_POST['paypal_extrafee_nofix'] != $paypalextrafee_input_nofix_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['paypal_extrafee_nofix'] . "'
where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX', '" . $_POST['paypal_extrafee_nofix'] . "', 6, 1, '', now()) ");
}
$paypal_extrafee_nofix = stripcslashes($_POST['paypal_extrafee_nofix']);
} else {
$paypal_extrafee_nofix = "";
}
/*
* PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE
*/
// include or exclude shipping cost for variable extra fee
if( isset($_POST['paypal_extrafee_nofix_inkl_sc'])) {
// does a dataset exist?
if( $paypalextrafee_input_nofix_scinclusive_db !== false ) {
// update value if $_POST['paypal_extrafee_nofix'] != $quoting_db
if( $_POST['paypal_extrafee_nofix_inkl_sc'] != $paypalextrafee_input_nofix_scinclusive_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['paypal_extrafee_nofix_inkl_sc'] . "'
where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE', '" . $_POST['paypal_extrafee_nofix_inkl_sc'] . "', 6, 1, '', now()) ");
}
$paypal_extrafee_nofix_scinclusive = stripcslashes($_POST['paypal_extrafee_nofix_inkl_sc']);
} else {
$paypal_extrafee_nofix_scinclusive = "";
}
/*
* PAYPAL_MAXPRICELIMIT
*/
// maximum price at which payment with paypal is possible
if( isset($_POST['paypal_maxpricelimit'])) {
// does a dataset exist?
if( $paypalmaxpricelimit_db !== false ) {
// update value if $_POST['paypal_maxpricelimit'] != $quoting_db
if( $_POST['paypal_maxpricelimit'] != $paypalmaxpricelimit_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['paypal_maxpricelimit'] . "'
where configuration_key = 'MODULE_IDEALO_PAYPALMAXPRICELIMIT'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_PAYPALMAXPRICELIMIT', '" . $_POST['paypal_maxpricelimit'] . "', 6, 1, '', now()) ");
}
$paypal_maxpricelimit = stripcslashes($_POST['paypal_maxpricelimit']);
} else {
$paypal_maxpricelimit = "";
}
/*
* CCEXTRAFEE_FIX
*/
// is a fix fee for cc set?
if( isset($_POST['cc_extrafee_fix'])) {
// does a dataset exist?
if( $ccextrafee_input_fix_db !== false ) {
// update value if $_POST['cc_extrafee_fix'] != $quoting_db
if( $_POST['cc_extrafee_fix'] != $ccextrafee_input_fix_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['cc_extrafee_fix'] . "'
where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_FIX'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_CCEXTRAFEE_FIX', '" . $_POST['cc_extrafee_fix'] . "', 6, 1, '', now()) ");
}
$cc_extrafee_fix = stripcslashes($_POST['cc_extrafee_fix']);
} else {
$cc_extrafee_fix = "";
}
/*
* CCEXTRAFEE_NOFIX
*/
// is a fee for cc set that depends on the price+shipping cost?
if( isset($_POST['cc_extrafee_nofix'])) {
// does a dataset exist?
if( $ccextrafee_input_nofix_db !== false ) {
// update value if $_POST['cc_extrafee_nofix'] != $quoting_db
if( $_POST['cc_extrafee_nofix'] != $ccextrafee_input_nofix_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['cc_extrafee_nofix'] . "'
where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_NOFIX'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_CCEXTRAFEE_NOFIX', '" . $_POST['cc_extrafee_nofix'] . "', 6, 1, '', now()) ");
}
$cc_extrafee_nofix = stripcslashes($_POST['cc_extrafee_nofix']);
} else {
$cc_extrafee_nofix = "";
}
/*
* CCEXTRAFEE_NOFIX_SCINCLUSIVE
*/
// include or exclude shipping cost for variable extra fee
if( isset($_POST['cc_extrafee_nofix_inkl_sc'])) {
// does a dataset exist?
if( $ccextrafee_input_nofix_scinclusive_db !== false ) {
// update value if $_POST['cc_extrafee_nofix'] != $quoting_db
if( $_POST['cc_extrafee_nofix_inkl_sc'] != $ccextrafee_input_nofix_scinclusive_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['cc_extrafee_nofix_inkl_sc'] . "'
where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_NOFIX_SCINCLUSIVE'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_CCEXTRAFEE_NOFIX_SCINCLUSIVE', '" . $_POST['cc_extrafee_nofix_inkl_sc'] . "', 6, 1, '', now()) ");
}
$cc_extrafee_nofix_scinclusive = stripcslashes($_POST['cc_extrafee_nofix_inkl_sc']);
} else {
$cc_extrafee_nofix_scinclusive = "";
}
/*
* CCEXTRAFEE_MAXPRICELIMIT
*/
// maximum price at which payment with cc is possible
if( isset($_POST['cc_maxpricelimit'])) {
// does a dataset exist?
if( $ccmaxpricelimit_db !== false ) {
// update value if $_POST['cc_maxpricelimit'] != $quoting_db
if( $_POST['cc_maxpricelimit'] != $ccmaxpricelimit_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['cc_maxpricelimit'] . "'
where configuration_key = 'MODULE_IDEALO_CCMAXPRICELIMIT'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_CCMAXPRICELIMIT', '" . $_POST['cc_maxpricelimit'] . "', 6, 1, '', now()) ");
}
$cc_maxpricelimit = stripcslashes($_POST['cc_maxpricelimit']);
} else {
$cc_maxpricelimit = "";
}
/*
* $country
*/
// is a specific language set?
if( isset($_POST['language_input']) && $_POST['language_input'] != '' ) {
if( isset($_POST['language_input'])) {
// does a dataset exist?
if( $language_db !== false ) {
// update value if $_POST['language_input'] != $quoting_db
if( $_POST['language_input'] != $language_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['language_input'] . "'
where configuration_key = 'MODULE_IDEALO_LANGUAGE'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_LANGUAGE', '" . $_POST['language_input'] . "', 6, 1, '', now()) ");
}
$country_sc = stripslashes($_POST['language_input']);
} else {
// if nothing is entered by the admin: $quoting is disabled
$country_sc = "DE";
if(empty($language_db['configuration_value'])){
$country_sc = 'DE';
}else{
$country_sc = $language_db['configuration_value'];
}
}
// check if freeshippinglimit_input is already in db
$shipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_SHIPPINGCOMMENT' LIMIT 1");
$shipping_comment_db = xtc_db_fetch_array($shipping_input_query); // false if 'MODULE_IDEALO_SHIPPINGCOMMENT' doesn't exist
/*
* SHIPPINGLIMIT COMMENT
*/
// is shipping comment set?
// do not exceed COMMENTLENGTH
if( isset( $_POST['shippingcomment_input']) && ( strlen($_POST['shippingcomment_input']) <= COMMENTLENGTH ) ) {
ca. Zeile 111
} else {
$shipping_comment_input = "";
}
// check if freeshippinglimit_input is already in db
$freeshipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_FREESHIPPINGCOMMENT' LIMIT 1");
$freeshipping_comment_db = xtc_db_fetch_array($freeshipping_input_query); // false if 'MODULE_IDEALO_FREESHIPPINGCOMMENT' doesn't exist
/*
* FREESHIPPINGLIMIT COMMENT
*/
// is free shipping comment set?
// do not exceed COMMENTLENGTH
if( isset( $_POST['freeshippingcomment_input']) && ( strlen($_POST['freeshippingcomment_input']) <= COMMENTLENGTH ) ) {
ca. Zeile 140
} else {
$freeshipping_comment_input = "";
}
/*
* LIVEDATA MODULE and LIVEDATA SETTING
*/
// is livedata module set?
$path = __FILE__; // path of this class
$path = substr($path, 0, -41); //cut
if(file_exists($path.PATH)) {
// does a dataset exist?
if( $livedata_db !== false ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = 'yes'
where configuration_key = 'MODULE_IDEALO_LIVEDATA_MODULE'");
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_LIVEDATA_MODULE', 'yes', 6, 1, '', now()) ");
}
// check and update the livedata setting
if( isset($_POST['export'])) {
$livedata = '';
if ($_POST['export'] == 'live'){
$livedata = 'yes';
}else{
$livedata = 'no';
}
// does a dataset exist?
if( $livedata_setting_db !== false ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '{$livedata}'
where configuration_key = 'MODULE_IDEALO_LIVEDATA_SETTING'");
} else {
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_LIVEDATA_SETTING', '{$livedata}', 6, 1, '', now()) ");
}
}
$livedata_module = 'yes';
} else {
// does a dataset exist?
if( $livedata_db !== false ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = 'no'
where configuration_key = 'MODULE_IDEALO_LIVEDATA_MODULE'");
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('MODULE_IDEALO_LIVEDATA_MODULE', 'no', 6, 1, '', now()) ");
}
$livedata_module = 'no';
}
/*
* zipfile setting
*/
// is zipfile settingset?
// do not exceed IDEALO_ZIP_SETTING
if( isset( $_POST['pack']) ) {
// does a dataset exist?
if( $zip_setting_db !== false ) {
// update value if $_POST['pack'] != $zip_setting_db
if( $_POST['pack'] != $zip_setting_db['configuration_value'] ) {
xtc_db_query("update " . TABLE_CONFIGURATION . "
set configuration_value = '" . $_POST['pack'] . "'
where configuration_key = 'IDEALO_ZIP_SETTING'");
}
} else {
// insert data
xtc_db_query("insert into " . TABLE_CONFIGURATION . "
(configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added)
values ('IDEALO_ZIP_SETTING', '" . $_POST['pack'] . "', 6, 1, '', now()) ");
}
$zip_setting_input = stripslashes($_POST['pack']);
}else {
$zip_setting_input = "";
}
// check is filename already in db
$h_string = 'select `configuration_value` from `'. TABLE_CONFIGURATION . '` where `configuration_key` = \'IDEALO_FILENAME\' LIMIT 1';
$file_name_query = xtc_db_query($h_string);
$file_name_db = xtc_db_fetch_array($file_name_query );
// file config
define('SEPARATOR', $separator); // character that separates the data
define('QUOTECHAR', $quoting); // character to quote the data
define('CODEXTRAFEE_VALUE', $codextrafee); // extra fee for "cash on delivery"
define('COUNTRY_SC', $country_sc); // country the shipping costs are for
define('PAYPALEXTRAFEE_FIX', $paypal_extrafee_fix); // value of fix fee
define('PAYPALEXTRAFEE_NOFIX', $paypal_extrafee_nofix); // value of fee that is not fix but dependent on price+shipping cost
define('PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE', $paypal_extrafee_nofix_scinclusive); // include or exclude sc in PAYPALEXTRAFEE_NOFIX?
define('PAYPALEXTRAFEE_MAXPRICELIMIT', $paypal_maxpricelimit); // value of fee that is not fix but dependent on price+shipping cost
define('CCEXTRAFEE_FIX', $cc_extrafee_fix); // value of fix fee
define('CCEXTRAFEE_NOFIX', $cc_extrafee_nofix); // value of fee that is not fix but dependent on price+shipping cost
define('CCEXTRAFEE_NOFIX_SCINCLUSIVE', $cc_extrafee_nofix_scinclusive); // include or exclude sc in CCEXTRAFEE_NOFIX?
define('CCEXTRAFEE_MAXPRICELIMIT', $cc_maxpricelimit); // value of fee that is not fix but dependent on price+shipping cost
define('DISPLAYINACTIVEMODULES', true); // display modules that are not active but in the payment array
// advantage: structure of the file hardly changes
define('SHIPPINGCOMMENT_INPUT', $shipping_comment_input);
define('FREESHIPPINGCOMMENT_INPUT', $freeshipping_comment_input);
define('SHOWFREESHIPPINGLIMITCOMMENT', true); // set 'true' to show comment for free shipping limit
define('SPLITCHAR', ','); // character to split an array
define('LIVEDATA_MODULE',$livedata_module );
define('ZIP_SETTING', $zip_setting_input);
require_once(DIR_FS_CATALOG.DIR_WS_CLASSES . 'xtcPrice.php');
class idealo {
var $code , $title, $description, $enabled;
// these attributes have to be public, as module_export.php uses them directly ...
public $code;
public $title;
public $description;
public $enabled;
// all payment (and its status) that should be displayed in the csv
// if a payment is 'false', the column in the csv stays empty
// the key needs to be the same as it is used in the db for the entry in `configuration_key` in the table `configuration`
var $payment = array('MONEYORDER' => array('active' => false,
private $payment = array('MONEYORDER' => array('active' => false,
'title' => 'Vorkasse'),
'COD' => array('active' => false,
'title' => 'Nachnahme'),
'INVOICE' => array('active' => false,
ca. Zeile 174
'PAYPAL' => array('active' => false,
'title' => 'PayPal'),
'MONEYBOOKERS' => array('active' => false,
'title' => 'Moneybookers'),
'UOS_GIROPAY' => array('active' => false,
'title' => 'Giropay')
'DP' => array('active' => false,
'title' => 'Deutsche Post'),
'UPS' => array('active' => false,
'title' => 'UPS'),
'UPSE' => array('active' => false,
'title' => 'UPSE'),
);
// types of shipping cost and 2-3 properties
// this is neccessary to get the correct values for "cash on delivery"
var $paymentTable = false; // table sc
var $paymentTableMode = 'weight'; // default mode for table sc
private $paymentTable = false; // table sc
private $paymentTableMode = 'weight'; // default mode for table sc
private $paymentItem = false; // sc per item
private $paymentFlat = false; // flat rate sc
private $paymentDP = false; // dp sc (deutsche post)
private $paymentUPS = false; // sc for UPS
private $paymentUPSE = false; // sc for UPSE
var $paymentItem = false; // sc per item
var $paymentFlat = false; // flat rate sc
private $paymentTaxModulClass; // e.g. MODULE_SHIPPING_FLAT_TAX_CLASS, MODULE_SHIPPING_TABLE_TAX_CLASS ...
private $paymentTaxModulZone; // e.g. MODULE_SHIPPING_FLAT_TAX_ZONE, MODULE_SHIPPING_TABLE_TAX_ZONE ...
var $freeShipping = false; // no sc
var $freeShippingValue; // calculates when shipping is free
private $freeShipping = false; // no sc
private $freeShippingValue; // calculates when shipping is free
private $loworderfee = false; // no surcharge (loworderfee ...)
private $loworderOption = array(); // contains max price ('orderfeeUnder') the surcharged is charged and surcharge ('loworderfee')
// table shipping
var $paymentTableValues = array();
private $paymentTableValues = array();
// table dp
private $paymentDpValues = array();
// default shipping cost (does NOT count when modul "table shipping cost" is active)
var $standardShippingCost = 0.00;
private $standardShippingCost = 0.00;
// tax rate
private $tax = 0;
// save the dispach
private $shippingDispatch = array();
//link to dynamic csv
private $link= ' ';
public function __construct() {
function idealo() {
$this->code = 'idealo';
$this->title = MODULE_IDEALO_TEXT_TITLE;
$this->description = MODULE_IDEALO_TEXT_DESCRIPTION;
$this->sort_order = MODULE_IDEALO_SORT_ORDER;
$this->enabled = ((MODULE_IDEALO_STATUS == 'True') ? true : false);
$this->CAT=array();
$this->PARENT=array();
$this->productsPrice = 0;
$this->country_array = array();
// check which payment method (cod, cash etc. ...) is active
$this->checkActivePayment();
// check for which countries the shiping costs are set
$this->checkCountriesAndModules();
// check which payment option (default, per item, table) is active
$this->checkStandardShippingCostsOption();
// check if surcharge is active
$this->checkLoworderfee();
}
/**
* Methode check which shipping set for which countries and sort (DE,AT,FR,EN,IT)
* Check which shippingtype is selected
*/
private function checkCountriesAndModules(){
$chekedCountries = array();
$shippingDispatch = array();
if ($this->paymentItem === true){
$this->country_array = 'DE:ITEM';
}elseif($this->paymentFlat === true){
$this->country_array= 'DE:FLAT';
}else
{
// default order of countries for the columns in csv
$countries = array( 'DE', 'AT', 'FR', 'IT', 'EN' );
$shippingtype = array('DP','UPS','UPSE');
// search for set shippingmudle
foreach($shippingtype as $shipping){
$checkPayment = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_{$shipping}_STATUS'
AND `configuration_value` LIKE 'True';");
$result = xtc_db_fetch_array($checkPayment);
// if the result is > 0, the pm is active
if($result['found'] > 0) {
$shippingDispatch[] = $shipping;
}
}
$this->country_array = explode(',', COUNTRY_SC);
$this->shippingDispatch=$shippingDispatch;
// search for selectet countries and set shippingmodules
foreach($this->country_array as $country){
foreach($this->shippingDispatch as $shipping){
$countryExist = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE (`configuration_value` LIKE '$country'
AND `configuration_key` LIKE 'MODULE_SHIPPING_{$shipping}_COUNTRIES_%')");
$result = xtc_db_fetch_array($countryExist);
if ($result['found'] > 0){
$chekedCountries[] = $country.':'.$shipping;
}
}
}
$this->country_array = $this->sortCountryArray($chekedCountries,$chekedCountries,$shippingtype);
}
}
/**
* Metode sort the array to have ever the same order of selected countries and modules
*
* @param array $countryArray
* @param array $chekedCountries
* @param array $shippingtype
* @param array $countries
*
* @return array $countryArray
*/
private function sortCountryArray( $countryArray = array(), $chekedCountries = array (), $shippingtype = array (), $countries = array() ){
// all de shippindtypes
$de = array();
// all at shippindtypes
$at = array ();
// all fr shippindtypes
$fr = array ();
// all it shippindtypes
$it = array ();
// all en shippindtypes
$en = array ();
// fill the countrarrays
foreach ( $countryArray as $country ){
$tmp = explode(':',$country);
if ($tmp[0] === 'DE'){
$de[] = $country;
}
if ($tmp[0] === 'AT'){
$at[] = $country;
}
if ($tmp[0] === 'FR'){
$fr[] = $country;
}
if ($tmp[0] === 'IT'){
$it[] = $country;
}
if ($tmp[0] === 'EN'){
$en[] = $country;
}
}
$countryArray = array_merge($de,$at,$fr,$it,$en);
return $countryArray;
}
/**
* Set options for surcharge (if lowerorderfee is active)
*/
private function checkLoworderfee() {
$checkLOF = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE'
AND `configuration_value` LIKE 'True';");
$result = xtc_db_fetch_array($checkLOF);
// if the result is > 0, the loworderfee is active
if($result['found'] > 0) {
$this->loworderfee = true;
// get the rest of loworderfee
$getLOForderUnder = xtc_db_query("SELECT `configuration_value` AS `value`
FROM `configuration`
WHERE `configuration_key` = 'MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER';");
$result = xtc_db_fetch_array($getLOForderUnder);
// the "order fee under" value should have a value
if( $result['value'] !== null ) {
$this->loworderOption['orderfeeUnder'] = $result['value'];
}
$getLOF = xtc_db_query("SELECT `configuration_value` AS `value`
FROM `configuration`
WHERE `configuration_key` = 'MODULE_ORDER_TOTAL_LOWORDERFEE_FEE';");
$result = xtc_db_fetch_array($getLOF);
// the "loworder fee" value should have a value
if( $result['value'] !== null ) {
$this->loworderOption['loworderfee'] = $result['value'];
}
}
}
/**
* Checks which payment method (pm) is active
* If a pm is not active, it wont appear in the csv
* If a pm is not active, it wont appear in the csv file
*
* A pm is only active when the entry 'MODULE_PAYMENT_{paymentmethod}_STATUS' in the table `configuration` exists
* and the `configuration_value` is 'true'
*/
function checkActivePayment() {
private function checkActivePayment() {
// run through every payment method
foreach($this->payment as $singlePayment => $status) {
// is the pm active?
if( $singlePayment == 'COD' ) {
$checkPayment = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_ORDER_TOTAL_COD_FEE_STATUS'
AND `configuration_value` LIKE 'true';");
} elseif( $singlePayment == 'DP'){
$checkPayment = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_DP_STATUS'
AND `configuration_value` LIKE 'True';");
} elseif( $singlePayment == 'UPS'){
$checkPayment = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_UPS_STATUS'
AND `configuration_value` LIKE 'True';");
} elseif( $singlePayment == 'UPSE'){
$checkPayment = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_UPSE_STATUS'
AND `configuration_value` LIKE 'True';");
}
else {
$checkPayment = xtc_db_query("SELECT COUNT(*) AS `found`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_PAYMENT_{$singlePayment}_STATUS'
AND `configuration_value` LIKE 'True';");
}
$result = xtc_db_fetch_array($checkPayment);
// if the result is > 0, the pm is active
if($result['found'] > 0) {
$this->payment[$singlePayment]['active'] = true;
$this->shippingDispatch = $singlePayment;
}
}
}
ca. Zeile 243
* @param string $payment
* @param double|null $price
* @param double|null $offerWeight
*
* @return double|'' shipping costs else an empty string
* @return double|string shipping costs else an empty string
*/
function getShippingCosts($payment, $price = null, $offerWeight = null) {
private function getShippingCosts($payment, $price = null, $offerWeight = null, $country = array()) {
$shippingCost = '';
$country_module = explode (':',$country);
// is the is payment active?
if( $this->payment[$payment]['active'] === true ) {
// is free delivery active and price equal or higher than the limit?
if(($this->freeShipping) === true && ($price >= $this->freeShippingValue)) {
if(($this->countryfreeShipping) === true && ($price >= $this->freeShippingValue)) {
$shippingCost = 0.00;
}
// is at least one shipping option active?
elseif(($this->paymentTable === true) || ($this->paymentItem === true) || ($this->paymentFlat === true) ) {
elseif( ($this->paymentTable === true) || ($this->paymentItem === true) || ($this->paymentFlat === true) || ($this->paymentUPS === true) || ($this->paymentDP === true) || ($this->paymentUPSE === true)) {
// first of all we get the standard shipping costs (default sc, per item or table)
// are the table shipping costs active? Check which table payment option is active
if($this->paymentTable === true) {
// $type defines the modul for the tax class
// run through the table values and check which weight / price matches the offer
switch($this->paymentTableMode) {
case 'weight':
ca. Zeile 285
}
// If no weight / price was matched accordingly, the last entry in the array is taken
if($shippingCost == '') {
end($this->paymentTableValues); // Zeiger an letzte Stelle bewegen
$shippingCost = current($this->paymentTableValues); // Wert ausgeben auf den der Zeiger aktuell zeigt
reset($this->paymentTableValues); // Setze Zeiger wieder in Ausgangsposition
end($this->paymentTableValues); // move pointer to last position
$shippingCost = current($this->paymentTableValues); // get current value
reset($this->paymentTableValues); // reset pointer
}
} else {
// if the table sc values are not correct or the weight / price is null => nothing shall appear in the csv
$shippingCost = '';
}
} else {
} elseif( $this->paymentFlat === true ) {
$shippingCost = $this->standardShippingCost;
} elseif( $this->paymentItem === true ) {
$shippingCost = $this->standardShippingCost;
} elseif( ($this->paymentDP === true) || ($this->paymentUPS === true)|| ($this->paymentUPSE === true)) {
if ($country_module[1]=='DP'){
if( !empty($offerWeight) ) {
// run through the table values and check which weight matches the offer
foreach($this->paymentDpValues[$country_module[0]] as $tableWeight => $tablePrice) {
// stop the loop if sth. matched
if($offerWeight <= $tableWeight) {
$shippingCost = $tablePrice;
break;
}
}
}
// If no weight was matched accordingly, the last entry in the array is taken
if($shippingCost == '') {
end($this->paymentDpValues[$country_module[0]]); // move pointer to last position
$shippingCost = current($this->paymentDpValues[$country_module[0]]); // get current value
reset($this->paymentDpValues[$country_module[0]]); // reset pointer
}
}
if ($country_module[1]=='UPS'){
if( !empty($offerWeight) ) {
// run through the table values and check which weight matches the offer
foreach($this->paymentUpsValues[$country_module[0]] as $tableWeight => $tablePrice) {
// stop the loop if sth. matched
if($offerWeight <= $tableWeight) {
$shippingCost = $tablePrice;
break;
}
}
}
// If no weight was matched accordingly, the last entry in the array is taken
if($shippingCost == '') {
end($this->paymentUpsValues[$country_module[0]]); // move pointer to last position
$shippingCost = current($this->paymentUpsValues[$country_module[0]]); // get current value
reset($this->paymentUpsValues[$country_module[0]]); // reset pointer
}
}
if ($country_module[1]==='UPSE'){
if( !empty($offerWeight) ) {
// run through the table values and check which weight matches the offer
foreach($this->paymentUpseValues[$country_module[0]] as $tableWeight => $tablePrice) {
// stop the loop if sth. matched
if($offerWeight <= $tableWeight) {
$shippingCost = $tablePrice;
break;
}
}
}
// If no weight was matched accordingly, the last entry in the array is taken
if($shippingCost == '') {
end($this->paymentUpseValues[$country_module[0]]); // move pointer to last position
$shippingCost = current($this->paymentUpseValues[$country_module[0]]); // get current value
reset($this->paymentUpseValues[$country_module[0]]); // reset pointer
}
}
}
}
// define type for taxclass
// check again what payment is active (double but neccessary)
if($this->paymentTable === true) {
$type = 'TABLE';
} elseif( $this->paymentFlat === true ) {
$type = 'FLAT';
} elseif( $this->paymentItem === true ) {
$type = 'ITEM';
} elseif( $this->paymentDP === true ) {
$type = 'DP';
} elseif( $this->paymentUPS === true ) {
$type = 'UPS';
}elseif( $this->paymentUPSE === true ) {
$type = 'UPSE';
}
// cod needs additional calculation
// the additional cod_fee (if active) depends on the shipping option that is active as the fee can differ
if($payment == 'COD') {
// check if extra fee for Cash on Delivery is active
// check if extra fee for "Cash on Delivery" is active
// 1. get the db data
$getCodExtraFeeStatus = xtc_db_query("SELECT `configuration_value` AS `cod_fee_status`
FROM `configuration`
ca. Zeile 314
$result = xtc_db_fetch_array($getCodExtraFeeStatus);
// 2. is the fee status active?
if(isset($result['cod_fee_status']) && $result['cod_fee_status'] == 'true') {
$modul = '';
// which shipping option is active?
if(($this->freeShipping) === true && ($price >= $this->freeShippingValue)) {
if(($this->countryfreeShipping) === true && ($price >= $this->freeShippingValue)) {
$modul = 'MODULE_ORDER_TOTAL_FREEAMOUNT_FREE';
} elseif($this->paymentTable === true) {
$modul = 'MODULE_ORDER_TOTAL_COD_FEE_TABLE';
} elseif($this->paymentItem === true) {
$modul = 'MODULE_ORDER_TOTAL_COD_FEE_ITEM';
} elseif($this->paymentFlat === true) {
$modul = 'MODULE_ORDER_TOTAL_COD_FEE_FLAT';
} elseif($this->paymentDP === true) {
$modul = 'MODULE_ORDER_TOTAL_COD_FEE_DP';
} elseif($this->paymentUPS === true) {
$modul = 'MODULE_ORDER_TOTAL_COD_FEE_UPS';
}elseif( $this->paymentUPSE === true ) {
$modul = 'MODULE_ORDER_TOTAL_COD_FEE_UPSE';
}
$getCodCost = xtc_db_query("SELECT `configuration_value` AS `cod_cost`
FROM `configuration`
ca. Zeile 337
// Are there any costs?
if(isset($result['cod_cost']) && $result['cod_cost'] != '') {
// get the value for the country
preg_match_all('/' . COUNTRY_SC . ':([^,]+)?/', $result['cod_cost'], $match);
preg_match_all('/' . $country_module[0] . ':([^,]+)?/', $result['cod_cost'], $match);
// $match[1][0] contains the result in the form of (e.g.) 7.00 or 7
// to make sure that mistakes like 7.00:9.99 (correct would be 7,00:9.99) are also handled, we check for the colon
if(preg_match('/:/', $match[1][0])) {
ca. Zeile 354
$shippingCost += $codCost;
}
}
}
}
// tax class
$getTaxModulClass = xtc_db_query("SELECT `configuration_value` as `class`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_{$type}_TAX_CLASS';");
$result = xtc_db_fetch_array($getTaxModulClass);
$this->paymentTaxModulClass = $result['class'];
// tax zone
$getTaxModulZone = xtc_db_query("SELECT `configuration_value` as `zone`
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_{$type}_TAX_ZONE';");
$result = xtc_db_fetch_array($getTaxModulZone);
$this->paymentTaxModulZone = $result['zone'];
// calculate taxes
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$tax = xtc_get_tax_rate_export(MODULE_SHIPPING_FLAT_TAX_CLASS, STORE_COUNTRY, MODULE_SHIPPING_FLAT_ZONE);
$shippingCost = xtc_add_tax($shippingCost, $tax);
$this->tax = xtc_get_tax_rate_export($this->paymentTaxModulClass, STORE_COUNTRY, $this->paymentTaxModulZone);
$shippingCost = xtc_add_tax($shippingCost, $this->tax);
}
// format and round numbers
$shippingCost = number_format($shippingCost, 2, '.', '');
ca. Zeile 381
*
* This is important for cash on delivery as there are different fee options possible.
*/
function checkStandardShippingCostsOption() {
private function checkStandardShippingCostsOption() {
// free shipping?
if($this->checkShippingCostOption('FREEAMOUNT') > 0 ) {
$this->freeShipping = true;
$this->countryfreeShipping = true;
// catch the limit for free shipping
$getFreeamountValue = xtc_db_query("SELECT `configuration_value` AS `freeShippingValue`
FROM `configuration`
ca. Zeile 413
// sc per item
$this->paymentItem = true;
// set the standard shipping costs
$this->setStandardShippingCosts();
} elseif($this->checkShippingCostOption('FLAT') > 0) {
// flat sc
$this->paymentFlat = true;
$this->setStandardShippingCosts();
} elseif($this->checkShippingCostOption('FLAT') > 0) {
// flat sc
$this->paymentFlat = true;
// set the standard shipping costs
$this->setStandardShippingCosts();
} elseif($this->checkShippingCostOption('DP') > 0) {
// dp sc
$this->paymentDP = true;
// set the standard shipping costs
$this->setDpShippingCosts();
} elseif($this->checkShippingCostOption('UPS') > 0) {
// dp sc
$this->paymentUPS = true;
// set the standard shipping costs
$this->setDpShippingCosts();
} elseif($this->checkShippingCostOption('UPSE') > 0) {
// dp sc
$this->paymentUPSE = true;
// set the standard shipping costs
$this->setStandardShippingCosts();
$this->setDpShippingCosts();
}
}
/**
ca. Zeile 429
* The standard sc can consist of the "flat sc" OR the "sc per item"
* as the offer listing in the csv refers to ONE offer
*/
function setStandardShippingCosts() {
private function setStandardShippingCosts() {
$shippingModul = '';
if($this->paymentItem === true) {
$shippingModul = 'MODULE_SHIPPING_ITEM_COST';
ca. Zeile 453
}
}
/**
* Set the shipping cost, using the values of dp module (deutsche post).
* Values can be found in `configuration` with "MODULE_SHIPPING_DP_COST_1"
* as key. It's the same structe as table shipping, but reduced to "price per weight".
*
* @param return null
*/
private function setDpShippingCosts() {
// first step: find out shipping zone
// three different options for grapping the right shipping zone
// %COUNTRY_SC% is not an option, as the risk of grapping the wrong zone is too high
foreach ($this->country_array as $country){
$country_module = explode (':',$country);
$getDPshippingZone = xtc_db_query("SELECT `configuration_key` AS `shipping_zone`
FROM `configuration`
WHERE (`configuration_value` LIKE '$country_module[0]'
AND `configuration_key` LIKE 'MODULE_SHIPPING_" . $country_module[1] ."_COUNTRIES_%')");
$resultSZ = xtc_db_fetch_array($getDPshippingZone);
// no zone found? stop right here
if( empty($resultSZ['shipping_zone']) ) {
return;
}
// parse shipping zone number off $resultSZ['shipping_zone']
// it's the last number of the string, e.g.: MODULE_SHIPPING_DP_COUNTRIES_1
$resultZoneKey = $resultSZ['shipping_zone'];
$stringLen = strlen($resultSZ['shipping_zone']);
$shipping_zone = $resultZoneKey[$stringLen - 1];
// found a number?
// dont use ctype_digit(), it might not be installed
if( !is_numeric($shipping_zone) ) {
return;
}
$getStandardShippingCosts = xtc_db_query("SELECT `configuration_value` AS `standard_sc`
FROM `configuration`
WHERE `configuration_key` = 'MODULE_SHIPPING_". $country_module[1] ."_COST_{$shipping_zone}';");
$result = xtc_db_fetch_array($getStandardShippingCosts);
// init $this->standardShippingCost in case no other values are set
$this->standardShippingCost = '';
if(isset($result['standard_sc'])) {
// example string: 5:16.50,10:20.50,20:28.50 can also be in the wrong order
// split Value at the comma
$explodedValues = explode(',', $result['standard_sc']);
//sort the array up by selection sort
if(sizeof($explodedValues)>'1'){
for ($i = 0; $i < sizeof($explodedValues); $i++){
$value_1 = explode(':',$explodedValues[$i]);
$minpos = $i;
for ($j = $i+1; $j<sizeof($explodedValues); $j++){
$value_2 = explode(':',$explodedValues[$j]);
if ($value_1[0] < $value_2[0]){
$minpos = $j;
}
}
$tmp = $explodedValues[$minpos];
$explodedValues[$minpos] = $explodedValues[$i];
$explodedValues[$i] = $tmp;
}
}
//reverse the array
$explodedValues = array_reverse($explodedValues, true);
// run through the values and split again at the colon
// the key is the weight and the value is the sc
foreach($explodedValues as $values) {
$tmpAr = array();
$tmpAr = explode(":", $values);
$costs_array = array();
if ($country_module[1] == 'DP'){
// are there only numbers?
if( is_numeric($tmpAr[0]) && is_numeric($tmpAr[1]) ) {
$this->paymentDpValues[$country_module[0]][$tmpAr[0]] = $tmpAr[1];
}
}
if ($country_module[1] == 'UPS'){
// are there only numbers?
if( is_numeric($tmpAr[0]) && is_numeric($tmpAr[1]) ) {
$this->paymentUpsValues[$country_module[0]][$tmpAr[0]] = $tmpAr[1];
}
}
if ($country_module[1] == 'UPSE'){
// are there only numbers?
if( is_numeric($tmpAr[0]) && is_numeric($tmpAr[1]) ) {
$this->paymentUpseValues[$country_module[0]][$tmpAr[0]] = $tmpAr[1];
}
}
unset($tmpAr);
}
}
}
}
/**
* Method checks if a specific shipping costs option is activated
*
* @param string $option
*
* @return integer 0 when nothing is found, otherwise a number bigger than 0
*/
function checkShippingCostOption($option) {
private function checkShippingCostOption($option) {
//if no country selected default 'DE'
if(empty($this->country_array)){
$this->country_array[] = 'DE:DP';
}
foreach($this->country_array as $country){
$country_module = explode (':',$country);
// transform to uppercase
$option = strtoupper($option);
$checkOption = xtc_db_query("
SELECT COUNT(*) AS found
ca. Zeile 475
$countryOption = xtc_db_query("
SELECT COUNT(*) AS found
FROM configuration
WHERE configuration_key LIKE 'MODULE_SHIPPING_{$option}_ALLOWED' AND
(configuration_value LIKE '%".COUNTRY_SC."%' OR configuration_value='');
(configuration_value LIKE '%".$country_module[0]."%' OR configuration_value = '');
");
$countryOk = xtc_db_fetch_array($countryOption);
// if $countryOk['found'] is not set, 0 (country is not activated) will be returned
ca. Zeile 485
} else {
return 0;
}
}
}
/**
* Method sets the "table shipping costs" values
*/
function setPaymentTableValues() {
private function setPaymentTableValues() {
$explodedValues = array();
// take the data from the db
$getValues = xtc_db_query("SELECT `configuration_value` AS `table_values`
FROM `configuration`
FROM " . TABLE_CONFIGURATION . "
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_TABLE_COST';");
$result = xtc_db_fetch_array($getValues);
ca. Zeile 504
// otherwise $this->paymentTableValues stays empty
// example string: 25:8.50,50:5.50,10000:0.00
if( isset($result['table_values']) && $result['table_values'] != '') {
// split die Value at the comma
// split Value at the comma
$explodedValues = explode(',', $result['table_values']);
// run through the values and split again at the colon
// the key is the weight / price and the value is the sc
ca. Zeile 523
}
// check what param is used for "table sc": weight or price
$getPaymentTableMode = xtc_db_query("SELECT `configuration_value` AS `table_mode`
FROM `configuration`
FROM " . TABLE_CONFIGURATION . "
WHERE `configuration_key` LIKE 'MODULE_SHIPPING_TABLE_MODE';");
$result = xtc_db_fetch_array($getPaymentTableMode);
if(isset($result['table_mode']) && $result['table_mode'] != '') {
$this->paymentTableMode = $result['table_mode'];
ca. Zeile 536
* Methode creates the content of the csv
*
* @param string $file
*/
function process($file) {
public function process($file) {
if( isset($_POST['export']) && $_POST['export'] != 'live' ) {
$schema = '';
@xtc_set_time_limit(0);
$xtPrice = new xtcPrice($_POST['currencies'],$_POST['status']);
$xtPrice = new xtcPrice(CURRENCY,'1');
$schema .= QUOTECHAR . 'artikelId' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'hersteller' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'bezeichnung' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'kategorie' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'beschreibung_kurz' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'beschreibung_lang' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'bild' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'deeplink' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'preis' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'ean' . QUOTECHAR . SEPARATOR .
QUOTECHAR . 'lieferzeit' . QUOTECHAR . SEPARATOR;
$schema .= QUOTECHAR . ARTICLE_ID . QUOTECHAR . SEPARATOR .
QUOTECHAR . BRAND . QUOTECHAR . SEPARATOR .
QUOTECHAR . PRODUCT_NAME . QUOTECHAR . SEPARATOR .
QUOTECHAR . CATEGORIE . QUOTECHAR . SEPARATOR .
QUOTECHAR . DESCRIPTION_SHORT . QUOTECHAR . SEPARATOR .
QUOTECHAR . DESCRIPTION_SHORT_LONG . QUOTECHAR . SEPARATOR .
QUOTECHAR . IMAGE . QUOTECHAR . SEPARATOR .
QUOTECHAR . DEEPLINK . QUOTECHAR . SEPARATOR .
QUOTECHAR . PRICE . QUOTECHAR . SEPARATOR .
QUOTECHAR . EAN . QUOTECHAR . SEPARATOR .
QUOTECHAR . DELIVERY . QUOTECHAR . SEPARATOR;
// run through the payment method titles to display them in the header
foreach($this->country_array as $country){
$country_module = explode (':',$country);
// write the shippingdispatch in row
if($country_module[1] == 'DP'){
$tmp_shippingDispatch = 'Deutsche Post';
}else{
$tmp_shippingDispatch = $country_module[1];
}
// write for which country the shipping costs
if( count($this->country_array) > 1 ) {
$suffix = '_' . $country_module[0] . '_' . $tmp_shippingDispatch;
} else {
$suffix = '';
}
foreach($this->payment as $payment => $options) {
if ($options['title'] == 'Deutsche Post'){
break;
}
// display only the payment methods that are active (if this is desired)
if($options['active'] === true || DISPLAYINACTIVEMODULES === true) {
$schema .= QUOTECHAR . $options['title'] . QUOTECHAR . SEPARATOR;
$schema .= QUOTECHAR . $options['title'] . $suffix . QUOTECHAR . SEPARATOR;
}
}
}
// shipping comment
$schema .= QUOTECHAR . 'Versandkommentar' . QUOTECHAR . SEPARATOR;
// free shipping comment (if active)
if( ($this->freeShipping === true) && (SHOWFREESHIPPINGLIMITCOMMENT === true) ) {
$schema .= QUOTECHAR . 'Kommentar Versandkosten-Grenze' . QUOTECHAR . SEPARATOR;
}
// loworder fee
if( $this->loworderfee === true ) {
$schema .= QUOTECHAR . 'Mindermengenzuschlag' . QUOTECHAR . SEPARATOR;
}
// extra fee for "cash on delivery"
$schema .= QUOTECHAR . 'Zusatzkosten Nachnahme' . QUOTECHAR . SEPARATOR;
// product weight
$schema .= QUOTECHAR . 'Gewicht' . QUOTECHAR . SEPARATOR;
//baseprice
$schema .= QUOTECHAR . 'Grundpreis' . QUOTECHAR . SEPARATOR;
$schema .= "\n";
$export_query =xtc_db_query("SELECT
p.products_id,
ca. Zeile 586
pd.products_meta_keywords,
p.products_tax_class_id,
p.products_date_added,
p.products_weight,
m.manufacturers_name
m.manufacturers_name,
p.products_vpe_value,
p.products_vpe_status,
p.products_vpe
FROM
" . TABLE_PRODUCTS . " p LEFT JOIN
" . TABLE_MANUFACTURERS . " m
ON p.manufacturers_id = m.manufacturers_id LEFT JOIN
ca. Zeile 612
$products['products_tax_class_id'],
'');
$this->productsPrice = $products_price;
// get product categorie
// get product categorie (take the lowest category id)
$categorie_query=xtc_db_query("SELECT
categories_id
FROM ".TABLE_PRODUCTS_TO_CATEGORIES."
WHERE products_id='".$products['products_id']."'");
WHERE products_id = '".$products['products_id']."'
ORDER BY categories_id DESC;");
while ($categorie_data=xtc_db_fetch_array($categorie_query)) {
$categories=$categorie_data['categories_id'];
}
ca. Zeile 627
// characters that should be replaced
$spaceToReplace = array("<br>", "<br />", "\n", "\r", "\t", "\v", chr(13)); // replace by space
$commaToReplace = array("'"); // replace by comma
$quoteToReplace = array("",", "&qout,"); // replace by quote ( " )
$quoteToReplace = array(""", "&qout,"); // replace by quote ( " )
// replace characters and cut to the appropriate length
$products_description = strip_tags($products['products_description']);
$products_description = str_replace($spaceToReplace," ",$products_description);
ca. Zeile 652
$image = HTTP_CATALOG_SERVER . DIR_WS_CATALOG_ORIGINAL_IMAGES .$products['products_image'];
}else{
$image = '';
}
$price = number_format($products_price,2,'.','');
//create content
$schema .= QUOTECHAR . $products['products_id'] . QUOTECHAR . SEPARATOR .
QUOTECHAR . $products['manufacturers_name']. QUOTECHAR . SEPARATOR .
QUOTECHAR . $products['products_name'] . QUOTECHAR . SEPARATOR .
ca. Zeile 661
QUOTECHAR . $products_short_description . QUOTECHAR . SEPARATOR .
QUOTECHAR . $products_description . QUOTECHAR . SEPARATOR .
QUOTECHAR . $image . QUOTECHAR . SEPARATOR .
QUOTECHAR . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?'.$_POST['campaign'].xtc_product_link($products['products_id'], $products['products_name']) . QUOTECHAR . SEPARATOR .
QUOTECHAR . number_format($products_price,2,'.','') . QUOTECHAR . SEPARATOR .
QUOTECHAR . $price . QUOTECHAR . SEPARATOR .
QUOTECHAR . $products['products_ean'] . QUOTECHAR . SEPARATOR .
QUOTECHAR . xtc_get_shipping_status_name($products['products_shippingtime']) . QUOTECHAR . SEPARATOR;
// free shipping costs AND free sc comment available?
$showScFreeComment = false;
// Set the shipping costs for each country
foreach ($this->country_array as $country){
// run through the payment methods to display the fee
foreach($this->payment as $singlePayment => $options) {
//breake if payment is DB
if ($singlePayment == 'DP'){
break;
}
// display only the payment fee that is active (if this is desired)
if($options['active'] === true || DISPLAYINACTIVEMODULES === true) {
$sc = $this->getShippingCosts($singlePayment, $products_price, $products['products_weight']);
$sc = $this->getShippingCosts($singlePayment, $products_price, $products['products_weight'], $country);
// extra treatment for some payments
switch( $singlePayment ) {
case 'PAYPAL':
// mind the max price limit for paypal
if( PAYPALEXTRAFEE_MAXPRICELIMIT != '' && ($price > PAYPALEXTRAFEE_MAXPRICELIMIT) ) {
$sc = '';
} else {
$sc = $this->calculatePaypalfee($price, $sc);
}
break;
case 'CC':
// mind the max price limit for cc
if( CCEXTRAFEE_MAXPRICELIMIT != '' && ($price > CCEXTRAFEE_MAXPRICELIMIT) ) {
$sc = '';
} else {
$sc = $this->calculateCCfee($price, $sc);
}
break;
default:
break;
} // end of switch( $singlePayment ) { ... }
$schema .= QUOTECHAR . $sc . QUOTECHAR . SEPARATOR;
// if there's one payment with sc > 0.00, display the sc free comment
// exception: cash on delivery
if( $singlePayment != 'COD' && $sc > 0.00 ) {
$showScFreeComment = true;
}
}
}
}
$schema .= QUOTECHAR . SHIPPINGCOMMENT_INPUT . QUOTECHAR . SEPARATOR;
// Only if free shipping costs are available AND SHOWFREESHIPPINGLIMITCOMMENT is set to true
// only if free shipping costs are available AND SHOWFREESHIPPINGCOMMENTCOMMENT is set to true
if( ($this->freeShipping === true) && SHOWFREESHIPPINGLIMITCOMMENT === true ) {
// is shipping of the offer for free?
if( $showScFreeComment === true ) {
$schema .= QUOTECHAR . FREESHIPPINGCOMMENT_INPUT . QUOTECHAR . SEPARATOR;
ca. Zeile 695
$schema .= QUOTECHAR . '' . QUOTECHAR . SEPARATOR;
}
}
// loworder fee
if( $this->loworderfee === true ) {
if( ($this->loworderOption['orderfeeUnder'] > $products_price) ) {
// calculate taxes
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$loworderfee = xtc_add_tax($this->loworderOption['loworderfee'], $this->tax);
} else {
$loworderfee = $this->loworderOption['loworderfee'];
}
// format and round numbers
$loworderfee = number_format($loworderfee, 2, '.', '');
} else {
$loworderfee = '';
}
$schema .= QUOTECHAR . $loworderfee . QUOTECHAR . SEPARATOR;
}
$schema .= QUOTECHAR . CODEXTRAFEE_VALUE . QUOTECHAR . SEPARATOR;
if (empty($products['products_weight'])){
$schema .= QUOTECHAR . 'keine Angabe' . QUOTECHAR . SEPARATOR;
}else{
$schema .= QUOTECHAR . $products['products_weight'] . QUOTECHAR . SEPARATOR;
}
if ($products['products_vpe_status'] == '1'){
$vpe = $this->getVPE($products['products_vpe']);
$schema .= QUOTECHAR . round($price / $products['products_vpe_value'],2) . ' EUR/ ' . $vpe . QUOTECHAR . SEPARATOR;
}else{
$schema .= QUOTECHAR . '' . QUOTECHAR . SEPARATOR;
}
$schema .= "\n";
}
// create File
$fp = fopen(DIR_FS_DOCUMENT_ROOT.'export/' . $file, "w+");
fputs($fp, $schema);
fclose($fp);
ca. Zeile 702
$fp = fopen(DIR_FS_DOCUMENT_ROOT.'export/' . $file, "w+");
fputs($fp, $schema);
fclose($fp);
if(isset($_POST['pack']) && $_POST['pack'] == 'no' ){
$this->packfile($schema,$file);
$file = explode('.', $file);
$file = $file[0]. '.zip';
}
if( isset($_POST['export']) && $_POST['export'] == '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));
ca. Zeile 709
$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;
}
}elseif( isset($_POST['export']) && $_POST['export'] == 'live' ) {
$url = HTTP_CATALOG_SERVER.PATH; // get the URL to the dynamic module
}
}
/**
* Methode take vpe from db
*
* @param string $product_vpe
* @param string $language
*
* @return string $vpe
*/
public function getVPE($product_vpe, $language = '1'){
$vpe = xtc_db_query("SELECT `products_vpe_name` FROM `products_vpe` WHERE `products_vpe_id` = " . $product_vpe . " AND `language_id` = " . $language . ";");
$vpe = xtc_db_fetch_array($vpe);
return $vpe['products_vpe_name'];
}
/**
* Methode packs the Schema in a .zip-File
*
* @param string $product_vpe
* @param string $language
*
* @return string $vpe
*/
public function packfile($schema , $file){
$zipfile = new zip(); // Neues Objekt definieren
// Hier nun jeweils Dateien hinzufügen, erster Parameter soll der Inhalt
// der Datei sein, zweiter Parameter der Dateiname
$zipfile->add_file ( $schema , $file );
// Mit den folgenden Headern und der anschließenden Ausgabe der Zip-Datei
// mit $zipfile->file() wird direkt der Dateidownload der ZIP-Datei gestartet.
$file = explode ('.', $file);
header("Content-type: x-application/octet-stream");
header("Content-disposition: attachment; filename=\"" . $file[0]. ".zip\"");
header("Content-length: ".strlen($zipfile->file()));
$zipfile_fin = $zipfile->file();
$fp = fopen(DIR_FS_DOCUMENT_ROOT.'export/'. $file[0] . '.zip', "w+");
fputs($fp, $zipfile_fin);
fclose($fp);
}
/**
* Calculate extra fee for Paypal
*
* @param float $shippingCost
* @return float $calculatedSc
*/
private function calculatePaypalfee($price, $sc) {
if( PAYPALEXTRAFEE_FIX == '' && PAYPALEXTRAFEE_NOFIX == '' ) {
return $sc;
}
// change comma with point
$fixfee = str_replace(',', '.', PAYPALEXTRAFEE_FIX);
$nofixfee = str_replace(',', '.', PAYPALEXTRAFEE_NOFIX);
// init $calculatedSc
$calculatedSc = 0;
// either both values are not empty or just one of them
// Fee depends on price + "normal" shipping cost
// if $price is empty, return normal shipping cost
if( !empty($nofixfee) ) {
if( empty($price) ) {
$calculatedSc = $sc;
} else {
// sc inclusive or exclusive?
if( PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE == "" || PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE == "yes" ) {
// price AND shipping cost
$tmpFee = (($price + $sc) / 100 ) * $nofixfee;
} else {
// price WITHOUT shipping cost
$tmpFee = (($price) / 100 ) * $nofixfee;
}
$calculatedSc = number_format($tmpFee,2,'.','') + $sc;
}
}
if( !empty($fixfee) ) {
// check if $nofixfee is empty
if( empty($nofixfee) ) {
$calculatedSc = $sc + $fixfee;
} else {
// $calculatedSc has already been calculated before; just add $fixfee
$calculatedSc = $calculatedSc + $fixfee;
}
}
return $calculatedSc;
}
/**
* Calculate extra fee for CC
*
* @param float $shippingCost
* @return float $calculatedSc
*/
private function calculateCCfee($price, $sc) {
if( CCEXTRAFEE_FIX == '' && CCEXTRAFEE_NOFIX == '' ) {
return $sc;
}
// change comma with point
$fixfee = str_replace(',', '.', CCEXTRAFEE_FIX);
$nofixfee = str_replace(',', '.', CCEXTRAFEE_NOFIX);
// init $calculatedSc
$calculatedSc = 0;
// either both values are not empty or just on of them
// Fee is dependent on price + "normal" shipping cost
// if $price is empty, return normal shipping cost
if( !empty($nofixfee) ) {
if( empty($price) ) {
$calculatedSc = $sc;
} else {
// sc inclusive or exclusive?
if( CCEXTRAFEE_NOFIX_SCINCLUSIVE == "" || CCEXTRAFEE_NOFIX_SCINCLUSIVE == "yes" ) {
// price AND shipping cost
$tmpFee = (($price + $sc) / 100 ) * $nofixfee;
} else {
// price WITHOUT shipping cost
$tmpFee = (($price) / 100 ) * $nofixfee;
}
$calculatedSc = number_format($tmpFee,2,'.','') + $sc;
}
}
if( !empty($fixfee) ) {
// check if $nofixfee is empty
if( empty($nofixfee) ) {
$calculatedSc = $sc + $fixfee;
} else {
// $calculatedSc has already been calculated before; just add $fixfee
$calculatedSc = $calculatedSc + $fixfee;
}
}
return $calculatedSc;
}
/**
* Methods creates the Categorie for a categorieId
*
* @param int $catID
* @return string Category
*/
function buildCAT($catID) {
private function buildCAT($catID) {
if (isset($this->CAT[$catID])) {
return $this->CAT[$catID];
} else {
$cat=array();
ca. Zeile 753
*
* @param int $catID
* @return int parent id of the category
*/
function getParent($catID) {
private function getParent($catID) {
if (isset($this->PARENT[$catID])) {
return $this->PARENT[$catID];
} else {
$parent_query=xtc_db_query("SELECT parent_id FROM ".TABLE_CATEGORIES." WHERE categories_id='".$catID."'");
ca. Zeile 767
/**
* Method prepares the text that is displayed at the detailed options on module_export.php
*/
function display() {
public function display() {
$customers_statuses_array = xtc_get_customers_statuses();
// build Currency Select
$curr='';
$currencies=xtc_db_query("SELECT code FROM ".TABLE_CURRENCIES);
while ($currencies_data=xtc_db_fetch_array($currencies)) {
$curr.=xtc_draw_radio_field('currencies', $currencies_data['code'],true).$currencies_data['code'].'<br>';
}
$campaign_array = array(array('id' => '', 'text' => TEXT_NONE));
$campaign_query = xtc_db_query("select campaigns_name, campaigns_refID from ".TABLE_CAMPAIGNS." order by campaigns_id");
while ($campaign = xtc_db_fetch_array($campaign_query)) {
$campaign_array[] = array ('id' => 'refID='.$campaign['campaigns_refID'].'&', 'text' => $campaign['campaigns_name'],);
}
// get livedata from db
$h_string = 'select configuration_value from `'. TABLE_CONFIGURATION . '` where `configuration_key` = \'MODULE_IDEALO_LIVEDATA_SETTING\' LIMIT 1';
$livedata_query = xtc_db_query($h_string);
$livedata_db = xtc_db_fetch_array($livedata_query);
$livedata = $livedata_db['configuration_value'];
// get separator from db
$separator_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_SEPARATOR' LIMIT 1");
$separator_db = xtc_db_fetch_array($separator_query);
$separator = $separator_db['configuration_value'];
// get quoting character from db
$quoting_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_QUOTING' LIMIT 1");
$quoting_db = xtc_db_fetch_array($quoting_query);
$quoting = $quoting_db['configuration_value'];
// get codextrafee from db
$codextrafee_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CODEXTRAFEE' LIMIT 1");
$codextrafee_db = xtc_db_fetch_array($codextrafee_query);
$codextrafee = $codextrafee_db['configuration_value'];
// get quoting character from db
$language_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_LANGUAGE' LIMIT 1");
$language_db = xtc_db_fetch_array($language_query);
$language = $language_db['configuration_value'];
// get free shipping comment from db
if( $this->freeShipping === true && SHOWFREESHIPPINGLIMITCOMMENT === true ) {
$freeshipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_FREESHIPPINGCOMMENT' LIMIT 1");
$freeshipping_comment_db = xtc_db_fetch_array($freeshipping_input_query);
ca. Zeile 800
$shipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_SHIPPINGCOMMENT' LIMIT 1");
$shipping_comment_db = xtc_db_fetch_array($shipping_input_query);
$shipping_comment_text = ( $shipping_comment_db !== false ) ? $shipping_comment_db['configuration_value'] : '';
if( $this->payment['PAYPAL']['active'] === true ) {
// get fee values
$paypalextrafee_fix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_FIX' LIMIT 1");
$paypalextrafee_fix_db = xtc_db_fetch_array($paypalextrafee_fix_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_FIX' doesn't exist
$fix_value = ( empty($paypalextrafee_fix_db) )? '' : $paypalextrafee_fix_db['configuration_value'];
$paypalextrafee_nofix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX' LIMIT 1");
$paypalextrafee_nofix_db = xtc_db_fetch_array($paypalextrafee_nofix_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_FIX' doesn't exist
$nofix_value = ( empty($paypalextrafee_nofix_db) )? '' : $paypalextrafee_nofix_db['configuration_value'];
$paypalextrafee_input_nofix_scinclusive_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE' LIMIT 1");
$paypalextrafee_input_nofix_scinclusive_db = xtc_db_fetch_array($paypalextrafee_input_nofix_scinclusive_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE' doesn't exist
if( empty($paypalextrafee_input_nofix_scinclusive_db) || $paypalextrafee_input_nofix_scinclusive_db['configuration_value'] == "yes" ) {
$nofix_scinclusive_yes = true;
$nofix_scinclusive_no = false;
} else {
$nofix_scinclusive_yes = false;
$nofix_scinclusive_no = true;
}
$paypalmaxpricelimit_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_PAYPALMAXPRICELIMIT' LIMIT 1");
$paypalmaxpricelimit_db = xtc_db_fetch_array($paypalmaxpricelimit_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_FIX' doesn't exist
$maxprice_value = ( empty($paypalmaxpricelimit_db) )? '' : $paypalmaxpricelimit_db['configuration_value'];
$paypalextrafee = PAYPALEXTRAFEE.'<br>'.PAYPALEXTRAFEE_HINT.'<br>'.
xtc_draw_small_input_field('paypal_extrafee_fix', $fix_value).PAYPALEXTRAFEE_INPUT_FIX.'<br>'.
xtc_draw_small_input_field('paypal_extrafee_nofix', $nofix_value).PAYPALEXTRAFEE_INPUT_NOFIX.'<br>' .
xtc_draw_radio_field('paypal_extrafee_nofix_inkl_sc', 'yes', $nofix_scinclusive_yes).PAYPALEXTRAFEE_RADIO_SCINCLUSIVE.' '.
xtc_draw_radio_field('paypal_extrafee_nofix_inkl_sc', 'no', $nofix_scinclusive_no).PAYPALEXTRAFEE_RADIO_SCNOTINCLUSIVE.'<br><br>'.
PAYPAL_MAXPRICELIMIT.'<br>'.PAYPAL_MAXPRICEVALUE.'<br>'.
xtc_draw_small_input_field('paypal_maxpricelimit', $maxprice_value) . PAYPAL_MAXPRICEEXAMPLE . '<br><br>';
} else {
$paypalextrafee = '';
}
if( $this->payment['CC']['active'] === true ) {
// get fee values
$ccextrafee_fix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_FIX' LIMIT 1");
$ccextrafee_fix_db = xtc_db_fetch_array($ccextrafee_fix_query); // false if 'MODULE_IDEALO_CCEXTRAFEE_FIX' doesn't exist
$fix_value = ( empty($ccextrafee_fix_db) )? '' : $ccextrafee_fix_db['configuration_value'];
$ccextrafee_nofix_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_NOFIX' LIMIT 1");
$ccextrafee_nofix_db = xtc_db_fetch_array($ccextrafee_nofix_query); // false if 'MODULE_IDEALO_CCEXTRAFEE_NOFIX' doesn't exist
$nofix_value = ( empty($ccextrafee_nofix_db) )? '' : $ccextrafee_nofix_db['configuration_value'];
$ccextrafee_input_nofix_scinclusive_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCEXTRAFEE_NOFIX_SCINCLUSIVE' LIMIT 1");
$ccextrafee_input_nofix_scinclusive_db = xtc_db_fetch_array($ccextrafee_input_nofix_scinclusive_query); // false if 'MODULE_IDEALO_PAYPALEXTRAFEE_NOFIX_SCINCLUSIVE' doesn't exist
if( empty($ccextrafee_input_nofix_scinclusive_db) || $ccextrafee_input_nofix_scinclusive_db['configuration_value'] == "yes" ) {
$nofix_scinclusive_yes = true;
$nofix_scinclusive_no = false;
} else {
$nofix_scinclusive_yes = false;
$nofix_scinclusive_no = true;
}
$ccmaxpricelimit_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CCMAXPRICELIMIT' LIMIT 1");
$ccmaxpricelimit_db = xtc_db_fetch_array($ccmaxpricelimit_query); // false if 'MODULE_IDEALO_CCMAXPRICELIMIT' doesn't exist
$maxprice_value = ( empty($ccmaxpricelimit_db) )? '' : $ccmaxpricelimit_db['configuration_value'];
$ccextrafee = CCEXTRAFEE.'<br>'.CCEXTRAFEE_HINT.'<br>'.
xtc_draw_small_input_field('cc_extrafee_fix', $fix_value).CCEXTRAFEE_INPUT_FIX.'<br>'.
xtc_draw_small_input_field('cc_extrafee_nofix', $nofix_value).CCEXTRAFEE_INPUT_NOFIX.'<br>' .
xtc_draw_radio_field('cc_extrafee_nofix_inkl_sc', 'yes', $nofix_scinclusive_yes).CCEXTRAFEE_RADIO_SCINCLUSIVE.' '.
xtc_draw_radio_field('cc_extrafee_nofix_inkl_sc', 'no', $nofix_scinclusive_no).CCEXTRAFEE_RADIO_SCNOTINCLUSIVE.'<br><br>'.
CC_MAXPRICELIMIT.'<br>'.CC_MAXPRICEVALUE.'<br>'.
xtc_draw_small_input_field('cc_maxpricelimit', $maxprice_value) . CC_MAXPRICEEXAMPLE . '<br><br>';
$sql = "select `configuration_value` as value from `" . TABLE_CONFIGURATION . "` where `configuration_key` = 'IDEALO_ZIP_SETTING' LIMIT 1";
$zipsetting = xtc_db_query($sql);
$zipsetting = xtc_db_fetch_array($zipsetting);
$zipsetting = $zipsetting['value'];
} else {
$ccextrafee = '';
}
return array('text' =>
'<br>' . FIELDSEPARATOR . '<br>' .
FIELDSEPARATOR_HINT . '<br>' .
xtc_draw_small_input_field('separator_input', ';') . '<br><br>' .
xtc_draw_small_input_field('separator_input', $separator) . '<br><br>' .
QUOTING . '<br>' .
QUOTING_HINT . '<br>' .
xtc_draw_small_input_field('quoting_input', '"') . '<br><br>' .
xtc_draw_small_input_field('quoting_input', $quoting) . '<br><br>' .
CODEXTRAFEE . '<br>' .
CODEXTRAFEE_HINT . '<br>' .
xtc_draw_small_input_field('codextrafee_input', $codextrafee) . '<br><br>' .
$paypalextrafee .
$ccextrafee .
SHIPPINGCOMMENT . '<br>' .
SHIPPINGCOMMENT_HINT . '<br>' .
xtc_draw_input_field('shippingcomment_input', $shipping_comment_text) . '<br><br>'.
$freeshippingHTML .
LANGUAGE . '<br>' .
LANGUAGE_HINT . '<br>' .
xtc_draw_small_input_field('language_input', 'DE') . '<br>' .
EXPORT_STATUS_TYPE.'<br>'.
EXPORT_STATUS.'<br>'.
xtc_draw_pull_down_menu('status',$customers_statuses_array, '1').'<br>'.
CURRENCY.'<br>'.
CURRENCY_DESC.'<br>'.
$curr.
xtc_draw_input_field('language_input', $language) . '<br>' .
CAMPAIGNS.'<br>'.
CAMPAIGNS_DESC.'<br>'.
xtc_draw_pull_down_menu('campaign',$campaign_array).'<br>'.
PACK_TEXT . '<br>' .
$this->filepack($zipsetting) .
EXPORT_TYPE.'<br>'.
EXPORT.'<br>'.
xtc_draw_radio_field('export', 'no',false).EXPORT_NO.'<br>'.
xtc_draw_radio_field('export', 'yes',true).EXPORT_YES.'<br>'.
$this->liveExist($livedata).
'<br>' . xtc_button(BUTTON_EXPORT) .
xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=idealo')));
xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set =' . $_GET['set'] . '&module=idealo'))
);
}
/**
* Methode creates the radios for chock if a file has be to zip
*
* @param string $setting
*
* @return string
*/
public function filepack($setting){
if($setting == 'yes'){
return xtc_draw_radio_field('pack', 'no',false). 'ja (.zip)' . '<br>'.xtc_draw_radio_field('pack', 'yes',true). 'nein (.csv)' . '<br>';
}else{
return xtc_draw_radio_field('pack', 'no',true). 'ja (.zip)' . '<br>'.xtc_draw_radio_field('pack', 'yes',false). 'nein (.csv)' . '<br>';
}
}
/**
* Methode create a button to show the Link to the dynamic module
*
* @param string $value
* @param string $type
* @param string $parameter
*
* @return string
*/
public function link_button($value, $type = 'button', $parameter) {
return '<input type = "'.$type.'" class = "button" onClick = "javascript:alert(\''.$parameter.'\')" value = "' . $value . '">';
}
/**
* Methode check if idealo_dynamic-Module is installed
* If idealo_dynamic-Module is installed methode show radiobuttons to make a chois (csv make self or liveupdate by idealo) and the button to the URL to the dynamic module.
*
* @param string $livedata
*
* @return string
*/
public function liveExist($livedata){
if (LIVEDATA_MODULE == 'no'){
return xtc_draw_radio_field('export', 'no',false).EXPORT_NO.'<br>'.xtc_draw_radio_field('export', 'yes',true).EXPORT_YES.'<br>';
}else{
// create File
$fp = fopen(DIR_FS_DOCUMENT_ROOT.'export/idealo/Link.txt' , "w+");
fputs($fp, HTTP_CATALOG_SERVER . DIR_WS_CATALOG);
fclose($fp);
$url = substr(HTTP_CATALOG_SERVER . DIR_WS_CATALOG,0,-1).PATH; // get the URL to the dynamic module and cut the last "/"
$link_string = 'Bitte kopieren Sie diesen Link und schicken diesen an idealo:\n\n'.$url.'\n\nBeim Aufruf des Links durch idealo wird automatisch eine aktuelle Exportdatei bereitgestellt. \nEs brauchen haendlerseitig keine manuellen Exporte mehr gestartet werden! \n\nAenderungen an der Export-Konfiguration des Moduls muessen aber weiterhin durch Druecken des Speichern-Buttons uebernommen werden.\nDie Abfrage der neuen Exportdatei erfolgt dann automatisch durch idealo. Das Update-Intervall kann bei idealo erfragt und ggf. geaendert werden.\n\nBei Fragen hierzu koennen sie Sich gern an csv@idealo.de wenden.\n\nFalls Sie noch kein idealo-Partnershop sind, koennen Sie sich hier kostenlos und unverbindlich anmelden.\n\nhttp://www.idealo.de/preisvergleich/ShopRegister.html';
// set the setting for the radiobutton to display last selection
if( $livedata == 'yes' ){
$live_yes = true;
$live_no = false;
}else{
$live_yes = false;
$live_no = true;
}
return xtc_draw_radio_field('export', 'no',false).EXPORT_NO.'<br>'.xtc_draw_radio_field('export', 'yes',true).EXPORT_YES.'<br>'.xtc_draw_radio_field('export', 'live',$live_yes).DYNAMIC_YES.' '.$this->link_button(LINK_TO_DYNAMIC_MODULE,'0',$link_string);
}
}
function check() {
/**
* function check if _check set
*/
public function check() {
if (!isset($this->_check)) {
$check_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_STATUS'");
$this->_check = xtc_db_num_rows($check_query);
}
ca. Zeile 844
/**
* Method installs a module in module_export.php
*/
function install() {
public function install() {
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_IDEALO_FILE', 'idealo.csv', '6', '1', '', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_IDEALO_STATUS', 'True', '6', '1', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
}
/**
* Method removes a module
*/
function remove() {
public function remove() {
xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
function keys() {
public function keys() {
return array('MODULE_IDEALO_STATUS','MODULE_IDEALO_FILE');
}
}
?>
admin/includes/modules/export/image_processing_step.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: image_processing_step.php 1844 2011-03-20 14:26:57Z web28 $
$Id: image_processing_step.php 2351 2011-11-13 12:21:13Z franky-n-xtcm $
xtcModified - community made shopping
http://www.xtc-modified.org
ca. Zeile 13
(c) 2003 nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
(c) 2006 XT-Commerce (image_processing_step.php 950 2005-05-14; www.xt-commerce.com
--------------------------------------------------------------
Contribution
image_processing_step.php V2 (c) by web28 - www.rpa-com.de --- add javascript sitereload / only missing image/ max images 2011-03-17
image_processing_step (step-by-step Variante B) by INSEH 2008-03-26
new javascript reload / only missing image/ max images by web28 2011-03-17
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
ca. Zeile 30
/images/product_images/thumbnail_images/ <br /> <br /> neu erstellt.<br /> <br />
Hierzu verarbeitet das Script nur eine begrenzte Anzahl von %s Bildern und ruft sich danach selbst wieder auf.<br /> <br />');
define('MODULE_STEP_IMAGE_PROCESS_TEXT_TITLE', 'XT-Imageprocessing-New <b>-V2- <Produktbilder</b>');
define('MODULE_STEP_IMAGE_PROCESS_TEXT_TITLE', 'XT-Imageprocessing-New <b>-V2- Produktbilder</b>');
define('MODULE_STEP_IMAGE_PROCESS_STATUS_DESC','Modulstatus');
define('MODULE_STEP_IMAGE_PROCESS_STATUS_TITLE','Status');
define('IMAGE_EXPORT','Drücken Sie Ok um die Stapelverarbeitung zu starten, dieser Vorgang kann einige Zeit dauern, auf keinen Fall unterbrechen!.');
define('IMAGE_EXPORT_TYPE','<hr noshade><strong>Stapelverarbeitung:</strong>');
ca. Zeile 53
global $order;
$this->code = 'image_processing_step';
$this->title = MODULE_STEP_IMAGE_PROCESS_TEXT_TITLE;
$this->description = sprintF(MODULE_STEP_IMAGE_PROCESS_TEXT_DESCRIPTION, $_GET['max']);
$this->description = sprintf(MODULE_STEP_IMAGE_PROCESS_TEXT_DESCRIPTION, $_GET['max']);
$this->sort_order = MODULE_STEP_IMAGE_PROCESS_SORT_ORDER;
$this->enabled = ((MODULE_STEP_IMAGE_PROCESS_STATUS == 'True') ? true : false);
}
ca. Zeile 75
$tmp = explode('.',$file);
if(is_array($tmp)) {
$ext = strtolower($tmp[count($tmp)-1]);
if (is_file(DIR_FS_CATALOG_ORIGINAL_IMAGES.$file) && in_array($ext,$ext_array) ){
$files[]=array(
'id' => $file,
$files[]=array('id' => $file,
'text' =>$file);
}
}
}
ca. Zeile 97
$products_image_name = $files[$i]['text'];
if ($_GET['miss'] == 1) {
$flag = false;
if (!is_file(DIR_FS_CATALOG_THUMBNAIL_IMAGES.$files[$i]['text'])) { require(DIR_WS_INCLUDES . 'product_thumbnail_images.php'); $flag = true;}
if (!is_file(DIR_FS_CATALOG_INFO_IMAGES.$files[$i]['text'])) { require(DIR_WS_INCLUDES . 'product_info_images.php'); $flag = true; }
if (!is_file(DIR_FS_CATALOG_POPUP_IMAGES.$files[$i]['text'])) { require(DIR_WS_INCLUDES . 'product_popup_images.php'); $flag = true; }
if ($flag) { $count += 1; }
if (!is_file(DIR_FS_CATALOG_THUMBNAIL_IMAGES.$files[$i]['text'])) {
require(DIR_WS_INCLUDES . 'product_thumbnail_images.php'); $flag = true;
}
if (!is_file(DIR_FS_CATALOG_INFO_IMAGES.$files[$i]['text'])) {
require(DIR_WS_INCLUDES . 'product_info_images.php'); $flag = true;
}
if (!is_file(DIR_FS_CATALOG_POPUP_IMAGES.$files[$i]['text'])) {
require(DIR_WS_INCLUDES . 'product_popup_images.php'); $flag = true;
}
if ($flag) {
$count += 1;
}
} else {
require(DIR_WS_INCLUDES . 'product_thumbnail_images.php');
require(DIR_WS_INCLUDES . 'product_info_images.php');
require(DIR_WS_INCLUDES . 'product_popup_images.php');
ca. Zeile 126
$max_array[] = array ('id' => '15', 'text' => '15');
$max_array[] = array ('id' => '20', 'text' => '20');
$max_array[] = array ('id' => '50', 'text' => '50');
return array('text' =>
xtc_draw_hidden_field('process','image_processing_do').
return array('text' => xtc_draw_hidden_field('process','image_processing_do').
xtc_draw_hidden_field('max_images1','5').
IMAGE_EXPORT_TYPE.'<br />'.
IMAGE_EXPORT.'<br />'.
'<br />' . xtc_draw_pull_down_menu('max_images', $max_array, '5'). ' ' . TEXT_MAX_IMAGES. '<br />'.
admin/includes/modules/export/kelkoo.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: kelkoo.php 1188 2005-08-28 14:24:34Z matthias $
$Id: kelkoo.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/metashopper.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: metashopper.php 1188 2005-08-28 14:24:34Z matthias $
$Id: metashopper.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/milando.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: milando.php 1188 2005-08-28 14:24:34Z matthias $
$Id: milando.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/preisauskunft.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: preisauskunft.php 1188 2005-08-28 14:24:34Z matthias $
$Id: preisauskunft.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/preisroboter.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: preisroboter.php,v 0.1 2005/01/10 10:11:01 metulszki Exp $
$Id: preisroboter.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
ca. Zeile 40
//BOF - Tomcraft - 2009-07-21 - Exclude xtc_image_submit.inc.php as it is allready declared in /admin/includes/functions/general.php
//require_once(DIR_FS_INC . 'xtc_image_submit.inc.php');
//EOF - Tomcraft - 2009-07-21 - Exclude xtc_image_submit.inc.php as it is allready declared in /admin/includes/functions/general.php
require_once(DIR_FS_INC . 'xtc_parse_input_field_data.inc.php');
//require_once(DIR_FS_INC . 'xtc_parse_input_field_data.inc.php');
require_once(DIR_FS_INC . 'xtc_image_button.inc.php');
class preisroboter {
var $code, $title, $description, $enabled;
admin/includes/modules/export/preissuchmaschine.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: preissuchmaschine.php 2124 2011-08-29 10:14:43Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(cod.php,v 1.28 2003/02/14); www.oscommerce.com
(c) 2003 nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
(c) 2006 xt-commerce; www.xt-commerce.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
ca. Zeile 39
define('MODULE_PREISSUCHMASCHINE_psmgoogle_YES','Aktivieren');
define('MODULE_PREISSUCHMASCHINE_EXPORT_TYPE','<hr noshade><b>Speicherart:</b>');
define('MODULE_PREISSUCHMASCHINE_CAMPAIGNS','<hr noshade><b>Kampagnen:</b> (automatisch)');
define('MODULE_PREISSUCHMASCHINE_CAMPAIGNS_LINK',HTTP_CATALOG_SERVER.DIR_WS_CATALOG."admin/stats_campaigns.php?report=2&startD=1&startM=".date("m")."&startY=".date("Y")."&status=0&campaign=psm&endD=".date("d")."&endM=".date("m")."&endY=".date("Y"));
//BOF - web28 - 2010-09-06 - Fix admin to DIR_WS_ADMIN
//define('MODULE_PREISSUCHMASCHINE_CAMPAIGNS_LINK',HTTP_CATALOG_SERVER.DIR_WS_CATALOG."admin/stats_campaigns.php?report=2&startD=1&startM=".date("m")."&startY=".date("Y")."&status=0&campaign=psm&endD=".date("d")."&endM=".date("m")."&endY=".date("Y"));
define('MODULE_PREISSUCHMASCHINE_CAMPAIGNS_LINK',HTTP_CATALOG_SERVER.DIR_WS_ADMIN."stats_campaigns.php?report=2&startD=1&startM=".date("m")."&startY=".date("Y")."&status=0&campaign=psm&endD=".date("d")."&endM=".date("m")."&endY=".date("Y"));
//EOF - web28 - 2010-09-06 - Fix admin to DIR_WS_ADMIN
define('MODULE_PREISSUCHMASCHINE_CAMPAIGNS_DESC','Durch unsere automatische Kampagneneinrichtung können Sie jederzeit die von der <a href="campaigns.php"><i>Kampagne</i></a> Preissuchmaschine.de in Ihren Onlineshop weitergeleiteten Nutzer auswerten. Sie sollten über folgenden Link den durch uns generierten Warenkorbumsatz jederzeit nachvollziehen können:<br><br><a style="text-decoration:underline" href=\''.MODULE_PREISSUCHMASCHINE_CAMPAIGNS_LINK.'\'><i><b>Kampagnen-Report</b></i></a><br><br>');
define('MODULE_PREISSUCHMASCHINE_EXPORT_LINK_SEND','Den vorangegangenen Link sollten Sie nun unter dem Punkt Preisliste/Produktdatenliste auf der Stammdatenerfassung der PreisSuchmaschine.de eintragen. Die Stammdatenerfassung kann man hier anfordern: <a style="text-decoration:underline" href=\'mailto:mitmachen@metashopper.de?SUBJECT=Anfrage - Interesse an einer eventuellen Onlinekooperation&BODY=' . str_replace("<-SHOP->",HTTP_CATALOG_SERVER . DIR_WS_CATALOG,str_replace("<-LINK->",HTTP_CATALOG_SERVER . DIR_WS_CATALOG . MODULE_PREISSUCHMASCHINE_EXPORT_LINK . MODULE_PREISSUCHMASCHINE_FILE,MODULE_PREISSUCHMASCHINE_EMAIL)) . '\'><br><br><i><b>zur Anfrage</b> </i></a>(sofern noch nicht erfolgt)');
ca. Zeile 95
'PAYPAL' => array('active' => false,
'title' => 'PayPal'),
'MONEYBOOKERS' => array('active' => false,
'title' => 'Moneybookers'),
'UOS_GIROPAY' => array('active' => false,
'title' => 'Giropay')
);
function preissuchmaschine() {
global $order;
$this->code = 'preissuchmaschine';
admin/includes/modules/export/preistrend.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: preistrend.php 1188 2005-08-28 14:24:34Z matthias $
$Id: preistrend.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/shopboy.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: shopboy.php 1188 2005-08-28 14:24:34Z matthias $
$Id: shopboy.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/export/wein.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: wein.php 1188 2005-08-28 14:24:34Z matthias $
$Id: wein.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
admin/includes/modules/fckeditor/editor/dialog/fck_about.htmlTop ca. Zeile 78
<td align="center" nowrap="nowrap" style="border-right: #000000 1px solid; border-top: #000000 1px solid;
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
<span fcklang="DlgAboutVersion">version</span>
<br />
<b>2.6.6</b><br />
<b>2.6.7</b><br />
Build 25427</td>
</tr>
</table>
</td>
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/config.phpTop ca. Zeile 30
include('../../../../../../local/configure.php');
} else {
require('../../../../../../configure.php');
}
$Config['Enabled'] = true ;
//BOC web28 security fix
$Config['Enabled'] = false ;
if (file_exists('./xtc_access.php')) {
include('./xtc_access.php');
}
//BOC web28 security fix
$Config['UserFilesPath'] = DIR_WS_CATALOG ;
$Config['UserFilesAbsolutePath'] = DIR_FS_DOCUMENT_ROOT ;
// Modified for xt:Commerce v3.0.4 SP2.1 by Hetfield (www.merz-it-service.de) - End //
$Config['ForceSingleExtension'] = true ;
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/io.phpTop ca. Zeile 156
$sRealPath = realpath( './' ) ;
// #2124 ensure that no slash is at the end
$sRealPath = rtrim($sRealPath,"\\/");
$sSelfPath = $_SERVER['PHP_SELF'] ;
//BOF - GTB - 2010-11-26 - Security Fix - PHP_SELF
//$sSelfPath = $_SERVER['PHP_SELF'] ;
$sSelfPath = $_SERVER['SCRIPT_NAME'];
//BOF - GTB - 2010-11-26 - Security Fix - PHP_SELF
$sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ;
$sSelfPath = str_replace( '/', DIRECTORY_SEPARATOR, $sSelfPath ) ;
ca. Zeile 244
// Check for invalid folder paths (..)
if ( strpos( $sCurrentFolder, '..' ) || strpos( $sCurrentFolder, "\\" ))
SendError( 102, '' ) ;
if ( preg_match(",(/\.)|[[:cntrl:]]|(//)|(\\\\)|([\:\*\?\"\<\>\|]),", $sCurrentFolder))
if ( preg_match(",(/\.)|[[:cntrl:]]|(//)|(\\\\)|([\.\;\:\*\?\"\<\>\|]),", $sCurrentFolder))
SendError( 102, '' ) ;
return $sCurrentFolder ;
}
ca. Zeile 255
function SanitizeFolderName( $sNewFolderName )
{
$sNewFolderName = stripslashes( $sNewFolderName ) ;
// Remove . \ / | : ? * " < >
$sNewFolderName = preg_replace( '/\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFolderName ) ;
// Remove . \ / | : ; . ? * " < >
$sNewFolderName = preg_replace( '/\\.|\\\\|\\;|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFolderName ) ;
return $sNewFolderName ;
}
ca. Zeile 273
if ( $Config['ForceSingleExtension'] )
$sNewFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sNewFileName ) ;
// Remove \ / | : ? * " < >
$sNewFileName = preg_replace( '/\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFileName ) ;
$sNewFileName = preg_replace( '/\\\\|\\/|\\||\\:|\\;|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFileName ) ;
return $sNewFileName ;
}
admin/includes/modules/new_attributes_include.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: new_attributes_include.php 901 2005-04-29 10:32:14Z novalis $
$Id: new_attributes_include.php 2891 2012-05-18 18:54:35Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(new_attributes_functions); www.oscommerce.com
(c) 2003 nextcommerce (new_attributes_include.php,v 1.11 2003/08/21); www.nextcommerce.org
(c) 2006 XT-Commerce
Released under the GNU General Public License
--------------------------------------------------------------
Third Party contributions:
ca. Zeile 19
Released under the GNU General Public License
--------------------------------------------------------------*/
defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');
// include needed functions
// include needed functions
require_once(DIR_FS_INC .'xtc_get_tax_rate.inc.php');
require_once(DIR_FS_INC .'xtc_get_tax_class_id.inc.php');
require(DIR_FS_CATALOG.DIR_WS_CLASSES . 'xtcPrice.php');
$xtPrice = new xtcPrice(DEFAULT_CURRENCY,$_SESSION['customers_status']['customers_status_id']);
ca. Zeile 35
$option_order_by = 'products_options_id';
}
// EOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
?>
<!-- BOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION //-->
<script type="text/javascript"><!--
function go_option() {
if (document.option_order_by.selected.options[document.option_order_by.selected.selectedIndex].value != "none") {
location = "<?php echo xtc_href_link(FILENAME_NEW_ATTRIBUTES, 'option_page=' . ($_GET['option_page'] ? $_GET['option_page'] : 1)).'¤t_product_id='. $_POST['current_product_id']; ?>&option_order_by="+document.option_order_by.selected.options[document.option_order_by.selected.selectedIndex].value;
}
}
//--></script>
<!-- EOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION //-->
<tr>
<td class="pageHeading" colspan="3"><?php echo $pageTitle; ?></td>
</tr>
<!-- BOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION //-->
<tr><td class="main" colspan="3"><?php echo SORT_ORDER; ?>
<form name="option_order_by" action="<?php echo FILENAME_NEW_ATTRIBUTES ?>">
<select name="selected" onChange="go_option()">
<option value="products_options_id"<?php if ($option_order_by == 'products_options_id') { echo ' SELECTED'; } ?>>
<?php echo TEXT_OPTION_ID; ?></option>
<option value="products_options_name"<?php if ($option_order_by == 'products_options_name') { echo ' SELECTED'; } ?>>
<?php echo TEXT_OPTION_NAME; ?></option>
<!-- BOF - Tomcraft - 2009-11-11 - Added sortorder to products_options //-->
<option value="products_options_sortorder"<?php if ($option_order_by == 'products_options_sortorder') { echo ' SELECTED'; } ?>>
<?php echo TEXT_SORTORDER; ?></option>
<!-- EOF - Tomcraft - 2009-11-11 - Added sortorder to products_options //-->
</select>
</form>
<br>
<?php echo xtc_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5'); ?>
<!-- BOF - vr - 2010-02-16 - assign *all* option values to product, thx to web28 //-->
<!-- </tr></td> // -->
</td></tr>
<!-- EOF - vr - 2010-02-16 - assign *all* option values to product, thx to web28 //-->
<!-- EOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION //-->
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="SUBMIT_ATTRIBUTES" enctype="multipart/form-data"><input type="hidden" name="current_product_id" value="<?php echo $_POST['current_product_id']; ?>"><input type="hidden" name="action" value="change">
<form action="<?php echo FILENAME_NEW_ATTRIBUTES; ?>" method="post" name="SUBMIT_ATTRIBUTES" enctype="multipart/form-data"><input type="hidden" name="current_product_id" value="<?php echo $_POST['current_product_id']; ?>"><input type="hidden" name="action" value="change">
<?php
echo xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
//BOF - DokuMan - 2010-03-19 - Artikelattribute nach bearbeiten zurück zur Kategorie
//if ($cPath) echo '<input type="hidden" name="cPathID" value="' . $cPath . '">';
if ($_POST['cpath']) echo '<input type="hidden" name="cPathID" value="' . $_POST['cpath'] . '">';
//EOF - DokuMan - 2010-03-19 - Artikelattribute nach bearbeiten zurück zur Kategorie
require(DIR_WS_MODULES . 'new_attributes_functions.php');
//BOF - web28 - 2010-12-14 - NEW edit products attributes
echo '<input type="hidden" name="products_options_id" value="' . $products_options_id . '">';
echo '<input type="hidden" name="option_order_by" value="' . $option_order_by . '">';
$_POST['cpath'] = isset($_GET['cpath']) ? $_GET['cpath'] : $_POST['cpath'];
if ($_POST['cpath'] != '') {
$param ='cPath='. $_POST['cpath'] . '¤t_product_id='. $_POST['current_product_id'];
echo '<input type="hidden" name="cpath" value="' . $_POST['cpath'] . '">';
} else {
$param = '';
}
//EOF - web28 - 2010-12-14 - NEW edit products attributes
// Temp id for text input contribution.. I'll put them in a seperate array.
//$tempTextID = '1999043';
require(DIR_WS_MODULES . 'new_attributes_functions.php');
// Lets get all of the possible options
// BOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
$query = "SELECT * FROM ".TABLE_PRODUCTS_OPTIONS."
$query = "SELECT *
FROM ".TABLE_PRODUCTS_OPTIONS."
where products_options_id LIKE '%'
AND language_id = '" . $_SESSION['languages_id'] . "'
order by ". $option_order_by;
// EOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
ca. Zeile 98
while ($line = xtc_db_fetch_array($result)) {
$current_product_option_name = $line['products_options_name'];
$current_product_option_id = $line['products_options_id'];
// Print the Option Name
echo "<TR class=\"dataTableHeadingRow\">";
echo "<TD class=\"dataTableHeadingContent\"><strong>" . $current_product_option_name . "</strong></TD>";
echo "<TD class=\"dataTableHeadingContent\"><strong>".SORT_ORDER."</strong></TD>";
echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_MODEL."</strong></TD>";
echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_STOCK."</strong></TD>";
echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_WEIGHT."</strong></TD>";
echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_PREFIXWEIGHT."</strong></TD>";
echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_PRICE."</strong></TD>";
echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_PREFIXPRICE."</strong></TD>";
echo "</TR>";
echo '<tr class="dataTableHeadingRow">';
echo '<td class="dataTableHeadingContent"><strong>' . $current_product_option_name . '</strong></td>';
echo '<td class="dataTableHeadingContent"><strong>'.SORT_ORDER.'</strong></td>';
echo '<td class="dataTableHeadingContent"><strong>'.ATTR_MODEL.'</strong></td>';
echo '<td class="dataTableHeadingContent"><strong>'.ATTR_STOCK.'</strong></td>';
echo '<td colspan="2" class="dataTableHeadingContent"><strong>'.ATTR_WEIGHT.'</strong></td>';
//echo '<td class="dataTableHeadingContent"><strong>'.ATTR_PREFIXWEIGHT.'</strong></td>';
echo '<td colspan="2" class="dataTableHeadingContent"><strong>'.ATTR_PRICE.'</strong></td>';
//echo '<td class="dataTableHeadingContent"><strong>'.ATTR_PREFIXPRICE.'</strong></td>';
echo "</tr>";
// Find all of the Current Option's Available Values
// BOF - Tomcraft - 2009-11-11 - CHANGE DESC TO ASC
//$query2 = "SELECT * FROM ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." WHERE products_options_id = '" . $current_product_option_id . "' ORDER BY products_options_values_id DESC";
$query2 = "SELECT * FROM ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." WHERE products_options_id = '" . $current_product_option_id . "' ORDER BY products_options_values_id ASC";
// EOF - Tomcraft - 2009-11-11 - CHANGE DESC TO ASC
$query2 = "SELECT * FROM ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." WHERE products_options_id = '" . $current_product_option_id . "' ORDER BY products_options_values_id ASC"; //Tomcraft - 2009-11-11 - CHANGE DESC TO ASC
$result2 = xtc_db_query($query2);
$matches2 = xtc_db_num_rows($result2);
if ($matches2) {
ca. Zeile 136
$result3 = xtc_db_query($query3);
while($line = xtc_db_fetch_array($result3)) {
$current_value_name = $line['products_options_values_name'];
// Print the Current Value Name
echo "<TR class=\"" . $rowClass . "\">";
echo "<TD class=\"main\">";
echo "<input type=\"checkbox\" name=\"optionValues[]\" value=\"" . $current_value_id . "\"" . $CHECKED . "> " . $current_value_name . " ";
echo "</TD>";
echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_sortorder\" value=\"" . $sortorder . "\" size=\"4\"></TD>";
echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_model\" value=\"" . $attribute_value_model . "\" size=\"15\"></TD>";
echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_stock\" value=\"" . $attribute_value_stock . "\" size=\"4\"></TD>";
echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_weight\" value=\"" . $attribute_value_weight . "\" size=\"10\"></TD>";
echo "<TD class=\"main\" align=\"left\"><SELECT name=\"" . $current_value_id . "_weight_prefix\"><OPTION value=\"+\"" . $posCheck_weight . ">+<OPTION value=\"-\"" . $negCheck_weight . ">-</SELECT></TD>";
echo '<tr class="' . $rowClass . '">';
echo '<td class="main">';
echo '<input type="checkbox" name="optionValues[]" value="' . $current_value_id . '"' . $CHECKED . '> ' . $current_value_name . ' ';
echo '</td>';
echo '<td class="main" align="left"><input type="text" name="' . $current_value_id . '_sortorder" value="' . $sortorder . '" size="4"></td>';
echo '<td class="main" align="left"><input type="text" name="' . $current_value_id . '_model" value="' . $attribute_value_model . '" size="15"></td>';
echo '<td class="main" align="left"><input type="text" name="' . $current_value_id . '_stock" value="' . $attribute_value_stock . '" size="10"></td>';
echo '<td width="1%" class="main" align="left"><SELECT name="' . $current_value_id . '_weight_prefix"><OPTION value="+"' . $posCheck_weight . '>+<OPTION value="-"' . $negCheck_weight . '>-</SELECT></td>';
echo '<td width="10%" class="main" align="left"><input type="text" name="' . $current_value_id . '_weight" value="' . $attribute_value_weight . '" size="10"></td>';
// brutto Admin
if (PRICE_IS_BRUTTO=='true'){
$attribute_value_price_calculate = $xtPrice->xtcFormat(xtc_round($attribute_value_price*((100+(xtc_get_tax_rate(xtc_get_tax_class_id($_POST['current_product_id']))))/100),PRICE_PRECISION),false);
} else {
$attribute_value_price_calculate = xtc_round($attribute_value_price,PRICE_PRECISION);
}
echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_price\" value=\"" . $attribute_value_price_calculate . "\" size=\"10\">";
echo '<td width="1%" class="main" align="left"><SELECT name="' . $current_value_id . '_prefix"> <OPTION value="+"' . $posCheck . '>+<OPTION value="-"' . $negCheck . '>-</SELECT></td>';
echo '<td width="10%" class="main" align="left"><input type="text" name="' . $current_value_id . '_price" value="' . $attribute_value_price_calculate . '" size="10">';
// brutto Admin
if (PRICE_IS_BRUTTO=='true'){
echo TEXT_NETTO .'<strong>'.$xtPrice->xtcFormat(xtc_round($attribute_value_price,PRICE_PRECISION),true).'</strong> ';
}
echo "</TD>";
echo '</td>';
echo "<TD class=\"main\" align=\"left\"><SELECT name=\"" . $current_value_id . "_prefix\"> <OPTION value=\"+\"" . $posCheck . ">+<OPTION value=\"-\"" . $negCheck . ">-</SELECT></TD>";
echo "</TR>";
echo '</tr>';
// Download function start
if(strtoupper($current_product_option_name) == 'DOWNLOADS') {
echo "<tr>";
// echo "<td colspan=\"2\">File: <input type=\"file\" name=\"" . $current_value_id . "_download_file\"></td>";
echo "<td colspan=\"2\">".xtc_draw_pull_down_menu($current_value_id . '_download_file', xtc_getDownloads(), $attribute_value_download_filename, '')."</td>";
echo "<td class=\"main\"> ".DL_COUNT." <input type=\"text\" name=\"" . $current_value_id . "_download_count\" value=\"" . $attribute_value_download_count . "\"></td>";
echo "<td class=\"main\"> ".DL_EXPIRE." <input type=\"text\" name=\"" . $current_value_id . "_download_expire\" value=\"" . $attribute_value_download_expire . "\"></td>";
// echo '<td colspan="2">File: <input type="file" name="' . $current_value_id . "_download_file"></td>';
echo '<td colspan="2">'.xtc_draw_pull_down_menu($current_value_id . '_download_file', xtc_getDownloads(), $attribute_value_download_filename, '').'</td>';
echo '<td class="main"> '.DL_COUNT.' <input type="text" name="' . $current_value_id . '_download_count" value="' . $attribute_value_download_count . '"></td>';
echo '<td class="main"> '.DL_EXPIRE.' <input type="text" name="' . $current_value_id . '_download_expire" value="' . $attribute_value_download_expire . '"></td>';
echo "</tr>";
}
// Download function end
}
if ($i == $matches2 ) $i = '0';
}
} else {
echo "<TR>";
echo "<TD class=\"main\"><SMALL>No values under this option.</SMALL></TD>";
echo "</TR>";
echo "<tr>";
echo '<td class="main"><small>No values under this option.</small></td>';
echo "</tr>";
}
}
}
?>
<tr>
<td colspan="10" class="main"><br />
<?php
echo xtc_button(BUTTON_SAVE) . ' ';
// BOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
//echo xtc_button_link(BUTTON_CANCEL,'javascript:history.back()');
echo xtc_button_link(BUTTON_CANCEL,$_SERVER['PHP_SELF']);
// EOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
echo xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_NEW_ATTRIBUTES, $param));
?>
</td>
</tr>
</form>
admin/manufacturers.phpTop ca. Zeile 85
xtc_db_query("delete from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
if ($_POST['delete_products'] == 'on') {
$products_query = xtc_db_query("select products_id from " . TABLE_PRODUCTS . " where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
//BOC web28 - 2012-04-02 - BUGFIX remove products
require_once('includes/classes/categories.php');
$tmp_categories = new categories();
while ($products = xtc_db_fetch_array($products_query)) {
xtc_remove_product($products['products_id']);
//xtc_remove_product($products['products_id']);
$tmp_categories->remove_product($products['products_id']);
}
unset($tmp_categories);
//BOC web28 - 2012-04-02 - BUGFIX remove products
} else {
xtc_db_query("update " . TABLE_PRODUCTS . " set manufacturers_id = '' where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
}
admin/module_newsletter.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: module_newsletter.php 1142 2005-08-11 08:19:55Z matthias $
$Id: module_newsletter.php 2906 2012-05-24 12:15:42Z gtb-modified $
XT-Commerce - community made shopping
http://www.xt-commerce.com
ca. Zeile 14
Released under the GNU General Public License
--------------------------------------------------------------*/
// max email package -> should be in admin area!
define('NEWSLETTER_EXECUTE_LIMIT', '10'); // on each reload sending
require('includes/application_top.php');
require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'class.phpmailer.php');
require_once(DIR_FS_INC . 'xtc_php_mail.inc.php');
ca. Zeile 142
case 'delete':
xtc_db_query("DELETE FROM ".TABLE_MODULE_NEWSLETTER." WHERE newsletter_id='".(int)$_GET['ID']."'");
xtc_redirect(xtc_href_link(FILENAME_MODULE_NEWSLETTER));
break;
case 'send':
// max email package -> should be in admin area!
$package_size='30';
xtc_redirect(xtc_href_link(FILENAME_MODULE_NEWSLETTER,'send=0,'.$package_size.'&ID='.(int)$_GET['ID']));
xtc_redirect(xtc_href_link(FILENAME_MODULE_NEWSLETTER,'send=0&ID='.(int)$_GET['ID']));
}
// action for sending mails!
if (isset($_GET['send']) && is_numeric($_GET['send'])) {
if ($_GET['send']) {
$limits=explode(',',$_GET['send']);
$limit_low = $limits['0'];
$limit_up = $limits['1'];
//Animierte Gif-Datei und Hinweistext
$ajax_img = '<img src="images/loading.gif"/>' ;
$ajax = '<script language="javascript" type="text/javascript">setTimeout("document.newsletter_send.submit()",1000);</script>';
$limits=intval($_GET['send']);
$limit_query=xtc_db_query("SELECT count(*) as count
FROM module_newsletter_temp_".(int)$_GET['ID']."
");
FROM module_newsletter_temp_".(int)$_GET['ID']);
$limit_data=xtc_db_fetch_array($limit_query);
// select emailrange from db
$email_query=xtc_db_query("SELECT
customers_firstname,
$email_query=xtc_db_query("SELECT customers_firstname,
customers_lastname,
customers_email_address,
mail_key ,
id
FROM module_newsletter_temp_".(int)$_GET['ID']."
LIMIT ".$limit_low.",".$limit_up);
LIMIT ".$limits.",".NEWSLETTER_EXECUTE_LIMIT);
$email_data=array();
while ($email_query_data=xtc_db_fetch_array($email_query)) {
$email_data[]=array('id' => $email_query_data['id'],
'firstname'=>$email_query_data['customers_firstname'],
'lastname'=>$email_query_data['customers_lastname'],
'email'=>$email_query_data['customers_email_address'],
ca. Zeile 189
'email'=>$email_query_data['customers_email_address'],
'key'=>$email_query_data['mail_key']);
}
// ok lets send the mails in package of 30 mails, to prevent php timeout
$package_size='30';
$break='0';
if ($limit_data['count']<$limit_up) {
$limit_up=$limit_data['count'];
$break='1';
$break=0;
if ($limit_data['count']<$limits) {
$break=1;
unset($ajax);
}
$max_runtime=$limit_up-$limit_low;
$newsletters_query=xtc_db_query("SELECT
title,
$newsletters_query=xtc_db_query("SELECT title,
body,
bc,
cc
FROM ".TABLE_MODULE_NEWSLETTER."
WHERE newsletter_id='".(int)$_GET['ID']."'");
$newsletters_data=xtc_db_fetch_array($newsletters_query);
// if ($newsletters_data['cc']!='') {
// xtc_php_mail(EMAIL_SUPPORT_ADDRESS,
// EMAIL_SUPPORT_NAME,
// $newsletters_data['cc'],
// '' ,
// '',
// EMAIL_SUPPORT_REPLY_ADDRESS,
// EMAIL_SUPPORT_REPLY_ADDRESS_NAME,
// '',
// '',
// $newsletters_data['title'],
// $newsletters_data['body'],
// $newsletters_data['body']);
// }
for ($i=1;$i<=$max_runtime;$i++)
{
// mail
for ($i=1;$i<=NEWSLETTER_EXECUTE_LIMIT;$i++) {
if(!empty($email_data[$i-1])) {
$link1 = chr(13).chr(10).chr(13).chr(10).TEXT_NEWSLETTER_REMOVE.chr(13).chr(10).chr(13).chr(10).HTTP_CATALOG_SERVER.DIR_WS_CATALOG.FILENAME_CATALOG_NEWSLETTER.'?action=remove&email='.$email_data[$i-1]['email'].'&key='.$email_data[$i-1]['key'];
$link2 = $link2 = '<br /><br /><hr>'.TEXT_NEWSLETTER_REMOVE.'<br /><a href="'.HTTP_CATALOG_SERVER.DIR_WS_CATALOG.FILENAME_CATALOG_NEWSLETTER.'?action=remove&email='.$email_data[$i-1]['email'].'&key='.$email_data[$i-1]['key'].'">' . TEXT_REMOVE_LINK . '</a>';
xtc_php_mail(EMAIL_SUPPORT_ADDRESS,
EMAIL_SUPPORT_NAME,
$email_data[$i-1]['email'] ,
$email_data[$i-1]['lastname'] . ' ' . $email_data[$i-1]['firstname'] ,
ca. Zeile 241
'',
$newsletters_data['title'],
$newsletters_data['body'].$link2,
$newsletters_data['body'].$link1);
xtc_db_query("UPDATE module_newsletter_temp_".(int)$_GET['ID']." SET comment='send' WHERE id='".$email_data[$i-1]['id']."'");
}
if ($break=='1') {
// finished
}
if ($break==1) {
// finished
$limit1_query=xtc_db_query("SELECT count(*) as count
FROM module_newsletter_temp_".(int)$_GET['ID']."
WHERE comment='send'");
$limit1_data=xtc_db_fetch_array($limit1_query);
if ($limit1_data['count']-$limit_data['count']<=0)
{
if ($limit1_data['count']-$limit_data['count']<=0) {
xtc_db_query("UPDATE ".TABLE_MODULE_NEWSLETTER." SET status='1' WHERE newsletter_id='".(int)$_GET['ID']."'");
xtc_redirect(xtc_href_link(FILENAME_MODULE_NEWSLETTER));
} else {
echo '<b>'.$limit1_data['count'].'<b> emails send<br />';
echo '<b>'.$limit1_data['count']-$limit_data['count'].'<b> emails left';
}
} else {
$limit_low=$limit_up+1;
$limit_up=$limit_low+$package_size;
xtc_redirect(xtc_href_link(FILENAME_MODULE_NEWSLETTER,'send='.$limit_low.','.$limit_up.'&ID='.(int)$_GET['ID']));
}
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>">
ca. Zeile 280
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<?php if (USE_WYSIWYG=='true') {
<?php
if (USE_WYSIWYG=='true') {
$query=xtc_db_query("SELECT code FROM ". TABLE_LANGUAGES ." WHERE languages_id='".$_SESSION['languages_id']."'");
$data=xtc_db_fetch_array($query);
if ($_GET['action']!='') echo xtc_wysiwyg('newsletter',$data['code']);
} ?>
if ($_GET['action']!='')
echo xtc_wysiwyg('newsletter',$data['code']);
}
?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<?php
require(DIR_WS_INCLUDES . 'header.php');
echo '<form name="newsletter_send" action="'. xtc_href_link(FILENAME_MODULE_NEWSLETTER,'send='.($limits + NEWSLETTER_EXECUTE_LIMIT).'&ID='.(int)$_GET['ID']) .'" method="POST"></form>';
?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
</table>
</td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<td width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS.'heading_news.gif'); ?></td>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
</tr>
<tr>
<td class="main" valign="top">XTC Tools</td>
</tr>
</table></td>
</table>
</td>
</tr>
<?php
if ($_GET['send'])
{
?>
<tr><td>
Sending
</td></tr>
<?php
if ($_GET['send']) {
echo '<tr><td>Sending...</td></tr>';
}
?>
<tr>
<td><table width="100%" border="0">
<tr>
<td>
ca. Zeile 342
customers_status_name,
customers_status_id,
customers_status_image
FROM ".TABLE_CUSTOMERS_STATUS."
WHERE
language_id='".$_SESSION['languages_id']."'");
WHERE language_id='".$_SESSION['languages_id']."'");
$customer_group=array();
while ($customer_group_data=xtc_db_fetch_array($customer_group_query)) {
// get single users
$group_query=xtc_db_query("SELECT count(*) as count
FROM ".TABLE_NEWSLETTER_RECIPIENTS."
WHERE mail_status='1' and
customers_status='".$customer_group_data['customers_status_id']."'");
WHERE mail_status='1'
AND customers_status='".$customer_group_data['customers_status_id']."'");
$group_data=xtc_db_fetch_array($group_query);
$customer_group[]=array( 'ID'=>$customer_group_data['customers_status_id'],
'NAME'=>$customer_group_data['customers_status_name'],
'IMAGE'=>$customer_group_data['customers_status_image'],
'USERS'=>$group_data['count']);
ca. Zeile 359
$customer_group[]=array( 'ID'=>$customer_group_data['customers_status_id'],
'NAME'=>$customer_group_data['customers_status_name'],
'IMAGE'=>$customer_group_data['customers_status_image'],
'USERS'=>$group_data['count']);
}
?>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" width="150" ><?php echo TITLE_CUSTOMERS; ?></td>
<td class="dataTableHeadingContent" ><?php echo TITLE_STK; ?></td>
</tr>
ca. Zeile 384
</tr>
<?php
}
?>
</table></td>
<td width="30%" align="right" valign="top""><?php
</table>
</td>
<td width="30%" align="right" valign="top"">
<?php
echo '<a class="button" href="'.xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=new').'">'.BUTTON_NEW_NEWSLETTER.'</a>';
?></td>
?>
</td>
</tr>
</table>
<br />
<?php
ca. Zeile 414
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" width="30" ><?php echo TITLE_DATE; ?></td>
<td class="dataTableHeadingContent" width="80%" ><?php echo TITLE_NOT_SEND; ?></td>
<td class="dataTableHeadingContent" >.</td>
<td class="dataTableHeadingContent"><?php echo TITLE_ACTION; ?></td>
</tr>
<?php
for ($i=0,$n=sizeof($news_data); $i<$n; $i++) {
if ($news_data[$i]['id']!='') {
?>
<tr>
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #f1f1f1;" align="left"><?php echo $news_data[$i]['date']; ?></td>
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #f1f1f1;" valign="middle" align="left"><?php echo xtc_image(DIR_WS_CATALOG.'images/icons/arrow.gif'); ?><a href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'ID='.$news_data[$i]['id']); ?>"><b><?php echo $news_data[$i]['title']; ?></b></a></td>
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #f1f1f1;" align="left">
</td>
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #f1f1f1;" align="left"></td>
</tr>
<?php
if ($_GET['ID']!='' && $_GET['ID']==$news_data[$i]['id']) {
$total_query=xtc_db_query("SELECT
count(*) as count
ca. Zeile 445
<a class="button" href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=delete&ID='.$news_data[$i]['id']); ?>" onclick="return confirm('<?php echo CONFIRM_DELETE; ?>')"><?php echo BUTTON_DELETE.'</a><br />'; ?>
<a class="button" href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=edit&ID='.$news_data[$i]['id']); ?>"><?php echo BUTTON_EDIT.'</a>'; ?>
<br /><br /><div style="height: 1px; background: Black; margin: 3px 0;"></div>
<a class="button" href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=send&ID='.$news_data[$i]['id']); ?>"><?php echo BUTTON_SEND.'</a>'; ?>
</td>
<td colspan="2" class="dataTableContent" style="border-bottom: 1px solid; border-color: #999999; text-align: left;">
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #999999; text-align: left;">
<?php
// get data
$newsletters_query=xtc_db_query("SELECT
ca. Zeile 470
echo TEXT_TO.$newsletters_data['bc'].'<br />';
echo TEXT_CC.$newsletters_data['cc'].'<br /><br />'.TEXT_PREVIEW;
echo '<table style="border-color: #cccccc; border: 1px solid;" width="100%"><tr><td>'.$newsletters_data['body'].'</td></tr></table>';
?>
</td></tr>
</td>
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #999999; text-align: center; vertical-align:top;">
<?php
if (isset($ajax_img)) {
echo '<p>Bitte Warten, der Newsletter wird versendet. Dies kann eineige Zeit in Anspruch nehmen.</p><br/><br/>' . $ajax_img . '<br/><br/>';
} else {
echo ' ';
}
?>
</td>
</tr>
<?php
}
}
}
?>
</table>
<br /><br />
<?php
ca. Zeile 509
?>
<tr>
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #f1f1f1;" valign="middle" align="left"><?php echo $news_data[$i]['date'].' '; ?><b><?php echo $news_data[$i]['title']; ?></b></td>
<td class="dataTableContent" style="border-bottom: 1px solid; border-color: #f1f1f1;" align="left">
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<!--
<a href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=delete&ID='.$news_data[$i]['id']); ?>" onclick="return confirm('<?php echo CONFIRM_DELETE; ?>')">
<?php
echo xtc_image(DIR_WS_ICONS.'delete.gif','Delete','','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
?>
<a href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=edit&ID='.$news_data[$i]['id']); ?>">
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif','Edit','','').' '.TEXT_EDIT.'</a>'; ?>
-->
<a href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=edit&ID='.$news_data[$i]['id']); ?>">
<?php echo xtc_image(DIR_WS_ICONS.'icon_edit.gif', ICON_EDIT,'','').' '.TEXT_EDIT.'</a>'; ?>
<a href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER,'action=delete&ID='.$news_data[$i]['id']); ?>" onclick="return confirm('<?php echo CONFIRM_DELETE; ?>')">
<?php
echo xtc_image(DIR_WS_ICONS.'delete.gif', ICON_DELETE,'','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> ';
?>
<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<?php echo xtc_image(DIR_WS_ICONS.'delete.gif', ICON_DELETE,'','','style="cursor:pointer" onclick="return confirm(\''.DELETE_ENTRY.'\')"').' '.TEXT_DELETE.'</a> '; ?>
</td>
</tr>
<?php
}
ca. Zeile 536
</tr>
<?php
}
}
?>
</table>
<?php
break; // end default page
// end default page
break;
case 'edit':
$newsletters_query=xtc_db_query("SELECT title,body,cc,bc FROM ".TABLE_MODULE_NEWSLETTER." WHERE newsletter_id='".(int)$_GET['ID']."'");
ca. Zeile 562
?>
<br /><br />
<table class="main" width="100%" border="0">
</tr>
<tr>
<td width="10%"><?php echo TEXT_TITLE; ?></td>
<td width="90%"><?php echo xtc_draw_input_field('title',$newsletters_data['title'],'size=100'); ?></td>
</tr>
ca. Zeile 574
for ($i=0,$n=sizeof($customers_status);$i<$n; $i++) {
$group_query=xtc_db_query("SELECT count(*) as count
FROM ".TABLE_NEWSLETTER_RECIPIENTS."
WHERE mail_status='1' and
customers_status='".$customers_status[$i]['id']."'");
WHERE mail_status='1'
AND customers_status='".$customers_status[$i]['id']."'");
$group_data=xtc_db_fetch_array($group_query);
$group_query=xtc_db_query("SELECT count(*) as count
FROM ".TABLE_CUSTOMERS."
WHERE
customers_status='".$customers_status[$i]['id']."'");
WHERE customers_status='".$customers_status[$i]['id']."'");
$group_data_all=xtc_db_fetch_array($group_query);
$bc_array = explode(',', $newsletters_data['bc']);
echo xtc_draw_checkbox_field('status['.$i.']','yes', in_array($customers_status[$i]['id'], $bc_array)).' '.$customers_status[$i]['text'].' <i>(<b>'.$group_data['count'].'</b>'.TEXT_USERS.$group_data_all['count'].TEXT_CUSTOMERS.'<br />';
}
echo xtc_draw_checkbox_field('status_all', 'yes',in_array('all', $bc_array)).' <b>'.TEXT_NEWSLETTER_ONLY.'</b>';
echo xtc_draw_checkbox_field('status_all', 'yes',in_array('all', $bc_array)).' <b>'.TEXT_NEWSLETTER_ONLY.'</b>';
?></td>
</tr>
<tr>
<td width="10%"><?php echo TEXT_CC; ?></td>
<td width="90%"><?php
echo xtc_draw_input_field('cc',$newsletters_data['cc'],'size=100'); ?></td>
</tr>
<td width="90%"><?php echo xtc_draw_input_field('cc',$newsletters_data['cc'],'size=100'); ?></td>
</tr>
<tr>
<td width="10%" valign="top"><?php echo TEXT_BODY; ?></td>
<td width="90%"><?php
echo xtc_draw_textarea_field('newsletter_body', 'soft', '150', '45', stripslashes($newsletters_data['body']));
?></td>
<td width="90%"><?php echo xtc_draw_textarea_field('newsletter_body', 'soft', '150', '45', stripslashes($newsletters_data['body'])); ?></td>
</tr>
</table>
<a class="button" onclick="this.blur();" href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER); ?>"><?php echo BUTTON_BACK; ?></a>
<right><?php echo '<input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_SAVE . '"/>'; ?></right>
</form>
<?php
// end switch
break;
} // end switch
}
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
ca. Zeile 629
<!-- body_text_eof //-->
</tr>
</table>
<!-- body_eof //-->
<?php if (isset($ajax)) echo $ajax; ?>
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
admin/new_attributes.phpTop ca. Zeile 25
require(DIR_WS_MODULES.'new_attributes_config.php');
require(DIR_FS_INC .'xtc_findTitle.inc.php');
require_once(DIR_FS_INC . 'xtc_format_filesize.inc.php');
//BOF - DokuMan - 2010-03-20 - Artikelattribute nach bearbeiten zurück zur Kategorie
/*
if ( isset($cPathID) && $_POST['action'] == 'change') {
//nach Speichern zur Kontrolle neu laden
if (isset($_POST['products_options_id']) && $_POST['action'] == 'change') {
include(DIR_WS_MODULES.'new_attributes_change.php');
xtc_redirect( './' . FILENAME_CATEGORIES . '?cPath=' . $cPathID . '&pID=' . $_POST['current_product_id'] );
xtc_redirect(xtc_href_link(FILENAME_NEW_ATTRIBUTES, 'cpath='. $_POST['cpath'].'¤t_product_id='. $_POST['current_product_id'].'&option_order_by='.$_POST['option_order_by'].'&products_options_id=' .$_POST['products_options_id']));
}
*/
if ( isset($_POST['cPathID']) && $_POST['action'] == 'change') {
include(DIR_WS_MODULES.'new_attributes_change.php');
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $_POST['cPathID'] . '&pID=' . $_POST['current_product_id']));
//nach Abbrechen zurück zur Kategorie
if (isset($_GET['cPath'])) {
include(DIR_WS_MODULES.'new_attributes_change.php');
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['current_product_id']));
}
//EOF - DokuMan - 2010-03-20 - Artikelattribute nach bearbeiten zurück zur Kategorie
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
ca. Zeile 59
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
</table>
</td>
<!-- body_text //-->
<td class="boxCenter" width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<td class="boxCenter" width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
// BOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
if ($_GET['option_order_by'] && !isset($_POST['action'])) {
ca. Zeile 103
// BOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
}
// EOF - Tomcraft - 2009-11-11 - NEW SORT SELECTION
?>
</table></td>
</table>
</td>
</tr>
<!-- BOF - Tomcraft - 2009-06-10 - added missing table close tag -->
</table>
<!-- EOF - Tomcraft - 2009-06-10 - added missing table close tag -->
admin/orders.phpTop ca. Zeile 32
require_once (DIR_FS_INC.'changedataout.inc.php');
require_once (DIR_FS_INC.'xtc_validate_vatid_status.inc.php');
require_once (DIR_FS_INC.'xtc_get_attributes_model.inc.php');
//New function
function get_payment_name($payment_method) {
if (file_exists(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/'.$payment_method.'.php')){
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/'.$payment_method.'.php');
$payment_method = constant(strtoupper('MODULE_PAYMENT_'.$payment_method.'_TEXT_TITLE'));
}
return $payment_method;
}
// initiate template engine for mail
$smarty = new Smarty;
require (DIR_WS_CLASSES.'currencies.php');
$currencies = new currencies();
$action = (isset($_GET['action']) ? xtc_db_prepare_input($_GET['action']) : '');
$oID = isset($_GET['oID']) ? (int) $_GET['oID'] : '';
if ((($action == 'edit') || ($action == 'update_order')) && ($_GET['oID'])) {
$oID = xtc_db_prepare_input($_GET['oID']);
$orders_query = xtc_db_query("select orders_id from ".TABLE_ORDERS." where orders_id = '".xtc_db_input($oID)."'");
if (($action == 'edit' || $action == 'update_order') && $oID) {
$orders_query = xtc_db_query("-- /admin/orders.php
SELECT orders_id
FROM ".TABLE_ORDERS."
WHERE orders_id = '".xtc_db_input($oID)."'");
$order_exists = true;
if (!xtc_db_num_rows($orders_query)) {
$order_exists = false;
$messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
}
}
//select default fields
$order_select_fields = 'o.orders_id,
o.customers_id,
o.customers_name,
o.payment_method,
o.last_modified,
o.date_purchased,
o.orders_status,
o.currency,
o.currency_value,
o.afterbuy_success,
o.afterbuy_id,
o.language,
o.delivery_country,
o.delivery_country_iso_code_2,
ot.text as order_total
';
//BOF - web28 - 2010-04-10 added for ADMIN SEARCH BAR
if ($action == 'search' && $_GET['oID']) {
$oID = xtc_db_prepare_input($_GET['oID']);
$orders_query_raw = "select o.orders_id, o.afterbuy_success, o.afterbuy_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from ".TABLE_ORDERS." o left join ".TABLE_ORDERS_TOTAL." ot on (o.orders_id = ot.orders_id), ".TABLE_ORDERS_STATUS." s where o.orders_status = s.orders_status_id and s.language_id = '".$_SESSION['languages_id']."' and o.orders_id LIKE '%".xtc_db_input($oID)."%' and ot.class = 'ot_total' order by o.orders_id DESC";
if ($action == 'search' && $oID) {
$orders_query_raw = "-- /admin/orders.php
SELECT ".$order_select_fields.",
s.orders_status_name
FROM ".TABLE_ORDERS." o
LEFT JOIN (".TABLE_ORDERS_TOTAL." ot, ".TABLE_ORDERS_STATUS." s)
ON (o.orders_id = ot.orders_id AND o.orders_status = s.orders_status_id)
WHERE s.language_id = '".(int)$_SESSION['languages_id']."'
AND o.orders_id LIKE '%".$oID."%'
AND ot.class = 'ot_total'
ORDER BY o.orders_id DESC";
$orders_query = xtc_db_query($orders_query_raw);
$order_exists = false;
if (xtc_db_num_rows($orders_query) == 1) {
$order_exists = true;
ca. Zeile 69
}
//EOF - web28 - 2010-04-10 added for ADMIN SEARCH BAR
require (DIR_WS_CLASSES.'order.php');
if ((($action == 'edit') || ($action == 'update_order')) && ($order_exists)) {
if (($action == 'edit' || $action == 'update_order') && $order_exists) {
$order = new order($oID);
}
//BOF - DokuMan - 2010-10-31 - Trying to get property of non-object $order->info
if (isset($order) && is_object($order)) {
$lang_query = xtc_db_query("select languages_id from " . TABLE_LANGUAGES . " where directory = '" . $order->info['language'] . "'");
$lang = xtc_db_fetch_array($lang_query);
$lang=$lang['languages_id'];
$lang_query = xtc_db_query("-- /admin/orders.php
SELECT languages_id, code, image
FROM " . TABLE_LANGUAGES . "
WHERE directory = '" . $order->info['language'] . "'");
$lang_array = xtc_db_fetch_array($lang_query);
$lang = $lang_array['languages_id'];
$lang_code = $lang_array['code'];
}
//EOF - DokuMan - 2010-10-31 - Trying to get property of non-object $order->info
if (trim($order->info['language']) == '') $order->info['language'] = $_SESSION['languages'];
if (!isset($lang)) $lang=$_SESSION['languages_id'];
if (!isset($lang_code)) $lang_code = $_SESSION['language_code'];
$orders_statuses = array ();
$orders_status_array = array ();
$orders_status_query = xtc_db_query("select orders_status_id, orders_status_name from ".TABLE_ORDERS_STATUS." where language_id = '".$lang."'");
$orders_status_query = xtc_db_query("-- /admin/orders.php
SELECT orders_status_id,
orders_status_name
FROM ".TABLE_ORDERS_STATUS."
WHERE language_id = '".$lang."'");
while ($orders_status = xtc_db_fetch_array($orders_status_query)) {
$orders_statuses[] = array ('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']);
$orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
}
ca. Zeile 88
while ($orders_status = xtc_db_fetch_array($orders_status_query)) {
$orders_statuses[] = array ('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']);
$orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
}
switch ($action) {
//BOF - web28 - 2010-03-20 - Send Order by Admin
case 'send':
// set dirs manual
$smarty->template_dir = DIR_FS_CATALOG.'templates';
$smarty->compile_dir = DIR_FS_CATALOG.'templates_c';
$smarty->config_dir = DIR_FS_CATALOG.'lang';
$send_by_admin = true;
$insert_id = xtc_db_prepare_input($_GET['oID']);
$insert_id = $oID;
define('SEND_BY_ADMIN_PATH', DIR_FS_CATALOG);
require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'xtcPrice.php');
require_once(DIR_FS_INC.'xtc_href_link_from_admin.inc.php'); //-web28 - 2011-01-20 - LINKFIX
include (DIR_FS_CATALOG .'send_order.php');
ca. Zeile 102
define('SEND_BY_ADMIN_PATH', DIR_FS_CATALOG);
require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'xtcPrice.php');
require_once(DIR_FS_INC.'xtc_href_link_from_admin.inc.php'); //-web28 - 2011-01-20 - LINKFIX
include (DIR_FS_CATALOG .'send_order.php');
break;
//EOF - web28 - 2010-03-20 - Send Order by Admin
case 'update_order' :
$oID = xtc_db_prepare_input($_GET['oID']);
$status = xtc_db_prepare_input($_POST['status']);
$status = (int) $_POST['status'];
$comments = xtc_db_prepare_input($_POST['comments']);
// $order = new order($oID);
$order_updated = false;
$check_status_query = xtc_db_query("select customers_name, customers_email_address, orders_status, date_purchased from ".TABLE_ORDERS." where orders_id = '".xtc_db_input($oID)."'");
$check_status_query = xtc_db_query("-- /admin/orders.php
SELECT customers_name,
customers_email_address,
orders_status,
date_purchased
FROM ".TABLE_ORDERS."
WHERE orders_id = ".$oID);
$check_status = xtc_db_fetch_array($check_status_query);
if ($check_status['orders_status'] != $status || $comments != '') {
xtc_db_query("update ".TABLE_ORDERS." set orders_status = '".xtc_db_input($status)."', last_modified = now() where orders_id = '".xtc_db_input($oID)."'");
$customer_notified = '0';
xtc_db_query("-- /admin/orders.php
UPDATE ".TABLE_ORDERS."
SET orders_status = ".$status.",
last_modified = now()
WHERE orders_id = ".$oID);
$customer_notified = 0;
if ($_POST['notify'] == 'on') {
$notify_comments = '';
if ($_POST['notify_comments'] == 'on') {
//$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments)."\n\n";
$notify_comments = $comments;
$notify_comments = ($_POST['notify_comments'] == 'on') ? $comments : '';
$orders_query = xtc_db_query("-- /admin/orders.php
SELECT customers_id
FROM ".TABLE_ORDERS."
WHERE orders_id = ".$oID);
$order_cid = xtc_db_fetch_array($orders_query);
$gender_query = xtc_db_query("-- /admin/orders.php
SELECT customers_gender,
customers_lastname
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = ".$order_cid['customers_id']);
$gender = xtc_db_fetch_array($gender_query);
if ($gender['customers_gender']=='f') {
$smarty->assign('GENDER', FEMALE);
} elseif ($gender['customers_gender']=='m') {
$smarty->assign('GENDER', MALE);
} else {
$notify_comments = '';
$smarty->assign('GENDER', '');
}
$smarty->assign('LASTNAME',$gender['customers_lastname']);
// assign language to template for caching
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('language', $order->info['language']);
$smarty->caching = false;
// set dirs manual
$smarty->template_dir = DIR_FS_CATALOG.'templates';
$smarty->compile_dir = DIR_FS_CATALOG.'templates_c';
$smarty->config_dir = DIR_FS_CATALOG.'lang';
ca. Zeile 134
// set dirs manual
$smarty->template_dir = DIR_FS_CATALOG.'templates';
$smarty->compile_dir = DIR_FS_CATALOG.'templates_c';
$smarty->config_dir = DIR_FS_CATALOG.'lang';
$smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
$smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');
$smarty->assign('NAME', $check_status['customers_name']);
$smarty->assign('ORDER_NR', $oID);
$smarty->assign('ORDER_NR', $order->info['order_id']);
$smarty->assign('ORDER_ID', $oID);
$smarty->assign('ORDER_LINK', xtc_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id='.$oID, 'SSL'));
$smarty->assign('ORDER_DATE', xtc_date_long($check_status['date_purchased']));
$smarty->assign('NOTIFY_COMMENTS', nl2br($notify_comments)); // Tomcraft - 2009-10-10 - Fixed wordwrap in notify_comments
$smarty->assign('NOTIFY_COMMENTS', nl2br($notify_comments));
$smarty->assign('ORDER_STATUS', $orders_status_array[$status]);
$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/admin/mail/'.$order->info['language'].'/change_order_mail.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/admin/mail/'.$order->info['language'].'/change_order_mail.txt');
xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $check_status['customers_email_address'], $check_status['customers_name'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', EMAIL_BILLING_SUBJECT, $html_mail, $txt_mail);
$customer_notified = '1';
}
xtc_db_query("insert into ".TABLE_ORDERS_STATUS_HISTORY." (orders_id, orders_status_id, date_added, customer_notified, comments) values ('".xtc_db_input($oID)."', '".xtc_db_input($status)."', now(), '".$customer_notified."', '".xtc_db_input($comments)."')");
$order_subject_search = array('{$nr}', '{$date}', '{$lastname}', '{$firstname}');
$order_subject_replace = array($oID, strftime(DATE_FORMAT_LONG), $order->customer['lastname'], $order->customer['firstname']);
$order_subject = str_replace($order_subject_search, $order_subject_replace, EMAIL_BILLING_SUBJECT);
xtc_php_mail(EMAIL_BILLING_ADDRESS,
EMAIL_BILLING_NAME,
$check_status['customers_email_address'],
$check_status['customers_name'],
'',
EMAIL_BILLING_REPLY_ADDRESS,
EMAIL_BILLING_REPLY_ADDRESS_NAME,
'',
'',
$order_subject,
$html_mail,
$txt_mail
);
$customer_notified = 1;
}
xtc_db_query("-- /admin/orders.php
INSERT INTO ".TABLE_ORDERS_STATUS_HISTORY."
(orders_id, orders_status_id, date_added, customer_notified, comments)
VALUES (".$oID.", ".$status.", now(), ".$customer_notified.", '".xtc_db_input($comments)."')");
$order_updated = true;
}
if ($order_updated) {
$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
} else {
$messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
ca. Zeile 164
$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
} else {
$messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
}
xtc_redirect(xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('action')).'action=edit'));
break;
case 'deleteconfirm' :
$oID = xtc_db_prepare_input($_GET['oID']);
case 'resendordermail':
break;
case 'deleteconfirm' :
xtc_remove_order($oID, xtc_db_prepare_input($_POST['restock']));
xtc_redirect(xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action'))));
break;
// BMC Delete CC info Start
// Remove CVV Number
ca. Zeile 177
break;
// BMC Delete CC info Start
// Remove CVV Number
case 'deleteccinfo' :
$oID = xtc_db_prepare_input($_GET['oID']);
xtc_db_query("update ".TABLE_ORDERS." set cc_cvv = null where orders_id = '".xtc_db_input($oID)."'");
xtc_db_query("update ".TABLE_ORDERS." set cc_number = '0000000000000000' where orders_id = '".xtc_db_input($oID)."'");
xtc_db_query("update ".TABLE_ORDERS." set cc_expires = null where orders_id = '".xtc_db_input($oID)."'");
xtc_db_query("update ".TABLE_ORDERS." set cc_start = null where orders_id = '".xtc_db_input($oID)."'");
xtc_db_query("update ".TABLE_ORDERS." set cc_issue = null where orders_id = '".xtc_db_input($oID)."'");
xtc_db_query("UPDATE ".TABLE_ORDERS." SET cc_cvv = null WHERE orders_id = ".$oID);
xtc_db_query("UPDATE ".TABLE_ORDERS." SET cc_number = '0000000000000000' WHERE orders_id = ".$oID);
xtc_db_query("UPDATE ".TABLE_ORDERS." SET cc_expires = null WHERE orders_id = ".$oID);
xtc_db_query("UPDATE ".TABLE_ORDERS." SET cc_start = null WHERE orders_id = ".$oID);
xtc_db_query("UPDATE ".TABLE_ORDERS." SET cc_issue = null WHERE orders_id = ".$oID);
xtc_redirect(xtc_href_link(FILENAME_ORDERS, 'oID='.$_GET['oID'].'&action=edit'));
xtc_redirect(xtc_href_link(FILENAME_ORDERS, 'oID='.$oID.'&action=edit'));
break;
case 'afterbuy_send' :
$oID = xtc_db_prepare_input($_GET['oID']);
require_once (DIR_FS_CATALOG.'includes/classes/afterbuy.php');
$aBUY = new xtc_afterbuy_functions($oID);
if ($aBUY->order_send())
if ($aBUY->order_send()) {
$aBUY->process_order();
}
break;
// BMC Delete CC Info End
}
?>
ca. Zeile 234
</td>
<!-- body_text //-->
<td class="boxCenter" width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
// ACTION EDIT - START
if (($action == 'edit') && ($order_exists)) {
// $order = new order($oID);
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS.'heading_customers.gif'); ?></td>
<td class="pageHeading"><?php echo HEADING_TITLE . '<span style="font-size:13px"> Nr.: ' . $oID . ' - ' . $order->info['date_purchased'] ; ?></span></td>
<td class="pageHeading"><?php echo HEADING_TITLE . '<span style="font-size:13px"> - '.TABLE_HEADING_PRODUCTS_MODEL.': ' . $oID . ' - ' . $order->info['date_purchased'] ; ?></span></td>
</tr>
<tr>
<td class="main" valign="top"><?php echo TABLE_HEADING_CUSTOMERS ?></td>
</tr>
</table>
<?php echo '<a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('action'))) . '">' . BUTTON_BACK . '</a>'; ?>
<!-- Bestellbearbeitung Anfang -->
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS_EDIT, 'oID='.$_GET['oID'].'&cID=' . $order->customer['ID']);?>"><?php echo BUTTON_EDIT ?></a>
<!-- Bestellbearbeitung Ende -->
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('action')));?>"><?php echo BUTTON_BACK; ?></a>
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS_EDIT, 'oID='.$oID.'&cID=' . $order->customer['ID']);?>"><?php echo BUTTON_EDIT ?></a>
</td>
</tr>
<?php //BOF web28 2010-12-09 new table handling ?>
</table>
ca. Zeile 283
<tr>
<td class="main" valign="top"><b><?php echo CUSTOMERS_MEMO; ?></b></td>
<?php
// memoquery
$memo_query = xtc_db_query("SELECT count(*) as count FROM ".TABLE_CUSTOMERS_MEMO." where customers_id='".$order->customer['ID']."'");
$memo_query = xtc_db_query("-- /admin/orders.php
SELECT count(*) AS count
FROM ".TABLE_CUSTOMERS_MEMO."
WHERE customers_id=".$order->customer['ID']);
$memo_count = xtc_db_fetch_array($memo_query);
?>
<td class="main"><b><?php echo $memo_count['count'].'</b>'; ?> <a style="cursor:pointer; font-size: 11px;" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_POPUP_MEMO,'ID='.$order->customer['ID']); ?>', 'popup', 'scrollbars=yes, width=500, height=500')">(<?php echo DISPLAY_MEMOS; ?>)</a></td>
</tr>
ca. Zeile 306
<td class="main" bgcolor="#FFCC33"><b><?php echo $order->customer['cIP']; ?></b></td>
</tr>
</table>
</td>
<td valign="top" class="main" style="border-right: 1px solid #a3a3a3;">
<?php
if ($order->delivery['name'] != $order->customer['name'] ||
$order->delivery['postcode'] != $order->customer['postcode'] ||
$order->delivery['city'] != $order->customer['city'] ||
$order->delivery['street_address'] != $order->customer['street_address']) {
$address_bgcolor = ' bgcolor="#FFCC33"';
}
?>
<td valign="top" class="main" style="border-right: 1px solid #a3a3a3;"<?php if (isset($address_bgcolor)) echo $address_bgcolor; ?>>
<b><?php echo ENTRY_SHIPPING_ADDRESS; ?></b><br />
<?php echo xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?>
</td>
<td valign="top" class="main">
ca. Zeile 325
<td>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><b><?php echo ENTRY_LANGUAGE; ?></b></td>
<td class="main"><?php echo $order->info['language']; ?></td>
<td class="main"><?php echo $lang_img = xtc_image(DIR_WS_LANGUAGES . $order->info['language'].'/admin/images/'.$lang_array['image'], $order->info['language']) .' '. $order->info['language']; ?></td>
</tr>
<tr>
<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
<!-- BOF web28 - 2011-06-07 - Zahlungweise anzeigen -->
<!--td class="main"><?php //echo $order->info['payment_method']; ?></td-->
<?php
if (file_exists(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php')){
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
$payment_method=constant(strtoupper('MODULE_PAYMENT_'.$order->info['payment_method'].'_TEXT_TITLE'));
}
?>
<td class="main"><?php echo $payment_method . ' ('.$order->info['payment_method'].')'; ?></td>
<!-- EOF web28 - 2010-06-07 - Zahlungweise anzeigen -->
<td class="main"><?php echo get_payment_name($order->info['payment_method']) . ' ('.$order->info['payment_method'].')'; ?></td>
</tr>
<?php
if ((($order->info['cc_type']) || ($order->info['cc_owner']) || ($order->info['cc_number']))) {
// CC - START
if ($order->info['cc_type'] || $order->info['cc_owner'] || $order->info['cc_number']) {
?>
<tr>
<td colspan="2"><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
ca. Zeile 378
<td class="main"><?php echo ENTRY_CREDIT_CARD_EXPIRES; ?></td>
<td class="main"><?php echo $order->info['cc_expires']; ?></td>
</tr>
<?php
// CC - END
}
// BOF - Tomcraft - 2009-11-03 - commented out the old sofortueberweisung.de payment module
/*
// Start sofortüberweisung.de
if (MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_STATUS == 'True' && $order->info['payment_method']=='pn_sofortueberweisung') {
$sql = "SELECT * FROM payment_sofortueberweisung WHERE orders_id='$oID'";
$sofort_query = xtc_db_query($sql);
if ($sofort = xtc_db_fetch_array($sofort_query)) {
?>
<tr>
<td class="main" valign="top"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main" valign="top">Transcaction-ID:</td>
<td class="main" valign="top"><?php echo $sofort['transaction']; ?></td>
</tr>
<tr>
<td class="main" valign="top">Betrag:</td>
<td class="main" valign="top"><?php echo number_format($sofort['amount'], 2) . ' ' . $sofort['currency_id']; ?></td>
</tr>
<tr>
<td class="main" valign="top">Verwendungszweck 1:</td>
<td class="main" valign="top"><?php echo $sofort['reason_1'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Verwendungszweck 2:</td>
<td class="main" valign="top"><?php echo $sofort['reason_2'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Sicherheits-Kriterien erfüllt:</td>
<td class="main" valign="top"><?php echo ($sofort['security_criteria'] == 1 ? 'Ja' : 'Nein') ; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2" class="main" valign="top"><b>Absender der Überweisung:</b></td>
</tr>
<tr>
<td class="main" valign="top">Inhaber:</td>
<td class="main"><?php echo $sofort['sender_holder'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Konto:</td>
<td class="main"><?php echo $sofort['sender_account_number'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">BLZ:</td>
<td class="main"><?php echo $sofort['sender_bank_code'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Bank:</td>
<td class="main"><?php echo $sofort['sender_bank_name'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">BIC:</td>
<td class="main"><?php echo $sofort['sender_bank_bic'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">IBAN:</td>
<td class="main"><?php echo $sofort['sender_iban'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Land:</td>
<td class="main"><?php echo $sofort['sender_country_id'] ; ?></td>
</tr>
</table></td>
<td> </td>
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2" class="main" valign="top"><b>Empfänger der Überweisung:</b></td>
</tr>
<tr>
<td class="main" valign="top">Inhaber:</td>
<td class="main"><?php echo $sofort['recipient_holder'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Konto:</td>
<td class="main"><?php echo $sofort['recipient_account_number'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">BLZ:</td>
<td class="main"><?php echo $sofort['recipient_bank_code'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Bank:</td>
<td class="main"><?php echo $sofort['recipient_bank_name'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">BIC:</td>
<td class="main"><?php echo $sofort['recipient_bank_bic'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">IBAN:</td>
<td class="main"><?php echo $sofort['recipient_iban'] ; ?></td>
</tr>
<tr>
<td class="main" valign="top">Land:</td>
<td class="main"><?php echo $sofort['recipient_country_id'] ; ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
}
}
// End sofortüberweisung.de
*/
// EOF - Tomcraft - 2009-11-03 - commented out the old sofortueberweisung.de payment module
// begin modification for banktransfer
$banktransfer_query = xtc_db_query("select banktransfer_prz, banktransfer_status, banktransfer_owner, banktransfer_number, banktransfer_bankname, banktransfer_blz, banktransfer_fax from ".TABLE_BANKTRANSFER." where orders_id = '".xtc_db_input($_GET['oID'])."'");
// Banktransfer - START
$banktransfer_query = xtc_db_query("-- /admin/orders.php
SELECT banktransfer_prz,
banktransfer_status,
banktransfer_owner,
banktransfer_number,
banktransfer_bankname,
banktransfer_blz,
banktransfer_fax
FROM ".TABLE_BANKTRANSFER."
WHERE orders_id = ".$oID);
$banktransfer = xtc_db_fetch_array($banktransfer_query);
if (($banktransfer['banktransfer_bankname']) || ($banktransfer['banktransfer_blz']) || ($banktransfer['banktransfer_number'])) {
if ($banktransfer['banktransfer_bankname'] || $banktransfer['banktransfer_blz'] || $banktransfer['banktransfer_number']) {
?>
<tr>
<td colspan="2"><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
ca. Zeile 518
<tr>
<td class="main"><?php echo TEXT_BANK_OWNER; ?></td>
<td class="main"><?php echo $banktransfer['banktransfer_owner']; ?></td>
</tr>
<?php
if ($banktransfer['banktransfer_status'] == 0) {
?>
<?php if ($banktransfer['banktransfer_status'] == 0) { ?>
<tr>
<td class="main"><?php echo TEXT_BANK_STATUS; ?></td>
<td class="main"><?php echo "OK"; ?></td>
</tr>
<?php
} else {
?>
<?php } else { ?>
<tr>
<td class="main"><?php echo TEXT_BANK_STATUS; ?></td>
<td class="main"><?php echo $banktransfer['banktransfer_status']; ?></td>
</tr>
<?php
switch ($banktransfer['banktransfer_status']) {
case 1 :
$error_val = TEXT_BANK_ERROR_1;
break;
case 2 :
$error_val = TEXT_BANK_ERROR_2;
break;
case 3 :
$error_val = TEXT_BANK_ERROR_3;
break;
case 4 :
$error_val = TEXT_BANK_ERROR_4;
break;
case 5 :
$error_val = TEXT_BANK_ERROR_5;
break;
case 8 :
$error_val = TEXT_BANK_ERROR_8;
break;
case 9 :
$error_val = TEXT_BANK_ERROR_9;
break;
}
$bt_status = (int) $banktransfer['banktransfer_status'];
$error_val = defined('TEXT_BANK_ERROR_'.$bt_status) ? constant('TEXT_BANK_ERROR_'.$bt_status) : '';
?>
<tr>
<td class="main"><?php echo TEXT_BANK_ERRORCODE; ?></td>
<td class="main"><?php echo $error_val; ?></td>
ca. Zeile 568
<tr>
<td class="main"><?php echo TEXT_BANK_PRZ; ?></td>
<td class="main"><?php echo $banktransfer['banktransfer_prz']; ?></td>
</tr>
<?php
}
<?php }
}
if ($banktransfer['banktransfer_fax']) {
?>
<tr>
ca. Zeile 579
<td class="main"><?php echo TEXT_BANK_FAX; ?></td>
<td class="main"><?php echo $banktransfer['banktransfer_fax']; ?></td>
</tr>
<?php
}
// end modification for banktransfer
// Banktransfer - END
// Moneybookers
if ($order->info['payment_method'] == 'amoneybookers') {
if (file_exists(DIR_FS_CATALOG.DIR_WS_MODULES.'payment/'.$order->info['payment_method'].'.php')) {
include(DIR_FS_CATALOG.DIR_WS_MODULES.'payment/'.$order->info['payment_method'].'.php');
include(DIR_FS_CATALOG.'lang/'.$order->info['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
$class = $order->info['payment_method'];
$payment = new $class();
$payment->admin_order($_GET['oID']);
$payment->admin_order($oID);
}
}
?>
</table>
ca. Zeile 605
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>
<?php
if ($order->products[0]['allow_tax'] == 1) {
?>
<?php if ($order->products[0]['allow_tax'] == 1) { ?>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>
<?php
}
?>
<td class="dataTableHeadingContent" align="right"><?php
echo TABLE_HEADING_TOTAL_INCLUDING_TAX;
if (isset($order->products[$i]['allow_tax']) && $order->products[$i]['allow_tax'] == 1) {
echo ' (excl.)';
}
?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
<?php } else { ?>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>
<?php } ?>
</tr>
<?php
for ($i = 0, $n = sizeof($order->products); $i < $n; $i ++) {
echo ' <tr class="dataTableRow">'."\n".' <td class="dataTableContent" valign="top" align="right">'.$order->products[$i]['qty'].' x </td>'."\n".' <td class="dataTableContent" valign="top">'.$order->products[$i]['name'];
echo ' <tr class="dataTableRow">'.PHP_EOL;
echo ' <td class="dataTableContent" valign="top" align="right">'.$order->products[$i]['qty'].' x </td>'.PHP_EOL;
echo ' <td class="dataTableContent" valign="top">'.PHP_EOL;
echo ' <a href="'.HTTP_CATALOG_SERVER.DIR_WS_CATALOG.'product_info.php?products_id='.$order->products[$i]['id'].'" target="_blank">'.$order->products[$i]['name'].'</a>';
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j ++) {
//BOF -web28- 2010-03-21 - format correction
//echo '<br /><nobr><small> <i> - '.$order->products[$i]['attributes'][$j]['option'].': '.$order->products[$i]['attributes'][$j]['value'].': ';
echo '<br /><nobr><i> - '.$order->products[$i]['attributes'][$j]['option'].': '.$order->products[$i]['attributes'][$j]['value'].'</i></nobr> ';
}
//echo '</i></small></nobr>';
//EOF -web28- 2010-03-21 - format correction
echo '<br /><nobr><i> - '.$order->products[$i]['attributes'][$j]['option'].': '.$order->products[$i]['attributes'][$j]['value'].'</i></nobr> '; //web28- 2010-03-21 - format correction
}
echo ' </td>'."\n".' <td class="dataTableContent" valign="top">';
if ($order->products[$i]['model'] != '') {
echo $order->products[$i]['model'];
} else {
echo '<br />';
}
echo ' </td>'.PHP_EOL;
echo ' <td class="dataTableContent" valign="top">';
echo ($order->products[$i]['model'] != '') ? $order->products[$i]['model'] : '<br />';
// attribute models
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j ++) {
$model = xtc_get_attributes_model($order->products[$i]['id'], $order->products[$i]['attributes'][$j]['value'],$order->products[$i]['attributes'][$j]['option']);
if ($model != '') {
echo $model.'<br />';
} else {
echo '<br />';
echo !empty($model) ? $model.'<br />' : '<br />';
}
}
}
//BOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero
//echo ' </td>'."\n".' <td class="dataTableContent" align="right" valign="top">'.format_price($order->products[$i]['final_price'] / $order->products[$i]['qty'], 1, $order->info['currency'], $order->products[$i]['allow_tax'], $order->products[$i]['tax']).'</td>'."\n";
echo ' </td>'."\n".' <td class="dataTableContent" align="right" valign="top">'.format_price($order->products[$i]['price'], 1, $order->info['currency'], $order->products[$i]['allow_tax'], $order->products[$i]['tax']).'</td>'."\n";
//EOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero
echo ' </td>'.PHP_EOL;
echo ' <td class="dataTableContent" align="right" valign="top">'.format_price($order->products[$i]['price'], 1, $order->info['currency'], $order->products[$i]['allow_tax'], $order->products[$i]['tax']).'</td>'.PHP_EOL;
if ($order->products[$i]['allow_tax'] == 1) {
echo '<td class="dataTableContent" align="right" valign="top">';
echo xtc_display_tax_value($order->products[$i]['tax']).'%';
echo '</td>'."\n";
echo '<td class="dataTableContent" align="right" valign="top"><b>';
//BOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero
//echo format_price($order->products[$i]['final_price'] / $order->products[$i]['qty'], 1, $order->info['currency'], 0, 0);
echo format_price($order->products[$i]['price'], 1, $order->info['currency'], 0, 0);
//EOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero
echo '</b></td>'."\n";
echo ' <td class="dataTableContent" align="right" valign="top">'.xtc_display_tax_value($order->products[$i]['tax']).'%</td>'.PHP_EOL;
echo ' <td class="dataTableContent" align="right" valign="top"><b>'.format_price($order->products[$i]['price'], 1, $order->info['currency'], 0, 0).'</b></td>'.PHP_EOL;
}
echo ' <td class="dataTableContent" align="right" valign="top"><b>'.format_price(($order->products[$i]['final_price']), 1, $order->info['currency'], 0, 0).'</b></td>'."\n";
echo ' </tr>'."\n";
echo ' <td class="dataTableContent" align="right" valign="top"><b>'.format_price(($order->products[$i]['final_price']), 1, $order->info['currency'], 0, 0).'</b></td>'.PHP_EOL;
echo ' </tr>'.PHP_EOL;
}
?>
<tr>
<td align="right" colspan="10">
ca. Zeile 687
<tr>
<td align="right" colspan="10">
<table border="0" cellspacing="0" cellpadding="2">
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i ++) {
echo ' <tr>'."\n".' <td align="right" class="smallText">'.$order->totals[$i]['title'].'</td>'."\n".' <td align="right" class="smallText">'.$order->totals[$i]['text'].'</td>'."\n".' </tr>'."\n";
echo ' <tr>'.PHP_EOL.' <td align="right" class="smallText">'.$order->totals[$i]['title'].'</td>'.PHP_EOL;
echo ' <td align="right" class="smallText">'.$order->totals[$i]['text'].'</td>'.PHP_EOL;
echo ' </tr>'.PHP_EOL;
}
?>
</table>
</td>
ca. Zeile 710
<td class="smallText" align="center"><b><?php echo TABLE_HEADING_STATUS; ?></b></td>
<td class="smallText" align="center"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
</tr>
<?php
$orders_history_query = xtc_db_query("select orders_status_id, date_added, customer_notified, comments from ".TABLE_ORDERS_STATUS_HISTORY." where orders_id = '".xtc_db_input($oID)."' order by date_added");
if (xtc_db_num_rows($orders_history_query)) {
$orders_history_query = xtc_db_query("-- /admin/orders.php
SELECT orders_status_id,
date_added,
customer_notified,
comments
FROM ".TABLE_ORDERS_STATUS_HISTORY."
WHERE orders_id = ".$oID."
ORDER BY date_added");
$count = xtc_db_num_rows($orders_history_query);
if ($count) {
while ($orders_history = xtc_db_fetch_array($orders_history_query)) {
$count--;
$class = '';
if ($count == 0) $class = ' last_row';
echo ' <tr>'."\n".' <td class="smallText'. $class.'" align="center">'.xtc_datetime_short($orders_history['date_added']).'</td>'."\n".' <td class="smallText'. $class.'" align="center">';
$class = ($count == 0) ? ' last_row' : '';
echo ' <tr>'.PHP_EOL;
echo ' <td class="smallText'.$class.'" align="center">'.xtc_datetime_short($orders_history['date_added']).'</td>'.PHP_EOL;
echo ' <td class="smallText'.$class.'" align="center">';
if ($orders_history['customer_notified'] == '1') {
echo xtc_image(DIR_WS_ICONS.'tick.gif', ICON_TICK)."</td>\n";
echo xtc_image(DIR_WS_ICONS.'tick.gif', ICON_TICK).'</td>'.PHP_EOL;
} else {
echo xtc_image(DIR_WS_ICONS.'cross.gif', ICON_CROSS)."</td>\n";
echo xtc_image(DIR_WS_ICONS.'cross.gif', ICON_CROSS).'</td>'.PHP_EOL;
}
echo ' <td class="smallText'. $class.'">';
if($orders_history['orders_status_id']!='0') {
echo $orders_status_array[$orders_history['orders_status_id']];
}else{
echo '<font color="#FF0000">'.TEXT_VALIDATING.'</font>';
}
echo '</td>'."\n".' <td class="smallText'. $class.'">'.nl2br(xtc_db_output($orders_history['comments'])).' </td>'."\n".' </tr>'."\n";
echo '</td>'.PHP_EOL;
echo ' <td class="smallText'.$class.'">'.nl2br(xtc_db_output($orders_history['comments'])).' </td>'.PHP_EOL.' </tr>'.PHP_EOL;
}
} else {
echo ' <tr>'."\n".' <td class="smallText'. $class.'" colspan="5">'.TEXT_NO_ORDER_HISTORY.'</td>'."\n".' </tr>'."\n";
echo ' <tr>'.PHP_EOL.' <td class="smallText'. $class.'" colspan="5">'.TEXT_NO_ORDER_HISTORY.'</td>'.PHP_EOL.' </tr>'.PHP_EOL;
}
?>
</table>
</td>
ca. Zeile 758
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="2">
<td class="main"><b><?php echo ENTRY_STATUS; ?></b> <?php echo xtc_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']); ?></td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><b><?php echo ENTRY_STATUS; ?></b> <?php echo xtc_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo ENTRY_NOTIFY_CUSTOMER; ?></b> <?php echo xtc_draw_checkbox_field('notify', '', true); ?></td>
<td class="main"><b><?php echo ENTRY_NOTIFY_COMMENTS; ?></b> <?php echo xtc_draw_checkbox_field('notify_comments', '', true); ?></td>
</tr>
</table>
</td>
<td class="main"><b><?php echo ENTRY_NOTIFY_CUSTOMER; ?></b></td>
<td class="main"><?php echo xtc_draw_checkbox_field('notify', '', true); ?></td>
<td class="main"><b><?php echo ENTRY_NOTIFY_COMMENTS; ?></b></td>
<td class="main"><?php echo xtc_draw_checkbox_field('notify_comments', '', true); ?></td>
<td valign="bottom"> <input type="submit" class="button" value="<?php echo BUTTON_UPDATE; ?>"></td>
</tr>
</table>
</td>
ca. Zeile 785
<tr>
<?php //EOF web28 2010-12-09 new table handling ?>
<td align="right">
<!-- //BOF - web28 - 2010-03-20 - Send Order by Admin -->
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$_GET['oID'].'&action=send&sta=0&stc=1&site=1'); ?>"><?php echo BUTTON_ORDER_CONFIRMATION; ?></a>
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oID.'&action=send&sta=0&stc=1&site=1'); ?>"><?php echo BUTTON_ORDER_CONFIRMATION; ?></a>
<!-- //EOF - web28 - 2010-03-20 - Send Order by Admin -->
<?php
if (ACTIVATE_GIFT_SYSTEM == 'true') {
echo '<a class="button" href="'.xtc_href_link(FILENAME_GV_MAIL, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$order->customer['ID']).'">'.BUTTON_SEND_COUPON.'</a>';
}
?>
<?php /*<!-- BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //->
<a class="button" href="Javascript:void()" onclick="window.open('<?php echo xtc_href_link(FILENAME_PRINT_ORDER,'oID='.$_GET['oID']); ?>', 'popup', 'toolbar=0, width=640, height=600')"><?php echo BUTTON_INVOICE; ?></a>
<a class="button" href="Javascript:void()" onclick="window.open('<?php echo xtc_href_link(FILENAME_PRINT_PACKINGSLIP,'oID='.$_GET['oID']); ?>', 'popup', 'toolbar=0, width=640, height=600')"><?php echo BUTTON_PACKINGSLIP; ?></a>
*/ ?>
<a class="button" href="Javascript:void()" onclick="window.open('<?php echo xtc_href_link(FILENAME_PRINT_ORDER,'oID='.$_GET['oID']); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600')"><?php echo BUTTON_INVOICE; ?></a>
<a class="button" href="Javascript:void()" onclick="window.open('<?php echo xtc_href_link(FILENAME_PRINT_PACKINGSLIP,'oID='.$_GET['oID']); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600')"><?php echo BUTTON_PACKINGSLIP; ?></a>
<?php /*<!-- EOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //-> */?>
<a class="button" href="Javascript:void()" onclick="window.open('<?php echo xtc_href_link(FILENAME_PRINT_ORDER,'oID='.$oID); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=800, height=750')"><?php echo BUTTON_INVOICE; ?></a>
<a class="button" href="Javascript:void()" onclick="window.open('<?php echo xtc_href_link(FILENAME_PRINT_PACKINGSLIP,'oID='.$oID); ?>', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=800, height=750')"><?php echo BUTTON_PACKINGSLIP; ?></a>
<!-- BMC Delete CC Info -->
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, 'oID='.$_GET['oID'].'&action=deleteccinfo').'">'.BUTTON_REMOVE_CC_INFO;?></a>
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, 'page='.$_GET['page'].'&oID='.$_GET['oID']).'">'.BUTTON_BACK;?></a>
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, 'oID='.$oID.'&action=deleteccinfo'); ?>"><?php echo BUTTON_REMOVE_CC_INFO;?></a>
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, 'page='.$_GET['page'].'&oID='.$oID); ?>"><?php echo BUTTON_BACK;?></a>
</td>
</tr>
<?php //BOF web28 2010-12-09 new table handling ?>
</table>
<?php //EOF web28 2010-12-09 new table handling ?>
<?php
// ACTION EDIT END
}
// ACTION CUSTOM
elseif ($action == 'custom_action') {
include ('orders_actions.php');
// ACTION ELSE - START
} else {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS.'heading_customers.gif'); ?></td>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
ca. Zeile 832
</td>
</tr>
<tr>
<td class="main" valign="top"><?php echo TABLE_HEADING_CUSTOMERS ?></td>
<td class="main" valign="top" align="right"><?php echo xtc_draw_form('status', FILENAME_ORDERS, '', 'get'); ?>
<?php echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)),array(array('id' => '0', 'text' => TEXT_VALIDATING)), $orders_statuses), '', 'onChange="this.form.submit();"').xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()); ?>
</form></td>
<td class="main" valign="top" align="right">
<?php echo xtc_draw_form('status', FILENAME_ORDERS, '', 'get'); ?>
<?php echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)),array(array('id' => '0', 'text' => TEXT_VALIDATING)), $orders_statuses),(isset($_GET['status']) && xtc_not_null($_GET['status']) ? (int)$_GET['status'] : ''),'onchange="this.form.submit();"').xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()); ?>
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo 'Nr'; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDERS_ID; ?></td>
<td class="dataTableHeadingContent" align="right" style="width:120px"><?php echo TEXT_SHIPPING_TO; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
<?php if (AFTERBUY_ACTIVATED=='true') { ?>
ca. Zeile 856
<?php } ?>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
</tr>
<?php
if (isset($_GET['cID'])) {
$cID = xtc_db_prepare_input($_GET['cID']);
// BOF - Tomcraft - 2009-10-11 - BUGFIX: #0000247 view orders query bug in admin
//$orders_query_raw = "select o.orders_id, o.afterbuy_success, o.afterbuy_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.orders_status, s.orders_status_name, ot.text as order_total from ".TABLE_ORDERS." o left join ".TABLE_ORDERS_TOTAL." ot on (o.orders_id = ot.orders_id), ".TABLE_ORDERS_STATUS." s where o.customers_id = '".xtc_db_input($cID)."' and (o.orders_status = s.orders_status_id and s.language_id = '".$_SESSION['languages_id']."' and ot.class = 'ot_total') or (o.orders_status = '0' and ot.class = 'ot_total' and s.orders_status_id = '1' and s.language_id = '".$_SESSION['languages_id']."') order by orders_id DESC";
$orders_query_raw = "select o.orders_id, o.afterbuy_success, o.afterbuy_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.orders_status, s.orders_status_name, ot.text as order_total from ".TABLE_ORDERS." o left join ".TABLE_ORDERS_TOTAL." ot on (o.orders_id = ot.orders_id), ".TABLE_ORDERS_STATUS." s where o.customers_id = '".xtc_db_input($cID)."' and ((o.orders_status = s.orders_status_id) or (o.orders_status = '0' and s.orders_status_id = '1')) and ot.class = 'ot_total' and s.language_id = '".$_SESSION['languages_id']."' order by orders_id DESC";
// EOF - Tomcraft - 2009-10-11 - BUGFIX: #0000247 view orders query bug in admin
}
elseif (isset($_GET['status']) && $_GET['status']=='0') {
$orders_query_raw = "select o.orders_id, o.afterbuy_success, o.afterbuy_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.orders_status, ot.text as order_total from ".TABLE_ORDERS." o left join ".TABLE_ORDERS_TOTAL." ot on (o.orders_id = ot.orders_id) where o.orders_status = '0' and ot.class = 'ot_total' order by o.orders_id DESC";
}
elseif (isset($_GET['status'])) {
$cID = (int) $_GET['cID'];
$orders_query_raw = "-- /admin/orders.php
SELECT ".$order_select_fields.",
s.orders_status_name
FROM ".TABLE_ORDERS." o
LEFT JOIN (".TABLE_ORDERS_TOTAL." ot, ".TABLE_ORDERS_STATUS." s)
ON (o.orders_id = ot.orders_id
AND (o.orders_status = s.orders_status_id
OR (o.orders_status = '0' AND s.orders_status_id = '1')
)
)
WHERE o.customers_id = '".xtc_db_input($cID)."'
AND ot.class = 'ot_total'
AND s.language_id = '".(int)$_SESSION['languages_id']."'
ORDER BY orders_id DESC";
} elseif (isset($_GET['status']) && $_GET['status']=='0') {
$orders_query_raw = "-- /admin/orders.php
SELECT ".$order_select_fields."
FROM ".TABLE_ORDERS." o
LEFT JOIN ".TABLE_ORDERS_TOTAL." ot ON (o.orders_id = ot.orders_id)
WHERE o.orders_status = '0'
AND ot.class = 'ot_total'
ORDER BY o.orders_id DESC";
} elseif (isset($_GET['status']) && xtc_not_null($_GET['status'])) { //web28 - 2012-04-14 - FIX xtc_not_null($_GET['status'])
$status = xtc_db_prepare_input($_GET['status']);
$orders_query_raw = "select o.orders_id, o.afterbuy_success, o.afterbuy_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from ".TABLE_ORDERS." o left join ".TABLE_ORDERS_TOTAL." ot on (o.orders_id = ot.orders_id), ".TABLE_ORDERS_STATUS." s where o.orders_status = s.orders_status_id and s.language_id = '".$_SESSION['languages_id']."' and s.orders_status_id = '".xtc_db_input($status)."' and ot.class = 'ot_total' order by o.orders_id DESC";
}
//BOF - web28 - 2010-04-10 added for ADMIN SEARCH BAR
elseif ($action == 'search' && $_GET['oID']) {
//$orders_query_raw siehe oben
//EOF - web28 - 2010-04-10 added for ADMIN SEARCH BAR
} else {
$orders_query_raw = "select o.orders_id, o.orders_status, o.afterbuy_success, o.afterbuy_id,
o.customers_name, o.payment_method, o.date_purchased, o.last_modified,
o.currency, o.currency_value, s.orders_status_name, ot.text as order_total
from ".TABLE_ORDERS." o
left join ".TABLE_ORDERS_TOTAL." ot on (o.orders_id = ot.orders_id),
".TABLE_ORDERS_STATUS." s
where (o.orders_status = s.orders_status_id and s.language_id = '".$_SESSION['languages_id']."' and ot.class = 'ot_total')
or (o.orders_status = '0' and ot.class = 'ot_total' and s.orders_status_id = '1' and s.language_id = '".$_SESSION['languages_id']."')
order by o.orders_id DESC";
$orders_query_raw = "-- /admin/orders.php
SELECT ".$order_select_fields.",
s.orders_status_name
FROM ".TABLE_ORDERS." o
LEFT JOIN (".TABLE_ORDERS_TOTAL." ot, ".TABLE_ORDERS_STATUS." s)
ON (o.orders_id = ot.orders_id AND o.orders_status = s.orders_status_id)
WHERE s.language_id = '".(int)$_SESSION['languages_id']."'
AND s.orders_status_id = '".xtc_db_input($status)."'
AND ot.class = 'ot_total'
ORDER BY o.orders_id DESC";
} elseif ($action == 'search' && $oID) {
// ADMIN SEARCH BAR $orders_query_raw moved it to the top
} else {
$orders_query_raw = "-- /admin/orders.php
SELECT ".$order_select_fields.",
s.orders_status_name
FROM ".TABLE_ORDERS." o
LEFT JOIN (".TABLE_ORDERS_TOTAL." ot, ".TABLE_ORDERS_STATUS." s)
ON (o.orders_id = ot.orders_id AND o.orders_status = s.orders_status_id)
WHERE (s.language_id = '".(int)$_SESSION['languages_id']."'
AND ot.class = 'ot_total')
OR (o.orders_status = '0'
AND ot.class = 'ot_total'
AND s.orders_status_id = '1'
AND s.language_id = '".(int)$_SESSION['languages_id']."')
ORDER BY o.orders_id DESC";
}
$orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows);
$orders_query = xtc_db_query($orders_query_raw);
while ($orders = xtc_db_fetch_array($orders_query)) {
if ((!isset($_GET['oID']) || (isset($_GET['oID']) && ($_GET['oID'] == $orders['orders_id']))) && !isset($oInfo)) {
if ((!xtc_not_null($oID) || (isset($oID) && $oID == $orders['orders_id'])) && !isset($oInfo)) { //web28 - 2012-04-14 - FIX !xtc_not_null($oID)
$oInfo = new objectInfo($orders);
}
if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
ca. Zeile 901
}
?>
<td class="dataTableContent"><?php echo '<a href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . xtc_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td>
<td class="dataTableContent" align="right"><?php echo $orders['orders_id']; ?></td>
<td class="dataTableContent" align="right"><?php echo $orders['delivery_country']; ?> </td>
<td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
<td class="dataTableContent" align="center"><?php echo xtc_datetime_short($orders['date_purchased']); ?></td>
<td class="dataTableContent" align="right"><?php if($orders['orders_status']!='0') { echo $orders['orders_status_name']; }else{ echo '<font color="#FF0000">'.TEXT_VALIDATING.'</font>';}?></td>
<?php if (AFTERBUY_ACTIVATED=='true') { ?>
<td class="dataTableContent" align="right"><?php
if ($orders['afterbuy_success'] == 1) {
echo $orders['afterbuy_id'];
<td class="dataTableContent" align="right"><?php echo ($orders['afterbuy_success'] == 1) ? $orders['afterbuy_id'] : 'TRANSMISSION_ERROR'; ?></td>
<?php } ?>
<td class="dataTableContent" align="right">
<?php
if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id) ) {
echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT);
} else {
echo 'TRANSMISSION_ERROR';
echo '<a href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
}
?></td>
<?php } ?>
<?php /*<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
<td class="dataTableContent" align="right"><?php if ( (is_object($oInfo)) && ($orders['orders_id'] == $oInfo->orders_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
*/ ?>
<td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT); } else { echo '<a href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
<?php /*<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons --> */ ?>
?>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<td colspan="5">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText" valign="top"><?php echo $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td>
<td class="smallText" align="right"><?php echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xtc_get_all_get_params(array('page', 'oID', 'action'))); ?></td>
</tr>
</table></td>
</table>
</td>
</tr>
</table></td>
</table>
</td>
<?php
$heading = array ();
$contents = array ();
switch ($action) {
ca. Zeile 948
break;
default :
if (isset($oInfo) && is_object($oInfo)) {
$heading[] = array ('text' => '<b>['.$oInfo->orders_id.'] '.xtc_datetime_short($oInfo->date_purchased).'</b>');
$contents[] = array ('align' => 'center', 'text' => '<a class="button" href="'.xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oInfo->orders_id.'&action=edit').'">'.BUTTON_EDIT.'</a> <a class="button" href="'.xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oInfo->orders_id.'&action=delete').'">'.BUTTON_DELETE.'</a>');
if (AFTERBUY_ACTIVATED == 'true') {
$contents[] = array ('align' => 'center', 'text' => '<a class="button" href="'.xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oInfo->orders_id.'&action=afterbuy_send').'">'.BUTTON_AFTERBUY_SEND.'</a>');
}
//$contents[] = array('align' => 'center', 'text' => '');
$contents[] = array ('text' => '<br />'.TEXT_DATE_ORDER_CREATED.' '.xtc_date_short($oInfo->date_purchased));
if (xtc_not_null($oInfo->last_modified))
if (xtc_not_null($oInfo->last_modified)) {
$contents[] = array ('text' => TEXT_DATE_ORDER_LAST_MODIFIED.' '.xtc_date_short($oInfo->last_modified));
$contents[] = array ('text' => '<br />'.TEXT_INFO_PAYMENT_METHOD.' '.$oInfo->payment_method);
// elari added to display product list for selected order
}
$contents[] = array ('text' => '<br />'.TEXT_INFO_PAYMENT_METHOD.' '.get_payment_name($oInfo->payment_method).' ('.$oInfo->payment_method.')');
$order = new order($oInfo->orders_id);
// BOF - Tomcraft - 2010-04-22 - Added a missing language definition
//$contents[] = array ('text' => '<br /><br />'.sizeof($order->products).' Products ');
$contents[] = array ('text' => '<br /><br />'.sizeof($order->products).' '.TEXT_PRODUCTS);
// EOF - Tomcraft - 2010-04-22 - Added a missing language definition
for ($i = 0; $i < sizeof($order->products); $i ++) {
$contents[] = array ('text' => $order->products[$i]['qty'].' x'.$order->products[$i]['name']);
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0; $j < sizeof($order->products[$i]['attributes']); $j ++) {
$contents[] = array ('text' => '<small> <i> - '.$order->products[$i]['attributes'][$j]['option'].': '.$order->products[$i]['attributes'][$j]['value'].'</i></small></nobr>');
}
ca. Zeile 975
$contents[] = array ('text' => '<small> <i> - '.$order->products[$i]['attributes'][$j]['option'].': '.$order->products[$i]['attributes'][$j]['value'].'</i></small></nobr>');
}
}
}
// elari End add display products
}
break;
}
// BOF - Tomcraft - 2009-10-22 - Added customer comments to default view on right column
if ($order->info['comments']<>'') {
$contents[] = array ('text' => '<br><strong>'.TABLE_HEADING_COMMENTS.':</strong><br>'.$order->info['comments']);
}
// EOF - Tomcraft - 2009-10-22 - Added customer comments to default view on right column
}
break;
}
if ((xtc_not_null($heading)) && (xtc_not_null($contents))) {
echo ' <td width="25%" valign="top">'."\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' </td>'."\n";
}
?>
</tr>
ca. Zeile 999
</tr>
</table>
</td>
</tr>
</table>
<?php
// ACTION ELSE - END
}
?>
</table>
</td>
<!-- body_text_eof //-->
</tr>
</table>
admin/orders_edit.phpTop ca. Zeile 14
(c) 2006 xt:Commerce; www.xt-commerce.com
Released under the GNU General Public License
v.1.31 - 2012-05-23 (c) by web28 - www.rpa-com.de
FIX: Preisberechnung Kundengruppenwechsel, Optionspreise bei Sonderpreisen
v.1.30 - 2012-04-05 (c) by web28 - www.rpa-com.de
FIX: order tax by $order->delivery['country_iso_2']
v.1.28 - 2012-03-22 (c) by web28 - www.rpa-com.de
FIX: tax guest account, tax ot_payment, tax cod_fee
v.1.26 - 2011-11-01 (c) by web28 - www.rpa-com.de
NEW Länderwechsel -> delivery_country_iso_code_2, billing_country_iso_code_2
TODO Attributpreise und Sonderangebote
ca. Zeile 25
da ansonsten keine eindeutige Zuordnung möglich ist
Anpassung in checkout_process.php
--------------------------------------------------------------*/
//######################//
//Fuer korrekte Steuerberechnung hier die Rabattmodule eintragen - kommagetrennt
define('DISCOUNT_MODULES', 'ot_discount,ot_payment');
//######################//
define('FORMAT_NEGATIVE', '<strong><font color="#ff0000">%s</font></strong>');
// Benötigte Funktionen und Klassen Anfang:
require ('includes/application_top.php');
ca. Zeile 54
// Adressbearbeitung Anfang
if ($action == 'address_edit') {
//BOC - web28 - added country_iso_code_2
$customers_country = xtc_get_countriesList(xtc_db_prepare_input($_POST['customers_country_id']));
$delivery_country = xtc_get_countriesList(xtc_db_prepare_input($_POST['delivery_country_id']), true);
$billing_country = xtc_get_countriesList(xtc_db_prepare_input($_POST['billing_country_id']), true);
ca. Zeile 97
'billing_city' => xtc_db_prepare_input($_POST['billing_city']),
'billing_postcode' => xtc_db_prepare_input($_POST['billing_postcode']),
'billing_country' => $billing_country['countries_name'],
'billing_country_iso_code_2' => $billing_country['countries_iso_code_2'],
'billing_address_format_id' => xtc_get_address_format_id($_POST['billing_country_id'])
'billing_address_format_id' => xtc_get_address_format_id($_POST['billing_country_id']),
'last_modified' => 'now()'
);
//EOC - web28 - added country_iso_code_2
$update_sql_data = array ('last_modified' => 'now()');
$sql_data_array = xtc_array_merge($sql_data_array, $update_sql_data);
xtc_db_perform(TABLE_ORDERS, $sql_data_array, 'update', 'orders_id = \''.(int)($_POST['oID']).'\'');
xtc_redirect(xtc_href_link(FILENAME_ORDERS_EDIT, 'edit_action=address&oID='.(int)$_POST['oID']));
}
ca. Zeile 117
$lang_query = xtc_db_query("select languages_id from ".TABLE_LANGUAGES." where directory = '".$order->info['language']."'");
$lang = xtc_db_fetch_array($lang_query);
$status_query = xtc_db_query("SELECT customers_status_show_price_tax,
customers_status_add_tax_ot
FROM ".TABLE_CUSTOMERS_STATUS."
WHERE customers_status_id = '".$order->info['status']."'
AND language_id ='".(int)$lang['languages_id']."'
");
$status = xtc_db_fetch_array($status_query);
$status = get_customers_taxprice_status();
//BOF web28 - 2010-12-04 - Fix Kundergruppenwechsel mit Steueränderung
$product_query = xtc_db_query("select allow_tax, products_tax from " . TABLE_ORDERS_PRODUCTS . " WHERE products_id = " . (int)($_POST['products_id']) . " AND orders_products_id = " . (int)($_POST['opID']));
$product_query = xtc_db_query("select op.allow_tax,
op.products_tax,
p.products_tax_class_id,
pd.products_name
from " . TABLE_ORDERS_PRODUCTS . " op
left join " . TABLE_PRODUCTS . " p ON op.products_id = p.products_id
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON op.products_id = pd.products_id AND pd.language_id = '".(int)$lang['languages_id']."'
WHERE op.products_id = " . (int)($_POST['products_id']) . "
AND op.orders_products_id = " . (int)($_POST['opID'])
);
$product = xtc_db_fetch_array($product_query);
$products_a_query = xtc_db_query("select orders_products_attributes_id, options_values_price from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." where orders_products_id = '".(int)($_POST['opID'])."'");
if(isset($_POST['products_tax'])){
$product['products_tax'] = $_POST['products_tax'];
}
$c_info = get_c_infos($order->customer['ID'], trim($order->delivery['country_iso_2'])); // web28 - 2012-04-05 - FIX orders tax
$tax_rate = xtc_get_tax_rate($product['products_tax_class_id'], $c_info['country_id'], $c_info['zone_id']);
// FIX tax by customers_status_add_tax_ot == 0
if ($status['customers_status_show_price_tax'] == 0 && $status['customers_status_add_tax_ot'] == 0) {
$tax_rate = 0;
}
// FIX tax by order delivery country /customer group
if ($tax_rate > 0 && $product['allow_tax'] == 0 ) {
$product['products_tax'] = $tax_rate;
}
// Korrektur Kundengruppenwechsel
$group_subtax = $group_addtax = false;
if ($status['customers_status_show_price_tax'] == 0 && $status['customers_status_add_tax_ot'] == 0 && $product['products_tax'] > 0 && $product['allow_tax'] == 1) {
//echo 'MINUS:'.$product['products_tax'];
$group_subtax = true;
}
if ($status['customers_status_show_price_tax'] == 0 && $status['customers_status_add_tax_ot'] == 1 && $product['allow_tax'] == 1) {
//echo 'MINUS:'.$product['products_tax'];
$group_subtax = true;
}
if ($status['customers_status_show_price_tax'] == 1 && $status['customers_status_add_tax_ot'] == 0 && $product['allow_tax'] == 0) {
//echo 'PLUS:'.$product['products_tax'];
$group_addtax = true;
}
$products_a_query = xtc_db_query("select orders_products_attributes_id,
options_values_price
from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES."
where orders_products_id = '".(int)($_POST['opID'])."'
");
//Produktpreise neu berechnen - Steuer hinzufügen
if ($status['customers_status_show_price_tax'] == 1 && $product['allow_tax'] == 0) {
if ($group_addtax) {
$_POST['products_price'] += $_POST['products_price'] /100 * $product['products_tax'];
//Optionspreise neu berechnen - Steuer hinzufügen
//Optionspreise neu berechnen - Steuer hinzufügen //DEAKTIVIERT Optionspreise werden nur NETTO gespeichert???
while ($products_a = xtc_db_fetch_array($products_a_query)) {
if ($products_a['options_values_price'] > 0) {
$products_a['options_values_price'] += $products_a['options_values_price'] /100 * $product['products_tax'];
xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, array ('options_values_price' => xtc_db_prepare_input($products_a['options_values_price'])), 'update', 'orders_products_attributes_id = \''.(int)($products_a['orders_products_attributes_id']).'\'');
//xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, array ('options_values_price' => xtc_db_prepare_input($products_a['options_values_price'])), 'update', 'orders_products_attributes_id = \''.(int)($products_a['orders_products_attributes_id']).'\'');
}
}
}
//Produktpreise neu berechnen - Steuer abziehen
if ($status['customers_status_show_price_tax'] == 0 && $product['allow_tax'] == 1) {
if ($group_subtax) {
$_POST['products_price'] = $_POST['products_price'] * 100 /(100 + $product['products_tax']);
//Optionspreise neu berechnen - Steuer abziehen
//Optionspreise neu berechnen - Steuer abziehen //DEAKTIVIERT Optionspreise werden nur NETTO gespeichert???
while ($products_a = xtc_db_fetch_array($products_a_query)) {
if ($products_a['options_values_price'] > 0) {
$products_a['options_values_price'] = $products_a['options_values_price'] * 100 /(100 + $product['products_tax']);
xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, array ('options_values_price' => xtc_db_prepare_input($products_a['options_values_price'])), 'update', 'orders_products_attributes_id = \''.(int)($products_a['orders_products_attributes_id']).'\'');
//xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, array ('options_values_price' => xtc_db_prepare_input($products_a['options_values_price'])), 'update', 'orders_products_attributes_id = \''.(int)($products_a['orders_products_attributes_id']).'\'');
}
}
}
//EOF web28 - 2010-12-04 - Fix Kundergruppenwechsel mit Steueränderung
//BOC - web28 - 2011-11-01 - FIX tax by customers_status_add_tax_ot == 0
$product_query = xtc_db_query("select p.products_model,
p.products_tax_class_id,
pd.products_name
from ".TABLE_PRODUCTS." p,
".TABLE_PRODUCTS_DESCRIPTION." pd
where p.products_id = '".(int)$_POST['products_id']."'
and pd.products_id = p.products_id
and pd.language_id = '".(int)$lang['languages_id']."'
");
$product = xtc_db_fetch_array($product_query);
$c_info = xtc_oe_customer_infos($order->customer['ID']);
$tax_rate = xtc_get_tax_rate($product['products_tax_class_id'], $c_info['country_id'], $c_info['zone_id']);
if ($status['customers_status_show_price_tax'] == 0 && $status['customers_status_add_tax_ot'] == 0) {
$tax_rate = 0;
}
//EOC - web28 - 2011-11-01 - FIX tax by customers_status_add_tax_ot == 0
//Gesamtpreis
$final_price = $_POST['products_price'] * $_POST['products_quantity'];
$sql_data_array = array ('orders_id' => (int)($_POST['oID']),
'products_id' => (int)($_POST['products_id']),
'products_name' => xtc_db_prepare_input($_POST['products_name']),
'products_price' => xtc_db_prepare_input($_POST['products_price']),
'products_price' => (float)$_POST['products_price'],
'products_discount_made' => '',
'final_price' => xtc_db_prepare_input($final_price),
'final_price' => (float)$final_price,
'products_tax' => xtc_db_prepare_input($tax_rate),
'products_quantity' => xtc_db_prepare_input($_POST['products_quantity']),
'allow_tax' => xtc_db_prepare_input($status['customers_status_show_price_tax']));
'allow_tax' => (int)$status['customers_status_show_price_tax'],
'products_model' => xtc_db_prepare_input($_POST['products_model'])
);
$update_sql_data = array ('products_model' => xtc_db_prepare_input($_POST['products_model']));
$sql_data_array = xtc_array_merge($sql_data_array, $update_sql_data);
xtc_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array, 'update', 'orders_products_id = \''.(int)($_POST['opID']).'\'');
//BOF - Dokuman - 2010-11-25 - calculate stock correctly when editing orders //web28 - 2010-12-04 fix products_id
$new_qty = (double)$_POST['old_qty'] - (double)$_POST['products_quantity'];
xtc_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity + " . $new_qty . " WHERE products_id = " . (int)($_POST['products_id']));
//EOF - Dokuman - 2010-11-25 - calculate stock correctly when editing orders //web28 - 2010-12-04 fix products_id
xtc_redirect(xtc_href_link(FILENAME_ORDERS_EDIT, 'edit_action=products&oID='.(int)$_POST['oID']));
}
// Artikel bearbeiten Ende:
ca. Zeile 202
}
// Artikel bearbeiten Ende:
// Artikel einfügen Anfang
if ($action == 'product_ins') {
$lang_query = xtc_db_query("select languages_id from ".TABLE_LANGUAGES." where directory = '".$order->info['language']."'");
$lang = xtc_db_fetch_array($lang_query);
$status_query = xtc_db_query("SELECT customers_status_show_price_tax,
customers_status_add_tax_ot
FROM ".TABLE_CUSTOMERS_STATUS."
WHERE customers_status_id = '".$order->info['status']."'
AND language_id ='".(int)$lang['languages_id']."'
");
$status = xtc_db_fetch_array($status_query);
$status = get_customers_taxprice_status();
//BOC - web28 - 2011-10-14 - added status update for shipping_status_name in TABLE_ORDERS_PRODUCTS
$shipping_time_query = xtc_db_query("SELECT ps.shipping_status_name
FROM ".TABLE_PRODUCTS." p,
ca. Zeile 241
");
$product = xtc_db_fetch_array($product_query);
$c_info = xtc_oe_customer_infos($order->customer['ID']);
$c_info = get_c_infos($order->customer['ID'], trim($order->delivery['country_iso_2'])); // web28 - 2012-04-05 - FIX orders tax
$tax_rate = xtc_get_tax_rate($product['products_tax_class_id'], $c_info['country_id'], $c_info['zone_id']);
//BOC - web28 - 2011-11-01 - FIX tax by customers_status_add_tax_ot == 0
// web28 - 2011-11-01 - FIX tax by customers_status_add_tax_ot == 0
if ($status['customers_status_show_price_tax'] == 0 && $status['customers_status_add_tax_ot'] == 0) {
$tax_rate = 0;
}
//EOC - web28 - 2011-11-01 - FIX tax by customers_status_add_tax_ot == 0
$price = $xtPrice->xtcGetPrice($_POST['products_id'], $format = false, $_POST['products_quantity'], $product['products_tax_class_id'], '', '', $order->customer['ID']);
$final_price = $price * $_POST['products_quantity'];
$sql_data_array = array ('orders_id' => (int)($_POST['oID']),
'products_id' => (int)($_POST['products_id']),
'products_name' => xtc_db_prepare_input($product['products_name']),
'products_price' => xtc_db_prepare_input($price),
'products_price' => (float)$price,
'products_discount_made' => '',
'products_shipping_time' => xtc_db_prepare_input($shipping_time), //web28 - 2011-10-14- added status update for shipping_status_name in TABLE_ORDERS_PRODUCTS
'final_price' => xtc_db_prepare_input($final_price),
'final_price' => (float)$final_price,
'products_tax' => xtc_db_prepare_input($tax_rate),
'products_quantity' => xtc_db_prepare_input($_POST['products_quantity']),
'allow_tax' => xtc_db_prepare_input($status['customers_status_show_price_tax']));
$insert_sql_data = array ('products_model' => xtc_db_prepare_input($product['products_model']));
$sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data);
'allow_tax' => (int)$status['customers_status_show_price_tax'],
'products_model' => xtc_db_prepare_input($product['products_model'])
);
xtc_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
//BOF - Dokuman - 2010-11-25 - calculate stock correctly when editing orders
if ($_POST['products_quantity'] != 0) {
xtc_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity - " . (double)$_POST['products_quantity'] . " WHERE products_id= " . (int)$_POST['products_id']);
}
//EOF - Dokuman - 2010-11-25 - calculate stock correctly when editing orders
xtc_redirect(xtc_href_link(FILENAME_ORDERS_EDIT, 'edit_action=products&oID='.$_POST['oID']));
}
// Artikel einfügen Ende
// Produkt Optionen bearbeiten Anfang
if ($action == 'product_option_edit') {
$lang_query = xtc_db_query("select languages_id from ".TABLE_LANGUAGES." where directory = '".$order->info['language']."'");
$lang = xtc_db_fetch_array($lang_query);
$status = get_customers_taxprice_status();
$sql_data_array = array ('products_options' => xtc_db_prepare_input($_POST['products_options']),
'products_options_values' => xtc_db_prepare_input($_POST['products_options_values']),
'options_values_price' => xtc_db_prepare_input($_POST['options_values_price'])
);
ca. Zeile 292
xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array, 'update', 'orders_products_attributes_id = \''.xtc_db_input($_POST['opAID']).'\'');
$products_query = xtc_db_query("select op.products_id,
op.products_quantity,
p.products_tax_class_id
from ".TABLE_ORDERS_PRODUCTS." op,
".TABLE_PRODUCTS." p
op.products_discount_made,
op.products_tax
from ".TABLE_ORDERS_PRODUCTS." op
where op.orders_products_id = '".(int)$_POST['opID']."'
and op.products_id = p.products_id"
);
");
$products = xtc_db_fetch_array($products_query);
$products_a_query = xtc_db_query("select options_values_price, price_prefix from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." where orders_products_id = '".(int)$_POST['opID']."'");
ca. Zeile 307
while ($products_a = xtc_db_fetch_array($products_a_query)) {
$ov_price += $products_a['price_prefix'].$products_a['options_values_price'];
};
//Attribute Discount
$discount = 0;
if ($status['customers_status_discount_attributes'] == 1 && $status['customers_status_discount'] != 0.00 && $options_values_price > 0.00) {
$discount = $status['customers_status_discount'];
if ($products['products_discount_made'] < $status['customers_status_discount']) {
$discount = $products['products_discount_made'];
}
$ov_price -= $ov_price / 100 * $discount;
}
//Produktpreis/Sonderpreis/Staffelpreis/Gruppenpreis/Dicountpreis ohne Steuer
$products_old_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, $products['products_quantity'], '', '', '', $order->customer['ID']);
$options_values_price = ($ov_price.$_POST['prefix'].$_POST['options_values_price']);
$products_price = ($products_old_price + $options_values_price);
//Gesamtpreis
$products_price = ($products_old_price + $ov_price);
//Steuer UND Währungskorrektur
$tax_rate = $products['products_tax'];
if ($status['customers_status_show_price_tax'] == 0 && $status['customers_status_add_tax_ot'] == 0) {
$tax_rate = 0;
}
$price = $xtPrice->xtcAddTax($products_price, $tax_rate); //tax by products
//ACHTUNG bei Sonderangebot Rückgabe ohne Optionspreis
$price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, $products['products_quantity'], $products['products_tax_class_id'], $products_price, '', $order->customer['ID']);
$final_price = $price * $products['products_quantity'];
$sql_data_array = array ('products_price' => xtc_db_prepare_input($price));
ca. Zeile 328
// Produkt Optionen bearbeiten Ende
// Produkt Optionen einfügen Anfang
if ($action == 'product_option_ins') {
$lang_query = xtc_db_query("select languages_id from ".TABLE_LANGUAGES." where directory = '".$order->info['language']."'");
$lang = xtc_db_fetch_array($lang_query);
$products_attributes_query = xtc_db_query("select options_id, options_values_id, options_values_price, price_prefix from ".TABLE_PRODUCTS_ATTRIBUTES." where products_attributes_id = '".(int)$_POST['aID']."'");
$status = get_customers_taxprice_status();
$products_attributes_query = xtc_db_query("SELECT options_id,
options_values_id,
options_values_price,
price_prefix
FROM ".TABLE_PRODUCTS_ATTRIBUTES."
WHERE products_attributes_id = '".(int)$_POST['aID']."'");
$products_attributes = xtc_db_fetch_array($products_attributes_query);
$products_options_query = xtc_db_query("select products_options_name
from ".TABLE_PRODUCTS_OPTIONS."
where products_options_id = '".(int)$products_attributes['options_id']."'
and language_id = '".(int)$lang['languages_id']."'
$products_options_query = xtc_db_query("SELECT products_options_name
FROM ".TABLE_PRODUCTS_OPTIONS."
WHERE products_options_id = '".(int)$products_attributes['options_id']."'
AND language_id = '".(int)$lang['languages_id']."'
");
$products_options = xtc_db_fetch_array($products_options_query);
$products_options_values_query = xtc_db_query("select products_options_values_name
from ".TABLE_PRODUCTS_OPTIONS_VALUES."
where products_options_values_id = '".(int)$products_attributes['options_values_id']."'
and language_id = '".(int)$lang['languages_id']."'
$products_options_values_query = xtc_db_query("SELECT products_options_values_name
FROM ".TABLE_PRODUCTS_OPTIONS_VALUES."
WHERE products_options_values_id = '".(int)$products_attributes['options_values_id']."'
AND language_id = '".(int)$lang['languages_id']."'
");
$products_options_values = xtc_db_fetch_array($products_options_values_query);
$sql_data_array = array ('orders_id' => (int)($_POST['oID']),
ca. Zeile 358
$insert_sql_data = array ('price_prefix' => xtc_db_prepare_input($products_attributes['price_prefix']));
$sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data);
xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);
$products_query = xtc_db_query("select op.products_id, op.products_quantity, p.products_tax_class_id from ".TABLE_ORDERS_PRODUCTS." op, ".TABLE_PRODUCTS." p where op.orders_products_id = '".(int)$_POST['opID']."' and op.products_id = p.products_id");
$products_query = xtc_db_query("select op.products_id, op.products_quantity,
op.products_discount_made, op.products_tax, p.products_tax_class_id
from ".TABLE_ORDERS_PRODUCTS." op, ".TABLE_PRODUCTS." p
where op.orders_products_id = '".(int)$_POST['opID']."'
and op.products_id = p.products_id");
$products = xtc_db_fetch_array($products_query);
$products_a_query = xtc_db_query("select options_values_price, price_prefix from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." where orders_products_id = '".(int)$_POST['opID']."'");
$ov_price = 0;
while ($products_a = xtc_db_fetch_array($products_a_query)) {
$options_values_price += $products_a['price_prefix'].$products_a['options_values_price'];
$ov_price += $products_a['price_prefix'].$products_a['options_values_price'];
};
if (DOWNLOAD_ENABLED == 'true') {
$attributes_query = "SELECT popt.products_options_name,
ca. Zeile 403
}
}
//Attribute Discount
$discount = 0;
if ($status['customers_status_discount_attributes'] == 1 && $status['customers_status_discount'] != 0.00 && $options_values_price > 0.00) {
$discount = $status['customers_status_discount'];
if ($products['products_discount_made'] < $status['customers_status_discount']) {
$discount = $products['products_discount_made'];
}
$ov_price -= $ov_price / 100 * $discount;
}
//Produktpreis/Sonderpreis/Staffelpreis/Gruppenpreis/Dicountpreis ohne Steuer
$products_old_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, $products['products_quantity'], '', '', '', $order->customer['ID']);
$products_price = ($products_old_price + $options_values_price);
//Gesamtpreis
$products_price = ($products_old_price + $ov_price);
$price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, $products['products_quantity'], $products['products_tax_class_id'], $products_price, '', $order->customer['ID']);
//Steuer UND Währungskorrektur
$tax_rate =$products['products_tax'];
if ($status['customers_status_show_price_tax'] == 0 && $status['customers_status_add_tax_ot'] == 0) {
$tax_rate = 0;
}
$price = $xtPrice->xtcAddTax($products_price, $tax_rate); //tax by products
$final_price = $price * $products['products_quantity'];
$sql_data_array = array ('products_price' => xtc_db_prepare_input($price));
ca. Zeile 445
$text = $xtPrice->xtcFormat($_POST['value'], true);
//BOF - web28 - 2010-11-28 - add missing order_total_shipping_sort order
$shipping_order = intval(MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER);
$shipping_order = (int)(MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER);
$sql_data_array = array ('orders_id' => (int)($_POST['oID']),
'title' => xtc_db_prepare_input($shipping_text),
'text' => $text,
'value' => xtc_db_prepare_input($_POST['value']),
ca. Zeile 550
// Produkte
$order_products_query = xtc_db_query("select orders_products_id , products_id from ".TABLE_ORDERS_PRODUCTS." where orders_id = '".(int)$_POST['oID']."'");
while ($order_products = xtc_db_fetch_array($order_products_query)) {
$products_query = xtc_db_query("select products_name
from ".TABLE_PRODUCTS_DESCRIPTION."
where products_id = '".(int)$order_products['products_id']."'
and language_id = '".$_POST['lang']."'
$products_query = xtc_db_query("SELECT products_name
FROM ".TABLE_PRODUCTS_DESCRIPTION."
WHERE products_id = '".(int)$order_products['products_id']."'
AND language_id = '".(int)$_POST['lang']."'
");
$products = xtc_db_fetch_array($products_query);
$sql_data_array = array ('products_name' => xtc_db_prepare_input($products['products_name']));
ca. Zeile 588
// Währungswechsel Anfang
if ($action == 'curr_edit') {
$curr_query = xtc_db_query("select currencies_id, title, code, value from ".TABLE_CURRENCIES." where currencies_id = '".$_POST['currencies_id']."' ");
$curr_query = xtc_db_query("SELECT currencies_id,
title,
code,
value
FROM ".TABLE_CURRENCIES."
WHERE currencies_id = '".(int)$_POST['currencies_id']."' ");
$curr = xtc_db_fetch_array($curr_query);
$old_curr_query = xtc_db_query("select currencies_id, title, code, value from ".TABLE_CURRENCIES." where code = '".$_POST['old_currency']."' ");
$old_curr = xtc_db_fetch_array($old_curr_query);
ca. Zeile 704
// Rückberechnung Anfang
if ($action == 'save_order') {
$lang_query = xtc_db_query("select languages_id from ".TABLE_LANGUAGES." where directory = '".$order->info['language']."'");
$lang_query = xtc_db_query("SELECT languages_id
FROM ".TABLE_LANGUAGES."
WHERE directory = '".$order->info['language']."'");
$lang = xtc_db_fetch_array($lang_query);
//BOF - Web28 - 2011-01-16 - Löschen des Zwischenspeichers
xtc_db_query("delete from ".TABLE_ORDERS_RECALCULATE." where orders_id = '".(int)($_POST['oID'])."'");
xtc_db_query("DELETE FROM ".TABLE_ORDERS_RECALCULATE."
WHERE orders_id = '".(int)($_POST['oID'])."'");
//EOF - Web28 - 2011-01-16 - Löschen des Zwischenspeichers
//BOF Web28 - 2010-12-06 - read customer status earlier
$status_query = xtc_db_query("SELECT customers_status_show_price_tax,
ca. Zeile 737
$products_query = xtc_db_query("select final_price, products_tax, allow_tax from ".TABLE_ORDERS_PRODUCTS." where orders_id = '".(int)$_POST['oID']."' ");
while ($products = xtc_db_fetch_array($products_query)) {
$tax_rate = $products['products_tax'];
$multi = (($products['products_tax'] / 100) + 1);
if ($products['allow_tax'] == '1') {
$bprice = $products['final_price'];
$nprice = $xtPrice->xtcRemoveTax($bprice, $tax_rate);
ca. Zeile 763
}
//EOF####### Produkte #######//
//BOF####### Produkte Steuersätze #######//
$tax_query = xtc_db_query("
SELECT tax_rate, SUM(tax) as tax_value
$tax_query = xtc_db_query("SELECT tax_rate, SUM(tax) as tax_value
FROM ".TABLE_ORDERS_RECALCULATE."
WHERE orders_id = '".(int)$_POST['oID']."'
AND class = 'products'
GROUP BY tax_rate
ca. Zeile 780
);
xtc_db_perform(TABLE_ORDERS_RECALCULATE, $sql_data_array);
}
//BOF####### Produkte Steuersätze #######//
//EOF####### Produkte Steuersätze #######//
//BOF####### Module #######//
$module_query = xtc_db_query("select value, class
from ".TABLE_ORDERS_TOTAL."
where orders_id = '".(int)$_POST['oID']."'
and class!='ot_total'
and class!='ot_subtotal_no_tax'
and class!='ot_tax'
and class!='ot_subtotal'
$module_query = xtc_db_query("SELECT value, class
FROM ".TABLE_ORDERS_TOTAL."
WHERE orders_id = '".(int)$_POST['oID']."'
AND class!='ot_total'
AND class!='ot_subtotal_no_tax'
AND class!='ot_tax'
AND class!='ot_subtotal'
");
$discount_modules = array_map('trim',explode(",",DISCOUNT_MODULES)); // Rabattmodule
//echo print_r($discount_modules).'<br>'; //DEBUG
while ($module_value = xtc_db_fetch_array($module_query)) {
$module_name = str_replace('ot_', '', $module_value['class']);
if ($module_name != 'discount') {
if (!in_array($module_value['class'], $discount_modules)) { // nicht bei Rabattmodulen: ot_discount, ot_payment
//echo $module_value['class'].'<br>'; //DEBUG
$module_tax_class = '0';
if ($module_name != 'shipping' && defined('MODULE_ORDER_TOTAL_'.strtoupper($module_name).'_TAX_CLASS')) {
$module_tax_class = constant('MODULE_ORDER_TOTAL_'.strtoupper($module_name).'_TAX_CLASS');
} else {
ca. Zeile 805
if ($module_tmp_name != 'selfpickup' && $module_tmp_name != 'free' && defined('MODULE_SHIPPING_'.strtoupper($module_tmp_name).'_TAX_CLASS')) { //DokuMan - 2011-05-18 - set 'freeamount' back to 'free' again
$module_tax_class = constant('MODULE_SHIPPING_'.strtoupper($module_tmp_name).'_TAX_CLASS');
}
}
//echo $module_value['class'].'|'.$module_tax_class.'<br>'; //DEBUG
} else {
$module_tax_class = '0';
}
$cinfo = xtc_oe_customer_infos($order->customer['ID']);
$module_tax_rate = xtc_get_tax_rate($module_tax_class, $cinfo['country_id'], $cinfo['zone_id']);
$c_info = get_c_infos($order->customer['ID'], trim($order->delivery['country_iso_2'])); // web28 - 2012-04-05 - FIX orders tax
$module_tax_rate = xtc_get_tax_rate($module_tax_class, $c_info['country_id'], $c_info['zone_id']);
//echo $module_value['class'].'|'.$module_tax_rate.'<br>'; //DEBUG
if ($status['customers_status_show_price_tax'] == 1) {
$module_b_price = $module_value['value'];
//BOF - Dokuman - 2010-03-17 - use module_tax_class here
if ($module_tax_class == '0') {
ca. Zeile 823
} else {
$module_n_price = $xtPrice->xtcRemoveTax($module_b_price, $module_tax_rate);
}
$module_tax = $xtPrice->calcTax($module_n_price, $module_tax_rate);
//echo 'MT1: '.$module_tax .'<br>'; //DEBUG
} else {
$module_n_price = $module_value['value'];
$module_b_price = $xtPrice->xtcAddTax($module_n_price, $module_tax_rate);
$module_tax = $xtPrice->calcTax($module_n_price, $module_tax_rate);
}
//echo 'MT: '.$module_tax .'<br>'; //DEBUG
//BOC web28 - 2010-08-25 - neue anteilige Steuerberechnung Module - ausgenommen bei Versandkosten
if ($module_name != 'shipping') {
//BOC web28 - 2012-03-22 - neue anteilige Steuerberechnung Module - ausgenommen bei Versandkosten und Nachnahme ohne Steuer
if ($module_name != 'shipping' && $module_name != 'cod_fee' && $module_tax_rate == 0) { //web28 - 2012-03-14 - FIX Steuerberechnung
$module_tax = calculate_tax($module_value['value']);
}
//EOC web28 - 2010-08-25 - neue anteilige Steuerberechnung Module - ausgenommen bei Versandkosten
//EOC web28 - 2012-03-22 - neue anteilige Steuerberechnung Module - ausgenommen bei Versandkosten und Nachnahme ohne Steuer
$sql_data_array = array (
'orders_id' => (int)($_POST['oID']),
'n_price' => xtc_db_prepare_input($module_n_price),
ca. Zeile 951
//BOF web28 - 2010-12-04 - "inkl." oder "zzgl." hinzufügen
$title = $ust_desc['tax_description'];
$tax_info = '';
if ($status['customers_status_show_price_tax'] == 1) $tax_info = TEXT_ADD_TAX;
if ($status['customers_status_show_price_tax'] == 0) $tax_info = TEXT_NO_TAX;
if ($status['customers_status_show_price_tax'] == 1)
$tax_info = TEXT_ADD_TAX;
if ($status['customers_status_show_price_tax'] == 0)
$tax_info = TEXT_NO_TAX;
$title = $tax_info . $title.':';
//EOF web28 - 2010-12-04 - "inkl." oder "zzgl." hinzufügen
ca. Zeile 1013
and class = 'ot_total'");
//EOF web28 - 2010-12-04 Errechne neue Gesamtsumme für Artikel
// Löschen des Zwischenspeichers Anfang
//EXIT; //DEBUG
xtc_db_query("delete from ".TABLE_ORDERS_RECALCULATE." where orders_id = '".xtc_db_input($_POST['oID'])."'");
// Löschen des Zwischenspeichers Ende
xtc_redirect(xtc_href_link(FILENAME_ORDERS, 'action=edit&oID='.(int)$_POST['oID']));
ca. Zeile 1023
//---------------------------------//
function get_customers_taxprice_status() {
global $order,$lang;
$status_query = xtc_db_query("SELECT customers_status_show_price_tax,
customers_status_add_tax_ot,
customers_status_discount,
customers_status_discount_attributes
FROM ".TABLE_CUSTOMERS_STATUS."
WHERE customers_status_id = '".$order->info['status']."'
AND language_id ='".(int)$lang['languages_id']."'
");
return xtc_db_fetch_array($status_query);
}
//BOF - web28 - 2010-01-15 - Steuersatz Coupon/Rabatt neu berechnen
//Der Steuersatz muss anhand der Posten mit unterschiedlichen Steuersätzen anteilig berechnet werden
function calculate_tax($amount) {
global $xtPrice, $status;
ca. Zeile 1073
}
//EOF - web28 - 2010-01-15 - Steuersatz Coupon/Rabatt neu berechnen
//BOC - web28 - 2012-01-20 - FIX order tax
function get_c_infos($customers_id, $delivery_country_iso_code_2) {
$countries_query = xtc_db_query("select c.countries_id
from " . TABLE_COUNTRIES . " c
where c.countries_iso_code_2 = '" . $delivery_country_iso_code_2 . "'
");
$countries = xtc_db_fetch_array($countries_query);
$zone_id = '';
if($countries['countries_id'] > 0) {
$zones_query = xtc_db_query("select z.zone_id
from " . TABLE_ORDERS . " o,
" . TABLE_ZONES . " z
where o.customers_id = '" . $customers_id . "'
and z.zone_country_id = '" . $countries['countries_id'] . "'
and z.zone_name = o.delivery_state
");
$zones = xtc_db_fetch_array($zones_query);
$zone_id = $zones['zone_id'];
}
$c_info_array = array('country_id' => $countries['countries_id'],
'zone_id' => $zone_id
);
return $c_info_array;
}
//EOC - web28 - 2012-01-20 - FIX order tax
//--------------------------------------------------------------------------------------------------------------------------------------
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
admin/orders_edit_address.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: orders_edit.php,v 1.0
$Id: orders_edit_address.php 2748 2012-04-10 15:31:07Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
ca. Zeile 18
Released under the GNU General Public License
--------------------------------------------------------------*/
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
?>
<!-- Adressbearbeitung Anfang //-->
<?php if ($_GET['edit_action']=='address'){
<?php
if ($_GET['edit_action']=='address'){
echo xtc_draw_form('adress_edit', FILENAME_ORDERS_EDIT, 'action=address_edit', 'post');
echo xtc_draw_hidden_field('oID', $_GET['oID']);
echo xtc_draw_hidden_field('cID', $order->customer['ID']);
ca. Zeile 145
<td class="dataTableContent" align="left">
<?php echo TEXT_COUNTRY;?>
</td>
<td class="dataTableContent" align="left">
<?php echo xtc_draw_pull_down_menu('customers_country_id', xtc_get_countries(), $customer_countries_id);?>
<?php echo xtc_draw_pull_down_menu('customers_country_id', xtc_get_countries('',1), $customer_countries_id);?>
</td>
<td class="dataTableContent" align="left">
<?php echo xtc_draw_pull_down_menu('delivery_country_id', xtc_get_countries(), $delivery_countries_id);?>
<?php echo xtc_draw_pull_down_menu('delivery_country_id', xtc_get_countries('',1), $delivery_countries_id);?>
</td>
<td class="dataTableContent" align="left">
<?php echo xtc_draw_pull_down_menu('billing_country_id', xtc_get_countries(), $billing_countries_id);?>
<?php echo xtc_draw_pull_down_menu('billing_country_id', xtc_get_countries('',1), $billing_countries_id);?>
</td>
</tr>
<tr class="dataTableRow">
ca. Zeile 205
</td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent" align="left" colspan="4">
<?php echo '<input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_UPDATE . '"/>'; ?>
<td class="dataTableContent" align="right" colspan="4">
<?php echo '<input type="submit" class="button" onclick="this.blur();" value="' . TEXT_SAVE_CUSTOMERS_DATA . '"/>'; ?>
</td>
</tr>
<tr>
ca. Zeile 218
<td class="dataTableHeadingContent" width="30%" align="left"> </td>
</tr>
</table>
</form>
<br /><br />
<?php } ?>
<br />
<br />
<?php
}
?>
<!-- Adressbearbeitung Ende //-->
admin/print_order.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: print_order.php 1166 2005-08-21 00:52:02Z mz $
$Id: print_order.php 2522 2011-12-14 13:45:11Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2003 nextcommerce (print_order.php,v 1.1 2003/08/19); www.nextcommerce.org
(c) 2006 XT-Commerce (print_order.php 1166 2005-08-21)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require('includes/application_top.php');
// include needed functions
require_once(DIR_FS_INC .'xtc_get_order_data.inc.php');
require_once(DIR_FS_INC .'xtc_get_attributes_model.inc.php');
require_once(DIR_FS_INC .'xtc_not_null.inc.php');
require_once(DIR_FS_INC .'xtc_format_price_order.inc.php');
$smarty = new Smarty;
$order_query_check = xtc_db_query("SELECT
customers_id
FROM ".TABLE_ORDERS."
WHERE orders_id='".(int)$_GET['oID']."'");
$order_check = xtc_db_fetch_array($order_query_check);
// if ($_SESSION['customer_id'] == $order_check['customers_id'])
// {
// get order data
// BOF - DokuMan - 2011-12-08 - get store name for display in letter box of packing slip
$query_store_name=xtc_db_query("-- admin/print_order.php
SELECT configuration_value AS store_name
FROM " . TABLE_CONFIGURATION . "
WHERE configuration_key='STORE_NAME'
LIMIT 1");
include(DIR_WS_CLASSES . 'order.php');
$order = new order($_GET['oID']);
while($row = xtc_db_fetch_array($query_store_name)){
$smarty->assign('store_name', $row['store_name']);
}
// EOF - DokuMan - 2011-12-08 - get store name for display in letter box of packing slip
// get order data
include(DIR_WS_CLASSES . 'order.php');
$order = new order((int)$_GET['oID']);
$smarty->assign('address_label_customer',xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
$smarty->assign('address_label_shipping',xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
$smarty->assign('address_label_payment',xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
ca. Zeile 39
$smarty->assign('address_label_customer',xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
$smarty->assign('address_label_shipping',xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
$smarty->assign('address_label_payment',xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
$smarty->assign('csID',$order->customer['csID']);
// get products data
$order_query=xtc_db_query("SELECT
products_id,
orders_products_id,
products_model,
products_name,
final_price,
products_quantity
FROM ".TABLE_ORDERS_PRODUCTS."
WHERE orders_id='".(int)$_GET['oID']."'");
$order_data=array();
while ($order_data_values = xtc_db_fetch_array($order_query)) {
$attributes_query=xtc_db_query("SELECT
products_options,
products_options_values,
price_prefix,
options_values_price
FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES."
WHERE orders_products_id='".$order_data_values['orders_products_id']."'");
$attributes_data='';
$attributes_model='';
while ($attributes_data_values = xtc_db_fetch_array($attributes_query)) {
$attributes_data .='<br />'.$attributes_data_values['products_options'].':'.$attributes_data_values['products_options_values'];
$attributes_model .='<br />'.xtc_get_attributes_model($order_data_values['products_id'],$attributes_data_values['products_options_values'],$attributes_data_values['products_options']);
}
$order_data[]=array(
'PRODUCTS_MODEL' => $order_data_values['products_model'],
'PRODUCTS_NAME' => $order_data_values['products_name'],
'PRODUCTS_ATTRIBUTES' => $attributes_data,
'PRODUCTS_ATTRIBUTES_MODEL' => $attributes_model,
'PRODUCTS_PRICE' => xtc_format_price_order($order_data_values['final_price'],1,$order->info['currency']),
'PRODUCTS_QTY' => $order_data_values['products_quantity']);
}
// get order_total data
$order_total_query=xtc_db_query("SELECT
title,
text,
class,
value,
sort_order
FROM ".TABLE_ORDERS_TOTAL."
WHERE orders_id='".$_GET['oID']."'
ORDER BY sort_order ASC");
$order_total=array();
while ($order_total_values = xtc_db_fetch_array($order_total_query)) {
$order_total[]=array(
'TITLE' => $order_total_values['title'],
'CLASS'=> $order_total_values['class'],
'VALUE'=> $order_total_values['value'],
'TEXT' => $order_total_values['text']);
if ($order_total_values['class']='ot_total') $total=$order_total_values['value'];
}
include_once(DIR_FS_CATALOG.DIR_WS_CLASSES .'xtcPrice.php');
$xtPrice = new xtcPrice($order->info['currency'], $order->info['status']);
$order_total = $order->getTotalData($order->info['order_id']);
$smarty->assign('order_data', $order->getOrderData($order->info['order_id']));
$smarty->assign('order_total', $order_total['data']);
// assign language to template for caching
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('charset', $_SESSION['language_charset'] );
$smarty->assign('logo_path',HTTP_SERVER . DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');
$smarty->assign('oID',$_GET['oID']);
$smarty->assign('oID',$order->info['order_id']);
if ($order->info['payment_method']!='' && $order->info['payment_method']!='no_payment') {
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
$payment_method=constant(strtoupper('MODULE_PAYMENT_'.$order->info['payment_method'].'_TEXT_TITLE'));
$smarty->assign('PAYMENT_METHOD',$payment_method);
}
$smarty->assign('COMMENTS', $order->info['comments']);
$smarty->assign('DATE',xtc_date_long($order->info['date_purchased']));
$smarty->assign('order_data', $order_data);
$smarty->assign('order_total', $order_total);
// dont allow cache
$smarty->caching = false;
$smarty->template_dir=DIR_FS_CATALOG.'templates';
$smarty->compile_dir=DIR_FS_CATALOG.'templates_c';
$smarty->config_dir=DIR_FS_CATALOG.'lang';
$smarty->display(CURRENT_TEMPLATE . '/admin/print_order.html');
// } else {
// $smarty->display(CURRENT_TEMPLATE . '/error_message.html');
// }
?>
admin/print_packingslip.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: print_packingslip.php 899 2005-04-29 02:40:57Z hhgag $
$Id: print_packingslip.php 2522 2011-12-14 13:45:11Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2003 nextcommerce (print_order.php,v 1.1 2003/08/19); www.nextcommerce.org
(c) 2003 nextcommerce (print_packingslip.php,v 1.1 2003/08/19); www.nextcommerce.org
(c) 2006 XT-Commerce (print_packingslip.php 899 2005-04-29)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require('includes/application_top.php');
// include needed functions
require_once(DIR_FS_INC .'xtc_get_order_data.inc.php');
require_once(DIR_FS_INC .'xtc_get_attributes_model.inc.php');
require_once(DIR_FS_INC .'xtc_not_null.inc.php');
require_once(DIR_FS_INC .'xtc_format_price_order.inc.php');
$smarty = new Smarty;
$order_query_check = xtc_db_query("SELECT
customers_id
FROM ".TABLE_ORDERS."
WHERE orders_id='".(int)$_GET['oID']."'");
$order_check = xtc_db_fetch_array($order_query_check);
// if ($_SESSION['customer_id'] == $order_check['customers_id'])
// {
// get order data
// BOF - DokuMan - 2011-12-08 - get store name for display in letter box of packing slip
$query_store_name=xtc_db_query("-- admin/print_packingslip.php
SELECT configuration_value AS store_name
FROM " . TABLE_CONFIGURATION . "
WHERE configuration_key='STORE_NAME'
LIMIT 1");
include(DIR_WS_CLASSES . 'order.php');
$order = new order($_GET['oID']);
while($row = xtc_db_fetch_array($query_store_name)){
$smarty->assign('store_name', $row['store_name']);
}
// EOF - DokuMan - 2011-12-08 - get store name for display in letter box of packing slip
// get order data
include(DIR_WS_CLASSES . 'order.php');
$order = new order((int)$_GET['oID']);
$smarty->assign('address_label_customer',xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
$smarty->assign('address_label_shipping',xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
$smarty->assign('address_label_payment',xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
ca. Zeile 39
$smarty->assign('address_label_customer',xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
$smarty->assign('address_label_shipping',xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
$smarty->assign('address_label_payment',xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
$smarty->assign('csID',$order->customer['csID']);
// get products data
$order_query=xtc_db_query("SELECT
products_id,
orders_products_id,
products_model,
products_name,
final_price,
products_quantity
FROM ".TABLE_ORDERS_PRODUCTS."
WHERE orders_id='".(int)$_GET['oID']."'");
$order_data=array();
while ($order_data_values = xtc_db_fetch_array($order_query)) {
$attributes_query=xtc_db_query("SELECT
products_options,
products_options_values,
price_prefix,
options_values_price
FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES."
WHERE orders_products_id='".$order_data_values['orders_products_id']."'");
$attributes_data='';
$attributes_model='';
while ($attributes_data_values = xtc_db_fetch_array($attributes_query)) {
$attributes_data .='<br />'.$attributes_data_values['products_options'].':'.$attributes_data_values['products_options_values'];
$attributes_model .='<br />'.xtc_get_attributes_model($order_data_values['products_id'],$attributes_data_values['products_options_values'],$attributes_data_values['products_options']);
}
$order_data[]=array(
'PRODUCTS_MODEL' => $order_data_values['products_model'],
'PRODUCTS_NAME' => $order_data_values['products_name'],
'PRODUCTS_ATTRIBUTES' => $attributes_data,
'PRODUCTS_ATTRIBUTES_MODEL' => $attributes_model,
'PRODUCTS_PRICE' => xtc_format_price_order($order_data_values['final_price'],1,$order->info['currency']),
'PRODUCTS_QTY' => $order_data_values['products_quantity']);
}
// get order_total data
$order_total_query=xtc_db_query("SELECT
title,
text,
class,
value,
sort_order
FROM ".TABLE_ORDERS_TOTAL."
WHERE orders_id='".$_GET['oID']."'
ORDER BY sort_order ASC");
$order_total=array();
while ($order_total_values = xtc_db_fetch_array($order_total_query)) {
$order_total[]=array(
'TITLE' => $order_total_values['title'],
'CLASS'=> $order_total_values['class'],
'VALUE'=> $order_total_values['value'],
'TEXT' => $order_total_values['text']);
if ($order_total_values['class']='ot_total') $total=$order_total_values['value'];
}
include_once(DIR_FS_CATALOG.DIR_WS_CLASSES .'xtcPrice.php');
$xtPrice = new xtcPrice($order->info['currency'], $order->info['status']);
$order_total = $order->getTotalData($order->info['order_id']);
$smarty->assign('order_data', $order->getOrderData($order->info['order_id']));
$smarty->assign('order_total', $order_total['data']);
// assign language to template for caching
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('charset', $_SESSION['language_charset'] );
$smarty->assign('logo_path',HTTP_SERVER . DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');
$smarty->assign('oID',$_GET['oID']);
$smarty->assign('oID',$order->info['order_id']);
if ($order->info['payment_method']!='' && $order->info['payment_method']!='no_payment') {
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
$payment_method=constant(strtoupper('MODULE_PAYMENT_'.$order->info['payment_method'].'_TEXT_TITLE'));
$smarty->assign('PAYMENT_METHOD',$payment_method);
}
$smarty->assign('COMMENTS', $order->info['comments']);
$smarty->assign('DATE',xtc_date_long($order->info['date_purchased']));
$smarty->assign('order_data', $order_data);
$smarty->assign('order_total', $order_total);
// dont allow cache
$smarty->caching = false;
$smarty->template_dir=DIR_FS_CATALOG.'templates';
$smarty->compile_dir=DIR_FS_CATALOG.'templates_c';
$smarty->config_dir=DIR_FS_CATALOG.'lang';
$smarty->display(CURRENT_TEMPLATE . '/admin/print_packingslip.html');
// } else {
// $smarty->display(CURRENT_TEMPLATE . '/error_message.html');
// }
?>
advanced_search_result.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: advanced_search_result.php 1141 2005-08-10 11:31:36Z novalis $
$Id: advanced_search_result.php 2902 2012-05-23 16:29:21Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2005 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(advanced_search_result.php,v 1.68 2003/05/14); www.oscommerce.com
(c) 2003 nextcommerce (advanced_search_result.php,v 1.17 2003/08/21); www.nextcommerce.org
(c) 2006 XT-Commerce (advanced_search_result.php 1141 2005-08-10)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 25
require_once (DIR_FS_INC.'xtc_parse_search_string.inc.php');
require_once (DIR_FS_INC.'xtc_get_subcategories.inc.php');
require_once (DIR_FS_INC.'xtc_get_currencies_values.inc.php');
/*
* check search entry
*/
$error = 0; // reset error flag to false
// security fix
//set $_GET variables for function xtc_get_all_get_params()
$keywords = $_GET['keywords'] = isset($_GET['keywords']) && !empty($_GET['keywords']) ? stripslashes(trim(urldecode($_GET['keywords']))) : false;
$pfrom = $_GET['pfrom'] = isset($_GET['pfrom']) && !empty($_GET['pfrom']) ? stripslashes($_GET['pfrom']) : false;
$pto = $_GET['pto'] = isset($_GET['pto']) && !empty($_GET['pto']) ? stripslashes($_GET['pto']) : false;
$manufacturers_id = $_GET['manufacturers_id'] = isset($_GET['manufacturers_id']) && xtc_not_null($_GET['manufacturers_id']) ? (int)$_GET['manufacturers_id'] : false;
$categories_id = $_GET['categories_id'] = isset($_GET['categories_id']) && xtc_not_null($_GET['categories_id']) ? (int)$_GET['categories_id'] : false;
$_GET['inc_subcat'] = isset($_GET['inc_subcat']) && xtc_not_null($_GET['inc_subcat']) ? (int)$_GET['inc_subcat'] : 0;
// reset error
$errorno = 0;
$keyerror = 0;
$_GET['keywords'] = urldecode($_GET['keywords']); // web28 - 2011-03-27 - FIX page search results -> urldecode($_GET['keywords'])
if (isset ($_GET['keywords']) && empty ($_GET['keywords'])) {
$keyerror = 1;
}
if ((isset ($_GET['keywords']) && empty ($_GET['keywords'])) && (isset ($_GET['pfrom']) && empty ($_GET['pfrom'])) && (isset ($_GET['pto']) && empty ($_GET['pto']))) {
$errorno += 1;
$error = 1;
}
elseif (isset ($_GET['keywords']) && empty ($_GET['keywords']) && !(isset ($_GET['pfrom'])) && !(isset ($_GET['pto']))) {
// error check
if ($keywords && strlen($keywords) < 3 && strlen($keywords) > 0) {
$errorno += 1;
$error = 1;
}
if (strlen($_GET['keywords']) < 3 && strlen($_GET['keywords']) > 0 && $error == 0) {
if (!$keywords && !$pfrom && !$pto) {
$errorno += 1;
$error = 1;
$keyerror = 1;
}
if (strlen($_GET['pfrom']) > 0) {
$pfrom_to_check = xtc_db_input($_GET['pfrom']);
if (!settype($pfrom_to_check, "double")) {
if ($pfrom && !settype($pfrom, "float")) {
$errorno += 10000;
$error = 1;
}
}
if (strlen($_GET['pto']) > 0) {
$pto_to_check = $_GET['pto'];
if (!settype($pto_to_check, "double")) {
if ($pto && !settype($pto, "float")) {
$errorno += 100000;
$error = 1;
}
}
if (strlen($_GET['pfrom']) > 0 && !(($errorno & 10000) == 10000) && strlen($_GET['pto']) > 0 && !(($errorno & 100000) == 100000)) {
if ($pfrom_to_check > $pto_to_check) {
if ($pfrom && !(($errorno & 10000) == 10000) && $pto && !(($errorno & 100000) == 100000) && $pfrom > $pto) {
$errorno += 1000000;
$error = 1;
}
}
if (strlen($_GET['keywords']) > 0) {
if (!xtc_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
if ($keywords && !xtc_parse_search_string($keywords, $search_keywords)) {
$errorno += 10000000;
$error = 1;
$keyerror = 1;
}
}
if ($error == 1 && $keyerror != 1) {
xtc_redirect(xtc_href_link(FILENAME_ADVANCED_SEARCH, 'errorno='.$errorno.'&'.xtc_get_all_get_params(array ('x', 'y'))));
if ($errorno) {
xtc_redirect(xtc_href_link(FILENAME_ADVANCED_SEARCH, 'errorno='.$errorno.'&'.xtc_get_all_get_params()));
} else {
/*
* search process starts here
*/
// build breadcrumb
$breadcrumb->add(NAVBAR_TITLE1_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH));
$breadcrumb->add(NAVBAR_TITLE2_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords='.htmlspecialchars(xtc_db_input($_GET['keywords'])) .'&search_in_description='.xtc_db_input($_GET['search_in_description']).'&categories_id='.(int)$_GET['categories_id'].'&inc_subcat='.xtc_db_input($_GET['inc_subcat']).'&manufacturers_id='.(int)$_GET['manufacturers_id'].'&pfrom='.xtc_db_input($_GET['pfrom']).'&pto='.xtc_db_input($_GET['pto']).'&dfrom='.xtc_db_input($_GET['dfrom']).'&dto='.xtc_db_input($_GET['dto'])));
$breadcrumb->add(NAVBAR_TITLE2_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, xtc_get_all_get_params()));
require (DIR_WS_INCLUDES.'header.php');
// define additional filters //
// default values
$subcat_join = '';
$subcat_where = '';
$tax_where = '';
$cats_list = '';
$left_join = '';
//fsk18 lock
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
$fsk_lock = " AND p.products_fsk18 != '1' ";
} else {
unset ($fsk_lock);
}
$fsk_lock = $_SESSION['customers_status']['customers_fsk18_display'] == '0' ? " AND p.products_fsk18 != '1' " : "";
//group check
if (GROUP_CHECK == 'true') {
$group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
} else {
unset ($group_check);
}
$group_check = GROUP_CHECK == 'true' ? " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 " : "";
//manufacturers if set
if (isset ($_GET['manufacturers_id']) && xtc_not_null($_GET['manufacturers_id'])) {
$manu_check = " AND p.manufacturers_id = '".(int)$_GET['manufacturers_id']."' ";
}
// manufacturers check
$manu_check = $manufacturers_id !== false ? " AND p.manufacturers_id = '".$manufacturers_id."' " : "";
//include subcategories if needed
if (isset ($_GET['categories_id']) && xtc_not_null($_GET['categories_id'])) {
if ($categories_id !== false) {
if ($_GET['inc_subcat'] == '1') {
$subcategories_array = array ();
xtc_get_subcategories($subcategories_array, (int)$_GET['categories_id']);
xtc_get_subcategories($subcategories_array, $categories_id);
$subcat_join = " LEFT OUTER JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." AS p2c ON (p.products_id = p2c.products_id) ";
$subcat_where = " AND p2c.categories_id IN ('".(int) $_GET['categories_id']."' ";
$subcat_where = " AND p2c.categories_id IN ('".$categories_id."' ";
foreach ($subcategories_array AS $scat) {
$subcat_where .= ", '".$scat."'";
}
$subcat_where .= ") ";
} else {
$subcat_join = " LEFT OUTER JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." AS p2c ON (p.products_id = p2c.products_id) ";
$subcat_where = " AND p2c.categories_id = '".(int) $_GET['categories_id']."' ";
$subcat_where = " AND p2c.categories_id = '".$categories_id."' ";
}
}
if ($_GET['pfrom'] || $_GET['pto']) {
// price by currency
if ($pfrom || $pto) {
$rate = xtc_get_currencies_values($_SESSION['currency']);
$rate = $rate['value'];
if ($rate && $_GET['pfrom'] != '') {
$pfrom = $_GET['pfrom'] / $rate;
if ($rate && $pfrom) {
$pfrom = $pfrom / $rate;
}
if ($rate && $_GET['pto'] != '') {
$pto = $_GET['pto'] / $rate;
if ($rate && $pto) {
$pto = $pto / $rate;
}
}
//price filters
if (($pfrom != '') && (is_numeric($pfrom))) {
$pfrom_check = " AND (IF(s.status = '1' AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) >= ".$pfrom.") ";
} else {
unset ($pfrom_check);
}
if (($pto != '') && (is_numeric($pto))) {
$pto_check = " AND (IF(s.status = '1' AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) <= ".$pto." ) ";
} else {
unset ($pto_check);
}
$pfrom_check = $pfrom && is_numeric($pfrom) ? " AND (IF(s.status = 1 AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) >= ".$pfrom.") " : "";
$pto_check = $pto && is_numeric($pto) ? " AND (IF(s.status = 1 AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) <= ".$pto." ) " : "";
//build query
//BOF - Hetfield - 2009-08-11 - BUGFIX: vpe in advanced_search_result
$select_str = "SELECT distinct
p.products_id,
p.products_price,
p.products_model,
p.products_ean,
p.products_quantity,
p.products_shippingtime,
p.products_fsk18,
p.products_model,
p.products_image,
p.products_price,
p.products_weight,
p.products_tax_class_id,
p.products_fsk18,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
pd.products_name,
pd.products_short_description,
pd.products_description ";
//EOF - Hetfield - 2009-08-11 - BUGFIX: vpe in advanced_search_result
$from_str = "FROM ".TABLE_PRODUCTS." AS p LEFT JOIN ".TABLE_PRODUCTS_DESCRIPTION." AS pd ON (p.products_id = pd.products_id) ";
$from_str .= $subcat_join;
if (SEARCH_IN_ATTR == 'true') { $from_str .= " LEFT OUTER JOIN ".TABLE_PRODUCTS_ATTRIBUTES." AS pa ON (p.products_id = pa.products_id) LEFT OUTER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." AS pov ON (pa.options_values_id = pov.products_options_values_id) "; }
$from_str .= SEARCH_IN_ATTR == 'true' ? " LEFT OUTER JOIN ".TABLE_PRODUCTS_ATTRIBUTES." AS pa ON (p.products_id = pa.products_id) LEFT OUTER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." AS pov ON (pa.options_values_id = pov.products_options_values_id) " : "";
$from_str .= "LEFT OUTER JOIN ".TABLE_SPECIALS." AS s ON (p.products_id = s.products_id) AND s.status = '1'";
if ((DISPLAY_PRICE_WITH_TAX == 'true') && ((isset ($_GET['pfrom']) && xtc_not_null($_GET['pfrom'])) || (isset ($_GET['pto']) && xtc_not_null($_GET['pto'])))) {
if (defined('DISPLAY_PRICE_WITH_TAX') && DISPLAY_PRICE_WITH_TAX == 'true' && ($pfrom || $pto)) {
if (!isset ($_SESSION['customer_country_id'])) {
$_SESSION['customer_country_id'] = STORE_COUNTRY;
$_SESSION['customer_zone_id'] = STORE_ZONE;
}
$from_str .= " LEFT OUTER JOIN ".TABLE_TAX_RATES." tr ON (p.products_tax_class_id = tr.tax_class_id) LEFT OUTER JOIN ".TABLE_ZONES_TO_GEO_ZONES." gz ON (tr.tax_zone_id = gz.geo_zone_id) ";
$tax_where = " AND (gz.zone_country_id IS NULL OR gz.zone_country_id = '0' OR gz.zone_country_id = '".(int) $_SESSION['customer_country_id']."') AND (gz.zone_id is null OR gz.zone_id = '0' OR gz.zone_id = '".(int) $_SESSION['customer_zone_id']."')";
} else {
unset ($tax_where);
}
//where-string
$where_str = " WHERE p.products_status = '1' "." AND pd.language_id = '".(int) $_SESSION['languages_id']."'".$subcat_where.$fsk_lock.$manu_check.$group_check.$tax_where.$pfrom_check.$pto_check;
$where_str = "
WHERE p.products_status = 1
AND pd.language_id = '".$_SESSION['languages_id']."'"
.$subcat_where
.$fsk_lock
.$manu_check
.$group_check
.$tax_where
.$pfrom_check
.$pto_check;
//go for keywords... this is the main search process
if (isset ($_GET['keywords']) && xtc_not_null($_GET['keywords'])) {
if (xtc_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
if ($keywords) {
if (xtc_parse_search_string($keywords, $search_keywords)) {
$where_str .= " AND ( ";
for ($i = 0, $n = sizeof($search_keywords); $i < $n; $i ++) {
switch ($search_keywords[$i]) {
case '(' :
ca. Zeile 213
case 'or' :
$where_str .= " ".$search_keywords[$i]." ";
break;
default :
// BOF - Dokuman - 2009-05-27 - search for umlaut letters
//see http://www.gunnart.de/tipps-und-tricks/xtcommerce-suche-nach-umlauten/
/*
$where_str .= " ( ";
$where_str .= "pd.products_keywords LIKE ('%".addslashes($search_keywords[$i])."%') ";
if (SEARCH_IN_DESC == 'true') {
$where_str .= "OR pd.products_description LIKE ('%".addslashes($search_keywords[$i])."%') ";
$where_str .= "OR pd.products_short_description LIKE ('%".addslashes($search_keywords[$i])."%') ";
}
$where_str .= "OR pd.products_name LIKE ('%".addslashes($search_keywords[$i])."%') ";
$where_str .= "OR p.products_model LIKE ('%".addslashes($search_keywords[$i])."%') ";
if (SEARCH_IN_ATTR == 'true') {
$where_str .= "OR (pov.products_options_values_name LIKE ('%".addslashes($search_keywords[$i])."%') ";
$where_str .= "AND pov.language_id = '".(int) $_SESSION['languages_id']."')";
}
*/
// Wurde nach Umlauten gesucht?
$ent_keyword = htmlentities($search_keywords[$i]);
$ent_keyword = ($ent_keyword != $search_keywords[$i]) ? addslashes($ent_keyword) : false;
// addslashes langt einmal ...
$ent_keyword = htmlentities($search_keywords[$i]); // umlauts
$ent_keyword = $ent_keyword != $search_keywords[$i] ? addslashes($ent_keyword) : false;
$keyword = addslashes($search_keywords[$i]);
$where_str .= " ( ";
$where_str .= "pd.products_keywords LIKE ('%".$keyword."%') ";
$where_str .= ($ent_keyword) ? "OR pd.products_keywords LIKE ('%".$ent_keyword."%') " : '';
$where_str .= $ent_keyword ? "OR pd.products_keywords LIKE ('%".$ent_keyword."%') " : '';
if (SEARCH_IN_DESC == 'true') {
$where_str .= "OR pd.products_description LIKE ('%".$keyword."%') ";
$where_str .= ($ent_keyword) ? "OR pd.products_description LIKE ('%".$ent_keyword."%') " : '';
$where_str .= $ent_keyword ? "OR pd.products_description LIKE ('%".$ent_keyword."%') " : '';
$where_str .= "OR pd.products_short_description LIKE ('%".$keyword."%') ";
$where_str .= ($ent_keyword) ? "OR pd.products_short_description LIKE ('%".$ent_keyword."%') " : '';
$where_str .= $ent_keyword ? "OR pd.products_short_description LIKE ('%".$ent_keyword."%') " : '';
}
$where_str .= "OR pd.products_name LIKE ('%".$keyword."%') ";
$where_str .= ($ent_keyword) ? "OR pd.products_name LIKE ('%".$ent_keyword."%') " : '';
$where_str .= $ent_keyword ? "OR pd.products_name LIKE ('%".$ent_keyword."%') " : '';
$where_str .= "OR p.products_model LIKE ('%".$keyword."%') ";
$where_str .= ($ent_keyword) ? "OR p.products_model LIKE ('%".$ent_keyword."%') " : '';
$where_str .= $ent_keyword ? "OR p.products_model LIKE ('%".$ent_keyword."%') " : '';
$where_str .= "OR p.products_ean LIKE ('%".$keyword."%') ";
$where_str .= $ent_keyword ? "OR p.products_ean LIKE ('%".$ent_keyword."%') " : '';
if (SEARCH_IN_ATTR == 'true') {
$where_str .= "OR (pov.products_options_values_name LIKE ('%".$keyword."%') ";
$where_str .= ($ent_keyword) ? "OR pov.products_options_values_name LIKE ('%".$ent_keyword."%') " : '';
$where_str .= "AND pov.language_id = '".(int) $_SESSION['languages_id']."')";
$where_str .= "AND pov.language_id = '".$_SESSION['languages_id']."')";
}
// EOF - Dokuman - 2009-05-27 - search for umlaut letters
$where_str .= " ) ";
break;
}
ca. Zeile 267
}
//glue together
$listing_sql = $select_str.$from_str.$where_str;
$_GET['keywords'] = urlencode($keywords);
require (DIR_WS_MODULES.FILENAME_PRODUCT_LISTING);
require (DIR_WS_INCLUDES.'header.php');
}
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
if (!defined(RM))
if (!defined('RM')) {
$smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');
?>
checkout_confirmation.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: checkout_confirmation.php 1277 2005-10-01 17:02:59Z mz $
$Id: checkout_confirmation.php 2791 2012-04-27 13:10:18Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(checkout_confirmation.php,v 1.137 2003/05/07); www.oscommerce.com
(c) 2003 nextcommerce (checkout_confirmation.php,v 1.21 2003/08/17); www.nextcommerce.org
(c) 2006 XT-Commerce (checkout_confirmation.php 1277 2005-10-01)
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contributions:
ca. Zeile 22
Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
Released under the GNU General Public License
ca. Zeile 76
$_SESSION['cot_gv'] = true;
// if conditions are not accepted, redirect the customer to the payment method selection page
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
if ($_POST['conditions'] == false) {
if (!isset($_POST['conditions']) || $_POST['conditions'] == false) {
$error = str_replace('\n', '<br />', ERROR_CONDITIONS_NOT_ACCEPTED);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($error), 'SSL', true, false));
}
}
// load the selected payment module
require (DIR_WS_CLASSES . 'payment.php');
require_once (DIR_WS_CLASSES . 'payment.php');
if (isset ($_SESSION['credit_covers']) || !isset($_SESSION['payment'])) { //DokuMan - 2010-10-14 - check that payment is not yet set
$_SESSION['payment'] = 'no_payment'; // GV Code Start/End ICW added for CREDIT CLASS
}
$payment_modules = new payment($_SESSION['payment']);
ca. Zeile 103
$order_total_modules->pre_confirmation_check();
// GV Code End
// GV Code line changed
if ((is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && (!isset($$_SESSION['payment']) || !is_object($$_SESSION['payment'])) && (!isset($_SESSION['credit_covers']))) || (isset($$_SESSION['payment']) && is_object($$_SESSION['payment']) && ($$_SESSION['payment']->enabled == false))) {
//if ((is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && (!is_object($$_SESSION['payment'])) && (!isset ($_SESSION['credit_covers']))) || (is_object($$_SESSION['payment']) && ($$_SESSION['payment']->enabled == false))) {
if(isset($_SESSION['payment']) && $_SESSION['payment'] != 'no_payment') { //web28 - 2012-04-27 - fix for coupon amount == order total
if ((is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && (!is_object($$_SESSION['payment'])) && (!isset ($_SESSION['credit_covers']))) || (is_object($$_SESSION['payment']) && ($$_SESSION['payment']->enabled == false))) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
}
}
if (is_array($payment_modules->modules))
if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}
// load the selected shipping module
require (DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($_SESSION['shipping']);
// Stock Check
$any_out_of_stock = false;
if (STOCK_CHECK == 'true') {
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
if (xtc_check_stock($order->products[$i]['id'], $order->products[$i]['qty']))
if (xtc_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
$any_out_of_stock = true;
}
}
// Out of Stock
if ((STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true))
if ((STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true)) {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
}
}
$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_CONFIRMATION, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_CONFIRMATION);
require (DIR_WS_INCLUDES . 'header.php');
if (SHOW_IP_LOG == 'true') {
$smarty->assign('IP_LOG', 'true');
if ($_SERVER["HTTP_X_FORWARDED_FOR"]) {
$customers_ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {
$customers_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$customers_ip = $_SERVER["REMOTE_ADDR"];
$customers_ip = $_SERVER['REMOTE_ADDR'];
}
$smarty->assign('CUSTOMERS_IP', $customers_ip);
}
$smarty->assign('DELIVERY_LABEL', xtc_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'));
if ($_SESSION['credit_covers'] != '1') {
if (!isset($_SESSION['credit_covers']) || $_SESSION['credit_covers'] != '1') {
$smarty->assign('BILLING_LABEL', xtc_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'));
}
$smarty->assign('PRODUCTS_EDIT', xtc_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL')); // web28 - 2011-04-14 - change SSL -> NONSSL
$smarty->assign('SHIPPING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
ca. Zeile 149
$smarty->assign('SHIPPING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
$smarty->assign('BILLING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
if ($_SESSION['sendto'] != false) {
if ($order->info['shipping_method']) {
$smarty->assign('SHIPPING_METHOD', $order->info['shipping_method']);
$smarty->assign('SHIPPING_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}
}
if (sizeof($order->info['tax_groups']) > 1) {
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
}
} else {
}
$data_products = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
// BOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
if (file_exists(DIR_WS_LANGUAGES.$_SESSION['language'].'/checkout_confirmation.php')) {
$data_products.= '<tr>' . "\n" . ' <td class="main_header" align="left" valign="top"><b>' . HEADER_QTY . '</b></td>'
. "\n" . ' <td class="main_header" align="left" valign="top"><b>' . HEADER_ARTICLE . '</b></td>'
. "\n" . ' <td class="main_header" align="right" valign="top"><b>' . HEADER_SINGLE . '</b></td>'
. "\n" . ' <td class="main_header" align="right" valign="top"><b>' . HEADER_TOTAL . '</b></td>
</tr>' . "\n";
}
// EOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
// BOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
// $data_products .= '<tr>' . "\n" . ' <td class="main" align="left" valign="top">' . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . '</td>' . "\n" . ' <td class="main" align="right" valign="top">' . $xtPrice->xtcFormat($order->products[$i]['final_price'], true) . '</td></tr>' . "\n";
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
$data_products .= '<tr>' . "\n" . ' <td class="main_row" align="left" valign="top">' . $order->products[$i]['qty'] . ' x ' . '</td>'
. "\n" . ' <td class="main_row" align="left" valign="top">' . $order->products[$i]['name'] . '</td>'
. "\n" . ' <td class="main_row" align="right" valign="top">' . $xtPrice->xtcFormat($order->products[$i]['price'], true) . '</td>'
. "\n" . ' <td class="main_row" align="right" valign="top">' . $xtPrice->xtcFormat($order->products[$i]['final_price'], true) . '</td>
. "\n" . ' <td class="main_row" align="right" valign="top"><nobr>' . $xtPrice->xtcFormat($order->products[$i]['price'], true) . '</nobr></td>'
. "\n" . ' <td class="main_row" align="right" valign="top"><nobr>' . $xtPrice->xtcFormat($order->products[$i]['final_price'], true) . '</nobr></td>
</tr>' . "\n";
// EOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
if (ACTIVATE_SHIPPING_STATUS == 'true') {
// BOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
/*
$data_products .= '<tr>
<td class="main" align="left" valign="top">
<nobr><small>' . SHIPPING_TIME . $order->products[$i]['shipping_time'] . '
</small><nobr></td>
<td class="main" align="right" valign="top"> </td></tr>';
*/
if (ACTIVATE_SHIPPING_STATUS == 'true') {
$data_products .= '<tr>
<td class="main" align="left" valign="top"> </td>
<td class="main" align="left" valign="top">
<nobr><small>' . SHIPPING_TIME . $order->products[$i]['shipping_time'] . '
</small><nobr></td>
</small></nobr></td>
<td class="main" align="right" valign="top"> </td>
<td class="main" align="right" valign="top"> </td>
</tr>';
// EOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
}
if ((isset ($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
// BOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
/*
$data_products .= '<tr>
<td class="main" align="left" valign="top">
<nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '
</i></small><nobr></td>
<td class="main" align="right" valign="top"> </td></tr>';
*/
$data_products .= '<tr>
<td class="main" align="left" valign="top"> </td>
<td class="main" align="left" valign="top">
<nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '
</i></small><nobr></td>
</i></small></nobr></td>
<td class="main" align="right" valign="top"> </td>
<td class="main" align="right" valign="top"> </td></tr>';
// EOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
}
}
$data_products .= '' . "\n";
ca. Zeile 242
$data_products .= '</table>';
$smarty->assign('PRODUCTS_BLOCK', $data_products);
if ($order->info['payment_method'] != 'no_payment' && $order->info['payment_method'] != '') {
include (DIR_WS_LANGUAGES . '/' . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_method'] . '.php');
$smarty->assign('PAYMENT_METHOD', constant(MODULE_PAYMENT_ . strtoupper($order->info['payment_method']) . _TEXT_TITLE));
include_once (DIR_WS_LANGUAGES . '/' . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_method'] . '.php');
$smarty->assign('PAYMENT_METHOD', constant('MODULE_PAYMENT_' . strtoupper($order->info['payment_method']) . '_TEXT_TITLE'));
}
$smarty->assign('PAYMENT_EDIT', xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$total_block = '<table align="right">';
ca. Zeile 257
$smarty->assign('TOTAL_BLOCK', $total_block);
if (is_array($payment_modules->modules)) {
if ($confirmation = $payment_modules->confirmation()) {
$payment_info = $confirmation['title'];
if (isset($confirmation['fields'])) { //DokuMan - 2010-09-17 - Undefined index
for ($i = 0, $n = sizeof($confirmation['fields']); $i < $n; $i++) {
$payment_info .= '<table>
<tr>
$confirmation_text= isset($confirmation['fields'][$i]['field']) ? stripslashes($confirmation['fields'][$i]['field']) : ' ';
$payment_info .= '<table><tr>
<td>' . xtc_draw_separator('pixel_trans.gif', '10', '1') . '</td>
<td class="main">' . $confirmation['fields'][$i]['title'] . '</td>
<td>' . xtc_draw_separator('pixel_trans.gif', '10', '1') . '</td>
<td class="main">' . stripslashes($confirmation['fields'][$i]['field']) . '</td>
<td class="main">' .$confirmation_text. '</td>
</tr></table>';
}
}
$smarty->assign('PAYMENT_INFORMATION', $payment_info);
}
}
if (xtc_not_null($order->info['comments'])) {
ca. Zeile 277
}
if (xtc_not_null($order->info['comments'])) {
$smarty->assign('ORDER_COMMENTS', nl2br(htmlspecialchars($order->info['comments'])) . xtc_draw_hidden_field('comments', $order->info['comments']));
}
if (isset ($$_SESSION['payment']->form_action_url) && !$$_SESSION['payment']->tmpOrders) {
if (isset ($$_SESSION['payment']->form_action_url) && (!isset($$_SESSION['payment']->tmpOrders) || !$$_SESSION['payment']->tmpOrders)) {
$form_action_url = $$_SESSION['payment']->form_action_url;
} else {
$form_action_url = xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
}
$smarty->assign('CHECKOUT_FORM', xtc_draw_form('checkout_confirmation', $form_action_url, 'post'));
ca. Zeile 308
content_heading,
content_text,
content_file
FROM " . TABLE_CONTENT_MANAGER . "
WHERE content_group='" . REVOCATION_ID . "' " . $group_check . "
AND languages_id='" . $_SESSION['languages_id'] . "'";
WHERE content_group='" . REVOCATION_ID . "'
" . $group_check . "
AND languages_id='" . $_SESSION['languages_id'] . "'
LIMIT 1"; //DokuMan - 2011-05-13 - added LIMIT 1
$shop_content_query = xtc_db_query($shop_content_query);
$shop_content_data = xtc_db_fetch_array($shop_content_query);
ca. Zeile 329
}
$smarty->assign('REVOCATION', $revocation);
$smarty->assign('REVOCATION_TITLE', $shop_content_data['content_heading']);
//BOF - Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
//$smarty->assign('REVOCATION_LINK', $main->getContentLink(REVOCATION_ID, MORE_INFO));
$smarty->assign('REVOCATION_LINK', $main->getContentLink(REVOCATION_ID, MORE_INFO,'SSL'));
//EOF - Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
$smarty->assign('REVOCATION_LINK', $main->getContentLink(REVOCATION_ID, MORE_INFO,'SSL')); // Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
$shop_content_query = "SELECT
content_title,
content_heading,
content_text,
content_file
FROM " . TABLE_CONTENT_MANAGER . "
WHERE content_group='3' " . $group_check . "
AND languages_id='" . $_SESSION['languages_id'] . "'";
WHERE content_group='3'
" . $group_check . "
AND languages_id='" . $_SESSION['languages_id'] . "'
LIMIT 1"; //DokuMan - 2011-05-13 - added LIMIT 1
$shop_content_query = xtc_db_query($shop_content_query);
$shop_content_data = xtc_db_fetch_array($shop_content_query);
$smarty->assign('AGB_TITLE', $shop_content_data['content_heading']);
//BOF - Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
//$smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO));
$smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO,'SSL'));
//EOF - Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
$smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO,'SSL')); // Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
}
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;
//$smarty->assign('PAYMENT_BLOCK', $payment_block); //DokuMan - PAYMENT_BLOCK not needed in checkout_confimation
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_confirmation.html');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM'))
if (!defined('RM')) {
$smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include ('includes/application_bottom.php');
?>
checkout_payment.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: checkout_payment.php 1325 2005-10-30 10:23:32Z mz $
$Id: checkout_payment.php 2791 2012-04-27 13:10:18Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(checkout_payment.php,v 1.110 2003/03/14); www.oscommerce.com
(c) 2003 nextcommerce (checkout_payment.php,v 1.20 2003/08/17); www.nextcommerce.org
(c) 2006 XT-Commerce (checkout_payment.php 1325 2005-10-30)
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contributions:
ca. Zeile 22
Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
include ('includes/application_top.php');
//web28 - 2012-04-27 - pre-selection the first payment option
if (!defined('CHECK_FIRST_PAYMENT_MODUL')) {
define ('CHECK_FIRST_PAYMENT_MODUL', true); //true, false - default false
}
// create smarty elements
$smarty = new Smarty;
// include boxes
require (DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php');
ca. Zeile 39
require_once (DIR_FS_INC . 'xtc_address_label.inc.php');
require_once (DIR_FS_INC . 'xtc_get_address_format_id.inc.php');
require_once (DIR_FS_INC . 'xtc_check_stock.inc.php');
unset ($_SESSION['tmp_oID']);
//BOF - Dokuman - 2009-10-02 - added moneybookers payment module version 2.4
unset ($_SESSION['transaction_id']);
//EOF - Dokuman - 2009-10-02 - added moneybookers payment module version 2.4
unset ($_SESSION['transaction_id']); //Dokuman - 2009-10-02 - added moneybookers payment module version 2.4
// if the customer is not logged on, redirect them to the login page
if (!isset ($_SESSION['customer_id'])) {
if (ACCOUNT_OPTIONS == 'guest') {
xtc_redirect(xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'));
ca. Zeile 85
if (!isset ($_SESSION['billto'])) {
$_SESSION['billto'] = $_SESSION['customer_default_address_id'];
} else {
// verify the selected billing address
$check_address_query = xtc_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $_SESSION['customer_id'] . "' and address_book_id = '" . (int) $_SESSION['billto'] . "'");
$check_address_query = xtc_db_query("select count(*) as total
from " . TABLE_ADDRESS_BOOK . "
where customers_id = '" . (int) $_SESSION['customer_id'] . "'
and address_book_id = '" . (int) $_SESSION['billto'] . "'");
$check_address = xtc_db_fetch_array($check_address_query);
if ($check_address['total'] != '1') {
$_SESSION['billto'] = $_SESSION['customer_default_address_id'];
if (isset ($_SESSION['payment']))
if (isset ($_SESSION['payment'])) {
unset ($_SESSION['payment']);
}
}
}
if (!isset ($_SESSION['sendto']) || $_SESSION['sendto'] == "")
if (!isset ($_SESSION['sendto']) || $_SESSION['sendto'] == "") {
$_SESSION['sendto'] = $_SESSION['billto'];
}
require (DIR_WS_CLASSES . 'order.php');
$order = new order();
require (DIR_WS_CLASSES . 'order_total.php'); // GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
ca. Zeile 116
$_SESSION['delivery_zone'] = $order->delivery['country']['iso_code_2'];
}
// load all enabled payment modules
require (DIR_WS_CLASSES . 'payment.php');
require_once (DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment;
$order_total_modules->process();
// redirect if Coupon matches ammount
ca. Zeile 133
$smarty->assign('FORM_END', '</form>');
require (DIR_WS_INCLUDES . 'header.php');
$module_smarty = new Smarty;
if ($order->info['total'] > 0) {
$order_total = $xtPrice->xtcFormat($order->info['total'],false); //web28 2012-04-27 - rounded $order_total
if ($order_total > 0) {
if (isset ($_GET['payment_error']) && is_object(${ $_GET['payment_error'] }) && ($error = ${$_GET['payment_error']}->get_error())) {
$smarty->assign('error', htmlspecialchars($error['error']));
}
ca. Zeile 146
$radio_buttons = 0;
for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {
$selection[$i]['radio_buttons'] = $radio_buttons;
if (($selection[$i]['id'] == $payment) || ($n == 1)) {
if ((isset($_SESSION['payment']) && $selection[$i]['id'] == $_SESSION['payment']) || (!isset($_SESSION['payment']) && $i == 0 && CHECK_FIRST_PAYMENT_MODUL)) { //web28 - 2012-04-27 - FIX pre-selection the first payment option
$selection[$i]['checked'] = 1;
} else {
$selection[$i]['checked'] = 0;
}
if (sizeof($selection) > 1) {
$selection[$i]['selection'] = xtc_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $_SESSION['payment']));
$selection[$i]['selection'] = xtc_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['checked']), 'id="'.($i+1).'"'); //web28 - 2010-11-23 - FIX pre-selection the first payment option
} else {
$selection[$i]['selection'] = xtc_draw_hidden_field('payment', $selection[$i]['id']);
}
if (isset ($selection[$i]['error'])) {
} else {
if (!isset ($selection[$i]['error'])) {
$radio_buttons++;
}
}
ca. Zeile 165
}
}
$module_smarty->assign('module_content', $selection);
} else {
$smarty->assign('GV_COVER', 'true');
if (isset ($_SESSION['payment'])){
unset ($_SESSION['payment']); //web28 - 2012-04-27 - Fix for order_total <= 0
}
}
if (ACTIVATE_GIFT_SYSTEM == 'true') {
$smarty->assign('module_gift', $order_total_modules->credit_selection());
ca. Zeile 177
$module_smarty->caching = 0;
$payment_block = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_payment_block.html');
$smarty->assign('COMMENTS', xtc_draw_textarea_field('comments', 'soft', '60', '5', $_SESSION['comments']) . xtc_draw_hidden_field('comments_added', 'YES'));
$smarty->assign('COMMENTS', xtc_draw_textarea_field('comments', 'soft', '60', '5', isset($_SESSION['comments']) ? $_SESSION['comments'] : '') . xtc_draw_hidden_field('comments_added', 'YES'));
//check if display conditions on checkout page is true
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
if (GROUP_CHECK == 'true') {
$group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
}
ca. Zeile 191
content_heading,
content_text,
content_file
FROM " . TABLE_CONTENT_MANAGER . "
WHERE content_group='3' " . $group_check . "
AND languages_id='" . $_SESSION['languages_id'] . "'");
WHERE content_group='3'
" . $group_check . "
AND languages_id='" . $_SESSION['languages_id'] . "'
LIMIT 1"); //DokuMan - 2011-05-13 - added LIMIT 1
$shop_content_data = xtc_db_fetch_array($shop_content_query);
if ($shop_content_data['content_file'] != '') {
/* BOF - Hetfield - 2010-01-21 - Bugfix including contentfiles at SSL-Proxy */
ca. Zeile 208
/* EOF - Hetfield - 2010-01-20 - Remove agb-textarea from checkout_payment */
}
$smarty->assign('AGB', $conditions);
//BOF - Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
//$smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO));
$smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO,'SSL'));
//EOF - Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
$smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO,'SSL')); //Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink
// BOF - Tomcraft - 2009-10-01 - AGB checkbox re-implemented
if (isset ($_GET['step']) && $_GET['step'] == 'step2') {
$smarty->assign('AGB_checkbox', '<input type="checkbox" value="conditions" name="conditions" checked />');
ca. Zeile 225
}
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_payment.html');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined(RM))
if (!defined('RM')) {
$smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include ('includes/application_bottom.php');
?>
checkout_process.phpTop ca. Zeile 125
$customers_ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else {
$customers_ip = $_SERVER["REMOTE_ADDR"];
}
$sql_data_array = array ('customers_id' => $_SESSION['customer_id'],
'customers_name' => $order->customer['firstname'].' '.$order->customer['lastname'],
'customers_firstname' => $order->customer['firstname'],
'customers_lastname' => $order->customer['lastname'],
'customers_cid' => $order->customer['csID'],
'customers_vat_id' => $_SESSION['customer_vat_id'],
'customers_company' => $order->customer['company'],
'customers_status' => $_SESSION['customers_status']['customers_status_id'],
'customers_status_name' => $_SESSION['customers_status']['customers_status_name'],
'customers_status_image' => $_SESSION['customers_status']['customers_status_image'],
'customers_status_discount' => $discount,
'customers_street_address' => $order->customer['street_address'],
'customers_suburb' => $order->customer['suburb'],
'customers_city' => $order->customer['city'],
'customers_postcode' => $order->customer['postcode'],
'customers_state' => $order->customer['state'],
'customers_country' => $order->customer['country']['title'],
'customers_telephone' => $order->customer['telephone'],
'customers_email_address' => $order->customer['email_address'],
'customers_address_format_id' => $order->customer['format_id'],
'delivery_name' => $order->delivery['firstname'].' '.$order->delivery['lastname'],
'delivery_firstname' => $order->delivery['firstname'],
'delivery_lastname' => $order->delivery['lastname'],
'delivery_company' => $order->delivery['company'],
'delivery_street_address' => $order->delivery['street_address'],
'delivery_suburb' => $order->delivery['suburb'],
'delivery_city' => $order->delivery['city'],
'delivery_postcode' => $order->delivery['postcode'],
'delivery_state' => $order->delivery['state'],
'delivery_country' => $order->delivery['country']['title'],
'delivery_country_iso_code_2' => $order->delivery['country']['iso_code_2'],
'delivery_address_format_id' => $order->delivery['format_id'],
'payment_method' => $order->info['payment_method'],
'payment_class' => $order->info['payment_class'],
'shipping_method' => $order->info['shipping_method'],
'shipping_class' => $order->info['shipping_class'],
'cc_type' => $order->info['cc_type'],
'cc_owner' => $order->info['cc_owner'],
'cc_number' => $order->info['cc_number'],
'cc_expires' => $order->info['cc_expires'],
'date_purchased' => 'now()',
'orders_status' => $tmp_status,
'currency' => $order->info['currency'],
'currency_value' => $order->info['currency_value'],
'account_type' => $_SESSION['account_type'], //web28 - 2012-04-12 add missing account-type
'customers_ip' => $customers_ip,
'language' => $_SESSION['language'],
'comments' => $order->info['comments']
);
if ($_SESSION['credit_covers'] != '1') {
$sql_data_array = array ('customers_id' => $_SESSION['customer_id'], 'customers_name' => $order->customer['firstname'].' '.$order->customer['lastname'], 'customers_firstname' => $order->customer['firstname'], 'customers_lastname' => $order->customer['lastname'], 'customers_cid' => $order->customer['csID'], 'customers_vat_id' => $_SESSION['customer_vat_id'], 'customers_company' => $order->customer['company'], 'customers_status' => $_SESSION['customers_status']['customers_status_id'], 'customers_status_name' => $_SESSION['customers_status']['customers_status_name'], 'customers_status_image' => $_SESSION['customers_status']['customers_status_image'], 'customers_status_discount' => $discount, 'customers_street_address' => $order->customer['street_address'], 'customers_suburb' => $order->customer['suburb'], 'customers_city' => $order->customer['city'], 'customers_postcode' => $order->customer['postcode'], 'customers_state' => $order->customer['state'], 'customers_country' => $order->customer['country']['title'], 'customers_telephone' => $order->customer['telephone'], 'customers_email_address' => $order->customer['email_address'], 'customers_address_format_id' => $order->customer['format_id'], 'delivery_name' => $order->delivery['firstname'].' '.$order->delivery['lastname'], 'delivery_firstname' => $order->delivery['firstname'], 'delivery_lastname' => $order->delivery['lastname'], 'delivery_company' => $order->delivery['company'], 'delivery_street_address' => $order->delivery['street_address'], 'delivery_suburb' => $order->delivery['suburb'], 'delivery_city' => $order->delivery['city'], 'delivery_postcode' => $order->delivery['postcode'], 'delivery_state' => $order->delivery['state'], 'delivery_country' => $order->delivery['country']['title'], 'delivery_country_iso_code_2' => $order->delivery['country']['iso_code_2'], 'delivery_address_format_id' => $order->delivery['format_id'], 'billing_name' => $order->billing['firstname'].' '.$order->billing['lastname'], 'billing_firstname' => $order->billing['firstname'], 'billing_lastname' => $order->billing['lastname'], 'billing_company' => $order->billing['company'], 'billing_street_address' => $order->billing['street_address'], 'billing_suburb' => $order->billing['suburb'], 'billing_city' => $order->billing['city'], 'billing_postcode' => $order->billing['postcode'], 'billing_state' => $order->billing['state'], 'billing_country' => $order->billing['country']['title'], 'billing_country_iso_code_2' => $order->billing['country']['iso_code_2'], 'billing_address_format_id' => $order->billing['format_id'], 'payment_method' => $order->info['payment_method'], 'payment_class' => $order->info['payment_class'], 'shipping_method' => $order->info['shipping_method'], 'shipping_class' => $order->info['shipping_class'], 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], 'cc_number' => $order->info['cc_number'], 'cc_expires' => $order->info['cc_expires'], 'cc_start' => $order->info['cc_start'], 'cc_cvv' => $order->info['cc_cvv'], 'cc_issue' => $order->info['cc_issue'], 'date_purchased' => 'now()', 'orders_status' => $tmp_status, 'currency' => $order->info['currency'], 'currency_value' => $order->info['currency_value'], 'customers_ip' => $customers_ip, 'language' => $_SESSION['language'], 'comments' => $order->info['comments']);
} else {
// free gift , no paymentaddress
$sql_data_array = array ('customers_id' => $_SESSION['customer_id'], 'customers_name' => $order->customer['firstname'].' '.$order->customer['lastname'], 'customers_firstname' => $order->customer['firstname'], 'customers_lastname' => $order->customer['lastname'], 'customers_cid' => $order->customer['csID'], 'customers_vat_id' => $_SESSION['customer_vat_id'], 'customers_company' => $order->customer['company'], 'customers_status' => $_SESSION['customers_status']['customers_status_id'], 'customers_status_name' => $_SESSION['customers_status']['customers_status_name'], 'customers_status_image' => $_SESSION['customers_status']['customers_status_image'], 'customers_status_discount' => $discount, 'customers_street_address' => $order->customer['street_address'], 'customers_suburb' => $order->customer['suburb'], 'customers_city' => $order->customer['city'], 'customers_postcode' => $order->customer['postcode'], 'customers_state' => $order->customer['state'], 'customers_country' => $order->customer['country']['title'], 'customers_telephone' => $order->customer['telephone'], 'customers_email_address' => $order->customer['email_address'], 'customers_address_format_id' => $order->customer['format_id'], 'delivery_name' => $order->delivery['firstname'].' '.$order->delivery['lastname'], 'delivery_firstname' => $order->delivery['firstname'], 'delivery_lastname' => $order->delivery['lastname'], 'delivery_company' => $order->delivery['company'], 'delivery_street_address' => $order->delivery['street_address'], 'delivery_suburb' => $order->delivery['suburb'], 'delivery_city' => $order->delivery['city'], 'delivery_postcode' => $order->delivery['postcode'], 'delivery_state' => $order->delivery['state'], 'delivery_country' => $order->delivery['country']['title'], 'delivery_country_iso_code_2' => $order->delivery['country']['iso_code_2'], 'delivery_address_format_id' => $order->delivery['format_id'], 'payment_method' => $order->info['payment_method'], 'payment_class' => $order->info['payment_class'], 'shipping_method' => $order->info['shipping_method'], 'shipping_class' => $order->info['shipping_class'], 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], 'cc_number' => $order->info['cc_number'], 'cc_expires' => $order->info['cc_expires'], 'date_purchased' => 'now()', 'orders_status' => $tmp_status, 'currency' => $order->info['currency'], 'currency_value' => $order->info['currency_value'], 'customers_ip' => $customers_ip, 'comments' => $order->info['comments']);
// no free gift , with paymentaddress
$sql_payment_array = array( 'billing_name' => $order->billing['firstname'].' '.$order->billing['lastname'],
'billing_firstname' => $order->billing['firstname'],
'billing_lastname' => $order->billing['lastname'],
'billing_company' => $order->billing['company'],
'billing_street_address' => $order->billing['street_address'],
'billing_suburb' => $order->billing['suburb'],
'billing_city' => $order->billing['city'],
'billing_postcode' => $order->billing['postcode'],
'billing_state' => $order->billing['state'],
'billing_country' => $order->billing['country']['title'],
'billing_country_iso_code_2' => $order->billing['country']['iso_code_2'],
'billing_address_format_id' => $order->billing['format_id'],
'cc_start' => $order->info['cc_start'],
'cc_cvv' => $order->info['cc_cvv'],
'cc_issue' => $order->info['cc_issue']
);
$sql_data_array = array_merge($sql_data_array,$sql_payment_array);
}
xtc_db_perform(TABLE_ORDERS, $sql_data_array);
$insert_id = xtc_db_insert_id();
checkout_shipping.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: checkout_shipping.php 1037 2005-07-17 15:25:32Z gwinger $
$Id: checkout_shipping.php 2454 2011-12-06 14:44:38Z franky-n-xtcm $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (cxtc_format_price) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(checkout_shipping.php,v 1.15 2003/04/08); www.oscommerce.com
(c) 2003 nextcommerce (checkout_shipping.php,v 1.20 2003/08/20); www.nextcommerce.org
(c) 2006 xtCommerce (checkout_shipping.php 1037 2005-07-17)
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contribution:
Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
include ('includes/application_top.php');
//web28 - 2012-04-27 - pre-selection the cheapest shipping option
if (!defined('CHECK_CHEAPEST_SHIPPING_MODUL')) {
define ('CHECK_CHEAPEST_SHIPPING_MODUL', false); //true, false - default false
}
// create smarty elements
$smarty = new Smarty;
// include boxes
require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');
ca. Zeile 41
require (DIR_WS_CLASSES.'http_client.php');
// check if checkout is allowed
if ($_SESSION['allow_checkout'] == 'false')
if (isset($_SESSION['allow_checkout']) && $_SESSION['allow_checkout'] == 'false') {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
}
// if the customer is not logged on, redirect them to the login page
if (!isset ($_SESSION['customer_id'])) {
if (ACCOUNT_OPTIONS == 'guest') {
ca. Zeile 83
require (DIR_WS_CLASSES.'order.php');
$order = new order();
//BOF - DokuMan - 2010-08-30 - check for cartID also in checkout_shipping
// avoid hack attempts during the checkout procedure by checking the internal cartID
if (isset ($_SESSION['cart']->cartID) && isset ($_SESSION['cartID'])) {
if ($_SESSION['cart']->cartID !== $_SESSION['cartID']) {
unset($_SESSION['shipping']);
unset($_SESSION['payment']);
}
}
//EOF - DokuMan - 2010-08-30 - check for cartID also in checkout_shipping
// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
$_SESSION['cartID'] = $_SESSION['cart']->cartID;
ca. Zeile 141
if ((isset ($_POST['shipping'])) && (strpos($_POST['shipping'], '_'))) {
$_SESSION['shipping'] = $_POST['shipping'];
list ($module, $method) = explode('_', $_SESSION['shipping']);
if (is_object($$module) || ($_SESSION['shipping'] == 'free_free')) {
if ((isset($$module) && is_object($$module) ) || ($_SESSION['shipping'] == 'free_free')) {
if ($_SESSION['shipping'] == 'free_free') {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
ca. Zeile 152
if (isset ($quote['error'])) {
unset ($_SESSION['shipping']);
} else {
if ((isset ($quote[0]['methods'][0]['title'])) && (isset ($quote[0]['methods'][0]['cost']))) {
$_SESSION['shipping'] = array ('id' => $_SESSION['shipping'], 'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'].' ('.$quote[0]['methods'][0]['title'].')'), 'cost' => $quote[0]['methods'][0]['cost']);
$_SESSION['shipping'] = array ('id' => $_SESSION['shipping'],
'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'].' ('.$quote[0]['methods'][0]['title'].')'),
'cost' => $quote[0]['methods'][0]['cost']);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
}
} else {
unset ($_SESSION['shipping']);
}
} else {
$smarty->assign('error', ERROR_CHECKOUT_SHIPPING_NO_METHOD);
}
} else {
$_SESSION['shipping'] = false;
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$smarty->assign('error', ERROR_CHECKOUT_SHIPPING_NO_MODULE);
}
}
// get all available shipping quotes
ca. Zeile 175
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!isset ($_SESSION['shipping']) || (isset ($_SESSION['shipping']) && ($_SESSION['shipping'] == false) && (xtc_count_shipping_modules() > 1)))
if ((!isset ($_SESSION['shipping']) && CHECK_CHEAPEST_SHIPPING_MODUL) || (isset ($_SESSION['shipping']) && ($_SESSION['shipping'] == false) && (xtc_count_shipping_modules() > 1))) { //web28 - 2012-04-27 - pre-selection the cheapest shipping option
$_SESSION['shipping'] = $shipping_modules->cheapest();
}
$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SHIPPING, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_SHIPPING, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
require (DIR_WS_INCLUDES.'header.php');
ca. Zeile 191
$smarty->assign('BUTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$smarty->assign('FORM_END', '</form>');
$module_smarty = new Smarty;
$shipping_block = ''; //DokuMan - 2010-08-30 - set undefined variable
if (xtc_count_shipping_modules() > 0) {
$showtax = $_SESSION['customers_status']['customers_status_show_price_tax'];
$module_smarty->assign('FREE_SHIPPING', $free_shipping);
# free shipping or not...
if ($free_shipping == true) {
$module_smarty->assign('FREE_SHIPPING_TITLE', FREE_SHIPPING_TITLE);
$module_smarty->assign('FREE_SHIPPING_DESCRIPTION', sprintf(FREE_SHIPPING_DESCRIPTION, $xtPrice->xtcFormat(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER, true, 0, true)).xtc_draw_hidden_field('shipping', 'free_free'));
$module_smarty->assign('FREE_SHIPPING_ICON', $quotes[$i]['icon']);
} else {
$radio_buttons = 0;
#loop through installed shipping methods...
for ($i = 0, $n = sizeof($quotes); $i < $n; $i ++) {
if (!isset ($quotes[$i]['error'])) {
for ($j = 0, $n2 = sizeof($quotes[$i]['methods']); $j < $n2; $j ++) {
# set the radio button to be checked if it is the method chosen
$quotes[$i]['methods'][$j]['radio_buttons'] = $radio_buttons;
$checked = (($quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);
$checked = ((isset($_SESSION['shipping']) && $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);
if (($checked == true) || ($n == 1 && $n2 == 1)) {
$quotes[$i]['methods'][$j]['checked'] = 1;
}
if (($n > 1) || ($n2 > 1)) {
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0)
$quotes[$i]['tax'] = '';
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0)
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 || !isset($quotes[$i]['tax'])) {
$quotes[$i]['tax'] = 0;
}
$quotes[$i]['methods'][$j]['price'] = $xtPrice->xtcFormat(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']), true, 0, true);
$quotes[$i]['methods'][$j]['radio_field'] = xtc_draw_radio_field('shipping', $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'], $checked);
$quotes[$i]['methods'][$j]['radio_field'] = xtc_draw_radio_field('shipping', $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'], $checked, 'id="'.($i+1).'"');
} else {
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0)
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0) {
$quotes[$i]['tax'] = 0;
$quotes[$i]['methods'][$j]['price'] = $xtPrice->xtcFormat(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']), true, 0, true).xtc_draw_hidden_field('shipping', $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id']);
}
$quotes[$i]['methods'][$j]['price'] = $xtPrice->xtcFormat(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0), true, 0, true).xtc_draw_hidden_field('shipping', $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id']);
}
$radio_buttons ++;
}
}
}
$module_smarty->assign('module_content', $quotes);
}
$module_smarty->caching = 0;
$shipping_block = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_shipping_block.html');
}
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('SHIPPING_BLOCK', $shipping_block);
ca. Zeile 267
}
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('SHIPPING_BLOCK', $shipping_block);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_shipping.html');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined(RM))
if (!defined('RM'))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');
?>
create_account.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: create_account.php 1968 2011-05-17 14:52:34Z gtb-modified $
$Id: create_account.php 2810 2012-04-30 16:16:59Z hhacker $
xtcModified - community made shopping
http://www.xtc-modified.org
ca. Zeile 44
require_once (DIR_FS_INC.'xtc_encrypt_password.inc.php');
require_once (DIR_FS_INC.'xtc_get_geo_zone_code.inc.php');
require_once (DIR_FS_INC.'xtc_write_user_info.inc.php');
if (isset($_POST['country'])) {
$country = (int)$_POST['country'];
} else {
$country = STORE_COUNTRY;
}
$country = isset($_POST['country']) ? (int)$_POST['country'] : STORE_COUNTRY;
$privacy = isset($_POST['privacy']) && $_POST['privacy'] == 'privacy' ? 'privacy' : '';
$process = false;
if (isset ($_POST['action']) && ($_POST['action'] == 'process')) {
$process = true;
if (ACCOUNT_GENDER == 'true') {
//BOF - Dokuman - 2010-03-19 - set undefined variable
//$gender = xtc_db_prepare_input($_POST['gender']);
$gender = isset($_POST['gender']) ? xtc_db_prepare_input($_POST['gender']) : '';
//EOF - Dokuman - 2010-03-19 - set undefined variable
}
$firstname = xtc_db_prepare_input($_POST['firstname']);
$lastname = xtc_db_prepare_input($_POST['lastname']);
if (ACCOUNT_DOB == 'true') {
$dob = xtc_db_prepare_input($_POST['dob']);
}
$email_address = xtc_db_prepare_input($_POST['email_address']);
//BOF - Dokuman - 2010-03-19 - set undefined variable
//$confirm_email_address = xtc_db_prepare_input($_POST['confirm_email_address']); // Hetfield - 2009-08-15 - confirm e-mail at registration
$confirm_email_address = isset($_POST['confirm_email_address']) ? xtc_db_prepare_input($_POST['confirm_email_address']) : 0; // Hetfield - 2009-08-15 - confirm e-mail at registration
//EOF - Dokuman - 2010-03-19 - set undefined variable
$confirm_email_address = isset($_POST['confirm_email_address']) ? xtc_db_prepare_input($_POST['confirm_email_address']) : 0;
if (ACCOUNT_COMPANY == 'true') {
$company = xtc_db_prepare_input($_POST['company']);
}
if (ACCOUNT_COMPANY_VAT_CHECK == 'true') {
ca. Zeile 82
$suburb = xtc_db_prepare_input($_POST['suburb']);
}
$postcode = xtc_db_prepare_input($_POST['postcode']);
$city = xtc_db_prepare_input($_POST['city']);
//BOF - Dokuman - 2010-03-19 - set undefined variable
//$zone_id = xtc_db_prepare_input($_POST['zone_id']);
$zone_id = isset($_POST['zone_id']) ? xtc_db_prepare_input($_POST['zone_id']) : 0;
//EOF - Dokuman - 2010-03-19 - set undefined variable
if (ACCOUNT_STATE == 'true') {
$state = (isset($_POST['state']) ? xtc_db_prepare_input($_POST['state']) : NULL); //DokuMan - 2011-02-07
$state = isset($_POST['state']) ? xtc_db_prepare_input($_POST['state']) : '';
}
$telephone = xtc_db_prepare_input($_POST['telephone']);
$fax = xtc_db_prepare_input($_POST['fax']);
//BOF - web28 - 2010-05-30 - set undefined variable
//$newsletter = xtc_db_input($_POST['newsletter']);
$newsletter = isset($_POST['newsletter']) ? xtc_db_prepare_input($_POST['newsletter']) : '';
//EOF - web28 - 2010-05-30 - set undefined variable
$newsletter = isset($_POST['newsletter']) ? (int)$_POST['newsletter'] : '';
$password = xtc_db_prepare_input($_POST['password']);
$confirmation = xtc_db_prepare_input($_POST['confirmation']);
//BOF - Dokuman - 2010-08-31 - set undefined index
//$privacy = xtc_db_prepare_input($_POST['privacy']);
$privacy = isset($_POST['privacy']) ? xtc_db_prepare_input($_POST['privacy']) : 0;
//EOF - Dokuman - 2010-08-31 - set undefined index
$error = false;
if (ACCOUNT_GENDER == 'true') {
if (($gender != 'm') && ($gender != 'f')) {
if (ACCOUNT_GENDER == 'true' && $gender != 'm' && $gender != 'f') {
$error = true;
$messageStack->add('create_account', ENTRY_GENDER_ERROR);
}
}
if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
ca. Zeile 122
$error = true;
$messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}
if (ACCOUNT_DOB == 'true') {
//BOF - DokuMan - 2011-01-07 - Sanitize parameters
//if (checkdate(substr(xtc_date_raw($dob), 4, 2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false) {
if ((is_numeric(xtc_date_raw($dob)) == false) || (@checkdate(substr(xtc_date_raw($dob), 4,
2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false)) {
//EOF - DokuMan - 2011-01-07 - Sanitize parameters
if (ACCOUNT_DOB == 'true' && ( is_numeric(xtc_date_raw($dob)) == false ||
(@checkdate(substr(xtc_date_raw($dob), 4, 2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false))) {
$error = true;
$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
}
}
// New VAT Check
if (ACCOUNT_COMPANY_VAT_CHECK == 'true'){
require_once(DIR_WS_CLASSES.'vat_validation.php');
ca. Zeile 137
// New VAT Check
if (ACCOUNT_COMPANY_VAT_CHECK == 'true'){
require_once(DIR_WS_CLASSES.'vat_validation.php');
$vatID = new vat_validation($vat, '', '', $country);
$customers_status = $vatID->vat_info['status'];
//BOF - Dokuman - 2010-08-31 - set undefined index
//$customers_vat_id_status = $vatID->vat_info['vat_id_status'];
$customers_vat_id_status = isset($vatID->vat_info['vat_id_status']) ? $vatID->vat_info['vat_id_status'] : '';
//EOF - Dokuman - 2010-08-31 - set undefined index
if($vatID->vat_info['error']==1){
if (isset($vatID->vat_info['error']) && $vatID->vat_info['error']==1){
$messageStack->add('create_account', ENTRY_VAT_ERROR);
$error = true;
}
}
// New VAT CHECK END
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
// xs:booster prefill (customer group)
if(isset($_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP']) && $_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP']!='') {
$customers_status = $_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP'];
}
// xs:booster prefill end
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
//BOF - Hetfield - 2009-08-15 - confirm e-mail at registration
// email check
if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
} elseif (xtc_validate_email($email_address) == false) {
ca. Zeile 170
} elseif ($email_address != $confirm_email_address) {
$error = true;
$messageStack->add('create_account', ENTRY_EMAIL_ERROR_NOT_MATCHING);
} else {
$check_email_query = xtc_db_query("select count(*) as total
from ".TABLE_CUSTOMERS."
where customers_email_address = '".xtc_db_input($email_address)."'
and account_type = '0'");
$check_email_query = xtc_db_query("SELECT count(*) as total
FROM ".TABLE_CUSTOMERS."
WHERE customers_email_address = '".xtc_db_input($email_address)."'
AND account_type = '0'");
$check_email = xtc_db_fetch_array($check_email_query);
if ($check_email['total'] > 0) {
$error = true;
$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
}
}
//EOF - Hetfield - 2009-08-15 - confirm e-mail at registration
if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);
ca. Zeile 204
}
if (ACCOUNT_STATE == 'true') {
$zone_id = 0;
$check_query = xtc_db_query("select count(*) as total from ".TABLE_ZONES." where zone_country_id = '".(int) $country."'");
$check_query = xtc_db_query("SELECT count(*) AS total FROM ".TABLE_ZONES." WHERE zone_country_id = '".(int)$country."'");
$check = xtc_db_fetch_array($check_query);
$entry_state_has_zones = ($check['total'] > 0);
if ($entry_state_has_zones == true) {
$zone_query = xtc_db_query("select distinct zone_id from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' and (zone_name like '".xtc_db_input($state)."%' or zone_code like '%".xtc_db_input($state)."%')");
if (xtc_db_num_rows($zone_query) > 1) {
$zone_query = xtc_db_query("select distinct zone_id from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' and zone_name = '".xtc_db_input($state)."'");
}
if (xtc_db_num_rows($zone_query) >= 1) {
$zone_query = xtc_db_query("SELECT DISTINCT zone_id
FROM ".TABLE_ZONES."
WHERE zone_country_id = '".(int)$country ."'
AND (zone_id = '" . (int)$state . "'
OR zone_code = '" . xtc_db_input($state) . "'
OR zone_name LIKE '" . xtc_db_input($state) . "%')");
if (xtc_db_num_rows($zone_query) == 1) {
$zone = xtc_db_fetch_array($zone_query);
$zone_id = $zone['zone_id'];
} else {
$error = true;
ca. Zeile 242
$error = true;
$messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}
if (DISPLAY_PRIVACY_CHECK == 'true') {
if(!isset($privacy) || empty($privacy) || $privacy!='privacy') {
if (DISPLAY_PRIVACY_CHECK == 'true' && empty($privacy)) {
$error = true;
$messageStack->add('create_account', ENTRY_PRIVACY_ERROR);
}
}
if (!isset($customers_status) || $customers_status == 0) {
//$customers_status = DEFAULT_CUSTOMERS_STATUS_ID;
//BOF - DokuMan - 2011-02-07 - additional security check for status "0" = Admin, use "2" customer here!
if (DEFAULT_CUSTOMERS_STATUS_ID != 0) {
$customers_status = DEFAULT_CUSTOMERS_STATUS_ID;
} else {
$customers_status = 2;
}
//EOF - DokuMan - 2011-02-07 - additional security check for status "0" = Admin, use "2" customer here!
}
if (!$newsletter) {
$newsletter = '';
}
if ($error == false) {
$sql_data_array = array (
'customers_vat_id' => $vat,
'customers_vat_id_status' => $customers_vat_id_status,
ca. Zeile 325
xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
$address_id = xtc_db_insert_id();
xtc_db_query("update ".TABLE_CUSTOMERS." set customers_default_address_id = '".(int)$address_id."' where customers_id = '".(int) $_SESSION['customer_id']."'");
xtc_db_query("UPDATE ".TABLE_CUSTOMERS." SET customers_default_address_id = '".(int)$address_id."' WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
xtc_db_query("insert into ".TABLE_CUSTOMERS_INFO." (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('".(int) $_SESSION['customer_id']."', '0', now())");
xtc_db_query("INSERT INTO ".TABLE_CUSTOMERS_INFO." (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) VALUES ('".(int)$_SESSION['customer_id']."', '0', now())");
//BOF - DokuMan - 2011-02-02 - Fix for more personalized e-mails to the customer (show salutation and surname)
if ($gender =='f') {
$smarty->assign('GENDER', FEMALE);
} elseif ($gender =='m') {
$smarty->assign('GENDER', MALE);
} else {
$smarty->assign('GENDER', '');
}
$smarty->assign('LASTNAME',$lastname);
//EOF - DokuMan - 2011-02-02 - Fix for more personalized e-mails to the customer (show salutation and surname)
if (SESSION_RECREATE == 'True') {
xtc_session_recreate();
}
ca. Zeile 372
// assign data to smarty
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');
$smarty->assign('content', $module_content);
$smarty->caching = false;
// campaign tracking
if (isset ($_SESSION['tracking']['refID'])){
$campaign_check_query_raw = "SELECT *
$refID = $leads = 0;
$campaign_check = xtc_db_query("SELECT campaigns_id, campaigns_leads
FROM ".TABLE_CAMPAIGNS."
WHERE campaigns_refID = '".$_SESSION['tracking']['refID']."'";
$campaign_check_query = xtc_db_query($campaign_check_query_raw);
if (xtc_db_num_rows($campaign_check_query) > 0) {
$campaign = xtc_db_fetch_array($campaign_check_query);
WHERE campaigns_refID = '".$_SESSION['tracking']['refID']."'");
if (xtc_db_num_rows($campaign_check) > 0) {
$campaign = xtc_db_fetch_array($campaign_check);
$refID = $campaign['campaigns_id'];
} else {
$refID = 0;
$leads = $campaign['campaigns_leads'];
}
xtc_db_query("update " . TABLE_CUSTOMERS . " set
refferers_id = '".$refID."'
where customers_id = '".(int) $_SESSION['customer_id']."'");
$leads = $campaign['campaigns_leads'] + 1 ;
xtc_db_query("update " . TABLE_CAMPAIGNS . " set
campaigns_leads = '".$leads."'
where campaigns_id = '".$refID."'");
$leads++;
xtc_db_query("UPDATE " . TABLE_CUSTOMERS . "
SET refferers_id = '".$refID."'
WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
xtc_db_query("UPDATE " . TABLE_CAMPAIGNS . "
SET campaigns_leads = '".$leads."'
WHERE campaigns_id = '".$refID."'");
}
// GV Code - CREDIT CLASS CODE BLOCK
if (ACTIVATE_GIFT_SYSTEM == 'true') {
// GV Code Start
// ICW - CREDIT CLASS CODE BLOCK ADDED ******************************************************* BEGIN
if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
$coupon_code = create_coupon_code();
$insert_query = xtc_db_query("insert into ".TABLE_COUPONS." (coupon_code, coupon_type, coupon_amount, date_created) values ('".$coupon_code."', 'G', '".NEW_SIGNUP_GIFT_VOUCHER_AMOUNT."', now())");
$insert_query = xtc_db_query("INSERT INTO ".TABLE_COUPONS." (coupon_code, coupon_type, coupon_amount, date_created) VALUES ('".$coupon_code."', 'G', '".NEW_SIGNUP_GIFT_VOUCHER_AMOUNT."', now())");
$insert_id = xtc_db_insert_id($insert_query);
$insert_query = xtc_db_query("insert into ".TABLE_COUPON_EMAIL_TRACK." (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('".$insert_id."', '0', 'Admin', '".$email_address."', now() )");
$insert_query = xtc_db_query("INSERT INTO ".TABLE_COUPON_EMAIL_TRACK." (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) VALUES ('".$insert_id."', '0', 'Admin', '".$email_address."', now() )");
$smarty->assign('SEND_GIFT', 'true');
$smarty->assign('GIFT_AMMOUNT', $xtPrice->xtcFormat(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT, true));
$smarty->assign('GIFT_CODE', $coupon_code);
ca. Zeile 409
$smarty->assign('SEND_GIFT', 'true');
$smarty->assign('GIFT_AMMOUNT', $xtPrice->xtcFormat(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT, true));
$smarty->assign('GIFT_CODE', $coupon_code);
$smarty->assign('GIFT_LINK', xtc_href_link(FILENAME_GV_REDEEM, 'gv_no='.$coupon_code, 'NONSSL', false));
}
if (NEW_SIGNUP_DISCOUNT_COUPON != '') {
$coupon_code = NEW_SIGNUP_DISCOUNT_COUPON;
$coupon_query = xtc_db_query("select * from ".TABLE_COUPONS." where coupon_code = '".$coupon_code."'");
$coupon_query = xtc_db_query("SELECT * FROM ".TABLE_COUPONS." WHERE coupon_code = '".$coupon_code."'");
$coupon = xtc_db_fetch_array($coupon_query);
$coupon_id = $coupon['coupon_id'];
$coupon_desc_query = xtc_db_query("select * from ".TABLE_COUPONS_DESCRIPTION." where coupon_id = '".$coupon_id."' and language_id = '".(int) $_SESSION['languages_id']."'");
$coupon_desc_query = xtc_db_query("SELECT * FROM ".TABLE_COUPONS_DESCRIPTION." WHERE coupon_id = '".$coupon_id."' and language_id = '".(int)$_SESSION['languages_id']."'");
$coupon_desc = xtc_db_fetch_array($coupon_desc_query);
$insert_query = xtc_db_query("insert into ".TABLE_COUPON_EMAIL_TRACK." (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('".$coupon_id."', '0', 'Admin', '".$email_address."', now() )");
$insert_query = xtc_db_query("INSERT INTO ".TABLE_COUPON_EMAIL_TRACK." (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) VALUES ('".$coupon_id."', '0', 'Admin', '".$email_address."', now() )");
$smarty->assign('SEND_COUPON', 'true');
$smarty->assign('COUPON_DESC', $coupon_desc['coupon_description']);
$smarty->assign('COUPON_CODE', $coupon['coupon_code']);
ca. Zeile 423
$smarty->assign('SEND_COUPON', 'true');
$smarty->assign('COUPON_DESC', $coupon_desc['coupon_description']);
$smarty->assign('COUPON_CODE', $coupon['coupon_code']);
}
// ICW - CREDIT CLASS CODE BLOCK ADDED ******************************************************* END
// GV Code End // create templates
}
// create templates
$smarty->caching = 0;
$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/create_account_mail.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/create_account_mail.txt');
ca. Zeile 443
if (!isset ($mail_error)) {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));
} else {
//BOF - DokuMan - 2010-10-28 - use nicer smarty-output instead of direct echo output
//echo $mail_error;
$error = true;
$messageStack->add('create_account', $mail_error);
//EOF - DokuMan - 2010-10-28 - use nicer smarty-output instead of direct echo output
}
}
}
$breadcrumb->add(NAVBAR_TITLE_CREATE_ACCOUNT, xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
require (DIR_WS_INCLUDES.'header.php');
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
// xs:booster start (v1.041)
// xs:booster (v1.041)
if(@isset($_SESSION['xtb0']['tx'][0])) {
$GLOBALS['gender']= 'm';
$GLOBALS['firstname']= substr($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME'],0,strpos($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME']," "));
$GLOBALS['lastname']= substr($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME'],strpos($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME']," ")+1,strlen($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME']));
ca. Zeile 469
$GLOBALS['country']= $_SESSION['xtb0']['tx'][0]['XTB_EBAY_COUNTRYNAME'];
$GLOBALS['email_address']= $_SESSION['xtb0']['tx'][0]['XTB_EBAY_EMAIL'];
$GLOBALS['telephone']= $_SESSION['xtb0']['tx'][0]['XTB_EBAY_PHONE'];
}
// xs:booster end
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
if ($messageStack->size('create_account') > 0) {
$smarty->assign('error', $messageStack->output('create_account'));
}
//BOF - web28 - 2010-04-10 - Removed JavaScript formcheck
//$smarty->assign('FORM_ACTION', xtc_draw_form('create_account', xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"').xtc_draw_hidden_field('action', 'process'));
$smarty->assign('FORM_ACTION', xtc_draw_form('create_account', xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post').xtc_draw_hidden_field('action', 'process'));
//EOF - web28 - 2010-04-10 - Removed JavaScript formcheck
if (ACCOUNT_GENDER == 'true') {
$smarty->assign('gender', '1');
$smarty->assign('INPUT_MALE', xtc_draw_radio_field(array ('name' => 'gender', 'suffix' => MALE), 'm'));
ca. Zeile 497
$smarty->assign('INPUT_DOB', xtc_draw_input_fieldNote(array ('name' => 'dob', 'text' => ' '. (xtc_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">'.ENTRY_DATE_OF_BIRTH_TEXT.'</span>' : ''))));
} else {
$smarty->assign('birthdate', '0');
}
$smarty->assign('INPUT_EMAIL', xtc_draw_input_fieldNote(array ('name' => 'email_address', 'text' => ' '. (xtc_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">'.ENTRY_EMAIL_ADDRESS_TEXT.'</span>' : '')), '',''));
//BOF - Hetfield - 2009-08-15 - confirm e-mail at registration
$smarty->assign('INPUT_CONFIRM_EMAIL', xtc_draw_input_fieldNote(array ('name' => 'confirm_email_address', 'text' => ' '. (xtc_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">'.ENTRY_EMAIL_ADDRESS_TEXT.'</span>' : '')), '',''));
//EOF - Hetfield - 2009-08-15 - confirm e-mail at registration
if (ACCOUNT_COMPANY == 'true') {
$smarty->assign('company', '1');
$smarty->assign('INPUT_COMPANY', xtc_draw_input_fieldNote(array (
'name' => 'company',
'text' => ' ' . (xtc_not_null(ENTRY_COMPANY_TEXT
) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>' : ''))));
'text' => ' ' . (xtc_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>' : '')
)));
} else {
$smarty->assign('company', '0');
}
ca. Zeile 533
$smarty->assign('INPUT_CITY', xtc_draw_input_fieldNote(array ('name' => 'city', 'text' => ' '. (xtc_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">'.ENTRY_CITY_TEXT.'</span>' : ''))));
if (ACCOUNT_STATE == 'true') {
$smarty->assign('state', '1');
if ($process == true) {
if ($entry_state_has_zones == true) {
$zones_array = array ();
$zones_query = xtc_db_query("select zone_name from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' order by zone_name");
$zones_query = xtc_db_query("SELECT zone_id, zone_name FROM ".TABLE_ZONES." WHERE zone_country_id = '".(int)$country."' ORDER BY zone_name");
while ($zones_values = xtc_db_fetch_array($zones_query)) {
$zones_array[] = array (
'id' => $zones_values['zone_name'],
'id' => $zones_values['zone_id'],
'text' => $zones_values['zone_name']
);
}
$state_input = xtc_draw_pull_down_menuNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">'.ENTRY_STATE_TEXT.'</span>' : '')), $zones_array);
$state_input = xtc_draw_pull_down_menuNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">'.ENTRY_STATE_TEXT.'</span>' : '')), $zones_array, $zone_id);
} else {
$state_input = xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">'.ENTRY_STATE_TEXT.'</span>' : '')));
}
} else {
ca. Zeile 563
$smarty->assign('INPUT_PASSWORD', xtc_draw_password_fieldNote(array ('name' => 'password', 'text' => ' '. (xtc_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">'.ENTRY_PASSWORD_TEXT.'</span>' : ''))));
$smarty->assign('CHECKBOX_NEWSLETTER', xtc_draw_checkbox_field('newsletter', '1').' '. (xtc_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">'.ENTRY_NEWSLETTER_TEXT.'</span>' : ''));
$smarty->assign('INPUT_CONFIRMATION', xtc_draw_password_fieldNote(array ('name' => 'confirmation', 'text' => ' '. (xtc_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">'.ENTRY_PASSWORD_CONFIRMATION_TEXT.'</span>' : ''))));
if (DISPLAY_PRIVACY_CHECK == 'true') {
$smarty->assign('PRIVACY_CHECKBOX', '<input type="checkbox" value="privacy" name="privacy" />');
//BOF - Dokuman - 2009-08-13 - SSL for Content-Links per getContentLink
//$smarty->assign('PRIVACY_LINK', $main->getContentLink(2, MORE_INFO));
$smarty->assign('PRIVACY_CHECKBOX', xtc_draw_checkbox_field('privacy', 'privacy', $privacy));
$smarty->assign('PRIVACY_LINK', $main->getContentLink(2, MORE_INFO, $request_type));
//EOF - Dokuman - 2009-08-13 - SSL for Content-Links per getContentLink
}
$smarty->assign('FORM_END', '</form>');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
ca. Zeile 572
}
$smarty->assign('FORM_END', '</form>');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/create_account.html');
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM'))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');
?>
create_guest_account.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: create_guest_account.php 2273 2011-10-10 17:28:16Z dokuman $
$Id: create_guest_account.php 2810 2012-04-30 16:16:59Z hhacker $
xtcModified - community made shopping
http://www.xtc-modified.org
ca. Zeile 38
require_once (DIR_FS_INC . 'xtc_validate_email.inc.php');
//require_once (DIR_FS_INC . 'xtc_encrypt_password.inc.php');
require_once (DIR_FS_INC . 'xtc_create_password.inc.php');
require_once (DIR_FS_INC . 'xtc_get_geo_zone_code.inc.php');
// needs to be included earlier to set the success message in the messageStack
// require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . FILENAME_CREATE_ACCOUNT);
if (isset($_POST['country'])) {
$country = (int)$_POST['country'];
} else {
$country = STORE_COUNTRY;
}
$country = isset($_POST['country']) ? (int)$_POST['country'] : STORE_COUNTRY;
$privacy = isset($_POST['privacy']) && $_POST['privacy'] == 'privacy' ? 'privacy' : '';
$process = false;
if (isset ($_POST['action']) && ($_POST['action'] == 'process')) {
$process = true;
if (ACCOUNT_GENDER == 'true') {
//BOF - Dokuman - 2010-03-19 - set undefined variable
//$gender = xtc_db_prepare_input($_POST['gender']);
$gender = isset($_POST['gender']) ? xtc_db_prepare_input($_POST['gender']) : '';
//EOF - Dokuman - 2010-03-19 - set undefined variable
}
$firstname = xtc_db_prepare_input($_POST['firstname']);
$lastname = xtc_db_prepare_input($_POST['lastname']);
if (ACCOUNT_DOB == 'true') {
$dob = xtc_db_prepare_input($_POST['dob']);
}
$email_address = xtc_db_prepare_input($_POST['email_address']);
//BOF - Dokuman - 2010-03-19 - set undefined variable
//$confirm_email_address = xtc_db_prepare_input($_POST['confirm_email_address']); // Hetfield - 2009-08-15 - confirm e-mail at registration
$confirm_email_address = isset($_POST['confirm_email_address']) ? xtc_db_prepare_input($_POST['confirm_email_address']) : 0; // Hetfield - 2009-08-15 - confirm e-mail at registration
//EOF - Dokuman - 2010-03-19 - set undefined variable
$confirm_email_address = isset($_POST['confirm_email_address']) ? xtc_db_prepare_input($_POST['confirm_email_address']) : 0;
if (ACCOUNT_COMPANY == 'true') {
$company = xtc_db_prepare_input($_POST['company']);
}
if (ACCOUNT_COMPANY_VAT_CHECK == 'true') {
ca. Zeile 79
$suburb = xtc_db_prepare_input($_POST['suburb']);
}
$postcode = xtc_db_prepare_input($_POST['postcode']);
$city = xtc_db_prepare_input($_POST['city']);
//BOF - Dokuman - 2010-03-19 - set undefined variable
//$zone_id = xtc_db_prepare_input($_POST['zone_id']);
$zone_id = isset($_POST['zone_id']) ? xtc_db_prepare_input($_POST['zone_id']) : 0;
//EOF - Dokuman - 2010-03-19 - set undefined variable
if (ACCOUNT_STATE == 'true') {
$state = (isset($_POST['state']) ? xtc_db_prepare_input($_POST['state']) : NULL); //DokuMan - 2011-02-07
$state = isset($_POST['state']) ? xtc_db_prepare_input($_POST['state']) : '';
}
$telephone = xtc_db_prepare_input($_POST['telephone']);
$fax = xtc_db_prepare_input($_POST['fax']);
//BOF - Dokuman - 2010-03-19 - no newsletter for guest accounts
//$newsletter = xtc_db_prepare_input($_POST['newsletter']);
$newsletter = '';
//EOF - Dokuman - 2010-03-19 - no newsletter for guest accounts
$password = xtc_db_prepare_input($_POST['password']);
$confirmation = xtc_db_prepare_input($_POST['confirmation']);
//BOF - Dokuman - 2010-08-31 - set undefined index
//$privacy = xtc_db_prepare_input($_POST['privacy']);
$privacy = isset($_POST['privacy']) ? xtc_db_prepare_input($_POST['privacy']) : 0;
//EOF - Dokuman - 2010-08-31 - set undefined index
$newsletter = ''; //no newsletter for guest accounts ???
//$password = xtc_db_prepare_input($_POST['password']);
//$confirmation = xtc_db_prepare_input($_POST['confirmation']);
$error = false;
if (ACCOUNT_GENDER == 'true') {
if (($gender != 'm') && ($gender != 'f')) {
if (ACCOUNT_GENDER == 'true' && $gender != 'm' && $gender != 'f') {
$error = true;
$messageStack->add('create_account', ENTRY_GENDER_ERROR);
}
}
if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
ca. Zeile 119
$error = true;
$messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}
if (ACCOUNT_DOB == 'true') {
//BOF - DokuMan - 2011-01-07 - Sanitize parameters
//if (checkdate(substr(xtc_date_raw($dob), 4, 2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false) {
if ((is_numeric(xtc_date_raw($dob)) == false) || (@checkdate(substr(xtc_date_raw($dob), 4,
2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false)) {
//EOF - DokuMan - 2011-01-07 - Sanitize parameters
if (ACCOUNT_DOB == 'true' && (is_numeric(xtc_date_raw($dob)) == false ||
(@checkdate(substr(xtc_date_raw($dob), 4, 2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false))) {
$error = true;
$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
}
}
// New VAT Check
if (ACCOUNT_COMPANY_VAT_CHECK == 'true'){
require_once (DIR_WS_CLASSES . 'vat_validation.php');
ca. Zeile 143
$messageStack->add('create_account', ENTRY_VAT_ERROR);
$error = true;
}
}
// New VAT CHECK END
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
// xs:booster prefill (customer group)
if(isset($_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP']) && $_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP']!='') {
$customers_status = $_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP'];
}
// xs:booster prefill end
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
//BOF - Hetfield - 2009-08-15 - confirm e-mail at registration
// email check
if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
} elseif ($email_address != $confirm_email_address) {
$error = true;
$messageStack->add('create_account', ENTRY_EMAIL_ERROR_NOT_MATCHING);
} elseif (xtc_validate_email($email_address) == false) {
$error = true;
$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
} elseif ($email_address != $confirm_email_address) {
$error = true;
$messageStack->add('create_account', ENTRY_EMAIL_ERROR_NOT_MATCHING);
}
//EOF - Hetfield - 2009-08-15 - confirm e-mail at registration
if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);
ca. Zeile 188
}
if (ACCOUNT_STATE == 'true') {
$zone_id = 0;
$check_query = xtc_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "'");
$check_query = xtc_db_query("SELECT count(*) AS total FROM " . TABLE_ZONES . " WHERE zone_country_id = '" . (int)$country . "'");
$check = xtc_db_fetch_array($check_query);
$entry_state_has_zones = ($check['total'] > 0);
if ($entry_state_has_zones == true) {
$zone_query = xtc_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "' and (zone_name like '" . xtc_db_input($state) . "%' or zone_code like '%" . xtc_db_input($state) . "%')");
if (xtc_db_num_rows($zone_query) > 1) {
$zone_query = xtc_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "' and zone_name = '" . xtc_db_input($state) . "'");
}
if (xtc_db_num_rows($zone_query) >= 1) {
$zone_query = xtc_db_query("SELECT DISTINCT zone_id
FROM ".TABLE_ZONES."
WHERE zone_country_id = '".(int)$country ."'
AND (zone_id = '" . (int)$state . "'
OR zone_code = '" . xtc_db_input($state) . "'
OR zone_name LIKE '" . xtc_db_input($state) . "%')");
if (xtc_db_num_rows($zone_query) == 1) {
$zone = xtc_db_fetch_array($zone_query);
$zone_id = $zone['zone_id'];
} else {
$error = true;
ca. Zeile 217
$error = true;
$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
}
if (DISPLAY_PRIVACY_CHECK == 'true') {
if(!isset($privacy) || empty($privacy) || $privacy!='privacy') {
if (DISPLAY_PRIVACY_CHECK == 'true' && empty($privacy)) {
$error = true;
$messageStack->add('create_account', ENTRY_PRIVACY_ERROR);
}
}
if (!isset($customers_status) || $customers_status == 0) {
//$customers_status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
//BOF - DokuMan - 2011-02-07 - additional security check for status "0" = Admin, use "1" customer here!
if (DEFAULT_CUSTOMERS_STATUS_ID_GUEST != 0) {
$customers_status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
} else {
$customers_status = 1;
}
//EOF - DokuMan - 2011-02-07 - additional security check for status "0" = Admin, use "1" customer here!
}
if (!$newsletter) {
$newsletter = '';
ca. Zeile 253
'customers_telephone' => $telephone,
'customers_fax' => $fax,
'customers_newsletter' => $newsletter,
'account_type' => '1',
//BOF - DokuMan - 2011-02-10 - no need to encrypt passwort again, since it is already encrypted by xtc_create_password()
//'customers_password' => xtc_encrypt_password($password),
'customers_password' => $password,
//EOF - DokuMan - 2011-02-10 - no need to encrypt passwort again, since it is already encrypted by xtc_create_password()
'customers_date_added' => 'now()',
'customers_last_modified' => 'now()',
);
ca. Zeile 308
xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
$address_id = xtc_db_insert_id();
xtc_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
xtc_db_query("UPDATE " . TABLE_CUSTOMERS . " SET customers_default_address_id = '" . (int)$address_id . "' WHERE customers_id = '" . (int)$_SESSION['customer_id'] . "'");
xtc_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $_SESSION['customer_id'] . "', '0', now())");
xtc_db_query("INSERT INTO " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) VALUES ('" . (int)$_SESSION['customer_id'] . "', '0', now())");
if (SESSION_RECREATE == 'True') {
xtc_session_recreate();
}
ca. Zeile 326
// restore cart contents
$_SESSION['cart']->restore_contents();
// campaign tracking
if (isset ($_SESSION['tracking']['refID'])) {
$campaign_check_query_raw = "SELECT *
$refID = $leads = 0;
$campaign_check = xtc_db_query("SELECT campaigns_id, campaigns_leads
FROM " . TABLE_CAMPAIGNS . "
WHERE campaigns_refID = '" . $_SESSION['tracking']['refID'] . "'";
$campaign_check_query = xtc_db_query($campaign_check_query_raw);
if (xtc_db_num_rows($campaign_check_query) > 0) {
$campaign = xtc_db_fetch_array($campaign_check_query);
WHERE campaigns_refID = '".$_SESSION['tracking']['refID']."'");
if (xtc_db_num_rows($campaign_check) > 0) {
$campaign = xtc_db_fetch_array($campaign_check);
$refID = $campaign['campaigns_id'];
} else {
$refID = 0;
$leads = $campaign['campaigns_leads'];
}
$leads++;
xtc_db_query("UPDATE " . TABLE_CUSTOMERS . "
SET refferers_id = '".$refID."'
WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
xtc_db_query("UPDATE " . TABLE_CAMPAIGNS . "
SET campaigns_leads = '".$leads."'
WHERE campaigns_id = '".$refID."'");
}
xtc_db_query("update " . TABLE_CUSTOMERS . " set
refferers_id = '" . $refID . "'
where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
$leads = $campaign['campaigns_leads'] + 1;
xtc_db_query("update " . TABLE_CAMPAIGNS . " set
campaigns_leads = '" . $leads . "'
where campaigns_id = '" . $refID . "'");
}
if ($newsletter == 1) {
require_once (DIR_WS_CLASSES . 'class.newsletter.php');
$newsletter = new newsletter;
ca. Zeile 362
$breadcrumb->add(NAVBAR_TITLE_CREATE_GUEST_ACCOUNT, xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'));
require (DIR_WS_INCLUDES . 'header.php');
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
// xs:booster start (v1.041)
// xs:booster (v1.041)
if(@isset($_SESSION['xtb0']['tx'][0])) {
$GLOBALS['gender']= 'm';
$GLOBALS['firstname']= substr($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME'],0,strpos($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME']," "));
$GLOBALS['lastname']= substr($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME'],strpos($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME']," ")+1,strlen($_SESSION['xtb0']['tx'][0]['XTB_EBAY_NAME']));
ca. Zeile 375
$GLOBALS['country']= $_SESSION['xtb0']['tx'][0]['XTB_EBAY_COUNTRYNAME'];
$GLOBALS['email_address']= $_SESSION['xtb0']['tx'][0]['XTB_EBAY_EMAIL'];
$GLOBALS['telephone']= $_SESSION['xtb0']['tx'][0]['XTB_EBAY_PHONE'];
}
// xs:booster end
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
if ($messageStack->size('create_account') > 0) {
$smarty->assign('error', $messageStack->output('create_account'));
}
//BOF - web28 - 2010-04-10 - Removed JavaScript formcheck
//$smarty->assign('FORM_ACTION', xtc_draw_form('create_account', xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . xtc_draw_hidden_field('action', 'process'));
$smarty->assign('FORM_ACTION', xtc_draw_form('create_account', xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'), 'post') . xtc_draw_hidden_field('action', 'process'));
//EOF - web28 - 2010-04-10 - Removed JavaScript formcheck
if (ACCOUNT_GENDER == 'true') {
$smarty->assign('gender', '1');
$smarty->assign('INPUT_MALE', xtc_draw_radio_field(array('name' => 'gender','suffix' => MALE), 'm'));
ca. Zeile 403
$smarty->assign('INPUT_DOB', xtc_draw_input_fieldNote(array ('name' => 'dob','text' => ' ' . (xtc_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : ''))));
} else {
$smarty->assign('birthdate', '0');
}
$smarty->assign('INPUT_EMAIL', xtc_draw_input_fieldNote(array ('name' => 'email_address','text' => ' ' . (xtc_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : '')), '',''));
//BOF - Hetfield - 2009-08-15 - confirm e-mail at registration
$smarty->assign('INPUT_CONFIRM_EMAIL', xtc_draw_input_fieldNote(array ('name' => 'confirm_email_address', 'text' => ' '. (xtc_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">'.ENTRY_EMAIL_ADDRESS_TEXT.'</span>' : '')), '',''));
//EOF - Hetfield - 2009-08-15 - confirm e-mail at registration
if (ACCOUNT_COMPANY == 'true') {
$smarty->assign('company', '1');
$smarty->assign('INPUT_COMPANY', xtc_draw_input_fieldNote(array (
'name' => 'company',
'text' => ' ' . (xtc_not_null(ENTRY_COMPANY_TEXT
) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>' : ''))));
'text' => ' ' . (xtc_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>' : '')
)));
} else {
$smarty->assign('company', '0');
}
ca. Zeile 439
$smarty->assign('INPUT_CITY', xtc_draw_input_fieldNote(array ('name' => 'city','text' => ' ' . (xtc_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>' : ''))));
if (ACCOUNT_STATE == 'true') {
$smarty->assign('state', '1');
if ($process == true) {
if ($entry_state_has_zones == true) {
$zones_array = array ();
$zones_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "' order by zone_name");
$zones_query = xtc_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
while ($zones_values = xtc_db_fetch_array($zones_query)) {
$zones_array[] = array (
'id' => $zones_values['zone_name'],
'id' => $zones_values['zone_id'],
'text' => $zones_values['zone_name']
);
}
$state_input = xtc_draw_pull_down_menuNote(array ('name' => 'state','text' => ' ' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')), $zones_array);
$state_input = xtc_draw_pull_down_menuNote(array ('name' => 'state','text' => ' ' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')), $zones_array, $zone_id);
} else {
$state_input = xtc_draw_input_fieldNote(array ('name' => 'state','text' => ' ' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')));
}
} else {
ca. Zeile 468
$smarty->assign('INPUT_TEL', xtc_draw_input_fieldNote(array ('name' => 'telephone','text' => ' ' . (xtc_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>' : ''))));
$smarty->assign('INPUT_FAX', xtc_draw_input_fieldNote(array ('name' => 'fax','text' => ' ' . (xtc_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>' : ''))));
$smarty->assign('CHECKBOX_NEWSLETTER', xtc_draw_checkbox_field('newsletter', '1').' '. (xtc_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">'.ENTRY_NEWSLETTER_TEXT.'</span>' : ''));
if (DISPLAY_PRIVACY_CHECK == 'true') {
$smarty->assign('PRIVACY_CHECKBOX', '<input type="checkbox" value="privacy" name="privacy" />');
//BOF - Dokuman - 2009-08-13 - SSL for Content-Links per getContentLink
//$smarty->assign('PRIVACY_LINK', $main->getContentLink(2, MORE_INFO));
$smarty->assign('PRIVACY_CHECKBOX', xtc_draw_checkbox_field('privacy', 'privacy', $privacy));
$smarty->assign('PRIVACY_LINK', $main->getContentLink(2, MORE_INFO, $request_type));
//EOF - Dokuman - 2009-08-13 - SSL for Content-Links per getContentLink
}
$smarty->assign('FORM_END', '</form>');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
ca. Zeile 477
}
$smarty->assign('FORM_END', '</form>');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/create_account_guest.html');
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM'))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include ('includes/application_bottom.php');
?>
inc/xtc_count_cart.inc.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: xtc_count_cart.inc.php 975 2005-06-07 12:49:19Z mz $
$Id: xtc_count_cart.inc.php 1205 2010-08-24 10:08:53Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2006 XT-Commerce (xtc_count_cart.inc.php 975 2005-06-07)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
// counts total ammount of a product ID in cart.
ca. Zeile 36
$act_id = substr($actual_content[$i]['id'], 0, strpos($actual_content[$i]['id'], '{'));
} else {
$act_id = $actual_content[$i]['id'];
}
$_SESSION['actual_content'][$act_id] = array ('qty' => $_SESSION['actual_content'][$act_id]['qty'] + $actual_content[$i]['qty']);
//BOF - DokuMan - 2010-08-24 - set undefined variable, add array directly
//$_SESSION['actual_content'][$act_id] = array ('qty' => $_SESSION['actual_content'][$act_id]['qty'] + $actual_content[$i]['qty']);
if (!isset($_SESSION['actual_content'][$act_id]['qty'])) $_SESSION['actual_content'][$act_id]['qty'] = 0;
$_SESSION['actual_content'][$act_id]['qty'] += $actual_content[$i]['qty'];
//EOF - DokuMan - 2010-08-24 - set undefined variable, add array directly
}
}
?>
inc/xtc_count_modules.inc.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: xtc_count_modules.inc.php 899 2005-04-29 02:40:57Z hhgag $
$Id: xtc_count_modules.inc.php 2531 2011-12-19 15:02:34Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(general.php,v 1.225 2003/05/29); www.oscommerce.com
(c) 2003 nextcommerce (xtc_count_modules.inc.php,v 1.3 2003/08/13); www.nextcommerce.org
(c) 2006 XT-Commerce (xtc_count_modules.inc.php 899 2005-04-29)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 21
if (empty($modules)) return $count;
$modules_array = explode(';', $modules); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3
for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) {
//BOF - DokuMan - 2011-12-19 - precount for performance
//for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) {
$n=sizeof($modules_array);
for ($i=0; $i<$n; $i++) {
//EOF - DokuMan - 2011-12-19 - precount for performance
$class = substr($modules_array[$i], 0, strrpos($modules_array[$i], '.'));
if (is_object($GLOBALS[$class])) {
//BOF - DokuMan - 2010-08-24 - set undefined index
//if (is_object($GLOBALS[$class])) {
if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class])) {
//EOF - DokuMan - 2010-08-24 - set undefined index
if ($GLOBALS[$class]->enabled) {
$count++;
}
}
inc/xtc_db_error.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_db_error($query, $errno, $error) {
// Deliver 503 Error on database error (so crawlers won't index the error page)
if (!defined('DIR_FS_ADMIN')) {
header("HTTP/1.1 503 Service Temporarily Unavailable");
header("Status: 503 Service Temporarily Unavailable");
header("Connection: Close");
}
if (isset($_SESSION['customers_status']['customers_status_id']) && $_SESSION['customers_status']['customers_status_id'] == 0) {
die('<font color="#000000"><strong>' . $errno . ' - ' . $error . '<br /><br />' . $query . '<br /><br /><small><font color="#ff0000">[XT SQL Error]</font></small><br /><br /></strong></font>');
} else {
die('<font color="#ff0000"><strong>Es ist ein Fehler aufgetreten!<br />There was an error!<br />Il y avait une erreur!</strong></font>');
}
}
?>
inc/xtc_draw_selection_field.inc.phpTop ca. Zeile 21
$selection = '<input type="' . xtc_parse_input_field_data($type, array('"' => '"')) . '" name="' . xtc_parse_input_field_data($name, array('"' => '"')) . '"';
if (xtc_not_null($value)) $selection .= ' value="' . xtc_parse_input_field_data($value, array('"' => '"')) . '"';
if ( ($checked == true) || ($GLOBALS[$name] == 'on') || ( (isset($value)) && ($GLOBALS[$name] == $value) ) ) {
//BOF - DokuMan - 2010-08-23 - set undefined index
//if ( ($checked == true) || ($GLOBALS[$name] == 'on') || ( (isset($value)) && ($GLOBALS[$name] == $value) ) ) {
if ( ($checked == true) || (isset($GLOBALS[$name]) && $GLOBALS[$name] == 'on') || ( (isset($value)) && (isset($GLOBALS[$name]) && $GLOBALS[$name] == $value) ) ) {
//EOF - DokuMan - 2010-08-23 - set undefined index
$selection .= ' checked="checked"';
}
if (xtc_not_null($parameters)) $selection .= ' ' . $parameters;
ca. Zeile 36
function xtc_draw_selection_fieldNote($data, $type, $value = '', $checked = false, $parameters = '') {
$selection = $data['suffix'].'<input type="' . xtc_parse_input_field_data($type, array('"' => '"')) . '" name="' . xtc_parse_input_field_data($data['name'], array('"' => '"')) . '"';
if (xtc_not_null($value)) $selection .= ' value="' . xtc_parse_input_field_data($value, array('"' => '"')) . '"';
if ( ($checked == true) || ($GLOBALS[$data['name']] == 'on') || ( (isset($value)) && ($GLOBALS[$data['name']] == $value) ) ) {
//BOF - DokuMan - 2010-09-17 - set undefined index
//if ( ($checked == true) || ($GLOBALS[$data['name']] == 'on') || ( (isset($value)) && ($GLOBALS[$data['name']] == $value) ) ) {
if ( ($checked == true) || (isset($GLOBALS[$data['name']]) && ($GLOBALS[$data['name']] == 'on')) || ( (isset($value)) && (isset($GLOBALS[$data['name']]) && ($GLOBALS[$data['name']] == $value) ) ) ) {
//EOF - DokuMan - 2010-09-17 - set undefined index
$selection .= ' checked="checked"';
}
if (xtc_not_null($parameters)) $selection .= ' ' . $parameters;
$selection .= ' />'.$data['text'];
//BOF - DokuMan - 2010-09-17 - set undefined index: text
//$selection .= ' />'.$data['text'];
$selection .= ' />';
if (isset($data['text'])) $selection .= $data['text'];
//EOF - DokuMan - 2010-09-17 - set undefined index: text
return $selection;
}
?>
inc/xtc_get_tax_rate_from_desc.inc.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: xtc_get_tax_rate_from_desc.inc.php 899 2005-04-29 02:40:57Z hhgag $
$Id: xtc_get_tax_rate_from_desc.inc.php 2843 2012-05-06 14:30:10Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(application_top.php,v 1.273 2003/05/19); www.oscommerce.com
(c) 2003 nextcommerce (application_top.php,v 1.54 2003/08/25); www.nextcommerce.org
(c) 2006 XT-Commerce (xtc_get_tax_rate_from_desc.inc.php 455 2009-11-01 21); ; www.xt-commerce.com
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contribution:
ca. Zeile 28
---------------------------------------------------------------------------------------*/
// Get tax rate from tax description
function xtc_get_tax_rate_from_desc($tax_desc) {
//search digits in tax_description
if (preg_match('/\d+\.?\d*/', str_replace(',', '.', $tax_desc), $matches)) {
return floatval($matches[0]);
}
//check for TAX_SHORT_DISPLAY and remove it
if(defined('TAX_SHORT_DISPLAY') && TAX_SHORT_DISPLAY != '') {
$tax_desc = trim(str_replace(TAX_SHORT_DISPLAY, '', $tax_desc));
}
//remove tax info text
$tax_desc = trim(str_replace(array(TAX_ADD_TAX,TAX_NO_TAX), '', $tax_desc));
//get tax_rate from table tax_rates by tax_description
$tax_query = xtc_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_description = '" . $tax_desc . "'");
if (xtc_db_num_rows($tax_query) > 0) {
$tax = xtc_db_fetch_array($tax_query);
return $tax['tax_rate'];
}
//no tax_rate find, return 0
return 0;
}
?>
inc/xtc_href_link.inc.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: xtc_href_link.inc.php 1256 2010-09-02 12:11:34Z web28 $
$Id: xtc_href_link.inc.php 2746 2012-04-10 10:25:54Z gtb-modified $
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
XT-Commerce - community made shopping
http://www.xt-commerce.com
Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(html_output.php,v 1.52 2003/03/19); www.oscommerce.com
(c) 2003 nextcommerce (xtc_href_link.inc.php,v 1.3 2003/08/13); www.nextcommerce.org
(c) 2006 XT-Commerce (xtc_href_link.inc.php)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 27
$parameters = str_replace('&', '&', $parameters); // web28 - 2010-09-02 -- making link W3C-Conform
if (!xtc_not_null($page)) {
//die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!<br /><br />');
$page = 'index.php';
$page = FILENAME_DEFAULT;
}
if ($connection == 'NONSSL') {
// GTB - 2012-04-10 - remove index.php from Startpage
if ($page == FILENAME_DEFAULT && !xtc_not_null($parameters)) {
$page = '';
}
if ($connection == 'NONSSL' || $connection == '') {
$link = HTTP_SERVER . DIR_WS_CATALOG;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL == true) {
$link = HTTPS_SERVER . DIR_WS_CATALOG;
ca. Zeile 51
$link .= $page;
$separator = '?';
}
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) {
$link = substr($link, 0, -1);
}
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (defined('SID') && xtc_not_null(SID)) {
ca. Zeile 65
}
}
//--- SEO Hartmut König -----------------------------------------//
if ((isset($_REQUEST['test']) && $_REQUEST['test']) ||
((SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true)) )
{
if ((isset($_REQUEST['test']) && $_REQUEST['test'])
|| ((SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true)) ) {
require_once(DIR_FS_INC . 'shopstat_functions.inc.php');
$seolink = shopstat_getSEO( $page,
$parameters,
$connection,
$add_session_id,
$search_engine_safe,
'user');
if($seolink)
{
if($seolink){
$link = $seolink;
$elements = parse_url($link);
(isset($elements['query']))
? $separator = '&'
ca. Zeile 88
}
//--- SEO Hartmut König -----------------------------------------//
// remove session if useragent is a known Spider
if ($truncate_session_id) $sid=NULL;
if (isset($truncate_session_id)) {
$sid=NULL;
}
if (isset($sid)) {
$link .= $separator . $sid;
}
ca. Zeile 107
//-- W3C-Conform
if($urlencode) {
$link = htmlentities($link);
} else $link = str_replace('&', '&', $link); // web28 - 2010-09-02 -- making link W3C-Conform
} else {
$link = str_replace('&', '&', $link); // web28 - 2010-09-02 -- making link W3C-Conform
}
return $link;
}
function xtc_href_link_admin($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
ca. Zeile 139
$link .= $page;
$separator = '?';
}
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) {
$link = substr($link, 0, -1);
}
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (defined('SID') && xtc_not_null(SID)) {
ca. Zeile 152
}
}
}
//BOF - DokuMan - 2010-03-01 - do not remove the session id when admin, unset undefined variable
//if ($truncate_session_id) $sid=NULL;
//EOF - DokuMan - 2010-03-01 - do not remove the session id when admin, unset undefined variable
if (isset($truncate_session_id)) {
$sid=NULL; // DokuMan - 2011-03-01 - reenabled
}
if (isset($sid)) {
$link .= $separator . $sid;
}
inc/xtc_href_link_from_admin.inc.phpTop ca. Zeile 1
<?php
/*-----------------------------------------------------------------------
Version: $Id: xtc_href_link_from_admin.inc.php,v 1.1 2005/01/18 18:48:56 Administrator Exp $
$Id: xtc_href_link_from_admin.inc.php 2539 2011-12-20 15:31:37Z dokuman $
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(html_output.php,v 1.52 2003/03/19); www.oscommerce.com
(c) 2003 nextcommerce (xtc_href_link.inc.php,v 1.3 2003/08/13); www.nextcommerce.org
(c) 2006 XT-Commerce (xtc_href_link.inc.php)
Released under the GNU General Public License
xtC-SEO-Module by www.ShopStat.com (Hartmut König)
http://www.shopstat.com
info@shopstat.com
© 2004 ShopStat.com
All Rights Reserved.
------------------------------------------------------------------------*/
http://www.shopstat.com - info@shopstat.com
(c) 2004 ShopStat.com - All Rights Reserved.
---------------------------------------------------------------------------------------*/
// The HTML href link wrapper function
function xtc_href_link_from_admin
( $page = '',
function xtc_href_link_from_admin (
$page = '',
$parameters = '',
$connection = 'NONSSL',
$add_session_id = true,
$search_engine_safe = true)
ca. Zeile 25
if (!xtc_not_null($page)) {
die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link ('.$page.')!<br /><br />');
}
if ($connection == 'NONSSL')
{
if ($connection == 'NONSSL') {
$link = HTTP_SERVER . DIR_WS_CATALOG;
}
elseif ($connection == 'SSL')
{
if (ENABLE_SSL == true)
{
$link = HTTPS_SERVER . DIR_WS_CATALOG;
}
else{
} elseif ($connection == 'SSL') {
//BOF - DokuMan - 2011-12-20 - fix ticket #88
if (defined('ENABLE_SSL_CATALOG') && ENABLE_SSL_CATALOG == true) {
$link = (defined('HTTPS_CATALOG_SERVER') ? HTTPS_CATALOG_SERVER : HTTP_CATALOG_SERVER) . DIR_WS_CATALOG;
//EOF - DokuMan - 2011-12-20 - fix ticket #88
} else {
$link = HTTP_SERVER . DIR_WS_CATALOG;
}
}
else{
} else {
die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
}
if (xtc_not_null($parameters)) {
ca. Zeile 51
$link .= $page;
$separator = '?';
}
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) {
$link = substr($link, 0, -1);
}
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (defined('SID') && xtc_not_null(SID)) {
ca. Zeile 65
}
}
//--- SEO Hartmut König -----------------------------------------//
if ($_REQUEST['test'] ||
((SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true)) )
{
if ($_REQUEST['test']
|| ((SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true)) ) {
require_once(DIR_FS_INC . 'shopstat_functions.inc.php');
$seolink = shopstat_getSEO( $page,
$parameters,
$connection,
$add_session_id,
$search_engine_safe,
'admin');
if($seolink)
{
if($seolink) {
$link = $seolink;
$elements = parse_url($link);
(isset($elements['query']))
? $separator = '&'
ca. Zeile 96
if (isset($sid)) {
$link .= $separator . $sid;
}
//--- SEO Hartmut König -------------------------//
return $link;
}
?>
inc/xtc_wysiwyg.inc.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: xtc_wysiwyg.inc.php
$Id: xtc_wysiwyg.inc.php 2867 2012-05-14 11:57:08Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com/
xtcModified - community made shopping
http://www.xtc-modified.org
H.H.G. group
Hasan H. Gürsoy
Updated for FCKEditor 2.6.x by Hetfield
Copyright (c) 2005 XT-Commerce & H.H.G. group
Copyright (c) 2008 Hetfield - http://www.MerZ-IT-SerVice.de
Copyright (c) 2010 xtcModified
--------------------------------------------------------------
based on:
(c) 2005 XT-Commerce & H.H.G. group
(c) 2008 Hetfield - http://www.MerZ-IT-SerVice.de
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 24
$image_path = '&Type=Image';
$flash_path = '&Type=Flash';
$media_path = '&Type=Media';
$sid = '&'.session_name() . '=' . session_id(); //web28 security fix
switch($type) {
// WYSIWYG editor content manager textarea named cont
case 'content_manager':
$val ='<script type="text/javascript" src="'.$js_src.'"></script>
<script type="text/javascript">
window.onload = function()
{
window.onload = function() {
var oFCKeditor = new FCKeditor( \'cont\', \'100%\', \'400\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
}
ca. Zeile 47
// WYSIWYG editor content manager products content section textarea named file_comment
case 'products_content':
$val ='<script type="text/javascript" src="'.$js_src.'"></script>
<script type="text/javascript">
window.onload = function()
{
window.onload = function() {
var oFCKeditor = new FCKeditor( \'file_comment\', \'100%\', \'400\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
}
ca. Zeile 65
// WYSIWYG editor categories_description textarea named categories_description[langID]
case 'categories_description':
$val ='var oFCKeditor = new FCKeditor( \'categories_description['.$langID.']\', \'600\', \'300\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
';
ca. Zeile 78
// WYSIWYG editor products_description textarea named products_description_langID
case 'products_description':
$val ='var oFCKeditor = new FCKeditor( \'products_description_'.$langID.'\', \'100%\', \'400\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
';
ca. Zeile 91
// WYSIWYG editor products short description textarea named products_short_description_langID
case 'products_short_description':
$val ='var oFCKeditor = new FCKeditor( \'products_short_description_'.$langID.'\', \'100%\', \'300\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
';
ca. Zeile 104
// WYSIWYG editor newsletter textarea named newsletter_body
case 'newsletter':
$val ='<script type="text/javascript" src="'.$js_src.'"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( \'newsletter_body\', \'100%\', \'400\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
window.onload = function() {
var oFCKeditor = new FCKeditor( \'newsletter_body\', \'700\', \'400\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
}
ca. Zeile 122
// WYSIWYG editor mail textarea named message
case 'mail':
$val ='<script type="text/javascript" src="'.$js_src.'"></script>
<script type="text/javascript">
window.onload = function()
{
window.onload = function() {
var oFCKeditor = new FCKeditor( \'message\', \'700\', \'400\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
}
ca. Zeile 140
// WYSIWYG editor gv_mail textarea named message
case 'gv_mail':
$val ='<script type="text/javascript" src="'.$js_src.'"></script>
<script type="text/javascript">
window.onload = function()
{
window.onload = function() {
var oFCKeditor = new FCKeditor( \'message\', \'700\', \'400\' ) ;
oFCKeditor.BasePath = "'.$path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.'" ;
oFCKeditor.Config["LinkBrowserURL"] = "'.$filemanager.$file_path.$sid.'" ;
oFCKeditor.Config["ImageBrowserURL"] = "'.$filemanager.$image_path.$sid.'" ;
oFCKeditor.Config["FlashBrowserURL"] = "'.$filemanager.$flash_path.$sid.'" ;
oFCKeditor.Config["MediaBrowserURL"] = "'.$filemanager.$media_path.$sid.'" ;
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'" ;
oFCKeditor.ReplaceTextarea() ;
}
includes/application_top.phpTop ca. Zeile 31
// start the timer for the page parse time log
define('PAGE_PARSE_START_TIME', microtime());
// set the level of error reporting
if (file_exists('export/_error_reporting.all') || file_exists('export/_error_reporting.shop')) {
error_reporting(E_ALL & ~E_NOTICE);
// error_reporting(E_ALL);
} else {
error_reporting(0);
}
//error_reporting(E_ALL); //developer mode
// Set the local configuration parameters - mainly for developers - if exists else the mainconfigure
if (file_exists('includes/local/configure.php')) {
include ('includes/local/configure.php');
ca. Zeile 65
} else $request_type = 'NONSSL';
//EOF - web28 - 2010-09-03 - added native support for SSL-proxy connections
// set php_self in the local scope
//BOF - GTB - 2010-11-26 - Security Fix - PHP_SELF
$PHP_SELF = $_SERVER['SCRIPT_NAME'];
/*$PHP_SELF = $_SERVER['PHP_SELF'];
//--- SHOPSTAT -------------------------//
if (preg_match("/\.html$/",$PHP_SELF) )
{
if(!preg_match("/\.html$/",$_SERVER['SCRIPT_NAME']))
{
$PHP_SELF = $_SERVER['SCRIPT_NAME'];
}
elseif(!preg_match("/\.html$/",$_SERVER['SCRIPT_FILENAME']))
{
$PHP_SELF = $_SERVER['SCRIPT_FILENAME'];
}
}
//--- SHOPSTAT -------------------------//*/
//EOF - GTB - 2010-11-26 - Security Fix - PHP_SELF
//compatibility for xtcModified 1.06 files
define('DIR_WS_BASE', '');
// include the list of project filenames
require (DIR_WS_INCLUDES.'filenames.php');
ca. Zeile 236
} else {
ini_set('zlib.output_compression_level', GZIP_LEVEL);
}
}
//--- SHOPSTAT -------------------------//
/*
// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
// BOF - Tomcraft - 2009-10-25 - made capable for 1und1
$pathinfo=((getenv('PATH_INFO')=='')?$_SERVER['ORIG_PATH_INFO']:getenv('PATH_INFO'));
// BOF - Tomcraft - 2009-10-25 - replaced deprecated function ereg with preg_match
// if(ereg('.php',$pathinfo)):
if(preg_match('/.php/',$pathinfo)):
// EOF - Tomcraft - 2009-10-25 - replaced deprecated function ereg with preg_match
$PATH_INFO = substr(stristr('.php', $pathinfo),1);
else:
$PATH_INFO=$pathinfo;
endif;
// EOF - Tomcraft - 2009-10-25 - made capable for 1und1
if (strlen(getenv('PATH_INFO')) > 1) {
$GET_array = array ();
$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
$vars = explode('/', substr(getenv('PATH_INFO'), 1));
for ($i = 0, $n = sizeof($vars); $i < $n; $i ++) {
if (strpos($vars[$i], '[]')) {
$GET_array[substr($vars[$i], 0, -2)][] = $vars[$i +1];
} else {
// BOF - Tomcraft - 2009-06-03 - fix magic quotes security issue
// $_GET[$key] = $value;
$_GET[$vars[$i]] = htmlspecialchars($vars[$i +1]);
if(get_magic_quotes_gpc()) $_GET[$vars[$i]] = addslashes($_GET[$vars[$i]]); // security Patch 20.11.2008
// EOF - Tomcraft - 2009-06-03 - fix magic quotes security issue
}
$i ++;
}
if (sizeof($GET_array) > 0) {
while (list ($key, $value) = each($GET_array)) {
$_GET[$key] = htmlspecialchars($value);
// BOF - Tomcraft - 2009-06-03 - fix magic quotes security issue
// $_GET[$key] = $value;
if(get_magic_quotes_gpc()) $_GET[$key] = addslashes($_GET[$key]); // security Patch 20.11.2008
// EOF - Tomcraft - 2009-06-03 - fix magic quotes security issue
}
}
}
}
*/
//--- SHOPSTAT -------------------------//
// check GET/POST/COOKIE VARS
require (DIR_WS_CLASSES.'class.inputfilter.php');
$InputFilter = new InputFilter();
ca. Zeile 419
//EOF - DokuMan - 2010-05-20
// set the language
if (!isset ($_SESSION['language']) || isset ($_GET['language'])) {
include (DIR_WS_CLASSES.'language.php');
$lng = new language(xtc_input_validation($_GET['language'], 'char', ''));
if (!isset ($_GET['language']))
if (isset($_GET['language'])) {
$_GET['language']= xtc_input_validation($_GET['language'], 'char', '');
$lng = new language($_GET['language']);
}
if (!isset ($_GET['language'])) {
$lng = new language(DEFAULT_LANGUAGE);
$lng->get_browser_language();
}
$_SESSION['language'] = $lng->language['directory'];
$_SESSION['languages_id'] = $lng->language['id'];
$_SESSION['language_charset'] = $lng->language['language_charset'];
ca. Zeile 433
$_SESSION['language_code'] = $lng->language['code'];
}
if (isset($_SESSION['language']) && !isset($_SESSION['language_charset'])) {
include (DIR_WS_CLASSES.'language.php');
$lng = new language(xtc_input_validation($_SESSION['language'], 'char', ''));
$_SESSION['language'] = xtc_input_validation($_SESSION['language'], 'char', '');
$lng = new language($_SESSION['language']);
$_SESSION['language'] = $lng->language['directory'];
$_SESSION['languages_id'] = $lng->language['id'];
$_SESSION['language_charset'] = $lng->language['language_charset'];
ca. Zeile 450
require (DIR_WS_LANGUAGES.$_SESSION['language'].'/'.$_SESSION['language'].'.php');
// currency
if (!isset ($_SESSION['currency']) || isset ($_GET['currency']) || ((USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $_SESSION['currency']))) {
if (isset ($_GET['currency'])) {
$_GET['currency'] = xtc_input_validation($_GET['currency'], 'char', '');
if (!$_SESSION['currency'] = xtc_currency_exists($_GET['currency']))
$_SESSION['currency'] = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
} else {
$_SESSION['currency'] = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
ca. Zeile 484
require(DIR_WS_INCLUDES . 'econda/class.econda304SP2.php');
$econda = new econda();
}
// BOF - web28 - 2010-05-06 - PayPal API Modul
// PayPal Express
if (defined('PAYPAL_API_VERSION')) {
require_once (DIR_WS_CLASSES.'paypal_checkout.php');
$o_paypal = new paypal_checkout();
// EOF - web28 - 2010-05-06 - PayPal API Modul
}
require (DIR_WS_INCLUDES.FILENAME_CART_ACTIONS);
// create the shopping cart & fix the cart if necesary
if (!isset($_SESSION['cart']) || !is_object($_SESSION['cart'])) { //DokuMan - 2010-02-28 - set undefined variable cart
ca. Zeile 547
}
// calculate category path
if (isset ($_GET['cPath'])) {
$cPath = xtc_input_validation($_GET['cPath'], 'cPath', '');
$cPath = $_GET['cPath'] = xtc_input_validation($_GET['cPath'], 'cPath', '');
}
elseif (is_object($product) && !isset ($_GET['manufacturers_id'])) {
if ($product->isProduct()) {
$cPath = xtc_get_product_path($actual_products_id);
ca. Zeile 572
require (DIR_WS_CLASSES.'breadcrumb.php');
$breadcrumb = new breadcrumb;
$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);
if (DIR_WS_CATALOG != '/') {
$breadcrumb->add(HEADER_TITLE_CATALOG, xtc_href_link(FILENAME_DEFAULT));
}
// add category names or the manufacturer name to the breadcrumb trail
if (isset ($cPath_array)) {
for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i ++) {
$group_check = '';
if (GROUP_CHECK == 'true') {
$group_check = "and c.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
$categories_query = xtDBquery("select cd.categories_name
ca. Zeile 598
}
}
//elseif (xtc_not_null($_GET['manufacturers_id'])) {
elseif (isset($_GET['manufacturers_id']) && xtc_not_null($_GET['manufacturers_id'])) { //DokuMan - 2010-02-26 - set undefined variable manufacturers_id
$_GET['manufacturers_id'] = (int) $_GET['manufacturers_id'];
$manufacturers_query = xtDBquery("select manufacturers_name from ".TABLE_MANUFACTURERS." where manufacturers_id = '".(int) $_GET['manufacturers_id']."'");
$manufacturers = xtc_db_fetch_array($manufacturers_query, true);
$breadcrumb->add($manufacturers['manufacturers_name'], xtc_href_link(FILENAME_DEFAULT, xtc_manufacturer_link((int) $_GET['manufacturers_id'], $manufacturers['manufacturers_name'])));
includes/application_top_callback.phpTop ca. Zeile 23
// start the timer for the page parse time log
define('PAGE_PARSE_START_TIME', microtime());
// set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
//error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
// error_reporting(E_ALL);
// Set the local configuration parameters - mainly for developers - if exists else the mainconfigure
if (file_exists('../../includes/local/configure.php')) {
ca. Zeile 55
} else $request_type = 'NONSSL';
//EOF - web28 - 2010-09-03 - added native support for SSL-proxy connections
// set php_self in the local scope
//GTB - 2010-11-26 - Security Fix - PHP_SELF
$PHP_SELF = $_SERVER['SCRIPT_NAME'];
//compatibility for xtcModified 1.06 files
define('DIR_WS_BASE', '');
// include the list of project filenames
require(DIR_WS_INCLUDES . 'filenames.php');
// include the list of project database tables
includes/application_top_export.phpTop ca. Zeile 23
// start the timer for the page parse time log
define('PAGE_PARSE_START_TIME', microtime());
// set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
//error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
// error_reporting(E_ALL);
// Set the local configuration parameters - mainly for developers - if exists else the mainconfigure
if (file_exists('../includes/local/configure.php')) {
ca. Zeile 55
} else $request_type = 'NONSSL';
//EOF - web28 - 2010-09-03 - added native support for SSL-proxy connections
// set php_self in the local scope
//GTB - 2010-11-26 - Security Fix - PHP_SELF
$PHP_SELF = $_SERVER['SCRIPT_NAME'];
//compatibility for xtcModified 1.06 files
define('DIR_WS_BASE', '');
// include the list of project filenames
require(DIR_WS_INCLUDES . 'filenames.php');
// include the list of project database tables
includes/center_modules.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: center_modules.php 899 2005-04-29 02:40:57Z hhgag $
$Id: center_modules.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommercebased on original files from OSCommerce CVS 2.2 2002/08/28 02:14:35 www.oscommerce.com
(c) 2003 nextcommerce (center_modules.php,v 1.5 2003/08/13); www.nextcommerce.org
(c) 2006 XT-Commerce (center_modules.php 899 2005-04-29)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 14
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);
require(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
//BOF - DokuMan - 2011-01-21 - Fix a notice when there is no content found in center_modules
//return $module;
if(isset($module)) {
return $module;
}
return '';
//EOF - DokuMan - 2011-01-21 - Fix a notice when there is no content found in center_modules
?>
includes/classes/class.inputfilter.phpTop ca. Zeile 113
* @param String $source - input string to be 'cleaned'
* @return String $source - 'cleaned' version of input parameter
*/
function filterTags($source) {
//fix null byte injection
if (strpos($source,"\0")!== false) {return '';}
if (strpos($source,"\x00")!== false) {return '';}
if (strpos($source,"\u0000")!== false) {return '';}
if (strpos($source,"\000")!== false) {return '';}
//clean input string
return strip_tags($source);
// filter pass setup
$preTag = NULL;
$source = str_replace('<>','',$source);
$postTag = $source;
includes/classes/language.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: language.php 962 2005-05-27 17:27:01Z mz $
$Id: language.php 2800 2012-04-28 11:51:51Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(language.php,v 1.4 2003/02/11); www.oscommerce.com
(c) 2003 nextcommerce (language.php,v 1.6 2003/08/13); www.nextcommerce.org
(c) 2006 XT-Commerce (language.php 962 2005-05-27)
Released under the GNU General Public License
browser language detection logic
Copyright phpMyAdmin (select_lang.lib.php3 v1.24 04/19/2002)
Copyright Stephane Garin <sgarin@sgarin.com> (detect_language.php v0.1 04/02/2002)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
if ( !class_exists( "language" ) ) {
class language {
var $languages, $catalog_languages, $browser_languages, $language;
ca. Zeile 64
'uk-win1251' => array('uk|ukrainian', 'ukrainian-win1251', 'uk'),
'zh-tw' => array('zh[-_]tw|chinese traditional', 'chinese_big5', 'zh-TW'),
'zh' => array('zh|chinese simplified', 'chinese_gb', 'zh'));
$this->catalog_languages = array();
// BOF - Tomcraft - 2009-11-08 - Added option to deactivate languages
//$languages_query = xtc_db_query("select languages_id, name, code, image, directory,language_charset from " . TABLE_LANGUAGES . " order by sort_order");
$languages_query = xtc_db_query("select languages_id, name, code, image, directory,language_charset from " . TABLE_LANGUAGES . " where status = '1' order by sort_order");
// EOF - Tomcraft - 2009-11-08 - Added option to deactivate languages
$languages_query = xtc_db_query("SELECT * FROM " . TABLE_LANGUAGES . " WHERE status = '1' ORDER BY sort_order");
while ($languages = xtc_db_fetch_array($languages_query)) {
$this->catalog_languages[$languages['code']] = array('id' => $languages['languages_id'],
'name' => $languages['name'],
'image' => $languages['image'],
'status' => $languages['status'],
'code' => $languages['code'],
'language_charset' => $languages['language_charset'],
'directory' => $languages['directory']);
}
ca. Zeile 84
$this->language = '';
if ( (!empty($lng)) && (isset($this->catalog_languages[$lng])) ) {
$this->language = $this->catalog_languages[$lng];
} else {
//BOF - DokuMan - 2011-01-21 - Fix language detection error
//} else {
// $this->language = $this->catalog_languages[DEFAULT_LANGUAGE];
//}
} elseif(isset($this->catalog_languages[DEFAULT_LANGUAGE])) {
$this->language = $this->catalog_languages[DEFAULT_LANGUAGE];
} else {
$this->language = $this->catalog_languages[key($this->catalog_languages)];
//EOF - DokuMan - 2011-01-21 - Fix language detection error
}
}
function get_browser_language() {
$this->browser_languages = explode(',', getenv('HTTP_ACCEPT_LANGUAGE'));
$this->browser_languages = explode(',', (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '')); //DokuMan - 2010-08-04 - use $_SERVER here for better windows environment compatiblity
for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
//BOF - DokuMan - 2011-12-19 - precount for performance
//for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
$n=sizeof($this->browser_languages);
for ($i=0; $i<$n; $i++) {
//EOF - DokuMan - 2011-12-19 - precount for performance
reset($this->languages);
while (list($key, $value) = each($this->languages)) {
foreach($this->languages as $key => $value) { //Dokuman - 2011-07-26 - Change while with foreach for performance
if (preg_match('/^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { // Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
$this->language = $this->catalog_languages[$key];
break 2;
}
includes/classes/order.phpTop ca. Zeile 69
$order = xtc_db_fetch_array($order_query);
$totals_query = xtc_db_query("SELECT *
FROM " . TABLE_ORDERS_TOTAL . "
where orders_id = '" . $order_id . "'
order by sort_order");
WHERE orders_id = '" . $order_id . "'
ORDER BY sort_order");
while ($totals = xtc_db_fetch_array($totals_query)) {
$this->totals[] = array('title' => $totals['title'],
'text' => $totals['text'],
'value'=> $totals['value']);
}
// BOF - web28 - 2010-05-06 - PayPal API Modul
//$order_total_query = xtc_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_total'");
$order_total_query = xtc_db_query("select text, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_total'");
//$order_total_query = xtc_db_query("SELECT text FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_total'");
$order_total_query = xtc_db_query("SELECT text, value FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_total'");
// EOF - web28 - 2010-05-06 - PayPal API Modul
$order_total = xtc_db_fetch_array($order_total_query);
// BOF - web28 - 2010-05-06 - PayPal API Modul
$order_tax_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_tax'");
$order_tax_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_tax'");
$order_tax = xtc_db_fetch_array($order_tax_query);
$pp_order_tax=$order_tax['SUM(value)'];
$pp_order_disc=0;
$order_disc_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_discount'");
$order_disc_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_discount'");
$order_disc = xtc_db_fetch_array($order_disc_query);
$pp_order_disc+=$order_disc['SUM(value)'];
$pp_order_gs=0;
$order_gs_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_coupon'");
$order_gs_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_coupon'");
$order_gs = xtc_db_fetch_array($order_gs_query);
$pp_order_gs-=$order_gs['SUM(value)'];
$order_gs_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_gv'");
$order_gs_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_gv'");
$order_gs = xtc_db_fetch_array($order_gs_query);
$pp_order_gs-=$order_gs['SUM(value)'];
/// customers bonus
$order_gs_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_bonus_fee'");
$order_gs_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_bonus_fee'");
$order_gs = xtc_db_fetch_array($order_gs_query);
$pp_order_gs-=$order_gs['SUM(value)'];
$pp_order_fee=0;
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_payment'");
$order_fee_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_payment'");
$order_fee = xtc_db_fetch_array($order_fee_query);
// Rabatt aus Fremd Modul
if($order_fee['SUM(value)'] < 0):
if($order_fee['SUM(value)'] < 0) {
$pp_order_disc+=$order_fee['SUM(value)'];
else:
} else {
$pp_order_fee+=$order_fee['SUM(value)'];
endif;
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_cod_fee'");
}
$order_fee_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_cod_fee'");
$order_fee = xtc_db_fetch_array($order_fee_query);
$pp_order_fee+=$order_fee['SUM(value)'];
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_ps_fee'");
$order_fee_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_ps_fee'");
$order_fee = xtc_db_fetch_array($order_fee_query);
$pp_order_fee+=$order_fee['SUM(value)'];
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_loworderfee'");
$order_fee_query = xtc_db_query("SELECT SUM(value) FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_loworderfee'");
$order_fee = xtc_db_fetch_array($order_fee_query);
$pp_order_fee+=$order_fee['SUM(value)'];
//$shipping_method_query = xtc_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_shipping'");
$shipping_method_query = xtc_db_query("select title, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_shipping'");
//$shipping_method_query = xtc_db_query("SELECT title FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_shipping'");
$shipping_method_query = xtc_db_query("SELECT title, value FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . $order_id . "' AND class = 'ot_shipping'");
// EOF - web28 - 2010-05-06 - PayPal API Modul
$shipping_method = xtc_db_fetch_array($shipping_method_query);
$order_status_query = xtc_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . $_SESSION['languages_id'] . "'");
$order_status_query = xtc_db_query("SELECT orders_status_name FROM " . TABLE_ORDERS_STATUS . " WHERE orders_status_id = '" . $order['orders_status'] . "' AND language_id = '" . $_SESSION['languages_id'] . "'");
$order_status = xtc_db_fetch_array($order_status_query);
$this->info = array('currency' => $order['currency'],
$order['order_id'] = $order_id;
$this->info = array('order_id' => $order['order_id'], //DokuMan - 2011-08-31 - fix order_id assignment
'currency' => $order['currency'],
'currency_value' => $order['currency_value'],
'payment_method' => $order['payment_method'],
'cc_type' => $order['cc_type'],
'cc_owner' => $order['cc_owner'],
ca. Zeile 154
'pp_gs' => $pp_order_gs,
'pp_fee' => $pp_order_fee,
// EOF - web28 - 2010-05-06 - PayPal API Modul
'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])),
'comments' => $order['comments']
'comments' => $order['comments'],
'language' => $order['language']
);
$this->customer = array('id' => $order['customers_id'],
'name' => $order['customers_name'],
ca. Zeile 187
'city' => $order['delivery_city'],
'postcode' => $order['delivery_postcode'],
'state' => $order['delivery_state'],
'country' => $order['delivery_country'],
//BOF - web28 - 2010-03-26 - PayPal IPN Link
'country_iso_2' => $order['delivery_country_iso_code_2'], //FIX - web28 - 2010-06-11 billing -> delivery
//EOF - web28 - 2010-03-26 - PayPal IPN Link
'country_iso_2' => $order['delivery_country_iso_code_2'], // web28 - 2010-03-26 - PayPal IPN Link / Paypal Express Modul
'format_id' => $order['delivery_address_format_id']);
if (empty($this->delivery['name']) && empty($this->delivery['street_address'])) {
$this->delivery = false;
ca. Zeile 206
'city' => $order['billing_city'],
'postcode' => $order['billing_postcode'],
'state' => $order['billing_state'],
'country' => $order['billing_country'],
'country_iso_2' => $order['billing_country_iso_code_2'], //ADD - web28 - 2010-05-06 - PAYPAL //FIX - web28 - 2010-06-11 delivery -> billing
'country_iso_2' => $order['billing_country_iso_code_2'], //ADD - web28 - 2010-05-06 - PayPal IPN Link / Paypal Express Modul
'format_id' => $order['billing_address_format_id']);
$index = 0;
$orders_products_query = xtc_db_query("SELECT *
FROM " . TABLE_ORDERS_PRODUCTS . "
where orders_id = '" . $order_id . "'");
WHERE orders_id = '" . $order_id . "'");
while ($orders_products = xtc_db_fetch_array($orders_products_query)) {
$this->products[$index] = array('qty' => $orders_products['products_quantity'],
'id' => $orders_products['products_id'],
'name' => $orders_products['products_name'],
ca. Zeile 224
'shipping_time'=> $orders_products['products_shipping_time'],
'final_price' => $orders_products['final_price']);
$subindex = 0;
$attributes_query = xtc_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
where orders_id = '" . $order_id . "'
and orders_products_id = '" . $orders_products['orders_products_id'] . "'
order by orders_products_attributes_id"); //ADD - web28 - 2010-06-11 - order by orders_products_attributes_id
$attributes_query = xtc_db_query("SELECT *
FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
WHERE orders_id = '" . $order_id . "'
AND orders_products_id = '" . $orders_products['orders_products_id'] . "'
ORDER BY orders_products_attributes_id"); //ADD - web28 - 2010-06-11 - order by orders_products_attributes_id
if (xtc_db_num_rows($attributes_query)) {
while ($attributes = xtc_db_fetch_array($attributes_query)) {
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],
'value' => $attributes['products_options_values'],
ca. Zeile 249
function getOrderData($oID) {
global $xtPrice;
require_once(DIR_FS_INC . 'xtc_get_attributes_model.inc.php');
$order_query = "SELECT
products_id,
$order_query = "SELECT products_id,
orders_products_id,
products_model,
products_name,
final_price,
products_tax,
products_shipping_time,
products_quantity
FROM ".TABLE_ORDERS_PRODUCTS."
WHERE orders_id='".(int) $oID."'";
$order_data = array ();
$order_query = xtc_db_query($order_query);
while ($order_data_values = xtc_db_fetch_array($order_query)) {
$attributes_query = "SELECT
products_options,
$attributes_query = "SELECT products_options,
products_options_values,
price_prefix,
options_values_price
FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES."
WHERE orders_products_id='".$order_data_values['orders_products_id']."'
order by orders_products_attributes_id"; //ADD - web28 - 2010-06-11 - order by orders_products_attributes_id
ORDER BY orders_products_attributes_id"; //ADD - web28 - 2010-06-11 - order by orders_products_attributes_id
$attributes_data = '';
$attributes_model = '';
$attributes_query = xtc_db_query($attributes_query);
while ($attributes_data_values = xtc_db_fetch_array($attributes_query)) {
$attributes_data .= '<br />'.$attributes_data_values['products_options'].':'.$attributes_data_values['products_options_values'];
$attributes_model .= '<br />'.xtc_get_attributes_model($order_data_values['products_id'], $attributes_data_values['products_options_values'],$attributes_data_values['products_options']);
}
$order_data[] = array ('PRODUCTS_MODEL' => $order_data_values['products_model'], 'PRODUCTS_NAME' => $order_data_values['products_name'],'PRODUCTS_SHIPPING_TIME' => $order_data_values['products_shipping_time'], 'PRODUCTS_ATTRIBUTES' => $attributes_data, 'PRODUCTS_ATTRIBUTES_MODEL' => $attributes_model, 'PRODUCTS_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price'], true),'PRODUCTS_SINGLE_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price']/$order_data_values['products_quantity'], true), 'PRODUCTS_QTY' => $order_data_values['products_quantity']);
$order_data[] = array ('PRODUCTS_ID' => $order_data_values['products_id'],
'PRODUCTS_MODEL' => $order_data_values['products_model'],
'PRODUCTS_NAME' => $order_data_values['products_name'],
'PRODUCTS_SHIPPING_TIME' => $order_data_values['products_shipping_time'],
'PRODUCTS_ATTRIBUTES' => $attributes_data,
'PRODUCTS_ATTRIBUTES_MODEL' => $attributes_model,
'PRODUCTS_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price'], true),
'PRODUCTS_SINGLE_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price']/$order_data_values['products_quantity'], true),
'PRODUCTS_TAX' => ($order_data_values['products_tax'] > 0.00) ? number_format($order_data_values['products_tax'], TAX_DECIMAL_PLACES):0,
'PRODUCTS_QTY' => $order_data_values['products_quantity']);
}
return $order_data;
}
function getTotalData($oID) {
ca. Zeile 288
function getTotalData($oID) {
global $xtPrice,$db;
$total='';
$shipping='';
// get order_total data
$order_total_query = "SELECT
title,
$order_total_query = "SELECT title,
text,
class,
value,
sort_order
ca. Zeile 309
'CLASS' => $order_total_values['class'],
'VALUE' => $order_total_values['value'],
'TEXT' => $order_total_values['text']
);
// BOF 24.04.2009 JUNG/GESTALTEN.com - BUGFIX: #0000222 Tippfehler in orders class
//if ($order_total_values['class'] = 'ot_total')
if ($order_total_values['class'] == 'ot_total')
// EOF 24.04.2009 JUNG/GESTALTEN.com - BUGFIX: #0000222 Tippfehler in orders class
if ($order_total_values['class'] == 'ot_total') {
$total = $order_total_values['value'];
}
//BOF - web28 - 2010-03-26 - PayPal IPN Link in Kundenaccount
if ($order_total_values['class'] == 'ot_shipping')
$shipping = $order_total_values['value'];
//EOF - web28 - 2010-03-26 - PayPal IPN Link in Kundenaccount
}
//BOF - web28 - 2010-03-26 - PayPal IPN Link in Kundenaccount
//return array('data'=>$order_total,'total'=>$total);
return array('data'=>$order_total,'total'=>$total, 'shipping'=>$shipping);
//EOF - web28 - 2010-03-26 - PayPal IPN Link in Kundenaccount
if ($order_total_values['class'] == 'ot_shipping') {
$shipping = $order_total_values['value']; // web28 - 2010-03-26 - PayPal IPN Link in Kundenaccount
}
}
return array('data'=>$order_total,
'total'=>$total,
'shipping'=>$shipping
);
}
function cart() {
global $currencies,$xtPrice;
$this->content_type = $_SESSION['cart']->get_content_type();
$customer_address_query = xtc_db_query("select c.payment_unallowed,c.shipping_unallowed,c.customers_firstname,c.customers_cid, c.customers_gender,c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . $_SESSION['customer_id'] . "' and ab.customers_id = '" . $_SESSION['customer_id'] . "' and c.customers_default_address_id = ab.address_book_id");
$customer_address_query = xtc_db_query("SELECT c.payment_unallowed,c.shipping_unallowed,c.customers_firstname,
c.customers_cid, c.customers_gender,c.customers_lastname,
c.customers_telephone, c.customers_email_address,
ab.entry_company, ab.entry_street_address, ab.entry_suburb,
ab.entry_postcode, ab.entry_city, ab.entry_zone_id, ab.entry_state,
co.countries_id, co.countries_name, co.countries_iso_code_2,
co.countries_iso_code_3, co.address_format_id,
z.zone_name
FROM " . TABLE_CUSTOMERS . " c,
" . TABLE_ADDRESS_BOOK . " ab
LEFT JOIN " . TABLE_ZONES . " z ON (ab.entry_zone_id = z.zone_id)
LEFT JOIN " . TABLE_COUNTRIES . " co ON (ab.entry_country_id = co.countries_id)
WHERE c.customers_id = '" . $_SESSION['customer_id'] . "'
AND ab.customers_id = '" . $_SESSION['customer_id'] . "'
AND c.customers_default_address_id = ab.address_book_id
");
$customer_address = xtc_db_fetch_array($customer_address_query);
$shipping_address_query = xtc_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . $_SESSION['customer_id'] . "' and ab.address_book_id = '" . $_SESSION['sendto'] . "'");
$shipping_address_query = xtc_db_query("SELECT ab.entry_firstname, ab.entry_lastname, ab.entry_company,
ab.entry_street_address, ab.entry_suburb, ab.entry_postcode,
ab.entry_city, ab.entry_zone_id, ab.entry_country_id, ab.entry_state,
c.countries_id, c.countries_name, c.countries_iso_code_2,
c.countries_iso_code_3, c.address_format_id,
z.zone_name
FROM " . TABLE_ADDRESS_BOOK . " ab
LEFT JOIN " . TABLE_ZONES . " z ON (ab.entry_zone_id = z.zone_id)
LEFT JOIN " . TABLE_COUNTRIES . " c ON (ab.entry_country_id = c.countries_id)
WHERE ab.customers_id = '" . $_SESSION['customer_id'] . "'
AND ab.address_book_id = '" . $_SESSION['sendto'] . "'
");
$shipping_address = xtc_db_fetch_array($shipping_address_query);
//BOF - DokuMan - 2010-03-26 - use sendto-address if billto-address is not set
//$billing_address_query = xtc_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . $_SESSION['customer_id'] . "' and ab.address_book_id = '" . $_SESSION['billto'] . "'");
$billing_address_query = xtc_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . $_SESSION['customer_id'] . "' and ab.address_book_id = '" . (isset($_SESSION['billto']) ? $_SESSION['billto'] : $_SESSION['sendto']) . "'");
//EOF - DokuMan - 2010-03-26 - use sendto-address if billto-address is not set
$billing_address_query = xtc_db_query("SELECT ab.entry_firstname, ab.entry_lastname, ab.entry_company,
ab.entry_street_address, ab.entry_suburb, ab.entry_postcode,
ab.entry_city, ab.entry_zone_id, ab.entry_country_id, ab.entry_state,
c.countries_id, c.countries_name, c.countries_iso_code_2,
c.countries_iso_code_3, c.address_format_id,
z.zone_name
FROM " . TABLE_ADDRESS_BOOK . " ab
LEFT JOIN " . TABLE_ZONES . " z ON (ab.entry_zone_id = z.zone_id)
LEFT JOIN " . TABLE_COUNTRIES . " c ON (ab.entry_country_id = c.countries_id)
WHERE ab.customers_id = '" . $_SESSION['customer_id'] . "'
AND ab.address_book_id = '" . (isset($_SESSION['billto']) ? $_SESSION['billto'] : $_SESSION['sendto']) . "'
");
$billing_address = xtc_db_fetch_array($billing_address_query);
$tax_address_query = xtc_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . $_SESSION['customer_id'] . "' and ab.address_book_id = '" . ($this->content_type == 'virtual' ? $_SESSION['billto'] : $_SESSION['sendto']) . "'");
$tax_address_query = xtc_db_query("SELECT ab.entry_country_id, ab.entry_zone_id
FROM " . TABLE_ADDRESS_BOOK . " ab
LEFT JOIN " . TABLE_ZONES . " z ON (ab.entry_zone_id = z.zone_id)
WHERE ab.customers_id = '" . $_SESSION['customer_id'] . "'
AND ab.address_book_id = '" . ($this->content_type == 'virtual' ? $_SESSION['billto'] : $_SESSION['sendto']) . "'
");
$tax_address = xtc_db_fetch_array($tax_address_query);
$this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,
'currency' => $_SESSION['currency'],
ca. Zeile 424
// BOF - web28 - 2010-05-06 - PayPal API Modul
$this->tax_discount = array ();
// EOF - web28 - 2010-05-06 - PayPal API Modul
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
//BOF - DokuMan - 2011-12-19 - precount for performance
//for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$n=sizeof($products);
for ($i=0; $i<$n; $i++) {
//EOF - DokuMan - 2011-12-19 - precount for performance
$products_price=$xtPrice->xtcGetPrice($products[$i]['id'],
$format=false,
$products[$i]['quantity'],
$products[$i]['tax_class_id'],
ca. Zeile 439
'tax_class_id'=> $products[$i]['tax_class_id'],
'tax' => xtc_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
'tax_description' => xtc_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
'price' => $products_price ,
'price_formated' => $xtPrice->xtcFormat($products_price,true), // ADD - web28 - 2010-05-06 - PayPal API Modul
'price_formated' => $xtPrice->xtcFormat($products_price,true), // web28 - 2010-05-06 - PayPal API Modul / Paypal Express Modul
'final_price' => $products_price*$products[$i]['quantity'],
'final_price_formated' => $xtPrice->xtcFormat($products_price*$products[$i]['quantity'],true), // ADD - web28 - 2010-05-06 - PayPal API Modul
'final_price_formated' => $xtPrice->xtcFormat($products_price*$products[$i]['quantity'],true), // web28 - 2010-05-06 - PayPal API Modul / Paypal Express Modul
'shipping_time'=>$products[$i]['shipping_time'],
'weight' => $products[$i]['weight'],
'id' => $products[$i]['id']);
if ($products[$i]['attributes']) {
$subindex = 0;
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
$attributes_query = xtc_db_query("select
popt.products_options_name,
$attributes_query = xtc_db_query("SELECT popt.products_options_name,
poval.products_options_values_name,
pa.options_values_price,
pa.price_prefix
from " . TABLE_PRODUCTS_OPTIONS . " popt,
FROM " . TABLE_PRODUCTS_OPTIONS . " popt,
" . TABLE_PRODUCTS_OPTIONS_VALUES . " poval,
" . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . $products[$i]['id'] . "'
and pa.options_id = '" . $option . "'
and pa.options_id = popt.products_options_id
and pa.options_values_id = '" . $value . "'
and pa.options_values_id = poval.products_options_values_id
and popt.language_id = '" . $_SESSION['languages_id'] . "'
and poval.language_id = '" . $_SESSION['languages_id'] . "'"
WHERE pa.products_id = '" . $products[$i]['id'] . "'
AND pa.options_id = '" . $option . "'
AND pa.options_id = popt.products_options_id
AND pa.options_values_id = '" . $value . "'
AND pa.options_values_id = poval.products_options_values_id
AND popt.language_id = '" . $_SESSION['languages_id'] . "'
AND poval.language_id = '" . $_SESSION['languages_id'] . "'"
);
$attributes = xtc_db_fetch_array($attributes_query);
$this->products[$index]['attributes'][$subindex] = array(
'option' => $attributes['products_options_name'],
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'],
'value' => $attributes['products_options_values_name'],
'option_id' => $option,
'value_id' => $value,
'prefix' => $attributes['price_prefix'],
ca. Zeile 491
$products_tax_description = $this->products[$index]['tax_description'];
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == '1') {
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {
$this->info['tax'] += $shown_price_tax - ($shown_price_tax / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
if (!isset($this->info['tax_groups'][TAX_ADD_TAX."$products_tax_description"])) {
$this->info['tax_groups'][TAX_ADD_TAX."$products_tax_description"] = 0;
}
$this->info['tax_groups'][TAX_ADD_TAX."$products_tax_description"] += (($shown_price_tax /(100+$products_tax)) * $products_tax);
} else {
$this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
if (!isset($this->info['tax_groups'][TAX_ADD_TAX."$products_tax_description"])) {
$this->info['tax_groups'][TAX_ADD_TAX."$products_tax_description"] = 0;
}
$this->info['tax_groups'][TAX_ADD_TAX . "$products_tax_description"] += (($shown_price /(100+$products_tax)) * $products_tax);
}
} else {
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {
// BOF - web28 - 2010-05-06 - PayPal API Modul
// $this->info['tax'] += ($shown_price_tax/100) * ($products_tax);
$this->tax_discount[$products[$i]['tax_class_id']]+=($shown_price_tax/100) * $products_tax;
// EOF - web28 - 2010-05-06 - PayPal API Modul
if (!isset($this->info['tax_groups'][TAX_NO_TAX ."$products_tax_description"])) {
$this->info['tax_groups'][TAX_NO_TAX."$products_tax_description"] = 0;
}
$this->info['tax_groups'][TAX_NO_TAX . "$products_tax_description"] += ($shown_price_tax/100) * ($products_tax);
} else {
$this->info['tax'] += ($shown_price/100) * ($products_tax);
if (!isset($this->info['tax_groups'][TAX_NO_TAX ."$products_tax_description"])) {
$this->info['tax_groups'][TAX_NO_TAX."$products_tax_description"] = 0;
}
$this->info['tax_groups'][TAX_NO_TAX . "$products_tax_description"] += ($shown_price/100) * ($products_tax);
}
}
$index++;
includes/classes/order_total.phpTop ca. Zeile 79
reset($this->modules);
$output_string = '';
while (list (, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {
if ($GLOBALS[$class]->enabled && isset($GLOBALS[$class]->credit_class) && $GLOBALS[$class]->credit_class) {
$use_credit_string = $GLOBALS[$class]->use_credit_amount();
if ($selection_string == '')
if ($selection_string == '') {
$selection_string = $GLOBALS[$class]->credit_selection();
}
if (($use_credit_string != '') || ($selection_string != '')) {
$output_string .= '<tr colspan="4"><td colspan="4" width="100%">'.xtc_draw_separator('pixel_trans.gif', '100%', '10').'</td></tr>';
$output_string .= '<tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" >';
$output_string .= '<td width="10">'.xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>';
ca. Zeile 122
if (MODULE_ORDER_TOTAL_INSTALLED) {
reset($this->modules);
while (list (, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if (($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class)) {
if (($GLOBALS[$class]->enabled && isset($GLOBALS[$class]->credit_class) && $GLOBALS[$class]->credit_class)) {
$GLOBALS[$class]->update_credit_account($i);
}
}
}
ca. Zeile 140
if (MODULE_ORDER_TOTAL_INSTALLED) {
reset($this->modules);
while (list (, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if (($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class)) {
if (($GLOBALS[$class]->enabled && isset($GLOBALS[$class]->credit_class) && $GLOBALS[$class]->credit_class)) {
$post_var = 'c'.$GLOBALS[$class]->code;
if ($_POST[$post_var]) {
if (isset($_POST[$post_var]) && $_POST[$post_var]) {
$_SESSION[$post_var] = $_POST[$post_var];
}
$GLOBALS[$class]->collect_posts();
}
ca. Zeile 164
$order_total = $order->info['total'];
while (list (, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
$order_total = $this->get_order_total_main($class, $order_total);
if (($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class)) {
if (($GLOBALS[$class]->enabled && isset($GLOBALS[$class]->credit_class) && $GLOBALS[$class]->credit_class)) {
$total_deductions = $total_deductions + $GLOBALS[$class]->pre_confirmation_check($order_total);
$order_total = $order_total - $GLOBALS[$class]->pre_confirmation_check($order_total);
}
}
ca. Zeile 185
if (MODULE_ORDER_TOTAL_INSTALLED) {
reset($this->modules);
while (list (, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if (($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class)) {
if (($GLOBALS[$class]->enabled && isset($GLOBALS[$class]->credit_class) && $GLOBALS[$class]->credit_class)) {
$GLOBALS[$class]->apply_credit();
}
}
}
ca. Zeile 199
if (MODULE_ORDER_TOTAL_INSTALLED) {
reset($this->modules);
while (list (, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if (($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class)) {
if (($GLOBALS[$class]->enabled && isset($GLOBALS[$class]->credit_class) && $GLOBALS[$class]->credit_class)) {
$post_var = 'c'.$GLOBALS[$class]->code;
unset ($_SESSION[$post_var]);
}
}
ca. Zeile 244
reset($this->modules);
while (list (, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
$GLOBALS[$class]->output = array(); //DokuMan - 2011-09-29 - calling $order_total_modules->process() multiple times would duplicate the output data due to the order total modules already being instantiated
$GLOBALS[$class]->process();
for ($i = 0, $n = sizeof($GLOBALS[$class]->output); $i < $n; $i ++) {
if (xtc_not_null($GLOBALS[$class]->output[$i]['title']) && xtc_not_null($GLOBALS[$class]->output[$i]['text'])) {
$order_total_array[] = array ('code' => $GLOBALS[$class]->code, 'title' => $GLOBALS[$class]->output[$i]['title'], 'text' => $GLOBALS[$class]->output[$i]['text'], 'value' => $GLOBALS[$class]->output[$i]['value'], 'sort_order' => $GLOBALS[$class]->sort_order);
$order_total_array[] = array ('code' => $GLOBALS[$class]->code,
'title' => $GLOBALS[$class]->output[$i]['title'],
'text' => $GLOBALS[$class]->output[$i]['text'],
'value' => $GLOBALS[$class]->output[$i]['value'],
'sort_order' => $GLOBALS[$class]->sort_order
);
}
}
}
}
includes/classes/payment.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: payment.php 41 2009-01-22 16:10:55Z mzanier $
$Id: payment.php 2594 2012-01-04 10:53:58Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(payment.php,v 1.36 2003/02/11); www.oscommerce.com
(c) 2003 nextcommerce (payment.php,v 1.11 2003/08/17); www.nextcommerce.org
(c) 2006 XT-Commerce (payment.php 41 2009-01-22)
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contribution:
Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
// include needed functions
ca. Zeile 28
---------------------------------------------------------------------------------------*/
// include needed functions
require_once(DIR_FS_INC . 'xtc_count_payment_modules.inc.php');
require_once(DIR_FS_INC . 'xtc_in_array.inc.php');
class payment {
var $modules, $selected_module;
ca. Zeile 45
$include_modules = array();
if ( (xtc_not_null($module)) && (in_array($module . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {
$this->selected_module = $module;
$include_modules[] = array('class' => $module, 'file' => $module . '.php');
$include_modules[] = array('class' => $module,
'file' => $module . '.php');
} else {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
$include_modules[] = array('class' => $class, 'file' => $value);
$include_modules[] = array('class' => $class,
'file' => $value);
}
}
// load unallowed modules into array
$unallowed_modules = explode(',', $_SESSION['customers_status']['customers_status_payment_unallowed'].','.$order->customer['payment_unallowed']);
// load unallowed modules into array - remove spaces and line breaks by web28
$unallowed_modules_string = $_SESSION['customers_status']['customers_status_payment_unallowed'];
if (isset($order->customer['payment_unallowed']) && trim($order->customer['payment_unallowed']) != '') {
$unallowed_modules_string .= ','.$order->customer['payment_unallowed'];
}
$unallowed_modules_string = preg_replace("'[\r\n\s]+'",'',$unallowed_modules_string);
$unallowed_modules = explode(',',$unallowed_modules_string);
// add unallowed modules/Download
if ($order->content_type == 'virtual' || ($order->content_type == 'virtual_weight')) {
$unallowed_modules = array_merge($unallowed_modules,explode(',',DOWNLOAD_UNALLOWED_PAYMENT));
if (isset($order) && is_object($order) && ($order->content_type == 'virtual' || ($order->content_type == 'virtual_weight'))) {
$download_unallowed_payment = preg_replace("'[\r\n\s]+'",'',DOWNLOAD_UNALLOWED_PAYMENT);
$unallowed_modules = array_merge($unallowed_modules,explode(',',$download_unallowed_payment));
}
//print_r($include_modules);
for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
if (!in_array($include_modules[$i]['class'], $unallowed_modules)) {
// check if zone is alowed to see module
if (constant(MODULE_PAYMENT_ . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . _ALLOWED) != '') {
$unallowed_zones = explode(',', constant(MODULE_PAYMENT_ . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . _ALLOWED));
if (constant('MODULE_PAYMENT_' . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . '_ALLOWED') != '') {
$unallowed_zones = explode(',', constant('MODULE_PAYMENT_' . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . '_ALLOWED'));
} else {
$unallowed_zones = array();
}
if (in_array($_SESSION['delivery_zone'], $unallowed_zones) == true || count($unallowed_zones) == 0) {
if ((isset($_SESSION['delivery_zone']) && in_array($_SESSION['delivery_zone'], $unallowed_zones) == true) || count($unallowed_zones) == 0) {
if ($include_modules[$i]['file']!='' && $include_modules[$i]['file']!='no_payment') {
include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $include_modules[$i]['file']);
include(DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file']);
include_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $include_modules[$i]['file']);
include_once(DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file']);
}
if (class_exists($include_modules[$i]['class'])) {
$GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];
}
}
}
}
// if there is only one payment method, select it as default because in
// checkout_confirmation.php the $payment variable is being assigned the
// $HTTP_POST_VARS['payment'] value which will be empty (no radio button selection possible)
if ( (xtc_count_payment_modules() == 1) && (!is_object($_SESSION['payment'])) ) {
// Do not preselect a payment method -> user interaction shall be required!
if ( (xtc_count_payment_modules() == 1) && (!isset($_SESSION['payment']) || !is_object($_SESSION['payment'])) ) {
$_SESSION['payment'] = $include_modules[0]['class'];
}
if ( (xtc_not_null($module)) && (in_array($module, $this->modules)) && (isset($GLOBALS[$module]->form_action_url)) ) {
ca. Zeile 105
section. This should be looked into again post 2.2.
*/
function update_status() {
if (is_array($this->modules)) {
if (is_object($GLOBALS[$this->selected_module])) {
if (isset($GLOBALS[$this->selected_module]) && is_object($GLOBALS[$this->selected_module])) {
if (function_exists('method_exists')) {
if (method_exists($GLOBALS[$this->selected_module], 'update_status')) {
$GLOBALS[$this->selected_module]->update_status();
}
} else { // PHP3 compatibility
@call_user_func('update_status', $GLOBALS[$this->selected_module]); // Hetfield - 2009-08-19 - replaced deprecated function call_user_method with call_user_func to be ready for PHP >= 5.3
}
}
}
}
ca. Zeile 140
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
if (isset($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
$js .= $GLOBALS[$class]->javascript_validation();
}
}
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
ca. Zeile 174
if (is_array($this->modules)) {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
if (isset($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
$selection = $GLOBALS[$class]->selection();
if (is_array($selection)) $selection_array[] = $selection;
if (is_array($selection)) {
$selection_array[] = $selection;
}
}
}
}
return $selection_array;
}
//GV Code Start
ca. Zeile 195
}
// GV Code End
function pre_confirmation_check() {
global $credit_covers, $payment_modules; // GV Code ICW CREDIT CLASS Gift Voucher System
global $credit_covers, $payment_modules;
if (is_array($this->modules)) {
if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {
if ($credit_covers) { // GV Code ICW CREDIT CLASS Gift Voucher System
$GLOBALS[$this->selected_module]->enabled = false; // GV Code ICW CREDIT CLASS Gift Voucher System
$GLOBALS[$this->selected_module] = NULL; // GV Code ICW CREDIT CLASS Gift Voucher System
$payment_modules = ''; // GV Code ICW CREDIT CLASS Gift Voucher System
} else { // GV Code ICW CREDIT CLASS Gift Voucher System
if (isset($GLOBALS[$this->selected_module]) && is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {
if ($credit_covers) {
$GLOBALS[$this->selected_module]->enabled = false;
$GLOBALS[$this->selected_module] = NULL;
$payment_modules = '';
} else {
$GLOBALS[$this->selected_module]->pre_confirmation_check();
}
}
}
}
function confirmation() {
if (is_array($this->modules)) {
if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {
if (isset($GLOBALS[$this->selected_module]) && is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {
return $GLOBALS[$this->selected_module]->confirmation();
}
}
}
includes/classes/product.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: product.php 1316 2005-10-21 15:30:58Z mz $
$Id: product.php 2696 2012-03-04 10:44:41Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2005 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(Coding Standards); www.oscommerce.com
(c) 2006 XT-Commerce (product.php 1316 2005-10-21)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 22
* Constructor
*
*/
function product($pID = 0) {
$this->pID = $pID;
$this->pID = (int)$pID; // DokuMan - 2010-08-28 - typecasting
// BOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
//$this->useStandardImage=false;
$this->useStandardImage=true;
// EOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
$this->standardImage='noimage.gif';
// BOF - DokuMan - 2010-03-12 - bugfix, wrong comparison
//if ($pID = 0) {
if ($pID == 0) {
// EOF - DokuMan - 2010-03-12 - bugfix, wrong comparison
if ($pID == 0) { //DokuMan - 2010-03-12 - bugfix, wrong comparison
$this->isProduct = false;
return;
}
// query for Product
ca. Zeile 46
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
$fsk_lock = ' and p.products_fsk18!=1';
}
$product_query = "select * FROM ".TABLE_PRODUCTS." p,
".TABLE_PRODUCTS_DESCRIPTION." pd
where p.products_status = '1'
and p.products_id = '".$this->pID."'
and pd.products_id = p.products_id
".$group_check.$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'";
$product_query = "SELECT * FROM ".TABLE_PRODUCTS." AS p
JOIN ".TABLE_PRODUCTS_DESCRIPTION." AS pd ON p.products_status = '1'
AND p.products_id = '".$this->pID."'
AND pd.products_id = p.products_id ".$group_check.$fsk_lock."
AND pd.language_id = '".(int)$_SESSION['languages_id']."'";
$product_query = xtDBquery($product_query);
if (!xtc_db_num_rows($product_query, true)) {
ca. Zeile 73
*/
function getAttributesCount() {
$products_attributes_query = xtDBquery("select count(*) as total from ".TABLE_PRODUCTS_OPTIONS." popt, ".TABLE_PRODUCTS_ATTRIBUTES." patrib where patrib.products_id='".$this->pID."' and patrib.options_id = popt.products_options_id and popt.language_id = '".(int) $_SESSION['languages_id']."'");
$products_attributes_query = xtDBquery("
select count(*) as total
from ".TABLE_PRODUCTS_OPTIONS." popt,
".TABLE_PRODUCTS_ATTRIBUTES." patrib
where patrib.products_id=".$this->pID."
and patrib.options_id = popt.products_options_id
and popt.language_id = ".(int) $_SESSION['languages_id']
);
$products_attributes = xtc_db_fetch_array($products_attributes_query, true);
return $products_attributes['total'];
}
/**
*
ca. Zeile 86
*
*/
function getReviewsCount() {
$reviews_query = xtDBquery("select count(*) as total from ".TABLE_REVIEWS." r, ".TABLE_REVIEWS_DESCRIPTION." rd where r.products_id = '".$this->pID."' and r.reviews_id = rd.reviews_id and rd.languages_id = '".$_SESSION['languages_id']."' and rd.reviews_text !=''");
$reviews_query = xtDBquery("
select count(*) as total
from ".TABLE_REVIEWS." r,
".TABLE_REVIEWS_DESCRIPTION." rd
where r.products_id = ".$this->pID."
and r.reviews_id = rd.reviews_id
and rd.languages_id = ".(int)$_SESSION['languages_id']."
and rd.reviews_text !=''
");
$reviews = xtc_db_fetch_array($reviews_query, true);
return $reviews['total'];
}
ca. Zeile 112
from ".TABLE_REVIEWS." r,
".TABLE_REVIEWS_DESCRIPTION." rd
where r.products_id = '".$this->pID."'
and r.reviews_id=rd.reviews_id
and rd.languages_id = '".$_SESSION['languages_id']."'
order by reviews_id DESC");
and rd.languages_id = '".(int)$_SESSION['languages_id']."'
order by reviews_id DESC
");
if (xtc_db_num_rows($reviews_query, true)) {
$row = 0;
$data_reviews = array ();
while ($reviews = xtc_db_fetch_array($reviews_query, true)) {
$row ++;
$data_reviews[] = array ('AUTHOR' => $reviews['customers_name'], 'DATE' => xtc_date_short($reviews['date_added']), 'RATING' => xtc_image('templates/'.CURRENT_TEMPLATE.'/img/stars_'.$reviews['reviews_rating'].'.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), 'TEXT' => $reviews['reviews_text']);
$data_reviews[] = array ('AUTHOR' => $reviews['customers_name'],
'DATE' => xtc_date_short($reviews['date_added']),
'RATING' => xtc_image('templates/'.CURRENT_TEMPLATE.'/img/stars_'.$reviews['reviews_rating'].'.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating']),'','','itemprop="rating"'),
'TEXT' => $reviews['reviews_text']);
if ($row == PRODUCT_REVIEWS_VIEW)
break;
}
}
ca. Zeile 162
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
// BOF - vr - 2010-04-21 make sql human readable, update to SQL-92-Standard
$orders_query = "select p.products_fsk18, p.products_id, p.products_price, p.products_tax_class_id,
p.products_image, pd.products_name, p.products_vpe, p.products_vpe_status,
p.products_vpe_value, pd.products_short_description
// BOF - web28 - 2011-01-22 - add products_quantity
$orders_query = "select p.products_fsk18,
p.products_id,
p.products_price,
p.products_tax_class_id,
p.products_image,
p.products_quantity,
pd.products_name,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
pd.products_short_description
from ".TABLE_ORDERS_PRODUCTS." op1
join ".TABLE_ORDERS_PRODUCTS." op2 on op2.orders_id = op1.orders_id
join ".TABLE_ORDERS." o on o.orders_id = op2.orders_id
join ".TABLE_PRODUCTS." p on p.products_id = op2.products_id
join ".TABLE_PRODUCTS_DESCRIPTION." pd on pd.products_id = op2.products_id
where op1.products_id = '".$this->pID."'
and op2.products_id != '".$this->pID."'
and p.products_status = '1'
and pd.language_id = '".(int) $_SESSION['languages_id']."'
".$group_check."
".$fsk_lock."
where op1.products_id = ".$this->pID."
and op2.products_id != ".$this->pID."
and p.products_status = 1
and pd.language_id = ".(int) $_SESSION['languages_id']
.$group_check
.$fsk_lock."
group by p.products_id
order by o.date_purchased desc
limit ".MAX_DISPLAY_ALSO_PURCHASED;
// EOF - vr - 2010-04-21 make sql human readable
// EOF - web28 - 2011-01-22 - add products_quantity
$orders_query = xtDBquery($orders_query);
while ($orders = xtc_db_fetch_array($orders_query, true)) {
$module_content[] = $this->buildDataArray($orders);
}
return $module_content;
}
/**
*
ca. Zeile 216
$group_check = "";
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
// BOF - web28 - 2011-01-22 - add products_quantity
$cross_query = "select p.products_fsk18,
p.products_tax_class_id,
p.products_id,
p.products_image,
p.products_quantity,
pd.products_name,
pd.products_short_description,
p.products_fsk18,p.products_price,p.products_vpe,
p.products_fsk18,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
xp.sort_order from ".TABLE_PRODUCTS_XSELL." xp, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd
where xp.products_id = '".$this->pID."' and xp.xsell_id = p.products_id ".$fsk_lock.$group_check."
and p.products_id = pd.products_id and xp.products_xsell_grp_name_id='".$cross_sells['products_xsell_grp_name_id']."'
and pd.language_id = '".$_SESSION['languages_id']."'
and p.products_status = '1'
xp.sort_order
from ".TABLE_PRODUCTS_XSELL." xp,
".TABLE_PRODUCTS." p,
".TABLE_PRODUCTS_DESCRIPTION." pd
where xp.products_id = ".$this->pID."
and xp.xsell_id = p.products_id "
.$fsk_lock
.$group_check."
and p.products_id = pd.products_id
and xp.products_xsell_grp_name_id='".$cross_sells['products_xsell_grp_name_id']."'
and pd.language_id = ".(int)$_SESSION['languages_id']."
and p.products_status = 1
order by xp.sort_order asc";
// EOF - web28 - 2011-01-22 - add products_quantity
$cross_query = xtDBquery($cross_query);
if (xtc_db_num_rows($cross_query, true) > 0)
$cross_sell_data[$cross_sells['products_xsell_grp_name_id']] = array ('GROUP' => xtc_get_cross_sell_name($cross_sells['products_xsell_grp_name_id']), 'PRODUCTS' => array ());
$cross_sell_data[$cross_sells['products_xsell_grp_name_id']] = array (
'GROUP' => xtc_get_cross_sell_name($cross_sells['products_xsell_grp_name_id']),
'PRODUCTS' => array ());
while ($xsell = xtc_db_fetch_array($cross_query, true)) {
$cross_sell_data[$cross_sells['products_xsell_grp_name_id']]['PRODUCTS'][] = $this->buildDataArray($xsell);
}
}
return $cross_sell_data;
}
}
ca. Zeile 266
$group_check = '';
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
// BOF - web28 - 2011-01-22 - add products_quantity
$cross_query = xtDBquery("select p.products_fsk18,
p.products_tax_class_id,
p.products_id,
p.products_image,
p.products_quantity,
pd.products_name,
pd.products_short_description,
p.products_fsk18,p.products_price,p.products_vpe,
p.products_fsk18,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
xp.sort_order from ".TABLE_PRODUCTS_XSELL." xp, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd
where xp.xsell_id = '".$this->pID."' and xp.products_id = p.products_id ".$fsk_lock.$group_check."
xp.sort_order
from ".TABLE_PRODUCTS_XSELL." xp,
".TABLE_PRODUCTS." p,
".TABLE_PRODUCTS_DESCRIPTION." pd
where xp.xsell_id = '".$this->pID."'
and xp.products_id = p.products_id "
.$fsk_lock
.$group_check."
and p.products_id = pd.products_id
and pd.language_id = '".$_SESSION['languages_id']."'
and p.products_status = '1'
and pd.language_id = ".(int)$_SESSION['languages_id']."
and p.products_status = 1
order by xp.sort_order asc");
// EOF - web28 - 2011-01-22 - add products_quantity
$cross_sell_data = array(); //DokuMan - 2010-03-12 - set undefined array
while ($xsell = xtc_db_fetch_array($cross_query, true)) {
$cross_sell_data[] = $this->buildDataArray($xsell);
}
return $cross_sell_data;
}
function getGraduated() {
ca. Zeile 305
$discount = $xtPrice->xtcCheckDiscount($this->pID); // Hetfield - 2010-03-15 - BUGFIX show VPE with discount for graduated prices
$staffel_query = xtDBquery("SELECT
quantity,
personal_offer
FROM
".TABLE_PERSONAL_OFFERS_BY.(int) $_SESSION['customers_status']['customers_status_id']."
WHERE
products_id = '".$this->pID."'
FROM ".TABLE_PERSONAL_OFFERS_BY.(int) $_SESSION['customers_status']['customers_status_id']."
WHERE products_id = ".$this->pID."
ORDER BY quantity ASC");
$staffel = array ();
while ($staffel_values = xtc_db_fetch_array($staffel_query, true)) {
$staffel[] = array ('stk' => $staffel_values['quantity'], 'price' => $staffel_values['personal_offer']);
$staffel[] = array (
'stk' => $staffel_values['quantity'],
'price' => $staffel_values['personal_offer']
);
}
$staffel_data = array ();
for ($i = 0, $n = sizeof($staffel); $i < $n; $i ++) {
//BOF - web28 - 2010-07-13 - BUGFIX display same quantity only once for graduated prices / FIX max value info for graduated prices
/*
if ($staffel[$i]['stk'] == 1) {
if ($staffel[$i]['stk'] == 1 || (array_key_exists($i +1, $staffel) && $staffel[$i +1]['stk'] != '')){ //DokuMan - 2010-10-13 - added array_key_exists()
$quantity = $staffel[$i]['stk'];
if ($staffel[$i +1]['stk'] != '')
$quantity = $staffel[$i]['stk'].'-'. ($staffel[$i +1]['stk'] - 1);
} else {
$quantity = ' > '.$staffel[$i]['stk'];
if ($staffel[$i +1]['stk'] != '')
$quantity = $staffel[$i]['stk'].'-'. ($staffel[$i +1]['stk'] - 1);
}
*/
if ($staffel[$i]['stk'] == 1 || $staffel[$i +1]['stk'] != ''){
$quantity = $staffel[$i]['stk'];
if ($staffel[$i +1]['stk'] != '' && $staffel[$i +1]['stk'] != $staffel[$i]['stk'] + 1)
if (array_key_exists($i + 1, $staffel) && $staffel[$i +1]['stk'] != '' && $staffel[$i +1]['stk'] != $staffel[$i]['stk'] + 1) //DokuMan - 2010-10-13 - added array_key_exists()
$quantity .= ' - '. ($staffel[$i +1]['stk'] - 1);
} else {
$quantity = GRADUATED_PRICE_MAX_VALUE.' '.$staffel[$i]['stk'];
}
//EOF - web28 - 2010-07-13 - BUGFIX display same quantity only once for graduated prices /FIX max value info for graduated prices
$vpe = '';
// BOF - Hetfield - 2009-08-24 - BUGFIX show VPE for graduated prices
if ($this->data['products_vpe_status'] == 1 && $this->data['products_vpe_value'] != 0.0 && $staffel[$i]['price'] > 0) {
if (isset($this->data) && $this->data['products_vpe_status'] == 1 && $this->data['products_vpe_value'] != 0.0 && $staffel[$i]['price'] > 0) {
$vpe = $staffel[$i]['price'] - $staffel[$i]['price'] / 100 * $discount;
$vpe = $vpe * (1 / $this->data['products_vpe_value']);
$vpe = BASICPRICE_VPE_TEXT.$xtPrice->xtcFormat($vpe, true, $this->data['products_tax_class_id']).TXT_PER.xtc_get_vpe_name($this->data['products_vpe']);
}
ca. Zeile 365
// beta
function getBuyNowButton($id, $name) {
global $PHP_SELF;
return '<a href="'.xtc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id='.$id.'&'.xtc_get_all_get_params(array ('action')), 'NONSSL').'">'.xtc_image_button('button_buy_now.gif', TEXT_BUY.$name.TEXT_NOW).'</a>';
return '<a href="'.xtc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id='.$id.'&'.xtc_get_all_get_params(array ('action')), 'NONSSL').'">'.xtc_image_button('button_buy_now.gif', TEXT_BUY.$name.TEXT_NOW).'</a>';
}
function getVPEtext($product, $price) {
global $xtPrice;
ca. Zeile 371
}
function getVPEtext($product, $price) {
global $xtPrice;
require_once (DIR_FS_INC.'xtc_get_vpe_name.inc.php');
if (!is_array($product))
$product = $this->data;
if ($product['products_vpe_status'] == 1 && $product['products_vpe_value'] != 0.0 && $price > 0) {
if (isset($product['products_vpe_status']) && $product['products_vpe_status'] == 1 && $product['products_vpe_value'] != 0.0 && $price > 0) {
return $xtPrice->xtcFormat($price * (1 / $product['products_vpe_value']), true).TXT_PER.xtc_get_vpe_name($product['products_vpe']);
}
return;
}
function buildDataArray(&$array,$image='thumbnail') {
global $xtPrice,$main;
ca. Zeile 388
function buildDataArray(&$array,$image='thumbnail') {
global $xtPrice,$main;
$tax_rate = $xtPrice->TAX[$array['products_tax_class_id']];
//$tax_rate = $xtPrice->TAX[$array['products_tax_class_id']];
$tax_rate = isset($xtPrice->TAX[$array['products_tax_class_id']]) ? $xtPrice->TAX[$array['products_tax_class_id']] : 0; //DokuMan: set Undefined index
$products_price = $xtPrice->xtcGetPrice($array['products_id'], $format = true, 1, $array['products_tax_class_id'], $array['products_price'], 1);
$buy_now = ''; //DokuMan: Undefined variable: buy_now
ca. Zeile 404
$buy_now = $this->getBuyNowButton($array['products_id'], $array['products_name']);
}
}
//BOF - DokuMan - 2010-02-26 - Set Undefined index: products_shippingtime
//$shipping_status_name = $main->getShippingStatusName($array['products_shippingtime']);
//$shipping_status_image = $main->getShippingStatusImage($array['products_shippingtime']);
if (isset($array['products_shippingtime'])) {
if (isset($array['products_shippingtime']) && ACTIVATE_SHIPPING_STATUS == 'true') {
$shipping_status_name = $main->getShippingStatusName($array['products_shippingtime']);
$shipping_status_image = $main->getShippingStatusImage($array['products_shippingtime']);
} else {
$shipping_status_name = '';
$shipping_status_image = '';
}
//EOF - DokuMan - 2010-02-26 - Set Undefined index: products_shippingtime
return array ('PRODUCTS_NAME' => $array['products_name'],
'COUNT'=>$array['ID'],
$productData = array (
'PRODUCTS_NAME' => $array['products_name'],
'COUNT' => isset($array['ID']) ? $array['ID'] : 0,
'PRODUCTS_ID'=>$array['products_id'],
'PRODUCTS_MODEL'=>$array['products_model'],
'PRODUCTS_MODEL'=> isset($array['products_model']) ? $array['products_model'] : '',
'PRODUCTS_VPE' => $this->getVPEtext($array, $products_price['plain']),
'PRODUCTS_IMAGE' => $this->productImage($array['products_image'], $image),
'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($array['products_id'], $array['products_name'])),
'PRODUCTS_PRICE' => $products_price['formated'],
ca. Zeile 430
'PRODUCTS_SHIPPING_LINK' => $main->getShippingLink(),
'PRODUCTS_BUTTON_BUY_NOW' => $buy_now,
'PRODUCTS_SHIPPING_NAME'=>$shipping_status_name,
'PRODUCTS_SHIPPING_IMAGE'=>$shipping_status_image,
//'PRODUCTS_DESCRIPTION' => $array['products_description'],
'PRODUCTS_DESCRIPTION' => isset($array['products_description']) ? $array['products_description'] : '', //DokuMan - 2010-02-26 - set Undefined index
//BOF - Tomcraft - 2010-07-15 - Added PRODUCTS_QUANTITY for further use in template
'PRODUCTS_QUANTITY' => (int)$array['products_quantity'],
//EOF - Tomcraft - 2010-07-15 - Added PRODUCTS_QUANTITY for further use in template
//'PRODUCTS_EXPIRES' => $array['expires_date'],
'PRODUCTS_EXPIRES' => isset($array['expires_date']) ? $array['expires_date'] : 0, //DokuMan - 2010-02-26 - set Undefined index
//'PRODUCTS_CATEGORY_URL'=>$array['cat_url'],
'PRODUCTS_CATEGORY_URL' => isset($array['cat_url']) ? $array['cat_url'] : '', //DokuMan - 2010-02-26 - set Undefined index
//'PRODUCTS_SHORT_DESCRIPTION' => $array['products_short_description'],
'PRODUCTS_SHORT_DESCRIPTION' => isset($array['products_short_description']) ? $array['products_short_description'] : '', //DokuMan - 2010-02-26 - set Undefined index
//'PRODUCTS_FSK18' => $array['products_fsk18']);
'PRODUCTS_FSK18' => isset($array['products_fsk18']) ? $array['products_fsk18'] : 0, //DokuMan - 2010-02-26 - set Undefined index
'PRODUCTS_BUTTON_DETAILS' => '<a href="'.xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($array['products_id'], $array['products_name'])).'">'.xtc_image_button('button_product_more.gif', $array['products_name'].TEXT_NOW).'</a>', //GTB - 2010-08-27 make Button Details global
'PRODUCTS_QUANTITY' => isset($array['products_quantity']) ? $array['products_quantity'] : '' //Tomcraft - 2010-07-15 - Added PRODUCTS_QUANTITY for further use in template
);
return $productData;
}
function productImage($name, $type) {
switch ($type) {
case 'info' :
$path = DIR_WS_INFO_IMAGES;
break;
ca. Zeile 468
$path = DIR_WS_POPUP_IMAGES;
break;
}
// BOF - vr - 2010-04-09 no distinction between "name is null" and "name == ''"
// if ($name == '')) {
if (empty($name)) {
// EOF - vr - 2010-04-09 no distinction between "name is null" and "name == ''"
if (empty($name)) { // vr - 2010-04-09 no distinction between "name is null" and "name == ''"
// BOF - Tomcraft - 2009-11-12 - noimage.gif is displayed, when no image is defined
//if ($this->useStandardImage == 'true' && $this->standardImage != '') // comment in when "noimage.gif" should be displayed when there is no image defined in the database
// return $path.$this->standardImage; // comment in when "noimage.gif" should be displayed when there is no image defined in the database
return $name; // comment out when "noimage.gif" should be displayed when there is no image defined in the database
// EOF - Tomcraft - 2009-11-12 - noimage.gif is displayed, when no image is defined
} else {
// check if image exists
if (!file_exists($path.$name)) {
if ($this->useStandardImage == 'true' && $this->standardImage != '')
if ($this->useStandardImage == 'true' && $this->standardImage != '') {
$name = $this->standardImage;
}
}
return $path.$name;
}
}
}
?>
includes/classes/shipping.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: shipping.php 1305 2005-10-14 10:30:03Z mz $
$Id: shipping.php 2807 2012-04-29 18:11:28Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(shipping.php,v 1.22 2003/05/08); www.oscommerce.com
(c) 2003 nextcommerce (shipping.php,v 1.9 2003/08/17); www.nextcommerce.org
(c) 2006 XT-Commerce (shipping.php 1305 2005-10-14)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once(DIR_FS_INC . 'xtc_in_array.inc.php');
//web28 ignore shipping modules
define ('IGNORE_CHEAPEST_MODULES', 'selfpickup');
class shipping {
var $modules;
// class constructor
ca. Zeile 36
$class = substr($value, 0, strrpos($value, '.'));
$include_modules[] = array('class' => $class, 'file' => $value);
}
}
// load unallowed modules into array
$unallowed_modules = explode(',',$_SESSION['customers_status']['customers_status_shipping_unallowed'].','.$order->customer['shipping_unallowed']);
for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
if (xtc_in_array(str_replace('.php', '', $include_modules[$i]['file']), $unallowed_modules) != 'false') {
// load unallowed modules into array - remove spaces and line breaks by web28
$unallowed_modules = preg_replace("'[\r\n\s]+'",'',$_SESSION['customers_status']['customers_status_shipping_unallowed'].','.$order->customer['shipping_unallowed']);
$unallowed_modules = explode(',',$unallowed_modules);
//BOF - DokuMan - 2011-12-19 - precount for performance
//for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
$n=sizeof($include_modules);
for ($i=0; $i<$n; $i++) {
//EOF - DokuMan - 2011-12-19 - precount for performance
if (!in_array(str_replace('.php', '', $include_modules[$i]['file']), $unallowed_modules)) {
// check if zone is alowed to see module
if (constant(MODULE_SHIPPING_ . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . _ALLOWED) != '') {
$unallowed_zones = explode(',', constant(MODULE_SHIPPING_ . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . _ALLOWED));
if (constant('MODULE_SHIPPING_' . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . '_ALLOWED') != '') {
$unallowed_zones = explode(',', constant('MODULE_SHIPPING_' . strtoupper(str_replace('.php', '', $include_modules[$i]['file'])) . '_ALLOWED'));
} else {
$unallowed_zones = array();
}
if (in_array($_SESSION['delivery_zone'], $unallowed_zones) == true || count($unallowed_zones) == 0) {
ca. Zeile 83
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if (xtc_not_null($module)) {
if (xtc_not_null($module) && isset($GLOBALS[$class])) {
if ( ($module == $class) && ($GLOBALS[$class]->enabled) ) {
$include_quotes[] = $class;
}
} elseif ($GLOBALS[$class]->enabled) {
ca. Zeile 107
if (is_array($this->modules)) {
$rates = array();
$ignore_cheapest_array = explode(',',IGNORE_CHEAPEST_MODULES); //web28 ignore shipping modules
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
if (isset($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
$quotes = $GLOBALS[$class]->quotes;
$size = sizeof($quotes['methods']);
//BOF - Dokuman - 2009-10-02 - set undefined index
//$size = sizeof($quotes['methods']);
$size = isset($quotes['methods']) && is_array($quotes['methods']) ? sizeof($quotes['methods']) : 0;
//BOF - Dokuman - 2009-10-02 - set undefined index
for ($i=0; $i<$size; $i++) {
if(array_key_exists("cost",$quotes['methods'][$i])) {
if(array_key_exists("cost",$quotes['methods'][$i]) && !in_array($quotes['id'],$ignore_cheapest_array)) { //web28 ignore shipping modules
$rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],
'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',
'cost' => $quotes['methods'][$i]['cost']);
// echo $quotes['methods'][$i]['cost'];
includes/classes/shopping_cart.phpTop ca. Zeile 71
}
// reset per-session cart contents, but not the database contents
$this->reset(false);
// BOF - Tomcraft - 2009-10-08 - Fixed sort order was lost in cart after logout/login
// $products_query = xtc_db_query("select products_id, customers_basket_quantity from ".TABLE_CUSTOMERS_BASKET." where customers_id = '".$_SESSION['customer_id']."'");
$products_query = xtc_db_query("select products_id, customers_basket_quantity from ".TABLE_CUSTOMERS_BASKET." where customers_id = '".$_SESSION['customer_id']."' order by customers_basket_id");
// EOF - Tomcraft - 2009-10-08 - Fixed sort order was lost in cart after logout/login
while ($products = xtc_db_fetch_array($products_query)) {
$this->contents[$products['products_id']] = array ('qty' => $products['customers_basket_quantity']);
// attributes
// BOF - Tomcraft - 2009-11-07 - Added sortorder to products_options
//$attributes_query = xtc_db_query("select products_options_id, products_options_value_id from ".TABLE_CUSTOMERS_BASKET_ATTRIBUTES." where customers_id = '".$_SESSION['customer_id']."' and products_id = '".$products['products_id']."'");
$attributes_query = xtc_db_query("select products_options_id, products_options_value_id from ".TABLE_CUSTOMERS_BASKET_ATTRIBUTES." where customers_id = '".$_SESSION['customer_id']."' and products_id = '".$products['products_id']."' order by customers_basket_attributes_id");
// EOF - Tomcraft - 2009-11-07 - Added sortorder to products_options
while ($attributes = xtc_db_fetch_array($attributes_query)) {
$this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];
}
}
ca. Zeile 325
}
// excl tax + tax at checkout
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
if (!isset($this->tax[$product['products_tax_class_id']])) $this->tax[$product['products_tax_class_id']]['value'] = 0; //DokuMan - 2010-03-26 - set undefined variable
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {
$this->tax[$product['products_tax_class_id']]['value'] += (($products_price_tax+$attribute_price_tax) / 100) * ($products_tax)*$qty;
$this->total+=(($products_price_tax+$attribute_price_tax) / 100) * ($products_tax)*$qty;
$this->tax[$product['products_tax_class_id']]['desc'] = TAX_NO_TAX."$products_tax_description";
ca. Zeile 374
$products_query = xtc_db_query("select p.products_id, pd.products_name,p.products_shippingtime, p.products_image, p.products_model, p.products_price, p.products_discount_allowed, p.products_weight, p.products_tax_class_id from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd where p.products_id='".xtc_get_prid($products_id)."' and pd.products_id = p.products_id and pd.language_id = '".$_SESSION['languages_id']."'");
if ($products = xtc_db_fetch_array($products_query)) {
$prid = $products['products_id'];
$products_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, $this->contents[$products_id]['qty'], $products['products_tax_class_id'], $products['products_price']);
$products_price = $xtPrice->xtcGetPrice($products['products_id'],
$format = false,
$this->contents[$products_id]['qty'],
$products['products_tax_class_id'],
$products['products_price']);
$products_array[] = array (
'id' => $products_id,
'name' => $products['products_name'],
ca. Zeile 387
'weight' => $products['products_weight'],
'shipping_time' => $main->getShippingStatusName($products['products_shippingtime']),
'final_price' => ($products_price + $this->attributes_price($products_id)),
'tax_class_id' => $products['products_tax_class_id'],
'attributes' => $this->contents[$products_id]['attributes']
'tax' => isset($xtPrice->TAX[$products['products_tax_class_id']]) ? $xtPrice->TAX[$products['products_tax_class_id']] : 0,
'attributes' => isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : null
);
}
}
}
includes/classes/Smarty_2.6.26/plugins/outputfilter.note.phpTop ca. Zeile 20
# ODER KRATZEN SIE AUCH VON IHREN ELEKTROGERÄTEN IM HAUS DIE MARKENZEICHEN AB!!!!
function smarty_outputfilter_note($tpl_output, &$smarty) {
$cop='<div class="copyright"><a href="http://www.xtc-modified.org" target="_blank">' . PROJECT_VERSION . '</a>' . ' ' . '©' . date('Y') . ' ' . 'provides no warranty and is redistributable under the <a href="http://www.fsf.org/licensing/licenses/gpl.txt" target="_blank">GNU General Public License</a><br />eCommerce Engine 2006 based on <a href="http://www.xt-commerce.com/" rel="nofollow" target="_blank">xt:Commerce</a></div>';
$cop='<div class="copyright"><a href="http://www.xtc-modified.org" target="_blank">' . PROJECT_VERSION . '</a>' . ' ' . '©' . date('Y') . ' ' . 'provides no warranty and is redistributable under the <a href="http://www.gnu.org/licenses/gpl.txt" rel="nofollow" target="_blank">GNU General Public License</a></div>';
//BOF - web28 - making output W3C-Conform: replace ampersands, rest is covered by the modified shopstat_functions.php
$tpl_output = preg_replace("/&(?!(amp;|#[0-9]+;|[a-z0-9]+;))/i", "&", $tpl_output);
//EOF - web28 - making output W3C-Conform: replace ampersands, rest is covered by the modified shopstat_functions.php
//BOC - web28 - making output W3C-Conform: replace ampersands, rest is covered by the modified shopstat_functions.php - preg_replace by cYbercOsmOnauT
$tpl_output = preg_replace("/((?<!&))&(?!(&|amp;|#[0-9]+;|[a-z0-9]+;))/i", "&", $tpl_output);
//EOC - web28 - making output W3C-Conform: replace ampersands, rest is covered by the modified shopstat_functions.php - preg_replace by cYbercOsmOnauT
return $tpl_output.$cop;
}
includes/classes/split_page_results.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: split_page_results.php 1166 2005-08-21 00:52:02Z mz $
$Id: split_page_results.php 2522 2011-12-14 13:45:11Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(split_page_results.php,v 1.14 2003/05/27); www.oscommerce.com
(c) 2003 nextcommerce (split_page_results.php,v 1.6 2003/08/13); www.nextcommerce.org
(c) 2006 XT-Commerce (split_page_results.php 1166 2005-08-21)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
class splitPageResults {
var $sql_query, $number_of_rows, $current_page_number, $number_of_pages, $number_of_rows_per_page;
var $sql_query;
var $number_of_rows;
var $current_page_number;
var $number_of_pages;
var $number_of_rows_per_page;
// class constructor
function splitPageResults($query, $page, $max_rows, $count_key = '*') {
$this->sql_query = $query;
if (empty($page) || (is_numeric($page) == false)) $page = 1;
if (empty($page) || !is_numeric($page)) $page = 1;
$this->current_page_number = $page;
$this->number_of_rows_per_page = $max_rows;
$pos_to = strlen($this->sql_query);
$pos_from = strpos($this->sql_query, ' FROM', 0);
$pos_from = strpos(strtoupper($this->sql_query), ' FROM', 0);
$pos_group_by = strpos($this->sql_query, ' GROUP BY', $pos_from);
$pos_group_by = strpos(strtoupper($this->sql_query), ' GROUP BY', $pos_from);
if (($pos_group_by < $pos_to) && ($pos_group_by != false)) $pos_to = $pos_group_by;
$pos_having = strpos($this->sql_query, ' HAVING', $pos_from);
$pos_having = strpos(strtoupper($this->sql_query), ' HAVING', $pos_from);
if (($pos_having < $pos_to) && ($pos_having != false)) $pos_to = $pos_having;
$pos_order_by = strpos($this->sql_query, ' ORDER BY', $pos_from);
$pos_order_by = strpos(strtoupper($this->sql_query), ' ORDER BY', $pos_from);
if (($pos_order_by < $pos_to) && ($pos_order_by != false)) $pos_to = $pos_order_by;
if (strpos($this->sql_query, 'DISTINCT') || strpos($this->sql_query, 'GROUP BY')) {
if (strpos(strtoupper($this->sql_query), 'DISTINCT') || strpos(strtoupper($this->sql_query), 'GROUP BY')) {
$count_string = 'DISTINCT ' . xtc_db_input($count_key);
//$count_string = xtc_db_input($count_key);
} else {
$count_string = xtc_db_input($count_key);
}
$count_query = xtDBquery($query);
$count = xtc_db_num_rows($count_query,true);
//BOF - DokuMan - 2010-08-26 - performance improvement
//$count_query = xtDBquery($query);
//$count = xtc_db_num_rows($count_query,true);
$reviews_count_query = xtc_db_query("select count(" . $count_string . ") as total " . substr($query, $pos_from, ($pos_to - $pos_from)));
$reviews_count = xtc_db_fetch_array($reviews_count_query);
$count = $reviews_count['total'];
//EOF - DokuMan - 2010-08-26 - performance improvement
$this->number_of_rows = $count;
//BOF -web28- 2010-08-07 - FIX Division by Zero
//$this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);
if ($this->number_of_rows_per_page > 0) {
$this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);
} else {
$this->number_of_pages = 0;
}
//EOF -web28- 2010-08-07 - FIX Division by Zero
if ($this->current_page_number > $this->number_of_pages) {
$this->current_page_number = $this->number_of_pages;
}
$offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));
$this->sql_query .= " LIMIT " . $offset . ", " . $this->number_of_rows_per_page;
//BOF -web28- 2010-08-07 - FIX possible $offset = -0
if ($offset < 1) $offset = 0;
//EOF -web28- 2010-08-07 - FIX possible $offset = -0
//BOF - DokuMan - 2010-08-26 - limit by highest offset
//$this->sql_query .= " LIMIT " . $offset . ", " . $this->number_of_rows_per_page;
$this->sql_query .= " LIMIT " . max((int)$offset, 0) . ", " . $this->number_of_rows_per_page;
//EOF - DokuMan - 2010-08-26 - limit by highest offset
}
// class functions
ca. Zeile 70
$display_links_string = '';
$class = 'class="pageResults"';
if (xtc_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';
//BOF - DokuMan - 2010-08-26 - also check for ampersand
//if (xtc_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';
if (xtc_not_null($parameters) && (substr($parameters, -1) != '&') && (substr($parameters, -5) != '&')) $parameters .= '&';
//EOF - DokuMan - 2010-08-26 - also check for ampersand
// previous button - not displayed on first page
if ($this->current_page_number > 1) $display_links_string .= '<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' ">' . PREVNEXT_BUTTON_PREV . '</a> ';
// check if number_of_pages > $max_page_links
$cur_window_num = intval($this->current_page_number / $max_page_links);
$cur_window_num = (int)($this->current_page_number / $max_page_links);
if ($this->current_page_number % $max_page_links) $cur_window_num++;
$max_window_num = intval($this->number_of_pages / $max_page_links);
$max_window_num = (int)($this->number_of_pages / $max_page_links);
if ($this->number_of_pages % $max_page_links) $max_window_num++;
// previous window of pages
if ($cur_window_num > 1) $display_links_string .= '<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . 'page=' . (($cur_window_num - 1) * $max_page_links), $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>';
includes/classes/xtcPrice.phpTop ca. Zeile 19
http://www.gunnart.de
Everywhere a price is displayed you see any existing kind of discount in percent and
in saved money in your chosen currency
Changes in following lines:
347-352 / 365-366 / 384-389
---------------------------------------------------------------------------------------*/
/**
* This class calculates and formates all prices within the shop frontend
ca. Zeile 43
function xtcPrice($currency, $cGroup) {
$this->currencies = array ();
$this->cStatus = array ();
$this->actualGroup = $cGroup;
$this->actualGroup = (int)$cGroup;
$this->actualCurr = $currency;
$this->TAX = array ();
$this->SHIPPING = array();
$this->showFrom_Attributes = true;
//BOF - DokuMan - 2010-10-28 - added missing content_type definition for $tax_address_query //web28 - 2012-04-17 FIX call by admin
if (!defined('HTTP_CATALOG_SERVER') && isset($_SESSION['cart'])) {
$this->content_type = $_SESSION['cart']->get_content_type();
}
//EOF - DokuMan - 2010-10-28 - added missing content_type definition for $tax_address_query //web28 - 2012-04-17 FIX call by admin
// select Currencies
$currencies_query = "SELECT * FROM ".TABLE_CURRENCIES;
$currencies_query = xtDBquery($currencies_query);
$currencies_query = xtDBquery("SELECT * FROM ".TABLE_CURRENCIES);
while ($currencies = xtc_db_fetch_array($currencies_query, true)) {
$this->currencies[$currencies['code']] = array (
'title' => $currencies['title'],
'symbol_left' => $currencies['symbol_left'],
ca. Zeile 63
'decimal_places' => $currencies['decimal_places'],
'value' => $currencies['value']
);
}
//BOF - DokuMan - 2011-01-21 - Fix an issue when the currency in user's preference is not existing
if (!isset($this->currencies[$this->actualCurr])) {
$this->actualCurr = DEFAULT_CURRENCY;
}
//BOF - DokuMan - 2011-01-21 - Fix an issue when the currency in user's preference is not existing
// select Customers Status data
$customers_status_query = "SELECT *
$customers_status_query = xtDBquery( "SELECT *
FROM ".TABLE_CUSTOMERS_STATUS."
WHERE customers_status_id = '".$this->actualGroup."'
AND language_id = '".$_SESSION['languages_id']."'";
$customers_status_query = xtDBquery($customers_status_query);
AND language_id = '".(int)$_SESSION['languages_id']."'");
$customers_status_value = xtc_db_fetch_array($customers_status_query, true);
$this->cStatus = array (
'customers_status_id' => $this->actualGroup,
$this->cStatus = array ('customers_status_id' => $this->actualGroup,
'customers_status_name' => $customers_status_value['customers_status_name'],
'customers_status_image' => $customers_status_value['customers_status_image'],
'customers_status_public' => $customers_status_value['customers_status_public'],
'customers_status_discount' => $customers_status_value['customers_status_discount'],
ca. Zeile 92
// prefetch tax rates for standard zone
$zones_query = xtDBquery("SELECT tax_class_id as class FROM ".TABLE_TAX_CLASS);
while ($zones_data = xtc_db_fetch_array($zones_query,true)) {
// calculate tax based on shipping or deliverey country (for downloads)
if (isset($_SESSION['billto']) && isset($_SESSION['sendto'])) {
$tax_address_query = xtc_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . $_SESSION['customer_id'] . "' and ab.address_book_id = '" . ($this->content_type == 'virtual' ? $_SESSION['billto'] : $_SESSION['sendto']) . "'"); //DokuMan - leave content_type as it is
$tax_address_query = xtc_db_query("SELECT ab.entry_country_id,
ab.entry_zone_id
FROM " . TABLE_ADDRESS_BOOK . " ab
LEFT JOIN " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id)
WHERE ab.customers_id = '" . $_SESSION['customer_id'] . "'
AND ab.address_book_id = '" . ($this->content_type == 'virtual' ? $_SESSION['billto'] : $_SESSION['sendto']) . "'"); //DokuMan - leave content_type as it is
$tax_address = xtc_db_fetch_array($tax_address_query);
$this->TAX[$zones_data['class']]=xtc_get_tax_rate($zones_data['class'],$tax_address['entry_country_id'], $tax_address['entry_zone_id']);
} else {
$this->TAX[$zones_data['class']]=xtc_get_tax_rate($zones_data['class']);
ca. Zeile 119
*/
function xtcGetPrice($pID, $format = true, $qty, $tax_class, $pPrice, $vpeStatus = 0, $cedit_id = 0) {
// check if group is allowed to see prices
if ($this->cStatus['customers_status_show_price'] == '0')
return $this->xtcShowNote($vpeStatus, $vpeStatus);
if ($this->cStatus['customers_status_show_price'] == '0'){
return $this->xtcShowNote($vpeStatus);
}
// get Tax rate
if ($cedit_id != 0) {
//BOC - web28 - 2012-04-07 - FIX edit orders in admin guest account
if (defined('HTTP_CATALOG_SERVER')) {
global $order;
$cinfo = get_c_infos($order->customer['ID'], trim($order->delivery['country_iso_2']));
} else {
$cinfo = xtc_oe_customer_infos($cedit_id);
}
//EOC - web28 - 2012-04-07 - FIX edit orders in admin guest account
$products_tax = xtc_get_tax_rate($tax_class, $cinfo['country_id'], $cinfo['zone_id']);
} else {
//BOF - DokuMan - 2010-08-23 - set undefined index
//$products_tax = $this->TAX[$tax_class];
$products_tax = isset($this->TAX[$tax_class]) ? $this->TAX[$tax_class] : 0;
//EOF - DokuMan - 2010-08-23 - set undefined index
}
if ($this->cStatus['customers_status_show_price_tax'] == '0')
if ($this->cStatus['customers_status_show_price_tax'] == '0'){
$products_tax = '';
}
// add taxes
if ($pPrice == 0)
if ($pPrice == 0) {
$pPrice = $this->getPprice($pID);
}
$pPrice = $this->xtcAddTax($pPrice, $products_tax);
// BOF - Tomcraft - 2009-11-28 - Included xs:booster
// xs:booster Auktionspreis pruefen
if ($sPrice = $this->xtcCheckXTBAuction($pID))
if ($sPrice = $this->xtcCheckXTBAuction($pID)){
return $this->xtcFormatSpecial($pID, $sPrice, $pPrice, $format, $vpeStatus);
}
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
// check specialprice
if ($sPrice = $this->xtcCheckSpecial($pID))
if ($sPrice = $this->xtcCheckSpecial($pID)){
return $this->xtcFormatSpecial($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus);
}
// check graduated
if ($this->cStatus['customers_status_graduated_prices'] == '1') {
if ($sPrice = $this->xtcGetGraduatedPrice($pID, $qty))
if ($sPrice = $this->xtcGetGraduatedPrice($pID, $qty)){
return $this->xtcFormatSpecialGraduated($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus, $pID);
}
} else {
// check Group Price
if ($sPrice = $this->xtcGetGroupPrice($pID, 1))
if ($sPrice = $this->xtcGetGroupPrice($pID, 1)){
return $this->xtcFormatSpecialGraduated($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus, $pID);
}
}
// check Product Discount
if ($discount = $this->xtcCheckDiscount($pID))
if ($discount = $this->xtcCheckDiscount($pID)){
return $this->xtcFormatSpecialDiscount($pID, $discount, $pPrice, $format, $vpeStatus);
}
return $this->xtcFormat($pPrice, $format, 0, false, $vpeStatus, $pID);
}
/**
* This function returns the reqular price of a product,
ca. Zeile 253
* @param Double $qty quantity
* @return Double graduated price
*/
function xtcGetGraduatedPrice($pID, $qty) {
if (GRADUATED_ASSIGN == 'true')
if (xtc_get_qty($pID) > $qty)
if (defined('GRADUATED_ASSIGN') && GRADUATED_ASSIGN == 'true') {
if (xtc_get_qty($pID) > $qty) {
$qty = xtc_get_qty($pID);
//if (!is_int($this->cStatus['customers_status_id']) && $this->cStatus['customers_status_id']!=0) $this->cStatus['customers_status_id'] = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$graduated_price_query = "SELECT max(quantity) as qty
}
}
if (empty($this->actualGroup)) {
$this->actualGroup = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
}
$graduated_price_query = xtDBquery("SELECT max(quantity) AS qty
FROM ".TABLE_PERSONAL_OFFERS_BY.$this->actualGroup."
WHERE products_id='".$pID."'
AND quantity<='".$qty."'";
$graduated_price_query = xtDBquery($graduated_price_query);
AND quantity<='".$qty."'");
$graduated_price_data = xtc_db_fetch_array($graduated_price_query, true);
if ($graduated_price_data['qty']) {
$graduated_price_query = "SELECT personal_offer
$graduated_price_query = xtDBquery("SELECT personal_offer
FROM ".TABLE_PERSONAL_OFFERS_BY.$this->actualGroup."
WHERE products_id='".$pID."'
AND quantity='".$graduated_price_data['qty']."'";
$graduated_price_query = xtDBquery($graduated_price_query);
AND quantity='".$graduated_price_data['qty']."'");
$graduated_price_data = xtc_db_fetch_array($graduated_price_query, true);
$sPrice = $graduated_price_data['personal_offer'];
if ($sPrice != 0.00)
if ($sPrice != 0.00){
return $sPrice;
}
} else {
return;
}
}
/**
* Searches the group price of a product
ca. Zeile 341
$discount = $this->cStatus['customers_status_discount'];
if ($attribute_price_data['products_discount_allowed'] < $this->cStatus['customers_status_discount'])
$discount = $attribute_price_data['products_discount_allowed'];
}
//BOF - DokuMan - 2010-08-11 - several currencies on product attributes
//$price = $this->xtcFormat($attribute_price_data['options_values_price'], false, $attribute_price_data['products_tax_class_id']);
$price = $this->xtcFormat($attribute_price_data['options_values_price'], false, $attribute_price_data['products_tax_class_id'], true);
//EOF - DokuMan - 2010-08-11 - several currencies on product attributes
//BOC web28 -2012-05-31 several currencies on product attributes
$CalculateCurr = ($attribute_price_data['products_tax_class_id'] == 0) ? true : false;
$price = $this->xtcFormat($attribute_price_data['options_values_price'], false, $attribute_price_data['products_tax_class_id'],$CalculateCurr);
//EOC web28 -2012-05-31 several currencies on product attributes
if ($attribute_price_data['weight_prefix'] != '+')
$attribute_price_data['options_values_weight'] *= -1;
if ($attribute_price_data['price_prefix'] == '+') {
$price = $price - $price / 100 * $discount;
ca. Zeile 501
function xtcCalculateCurrEx($price, $curr) {
return $price * ($this->currencies[$curr]['value'] / $this->currencies[$this->actualCurr]['value']);
}
/*
* Format Functions
/**
* xtcFormat
*
* @param double $price
* @param boolean $format
* @param integer $tax_class
* @param boolean $curr
* @param integer $vpeStatus
* @param integer $pID
* @param integer $decimal_places
* @return unknown
*/
function xtcFormat($price, $format, $tax_class = 0, $curr = false, $vpeStatus = 0, $pID = 0) {
if ($curr)
function xtcFormat($price, $format, $tax_class = 0, $curr = false, $vpeStatus = 0, $pID = 0, $decimal_places = 0) {
if ($curr) {
$price = $this->xtcCalculateCurr($price);
}
if ($tax_class != 0) {
$products_tax = $this->TAX[$tax_class];
if ($this->cStatus['customers_status_show_price_tax'] == '0')
$products_tax = '';
$products_tax = ($this->cStatus['customers_status_show_price_tax'] == '0') ? '' : $this->TAX[$tax_class];
$price = $this->xtcAddTax($price, $products_tax);
}
$decimal_places = ($decimal_places > 0) ? $decimal_places : $this->currencies[$this->actualCurr]['decimal_places'];
if ($format) {
// BOF - Tomcraft - 2009-11-23 - Added flotval for PHP5.3 compatibility
//$Pprice = number_format($price, $this->currencies[$this->actualCurr]['decimal_places'], $this->currencies[$this->actualCurr]['decimal_point'], $this->currencies[$this->actualCurr]['thousands_point']);
$Pprice = number_format(floatval($price), $this->currencies[$this->actualCurr]['decimal_places'], $this->currencies[$this->actualCurr]['decimal_point'], $this->currencies[$this->actualCurr]['thousands_point']);
// EOF - Tomcraft - 2009-11-23 - Added flotval for PHP5.3 compatibility
$Pprice = number_format(floatval($price), $decimal_places, $this->currencies[$this->actualCurr]['decimal_point'], $this->currencies[$this->actualCurr]['thousands_point']);
$Pprice = $this->checkAttributes($pID).$this->currencies[$this->actualCurr]['symbol_left'].' '.$Pprice.' '.$this->currencies[$this->actualCurr]['symbol_right'];
if ($vpeStatus == 0) {
return $Pprice;
} else {
return array ('formated' => $Pprice, 'plain' => $price);
}
} else {
return round($price, $this->currencies[$this->actualCurr]['decimal_places']);
return round($price, $decimal_places);
}
}
function xtcFormatSpecialDiscount($pID, $discount, $pPrice, $format, $vpeStatus = 0) {
$sPrice = $pPrice - ($pPrice / 100) * $discount;
ca. Zeile 543
//BOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
//$price = '<span class="productOldPrice">'.INSTEAD.$this->xtcFormat($pPrice, $format).'</span><br />'.ONLY.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format).'<br />'.YOU_SAVE.$discount.'%';
$price = '<span class="productOldPrice"><small>'.INSTEAD.'</small><del>'.$this->xtcFormat($pPrice, $format).'</del></span><br />'.ONLY.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format).'<br /><small>'.YOU_SAVE.round(($pPrice-$sPrice) / $pPrice * 100).' % /'.$this->xtcFormat($pPrice-$sPrice, $format);
// Ausgabe des gültigen Kundengruppen-Rabatts (sofern vorhanden)
if ($discount != 0)
{ $price .= '<br />'.BOX_LOGINBOX_DISCOUNT.': '.round($discount).' %'; }
if ($discount != 0) {
$price .= '<br />'.BOX_LOGINBOX_DISCOUNT.': '.round($discount).' %';
}
$price .= '</small>';
//EOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
if ($vpeStatus == 0) {
return $price;
ca. Zeile 579
return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
}
}
/**
* xtcFormatSpecialGraduated
*
* @param integer $pID
* @param double $sPrice
* @param double $pPrice
* @param boolean $format
* @param integer $vpeStatus
* @param integer $pID
* @return unknown
*/
function xtcFormatSpecialGraduated($pID, $sPrice, $pPrice, $format, $vpeStatus = 0, $pID) {
//BOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
// NEU HINZUGEFÜGT "Steuerklasse ermitteln"
$tQuery = "SELECT products_tax_class_id
FROM ".TABLE_PRODUCTS." WHERE
products_id='".$pID."'";
$tQuery = xtc_db_query($tQuery);
//BOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest! - NEU HINZUGEFÜGT "Steuerklasse ermitteln"
$tQuery = xtc_db_query("SELECT products_tax_class_id FROM ".TABLE_PRODUCTS." WHERE products_id='".$pID."'");
$tQuery = xtc_db_fetch_array($tQuery);
$tax_class = $tQuery['products_tax_class_id'];
// ENDE "Steuerklasse ermitteln"
//EOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
if ($pPrice == 0)
//EOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest! - ENDE "Steuerklasse ermitteln"
if ($pPrice == 0) {
return $this->xtcFormat($sPrice, $format, 0, false, $vpeStatus);
if ($discount = $this->xtcCheckDiscount($pID))
}
if ($discount = $this->xtcCheckDiscount($pID)) {
$sPrice -= $sPrice / 100 * $discount;
}
if ($format) {
//BOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
$sQuery = "SELECT max(quantity) as qty
$sQuery = xtDBquery("SELECT max(quantity) AS qty
FROM ".TABLE_PERSONAL_OFFERS_BY.$this->actualGroup."
WHERE products_id='".$pID."'";
$sQuery = xtDBquery($sQuery);
WHERE products_id='".$pID."'");
$sQuery = xtc_db_fetch_array($sQuery, true);
// NEU! Damit "UVP"-Anzeige wieder möglich ist
// if ( ($this->cStatus['customers_status_graduated_prices'] == '1') || ($sQuery['qty'] > 1) ) {
if ( ($this->cStatus['customers_status_graduated_prices'] == '1') && ($sQuery['qty'] > 1) ) {
$bestPrice = $this->xtcGetGraduatedPrice($pID, $sQuery['qty']);
if ($discount)
if ($discount) {
$bestPrice -= $bestPrice / 100 * $discount;
}
$price .= FROM.$this->xtcFormat($bestPrice, $format, $tax_class)
.' <br /><small>' . UNIT_PRICE
.$this->xtcFormat($sPrice, $format)
.'</small>';
} else if ($sPrice != $pPrice) { // if ($sPrice != $pPrice) {
$price = '<span class="productOldPrice">'.MSRP.' '.$this->xtcFormat($pPrice, $format).'</span><br />'.YOUR_PRICE.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format);
//EOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
} else {
$price = FROM.$this->xtcFormat($sPrice, $format);
$price = $this->xtcFormat($sPrice, $format);
}
if ($vpeStatus == 0) {
return $price;
} else {
return array ('formated' => $price, 'plain' => $sPrice);
ca. Zeile 627
return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
}
}
/**
* get_decimal_places
*
* @param unknown_type $code
* @return unknown
*/
function get_decimal_places($code) {
return $this->currencies[$this->actualCurr]['decimal_places'];
}
includes/data/blz.csvTop ca. Zeile 15
10030600;North Channel Bank;88
10030700;Gries & Heissel - Bankiers;16
10033300;Santander Consumer Bank;09
10040000;Commerzbank Berlin (West);13
10040010;Commerzbank, CC SP;09
10040048;Commerzbank GF-B48;13
10040060;Commerzbank Gf 160;09
10040061;Commerzbank Gf 161;09
10040062;Commerzbank CC;09
ca. Zeile 55
10089260;Commerzbank vormals Dresdner Bank ITGK;09
10089999;Commerzbank vormals Dresdner Bank ITGK 2;09
10090000;Berliner Volksbank;06
10090300;Bank für Schiffahrt (BFS) Fil d Ostfr VB Leer;09
10090603;apoBank;14
10090603;apoBank;A4
10090900;PSD Bank Berlin-Brandenburg;91
10110300;Bankhaus Dr. Masel;09
10110400;Investitionsbank Berlin;09
10110600;quirin bank;17
ca. Zeile 68
10120900;readybank;09
10120999;readybank Gf GAA;09
10130600;Isbank Fil Berlin;06
10130800;BIW Bank;01
10220600;Sydbank Filiale Berlin;19
10310600;Tradegate Wertpapierhandelsbank Berlin;09
12016836;KfW Kreditanstalt für Wiederaufbau;09
12030000;Deutsche Kreditbank Berlin;00
12030900;Merck Finck & Co;10
ca. Zeile 77
12050555;NLB FinanzIT;09
12060000;DZ BANK;09
12070000;Deutsche Bank Ld Brandenburg;63
12070024;Deutsche Bank Privat und Geschäftskunden;63
12070070;Deutsche Bank (Gf intern);09
12070088;Deutsche Bank (Gf intern);09
12080000;Commerzbank vormals Dresdner Bank Filiale Berlin II;76
12090640;apoBank;14
12090640;apoBank;A4
12096597;Sparda-Bank Berlin;A8
13000000;Bundesbank;09
13010111;SEB;13
13020780;UniCredit Bank - HypoVereinsbank (ehem. Hypo);99
13040000;Commerzbank;13
13050000;Ostseesparkasse Rostock;20
13051042;Kreissparkasse Rügen, Sitz Bergen;C0
13051042;Sparkasse Rügen;C0
13061008;Volksbank Wolgast;32
13061028;Volksbank Raiffeisenbank ehem VB Greifswald;32
13061078;Volks- und Raiffeisenbank;32
13061088;Raiffeisenbank Wismar -alt-;32
ca. Zeile 143
17020086;UniCredit Bank - HypoVereinsbank;99
17040000;Commerzbank;13
17052000;Sparkasse Barnim;20
17052302;Stadtsparkasse Schwedt;C0
17052472;Stadtsparkasse Frankfurt (Oder);52
17054040;Sparkasse Märkisch-Oderland;20
17055050;Sparkasse Oder-Spree;20
17056060;Sparkasse Uckermark;20
17062428;Raiffeisenbank-Volksbank Oder-Spree;32
ca. Zeile 161
18062758;VR Bank Forst;32
18080000;Commerzbank vormals Dresdner Bank;76
18092684;Spreewaldbank;32
18092744;Volksbank Spree-Neiße;32
18092794;Volks- und Raiffeisenbank Cottbus -alt-;32
20000000;Bundesbank;09
20010020;Postbank (Giro);24
20010111;SEB;13
20010424;Aareal Bank;09
20020200;SEB Merchant Bank Hamburg;09
20020500;Jyske Bank Fil Hamburg;09
20020860;UniCredit Bank - HypoVereinsbank (ehem. Hypo);99
20020900;Signal Iduna Bauspar;09
20030000;UniCredit Bank - HypoVereinsbank;68
20030300;Donner & Reuschel;09
20030300;DONNER & REUSCHEL;09
20030400;Marcard, Stein & Co Bankiers;00
20030600;Sydbank Fil Hamburg;19
20030700;Merck Finck & Co;10
20030900;Bankhaus Wölbern & Co;06
20040000;Commerzbank;13
20040020;Commerzbank, CC SP;09
20040040;Commerzbank GF RME;13
20040048;Commerzbank GF-H48;13
20040050;Commerzbank GF COC;13
20040060;Commerzbank Gf 260;09
ca. Zeile 195
20069111;Norderstedter Bank;32
20069125;Kaltenkirchener Bank;33
20069130;Raiffeisenbank;32
20069144;Raiffeisenbank;33
20069177;Raiffeisenbank Südstormarn;32
20069177;Raiffeisenbank Südstormarn Mölln;32
20069232;Raiffeisenbank;33
20069625;Volksbank;28
20069641;Raiffeisenbank Owschlag;33
20069659;Volksbank;28
ca. Zeile 228
20080095;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 11;09
20089200;Commerzbank vormals Dresdner Bank ITGK;09
20090400;Deutsche Genossenschafts-Hypothekenbank;09
20090500;netbank;81
20090602;apoBank;14
20090602;apoBank;A4
20090700;Edekabank;50
20090745;EBANK Gf Cash;50
20090900;PSD Bank Nord;91
20110022;Postbank (Spar);09
ca. Zeile 256
20190301;Vierländer Volksbank;10
20190800;MKB Mittelstandskreditbank;28
20210200;Bank Melli Iran;19
20210300;Bank Saderat Iran;09
20220100;DnB NOR Bank ASA Filiale Deutschland;09
20220100;DNB Bank ASA - Filiale Deutschland;09
20220400;Warburg, M.M. - Hypothekenbank;09
20230300;Schröder, Otto M. - Bank;09
20230600;Isbank Fil Hamburg;06
20230800;Sutor, Max Heinr;09
20310300;Europäisch-Iranische Handelsbank;06
20310600;The Royal Bank of Scotland, Niederlassung Deutschland;10
20320500;Danske Bank;09
20320585;Danske Bank - Settlements;09
20320585;Danske Bank Zweigniederlassung Hamburg;05
20350000;WestLB Hamburg;08
20690500;Sparda-Bank Hamburg;D5
20730000;UniCredit Bank - HypoVereinsbank (ex VereinWest);68
20730001;UniCredit Bank - HVB Settlement EAC01;09
ca. Zeile 334
21070024;Deutsche Bank Privat und Geschäftskunden;63
21080050;Commerzbank vormals Dresdner Bank;76
21089201;Commerzbank vormals Dresdner Bank ITGK;09
21090007;Kieler Volksbank;10
21090619;apoBank;14
21090619;apoBank;A4
21090900;PSD Bank Kiel;91
21092023;Eckernförder Bank Volksbank-Raiffeisenbank;48
21210111;SEB;13
21230085;UniCredit Bank - HypoVereinsbank (ex VereinWest);68
21230086;UniCredit Bank - HypoVereinsbank (ex VereinWest);68
21240040;Commerzbank;13
21241540;Commerzbank;13
21250000;Stadtsparkasse Neumünster -alt-;04
21261089;Raiffeisenbank -alt-;33
21261227;Raiffbk Kl-Kummerfeld -alt-;33
21270020;Deutsche Bank;63
21270024;Deutsche Bank Privat und Geschäftskunden;63
21280002;Commerzbank vormals Dresdner Bank;76
21290016;Volksbank Raiffbk Neumünster;48
21290016;VR Bank Neumünster;48
21340010;Commerzbank;13
21352240;Sparkasse Holstein;A7
21390008;VR Bank Ostholstein Nord-Plön;32
21392218;Volksbank Eutin Raiffeisenbank;33
ca. Zeile 368
21520100;Union-Bank Flensburg;06
21530080;UniCredit Bank - HypoVereinsbank (ex VereinWest);68
21540060;Commerzbank;13
21550050;Nord-Ostsee Sparkasse;C9
21563321;Raiffeisenbank Flensburg -alt-;33
21565316;Raiffeisenbank;33
21566356;Volks- und Raiffeisenbank;33
21567360;Raiffeisenbank Kleinjörl -alt-;33
21570011;Deutsche Bank;63
ca. Zeile 394
21741674;Commerzbank;13
21741825;Commerzbank;13
21750000;Nord-Ostsee Sparkasse;C8
21751230;Spar- und Leihkasse zu Bredstedt;00
21762550;Volksbank-Raiffeisenbank;32
21762550;Husumer Volksbank;32
21763542;VR Bank;32
21770011;Deutsche Bank;63
21770024;Deutsche Bank Privat und Geschäftskunden;63
21791805;Sylter Bank;33
ca. Zeile 418
22141028;Commerzbank;13
22141428;Commerzbank;13
22141628;Commerzbank;13
22150000;Sparkasse Elmshorn;A2
22151410;Kreissparkasse Pinneberg -alt-;00
22151730;Stadtsparkasse Wedel;D6
22163114;Raiffeisenbank Elbmarsch;33
22180000;Commerzbank vormals Dresdner Bank;76
22181400;Commerzbank vormals Dresdner Bank;76
ca. Zeile 448
23051610;Sparkasse Stormarn -alt-;A7
23052750;Kreissparkasse Herzogtum Lauenburg;A2
23061220;Raiffeisenbank Leezen;32
23062124;Raiffeisenbank;33
23062807;Volks- und Raiffeisenbank Mölln;33
23062807;Volks- und Raiffeisenbank Mölln -alt-;33
23063129;Raiffeisenbank;33
23064107;Raiffeisenbank;32
23070700;Deutsche Bank Privat und Geschäftskunden;63
23070710;Deutsche Bank;63
23080040;Commerzbank vormals Dresdner Bank;76
23089201;Commerzbank vormals Dresdner Bank ITGK;09
23090142;Volksbank Lübeck;10
23092502;Volksbank Lauenburg -alt-;10
23092620;apoBank;14
23092620;apoBank;A4
24000000;Bundesbank eh Lüneburg;09
24030000;UniCredit Bank - HypoVereinsbank (ex VereinWest);68
24040000;Commerzbank;13
24050110;Sparkasse Lüneburg;00
24060300;Volksbank Nordheide;28
24060300;Volksbank Lüneburger Heide;28
24061392;Volksbank Bleckede-Dahlenburg -alt-;28
24070024;Deutsche Bank Privat und Geschäftskunden;63
24070075;Deutsche Bank;63
24080000;Commerzbank vormals Dresdner Bank;76
ca. Zeile 521
25080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 2;09
25089220;Commerzbank vormals Dresdner Bank ITGK;09
25090300;Bank für Schiffahrt (BFS) Fil d Ostfr VB Leer;28
25090500;Sparda-Bank Hannover;81
25090608;apoBank;14
25090608;apoBank;A4
25090900;PSD Bank;91
25120510;Bank für Sozialwirtschaft;09
25120960;UniCredit Bank - HypoVereinsbank (ehem. Hypo);99
25151270;Stadtsparkasse Barsinghausen;00
25151371;Stadtsparkasse Burgdorf;00
25152375;Kreissparkasse Fallingbostel in Walsrode;00
25152490;Stadtsparkasse Wunstorf;00
ca. Zeile 587
25840048;Commerzbank;13
25841403;Commerzbank;13
25841708;Commerzbank;13
25850110;Sparkasse Uelzen Lüchow-Dannenberg;00
25851335;Sparkasse Uelzen Lüchow-Dannenberg;00
25851335;Sparkasse Uelzen Lüchow-Dannenberg -alt-;00
25851660;Kreissparkasse Soltau;00
25861395;Volksbank Dannenberg -alt-;28
25861990;Volksbank Clenze-Hitzacker;28
25862292;Volksbank Uelzen-Salzwedel;28
25862393;Volksbank -alt-;09
25863489;Volksbank Osterburg-Lüchow-Dannenberg;28
25891483;Volksbank Osterburg-Lüchow-Dannenberg -alt-;28
25891636;Volksbank Lüneburger Heide;28
25891636;Volksbank Lüneburger Heide -alt-;28
25900000;Bundesbank eh Hildesheim;09
25910111;SEB;13
25930000;UniCredit Bank - HypoVereinsbank (ex VereinWest);68
25940033;Commerzbank;13
ca. Zeile 621
26051450;Kreis- und Stadtsparkasse Münden;00
26060184;Bankhaus Hallbaum;C3
26061291;Volksbank Mitte;48
26061556;Volksbank;28
26062433;Volksbank Dransfeld;32
26062433;VR-Bank in Südniedersachsen;32
26062575;Raiffeisenbank;28
26070024;Deutsche Bank Privat und Geschäftskunden;63
26070072;Deutsche Bank;63
26080024;Commerzbank vormals Dresdner Bank;76
ca. Zeile 653
26550105;Sparkasse Osnabrück;00
26551540;Kreissparkasse Bersenbrück;00
26552286;Kreissparkasse Melle;00
26560189;Bankhaus Hallbaum;C3
26560625;apoBank;14
26560625;apoBank;A4
26562490;Volksbank Bad Laer-Borgloh-Hilter-Melle;28
26562694;Volksbank Wittlage -alt-;28
26563960;Volksbank Bramgau-Wittlage;28
26565928;Volksbank GMHütte-Hagen-Bissendorf;28
26566939;Volksbank Osnabrücker Nordland;28
26567943;VR-Bank im Altkreis Bersenbrück;28
26568924;Volksbank Hilter-Bad Laer -alt-;28
26570024;Deutsche Bank Privat und Geschäftskunden;63
26570090;Deutsche Bank;63
26580070;Commerzbank vormals Dresdner Bank;76
26589210;Commerzbank vormals Dresdner Bank ITGK;09
ca. Zeile 727
27072736;Deutsche Bank;63
27080060;Commerzbank vormals Dresdner Bank;76
27089221;Commerzbank vormals Dresdner Bank ITGK;09
27090077;Volksbank Braunschweig -alt-;50
27090618;apoBank;14
27090618;apoBank;A4
27090900;PSD Bank;91
27092555;Volksbank Wolfenbüttel-Salzgitter;28
27131300;Bankhaus Rautenschlein;32
27190082;Volksbank Helmstedt;28
ca. Zeile 753
28022620;Oldenburgische Landesbank AG;61
28022822;Oldenburgische Landesbank AG;61
28023224;Oldenburgische Landesbank AG;61
28023325;Oldenburgische Landesbank AG;61
28030300;Bankhaus W. Fortmann & Söhne;28
28030300;Bankhaus W. Fortmann & Söhne;09
28040046;Commerzbank;13
28042865;Commerzbank;13
28050100;Landessparkasse Oldenburg;00
28050100;Landessparkasse zu Oldenburg;00
28060228;Raiffeisenbank Oldenburg;28
28061410;Raiffeisenbank Wesermarsch-Süd;28
28061501;Volksbank Cloppenburg;28
28061679;Volksbank Dammer Berge;28
ca. Zeile 803
28069991;Volksbank Emstal;28
28069994;Volksbank Süd-Emsland;28
28070024;Deutsche Bank Privat und Geschäftskunden;63
28070057;Deutsche Bank;63
28090633;apoBank;14
28090633;apoBank;A4
28200000;Bundesbank eh Wilhelmshaven;09
28220026;Oldenburgische Landesbank AG;61
28222208;Oldenburgische Landesbank AG;61
28222621;Oldenburgische Landesbank AG;61
ca. Zeile 815
28261946;Raiffeisenbank Sande-Wangerland;28
28262254;Volksbank Jever;10
28262481;Raiffeisenbank Sande-Wangerland -alt-;28
28262673;Raiffeisen-Volksbank Varel-Nordenham;28
28262794;Raiffeisen-Volksbank Aurich-Wittmund -alt-;28
28270024;Deutsche Bank Privat und Geschäftskunden;63
28270056;Deutsche Bank;63
28280012;Commerzbank vormals Dresdner Bank;76
28290063;Volksbank Wilhelmshaven;00
ca. Zeile 831
28440037;Commerzbank;13
28450000;Sparkasse Emden;00
28470024;Deutsche Bank Privat und Geschäftskunden;63
28470091;Deutsche Bank;63
28490073;Raiffeisen-Volksbank Emden-Pewsum -alt-;28
28500000;Bundesbank eh Leer;09
28520009;Oldenburgische Landesbank AG;61
28521518;Oldenburgische Landesbank AG;61
28540034;Commerzbank;13
ca. Zeile 841
28562297;Raiffeisen-Volksbank;28
28562716;Raiffeisenbank Flachsmeer;28
28562863;Raiffeisenbank Moormerland;28
28563749;Raiffeisenbank;28
28563865;Ostfriesische Volksbank Leer;28
28570024;Deutsche Bank Privat und Geschäftskunden;63
28570092;Deutsche Bank;63
28590075;Ostfriesische Volksbank Leer;28
28591579;Volksbank Papenburg Fil d. Ostfries. VB Leer;28
ca. Zeile 854
29020000;Bankhaus Neelmeyer;45
29020100;KBC Bank Deutschland;18
29020200;NordFinanz Bank;09
29020400;Deutsche Factoring Bank;09
29030400;Plump, Carl F. - & Co;C4
29030400;Bankhaus Carl F. Plump & CO;C4
29040060;Commerzbank CC;09
29040061;Commerzbank CC;09
29040090;Commerzbank;13
29050000;Bremer Landesbank;29
ca. Zeile 868
29070058;Deutsche Bank;63
29070059;Deutsche Bank;63
29080010;Commerzbank vormals Bremer Bank (Dresdner Bank);76
29089210;Commerzbank vormals Bremer Bank (Dresdner Bank) ITGK;09
29090605;apoBank;14
29090605;apoBank;A4
29090900;PSD Bank Nord;91
29121731;Oldenburgische Landesbank AG;61
29151700;Kreissparkasse Syke;00
29152300;Kreissparkasse Osterholz;00
ca. Zeile 891
29210111;SEB;13
29240024;Commerzbank;13
29250000;Sparkasse Bremerhaven;10
29250150;Kreissparkasse Wesermünde-Hadeln;10
29262646;Spar- und Darlehnskasse Langen-Neuenwalde;28
29262722;Volksbank Geeste-Nord;28
29265747;Volksbank Bremerhaven-Cuxland;28
29280011;Commerzbank vormals Dresdner Bank;76
29290034;Volksbank Bremerhaven-Wesermünde -alt-;28
ca. Zeile 906
30020500;BHF-BANK;60
30020700;Mizuho Corporate Bank Ltd Fil Düsseldorf;09
30020900;TARGOBANK;57
30022000;NRW.BANK;08
30025500;WestLB Servicekonto;08
30030100;S Broker Wiesbaden;56
30030400;FXdirekt Bank;00
30030500;C&A Bank;05
30030600;ETRIS Bank;06
ca. Zeile 920
30040062;Commerzbank CC;09
30040063;Commerzbank CC;09
30050000;WestLB Düsseldorf;08
30050110;Stadtsparkasse Düsseldorf;00
30052525;NRW.BANK;08
30060010;WGZ Bank;44
30060601;apoBank;14
30060601;apoBank;A4
30060992;PSD Bank Rhein-Ruhr;91
30070010;Deutsche Bank;63
30070024;Deutsche Bank Privat und Geschäftskunden;63
30080000;Commerzbank vormals Dresdner Bank;76
ca. Zeile 1012
33000000;Bundesbank eh Wuppertal;09
33010111;SEB;13
33020000;akf bank;09
33020190;UniCredit Bank - HypoVereinsbank;99
33030000;GEFA;06
33040001;Commerzbank;13
33040310;Commerzbank Zw 117;13
33050000;Stadtsparkasse Wuppertal;00
33060098;Credit- und Volksbank Wuppertal;06
33060592;Sparda-Bank West;51
33060616;apoBank;14
33060616;apoBank;A4
33070024;Deutsche Bank Privat und Geschäftskunden;63
33070090;Deutsche Bank;63
33080001;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
33080030;Commerzbank vormals Dresdner Bank;76
ca. Zeile 1049
35040038;Commerzbank;13
35050000;Sparkasse Duisburg;00
35060190;Bank für Kirche und Diakonie - KD-Bank;06
35060386;Volksbank Rhein-Ruhr;40
35060632;apoBank;14
35060632;apoBank;A4
35070024;Deutsche Bank Privat und Geschäftskunden;63
35070030;Deutsche Bank;63
35080070;Commerzbank vormals Dresdner Bank;76
35080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
ca. Zeile 1063
35211012;SEB;13
35251000;Sparkasse Dinslaken-Voerde-Hünxe;00
35261248;Volksbank Dinslaken;06
35450000;Sparkasse am Niederrhein;A2
35451460;Sparkasse Neukirchen-Vluyn;00
35451775;Sparkasse Rheinberg;00
35451460;Sparkasse Neukirchen-Vluyn -alt-;00
35451775;Sparkasse Rheinberg -alt-;00
35461106;Volksbank Niederrhein;06
35600000;Bundesbank eh Wesel;09
35640064;Commerzbank;13
35650000;Verbands-Sparkasse Wesel;00
ca. Zeile 1094
36060192;Pax-Bank;06
36060295;Bank im Bistum Essen;06
36060488;GENO BANK ESSEN;34
36060591;Sparda-Bank West;86
36060610;apoBank;14
36060610;apoBank;A4
36070024;Deutsche Bank Privat und Geschäftskunden;63
36070050;Deutsche Bank;63
36080080;Commerzbank vormals Dresdner Bank;76
36080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 2;09
ca. Zeile 1137
37021400;Land Rover Financial Services Ndl der FCE Bank;09
37030200;Oppenheim, Sal - jr & Cie;09
37030700;abcbank Niederlassung Köln;19
37030800;Isbank Fil Köln;06
37040037;Commerzbank, CC SP;09
37040044;Commerzbank;13
37040048;Commerzbank GF-K48;13
37040060;Commerzbank CC;09
37040061;Commerzbank CC;09
ca. Zeile 1146
37050299;Kreissparkasse Köln;B5
37060120;Pax-Bank Gf MHD;06
37060193;Pax-Bank;06
37060590;Sparda-Bank West;51
37060615;apoBank;14
37060615;apoBank;A4
37060993;PSD Bank Köln;91
37062124;Bensberger Bank;06
37062365;Raiffeisenbank Frechen-Hürth;06
37062600;VR Bank Bergisch Gladbach;06
ca. Zeile 1163
37069303;Volksbank Gemünd-Kall -alt-;06
37069306;Raiffeisenbank Grevenbroich;06
37069322;Raiffeisenbank Gymnich;06
37069330;Volksbank Haaren;06
37069331;Raiffeisenbank von 1895 Zw Horrem;06
37069331;Raiffeisenbank von 1895 Zw Horrem -alt-;06
37069342;Volksbank Heimbach;06
37069354;Raiffeisenbank Selfkant Zw -alt-;06
37069355;Spar- und Darlehnskasse Hoengen;06
37069381;Volksbank Randerath-Immendorf;06
ca. Zeile 1180
37069524;Raiffeisenbank Much-Ruppichteroth;06
37069577;Raiffeisenbank Odenthal -alt-;06
37069627;Raiffeisenbank Rheinbach Voreifel;06
37069639;Rosbacher Raiffeisenbank;06
37069642;Raiffeisenbank Simmerath;06
37069642;Raiffeisenbank;06
37069707;Raiffeisenbank St Augustin;06
37069720;VR-Bank Nordeifel;06
37069805;Volksbank Wachtberg;06
37069833;Raiffeisenbk Wesseling -alt-;06
ca. Zeile 1261
39020000;Aachener Bausparkasse;09
39040013;Commerzbank;13
39050000;Sparkasse Aachen;00
39060180;Aachener Bank;06
39060630;apoBank;14
39060630;apoBank;A4
39061981;Heinsberger Volksbank;06
39070020;Deutsche Bank;63
39070024;Deutsche Bank Privat und Geschäftskunden;63
39080005;Commerzbank vormals Dresdner Bank;76
ca. Zeile 1271
39080099;Commerzbank vormals Dresdner Bank Zw 99;76
39160191;Pax-Bank;06
39161490;Volksbank Aachen Süd;06
39162980;VR-Bank;06
39360097;Volksbank Stolberg-Eschweiler -alt-;06
39362254;Raiffeisen-Bank Eschweiler;06
39500000;Bundesbank eh Düren;09
39540052;Commerzbank;13
39550110;Sparkasse Düren;00
ca. Zeile 1287
40030000;Münsterländische Bank Thie & Co;61
40040028;Commerzbank;13
40050000;WestLB Münster;08
40050150;Sparkasse Münsterland Ost;00
40052525;NRW.BANK;08
40055555;LBS Westdeutsche Landesbausparkasse;09
40060000;WGZ Bank;44
40060265;DKM Darlehnskasse Münster;34
40060300;WL BANK Westfälische Landschaft Bodenkreditbank;09
40060560;Sparda-Bank Münster;85
40060614;apoBank;14
40060614;apoBank;A4
40061238;Volksbank Greven;34
40069226;Volksbank Lette-Darup-Rorup;34
40069266;Volksbank Marsberg;34
40069283;Volksbank Schlangen;34
ca. Zeile 1304
40069371;Volksbank Thülen;34
40069408;Volksbank Baumberge;34
40069462;Volksbank Sprakel;34
40069477;Volksbank Wulfen -alt-;34
40069545;Volksbank Schönholthausen -alt-;34
40069546;Volksbank Senden;34
40069600;Volksbank Amelsbüren;34
40069601;Volksbank Ascheberg-Herbern;34
40069606;Volksbank Erle;34
ca. Zeile 1323
40153768;Verbundsparkasse Emsdetten Ochtrup;01
40154006;Sparkasse Gronau;00
40154476;Stadtsparkasse Lengerich;00
40154530;Sparkasse Westmünsterland;00
40154680;Stadtsparkasse Ochtrup -alt-;00
40154702;Stadtsparkasse Stadtlohn;00
40160050;Volksbank Münster;34
40163123;Volksbank Coesfeld -alt-;34
40163720;Volksbank Nordmünsterland;34
ca. Zeile 1333
40164256;Volksbank Laer-Horstmar-Leer;34
40164352;Volksbank Nottuln;34
40164528;Volksbank Lüdinghausen-Olfen;34
40164618;Volksbank;34
40164901;Volksbank;34
40164901;Volksbank Gescher;34
40165366;Volksbank Selm-Bork;34
40166439;Volksbank Lengerich/Lotte -alt-;34
40166800;Volksbank Buldern -alt-;34
40300000;Bundesbank eh Rheine;09
ca. Zeile 1448
44040061;Commerzbank CC;09
44050000;WestLB Dortmund;08
44050199;Sparkasse Dortmund;06
44060122;Volksbank Dortmund-Nordwest;34
44060604;apoBank;14
44060604;apoBank;A4
44064406;Bank für Kirche und Diakonie - KD-Bank Gf Sonder-BLZ;09
44070024;Deutsche Bank Privat und Geschäftskunden;63
44070050;Deutsche Bank;63
44080050;Commerzbank vormals Dresdner Bank;76
ca. Zeile 1470
44360002;Volksbank Unna Schwerte -alt-;34
44361342;Volksbank Kamen-Werne;34
44540022;Commerzbank;13
44550045;Sparkasse der Stadt Iserlohn;00
44551210;Sparkasse Märkisches Sauerland Hemer-Menden;00
44551210;Sparkasse Märkisches Sauerland Hemer-Menden - alt -;00
44561102;Volksbank Letmathe -alt-;34
44570004;Deutsche Bank;63
44570024;Deutsche Bank Privat und Geschäftskunden;63
44580070;Commerzbank vormals Dresdner Bank;76
44580085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
44750065;Sparkasse Menden;00
44750065;Sparkasse Menden -alt-;00
44760037;Volksbank Menden -alt-;34
44761312;Mendener Bank;34
44761534;Volksbank im Märkischen Kreis;34
45000000;Bundesbank;09
ca. Zeile 1529
46240016;Commerzbank;13
46250049;Sparkasse Olpe-Drolshagen-Wenden;00
46251590;Sparkasse Finnentrop;00
46251630;Sparkasse Attendorn-Lennestadt-Kirchhundem;00
46260023;Volksbank Olpe;34
46260023;Volksbank Olpe -alt-;34
46261306;Volksbank Attendorn -alt-;34
46261607;Volksbank Grevenbrück;34
46261822;Volksbank Wenden-Drolshagen;34
46261822;Volksbank Olpe-Wenden-Drolshagen;34
46262456;Volksbank Bigge-Lenne -alt-;34
46400000;Bundesbank eh Arnsberg;09
46441003;Commerzbank;13
46451012;Zweckverbandssparkasse Meschede;00
ca. Zeile 1560
47262406;Volksbank Höxter-Beverungen -alt-;34
47262626;Volksbank Westenholz;34
47262703;Volksbank Delbrück-Hövelhof;34
47263472;Volksbank Westerloh-Westerwiehe;34
47264367;Volksbank Bad Driburg-Brakel-Steinheim;34
47264367;Vereinigte Volksbank;34
47265383;Volksbank Wewelsburg-Ahden;34
47267216;Volksbank Borgentreich -alt-;34
47270024;Deutsche Bank Privat und Geschäftskunden;63
47270029;Deutsche Bank;63
47451235;Stadtsparkasse Marsberg -alt-;00
47460028;Volksbank Warburger Land;34
47460028;Volksbank Warburger Land -alt-;34
47640051;Commerzbank;13
47650130;Sparkasse Detmold;00
47651225;Stadtsparkasse Blomberg;00
47670023;Deutsche Bank;63
ca. Zeile 1594
48000000;Bundesbank;09
48010111;SEB;13
48020086;UniCredit Bank - HypoVereinsbank;99
48020151;Bankhaus Lampe;32
48021900;Bankverein Werther;32
48021900;Bankverein Werther;34
48040035;Commerzbank;13
48040060;Commerzbank CC;09
48040061;Commerzbank CC;09
48050000;Westdeutsche Landesbank;08
ca. Zeile 1625
49050101;Sparkasse Minden-Lübbecke;00
49051065;Stadtsparkasse Rahden;00
49051285;Stadtsparkasse Bad Oeynhausen;00
49051990;Stadtsparkasse Porta Westfalica;00
49060127;Volksbank Minden-Hille-Porta;34
49060127;Volksbank Mindener Land;34
49060392;Volksbank Minden;34
49061298;Volksbank Bad Oeynhausen -alt-;34
49061470;Volksbank Stemweder Berg -alt-;34
49061510;Volksbank Eisbergen -alt-;34
49063296;Volksbank Petershagen;34
49063296;Volksbank Petershagen -alt-;34
49063338;Volksbank Hille -alt-;34
49070024;Deutsche Bank Privat und Geschäftskunden;63
49070028;Deutsche Bank;63
49080025;Commerzbank vormals Dresdner Bank;76
ca. Zeile 1641
49262364;Volksbank Schnathorst;34
49440043;Commerzbank;13
49450120;Sparkasse Herford;00
49451210;Sparkasse Bad Salzuflen -alt-;00
49461323;Volksbank Enger-Spenge;34
49461323;Volksbank Enger-Spenge -alt-;34
49490070;Volksbank Bad Oeynhausen-Herford;34
50000000;Bundesbank;09
50010060;Postbank;24
50010111;SEB;13
ca. Zeile 1651
50010424;Aareal Bank;09
50010517;ING-DiBa;C1
50010700;Degussa Bank;B7
50010900;Bank of America;09
50012800;ALTE LEIPZIGER Bauspar;50
50012800;ALTE LEIPZIGER Bauspar;28
50020160;UniCredit Bank - HypoVereinsbank Ndl 427 Ffm;99
50020200;BHF-BANK;60
50020300;KBC Bank Deutschland;18
50020400;KfW Kreditanstalt für Wiederaufbau Frankfurt;09
50020500;Landwirtschaftliche Rentenbank;09
50020700;Credit Europe Bank Ndl. Deutschland;09
50020800;Intesa Sanpaolo Frankfurt;09
50020900;COREALCREDIT BANK;09
50021000;ING Bank Frankfurt am Main;60
50021000;ING Bank;60
50021100;Frankfurter Fondsbank;60
50023400;Bank of Beirut Ndl Frankfurt;09
50030000;Banque PSA Finance Deutschland;09
50030100;HKB Bank Frankfurt;00
ca. Zeile 1675
50031100;Bankhaus Main;00
50033300;Santander Consumer Bank;09
50040000;Commerzbank;13
50040033;Commerzbank Gf BRS;09
50040038;Commerzbank, MBP;13
50040040;Commerzbank Gf ZRK;13
50040048;Commerzbank GF-F48;13
50040050;Commerzbank, CC SP;09
50040051;Commerzbank Center Dresdner Bank Frankfurt;13
50040052;Commerzbank Service - BZ Frankfurt;13
50040060;Commerzbank Gf 460;09
50040061;Commerzbank Gf 461;09
50040062;Commerzbank CC;09
50040063;Commerzbank CC;09
50040075;Commerzbank Gf ZCM;13
50040088;Commerzbank, INT 1;13
50040099;Commerzbank INT;13
50042500;Commerzbank Zw 425 - keine Auslandsbanken;13
50044444;Commerzbank Vermögensverwaltung;13
50047010;Commerzbank Service - BZ;13
ca. Zeile 1703
50069146;Volksbank Grebenhain;32
50069187;Volksbank Egelsbach -alt-;32
50069241;Raiffeisenkasse Erbes-Büdesheim und Umgebung;32
50069345;Raiffeisenbank;32
50069384;Volksbank Heppenheim - Offstein;32
50069455;Hüttenberger Bank;32
50069464;Volksbank Inheiden-Villingen -alt-;32
50069477;Raiffeisenbank Kirtorf;32
50069693;Raiffeisenbank Bad Homburg Ndl d FrankfurterVB;32
ca. Zeile 1725
50080057;Commerzbank vormals Dresdner Bank Gf ZW 57;76
50080060;Commerzbank vormals Dresdner Bank Gf DrKW;76
50080061;Commerzbank vormals Dresdner Bank Gf DrKWSL;76
50080077;Commerzbank, GF Wüstenrot BSPK;09
50080079;Commerzbank vormals Dresdner Bank ESOP;76
50080080;Commerzbank vormals Dresdner Bank Bs 80;76
50080082;Commerzbank vormals Dresdner Bank Gf AVB;76
50080085;Commerzbank vormals Dresdner Bank Card Service;09
50080086;Commerzbank vormals Dresdner Bank ITGK 3;09
50080087;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 4;09
50080088;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 5;09
50080089;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 6;09
ca. Zeile 1741
50083838;Commerzbank vormals Dresdner Bank in Frankfurt MBP;76
50089400;Commerzbank vormals Dresdner Bank ITGK;09
50090200;VR DISKONTBANK;00
50090500;Sparda-Bank Hessen;73
50090607;apoBank;14
50090607;apoBank;A4
50090900;PSD Bank Hessen-Thüringen;91
50092100;Spar- u Kreditbank ev-freikirchl Gemeinden;06
50092200;Volksbank Main-Taunus -alt-;06
50092900;Volksbank Usinger Land Ndl d Frankfurter VB;06
ca. Zeile 1756
50110500;NATIXIS Zweigniederlassung Deutschland;09
50110636;DTC Standard Chartered Bank Germany Branch;09
50110700;Frankfurter Bankgesellschaft (Deutschland);09
50110800;J.P. Morgan;09
50110801;J.P. Morgan, Internal Reference;94
50110900;Bank of America N.A. Military Bank;09
50120000;MainFirst Bank;09
50120100;ICICI Bank UK Ndl Frankfurt am Main;09
50120383;Delbrück Bethmann Maffei;A3
50120383;BETHMANN BANK;D9
50120500;Credit Suisse (Deutschland);66
50120600;Bank of Communications Frankfurt branch;09
50120900;VakifBank International Wien Zndl Frankfurt;06
50123400;VTB Bank (Austria), Zndl;28
50130000;National Bank of Pakistan Zndl Frankfurt;09
50130100;BethmannMaffei Bank -alt-;09
50130100;BethmannMaffei Bank -alt-;D9
50130200;Oppenheim, Sal - jr & Cie;09
50130300;FIRST INTERNATIONAL BANK;50
50130300;First International Bank;09
50130400;Merck Finck & Co;10
50130600;UBS Deutschland;09
50131000;Vietnam Joint Stock Commercial Bank for Industry and Trade;09
50150000;Westdeutsche Landesbank Ndl Frankfurt;09
50190000;Frankfurter Volksbank;06
50190300;Volksbank Höchst;06
50190400;Volksbank Griesheim;06
ca. Zeile 1837
50210187;SEB TZN MB Frankfurt;09
50210188;SEB TZN MB Frankfurt;09
50210189;SEB TZN MB Frankfurt;21
50210200;Rabobank International Frankfurt Branch;18
50210212;RaboDirect;18
50210300;Eurohypo;09
50210400;Eurohypo ehem Rheinische Hypothekenbank;09
50210600;equinet Bank;91
50210800;ProCredit Bank, Frankfurt am Main;06
50210900;Citigroup Global Markets Deutschland;06
50220085;UBS Deutschland;09
50220200;LGT Bank Deutschland;09
50220200;Bethmann Bank (Vormals LGT Bank Deutschland);D9
50220500;Bank of Scotland;00
50220900;Hauck & Aufhäuser Privatbankiers;00
50230000;ABC International Bank Frankfurt am Main;00
50230100;Morgan Stanley Bank Internaional;09
ca. Zeile 1868
50330200;MHB-Bank;06
50330300;The Bank of New York Mellon;09
50330500;BANQUE CHAABI DU MAROC Agentur Frankfurt Ndl. Deutschland;09
50330600;Bank Sepah-Iran;09
50330700;Valovis Commercial Bank;09
50330700;Valovis Bank;09
50334400;The Bank of New York Mellon NL Frankfurt;09
50400000;Bundesbank Zentrale;09
50510111;SEB;13
50510120;SEB TZN MB Ffm;09
50510121;SEB TZN MB Ffm;09
ca. Zeile 2003
50880050;Commerzbank vormals Dresdner Bank;76
50880085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
50880086;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 2;09
50890000;Volksbank Darmstadt - Kreis Bergstraße;06
50890634;apoBank;14
50890634;apoBank;A4
50892500;Groß-Gerauer Volksbank;06
50950068;Sparkasse Bensheim;00
50951469;Sparkasse Starkenburg;01
50960101;Volksbank Bergstraße -alt-;32
50961206;Raiffeisenbank Ried;32
50961312;Raiffeisenbank Groß-Rohrheim;32
50961592;Volksbank Weschnitztal;32
50961685;Volksbank Überwald-Gorxheimertal;32
50970004;Deutsche Bank;63
50970024;Deutsche Bank Privat und Geschäftskunden;63
50991400;Volksbank Kreis Bergstraße -alt-;06
51000000;Bundesbank eh Wiesbaden;09
51010111;SEB;13
51010400;Aareal Bank;09
51010800;Aareal Bank Zw L;09
ca. Zeile 2030
51080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
51080086;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK2;09
51089410;Commerzbank vormals Dresdner Bank ITGK;09
51090000;Wiesbadener Volksbank;06
51090636;apoBank;14
51090636;apoBank;A4
51091400;Volksbank Eltville -alt-;06
51091500;Rheingauer Volksbank;06
51091700;vr bank Untertaunus;06
51091711;Bank f Orden u Mission Zndl vr bk Untertaunus;06
ca. Zeile 2050
51210600;BNP PARIBAS Ndl Frankfurt, Main;00
51210700;NIBC Bank Zndl Frankfurt am Main;06
51210800;Societe Generale;09
51220200;SEB Merchant Banking;09
51220211;SEB Frankfurt SAP;09
51220400;Bank Saderat Iran;09
51220700;ZIRAAT BANK International;09
51220800;Banco do Brasil;09
51220900;Morgan Stanley Bank;09
ca. Zeile 2081
51370024;Deutsche Bank Privat und Geschäftskunden;63
51380040;Commerzbank vormals Dresdner Bank;76
51380085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
51390000;Volksbank Mittelhessen;06
51410111;SEB direct;13
51410111;Santander Bank;13
51410600;Merrill Lynch International Bank Limited Zndl Frankfurt;09
51410700;Bank of China;09
51410800;OnVista Bank;09
51420200;Misr Bank-Europe;00
51420300;Bank Julius Bär Europe;17
51420600;Svenska Handelsbanken Deutschland;09
51430300;Nordea Bank Finland;09
51430321;Nordea Bank Finland;09
51430400;Goldman, Sachs & Co;09
51540037;Commerzbank;13
51550035;Sparkasse Wetzlar;00
51560231;Volksbank Wetzlar-Weilburg -alt-;32
ca. Zeile 2152
52071224;Deutsche Bank Privat und Geschäftskunden;63
52080080;Commerzbank vormals Dresdner Bank;76
52080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK1;09
52090000;Kasseler Bank;06
52090611;apoBank;14
52090611;apoBank;A4
52240006;Commerzbank;13
52250030;Sparkasse Werra-Meißner;00
52260385;VR-Bank Werra-Meißner;32
52270012;Deutsche Bank;63
ca. Zeile 2165
52410310;ReiseBank Gf2;09
52410400;Korea Exchange Bank (Deutschland);19
52410600;NEWEDGE GROUP (Frankfurt Branch) Zndl d NewedgeGroup;09
52410700;ABN AMRO Clearing Bank, Frankfurt Branch;09
52410900;Maple Bank;09
52410900;Maple Bank;00
52411000;Cash Express Gesellschaft f Finanz-u Reisedienstleistungen;09
52411010;Cash Express Gesellschaft f.Finanz-u.Reisedienstleistungen;09
52420000;Credit Agricole CIB Deutschland;09
52420300;SHINHAN BANK EUROPE;09
ca. Zeile 2209
53370008;Deutsche Bank;63
53370024;Deutsche Bank Privat und Geschäftskunden;63
53380042;Commerzbank vormals Dresdner Bank;76
53381843;Commerzbank vormals Dresdner Bank;76
53390635;apoBank;14
53390635;apoBank;A4
54000000;Bundesbank eh Kaiserslautern;09
54020090;UniCredit Bank - HypoVereinsbank;99
54020474;UniCredit Bank - HypoVereinsbank Ndl 697 Kais;99
54030011;Service Credit Union Overseas Headquarters;09
ca. Zeile 2262
54663270;Raiffeisenbank Friedelsheim-Rödersheim;32
54670024;Deutsche Bank Privat und Geschäftskunden;63
54670095;Deutsche Bank;63
54680022;Commerzbank vormals Dresdner Bank;76
54690623;apoBank;14
54690623;apoBank;A4
54691200;VR Bank Mittelhaardt;06
54750010;Kreis- und Stadtsparkasse Speyer;00
54751440;Stadtsparkasse Schifferstadt;00
54760900;Evangelische Kreditgenossenschaft - Filiale Speyer-;32
54761411;Raiffeisenbank Schifferstadt;32
54761411;Raiffeisenbank Schifferstadt -alt-;32
54790000;Volksbank Kur- und Rheinpfalz;06
54820674;UniCredit Bank - HypoVereinsbank Ndl 659 LanP;99
54850010;Sparkasse Südliche Weinstraße in Landau;00
54851440;Sparkasse Germersheim-Kandel;00
54861190;Raiffeisenbank Oberhaardt-Gäu;32
54861190;Raiffeisenbank Oberhaardt-Gäu -alt-;32
54862390;Raiffeisenbank;32
54862500;VR Bank Südpfalz;32
54891300;VR Bank Südliche Weinstraße;06
55000000;Bundesbank;09
ca. Zeile 2296
55040060;Commerzbank CC;09
55040061;Commerzbank CC;09
55050000;ZV Landesbank Baden-Württemberg;59
55050120;Sparkasse Mainz;00
55051260;Kreissparkasse Alzey-alt-;00
55060321;VR-Bank Mainz;32
55060417;VR-Bank Mainz;32
55060611;Genobank Mainz;32
55060831;apoBank;14
55060831;apoBank;A4
55061303;Budenheimer Volksbank;32
55061507;VR-Bank Mainz;32
55061907;Volksbank Rhein-Selz -alt-;32
55070024;Deutsche Bank Privat und Geschäftskunden;63
ca. Zeile 2327
55340041;Commerzbank;13
55350010;Sparkasse Worms-Alzey-Ried;03
55360784;Volksbank Rheindürkheim -alt-;32
55361202;Raiffeisenbank Alsheim-Gimbsheim;32
55361313;Raiffeisenbank -alt-;32
55361422;Volksbank Wonnegau -alt-;32
55362071;Volksbank Bechtheim;32
55390000;Volksbank Worms-Wonnegau;06
56000000;Bundesbank eh Bad Kreuznach;09
56020086;UniCredit Bank - HypoVereinsbank;99
ca. Zeile 2338
56051790;Kreissparkasse Rhein-Hunsrück;00
56061151;Raiffeisenbank Kastellaun;38
56061472;Volksbank Hunsrück-Nahe;38
56062227;Volksbank;40
56062577;Vereinigte Raiffeisenkassen;38
56062577;Vereinigte Raiffeisenkassen -alt-;38
56070024;Deutsche Bank Privat und Geschäftskunden;63
56070040;Deutsche Bank;63
56090000;Volksbank Rhein-Nahe-Hunsrück;38
56240050;Commerzbank;13
56250030;Kreissparkasse Birkenfeld;B2
56261073;Volksbank Kirn-Sobernheim -alt-;38
56261735;Raiffeisenbank Nahe;38
56270024;Deutsche Bank Privat und Geschäftskunden;63
56270044;Deutsche Bank;63
56290000;Volksbank-Raiffeisenbank Naheland -alt-;06
ca. Zeile 2360
57050120;Sparkasse Koblenz;00
57051001;Kreissparkasse Westerwald;00
57051870;Kreissparkasse Cochem-Zell -alt-;00
57060000;WGZ Bank;44
57060612;apoBank;14
57060612;apoBank;A4
57062675;Raiffeisenbank;38
57063478;Volksbank Vallendar-Niederwerth;38
57064221;Volksbank Mülheim-Kärlich;38
57069067;Raiffeisenbank Lutzerather Höhe;38
ca. Zeile 2481
59052020;SKG BANK;D3
59070000;Deutsche Bank Saarbruecken;63
59070070;Deutsche Bank Privat und Geschäftskunden;63
59080090;Commerzbank vormals Dresdner Bank;76
59090626;apoBank;14
59090626;apoBank;A4
59090900;PSD Bank RheinNeckarSaar;91
59091000;Volksbank Völklingen-Warndt;06
59091500;Volksbank Sulzbachtal -alt-;06
59091800;Volksbank Quierschied -alt-;06
ca. Zeile 2531
60030000;Mercedes-Benz Bank;A3
60030100;Bankhaus Bauer, Stuttgart;10
60030200;Bankhaus Ellwanger & Geiger;10
60030600;CreditPlus Bank;09
60030666;CreditPlus Bank;09
60030700;AKTIVBANK;09
60030900;Isbank Fil Stuttgart;06
60033000;Wüstenrot Bausparkasse;09
60035810;IBM Deutschland Kreditbank;06
60038800;Düsseldorfer Hypothekenbank, Zndl Stuttgart;10
60040060;Commerzbank CC;09
60040061;Commerzbank CC;09
60040071;Commerzbank;13
60050000;Landesbank Baden-Württemberg;09
ca. Zeile 2614
60069706;Raiffeisenbank;10
60069710;Raiffeisenbank Gammesfeld;09
60069714;Raiffeisenbank Kocher-Jagst;10
60069716;Raiffeisenbank Nattheim -alt-;10
60069724;Raiffeisenbank Heroldstatt;10
60069724;Raiffeisenbank Heroldstatt -alt-;10
60069727;Raiffeisenbank;10
60069738;Volksbank Freiberg und Umgebung;10
60069766;Volks- und Raiffeisenbank Boll -alt-;10
60069773;Raiffeisenbank Kreßberg -alt-;10
ca. Zeile 2652
60080088;Commerzbank vormals Dresdner Bank, PCC DC-ITGK 5;09
60089450;Commerzbank vormals Dresdner Bank ITGK;09
60090100;Volksbank Stuttgart;10
60090300;Volksbank Zuffenhausen m Zndl Stammheimer VB;10
60090609;apoBank;14
60090609;apoBank;A4
60090700;Südwestbank;10
60090800;Sparda-Bank Baden-Württemberg;87
60090900;PSD Bank RheinNeckarSaar;91
60120050;UniCredit Bank - HypoVereinsbank Ndl 434 Stgt;99
ca. Zeile 2675
60270024;Deutsche Bank Privat und Geschäftskunden;63
60270073;Deutsche Bank;63
60290110;Volksbank Rems -alt-;10
60291120;Volksbank Backnang;10
60291410;Volksbank Schorndorf;10
60291510;Volksbank Winnenden;10
60300000;Bundesbank eh Sindelfingen;09
60320030;Baden-Württembergische Bank;65
60320291;UniCredit Bank - HypoVereinsbank;99
ca. Zeile 2810
63080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
63090100;Volksbank Ulm-Biberach;10
63091010;Ehinger Volksbank;10
63091200;Volksbank Blaubeuren;10
63091300;Volksbank Laichingen;10
63091300;Volksbank Laichinger Alb;10
63220090;UniCredit Bank - HypoVereinsbank;99
63240016;Commerzbank;13
63250030;Kreissparkasse Heidenheim;01
63290110;Heidenheimer Volksbank;10
ca. Zeile 2888
65093020;Volksbank Bad Saulgau;10
65110200;Internationales Bankhaus Bodensee;71
65120091;UniCredit Bank - HypoVereinsbank;99
65140072;Commerzbank;13
65150040;Spk -alt-;01
65161497;Genossenschaftsbank Meckenbeuren;10
65162832;Raiffeisenbank;10
65180005;Commerzbank vormals Dresdner Bank;76
65190110;Volksbank Friedrichshafen;10
ca. Zeile 2928
66020150;UniCredit Bank - HypoVereinsbank Ndl 145 Kruh;99
66020286;UniCredit Bank - HypoVereinsbank;99
66020500;Bank für Sozialwirtschaft;09
66030600;Isbank Fil Karlsruhe;06
66030610;ISBANK Mannheim;06
66040018;Commerzbank;13
66040026;Commerzbank/Kreditcenter Badenia;13
66050000;Landesbank Baden-Württemberg;09
66050101;Sparkasse Karlsruhe;00
66051220;Sparkasse Ettlingen;00
66050101;Sparkasse Karlsruhe Ettlingen;00
66051220;Sparkasse Ettlingen -alt-;00
66060000;DZ BANK;09
66060300;Spar- und Kreditbank;06
66060800;Evangelische Kreditgenossenschaft -Filiale Karlsruhe-;32
66061059;Volksbank Stutensee Hardt;06
66061059;Volksbank Stutensee Hardt -alt-;06
66061407;Spar- und Kreditbank;06
66061724;Volksbank Weingarten-Walzbachtal;06
66061724;Volksbank Stutensee-Weingarten;06
66062138;Spar- und Kreditbank Hardt;06
66062366;Raiffeisenbank Hardt-Bruhrain;06
66069103;Raiffeisenbank Elztal;06
66069104;Spar- und Kreditbank;06
ca. Zeile 2952
66069573;Raiffeisenbank Sexau -alt-;06
66070004;Deutsche Bank;63
66070024;Deutsche Bank Privat und Geschäftskunden;63
66080052;Commerzbank vormals Dresdner Bank;76
66090621;apoBank;14
66090621;apoBank;A4
66090800;BBBank;B3
66090900;PSD Bank Karlsruhe-Neustadt;91
66091200;Volksbank Ettlingen;06
66091500;Volksbank Neureut -alt-;06
ca. Zeile 2985
66400000;Bundesbank eh Offenburg;09
66420020;Baden-Württembergische Bank;65
66432700;Bankhaus J. Faißt;09
66440084;Commerzbank;13
66450050;Sparkasse Offenburg-Ortenau;03
66450050;Sparkasse Offenburg/Ortenau;03
66451346;Sparkasse Gengenbach;03
66451548;Sparkasse Haslach-Zell;03
66451862;Sparkasse Hanauerland;03
66452776;Sparkasse Wolfach;03
66470024;Deutsche Bank Privat und Geschäftskunden;63
66470035;Deutsche Bank;63
66490000;Volksbank Offenburg;06
66491800;Volksbank Bühl Fil Kehl;06
66492300;Renchtalbank -alt-;06
66492600;Volksbank Appenweier-Urloffen Appenweier -alt-;06
66492700;Volksbank Kinzigtal;06
66550070;Sparkasse Rastatt-Gernsbach;00
66551290;Sparkasse Gaggenau-Kuppenheim -alt-;00
ca. Zeile 3024
67010111;SEB;13
67020020;Baden-Württembergische Bank;65
67020190;UniCredit Bank - HypoVereinsbank;99
67020259;UniCredit Bank - HypoVereinsbank Ndl 681 Mnh;99
67020500;Oyak Anker Bank;09
67040031;Commerzbank;13
67040060;Commerzbank CC;09
67040061;Commerzbank CC;09
67050000;Landesbank Baden-Württemberg;09
67050101;Sparkasse Mannheim;00
67050505;Sparkasse Rhein Neckar Nord;06
67051203;Sparkasse Hockenheim;00
67052385;Bezirkssparkasse Weinheim;06
67060031;Volksbank Sandhofen;06
67070010;Deutsche Bank;63
67070024;Deutsche Bank Privat und Geschäftskunden;63
67080050;Commerzbank vormals Dresdner Bank;76
67080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 2;09
67080086;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 3;09
67089440;Commerzbank vormals Dresdner Bank ITGK;09
67090000;VR Bank Rhein-Neckar;06
67090617;apoBank;14
67091300;Volksbank Bezirk Schwetzingen -alt-;06
67090617;apoBank;A4
67091500;Volksbank Kurpfalz H+G Bank;06
67092300;Volksbank Weinheim;06
67210111;SEB;13
67220020;Baden-Württembergische Bank;65
ca. Zeile 3053
67230000;MLP Finanzdienstleistungen;92
67230001;MLP Finanzdienstleistungen Zw CS;92
67240039;Commerzbank;13
67250020;Sparkasse Heidelberg;06
67251918;Sparkasse Sinsheim -alt-;00
67261909;Raiffeisenbank Steinsberg -alt-;06
67262243;Raiffeisen Privatbank;06
67262402;Volksbank Schwarzbachtal -alt-;06
67262550;Volksbank Rot;06
ca. Zeile 3073
67352565;Sparkasse Tauberfranken;00
67362560;Volksbank Tauber -alt-;06
67390000;Volksbank Main-Tauber;06
67450048;Sparkasse Neckartal-Odenwald;00
67451475;Sparkasse Buchen-Walldürn -alt-;00
67451680;Sparkasse Osterburken -alt-;00
67460041;Volksbank Mosbach;06
67461424;Volksbank Franken;06
67461733;Volksbank Kirnau;06
67462368;Volksbank Limbach;06
ca. Zeile 3108
68080031;Commerzbank vormals Dresdner Bank Zw Münsterstraße;76
68080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
68080086;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 2;09
68090000;Volksbank Freiburg;06
68090622;apoBank;14
68090622;apoBank;A4
68090900;PSD Bank RheinNeckarSaar;91
68091900;Volksbank Müllheim;06
68092000;Volksbank Breisgau Nord;06
68092300;Volksbank Staufen;06
ca. Zeile 3175
70010080;Postbank (Giro);24
70010111;SEB;13
70010424;Aareal Bank;09
70010500;Deutsche Pfandbriefbank;09
70010555;Deutsche Pfandbriefbank - Einlagengeschäfte;01
70011100;Deutsche Kontor Privatbank;06
70011110;Deutsche Kontor Privatbank Sofort Bank;06
70011200;Bank Vontobel Europe;09
70011300;Autobank;16
ca. Zeile 3185
70011700;Bankhaus von der Heydt;01
70011900;InterCard;10
70011910;InterCard Cash Services 10;10
70011920;InterCard Cash Services 20;10
70012000;UniCredit Family Financing Bank Ndl Deutschland;09
70012000;UniCredit Family Financing Bank, Ndl der UniCredit;09
70012100;VEM Aktienbank;55
70012200;Bank Sarasin;06
70012300;V-Bank;17
70012500;Hypo Tirol Bank;50
70012600;Südtiroler Sparkasse Niederlassung München;06
70013000;European Bank for Fund Services;67
70013100;Payment Services Zndl der Bankverein Werther;09
70013100;Payment Services Zndl der Bankverein Werther;32
70013155;Payment Services Zndl der Bankverein Werther (Gf TRAXPAY);32
70013199;Payment Services Zndl der Bankverein Werther;32
70013500;Bankhaus Herzogpark;06
70015000;transact Elektronische Zahlungssysteme;09
70015015;transact Elektronische Zahlungssysteme;09
70015025;transact Elektronische Zahlungssysteme;09
70015035;transact Elektronische Zahlungssysteme;09
70020001;UniCredit Bank - HypoVereinsbank Ndl 645 M;95
70020270;UniCredit Bank - HypoVereinsbank;95
70020300;Commerz Finanz;09
70020500;Bank für Sozialwirtschaft;09
ca. Zeile 3206
70030014;Fürst Fugger Privatbank;00
70030111;Bankhaus Max Flessa;09
70030300;Bankhaus Reuschel & Co;09
70030400;Merck Finck & Co;10
70030800;Delbrück Bethmann Maffei;00
70030800;Bethmann Bank;D9
70031000;Bankhaus Ludwig Sperrer;00
70032500;St. Galler Kantonalbank Deutschland;09
70033100;Baader Bank;09
70035000;Allianz Bank (Zndl der Oldenburgische Landesbank);61
ca. Zeile 3217
70040060;Commerzbank Gf 860;09
70040061;Commerzbank Gf 861;09
70040062;Commerzbank CC;09
70040063;Commerzbank CC;09
70040070;Commerzbank, CC SP;09
70045050;Commerzbank Service-BZ;13
70050000;Bayerische Landesbank;09
70051003;Sparkasse Freising;00
70051540;Sparkasse Dachau;00
70051805;Kreissparkasse München Starnberg Ebersberg;00
70051995;Kreis- und Stadtsparkasse Erding-Dorfen;00
70052060;Sparkasse Landsberg-Dießen;00
70053070;Sparkasse Fürstenfeldbruck;00
70054080;Sparkasse Starnberg -alt-;00
70054306;Sparkasse Bad Tölz-Wolfratshausen;00
70070010;Deutsche Bank;63
70070024;Deutsche Bank Privat und Geschäftskunden;63
70080000;Commerzbank vormals Dresdner Bank;76
ca. Zeile 3241
70089472;Commerzbank vormals Dresdner Bank ITGK;09
70090100;Hausbank München;88
70090124;Hausbank München;10
70090500;Sparda-Bank München;81
70090606;apoBank;14
70090606;apoBank;A4
70091500;Volksbank Raiffeisenbank Dachau;88
70091600;Landsberg-Ammersee Bank;88
70091600;VR-Bank Landsberg-Ammersee;88
70091900;VR-Bank Erding;88
70093200;VR-Bank Starnberg-Herrsching-Landsberg;88
70093400;Volksbank Raiffeisenbank Ismaning;88
70110088;Postbank (Spar);09
ca. Zeile 3268
70166486;VR Bank München Land;88
70169132;Raiffeisenbank Griesstätt-Halfing;88
70169165;Raiffeisenbank Chiemgau-Nord - Obing;88
70169168;VR-Bank Chiemgau-Süd -alt-;88
70169179;Volksbank Siegsdorf-Bergen -alt-;88
70169186;Raiffeisenbank Pfaffenhofen a d Glonn;88
70169190;Raiffeisenbank Tattenh-Großkarolinenf;88
70169191;Raiffeisenbank Rupertiwinkel;88
70169195;Raiffeisenbank Trostberg-Traunreut;88
ca. Zeile 3354
71050000;Sparkasse Berchtesgadener Land;00
71051010;Kreissparkasse Altötting-Burghausen -alt-;00
71052050;Kreissparkasse Traunstein-Trostberg;00
71061009;VR meine Raiffeisenbank;88
71062194;Volksbank Raiffeisen Traunstein -alt-;88
71062802;Raiffeisenbank;88
71090000;Volksbank Raiffeisenbank Oberbayern Südost;88
71100000;Bundesbank eh Rosenheim;09
71120077;UniCredit Bank - HypoVereinsbank;99
ca. Zeile 3415
72069135;Raiffeisenbank Stauden;88
72069139;Raiffeisenbank Langweid-Achsheim -alt-;88
72069141;Raiffeisenbank -alt-;88
72069155;Raiffeisenbank Kissing-Mering;88
72069168;Vereinigte Raiffeisenbank in Niederraunau -alt-;88
72069179;Raiffeisenbank Unteres Zusamtal;88
72069181;Raiffeisenbank;88
72069193;Raiffeisenbank;88
72069209;Raiffeisenbank;88
ca. Zeile 3425
72069235;Raiffeisenbank;88
72069263;Raiffeisenbank Wittislingen;88
72069274;Raiffeisenbank Augsburger Land West;88
72069308;Raiffeisen-Volksbank Wemding;88
72069325;Raiffeisenbank Möttingen -alt-;88
72069329;Raiffeisen-Volksbank Ries;88
72069330;Raiffeisenbank Oberes Kesseltal -alt-;88
72069736;Raiffeisenbank Iller-Roth-Günz;88
72069789;Raiffeisenbank Pfaffenhausen;88
72070001;Deutsche Bank;63
72070024;Deutsche Bank Privat und Geschäftskunden;63
ca. Zeile 3452
72160818;Volksbank Raiffeisenbank Bayern Mitte;88
72169013;Raiffeisenbank Aresing-Hörzhausen-Schiltberg -alt-;88
72169080;Raiffeisenbank Aresing-Gerolsbach;88
72169111;Raiffeisenbank Hohenwart -alt-;88
72169218;Raiffeisenbank Schrobenhausen;88
72169218;Schrobenhausener Bank;88
72169246;Raiffeisenbank Schrobenhausener Land;88
72169380;Raiffeisenbank Beilngries;88
72169733;Raiffeisenbank Berg im Gau-Langenmosen -alt-;88
72169745;Raiffeisenbank Ehekirchen-Oberhausen;88
ca. Zeile 3467
72170024;Deutsche Bank Privat und Geschäftskunden;63
72180002;Commerzbank vormals Dresdner Bank;76
72191300;Volksbank Raiffeisenbank Eichstätt;88
72191600;Hallertauer Volksbank;88
72191800;Volksbank Schrobenhausen;88
72191800;Volksbank Schrobenhausen -alt-;88
72220074;UniCredit Bank - HypoVereinsbank;99
72223182;UniCredit Bank - HypoVereinsbank;99
72250000;Sparkasse Nördlingen;00
72250160;Sparkasse Donauwörth;00
ca. Zeile 3491
73190000;VR-Bank Memmingen;88
73191500;Volksbank Ulm-Biberach;10
73300000;Bundesbank eh Kempten;09
73311600;Vorarlberger Landes- und Hypothekenbank;09
73311800;UniCredit Bank Austria;09
73320073;UniCredit Bank - HypoVereinsbank;99
73320442;UniCredit Bank - HypoVereinsbank Ndl 669 Kpt;99
73321177;UniCredit Bank - HypoVereinsbank;99
73322380;UniCredit Bank - HypoVereinsbank;99
ca. Zeile 3604
74366666;Raiffeisenbank Geisenhausen;88
74369068;Raiffeisenbank Hofkirchen-Bayerbach;88
74369088;Raiffeisenbank Geiselhöring-Pfaffenberg;88
74369091;Raiffeisenbank Straubing;88
74369130;Raiffeisenbank;88
74369130;Raiffeisenbank Parkstetten;88
74369146;Raiffeisenbank Rattiszell-Konzell;88
74369656;Raiffeisenbank Essenbach;88
74369662;Raiffeisenbank Buch-Eching;88
74369704;Raiffeisenbank Mengkofen-Loiching;88
ca. Zeile 3651
75080003;Commerzbank vormals Dresdner Bank;76
75090000;Volksbank Regensburg;88
75090300;LIGA Bank;88
75090500;Sparda-Bank Ostbayern;84
75090629;apoBank;14
75090629;apoBank;A4
75090900;PSD Bank Niederbayern-Oberpfalz;91
75091400;VR Bank Burglengenfeld;88
75220070;UniCredit Bank - HypoVereinsbank;99
75240000;Commerzbank;13
ca. Zeile 3693
76060561;ACREDOBANK;88
76060618;Volksbank Raiffeisenbank;88
76061025;Raiffeisen Spar+Kreditbank Lauf a d Pegnitz;88
76061482;Raiffeisenbank Hersbruck;88
76069359;Raiffeisenbank;88
76069359;Raiffeisenbank am Rothsee;88
76069369;Raiffeisenbank Auerbach-Freihung;88
76069372;Raiffeisenbank Bad Windsheim;88
76069378;Raiffeisenbank;88
76069404;Raiffeisenbank Uehlfeld-Dachsbach;88
ca. Zeile 3737
76089482;Commerzbank vormals Dresdner Bank ITGK;09
76090300;Bäcker-Bank Nürnberg;88
76090400;Evenord-Bank;88
76090500;Sparda-Bank Nürnberg;81
76090613;apoBank;14
76090613;apoBank;A4
76090900;PSD Bank;91
76091000;Sparda-Bank Nürnberg Zw Sonnenstraße;81
76211900;CVW - Privatbank;88
76220073;UniCredit Bank - HypoVereinsbank;99
ca. Zeile 3777
77050000;Sparkasse Bamberg;00
77060100;VR Bank Bamberg Raiffeisen-Volksbank;88
77061004;Raiffeisenbank Obermain Nord;88
77061425;Raiffeisen-Volksbank;88
77062014;Raiffeisenbank;88
77062014;Raiffeisenbank Burgebrach-Stegaurach;88
77062139;Raiffeisen-Volksbank Bad Staffelstein;88
77063048;Raiffeisenbank Hallstadt -alt-;88
77065141;Raiffeisenbank Stegaurach;88
77065141;Raiffeisenbank Stegaurach -alt-;88
77069042;Raiffeisenbank Gößweinstein -alt-;88
77069044;Raiffeisenbank Küps-Mitwitz-Stockheim;88
77069051;Raiffeisenbank;88
77069052;Raiffeisenbank;88
ca. Zeile 3797
77069764;Raiffeisenbank Kemnather Land - Steinwald;88
77069782;Raiffeisenbank am Kulm;88
77069836;Raiffeisenbank Berg-Bad Steben;88
77069868;Raiffeisenbank Oberland;88
77069870;Raiffeisenbank Frankenwald Ost-Oberkotzau;88
77069870;Raiffeisenbank Hochfranken West;88
77069879;Raiffeisenbank -alt-;88
77069893;Raiffeisenbank -alt-;88
77069906;Raiffeisenbank Wüstenselbitz;88
77069908;Raiffeisenbank Sparneck-Stammbach-Zell;88
77069908;Raiffeisenbank Sparneck-Stammbach-Zell -alt-;88
77091800;Raiffeisen-Volksbank Lichtenfels-Itzgrund;88
77120073;UniCredit Bank - HypoVereinsbank;99
77140061;Commerzbank;13
77150000;Sparkasse Kulmbach-Kronach;00
77151640;Sparkasse Kronach-Ludwigsstadt -alt-;00
77190000;Kulmbacher Bank;88
77300000;Bundesbank;09
77320072;UniCredit Bank - HypoVereinsbank;99
77322200;Fondsdepot Bank;00
ca. Zeile 3818
77363749;Raiffeisenbank;88
77365792;Raiffeisenbank Hollfeld-Waischenfeld-Aufseß;88
77390000;Volksbank-Raiffeisenbank Bayreuth;88
77390500;Sparda-Bank Nürnberg;81
77390628;apoBank;14
77390628;apoBank;A4
78000000;Bundesbank eh Hof;09
78020070;UniCredit Bank - HypoVereinsbank;99
78020429;UniCredit Bank - HypoVereinsbank Ndl 128 Hof;99
78030080;Archon Capital Bank Deutschland;01
ca. Zeile 3848
79030001;Fürstlich Castellsche Bank Credit-Casse;09
79032038;Bank Schilling & Co;00
79040047;Commerzbank Würzburg;13
79050000;Sparkasse Mainfranken Würzburg;00
79061000;Raiffeisenbank;88
79061000;Raiffeisenbank-alt-;88
79061153;Raiffeisenbank Lohr, Main -alt-;88
79062106;Raiffeisenbank;88
79063060;Raiffeisenbank Estenfeld-Bergtheim;88
79063122;Raiffeisenbank Höchberg;88
ca. Zeile 3859
79066082;Raiffeisenbank;88
79069001;Raiffeisenbank Volkach-Wiesentheid;88
79069010;VR-Bank Schweinfurt;88
79069031;Raiffeisenbank Bütthard-Gaukönigshofen;88
79069078;Raiffeisenbank Geiselwind -alt-;88
79069090;Raiffeisenbank Ulsenheim-Gollhofen -alt-;88
79069145;Raiffeisenbank Kreuzwertheim-Hasloch -alt-;88
79069150;Raiffeisenbank Main-Spessart;88
79069165;Genobank Rhön-Grabfeld;88
ca. Zeile 3874
79070024;Deutsche Bank Privat und Geschäftskunden;63
79080052;Commerzbank vormals Dresdner Bank;76
79080085;Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 1;09
79090000;Volksbank Raiffeisenbank;88
79090624;apoBank;14
79090624;apoBank;A4
79161058;Raiffeisenbank Fränkisches Weinland;88
79161499;Raiffeisenbank Kitzinger Land;88
79190000;VR Bank Kitzingen;88
79300000;Bundesbank eh Schweinfurt;09
ca. Zeile 3952
80550200;Kreissparkasse Anhalt-Zerbst -alt-;20
81000000;Bundesbank;09
81010111;SEB;13
81020500;Bank für Sozialwirtschaft;09
81020886;UniCredit Bank - HypoVereinsbank (ehem. Hypo);99
81040000;Commerzbank;13
81050000;Kreissparkasse Aschersleben-Staßfurt -alt-;20
81050555;Kreissparkasse Stendal;20
81051000;Bördesparkasse Oschersleben -alt-;20
ca. Zeile 4022
83094444;Raiffeisen-Volksbank Saale-Orla;32
83094454;Volksbank Saaletal;06
83094494;Volksbank Eisenberg;32
83094495;EthikBank, Zndl der Volksbank Eisenberg;32
83095424;Volksbank Altenburg -alt-;06
84000000;Bundesbank;09
84020086;UniCredit Bank - HypoVereinsbank;99
84020087;UniCredit Bank - HypoVereinsbank;99
84030111;Bankhaus Max Flessa;09
ca. Zeile 4050
85040061;Commerzbank CC;09
85050100;Sparkasse Oberlausitz-Niederschlesien;20
85050200;Kreissparkasse Riesa-Großenhain -alt-;20
85050300;Ostsächsische Sparkasse Dresden;20
85050350;Ostsächsische Sparkasse Dresden Gf OSD.Net;20
85055000;Sparkasse Meißen;20
85060000;Volksbank Pirna;32
85065028;Raiffeisenbank Neustadt, Sachs -alt-;32
85080000;Commerzbank vormals Dresdner Bank;76
includes/functions/sessions.phpTop ca. Zeile 14
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
if (!defined('SESSION_LIFE_ADMIN')) {
define('SESSION_LIFE_ADMIN', '7200'); //120 Minuten
}
@ini_set("session.gc_maxlifetime", 1440);
@ini_set("session.gc_probability", 100);
if (STORE_SESSIONS == 'mysql') {
ca. Zeile 44
function _sess_write($key, $val) {
global $SESS_LIFE;
$expiry = time() + $SESS_LIFE;
$variables = array();
$a = preg_split( "/(\w+)\|/", $val, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
for( $i = 0; $i < count( $a ); $i = $i+2 ) {
$variables[$a[$i]] = unserialize( $a[$i+1] );
}
if (isset($variables['customers_status']['customers_status_id']) && $variables['customers_status']['customers_status_id'] == 0) {
$SESS_LIFE = (int)SESSION_LIFE_ADMIN;
}
$expiry = time() + (int)$SESS_LIFE;
$value = addslashes($val);
$qid = xtc_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . $key . "'");
$total = xtc_db_fetch_array($qid);
ca. Zeile 69
return true;
}
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
register_shutdown_function('session_write_close');
}
function xtc_session_start() {
return session_start();
}
// BOF - Hetfield - 2009-08-19 - removed deprecated function session_register to be ready for PHP >= 5.3
/*
function xtc_session_register($variable) {
global $session_started;
if ($session_started == true) {
return session_register($variable);
function xtc_session_register($variable) {
if (!isset($_SESSION[$variable])) {
$_SESSION[$variable] = $$variable;
return true;
}
}
*/
// EOF - Hetfield - 2009-08-19 - removed deprecated function session_register to be ready for PHP >= 5.3
// BOF -Hetfield - 2009-08-19 - removed deprecated function session_is_registered to be ready for PHP >= 5.3
//BOF NEEDED FOR NON MODIFIED TEMPLATES
function xtc_session_is_registered($variable) {
//return session_is_registered($variable);
return isset($_SESSION[$variable]);
}
//EOF NEEDED FOR NON MODIFIED TEMPLATES
// EOF - Hetfield - 2009-08-19 - removed deprecated function session_is_registered to be ready for PHP >= 5.3
// BOF - Hetfield - 2009-08-19 - removed deprecated function session_unregister to be ready for PHP >= 5.3
/*
function xtc_session_unregister($variable) {
return session_unregister($variable);
unset($_SESSION[$variable]);
return true;
}
*/
// EOF -Hetfield - 2009-08-19 - removed deprecated function session_unregister to be ready for PHP >= 5.3
function xtc_session_id($sessid = '') {
if (!empty($sessid)) {
return session_id($sessid);
} else {
ca. Zeile 146
xtc_session_destroy();
if (STORE_SESSIONS == 'mysql') {
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
register_shutdown_function('session_write_close');
}
xtc_session_start();
$_SESSION = $session_backup;
unset($session_backup);
}
?>
includes/header.phpTop ca. Zeile 33
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<?php include(DIR_WS_MODULES.FILENAME_METATAGS); ?>
<?php include(DIR_WS_MODULES.FILENAME_METATAGS); //FIX cache problems with Firefox 12 ?>
<link rel="shortcut icon" href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/favicon.ico';?>" type="image/x-icon" />
<?php
/*
includes/modules/default.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: default.php 1292 2005-10-07 16:10:55Z mz $
$Id: default.php 2774 2012-04-20 18:30:22Z web28 $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright © 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
© 2000-2001 The Exchange Project (earlier name of osCommerce)
© 2002-2003 osCommerce(default.php,v 1.84 2003/05/07); www.oscommerce.com
© 2003 nextcommerce (default.php,v 1.11 2003/08/22); www.nextcommerce.org
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(default.php,v 1.84 2003/05/07); www.oscommerce.com
(c) 2003 nextcommerce (default.php,v 1.11 2003/08/22); www.nextcommerce.org
(c) 2006 xt:Commerce (cross_selling.php 1243 2005-09-25); www.xt-commerce.de
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contributions:
Enable_Disable_Categories 1.3 Autor: Mikel Williams | mikel@ladykatcostumes.com
Customers Status v3.x © 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs...by=date#dirlist
Customers Status v3.x (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/
| CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs...by=date#dirlist
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$default_smarty = new smarty;
$default_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
$default_smarty->assign('session', session_id());
// define defaults
$main_content = '';
$group_check = '';
$fsk_lock = '';
// include needed functions
require_once (DIR_FS_INC.'xtc_customer_greeting.inc.php');
require_once (DIR_FS_INC.'xtc_get_path.inc.php');
require_once (DIR_FS_INC.'xtc_check_categories_status.inc.php');
//BOF - Dokuman - 2009-10-02 - removed feature, due to wrong links in category on "last viewed"
//$_SESSION['lastpath'] = $_GET['cPath'];
//EOF - Dokuman - 2009-10-02 - removed feature, due to wrong links in category on "last viewed"
// check categorie exist
if (xtc_check_categories_status($current_category_id) >= 1) {
$error = CATEGORIE_NOT_FOUND;
include (DIR_WS_MODULES.FILENAME_ERROR_HANDLER);
return;
}
} else {
/**
* list of categories
*
*/
if ($category_depth == 'nested') {
if (GROUP_CHECK == 'true') {
$group_check = "and c.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
$group_check = "AND c.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
$category_query = "select cd.categories_description,
$category_query = "-- /includes/modules/default.php
SELECT c.categories_image,
c.categories_template,
cd.categories_name,
cd.categories_heading_title,
c.categories_template,
c.categories_image from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd
where c.categories_id = '".$current_category_id."'
and cd.categories_id = '".$current_category_id."'
cd.categories_description
FROM ".TABLE_CATEGORIES." c
JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd on cd.categories_id = c.categories_id
WHERE c.categories_id = '".$current_category_id."'
".$group_check."
and cd.language_id = '".(int) $_SESSION['languages_id']."'";
AND cd.language_id = '".(int) $_SESSION['languages_id']."'";
$category_query = xtDBquery($category_query);
$category = xtc_db_fetch_array($category_query, true);
if (isset ($cPath) && preg_match('/_/', $cPath)) { // Hetfield - 2009-08-19 - replaced deprecated function ereg with preg_match to be ready for PHP >= 5.3
if (MAX_DISPLAY_CATEGORIES_PER_ROW > 0) {
// check to see if there are deeper categories within the current category
$category_links = array_reverse($cPath_array);
for ($i = 0, $n = sizeof($category_links); $i < $n; $i ++) {
if (GROUP_CHECK == 'true') {
$group_check = "and c.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
$categories_query = "select cd.categories_description,
c.categories_id,
cd.categories_name,
cd.categories_heading_title,
$categories_query = "-- /includes/modules/default.php
SELECT c.categories_id,
c.categories_image,
c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd
where c.categories_status = '1'
and c.parent_id = '".$category_links[$i]."'
and c.categories_id = cd.categories_id
".$group_check."
and cd.language_id = '".(int) $_SESSION['languages_id']."'
order by sort_order, cd.categories_name";
$categories_query = xtDBquery($categories_query);
// BOF - Dokuman - 22.07.2009 - avoid else-condition
/*
if (xtc_db_num_rows($categories_query, true) < 1) {
// do nothing, go through the loop
} else {
break; // we've found the deepest category the customer is in
}
*/
if ( xtc_db_num_rows($categories_query, true) >= 1 ) {
break; // we've found the deepest category the customer is in
}
// EOF - Dokuman - 22.07.2009 - avoid else-condition
}
} else {
if (GROUP_CHECK == 'true') {
$group_check = "and c.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
$categories_query = "select cd.categories_description,
c.categories_id,
c.parent_id,
cd.categories_name,
cd.categories_heading_title,
c.categories_image,
c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd
where c.categories_status = '1'
and c.parent_id = '".$current_category_id."'
and c.categories_id = cd.categories_id
".$group_check."
and cd.language_id = '".(int) $_SESSION['languages_id']."'
order by sort_order, cd.categories_name";
cd.categories_description
FROM ".TABLE_CATEGORIES." c
JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd on cd.categories_id = c.categories_id
WHERE c.categories_status = '1'
".$group_check."
AND c.parent_id = '".$current_category_id."'
AND cd.language_id = '".(int) $_SESSION['languages_id']."'
ORDER BY sort_order, cd.categories_name";
$categories_query = xtDBquery($categories_query);
}
$rows = 0;
$categories_content = array();
while ($categories = xtc_db_fetch_array($categories_query, true)) {
$rows ++;
$cPath_new = xtc_category_link($categories['categories_id'],$categories['categories_name']);
$width = (int) (100 / MAX_DISPLAY_CATEGORIES_PER_ROW).'%';
$image = '';
if ($categories['categories_image'] != '') {
$image = DIR_WS_IMAGES.'categories/'.$categories['categories_image'];
// BOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
if(!file_exists($image)) $image = DIR_WS_IMAGES.'categories/noimage.gif';
// EOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
$image = $image;
}
$categories_content[] = array ('CATEGORIES_NAME' => $categories['categories_name'],
'CATEGORIES_HEADING_TITLE' => $categories['categories_heading_title'],
'CATEGORIES_IMAGE' => $image,
'CATEGORIES_LINK' => xtc_href_link(FILENAME_DEFAULT, $cPath_new),
ca. Zeile 133
'CATEGORIES_IMAGE' => $image,
'CATEGORIES_LINK' => xtc_href_link(FILENAME_DEFAULT, $cPath_new),
'CATEGORIES_DESCRIPTION' => $categories['categories_description']);
}
}
$new_products_category_id = $current_category_id;
include (DIR_WS_MODULES.FILENAME_NEW_PRODUCTS);
$image = '';
if ($category['categories_image'] != '') {
$image = DIR_WS_IMAGES.'categories/'.$category['categories_image'];
if(!file_exists($image)) $image = DIR_WS_IMAGES.'categories/noimage.gif';
$image = $image;
}
$default_smarty->assign('CATEGORIES_NAME', $category['categories_name']);
$default_smarty->assign('CATEGORIES_HEADING_TITLE', $category['categories_heading_title']);
$default_smarty->assign('CATEGORIES_IMAGE', $image);
$default_smarty->assign('CATEGORIES_DESCRIPTION', $category['categories_description']);
$default_smarty->assign('language', $_SESSION['language']);
$default_smarty->assign('module_content', $categories_content);
// get default template
if ($category['categories_template'] == '' || $category['categories_template'] == 'default') {
$files = array ();
if ($dir = opendir(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/categorie_listing/')) {
$cl_dir = DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/categorie_listing/';
if ($dir = opendir($cl_dir)) {
while (($file = readdir($dir)) !== false) {
// BOF - Tomcraft - 2010-02-04 - Prevent xtcModified from fetching other files than *.html
//if (is_file(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/categorie_listing/'.$file) and ($file != "index.html") and (substr($file, 0, 1) !=".")) {
if (is_file(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/categorie_listing/'.$file) and (substr($file, -5) == ".html") and ($file != "index.html") and (substr($file, 0, 1) !=".")) {
// EOF - Tomcraft - 2010-02-04 - Prevent xtcModified from fetching other files than *.html
// BOF - web28 - 2010-07-12 - sort templates array
//$files[] = array ('id' => $file, 'text' => $file);
if (is_file($cl_dir.$file) && (substr($file, 0, 1) != '.') && (substr($file, -5) == '.html') && ($file != 'index.html')) {
$files[] = $file;
} //if
} // while
}
}
closedir($dir);
}
sort($files);
//$category['categories_template'] = $files[0]['id'];
$category['categories_template'] = $files[0];
// EOF - web28 - 2010-07-12 - sort templates array
}
$max_per_row = MAX_DISPLAY_CATEGORIES_PER_ROW;
$width = $max_per_row ? intval(100 / $max_per_row).'%' : '';
$default_smarty->assign('TR_COLS', $max_per_row);
$default_smarty->assign('TD_WIDTH', $width);
$default_smarty->assign('CATEGORIES_NAME', $category['categories_name']);
$default_smarty->assign('CATEGORIES_HEADING_TITLE', $category['categories_heading_title']);
$default_smarty->assign('CATEGORIES_IMAGE', $image);
$default_smarty->assign('CATEGORIES_DESCRIPTION', $category['categories_description']);
$default_smarty->assign('language', $_SESSION['language']);
$default_smarty->assign('module_content', $categories_content);
$default_smarty->caching = 0;
$main_content = $default_smarty->fetch(CURRENT_TEMPLATE.'/module/categorie_listing/'.$category['categories_template']);
$smarty->assign('main_content', $main_content);
}
//elseif ($category_depth == 'products' || $_GET['manufacturers_id']) {
elseif ($category_depth == 'products' || (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0)) { //DokuMan - 2010-02-26 - Undefined index: manufacturers_id
/**
* list of products
*
*/
} elseif ($category_depth == 'products' || (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0)) {
$select = '';
$from = '';
$where = '';
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
$fsk_lock = ' and p.products_fsk18!=1';
$fsk_lock = ' AND p.products_fsk18!=1';
}
// group check
if (GROUP_CHECK == 'true') {
$group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
// show the products of a specified manufacturer
if (isset ($_GET['manufacturers_id'])) {
if (isset ($_GET['filter_id']) && xtc_not_null($_GET['filter_id'])) {
// sorting query
$sorting_query = xtDBquery("SELECT products_sorting,
if (isset($_GET['manufacturers_id']) && isset($_GET['filter_id'])) {
$categories_id = (int)$_GET['filter_id'];
} else {
$categories_id = $current_category_id;
}
$sorting_query = xtDBquery("-- /includes/modules/default.php
SELECT products_sorting,
products_sorting2
FROM ".TABLE_CATEGORIES."
where categories_id='".(int) $_GET['filter_id']."'");
WHERE categories_id='".$categories_id ."'");
$sorting_data = xtc_db_fetch_array($sorting_query,true);
if (!$sorting_data['products_sorting'])
if (empty($sorting_data['products_sorting'])) { //Fallback für products_sorting auf products_name
$sorting_data['products_sorting'] = 'pd.products_name';
$sorting = ' ORDER BY '.$sorting_data['products_sorting'].' '.$sorting_data['products_sorting2'].' ';
// We are asked to show only a specific category
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
if (empty($sorting_data['products_sorting2'])) { //Fallback für products_sorting2 auf ascending
$sorting_data['products_sorting2'] = 'ASC';
}
$sorting = ' ORDER BY '.$sorting_data['products_sorting'].' '.$sorting_data['products_sorting2'].' ';
//BOF - DokuMan - remove unnecessary "left join ".TABLE_SPECIALS." from SELECT
/*
$listing_sql = "select DISTINCT p.products_fsk18,
p.products_shippingtime,
p.products_model,
pd.products_name,
p.products_ean,
p.products_price,
p.products_tax_class_id,
m.manufacturers_name,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.products_id,
p.manufacturers_id,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_MANUFACTURERS." m, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_PRODUCTS." p left join ".TABLE_SPECIALS." s on p.products_id = s.products_id
where p.products_status = '1'
and p.manufacturers_id = m.manufacturers_id
and m.manufacturers_id = '".(int) $_GET['manufacturers_id']."'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p2c.categories_id = '".(int) $_GET['filter_id']."'".$sorting;
*/
$listing_sql = "select DISTINCT p.products_fsk18,
p.products_shippingtime,
p.products_model,
pd.products_name,
p.products_ean,
p.products_price,
p.products_tax_class_id,
m.manufacturers_name,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.products_id,
p.manufacturers_id,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_MANUFACTURERS." m, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_PRODUCTS." p
where p.products_status = '1'
and p.manufacturers_id = m.manufacturers_id
and m.manufacturers_id = '".(int) $_GET['manufacturers_id']."'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p2c.categories_id = '".(int) $_GET['filter_id']."'".$sorting;
//EOF - DokuMan - remove unneeded "left join ".TABLE_SPECIALS." from SELECT
if (isset($_GET['manufacturers_id'])) {
// show the products of a specified manufacturer
$select .= "m.manufacturers_name, ";
$from .= "LEFT JOIN ".TABLE_MANUFACTURERS." m on p.manufacturers_id = m.manufacturers_id ";
$where .= " AND m.manufacturers_id = '".(int) $_GET['manufacturers_id']."' ";
if (isset($_GET['filter_id']) && xtc_not_null($_GET['filter_id'])) {
// We are asked to show only a specific category
$from .= "JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." p2c on p2c.products_id = pd.products_id ";
$where .= "AND p2c.categories_id = '".(int)$_GET['filter_id']."' ";
} else {
// We show them all
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
//BOF - DokuMan - remove unnecessary "left join ".TABLE_SPECIALS." from SELECT
/*
$listing_sql = "select p.products_fsk18,
p.products_shippingtime,
p.products_model,
p.products_ean,
pd.products_name,
p.products_id,
p.products_price,
m.manufacturers_name,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.manufacturers_id,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_MANUFACTURERS." m, ".TABLE_PRODUCTS." p left join ".TABLE_SPECIALS." s on p.products_id = s.products_id
where p.products_status = '1'
and pd.products_id = p.products_id
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p.manufacturers_id = m.manufacturers_id
and m.manufacturers_id = '".(int) $_GET['manufacturers_id']."'";
*/
$listing_sql = "select p.products_fsk18,
p.products_shippingtime,
p.products_model,
p.products_ean,
pd.products_name,
p.products_id,
p.products_price,
m.manufacturers_name,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.manufacturers_id,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_MANUFACTURERS." m, ".TABLE_PRODUCTS." p
where p.products_status = '1'
and pd.products_id = p.products_id
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p.manufacturers_id = m.manufacturers_id
and m.manufacturers_id = '".(int) $_GET['manufacturers_id']."'";
//EOF - DokuMan - remove unnecessary "left join ".TABLE_SPECIALS." from SELECT
}
} else {
// show the products in a given categorie
$from .= "JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." p2c on p2c.products_id = pd.products_id ";
$where .= "AND p2c.categories_id = '".$current_category_id."' ";
if (isset ($_GET['filter_id']) && xtc_not_null($_GET['filter_id'])) {
// sorting query
$sorting_query = xtDBquery("SELECT products_sorting,
products_sorting2 FROM ".TABLE_CATEGORIES."
where categories_id='".$current_category_id."'");
$sorting_data = xtc_db_fetch_array($sorting_query,true);
if (!$sorting_data['products_sorting'])
$sorting_data['products_sorting'] = 'pd.products_name';
$sorting = ' ORDER BY '.$sorting_data['products_sorting'].' '.$sorting_data['products_sorting2'].' ';
// We are asked to show only specific catgeory
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
$select .= "m.manufacturers_name, ";
$from .= "LEFT JOIN ".TABLE_MANUFACTURERS." m on p.manufacturers_id = m.manufacturers_id ";
$where .= "AND m.manufacturers_id = '".(int)$_GET['filter_id']."' ";
} else {
// We show them all
}
}
//BOF - DokuMan - remove unnecessary "left join ".TABLE_SPECIALS." from SELECT
/*
$listing_sql = "select p.products_fsk18,
p.products_shippingtime,
p.products_model,
p.products_ean,
pd.products_name,
$listing_sql = "-- /includes/modules/default.php
SELECT ".$select."
p.products_id,
m.manufacturers_name,
p.products_ean,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.manufacturers_id,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_MANUFACTURERS." m, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_PRODUCTS." p left join ".TABLE_SPECIALS." s on p.products_id = s.products_id
where p.products_status = '1'
and p.manufacturers_id = m.manufacturers_id
and m.manufacturers_id = '".(int) $_GET['filter_id']."'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p2c.categories_id = '".$current_category_id."'".$sorting;
*/
$listing_sql = "select p.products_fsk18,
p.products_shippingtime,
p.products_model,
p.products_ean,
pd.products_name,
p.products_id,
m.manufacturers_name,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.manufacturers_id,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_MANUFACTURERS." m, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_PRODUCTS." p
where p.products_status = '1'
and p.manufacturers_id = m.manufacturers_id
and m.manufacturers_id = '".(int) $_GET['filter_id']."'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p2c.categories_id = '".$current_category_id."'".$sorting;
//EOF - DokuMan - remove unnecessary "left join ".TABLE_SPECIALS." from SELECT
} else {
// sorting query
$sorting_query = xtDBquery("SELECT products_sorting,
products_sorting2 FROM ".TABLE_CATEGORIES."
where categories_id='".$current_category_id."'");
$sorting_data = xtc_db_fetch_array($sorting_query,true);
if (!$sorting_data['products_sorting'])
$sorting_data['products_sorting'] = 'pd.products_name';
$sorting = ' ORDER BY '.$sorting_data['products_sorting'].' '.$sorting_data['products_sorting2'].' ';
// We show them all
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
//BOF - DokuMan - remove unnecessary "left join ".TABLE_SPECIALS." from SELECT
/*
$listing_sql = "select p.products_fsk18,
p.products_shippingtime,
p.products_model,
p.products_ean,
pd.products_name,
m.manufacturers_name,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.products_id,
p.products_tax_class_id,
p.manufacturers_id,
p.products_price,
p.products_fsk18,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_PRODUCTS." p left join ".TABLE_MANUFACTURERS." m on p.manufacturers_id = m.manufacturers_id
left join ".TABLE_SPECIALS." s on p.products_id = s.products_id
where p.products_status = '1'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p2c.categories_id = '".$current_category_id."'".$sorting;
*/
$listing_sql = "select p.products_fsk18,
p.products_shippingtime,
p.products_model,
p.products_ean,
pd.products_name,
m.manufacturers_name,
p.products_quantity,
p.products_image,
p.products_weight,
pd.products_short_description,
pd.products_description,
p.products_id,
p.manufacturers_id,
p.products_price,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
p.products_discount_allowed,
p.products_tax_class_id
from ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_PRODUCTS." p left join ".TABLE_MANUFACTURERS." m on p.manufacturers_id = m.manufacturers_id
where p.products_status = '1'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
pd.products_short_description
FROM ".TABLE_PRODUCTS_DESCRIPTION." pd
JOIN ".TABLE_PRODUCTS." p
".$from."
WHERE p.products_status = '1'
AND p.products_id = pd.products_id
AND pd.language_id = '".(int) $_SESSION['languages_id']."'
".$group_check."
".$fsk_lock."
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and p2c.categories_id = '".$current_category_id."'".$sorting;
".$where."
".$sorting;
//EOF - DokuMan - remove unnecessary "left join ".TABLE_SPECIALS." from SELECT
}
}
// optional Product List Filter
// BOF - DokuMan - 2010-07-07 - change PRODUCT_FILTER_LIST to true/false
//if (PRODUCT_LIST_FILTER > 0) {
if (PRODUCT_LIST_FILTER == 'true') {
// EOF - DokuMan - 2010-07-07 - change PRODUCT_FILTER_LIST to true/false
if (isset ($_GET['manufacturers_id'])) {
$filterlist_sql = "select distinct c.categories_id as id,
cd.categories_name as name from ".TABLE_PRODUCTS." p,
".TABLE_PRODUCTS_TO_CATEGORIES." p2c, ".TABLE_CATEGORIES." c,
".TABLE_CATEGORIES_DESCRIPTION." cd
where p.products_status = '1'
and p.products_id = p2c.products_id
and p2c.categories_id = c.categories_id
and p2c.categories_id = cd.categories_id
and cd.language_id = '".(int) $_SESSION['languages_id']."'
and p.manufacturers_id = '".(int) $_GET['manufacturers_id']."'
order by cd.categories_name";
$filterlist_sql = "-- /includes/modules/default.php
SELECT distinct c.categories_id as id,
cd.categories_name as name
FROM ".TABLE_PRODUCTS." p
JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." p2c on p2c.products_id = p.products_id
JOIN ".TABLE_CATEGORIES." c on c.categories_id = p2c.categories_id
JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd on cd.categories_id = p2c.categories_id
WHERE p.products_status = '1'
AND cd.language_id = '".(int) $_SESSION['languages_id']."'
AND p.manufacturers_id = '".(int) $_GET['manufacturers_id']."'
ORDER BY cd.categories_name";
} else {
$filterlist_sql = "select distinct m.manufacturers_id as id,
$filterlist_sql = "-- /includes/modules/default.php
SELECT distinct m.manufacturers_id as id,
m.manufacturers_name as name
from ".TABLE_PRODUCTS." p,
".TABLE_PRODUCTS_TO_CATEGORIES." p2c,
".TABLE_MANUFACTURERS." m
where p.products_status = '1'
and p.manufacturers_id = m.manufacturers_id
and p.products_id = p2c.products_id
and p2c.categories_id = '".$current_category_id."'
order by m.manufacturers_name";
FROM ".TABLE_PRODUCTS." p
JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." p2c on p2c.products_id = p.products_id
JOIN ".TABLE_MANUFACTURERS." m on m.manufacturers_id = p.manufacturers_id
WHERE p.products_status = '1'
AND p2c.categories_id = '".$current_category_id."'
ORDER BY m.manufacturers_name";
}
$filterlist_query = xtDBquery($filterlist_sql);
if (xtc_db_num_rows($filterlist_query, true) > 1) {
$manufacturer_dropdown = xtc_draw_form('filter', FILENAME_DEFAULT, 'get');
$manufacturer_dropdown = xtc_draw_form('filter', DIR_WS_CATALOG . FILENAME_DEFAULT, 'get');
if (isset ($_GET['manufacturers_id'])) {
$manufacturer_dropdown .= xtc_draw_hidden_field('manufacturers_id', (int)$_GET['manufacturers_id']);
$options = array (array ('text' => TEXT_ALL_CATEGORIES));
$options = array (array ('id' => '', 'text' => TEXT_ALL_CATEGORIES)); // DokuMan - 2012-03-27 - added missing "id" for xtc_draw_pull_down_menu
} else {
$manufacturer_dropdown .= xtc_draw_hidden_field('cat', $current_category_id);
$options = array (array ('text' => TEXT_ALL_MANUFACTURERS));
$options = array (array ('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); // DokuMan - 2012-03-27 - added missing "id" for xtc_draw_pull_down_menu
}
$manufacturer_dropdown .= xtc_draw_hidden_field('sort', $_GET['sort']);
$manufacturer_dropdown .= xtc_draw_hidden_field('sort', isset($_GET['sort']) ? $_GET['sort'] : '');
$manufacturer_dropdown .= xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
while ($filterlist = xtc_db_fetch_array($filterlist_query, true)) {
$options[] = array ('id' => $filterlist['id'], 'text' => $filterlist['name']);
}
$manufacturer_dropdown .= xtc_draw_pull_down_menu('filter_id', $options, $_GET['filter_id'], 'onchange="this.form.submit()"');
$manufacturer_dropdown .= xtc_draw_pull_down_menu('filter_id', $options, isset($_GET['filter_id']) ? (int)$_GET['filter_id'] : '', 'onchange="this.form.submit()"');
$manufacturer_dropdown .= '<noscript><input type="submit" value="'.SMALL_IMAGE_BUTTON_VIEW.'" id="filter_submit" /></noscript>';
$manufacturer_dropdown .= '</form>'."\n";
}
}
// Get the right image for the top-right
//BOF - web28 - 2010-08-06 - BUGFIX no manufacturers image displayed -> modules/product_listing.php
/*
$image = DIR_WS_IMAGES.'table_background_list.gif';
if (isset ($_GET['manufacturers_id'])) {
$image = xtDBquery("select manufacturers_image from ".TABLE_MANUFACTURERS." where manufacturers_id = '".(int) $_GET['manufacturers_id']."'");
$image = xtc_db_fetch_array($image,true);
$image = $image['manufacturers_image'];
} elseif ($current_category_id) {
$image = xtDBquery("select categories_image from ".TABLE_CATEGORIES." where categories_id = '".$current_category_id."'");
$image = xtc_db_fetch_array($image,true);
$image = $image['categories_image'];
}
*/
//BOF - web28 - 2010-08-06 - BUGFIX no manufacturers image displayed -> modules/product_listing.php
include (DIR_WS_MODULES.FILENAME_PRODUCT_LISTING);
} else { // default page
/**
* default content page
*
*/
} else {
if (GROUP_CHECK == 'true') {
$group_check = "and group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'";
$group_check = "AND group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'";
}
$shop_content_query = xtDBquery("SELECT content_title,
$shop_content_query = xtDBquery("-- /includes/modules/default.php
SELECT content_title,
content_heading,
content_text,
content_file
FROM ".TABLE_CONTENT_MANAGER."
WHERE content_group='5'
".$group_check."
AND languages_id='".$_SESSION['languages_id']."'");
AND languages_id='".(int) $_SESSION['languages_id']."'");
$shop_content_data = xtc_db_fetch_array($shop_content_query,true);
// BOF - Dokuman - 22.07.2009 - added htmlspecialchars
// $default_smarty->assign('title', $shop_content_data['content_heading']);
$default_smarty -> assign('title', htmlspecialchars($shop_content_data['content_heading']));
// EOF - Dokuman - 22.07.2009 - added htmlspecialchars
$default_smarty->assign('title', $shop_content_data['content_heading']);
include (DIR_WS_INCLUDES.FILENAME_CENTER_MODULES);
if ($shop_content_data['content_file'] != '') {
ca. Zeile 609
$default_smarty->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'].$_SESSION['currency'].$_SESSION['customer_id'];
$main_content = $default_smarty->fetch(CURRENT_TEMPLATE.'/module/main_content.html', $cache_id);
}
$smarty->assign('main_content', $main_content);
}
}
?>
includes/modules/error_handler.phpTop ca. Zeile 9
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
//header( 'HTTP/1.0 404 Not Found' );
//header( 'Status: 404 Not Found' );
$module_smarty= new Smarty;
$module_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/');
$module_smarty->assign('language', $_SESSION['language']);
$module_smarty->assign('ERROR',$error);
// BOF - Tomcraft - 2010-05-04 - Changed alternative text for the button
//$module_smarty->assign('BUTTON','<a href="javascript:history.back(1)">'. xtc_image_button('button_back.gif', IMAGE_BUTTON_CONTINUE).'</a>');
$module_smarty->assign('BUTTON','<a href="javascript:history.back(1)">'. xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK).'</a>');
// EOF - Tomcraft - 2010-05-04 - Changed alternative text for the button
$module_smarty->assign('BUTTON','<a href="javascript:history.back(1)">'. xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK).'</a>'); // Tomcraft - 2010-05-04 - Changed alternative text for the button
$module_smarty->assign('language', $_SESSION['language']);
// search field
$module_smarty->assign('FORM_ACTION',xtc_draw_form('new_find', xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get').xtc_hide_session_id()); //WEB28 change NONSSL to $request_type
includes/modules/metatags.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: metatags.php 2756 2012-04-15 11:58:14Z web28 $
xtcModified - community made shopping
http://www.xtc-modified.org
// ---------------------------------------------------------------------------------------
// AUTOMATISCHE METATAGS MULTILANGUAGE für xt:Commerce 3.04
// ---------------------------------------------------------------------------------------
// by Gunnar Tillmann
// http://www.gunnart.de?p=401
// ---------------------------------------------------------------------------------------
// Rewritten, formerly based on:
// (c) 2003 xt:Commerce (metatags.php, v.1140 2005/08/10); www.xt-commerce.de
// (c) 2003 nextcommerce (metatags.php, v1.7 2003/08/14); www.nextcommerce.org
// ---------------------------------------------------------------------------------------
// Version 0.96 / 21. Juni 2009
// - Umwandlung von Umlauten in Keywords statt in ae und oe JETZT in ä ö
// - "Bindestrich-Wörter" (z.B. T-Shirt oder DVD-Player) werden in den Keywords nicht
// mehr getrennt
// - Metatags auch für ContentManager-Seiten (Achtung! Dazu Erweiterung erforderlich!)
// - Im ContentManager können auch automatische Metatags aus eingebundenen HTML- oder
// Text-Dateien erzeugt werden
// - Standard-Meta-Angaben durch Content-Metas auch mehrsprachig möglich. Dazu eine
// Seite namens "STANDARD_META" anlegen
// - Bei automatisch erzeugen Keywords oder Descriptions werden Wörter nach Zeilen-
// umbrüchen nicht mehr "zusammengezogen"
// - Eigene (mehrsprachige) Metas für die Shop-Startseite möglich - Dazu werden die
// Metas aus der "index"-Seite im ContentManager geholt
// - Seiten-Nummer im Title bei Artikel-Listen (also Kategorien, Sonderangebote etc.)
// - Eigener Title bei Suchergebnissen (Mit Seiten-Nummer, Suchbegriff, ggf. Hersteller
// und Kategorienname)
// - Bei allen Seiten, die nicht "Kategorie", "Startseite", "Content", "Produkt" o.ä.
// sind, wird der Title aus den Einträgen im $breadcrumb-Objekt zusammengesetzt
// - BugFix: BreadCrumb wird nicht mehr verkürzt
// ---------------------------------------------------------------------------------------
// Inspired by "Dynamic Meta" - Ein WordPress-PlugIn von Michael Schwarz
// http://www.php-vision.de/plugins-scripte/dynamicmeta-wpplugin.php
// ---------------------------------------------------------------------------------------
// Getestet für xt:C 3.04 SP2.1,
// Tauglich für Shops mit und ohne ShopStat-Erweiterung
// Eventuell sollte die "includes/header.php" ein bisschen angepasst werden, um valides
// XHTML zu gewährleisten
// ---------------------------------------------------------------------------------------
// Achtung: Vor Einbau bitte unbedingt dieses Modul installieren:
// --> http://www.xtc-load.de/2008/11/metatags-fur-content-seiten/
// ---------------------------------------------------------------------------------------
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2003 nextcommerce (metatags.php, v1.7 2003/08/14); www.nextcommerce.org
(c) 2006 xt:Commerce (metatags.php, v.1140 2005/08/10); www.xt-commerce.de
Released under the GNU General Public License
---------------------------------------------------------------------------------------
Modified by Gunnar Tillmann (August 2006)
http://www.gunnart.de
---------------------------------------------------------------------------------------
AUTOMATISCHE METATAGS MULTILANGUAGE für xt:Commerce 3.04
---------------------------------------------------------------------------------------
Version 0.96n / 13. Dezember 2010 / DokuMan / xtcModified
- Unterstützung für Pagination
---------------------------------------------------------------------------------------
Version 0.96m / 26. August 2010 / DokuMan / xtcModified
- Unterstützung für "canonical"-Tag
---------------------------------------------------------------------------------------
Version 0.96 / 21. Juni 2009
- Umwandlung von Umlauten in Keywords statt in ae und oe JETZT in ä ö
- "Bindestrich-Wörter" (z.B. T-Shirt oder DVD-Player) werden in den Keywords nicht
mehr getrennt
- Metatags auch für ContentManager-Seiten (Achtung! Dazu Erweiterung erforderlich!)
- Im ContentManager können auch automatische Metatags aus eingebundenen HTML- oder
Text-Dateien erzeugt werden
- Standard-Meta-Angaben durch Content-Metas auch mehrsprachig möglich. Dazu eine
Seite namens "STANDARD_META" anlegen
- Bei automatisch erzeugen Keywords oder Descriptions werden Wörter nach Zeilen-
umbrüchen nicht mehr "zusammengezogen"
- Eigene (mehrsprachige) Metas für die Shop-Startseite möglich - Dazu werden die
Metas aus der "index"-Seite im ContentManager geholt
- Seiten-Nummer im Title bei Artikel-Listen (also Kategorien, Sonderangebote etc.)
- Eigener Title bei Suchergebnissen (Mit Seiten-Nummer, Suchbegriff, ggf. Hersteller
und Kategorienname)
- Bei allen Seiten, die nicht "Kategorie", "Startseite", "Content", "Produkt" o.ä.
sind, wird der Title aus den Einträgen im $breadcrumb-Objekt zusammengesetzt
- BugFix: BreadCrumb wird nicht mehr verkürzt
---------------------------------------------------------------------------------------
Inspired by "Dynamic Meta" - Ein WordPress-PlugIn von Michael Schwarz
http://www.php-vision.de/plugins-scripte/dynamicmeta-wpplugin.php
---------------------------------------------------------------------------------------*/
// ---------------------------------------------------------------------------------------
// Konfiguration ...
// ---------------------------------------------------------------------------------------
global $metaStopWords, $metaGoWords, $metaMinLength, $metaMaxLength, $metaDesLength;
$metaStopWords = ('aber,alle,alles,als,auch,auf,aus,bei,beim,beinahe,bin,bis,ist,dabei,dadurch,daher,dank,darum,danach,das,daß,dass,dein,deine,dem,den,der,des,dessen,dadurch,deshalb,die,dies,diese,dieser,diesen,diesem,dieses,doch,dort,durch,eher,ein,eine,einem,einen,einer,eines,einige,einigen,einiges,eigene,eigenes,eigener,endlich,euer,eure,etwas,fast,findet,für,gab,gibt,geben,hatte,hatten,hattest,hattet,heute,hier,hinter,ich,ihr,ihre,ihn,ihm,im,immer,in,ist,ja,jede,jedem,jeden,jeder,jedes,jener,jenes,jetzt,kann,kannst,kein,können,könnt,machen,man,mein,meine,mehr,mit,muß,mußt,musst,müssen,müßt,nach,nachdem,neben,nein,nicht,nichts,noch,nun,nur,oder,statt,anstatt,seid,sein,seine,seiner,sich,sicher,sie,sind,soll,sollen,sollst,sollt,sonst,soweit,sowie,und,uns,unser,unsere,unserem,unseren,unter,vom,von,vor,wann,warum,was,war,weiter,weitere,wenn,wer,werde,widmen,widmet,viel,viele,vieles,weil,werden,werdet,weshalb,wie,wieder,wieso,wir,wird,wirst,wohl,woher,wohin,wurdezum,zur,über');
$metaStopWords = ('versandkosten,zzgl,mwst,lieferzeit,aber,alle,alles,als,auch,auf,aus,bei,beim,beinahe,bin,bis,ist,dabei,dadurch,daher,dank,darum,danach,das,daß,dass,dein,deine,dem,den,der,des,dessen,dadurch,deshalb,die,dies,diese,dieser,diesen,diesem,dieses,doch,dort,durch,eher,ein,eine,einem,einen,einer,eines,einige,einigen,einiges,eigene,eigenes,eigener,endlich,euer,eure,etwas,fast,findet,für,gab,gibt,geben,hatte,hatten,hattest,hattet,heute,hier,hinter,ich,ihr,ihre,ihn,ihm,im,immer,in,ist,ja,jede,jedem,jeden,jeder,jedes,jener,jenes,jetzt,kann,kannst,kein,können,könnt,machen,man,mein,meine,mehr,mit,muß,mußt,musst,müssen,müßt,nach,nachdem,neben,nein,nicht,nichts,noch,nun,nur,oder,statt,anstatt,seid,sein,seine,seiner,sich,sicher,sie,sind,soll,sollen,sollst,sollt,sonst,soweit,sowie,und,uns,unser,unsere,unserem,unseren,unter,vom,von,vor,wann,warum,was,war,weiter,weitere,wenn,wer,werde,widmen,widmet,viel,viele,vieles,weil,werden,werdet,weshalb,wie,wieder,wieso,wir,wird,wirst,wohl,woher,wohin,wurdezum,zur,über');
$metaGoWords = ('tracht,dirndl,kleid,mode,modern,bluse,trachten,hose,leder,schmuck,t-shirt,t-shirts,schuh,schuhe'); // Hier rein, was nicht gefiltert werden soll
$metaMinLength = 9; // Mindestlänge eines Keywords
$metaMinLength = 3; // Mindestlänge eines Keywords
$metaMaxLength = 18; // Maximallänge eines Keywords
$metaDesLength = 364; // maximale Länge der "description" (in Buchstaben)
$metaMaxKeywords = 15; // Maximall Anzahl der Keywords
$metaDesLength = 150; // maximale Länge der "description" (in Buchstaben)
// ---------------------------------------------------------------------------------------
$addPagination = true; // Seiten-Nummern anzeigen, ja/nein?
// ---------------------------------------------------------------------------------------
$addCatShopTitle = true; // Shop-Titel bei Kategorien anhängen, ja/nein?
ca. Zeile 63
$addNewsShopTitle = true; // Shop-Titel bei Neuen Artikeln anhängen, ja/nein?
$addSearchShopTitle = true; // Shop-Titel bei Suchergebnissen anhängen, ja/nein?
$addOthersShopTitle = true; // Shop-Titel bei sonstigen Seiten anhängen, ja/nein?
// ---------------------------------------------------------------------------------------
$noIndexUnimportant = false; // "unwichtige" Seiten mit noindex versehen
$noIndexUnimportant = true; // "unwichtige" Seiten mit noindex versehen
// ---------------------------------------------------------------------------------------
// Diese Seiten sind "wichtig"! (ist nur relevant, wenn $noIndexUnimportand == true)
// ---------------------------------------------------------------------------------------
$pagesToShow = array(
FILENAME_DEFAULT,
FILENAME_PRODUCT_INFO,
FILENAME_CONTENT,
FILENAME_ADVANCED_SEARCH_RESULT,
// FILENAME_ADVANCED_SEARCH_RESULT, // don't index search result
FILENAME_SPECIALS,
FILENAME_PRODUCTS_NEW
);
// ---------------------------------------------------------------------------------------
// Einzelne Content Seiten mit noindex versehen, kommagetrennte Liste der coID
// ---------------------------------------------------------------------------------------
$content_noIndex = array('7,9');
// ---------------------------------------------------------------------------------------
// Ende Konfiguration
// ---------------------------------------------------------------------------------------
ca. Zeile 93
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
// Noindex bei "unwichtigen" Seiten
// noindex, nofollow bei "unwichtigen" Seiten
// ---------------------------------------------------------------------------------------
$meta_robots = META_ROBOTS;
if($noIndexUnimportant && !in_array(basename($_SERVER['SCRIPT_NAME']),$pagesToShow)) {
$meta_robots = 'noindex, follow';
$meta_robots = 'noindex, nofollow, noodp';
}
// ---------------------------------------------------------------------------------------
ca. Zeile 126
content_meta_description,
content_meta_keywords
from ".TABLE_CONTENT_MANAGER."
where ".$ml_meta_where."
and languages_id = '".$_SESSION['languages_id']."'
and languages_id = '".(int)$_SESSION['languages_id']."'
");
$ml_meta = xtc_db_fetch_array($ml_meta_query,true);
// ---------------------------------------------------------------------------------------
ca. Zeile 144
// ---------------------------------------------------------------------------------------
// Seitennummerierung im Title (Kategorien, Sonderangebote, Neue Artikel etc.)
// ---------------------------------------------------------------------------------------
if($_GET['page'] > 1 && $addPagination) {
$Page = '';
if(isset($_GET['page']) && $_GET['page'] > 1 && $addPagination) {
// PREVNEXT_TITLE_PAGE_NO ist "Seite %d" aus der deutschen
// bzw. "page %d" aus der englischen Sprachdatei ...
$Page = trim(str_replace('%d','',PREVNEXT_TITLE_PAGE_NO)).' '.intval($_GET['page']);
$Page = trim(str_replace('%d','',PREVNEXT_TITLE_PAGE_NO)).' '.(int)$_GET['page'];
}
// ---------------------------------------------------------------------------------------
ca. Zeile 162
$Return= strtr($Text,$translation_table);
return preg_replace( '/&#(\d+);/me',"chr('\\1')",$Return);
}
function metaHtmlEntities($Text) {
//BOF web28 2011-12-02 UFT-8
if($_SESSION['language_charset'] == 'utf-8') {
return $Text;
}
//EOF web28 2011-12-02 UFT-8
$translation_table=get_html_translation_table(HTML_ENTITIES,ENT_QUOTES);
$translation_table[chr(38)] = '&';
return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&",strtr($Text,$translation_table));
}
ca. Zeile 172
// ---------------------------------------------------------------------------------------
function prepareWordArray($Text) {
//$Text = str_replace(array(' ','\t','\r','\n','\b'),' ',strip_tags($Text));
$Text = str_replace(array(' ','\t','\r','\n','\b'),' ',preg_replace("/<[^>]*>/",' ',$Text)); // <-- Besser bei Zeilenumbrüchen
$Text = metaHtmlEntities(metaNoEntities(strtolower($Text)),ENT_QUOTES);
$Text = htmlentities(metaNoEntities(strtolower($Text)), ENT_QUOTES, strtoupper($_SESSION['language_charset']));
$Text = preg_replace("/\s\-|\-\s/",' ',$Text); // <-- Gegen Trenn- und Gedankenstriche
$Text = preg_replace("/(&[^aoucizens][^;]*;)/",' ',$Text);
$Text = preg_replace("/[^0-9a-z|\-|&|;]/",' ',$Text); // <-- Bindestriche drin lassen
$Text = trim(preg_replace("/\s\s+/",' ',$Text));
ca. Zeile 202
global $metaStopWords;
$KeyWords = WordArray($KeyWords);
$StopWords = WordArray($metaStopWords);
$KeyWords = array_diff($KeyWords,$StopWords);
$KeyWords = array_filter($KeyWords,filterKeyWordArray);
$KeyWords = array_filter($KeyWords,"filterKeyWordArray");
return $KeyWords;
}
// ---------------------------------------------------------------------------------------
// GoWords- und Längen-Filter:
ca. Zeile 233
global $metaGoWords, $categories_meta, $product;
//$GoWords = $metaGoWords.' '.META_KEYWORDS;
$GoWords = $metaGoWords.' '.ML_META_KEYWORDS.' '.ML_TITLE; // <-- MultiLanguage
$GoWords .= ' '.$categories_meta['categories_meta_keywords'];
$GoWords .= ' '.$product->data['products_meta_keywords'];
if (isset($product->data['products_meta_keywords'])) $GoWords .= ' '.$product->data['products_meta_keywords'];
return $GoWords;
}
// ---------------------------------------------------------------------------------------
// Aufräumen: Leerzeichen und HTML-Code raus, kürzen, Umlaute und Sonderzeichen wandeln
ca. Zeile 252
$Text = preg_replace('/\s+?(\S+)?$/','',substr($Text,0,$Length+1));
$Text = substr($Text,0,$Length).$Abk;
}
}
return metaHtmlEntities($Text,ENT_QUOTES);
return htmlentities($Text, ENT_QUOTES, strtoupper($_SESSION['language_charset'])); // web28 - 2010-09-16 - FIX html entities
}
// ---------------------------------------------------------------------------------------
// metaTitle und metaKeyWords, Rückgabe bzw. Formatierung
// ---------------------------------------------------------------------------------------
function metaTitle($Title=array()) {
$Title = func_get_args();
$Title = array_filter($Title,metaClean);
$Title = array_filter($Title,"metaClean");
return implode(' - ',$Title);
}
// ---------------------------------------------------------------------------------------
function metaKeyWords($Text) {
//BOC - web28 - 2011-03-14 - add metaMaxKeywords
global $metaMaxKeywords;
$KeyWords = cleanKeyWords($Text);
if(count($KeyWords) > $metaMaxKeywords) {
$KeyWords = array_slice($KeyWords, 0 ,$metaMaxKeywords);
}
//EOC - web28 - 2011-03-14 - add metaMaxKeywords
return implode(', ',$KeyWords);
}
// ---------------------------------------------------------------------------------------
ca. Zeile 298
// Title ...
if(!empty($product->data['products_meta_title'])) {
$meta_title = $product->data['products_meta_title'].(($addProdShopTitle)?' - '.ML_TITLE:'');
} else {
$meta_title = metaTitle($product->data['products_name'],$product->data['manufacturers_name'],($addProdShopTitle)?ML_TITLE:'');
$meta_title = metaTitle($product->data['products_name'],isset($product->data['manufacturers_name'])?$product->data['manufacturers_name']:'',$Page,($addProdShopTitle)?ML_TITLE:'');
}
//-- Canonical-URL
//-- http://www.linkvendor.com/blog/der-canonical-tag-%E2%80%93-was-kann-man-damit-machen.html
$canonical_url = xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id='.$product->data['products_id'],$request_type,false);
}
break;
// ---------------------------------------------------------------------------------------
// Daten holen: Kategorie
// ---------------------------------------------------------------------------------------
case FILENAME_DEFAULT :
$startpage = true;
// Sind wir in einer Kategorie?
if(!empty($current_category_id)) {
$categories_meta_query = xtDBquery("
select categories_meta_keywords,
ca. Zeile 316
categories_meta_title,
categories_name,
categories_description
from ".TABLE_CATEGORIES_DESCRIPTION."
where categories_id='".intval($current_category_id)."'
and language_id='".intval($_SESSION['languages_id'])."'
where categories_id='".(int)$current_category_id."'
and language_id='".(int)$_SESSION['languages_id']."'
");
$categories_meta = xtc_db_fetch_array($categories_meta_query,true);
$startpage = false;
}
$manu_id = $manu_name = false;
// Nachsehen, ob ein Hersteller gewählt ist
if(!empty($_GET['manu'])) {
$manu_id = $_GET['manu'];
$startpage = false;
}
if(!empty($_GET['manufacturers_id'])) {
$manu_id = $_GET['manufacturers_id'];
$startpage = false;
}
if(!empty($_GET['filter_id']) && !$manu_id) {
$manu_id = $_GET['filter_id'];
$startpage = false;
}
// ggf. Herstellernamen herausfinden ...
if($manu_id) {
$manu_name_query = xtDBquery("
select manufacturers_name
from ".TABLE_MANUFACTURERS."
where manufacturers_id ='".intval($manu_id)."'
where manufacturers_id ='".(int)$manu_id."'
");
$manu_name = implode('',xtc_db_fetch_array($manu_name_query,true));
$manu_name = xtc_db_fetch_array($manu_name_query,true);
is_array($manu_name) ? $manu_name = implode('',$manu_name) : $manu_name = '';
$metaGoWords .= ','.$manu_name; // <-- zu GoWords hinzufügen
}
// KeyWords ...
ca. Zeile 370
$meta_title = $categories_meta['categories_meta_title'].(($manu_name)?' - '.$manu_name:'').(($Page)?' - '.$Page:'').(($addCatShopTitle)?' - '.ML_TITLE:'');
} else{
$meta_title = metaTitle($categories_meta['categories_name'],$manu_name,$Page,($addCatShopTitle)?ML_TITLE:'');
}
//-- Canonical-URL
//-- http://www.linkvendor.com/blog/der-canonical-tag-%E2%80%93-was-kann-man-damit-machen.html
if (xtc_not_null($cPath)) {
$canonical_url = xtc_href_link(FILENAME_DEFAULT, 'cPath='.$cPath.$Page,$request_type,false);
} elseif ($startpage) {
$canonical_url = xtc_href_link(FILENAME_DEFAULT, '', $request_type);
}
break;
// ---------------------------------------------------------------------------------------
// Daten holen: Inhalts-Seite (ContentManager)
// ---------------------------------------------------------------------------------------
case FILENAME_CONTENT :
// Noindex bei bestimmten Contet Seiten
if(in_array(intval($_GET['coID']),$content_noIndex)) {
$meta_robots = 'noindex, follow, noodp';
}
$contents_meta_query = xtc_db_query("
select content_meta_title,
content_meta_description,
content_meta_keywords,
ca. Zeile 385
content_heading,
content_text,
content_file
from ".TABLE_CONTENT_MANAGER."
where content_group = '".intval($_GET['coID'])."'
and languages_id = '".$_SESSION['languages_id']."'
where content_group = '".(int)$_GET['coID']."'
and languages_id = '".(int)$_SESSION['languages_id']."'
");
$contents_meta = xtc_db_fetch_array($contents_meta_query,true);
if(count($contents_meta) > 0) {
ca. Zeile 423
$meta_descr = ($contents_meta['content_heading'])?$contents_meta['content_heading'].': ':'';
$meta_descr .= $contents_meta['content_text'];
}
}
//-- Canonical-URL
//-- http://www.linkvendor.com/blog/der-canonical-tag-%E2%80%93-was-kann-man-damit-machen.html
if(isset($_GET['coID'])){
$canonical_url = xtc_href_link(FILENAME_CONTENT, 'coID='.$_GET['coID'],$request_type,false);
}
break;
// ---------------------------------------------------------------------------------------
// Title für Suchergebnisse - Mit Suchbegriff, Kategorien-Namen, Seiten-Nummer etc.
// ---------------------------------------------------------------------------------------
ca. Zeile 434
if(!empty($_GET['manufacturers_id'])) {
$manu_name_query = xtDBquery("
select manufacturers_name
from ".TABLE_MANUFACTURERS."
where manufacturers_id ='".intval($_GET['manufacturers_id'])."'
where manufacturers_id ='".(int)$_GET['manufacturers_id']."'
");
$manu_name = implode('',xtc_db_fetch_array($manu_name_query,true));
$manu_name = xtc_db_fetch_array($manu_name_query,true);
is_array($manu_name) ? $manu_name = implode('',$manu_name) : $manu_name = '';
$metaGoWords .= ','.$manu_name; // <-- zu GoWords hinzufügen
}
// ggf. Kategorien-Namen herausfinden ...
if(!empty($_GET['categories_id'])) {
$cat_name_query = xtDBquery("
select categories_name
from ".TABLE_CATEGORIES_DESCRIPTION."
where categories_id='".intval($_GET['categories_id'])."'
and language_id='".intval($_SESSION['languages_id'])."'
where categories_id='".(int)$_GET['categories_id']."'
and language_id='".(int)$_SESSION['languages_id']."'
");
$cat_name = implode('',xtc_db_fetch_array($cat_name_query,true));
$cat_name = xtc_db_fetch_array($cat_name_query,true);
is_array($cat_name) ? $cat_name = implode('',$cat_name) : $cat_name = '';
}
$meta_title = metaTitle($breadcrumbTitle,'"'.trim($_GET['keywords']).'"',$Page,$cat_name,$manu_name,($addSearchShopTitle)?ML_TITLE:'');
$meta_title = metaTitle($breadcrumbTitle,
$Page,
(isset($cat_name) ? $cat_name : ''),
(isset($manu_name) ? $manu_name : ''),
($addSearchShopTitle) ? ML_TITLE : ''
);
break;
// ---------------------------------------------------------------------------------------
// Title für Angebote
// ---------------------------------------------------------------------------------------
ca. Zeile 470
// Title für sonstige Seiten
// ---------------------------------------------------------------------------------------
default:
$meta_title = metaTitle($breadcrumbTitle,($addOthersShopTitle)?ML_TITLE:'');
$meta_title = metaTitle($breadcrumbTitle,$Page,($addOthersShopTitle)?ML_TITLE:''); //DokuMan - 2010-12-13 - added meta pagination
break;
// ---------------------------------------------------------------------------------------
ca. Zeile 495
if(empty($meta_title)) {
$meta_title = ML_TITLE;
}
// ---------------------------------------------------------------------------------------
/* BOF - h-h-h - 2011-08-22 - show only defined Meta Tags
?>
<title><?php echo metaClean($meta_title);?></title>
<meta http-equiv="content-language" content="<?php echo $_SESSION['language_code']; ?>" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="keywords" content="<?php echo metaClean($meta_keyw); ?>" />
<meta name="description" content="<?php echo metaClean($meta_descr,$metaDesLength); ?>" />
<meta name="robots" content="<?php echo $meta_robots; ?>" />
<meta name="language" content="<?php echo $_SESSION['language_code']; ?>" />
<meta name="author" content="<?php echo metaClean(META_AUTHOR); ?>" />
<meta name="publisher" content="<?php echo metaClean(META_PUBLISHER); ?>" />
ca. Zeile 515
<meta name="page-topic" content="<?php echo metaClean(META_TOPIC); ?>" />
<meta name="reply-to" content="<?php echo META_REPLY_TO; ?>" />
<meta name="distribution" content="global" />
<meta name="revisit-after" content="<?php echo META_REVISIT_AFTER; ?>" />
*/
if (metaClean($meta_title) != '') {
echo '<title>'. metaClean($meta_title) .'</title>'."\n";
}
if ($_SESSION['language_code'] != '') {
echo '<meta http-equiv="content-language" content="'. $_SESSION['language_code'] .'" />'."\n";
}
echo '<meta http-equiv="cache-control" content="no-cache" />'."\n";
if (metaClean($meta_keyw) != '') {
echo '<meta name="keywords" content="'. metaClean($meta_keyw) .'" />'."\n";
}
if (metaClean($meta_descr,$metaDesLength) != '') {
echo '<meta name="description" content="'. metaClean($meta_descr,$metaDesLength) .'" />'."\n";
}
if ($_SESSION['language_code'] != '') {
echo '<meta name="language" content="'. $_SESSION['language_code'] .'" />'."\n";
}
if ($meta_robots != '') {
echo '<meta name="robots" content="'. $meta_robots .'" />'."\n";
}
if (metaClean(META_AUTHOR) != '') {
echo '<meta name="author" content="'.metaClean(META_AUTHOR) .'" />'."\n";
}
if (metaClean(META_PUBLISHER) != '') {
echo '<meta name="publisher" content="'. metaClean(META_PUBLISHER) .'" />'."\n";
}
if (metaClean(META_COMPANY) != '') {
echo '<meta name="company" content="'. metaClean(META_COMPANY) .'" />'."\n";
}
if (metaClean(META_TOPIC) != '') {
echo '<meta name="page-topic" content="'. metaClean(META_TOPIC) .'" />'."\n";
}
if (META_REPLY_TO != 'xx@xx.com') {
echo '<meta name="reply-to" content="'. META_REPLY_TO .'" />'."\n";
}
if (META_REVISIT_AFTER != '0') {
echo '<meta name="revisit-after" content="'. META_REVISIT_AFTER .'" />'."\n";
}
if(isset($canonical_url)) {
echo '<link rel="canonical" href="'.$canonical_url.'" />'."\n";
}
// EOF - h-h-h - 2011-08-22 - show only defined Meta Tags
?>
includes/modules/order_total/ot_coupon.phpTop ca. Zeile 24
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
Released under the GNU General Public License
BUGFIXES & MODIFIED rev13 by web28 - www.rpa-com.de
BUGFIXES & MODIFIED rev1.3.3 by web28 - www.rpa-com.de
1.3.3 optimize code
1.3.2 fix different currencies
---------------------------------------------------------------------------------------*/
class ot_coupon {
var $title, $output;
ca. Zeile 42
$this->description = MODULE_ORDER_TOTAL_COUPON_DESCRIPTION;
$this->user_prompt = '';
$this->enabled = MODULE_ORDER_TOTAL_COUPON_STATUS;
$this->sort_order = MODULE_ORDER_TOTAL_COUPON_SORT_ORDER;
$this->include_shipping = MODULE_ORDER_TOTAL_COUPON_INC_SHIPPING;
$this->include_tax = MODULE_ORDER_TOTAL_COUPON_INC_TAX;
$this->include_shipping = 'false'; //MODULE_ORDER_TOTAL_COUPON_INC_SHIPPING;
$this->include_tax = 'true'; //MODULE_ORDER_TOTAL_COUPON_INC_TAX;
$this->calculate_tax = MODULE_ORDER_TOTAL_COUPON_CALC_TAX;
$this->tax_class = MODULE_ORDER_TOTAL_COUPON_TAX_CLASS;
$this->credit_class = true;
$this->output = array ();
ca. Zeile 61
$od_amount = $this->calculate_credit($order_total); //Kuponbetrag berechnen
$this->deduction = $od_amount;
if ($od_amount > 0) {
$od_amount = $xtPrice->xtcFormat($od_amount, false); //Rabatt runden
//$od_amount = $xtPrice->xtcFormat($od_amount, false); //Rabatt runden ??? Rundungsfehler ???
if ($this->calculate_tax != 'None') {
$od_amount = $this->new_calculate_tax_deduction($od_amount,$order_total);
$this->new_calculate_tax_deduction($od_amount,$order_total);
}
$order->info['total'] = $order->info['total'] - $od_amount;
$order->info['total'] = $xtPrice->xtcFormat($order->info['total'] - $od_amount, false);
$order->info['deduction'] = $od_amount;
$order->info['subtotal'] = $order->info['subtotal'] - $od_amount;
$this->output[] = array ('title' => $this->title.' '.$this->coupon_code.':',
$this->output[] = array ('title' => $this->title.' '.$this->coupon_code.$this->tax_info.':',
'text' => '<strong><font color="#ff0000">'.$xtPrice->xtcFormat($od_amount*(-1), true).'</font></strong>',
'value' => $od_amount *(-1)); //2011-08-25 - web28 - fix negativ sign
}
//EOF -web28- 2010-05-23 - BUGFIX - tax_deduction, $order->info['subtotal']
ca. Zeile 145
if (xtc_db_num_rows($coupon_count_customer) >= $coupon_result['uses_per_user'] && $coupon_result['uses_per_user'] > 0) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_INVALID_USES_USER_COUPON . $coupon_result['uses_per_user'] . TIMES), 'SSL'));
}
// ERROR : MINDESTBESTELLWERT NICHT ERREICHT
if ($coupon_result['coupon_minimum_order'] > $_SESSION['cart']->show_total()) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'info_message=' . urlencode(ERROR_MINIMUM_ORDER_COUPON_1 . ' ' . $xtPrice->xtcFormat($coupon_result['coupon_minimum_order'], true) . ' ' . ERROR_MINIMUM_ORDER_COUPON_2), 'SSL'));
// ERROR : MINDESTBESTELLWERT NICHT ERREICHT //FIX - web28 - 2012-04-24 - calculate currencies
if ($xtPrice->xtcCalculateCurr($coupon_result['coupon_minimum_order']) > $_SESSION['cart']->show_total()) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'info_message=' . urlencode(ERROR_MINIMUM_ORDER_COUPON_1 . ' ' . $xtPrice->xtcFormat($coupon_result['coupon_minimum_order'], true, 0, true) . ' ' . ERROR_MINIMUM_ORDER_COUPON_2), 'SSL'));
}
}
if ($_POST['submit_redeem_coupon_x'] && !$_POST['gv_redeem_code'])
ca. Zeile 161
// RABATT BERECHNEN
///////////////////////////////////////////////////////////////////////
function calculate_credit($amount) {
global $order; $xtPrice;
global $order, $xtPrice, $tax_info_excl;
$od_amount = 0;
if (isset ($_SESSION['cc_id'])) {
ca. Zeile 189
and coupon_active = 'Y'
");
$get_result = xtc_db_fetch_array($coupon_get);
$c_deduct = $get_result['coupon_amount'];
$c_deduct = $xtPrice->xtcCalculateCurr($get_result['coupon_amount']); //FIX - web28 - 2012-04-24 - calculate currencies
// KUPON VERSANDKOSTENFREI
if ($get_result['coupon_type'] == 'S') {
//$c_deduct = $order->info['shipping_cost'];
$c_deduct = $this->get_shipping_cost();
}
if ($get_result['coupon_type']=='S' && $get_result['coupon_amount'] > 0 ) $c_deduct = $c_deduct + $get_result['coupon_amount'];
if ($get_result['coupon_type']=='S' && $get_result['coupon_amount'] > 0 ) {
$c_deduct = $c_deduct + $xtPrice->xtcCalculateCurr($get_result['coupon_amount']); //FIX - web28 - 2012-04-24 - calculate currencies
$flag_s = true;
}
//echo 'VK'. $c_deduct;
if ($get_result['coupon_minimum_order'] <= $this->get_order_total()) {
if ($xtPrice->xtcCalculateCurr($get_result['coupon_minimum_order']) <= $this->get_order_total()) {
if ($get_result['restrict_to_products'] || $get_result['restrict_to_categories']) {
//BOF -web28- 2010-06-19 - FIX - new calculate coupon amount
ca. Zeile 273
} else {
if ($get_result['coupon_type'] != 'P') {
$od_amount = $c_deduct;
} else {
$od_amount = $amount * $get_result['coupon_amount'] / 100;
$od_amount = $amount * $xtPrice->xtcCalculateCurr($get_result['coupon_amount']) / 100; //FIX - web28 - 2012-04-24 - calculate currencies
}
}
//echo 'OD'.$od_amount;
//BOF - web28- 2010-06-19 - ADD no discount for special offers
if (MODULE_ORDER_TOTAL_COUPON_SPECIAL_PRICES != 'true'){
$pr_c = 0;
for ($i = 0; $i < sizeof($order->products); $i ++) {
ca. Zeile 302
//EOF - web28- 2010-06-19 - ADD no discount for special offers
}
}
if ($flag_s) {
$amount += $this->get_shipping_cost(); //Wenn Versandkostenfrei: Versandkosten und Gutscheinwert addieren
}
// RABATT ÜBERSTEIGT DEN BESTELLWERT, DANN RABATT GLEICH BESTELLWERT
if ($od_amount > $amount) {
$od_amount = $amount;
}
//echo 'OD'.$od_amount;
}
//KORREKTUR wenn Kunde Nettopreise und Steuer in Rechnung: Couponwert mit Steuersatz prozentual korrigiert
$this->tax_info = '';
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1 && $amount > 0) {
$od_amount = $od_amount / (1 + $order->info['tax'] / $amount);
$this->tax_info = ' ('. trim(str_replace(array(' %s',','), array('',''),TAX_INFO_EXCL)) .')';
}
return $od_amount;
}
ca. Zeile 317
///////////////////////////////////////////////////////////////////////
function new_calculate_tax_deduction($od_amount, $order_total) {
global $order;
if ($_SESSION['customers_status']['customers_status_show_price'] != 0) {
//Wenn der Kupon ohne Steuer definiert wurde, muss die Bestellsumme korrigiert werden
if ($this->include_tax == 'false'){
$order_total = $order_total + $order->info['tax'];
ca. Zeile 327
//Gutscheinwert in % berechnen, vereinheitlicht die Berechnungen
$od_amount_pro = $od_amount/$order_total * 100;
reset($order->info['tax_groups']);
$tax_betrag = 0;
$tod_amount = 0;
$tax_rate_amount = xtc_get_tax_rate($this->tax_class); //Steuersatz von Kupon festgelegt - Standard ist 0 !
// bei $tax_rate = 0 wurde kein Steuersatz definiert
//Steuer für jede Steuergruppe korrigieren
while (list ($key, $value) = each($order->info['tax_groups'])) {
//Steuersumme aus Bestellung ermitteln - ACHTUNG - Unterscheidung mit TAX_ADD_TAX und TAX_NO_TAX
$tax_rate_order = xtc_get_tax_rate_from_desc( str_replace(TAX_ADD_TAX, "", $key) ); //inkl. UST
if ($_SESSION['customers_status']['customers_status_show_price_tax'] != '1') {
$tax_rate_order = xtc_get_tax_rate_from_desc( str_replace(TAX_NO_TAX, "", $key) ); //exkl. UST
}
//Steuer neu berechnen
$t_flag = false;
//Wenn ein Kupon Steuersatz definiert ist, dann nur mit diesem Steuersatz die Steuer neu berechnen (DEAKTIVIERT)
//Testen ob Steuersätze übereinstimmen
//if ($tax_rate_amount > 0 && ($tax_rate_amount - $tax_rate_order < 0.0001)) $t_flag = true;
//Wenn kein Kupon Steuersatz definiert ist, dann Steuersatz automatisch zuordnen
if ($tax_rate_amount == 0) $t_flag = true;
$net = $tax_rate_order * $order->info['tax_groups'][$key];
if ($net > 0 && $t_flag) {
//Bei Anzeige von Netto Preisen muss anders gerechnet werden
if ($_SESSION['customers_status']['customers_status_show_price_tax'] != '1') { //NETTO Preise
$god_amount = $order->info['tax_groups'][$key] - $order->info['tax_groups'][$key] * $od_amount_pro / 100;
$order->info['tax_groups'][$key] = $god_amount; //bei NETTO Preisen ersetzen
} else { //BRUTTO Preise
$t_flag = true;
if ($t_flag) {
$god_amount = $order->info['tax_groups'][$key] * $od_amount_pro / 100;
$order->info['tax_groups'][$key] = $order->info['tax_groups'][$key] - $god_amount; //bei BRUTTO Preisen abziehen
}
$order->info['tax_groups'][$key] -= $god_amount; //Steuer jeder Steuergruppe korrigieren
//echo $god_amount . '<br>';
$tod_amount += $god_amount; //hier wird die Steuer aufaddiert
$tod_amount += $god_amount; //hier wird die Steuer für die Gesamtsteuer aufaddiert
}
}
//Gesamtsteuer neu berechnen
$order->info['tax'] -= $tod_amount; //bei BRUTTO Preisen abziehen
if ($_SESSION['customers_status']['customers_status_show_price_tax'] != '1') {
$order->info['tax'] = $tod_amount; //bei NETTO Preisen ersetzen
ca. Zeile 368
if ($_SESSION['customers_status']['customers_status_show_price_tax'] != '1') {
$order->info['tax'] = $tod_amount; //bei NETTO Preisen ersetzen
}
return $od_amount;
}
}
///////////////////////////////////////////////////////////////////////
// VERSANDKOSTEN BERECHNEN MIT STEUER
ca. Zeile 484
$total_price += $attribute_price;
// EOF - 2011-03-16 - web28 - use xtPrice function
}
if ($this->include_shipping == 'true') {
$total_price += $order->info['shipping_cost'];
}
//if ($this->include_shipping == 'true') {
//$total_price += $order->info['shipping_cost'];
//}
return $total_price;
}
ca. Zeile 540
}
///////////////////////////////////////////////////////////////////////
function remove() {
$keys = '';
$keys_array = $this->keys();
for ($i = 0; $i < sizeof($keys_array); $i ++) {
$keys .= "'".$keys_array[$i]."',";
}
$keys = substr($keys, 0, -1);
xtc_db_query("delete from ".TABLE_CONFIGURATION." where configuration_key in (".$keys.")");
// web28 - 2010-07-31 - DELETE inactive entries in keys
xtc_db_query("delete from ".TABLE_CONFIGURATION." where configuration_key = '".MODULE_ORDER_TOTAL_COUPON_INC_SHIPPING."'");
xtc_db_query("delete from ".TABLE_CONFIGURATION." where configuration_key = '".MODULE_ORDER_TOTAL_COUPON_INC_TAX."'");
xtc_db_query("delete from ".TABLE_CONFIGURATION." where configuration_key = '".MODULE_ORDER_TOTAL_COUPON_TAX_CLASS."'");
xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_ORDER_TOTAL_COUPON_%'");
}
}
?>
includes/modules/product_attributes.phpTop ca. Zeile 89
'PREFIX' => $products_options['price_prefix']
);
} else {
if ($products_options['options_values_price'] != '0.00') {
$price = $xtPrice->xtcFormat($products_options['options_values_price'], false, $product->data['products_tax_class_id'], true); //DokuMan - 2010-08-11 - several currencies on product attributes
//BOC web28 -2012-05-31 several currencies on product attributes
$CalculateCurr = ($product->data['products_tax_class_id'] == 0) ? true : false;
$price = $xtPrice->xtcFormat($products_options['options_values_price'], false, $product->data['products_tax_class_id'],$CalculateCurr);
//EOC web28 -2012-05-31 several currencies on product attributes
}
$products_price = $xtPrice->xtcGetPrice($product->data['products_id'], $format = false, 1, $product->data['products_tax_class_id'], $product->data['products_price']);
includes/modules/product_listing.phpTop ca. Zeile 20
$result = true;
// include needed functions
require_once (DIR_FS_INC.'xtc_get_all_get_params.inc.php');
require_once (DIR_FS_INC.'xtc_get_vpe_name.inc.php');
$listing_split = new splitPageResults($listing_sql, (int)$_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
$listing_split = new splitPageResults($listing_sql, (isset($_GET['page']) ? (int)$_GET['page'] : 1), MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
$module_content = array ();
if ($listing_split->number_of_rows > 0) {
//BOF - web28 - 2011-03-27 - FIX page search results -> urlencode($_GET['keywords'])
ca. Zeile 114
}
if ($result != false) {
$module_smarty->assign('MANUFACTURER_DROPDOWN', $manufacturer_dropdown);
$module_smarty->assign('MANUFACTURER_DROPDOWN', (isset($manufacturer_dropdown) ? $manufacturer_dropdown : ''));
$module_smarty->assign('language', $_SESSION['language']);
$module_smarty->assign('module_content', $module_content);
$module_smarty->assign('NAVIGATION', $navigation);
includes/tracking.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: tracking.php 1151 2005-08-12 09:19:33Z gwinger $
$Id: tracking.php 2812 2012-05-02 09:26:43Z gtb-modified $
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2006 XT-Commerce (tracking.php 1151 2005-08-12)
Third Party contribution:
Some ideas and code from TrackPro v1.0 Web Traffic Analyzer
Copyright (C) 2004 Curve2 Design www.curve2.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
//BOF - DokuMan - 2010-02-26 - set undefined index
/*
$ref_url = parse_url($_SERVER['HTTP_REFERER']);
if ($_SESSION['tracked'] != true) { // if this visitor has not been tracked
*/
$ref_url = '';
if (isset($_SERVER['HTTP_REFERER']))
$ref_url = parse_url($_SERVER['HTTP_REFERER']);
if (isset($_SESSION['tracked']) && $_SESSION['tracked'] != true) { // if this visitor has not been tracked
//EOF - DokuMan - 2010-02-26 - set undefined index
if (!isset($_SESSION['tracked']) || (isset($_SESSION['tracked']) && $_SESSION['tracked'] != true)) { // if this visitor has not been tracked
$_SESSION['tracking']['http_referer']= $ref_url;
$_SESSION['tracked'] = true; // set tracked so they are only logged once
}
if (!isset($_SESSION['tracking']['ip']))
$_SESSION['tracking']['ip'] = $_SERVER['REMOTE_ADDR'];
if (!isset ($_SESSION['tracking']['refID'])) {
// check if referer exists
if (isset($_GET['refID'])) {
$campaign_check_query_raw = "SELECT *
FROM ".TABLE_CAMPAIGNS."
WHERE campaigns_refID = '".xtc_db_input($_GET['refID'])."'";
ca. Zeile 44
$_SESSION['tracking']['refID'] = xtc_db_input($_GET['refID']);
// count hit (block IP for 1 hour)
$insert_sql = array('user_ip'=>$_SESSION['tracking']['ip'],'campaign'=>xtc_db_input($_GET['refID']),'time'=>'now()');
// $check_date = mktime(0, date("i")-1, 0, date("m"), date("d"), date("Y"));
// $ip_query = xtc_db_query("SELECT * FROM ".TABLE_CAMPAIGNS_IP." WHERE campaign='".xtc_db_input($_GET['refID'])."' and user_ip='".$_SESSION['tracking']['ip']."' and time > '".$check_date."'");
// if (!xtc_db_num_rows($ip_query))
xtc_db_perform(TABLE_CAMPAIGNS_IP,$insert_sql);
}
}
}
if (!isset ($_SESSION['tracking']['date']))
$_SESSION['tracking']['date'] = (date("Y-m-d H:i:s"));
if (!isset ($_SESSION['tracking']['browser']))
$_SESSION['tracking']['browser'] = $_SERVER["HTTP_USER_AGENT"];
$_SESSION['tracking']['browser'] = $_SERVER['HTTP_USER_AGENT'];
if (!isset($_SESSION['tracking']['pageview_history'])) $_SESSION['tracking']['pageview_history'] = array();
$i = count($_SESSION['tracking']['pageview_history']);
if ($i > 6) {
array_shift($_SESSION['tracking']['pageview_history']);
$_SESSION['tracking']['pageview_history'][6] = $ref_url;
} else {
$_SESSION['tracking']['pageview_history'][$i] = $ref_url;
}
//BOF - DokuMan - 2010-02-26 - set undefined index http_referer
//if ($_SESSION['tracking']['pageview_history'][$i] == $_SESSION['tracking']['http_referer'])
if (isset($_SESSION['tracking']['http_referer']) && $_SESSION['tracking']['pageview_history'][$i] == $_SESSION['tracking']['http_referer'])
array_shift($_SESSION['tracking']['pageview_history']);
//EOF - DokuMan - 2010-02-26 - set undefined index http_referer
}
?>
index.phpTop ca. Zeile 56
include (DIR_WS_MODULES.'default.php');
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
if (!defined(RM))
if (!defined('RM'))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');
lang/english/admin/customers.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: customers.php 1295 2005-10-08 16:59:56Z mz $
$Id: customers.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
ca. Zeile 17
define('HEADING_TITLE', 'Customers');
define('HEADING_TITLE_SEARCH', 'Search:');
define('TABLE_HEADING_CUSTOMERSCID','Customer ID');
define('TABLE_HEADING_FIRSTNAME', 'First Name');
define('TABLE_HEADING_LASTNAME', 'Last Name');
define('TABLE_HEADING_ACCOUNT_CREATED', 'Account Created');
define('TABLE_HEADING_ACTION', 'Action');
ca. Zeile 45
define('TEXT_DATE','Date');
define('TEXT_TITLE','Title');
define('TEXT_POSTER','Poster');
define('ENTRY_PASSWORD_CUSTOMER','Password:');
define('TEXT_SELECT','--Select--');
define('TABLE_HEADING_ACCOUNT_TYPE','Account');
define('TEXT_ACCOUNT','Yes');
define('TEXT_GUEST','No');
define('NEW_ORDER','New order ?');
lang/english/admin/orders.phpTop ca. Zeile 131
define('ENTRY_CUSTOMERS_ADDRESS', 'Customers Address:');
define('TEXT_ORDER', 'Order:');
define('TEXT_ORDER_HISTORY', 'Order History:');
define('TEXT_ORDER_STATUS', 'Order Status:');
define('TABLE_HEADING_ORDERS_ID', 'Ord-ID');
define('TEXT_SHIPPING_TO', 'Shipping to');
define('TEXT_SHIPPING_LANG', 'Language');
?>
lang/english/admin/orders_edit.phpTop ca. Zeile 91
Shippincosts must be changed manually! <br>
In this case, depending on the customer group the shippingcost entered gross or net! <br>
');
define('TEXT_CUSTOMER_GROUP_INFO', ' When you change the customer group, all invoice items are newly save!');
define('TEXT_CUSTOMER_GROUP_INFO', ' <span style="background:#FFD6D6;padding:3px;border:solid 1px red;">When you change the customer group, all invoice items are newly save!</span>');
//web28 2011-05-08 - new error input handling
define('TEXT_ORDER_TITLE', 'Title:');
define('TEXT_ORDER_VALUE', 'Value:');
ca. Zeile 106
//web28 2011-09-23 - add first- and lastname
define('TEXT_FIRSTNAME', 'Firstname:');
define('TEXT_LASTNAME', 'Lastname:');
define('TEXT_SAVE_CUSTOMERS_DATA', 'Save Customers Data');
?>
lang/english/english.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: english.php 1260 2005-09-29 17:48:04Z gwinger $
$Id: english.php 2721 2012-03-23 20:12:07Z Tomcraft1980 $
xt:Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 xt:Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(german.php,v 1.119 2003/05/19); www.oscommerce.com
(c) 2003 nextcommerce (german.php,v 1.25 2003/08/25); www.nextcommerce.org
(c) 2006 XT-Commerce
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 61
// text for gift voucher redeeming
define('IMAGE_REDEEM_GIFT','Redeem Gift Voucher!');
define('BOX_TITLE_STATISTICS','Statistics:');
define('BOX_ENTRY_CUSTOMERS','Customers');
define('BOX_ENTRY_PRODUCTS','Products');
define('BOX_ENTRY_REVIEWS','Reviews');
define('TEXT_VALIDATING','Not validated');
define('BOX_ENTRY_CUSTOMERS','Customers:');
define('BOX_ENTRY_PRODUCTS','Products:');
define('BOX_ENTRY_REVIEWS','Reviews:');
define('TEXT_VALIDATING','Not validated:');
// manufacturer box text
define('BOX_MANUFACTURER_INFO_HOMEPAGE', '%s Homepage');
define('BOX_MANUFACTURER_INFO_OTHER_PRODUCTS', 'More products'); //changed by electronica 2009-09-06
define('BOX_MANUFACTURER_INFO_OTHER_PRODUCTS', 'More products');
define('BOX_HEADING_ADD_PRODUCT_ID','Add to cart'); //changed by electronica 2009-09-06
define('BOX_HEADING_ADD_PRODUCT_ID','Add to cart');
define('BOX_LOGINBOX_STATUS','Customer group:');
define('BOX_LOGINBOX_DISCOUNT','Product discount');
define('BOX_LOGINBOX_DISCOUNT_TEXT','Discount');
define('BOX_LOGINBOX_DISCOUNT_OT','');
// reviews box text in includes/boxes/reviews.php
define('BOX_REVIEWS_WRITE_REVIEW', 'Review this product!');
define('BOX_REVIEWS_NO_WRITE_REVIEW', 'No review possible.');
define('BOX_REVIEWS_TEXT_OF_5_STARS', '%s of 5 stars!');
// pull down default text
define('PULL_DOWN_DEFAULT', 'Please choose');
// javascript messages
define('JS_ERROR', 'Missing necessary information!\nPlease fill in correctly.\n\n');
define('JS_REVIEW_TEXT', '* The text must consist of at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters..\n'); //changed by electronica 2009-09-06
define('JS_REVIEW_TEXT', '* The text must consist of at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters..\n');
define('JS_REVIEW_RATING', '* Enter your review.\n');
define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Please choose a method of payment for your order.\n');
define('JS_ERROR_SUBMITTED', 'This page has already been confirmed. Please click OK and wait until the process has finished.'); //changed by electronica 2009-09-06
define('JS_ERROR_SUBMITTED', 'This page has already been confirmed. Please click OK and wait until the process has finished.');
define('ERROR_NO_PAYMENT_MODULE_SELECTED', 'Please choose a method of payment for your order.');
/*
*
ca. Zeile 110
define('ENTRY_LAST_NAME_TEXT', '*');
define('ENTRY_DATE_OF_BIRTH_ERROR', 'Your date of birth needs to be entered in the following form DD/MM/YYYY (e.g. 05/21/1970) '); //Dokuman - 2009-06-03 - correct english date format
define('ENTRY_DATE_OF_BIRTH_TEXT', '* (e.g. 05/21/1970)'); //Dokuman - 2009-06-03 - correct english date format
define('ENTRY_EMAIL_ADDRESS_ERROR', 'Your e-mail address must consist of at least ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' characters.');
define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', 'The e-mail address you entered is incorrect - please correct it'); //changed by electronica 2009-09-06
define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', 'The e-mail address you entered is incorrect - please correct it');
define('ENTRY_EMAIL_ERROR_NOT_MATCHING', 'Your entered e-mail addresses do not match.'); // Hetfield - 2009-08-15 - confirm e-mail at registration
define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', 'The e-mail address you entered already exists in our database - please correct it'); //changed by electronica 2009-09-06
define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', 'The e-mail address you entered already exists in our database - please correct it');
define('ENTRY_EMAIL_ADDRESS_TEXT', '*');
define('ENTRY_STREET_ADDRESS_ERROR', 'Street/No. must consist of at least ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' characters.'); //changed by electronica 2009-09-06
define('ENTRY_STREET_ADDRESS_ERROR', 'Street/No. must consist of at least ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' characters.');
define('ENTRY_STREET_ADDRESS_TEXT', '*');
define('ENTRY_SUBURB_TEXT', '');
define('ENTRY_POST_CODE_ERROR', 'Your postcode must consist of at least ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.');
define('ENTRY_POST_CODE_TEXT', '*');
define('ENTRY_CITY_ERROR', 'City must consist of at least ' . ENTRY_CITY_MIN_LENGTH . ' characters.');
define('ENTRY_CITY_TEXT', '*');
define('ENTRY_STATE_ERROR', 'Your district must consist of at least ' . ENTRY_STATE_MIN_LENGTH . ' characters.');
define('ENTRY_STATE_ERROR_SELECT', 'Please choose your district from the list.'); //changed by electronica 2009-09-06
define('ENTRY_STATE_ERROR_SELECT', 'Please choose your district from the list.');
define('ENTRY_STATE_TEXT', '*');
define('ENTRY_COUNTRY_ERROR', 'Please choose your country.');
define('ENTRY_COUNTRY_TEXT', '*');
define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Your phone number must consist of at least ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.');
ca. Zeile 184
define('IMAGE_BUTTON_ADD_ADDRESS', 'New address');
define('IMAGE_BUTTON_BACK', 'Back');
define('IMAGE_BUTTON_CHANGE_ADDRESS', 'Change address');
define('IMAGE_BUTTON_CHECKOUT', 'Checkout');
define('IMAGE_BUTTON_CONFIRM_ORDER', 'Confirm order');
define('IMAGE_BUTTON_CONFIRM_ORDER', 'Buy');
define('IMAGE_BUTTON_CONTINUE', 'Next');
define('IMAGE_BUTTON_DELETE', 'Delete');
define('IMAGE_BUTTON_LOGIN', 'Login');
define('IMAGE_BUTTON_IN_CART', 'Add to cart'); //changed by electronica 2009-09-06
define('IMAGE_BUTTON_IN_CART', 'Add to cart');
define('IMAGE_BUTTON_SEARCH', 'Search');
define('IMAGE_BUTTON_UPDATE', 'Update');
define('IMAGE_BUTTON_UPDATE_CART', 'Update shopping cart');
define('IMAGE_BUTTON_WRITE_REVIEW', 'Write evaluation'); //changed by electronica 2009-09-06
define('IMAGE_BUTTON_WRITE_REVIEW', 'Write evaluation');
define('IMAGE_BUTTON_ADMIN', 'Admin');
define('IMAGE_BUTTON_PRODUCT_EDIT', 'Edit product');
// BOF - vr - 2010-02-20 removed double definition
// define('IMAGE_BUTTON_LOGIN', 'Login');
ca. Zeile 206
define('SMALL_IMAGE_BUTTON_EDIT', 'Edit');
define('SMALL_IMAGE_BUTTON_VIEW', 'View');
define('ICON_ARROW_RIGHT', 'Show more');
define('ICON_CART', 'Add to cart'); //changed by electronica 2009-09-06
define('ICON_CART', 'Add to cart');
define('ICON_SUCCESS', 'Success');
define('ICON_WARNING', 'Warning');
define('ICON_ERROR', 'Error');
ca. Zeile 243
* WARNINGS
*
*/
define('WARNING_INSTALL_DIRECTORY_EXISTS', 'Warning: The installation directory is still available on: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/xtc_installer. Please delete this directory for security reasons!');
define('WARNING_CONFIG_FILE_WRITEABLE', 'Warning: XT-Commerce is able to write to the configuration directory: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php. That represents a possible safety hazard - please correct the user access rights for this directory!');
define('WARNING_INSTALL_DIRECTORY_EXISTS', 'Warning: The installation directory is still available on: ' . dirname($_SERVER['SCRIPT_FILENAME']) . '/xtc_installer. Please delete this directory for security reasons!');
define('WARNING_CONFIG_FILE_WRITEABLE', 'Warning: xtcModified is able to write to the configuration directory: ' . dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php. That represents a possible safety hazard - please correct the user access rights for this directory!');
define('WARNING_SESSION_DIRECTORY_NON_EXISTENT', 'Warning: Directory for sesssions doesn´t exist: ' . xtc_session_save_path() . '. Sessions will not work until this directory has been created!');
define('WARNING_SESSION_DIRECTORY_NOT_WRITEABLE', 'Warning: XT-Commerce is not able to write into the session directory: ' . xtc_session_save_path() . '. Sessions will not work until the user access rights for this directory have been changed!');
define('WARNING_SESSION_DIRECTORY_NOT_WRITEABLE', 'Warning: xtcModified is not able to write into the session directory: ' . xtc_session_save_path() . '. Sessions will not work until the user access rights for this directory have been changed!');
define('WARNING_SESSION_AUTO_START', 'Warning: session.auto_start is activated (enabled) - Please deactivate (disable) this PHP feature in php.ini and restart your web server!');
define('WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT', 'Warning: Directory for article download does not exist: ' . DIR_FS_DOWNLOAD . '. This feature will not work until this directory has been created!');
define('SUCCESS_ACCOUNT_UPDATED', 'Your account has been updated successfully.');
ca. Zeile 256
define('ERROR_CURRENT_PASSWORD_NOT_MATCHING', 'The entered password does not match with the stored password. Please try again.');
define('TEXT_MAXIMUM_ENTRIES', '<font color="#ff0000"><strong>Reference:</strong></font> You are able to choose out of %s entries in you address book!');
define('SUCCESS_ADDRESS_BOOK_ENTRY_DELETED', 'The selected entry has been deleted successfully.');
define('SUCCESS_ADDRESS_BOOK_ENTRY_UPDATED', 'Your address book has been updated sucessfully!');
define('WARNING_PRIMARY_ADDRESS_DELETION', 'The standard postal address can not be deleted. Please create another address and define it as standard postal address first. Then this entry can be deleted.'); //changed by electronica 2009-09-06
define('WARNING_PRIMARY_ADDRESS_DELETION', 'The standard postal address can not be deleted. Please create another address and define it as standard postal address first. Then this entry can be deleted.');
define('ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY', 'This address book entry is not available.');
define('ERROR_ADDRESS_BOOK_FULL', 'Your adressbook is full. In order to add new addresses, please erase previous ones first.'); //changed by electronica 2009-09-06
define('ERROR_ADDRESS_BOOK_FULL', 'Your adressbook is full. In order to add new addresses, please erase previous ones first.');
define('ERROR_CHECKOUT_SHIPPING_NO_METHOD', 'No shipping method selected.');
define('ERROR_CHECKOUT_SHIPPING_NO_MODULE', 'No shipping method available.');
// conditions check
define('ERROR_CONDITIONS_NOT_ACCEPTED', 'Please accept our terms and conditions to proceed with your order.');
ca. Zeile 288
*/
define('TEXT_ALL_CATEGORIES', 'All categories');
define('TEXT_ALL_MANUFACTURERS', 'All manufacturers');
define('JS_AT_LEAST_ONE_INPUT', '* One of the following fields must be filled out:\n Keywords\n Date added from\n Date added to\n Price over\n Price up to\n'); //changed by electronica 2009-09-06
define('AT_LEAST_ONE_INPUT', 'One of the following fields must be filled out:<br />keywords consisting at least 3 characters<br />Price over<br />Price up to<br />'); //changed by electronica 2009-09-06
define('JS_AT_LEAST_ONE_INPUT', '* One of the following fields must be filled out:\n Keywords\n Date added from\n Date added to\n Price over\n Price up to\n');
define('AT_LEAST_ONE_INPUT', 'One of the following fields must be filled out:<br />keywords consisting at least 3 characters<br />Price over<br />Price up to<br />');
define('TEXT_SEARCH_TERM','Your search for: ');
define('JS_INVALID_FROM_DATE', '* Invalid from date\n');
define('JS_INVALID_TO_DATE', '* Invalid up to Date\n');
define('JS_TO_DATE_LESS_THAN_FROM_DATE', '* The from date must be larger or same size as up to now\n');
define('JS_PRICE_FROM_MUST_BE_NUM', '* Price over, must be a number\n');
define('JS_PRICE_TO_MUST_BE_NUM', '* Price up to, must be a number\n');
define('JS_PRICE_TO_LESS_THAN_PRICE_FROM', '* Price up to must be larger or same size as Price over.\n');
define('JS_INVALID_KEYWORDS', '* Invalid search key\n');
define('TEXT_LOGIN_ERROR', '<font color="#ff0000"><strong>ERROR:</strong></font> The entered \'e-mail address\' and/or the \'password\' do not match.'); //changed by electronica 2009-09-06
define('TEXT_NO_EMAIL_ADDRESS_FOUND', '<font color="#ff0000"><strong>WARNING:</strong></font> The e-mail address entered is not registered. Please try again.'); //changed by electronica 2009-09-06
define('TEXT_LOGIN_ERROR', '<font color="#ff0000"><strong>ERROR:</strong></font> The entered \'e-mail address\' and/or the \'password\' do not match.');
define('TEXT_NO_EMAIL_ADDRESS_FOUND', '<font color="#ff0000"><strong>WARNING:</strong></font> The e-mail address entered is not registered. Please try again.');
define('TEXT_PASSWORD_SENT', 'A new password was sent by e-mail.');
define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!');
define('TEXT_MORE_INFORMATION', 'For further information, please visit the <a style="text-decoration:underline;" href="%s" onclick="window.open(this.href); return false;">homepage</a> of this product.');
define('TEXT_DATE_ADDED', 'This Product was added to our catalogue on %s.');
define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This Product is expected to be on stock again on %s </font>');
define('SUB_TITLE_SUB_TOTAL', 'Sub-total:');
define('OUT_OF_STOCK_CANT_CHECKOUT', 'The products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' , are not available in the requested quantity.<br />Please decrease quantity for marked products. Thank you');//changed by electronica 2009-09-06
define('OUT_OF_STOCK_CAN_CHECKOUT', 'The products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' , are not available in the requested quantity.<br />We will restock the products currently out of stock as soon as possible. Partial delivery upon request.');//changed by electronica 2009-09-06
define('OUT_OF_STOCK_CANT_CHECKOUT', 'The products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' , are not available in the requested quantity.<br />Please decrease quantity for marked products. Thank you');
define('OUT_OF_STOCK_CAN_CHECKOUT', 'The products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' , are not available in the requested quantity.<br />We will restock the products currently out of stock as soon as possible. Partial delivery upon request.');
define('MINIMUM_ORDER_VALUE_NOT_REACHED_1', 'You need to reach the minimum order value of: '); //changed by electronica 2009-09-06
define('MINIMUM_ORDER_VALUE_NOT_REACHED_2', ' <br />Please increase order value by at least: '); //changed by electronica 2009-09-06
define('MINIMUM_ORDER_VALUE_NOT_REACHED_1', 'You need to reach the minimum order value of: ');
define('MINIMUM_ORDER_VALUE_NOT_REACHED_2', ' <br />Please increase order value by at least: ');
define('MAXIMUM_ORDER_VALUE_REACHED_1', 'You ordered more than the allowed amount of: ');
define('MAXIMUM_ORDER_VALUE_REACHED_2', '<br /> Please decrease your order by at least: '); //changed by electronica 2009-09-06
define('MAXIMUM_ORDER_VALUE_REACHED_2', '<br /> Please decrease your order by at least: ');
define('ERROR_INVALID_PRODUCT', 'The product chosen was not found!');
/*
ca. Zeile 381
* MISC
*
*/
define('TEXT_NEWSLETTER','You want to stay up to date?<br />No problem, receive our newsletter for the latest updates.'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_INPUT','Your e-mail adress has been registered in our system.<br />An e-mail with a confirmation link has been send out. Click the link in order to complete registration!'); //changed by electronica 2009-09-06
define('TEXT_NEWSLETTER','You want to stay up to date?<br />No problem, receive our newsletter for the latest updates.');
define('TEXT_EMAIL_INPUT','Your e-mail adress has been registered in our system.<br />An e-mail with a confirmation link has been send out. Click the link in order to complete registration!');
define('TEXT_WRONG_CODE','<font color="#ff0000">The security code you entered was not correct. Please try again. <br />The form is not case sensitive.</font>'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_EXIST_NO_NEWSLETTER','<font color="#ff0000">This e-mail address is registered but not yet activated!</font>'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_EXIST_NEWSLETTER','<font color="#ff0000">This e-mail address is already registered for the newsletter!</font>'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_NOT_EXIST','<font color="#ff0000">This e-mail address is not registered for newsletters!</font>'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_DEL','Your e-mail address was deleted successfully from our newsletter-database.'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_DEL_ERROR','<font color="#ff0000">An Error occured, your e-mail address has not been removed from our database!</font>'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_ACTIVE','<font color="#ff0000">Your e-mail address has successfully been registered for the newsletter!</font>'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_ACTIVE_ERROR','<font color="#ff0000">An error occured, your e-mail address has not been registered for the newsletter!</font>'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_SUBJECT','Your newsletter account'); //changed by electronica 2009-09-06
define('TEXT_WRONG_CODE','<font color="#ff0000">The security code you entered was not correct. Please try again. <br />The form is not case sensitive.</font>');
define('TEXT_EMAIL_EXIST_NO_NEWSLETTER','<font color="#ff0000">This e-mail address is registered but not yet activated!</font>');
define('TEXT_EMAIL_EXIST_NEWSLETTER','<font color="#ff0000">This e-mail address is already registered for the newsletter!</font>');
define('TEXT_EMAIL_NOT_EXIST','<font color="#ff0000">This e-mail address is not registered for newsletters!</font>');
define('TEXT_EMAIL_DEL','Your e-mail address was deleted successfully from our newsletter-database.');
define('TEXT_EMAIL_DEL_ERROR','<font color="#ff0000">An Error occured, your e-mail address has not been removed from our database!</font>');
define('TEXT_EMAIL_ACTIVE','<font color="#ff0000">Your e-mail address has successfully been registered for the newsletter!</font>');
define('TEXT_EMAIL_ACTIVE_ERROR','<font color="#ff0000">An error occured, your e-mail address has not been registered for the newsletter!</font>');
define('TEXT_EMAIL_SUBJECT','Your newsletter account');
define('TEXT_CUSTOMER_GUEST','Guest');
define('TEXT_LINK_MAIL_SENDED','Your new password request must be confirmed.<br />An e-mail with a confirmation link has been send out. Click the link in order to complete recieve a new password!');//changed by electronica 2009-09-06
define('TEXT_PASSWORD_MAIL_SENDED','You will receive an e-mail with your new password within minutes.<br />Please change your password after your first login.'); //changed by electronica 2009-09-06
define('TEXT_CODE_ERROR','The security code you entered was not correct. Please try again. <br />The form is not case sensitive.'); //changed by electronica 2009-09-06
define('TEXT_EMAIL_ERROR','The e-mail address is not registered in our store.<br />Please try again.');define('TEXT_EMAIL_ERROR','The security code you entered was not correct. Please try again. <br />The form is not case sensitive.'); //changed by electronica 2009-09-06
define('TEXT_NO_ACCOUNT','Your request for a new password is either invalid or timed out.<br />Please try again.'); //changed by electronica 2009-09-06
define('TEXT_LINK_MAIL_SENDED','Your new password request must be confirmed.<br />An e-mail with a confirmation link has been send out. Click the link in order to complete recieve a new password!');
define('TEXT_PASSWORD_MAIL_SENDED','You will receive an e-mail with your new password within minutes.<br />Please change your password after your first login.');
define('TEXT_CODE_ERROR','The security code you entered was not correct.<br />Please try again.');
define('TEXT_EMAIL_ERROR','The e-mail address is not registered in our store.<br />Please try again.');
define('TEXT_NO_ACCOUNT','Your request for a new password is either invalid or timed out.<br />Please try again.');
define('HEADING_PASSWORD_FORGOTTEN','Password renewal?');
define('TEXT_PASSWORD_FORGOTTEN','Change your password in three easy steps.');
define('TEXT_EMAIL_PASSWORD_FORGOTTEN','Confirmation mail for password renewal');
define('TEXT_EMAIL_PASSWORD_NEW_PASSWORD','Your new password');
define('ERROR_MAIL','Please check the data entered in the form');
define('CATEGORIE_NOT_FOUND','Category not found'); //changed by electronica 2009-09-06
define('CATEGORIE_NOT_FOUND','Category not found');
define('GV_FAQ', 'Gift voucher FAQ'); //changed by electronica 2009-09-06
define('GV_FAQ', 'Gift voucher FAQ');
define('ERROR_NO_REDEEM_CODE', 'You did not enter a redeem code.');
define('ERROR_NO_INVALID_REDEEM_GV', 'Invalid gift voucher code'); //changed by electronica 2009-09-06
define('TABLE_HEADING_CREDIT', 'Credits available'); //changed by electronica 2009-09-06
define('ERROR_NO_INVALID_REDEEM_GV', 'Invalid gift voucher code');
define('TABLE_HEADING_CREDIT', 'Credits available');
define('EMAIL_GV_TEXT_SUBJECT', 'A gift from %s');
define('MAIN_MESSAGE', 'You have decided to send a gift voucher worth %s to %s who\'s e-mail address is %s<br /><br />Following text will be included in the e-mail:<br /><br />Dear %s<br /><br />You have received a Gift voucher worth %s by %s'); //changed by electronica 2009-09-06
define('REDEEMED_AMOUNT','Your gift voucher was successfully added to your account. Gift voucher amount:'); //changed by electronica 2009-09-06
define('REDEEMED_COUPON','Your voucher has been successfully credited to your account and will be cashed automatically on your next purchase.'); //changed by electronica 2009-09-06
define('MAIN_MESSAGE', 'You have decided to send a gift voucher worth %s to %s who\'s e-mail address is %s<br /><br />Following text will be included in the e-mail:<br /><br />Dear %s<br /><br />You have received a Gift voucher worth %s by %s');
define('REDEEMED_AMOUNT','Your gift voucher was successfully added to your account. Gift voucher amount:');
define('REDEEMED_COUPON','Your voucher has been successfully credited to your account and will be cashed automatically on your purchase.');
define('ERROR_INVALID_USES_USER_COUPON','This voucher can only be redeemed '); //changed by electronica 2009-09-06
define('ERROR_INVALID_USES_COUPON','This coucher can only be redeemed '); //changed by electronica 2009-09-06
define('ERROR_INVALID_USES_USER_COUPON','This voucher can only be redeemed ');
define('ERROR_INVALID_USES_COUPON','This coucher can only be redeemed ');
define('TIMES',' times.');
define('ERROR_INVALID_STARTDATE_COUPON','Your coupon is not available yet.'); //changed by electronica 2009-09-06
define('ERROR_INVALID_FINISDATE_COUPON','Your voucher is already expired.'); //changed by electronica 2009-09-06
define('PERSONAL_MESSAGE', '%s writes:'); //changed by electronica 2009-09-06
define('ERROR_INVALID_STARTDATE_COUPON','Your coupon is not available yet.');
define('ERROR_INVALID_FINISDATE_COUPON','Your voucher is already expired.');
define('PERSONAL_MESSAGE', '%s writes:');
//Popup Window
// BOF - DokuMan - 2010-02-25 removed double definition
//define('TEXT_CLOSE_WINDOW', 'Close window.'); //changed by electronica 2009-09-06
//define('TEXT_CLOSE_WINDOW', 'Close window.');
// EOF - DokuMan - 2010-02-25 removed double definition
/*
*
* CUOPON POPUP
*
*/
define('TEXT_CLOSE_WINDOW', 'Close window [x]'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_HEADER', 'Your voucher has been successfully redeemed.'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_NAME', '<br /><br />Voucher name : %s'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_FIXED', '<br /><br />This voucher is worth %s off your next order'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_MINORDER', '<br /><br />You need to spend at least %s to be able to use the voucher.'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_FREESHIP', '<br /><br />This voucher gives you free shipping on your order'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_DESC', '<br /><br />Voucher description : %s'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_DATE', '<br /><br />This voucher is valid from: %s to %s'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_RESTRICT', '<br /><br />Product / Category Restrictions'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_CATEGORIES', 'Category'); //changed by electronica 2009-09-06
define('TEXT_COUPON_HELP_PRODUCTS', 'Product'); //changed by electronica 2009-09-06
define('TEXT_CLOSE_WINDOW', 'Close window [x]');
define('TEXT_COUPON_HELP_HEADER', 'Your voucher/coupon has been successfully redeemed.');
define('TEXT_COUPON_HELP_NAME', '<br /><br />Voucher/Coupon name : %s');
define('TEXT_COUPON_HELP_FIXED', '<br /><br />This voucher/coupon is worth %s off your next order');
define('TEXT_COUPON_HELP_MINORDER', '<br /><br />You need to spend at least %s to be able to use the voucher.');
define('TEXT_COUPON_HELP_FREESHIP', '<br /><br />This voucher gives you free shipping on your order');
define('TEXT_COUPON_HELP_DESC', '<br /><br />Voucher description : %s');
define('TEXT_COUPON_HELP_DATE', '<br /><br />This voucher is valid from: %s to %s');
define('TEXT_COUPON_HELP_RESTRICT', '<br /><br />Product / Category Restrictions');
define('TEXT_COUPON_HELP_CATEGORIES', 'Category');
define('TEXT_COUPON_HELP_PRODUCTS', 'Product');
//BOF - DokuMan - 2010-10-28 - Added text-constant for emailing voucher
define('ERROR_ENTRY_AMOUNT_CHECK', 'Invalid amount');
define('ERROR_ENTRY_EMAIL_ADDRESS_CHECK', 'Invalid e-mail address');
//EOF - DokuMan - 2010-10-28 - Added text-constant for emailing voucher
// VAT Reg No
define('ENTRY_VAT_TEXT','* for EU-Countries only'); //changed by electronica 2009-09-06 anmerkung: besser wenn laden im EU ausland ist
define('ENTRY_VAT_ERROR', 'The chosen VAT Reg No is not valid or cannot be verified at the moment! Please enter a valid VAT Reg No or leave this field empty.'); //changed by electronica 2009-09-06
define('ENTRY_VAT_TEXT','* for EU-Countries only'); // anmerkung: besser wenn laden im EU ausland ist
define('ENTRY_VAT_ERROR', 'The chosen VAT Reg No is not valid or cannot be verified at the moment! Please enter a valid VAT Reg No or leave this field empty.');
define('MSRP','MSRP');
define('YOUR_PRICE','your price ');
// BOF - Tomcraft - 2009-10-09 - Added text-constant for unit price
define('UNIT_PRICE','unit price ');
// EOF - Tomcraft - 2009-10-09 - Added text-constant for unit price
define('ONLY',' only ');
define('ONLY',' Now only ');// DokuMan - Werbung mit durchgestrichenen Statt-Preisen ist zulässig
define('FROM','from ');
define('YOU_SAVE','you save ');
define('INSTEAD','instead of ');
define('INSTEAD','Our previous price ');// DokuMan - Werbung mit durchgestrichenen Statt-Preisen ist zulässig
define('TXT_PER',' per ');
define('TAX_INFO_INCL','%s VAT incl.');
define('TAX_INFO_EXCL','%s VAT excl.');
define('TAX_INFO_ADD','%s VAT plus.');
ca. Zeile 479
// changes 3.0.4 SP2.2
define('ENTRY_PRIVACY_ERROR','Please accept our privacy policy!');
define('TEXT_PAYMENT_FEE','Paymentfee');
define('_MODULE_INVALID_SHIPPING_ZONE', 'Unfortunately we do not deliver to the chosen country.'); //changed by electronica 2009-09-06
define('_MODULE_UNDEFINED_SHIPPING_RATE', 'Shipping costs cannot be calculated at the moment, please contact us.'); //changed by electronica 2009-09-06
define('_MODULE_INVALID_SHIPPING_ZONE', 'Unfortunately we do not deliver to the chosen country.');
define('_MODULE_UNDEFINED_SHIPPING_RATE', 'Shipping costs cannot be calculated at the moment, please contact us.');
//Dokuman - 2009-08-21 - Added 'delete account' functionality for customers
define('NAVBAR_TITLE_1_ACCOUNT_DELETE', 'Your account');
define('NAVBAR_TITLE_2_ACCOUNT_DELETE', 'Delete account');
ca. Zeile 504
define('PAYPAL_TAX','Tax');
define('PAYPAL_EXP_WARN','Note! Possibly resulting forwarding expenses are only computed in the shop finally.');
define('PAYPAL_EXP_VORL','Provisional forwarding expenses');
define('PAYPAL_EXP_VERS','12.90');
// 09.01.11
define('PAYPAL_ADRESSE','The country in your PayPal dispatch address is not registered in our shop.<br />Please contact us.<br />Thanks for you understanding.<br />From PayPal received country: ');
// 17.09.11
define('PAYPAL_AMMOUNT_NULL','The order sum which can be expected (without dispatch) is directly 0.<br />Thus PayPal express is not available.<br />Please select another payment means.<br />Thanks for your understanding.<br />');
// EOF - web28 - 2010-05-07 - PayPal API Modul
define('BASICPRICE_VPE_TEXT','in this volume only '); // Hetfield - 2009-11-26 - Added language definition for vpe at graduated prices
//web - 2010-07-11 - Preisanzeige bei Staffelpreisen (größte Staffel)
define('GRADUATED_PRICE_MAX_VALUE', 'from');
// BOF - DokuMan - 2011-09-20 - E-Mail SQL errors
define('ERROR_SQL_DB_QUERY','We are sorry, but an database error has occurred somewhere on this page!');
define('ERROR_SQL_DB_QUERY_REDIRECT','You will be redirected back to our home page in %s seconds!');
// EOF - DokuMan - 2011-09-20 - E-Mail SQL errors
?>
lang/german/admin/customers.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: customers.php 1295 2005-10-08 16:59:56Z mz $
$Id: customers.php 2666 2012-02-23 11:38:17Z dokuman $
XT-Commerce - community made shopping
http://www.xt-commerce.com
ca. Zeile 17
define('HEADING_TITLE', 'Kunden');
define('HEADING_TITLE_SEARCH', 'Suche:');
define('TABLE_HEADING_CUSTOMERSCID','Kundennummer');
define('TABLE_HEADING_FIRSTNAME', 'Vorname');
define('TABLE_HEADING_LASTNAME', 'Nachname');
define('TABLE_HEADING_ACCOUNT_CREATED', 'Zugang erstellt am');
define('TABLE_HEADING_ACTION', 'Aktion');
ca. Zeile 45
define('TEXT_DATE','Datum');
define('TEXT_TITLE','Titel');
define('TEXT_POSTER','Verfasser');
define('ENTRY_PASSWORD_CUSTOMER','Passwort:');
define('TEXT_SELECT','--Auswahl--');
define('TABLE_HEADING_ACCOUNT_TYPE','Konto');
define('TEXT_ACCOUNT','Ja');
define('TEXT_GUEST','Nein');
define('NEW_ORDER','Neue Bestellung ?');
ca. Zeile 58
// NEU HINZUGEFUEGT 04.12.2008 - UMSATZANZEIGE BEI KUNDEN 03.12.2008
define('TABLE_HEADING_UMSATZ','Umsatz');
// BOF - web28 - 2010-05-28 - added customers_email_address
define('TABLE_HEADING_EMAIL','Email');
define('TABLE_HEADING_EMAIL','E-Mail');
// EOF - web28 - 2010-05-28 - added customers_email_address
?>
lang/german/admin/orders.phpTop ca. Zeile 40
define('TABLE_HEADING_COMMENTS', 'Kommentar');
define('TABLE_HEADING_CUSTOMERS', 'Kunden');
define('TABLE_HEADING_ORDER_TOTAL', 'Gesamtwert');
define('TABLE_HEADING_DATE_PURCHASED', 'Bestelldatum');
define('TABLE_HEADING_STATUS', 'Status');
define('TABLE_HEADING_ACTION', 'Aktion');
define('TABLE_HEADING_QUANTITY', 'Anzahl');
define('TABLE_HEADING_PRODUCTS_MODEL', 'Artikel-Nr.');
define('TABLE_HEADING_PRODUCTS', 'Artikel');
ca. Zeile 131
define('ENTRY_CUSTOMERS_ADDRESS', 'Kundenadresse:');
define('TEXT_ORDER', 'Bestellung:');
define('TEXT_ORDER_HISTORY', 'Bestellhistorie:');
define('TEXT_ORDER_STATUS', 'Bestellstatus:');
define('TABLE_HEADING_ORDERS_ID', 'Best.Nr.');
define('TEXT_SHIPPING_TO', 'Versand nach');
?>
lang/german/admin/orders_edit.phpTop ca. Zeile 91
Versandkosten müssen manuell geändert werden!<br>
Hierbei sind je nach Kundengruppe die Versandkosten brutto oder netto einzutragen!<br>
');
define('TEXT_CUSTOMER_GROUP_INFO', ' Bei einem Wechsel der Kundengruppe sind alle Einzelposten der Rechnung neu abzuspeichern!');
define('TEXT_CUSTOMER_GROUP_INFO', ' <span style="background:#FFD6D6;padding:3px;border:solid 1px red;">Bei einem Wechsel der Kundengruppe sind alle Einzelposten der Rechnung neu abzuspeichern!</span>');
//web28 2011-05-08 - new error input handling
define('TEXT_ORDER_TITLE', 'Titel:');
define('TEXT_ORDER_VALUE', 'Wert:');
ca. Zeile 106
//web28 2011-09-23 - add first- and lastname
define('TEXT_FIRSTNAME', 'Vorname:');
define('TEXT_LASTNAME', 'Nachname:');
define('TEXT_SAVE_CUSTOMERS_DATA', 'Kundendaten speichern');
?>
lang/german/german.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: german.php 302 2007-03-30 08:25:49Z mzanier $
$Id: german.php 2751 2012-04-12 13:28:06Z Tomcraft1980 $
xt:Commerce - community made shopping
http://www.xt-Commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 xt:Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(german.php,v 1.119 2003/05/19); www.oscommerce.com
(c) 2003 nextcommerce (german.php,v 1.25 2003/08/25); www.nextcommerce.org
(c) 2006 XT-Commerce
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 61
// text for gift voucher redeeming
define('IMAGE_REDEEM_GIFT','Gutschein Einlösen!');
define('BOX_TITLE_STATISTICS','Statistik:');
define('BOX_ENTRY_CUSTOMERS','Kunden');
define('BOX_ENTRY_PRODUCTS','Artikel');
define('BOX_ENTRY_REVIEWS','Bewertungen');
define('TEXT_VALIDATING','Nicht bestätigt');
define('BOX_ENTRY_CUSTOMERS','Kunden:');
define('BOX_ENTRY_PRODUCTS','Artikel:');
define('BOX_ENTRY_REVIEWS','Bewertungen:');
define('TEXT_VALIDATING','Nicht bestätigt:');
// manufacturer box text
define('BOX_MANUFACTURER_INFO_HOMEPAGE', '%s Homepage');
define('BOX_MANUFACTURER_INFO_OTHER_PRODUCTS', 'Mehr Artikel');
ca. Zeile 79
define('BOX_LOGINBOX_DISCOUNT_OT','');
// reviews box text in includes/boxes/reviews.php
define('BOX_REVIEWS_WRITE_REVIEW', 'Bewerten Sie diesen Artikel!');
define('BOX_REVIEWS_NO_WRITE_REVIEW', 'Keine Bewertung möglich.');
define('BOX_REVIEWS_TEXT_OF_5_STARS', '%s von 5 Sternen!');
// pull down default text
define('PULL_DOWN_DEFAULT', 'Bitte wählen');
ca. Zeile 184
define('IMAGE_BUTTON_ADD_ADDRESS', 'Neue Adresse');
define('IMAGE_BUTTON_BACK', 'Zurück');
define('IMAGE_BUTTON_CHANGE_ADDRESS', 'Adresse ändern');
define('IMAGE_BUTTON_CHECKOUT', 'Kasse');
define('IMAGE_BUTTON_CONFIRM_ORDER', 'Bestellung bestätigen');
define('IMAGE_BUTTON_CONFIRM_ORDER', 'Kaufen');
define('IMAGE_BUTTON_CONTINUE', 'Weiter');
define('IMAGE_BUTTON_DELETE', 'Löschen');
define('IMAGE_BUTTON_LOGIN', 'Anmelden');
define('IMAGE_BUTTON_IN_CART', 'In den Warenkorb');
ca. Zeile 199
// BOF - vr - 2010-02-20 removed double definition
// define('IMAGE_BUTTON_LOGIN', 'Anmelden');
// EOF - vr - 2010-02-20 removed double definition
define('IMAGE_BUTTON_SEND', 'Absenden'); //DokuMan - 2010-03-15 - Added button description for contact form
define('IMAGE_BUTTON_CONTINUE_SHOPPING', 'Einkauf Fortsetzen'); //Hendrik - 2010-11-12 - used in template xtc5...shopping_cart.html
define('SMALL_IMAGE_BUTTON_DELETE', 'Löschen');
define('SMALL_IMAGE_BUTTON_EDIT', 'Ändern');
define('SMALL_IMAGE_BUTTON_VIEW', 'Anzeigen');
ca. Zeile 208
define('ICON_ARROW_RIGHT', 'Zeige mehr');
define('ICON_CART', 'In den Warenkorb');
define('ICON_SUCCESS', 'Erfolg');
define('ICON_WARNING', 'Warnung');
define('ICON_ERROR', 'Fehler');
define('TEXT_PRINT', 'drucken'); //DokuMan - 2009-05-26 - Added description for 'account_history_info.php'
/*
ca. Zeile 226
define('TEXT_DESCENDINGLY', 'absteigend');
define('TEXT_ASCENDINGLY', 'aufsteigend');
define('TEXT_BY', ' nach ');
define('TEXT_OF_5_STARS', '%s von 5 Sternen!');
define('TEXT_REVIEW_BY', 'von %s');
define('TEXT_REVIEW_WORD_COUNT', '%s Worte');
define('TEXT_REVIEW_RATING', 'Bewertung: %s [%s]');
define('TEXT_REVIEW_DATE_ADDED', 'Hinzugefügt am: %s');
ca. Zeile 240
* WARNINGS
*
*/
define('WARNING_INSTALL_DIRECTORY_EXISTS', 'Warnung: Das Installationverzeichnis ist noch vorhanden auf: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/xtc_installer. Bitte löschen Sie das Verzeichnis aus Gründen der Sicherheit!');
define('WARNING_CONFIG_FILE_WRITEABLE', 'Warnung: xt:Commerce kann in die Konfigurationsdatei schreiben: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php. Das stellt ein mögliches Sicherheitsrisiko dar - bitte korrigieren Sie die Benutzerberechtigungen zu dieser Datei!');
define('WARNING_INSTALL_DIRECTORY_EXISTS', 'Warnung: Das Installationverzeichnis ist noch vorhanden auf: ' . dirname($_SERVER['SCRIPT_FILENAME']) . '/xtc_installer. Bitte löschen Sie das Verzeichnis aus Gründen der Sicherheit!');
define('WARNING_CONFIG_FILE_WRITEABLE', 'Warnung: xt:Commerce kann in die Konfigurationsdatei schreiben: ' . dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php. Das stellt ein mögliches Sicherheitsrisiko dar - bitte korrigieren Sie die Benutzerberechtigungen zu dieser Datei!');
define('WARNING_SESSION_DIRECTORY_NON_EXISTENT', 'Warnung: Das Verzeichnis für die Sessions existiert nicht: ' . xtc_session_save_path() . '. Die Sessions werden nicht funktionieren bis das Verzeichnis erstellt wurde!');
define('WARNING_SESSION_DIRECTORY_NOT_WRITEABLE', 'Warnung: xt:Commerce kann nicht in das Sessions Verzeichnis schreiben: ' . xtc_session_save_path() . '. Die Sessions werden nicht funktionieren bis die richtigen Benutzerberechtigungen gesetzt wurden!');
define('WARNING_SESSION_AUTO_START', 'Warnung: session.auto_start ist aktiviert (enabled) - Bitte deaktivieren (disabled) Sie dieses PHP Feature in der php.ini und starten Sie den WEB-Server neu!');
define('WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT', 'Warnung: Das Verzeichnis für den Artikel Download existiert nicht: ' . DIR_FS_DOWNLOAD . '. Diese Funktion wird nicht funktionieren bis das Verzeichnis erstellt wurde!');
ca. Zeile 256
define('SUCCESS_ADDRESS_BOOK_ENTRY_UPDATED', 'Ihr Adressbuch wurde erfolgreich aktualisiert!');
define('WARNING_PRIMARY_ADDRESS_DELETION', 'Die Standardadresse kann nicht gelöscht werden. Bitte erst eine andere Standardadresse wählen. Danach kann der Eintrag gelöscht werden.');
define('ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY', 'Dieser Adressbucheintrag ist nicht vorhanden.');
define('ERROR_ADDRESS_BOOK_FULL', 'Ihr Adressbuch kann keine weiteren Adressen aufnehmen. Bitte löschen Sie eine nicht mehr benötigte Adresse. Danach können Sie einen neuen Eintrag speichern.');
define('ERROR_CHECKOUT_SHIPPING_NO_METHOD', 'Es wurde keine Versandart ausgewählt.');
define('ERROR_CHECKOUT_SHIPPING_NO_MODULE', 'Es ist keine Versandart vorhanden.');
// conditions check
define('ERROR_CONDITIONS_NOT_ACCEPTED', '* Sofern Sie unsere Allgemeinen Geschäftsbedingungen nicht akzeptieren,\n können wir Ihre Bestellung bedauerlicherweise nicht entgegennehmen!\n\n');
ca. Zeile 266
define('TAX_ADD_TAX','inkl. ');
define('TAX_NO_TAX','zzgl. ');
define('NOT_ALLOWED_TO_SEE_PRICES','Sie können als Gast (bzw mit Ihrem derzeitigen Status) keine Preise sehen');
define('NOT_ALLOWED_TO_SEE_PRICES','Sie können als Gast (bzw. mit Ihrem derzeitigen Status) keine Preise sehen');
define('NOT_ALLOWED_TO_SEE_PRICES_TEXT','Sie haben keine Erlaubnis, Preise zu sehen. Erstellen Sie bitte ein Kundenkonto.');
define('TEXT_DOWNLOAD','Download');
define('TEXT_VIEW','Ansehen');
define('TEXT_BUY', '1 x \'');
define('TEXT_NOW', '\' bestellen');
define('TEXT_GUEST',' Gast');
define('TEXT_SEARCH_ENGINE_AGENT','Suchmaschine');
/*
*
* ADVANCED SEARCH
ca. Zeile 286
define('TEXT_ALL_CATEGORIES', 'Alle Kategorien');
define('TEXT_ALL_MANUFACTURERS', 'Alle Hersteller');
define('JS_AT_LEAST_ONE_INPUT', '* Eines der folgenden Felder muss ausgefüllt werden:\n Stichworte\n Preis ab\n Preis bis\n');
define('AT_LEAST_ONE_INPUT', 'Eines der folgenden Felder muss ausgefüllt werden:<br />Stichworte mit mindestens drei Zeichen<br />Preis ab<br />Preis bis<br />');
define('TEXT_SEARCH_TERM','Ihre Suche nach: ');
define('JS_INVALID_FROM_DATE', '* ungültiges Datum (von)\n');
define('JS_INVALID_TO_DATE', '* ungültiges Datum (bis)\n');
define('JS_TO_DATE_LESS_THAN_FROM_DATE', '* Das Datum(von) muss größer oder gleich sein als das Datum (bis)\n');
define('JS_PRICE_FROM_MUST_BE_NUM', '* \"Preis ab\" muss eine Zahl sein\n\n');
ca. Zeile 410
define('ERROR_NO_REDEEM_CODE', 'Sie haben leider keinen Code eingegeben.');
define('ERROR_NO_INVALID_REDEEM_GV', 'Ungültiger Gutscheincode');
define('TABLE_HEADING_CREDIT', 'Guthaben');
define('EMAIL_GV_TEXT_SUBJECT', 'Ein Geschenk von %s');
define('MAIN_MESSAGE', 'Sie haben sich dazu entschieden, einen Gutschein im Wert von %s an %s versenden, dessen E-Mail-Adresse %s lautet.<br /><br />Folgender Text erscheint in Ihrer E-Mail:<br /><br />Hallo %s<br /><br />Ihnen wurde ein Gutschein im Wert von %s durch %s geschickt.');
define('MAIN_MESSAGE', 'Sie haben sich dazu entschieden, einen Gutschein im Wert von %s an %s zu versenden, dessen E-Mail-Adresse %s lautet.<br /><br />Folgender Text erscheint in Ihrer E-Mail:<br /><br />Hallo %s<br /><br />Ihnen wurde ein Gutschein im Wert von %s durch %s geschickt.');
define('REDEEMED_AMOUNT','Ihr Gutschein wurde erfolgreich auf Ihr Konto verbucht. Gutscheinwert:');
define('REDEEMED_COUPON','Ihr Coupon wurde erfolgreich eingebucht und wird bei Ihrer nächsten Bestellung automatisch eingelöst.');
define('REDEEMED_COUPON','Ihr Coupon wurde erfolgreich eingebucht und wird bei Ihrer Bestellung automatisch eingelöst.');
define('ERROR_INVALID_USES_USER_COUPON','Sie können den Coupon nur ');
define('ERROR_INVALID_USES_COUPON','Dieser Coupon können Kunden nur ');
define('TIMES',' mal einlösen.');
ca. Zeile 433
*
*/
define('TEXT_CLOSE_WINDOW', 'Fenster schliessen [x]');
define('TEXT_COUPON_HELP_HEADER', 'Ihr Gutschein wurde erfolgreich verbucht.');
define('TEXT_COUPON_HELP_NAME', '<br /><br />Gutscheinbezeichnung: %s');
define('TEXT_COUPON_HELP_FIXED', '<br /><br />Der Gutscheinwert beträgt %s ');
define('TEXT_COUPON_HELP_HEADER', 'Ihr Gutschein/Coupon wurde erfolgreich verbucht.');
define('TEXT_COUPON_HELP_NAME', '<br /><br />Gutschein-/Couponbezeichnung: %s');
define('TEXT_COUPON_HELP_FIXED', '<br /><br />Der Gutschein-/Couponwert beträgt %s ');
define('TEXT_COUPON_HELP_MINORDER', '<br /><br />Der Mindestbestellwert beträgt %s ');
define('TEXT_COUPON_HELP_FREESHIP', '<br /><br />Gutschein für kostenlosen Versand');
define('TEXT_COUPON_HELP_DESC', '<br /><br />Couponbeschreibung: %s');
define('TEXT_COUPON_HELP_DATE', '<br /><br />Dieser Coupon ist gültig vom %s bis %s');
define('TEXT_COUPON_HELP_RESTRICT', '<br /><br />Artikel / Kategorie Einschränkungen');
define('TEXT_COUPON_HELP_CATEGORIES', 'Kategorie');
define('TEXT_COUPON_HELP_PRODUCTS', 'Artikel');
//BOF - DokuMan - 2010-10-28 - Added text-constant for emailing voucher
define('ERROR_ENTRY_AMOUNT_CHECK', 'Ungültiger Gutscheinbetrag');
define('ERROR_ENTRY_EMAIL_ADDRESS_CHECK', 'Ungültige E-Mail Adresse');
//EOF - DokuMan - 2010-10-28 - Added text-constant for emailing voucher
// VAT Reg No
define('ENTRY_VAT_TEXT', 'Nur für Deutschland und EU!');
define('ENTRY_VAT_ERROR', 'Die eingegebene USt-IdNr. ist ungültig oder kann derzeit nicht überprüft werden! Bitte geben Sie eine gültige ID ein oder lassen Sie das Feld zunächst leer.');
ca. Zeile 452
define('YOUR_PRICE','Ihr Preis ');
// BOF - Tomcraft - 2009-10-09 - Added text-constant for unit price
define('UNIT_PRICE','Stückpreis ');
// EOF - Tomcraft - 2009-10-09 - Added text-constant for unit price
define('ONLY',' Nur ');
define('ONLY',' Jetzt nur ');// DokuMan - Werbung mit durchgestrichenen Statt-Preisen ist zulässig
define('FROM','Ab ');
define('YOU_SAVE','Sie sparen ');
define('INSTEAD','Statt ');
define('INSTEAD','Unser bisheriger Preis ');// DokuMan - Werbung mit durchgestrichenen Statt-Preisen ist zulässig
define('TXT_PER',' pro ');
define('TAX_INFO_INCL','inkl. %s MwSt.');
define('TAX_INFO_EXCL','exkl. %s MwSt.');
define('TAX_INFO_ADD','zzgl. %s MwSt.');
ca. Zeile 496
define('PAYPAL_TAX','MwSt.');
define('PAYPAL_EXP_WARN','Achtung! Eventuell anfallende Versandkosten werden erst im Shop endgültig berechnet.');
define('PAYPAL_EXP_VORL','Vorläufige Versandkosten');
define('PAYPAL_EXP_VERS','6.90');
// 09.01.11
define('PAYPAL_ADRESSE','Das Land in Ihrer PayPal-Versand-Adresse ist in unserem Shop nicht eingetragen.<br />Bitte nehmen Sie mit uns Kontakt auf.<br />Danke für Ihr Verständnis.<br />Von PayPal empfangenes Land: ');
// 17.09.11
define('PAYPAL_AMMOUNT_NULL','Die zu erwartende Auftrags-Summe (ohne Versand) ist gleich 0.<br />Dadurch steht PayPal Express nicht zur Verfügung.<br />Bitte wählen Sie eine andere Zahlungsart.<br />Danke für Ihr Verständnis.<br />');
// EOF - web28 - 2010-05-07 - PayPal API Modul
define('BASICPRICE_VPE_TEXT','bei dieser Menge nur '); // Hetfield - 2009-11-26 - Added language definition for vpe at graduated prices
//web - 2010-07-11 - Preisanzeige bei Staffelpreisen (größte Staffel)
define('GRADUATED_PRICE_MAX_VALUE', 'ab');
//web28 - 2010-08-20 - VERSANDKOSTEN WARENKORB
define('_SHIPPING_TO', 'Versand nach ');
// BOF - DokuMan - 2011-09-20 - E-Mail SQL errors
define('ERROR_SQL_DB_QUERY','Es tut uns leid, aber es ist ein Datenbankfehler aufgetreten.');
define('ERROR_SQL_DB_QUERY_REDIRECT','Sie werden in %s Sekunden auf unsere Homepage weitergeleitet!');
// EOF - DokuMan - 2011-09-20 - E-Mail SQL errors
?>
login_admin.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
login_admin.php 2008-08-10 gambio
/* -----------------------------------------------------------------------------------------
$Id: login_admin.php 2877 2012-05-16 11:01:31Z web28 $
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2008 Gambio OHG - login_admin.php 2008-08-10 gambio
Gambio OHG
http://www.gambio.de
Copyright (c) 2008 Gambio OHG
Released under the GNU General Public License
--------------------------------------------------------------
*/
?><?php
---------------------------------------------------------------------------------------*/
// USAGE: /login_admin.php?repair=se_friendly
// USAGE: /login_admin.php?repair=sess_write
// USAGE: /login_admin.php?repair=sess_default
// USAGE: /login_admin.php?repair=xtc5_template
// USAGE: /login_admin.php?show_error=none
// USAGE: /login_admin.php?show_error=all
// USAGE: /login_admin.php?show_error=shop
// USAGE: /login_admin.php?show_error=admin
//BOC web28 parameter validation
$error = false;
//repair
$allwowed_repair_array = array('se_friendly','sess_write','sess_default','xtc5_template');
if (isset($_GET['repair']) && !empty($_GET['repair']) && !in_array($_GET['repair'],$allwowed_repair_array)) {
$error = true;
}
if (isset($_POST['repair']) && !empty($_POST['repair']) && !in_array($_POST['repair'],$allwowed_repair_array)) {
$error = true;
}
//show_error
$allowed_show_error_array = array('none','shop','admin','all');
if (isset($_GET['show_error']) && !empty($_GET['show_error']) && !in_array($_GET['show_error'],$allowed_show_error_array)) {
$error = true;
}
if (isset($_POST['show_error']) && !empty($_POST['show_error']) && !in_array($_POST['show_error'],$allowed_show_error_array)) {
$error = true;
}
//parameter error
if ($error) {
unset($_GET['repair']);
unset($_GET['show_error']);
unset($_POST['repair']);
unset($_POST['show_error']);
}
//EOC web28 parameter validation
if(isset($_GET['repair'] )) {
if(isset($_GET['repair']) || isset($_GET['show_error'])) {
$action = 'login_admin.php';
} else {
$action = 'login.php?action=process';
}
if(isset($_POST['repair'] )) {
include('includes/application_top.php');
if(isset($_POST['repair']) || isset($_POST['show_error'])) {
$result = mysql_query('
SELECT customers_id
FROM customers
WHERE
customers_email_address = "'. xtc_db_prepare_input($_POST['email_address']) .'" AND
customers_password = md5("'. xtc_db_prepare_input($_POST['password'] ) .'") AND
customers_status = 0
');
if(mysql_num_rows($result) > 0)
{
//BOC loading only necessary functions
// Set the local configuration parameters - mainly for developers or the main-configure
if (file_exists('includes/local/configure.php')) {
include('includes/local/configure.php');
} else {
require('includes/configure.php');
}
require_once(DIR_WS_INCLUDES . 'database_tables.php');
require_once(DIR_FS_INC . 'xtc_db_connect.inc.php');
require_once(DIR_FS_INC . 'xtc_db_close.inc.php');
require_once(DIR_FS_INC . 'xtc_db_error.inc.php');
require_once(DIR_FS_INC . 'xtc_db_query.inc.php');
require_once(DIR_FS_INC . 'xtc_not_null.inc.php');
require_once(DIR_FS_INC . 'xtc_db_fetch_array.inc.php');
require_once(DIR_FS_INC . 'xtc_db_input.inc.php');
require_once(DIR_FS_INC . 'xtc_validate_password.inc.php');
require_once(DIR_WS_CLASSES.'class.inputfilter.php');
//EOC loading only necessary functions
xtc_db_connect() or die('Unable to connect to database server!');
//$_POST security
$InputFilter = new InputFilter();
$_POST = $InputFilter->process($_POST);
$_POST = $InputFilter->safeSQL($_POST);
$check_customer_query = xtc_db_query('
SELECT customers_id,
customers_password,
customers_email_address
FROM '. TABLE_CUSTOMERS .'
WHERE customers_email_address = "'. xtc_db_input($_POST['email_address']) .'"
AND customers_status = 0');
$check_customer = xtc_db_fetch_array($check_customer_query);
if(!xtc_validate_password(xtc_db_input($_POST['password']),
$check_customer['customers_password'],
$check_customer['customers_email_address'])) {
die('Zugriff verweigert.');
} else {
if (xtc_not_null($_POST['repair'])) {
//repair
switch($_POST['repair']) {
case 'se_friendly':
mysql_query('
xtc_db_query('
UPDATE configuration
SET configuration_value = "false"
WHERE configuration_key = "SEARCH_ENGINE_FRIENDLY_URLS"
');
die('Report: Die Einstellung "Suchmaschinenfreundliche URLs verwenden" wurde deaktiviert.');
break;
case 'sess_write':
mysql_query('
xtc_db_query('
UPDATE configuration
SET configuration_value = "'.DIR_FS_CATALOG.'cache"
WHERE configuration_key = "SESSION_WRITE_DIRECTORY"
');
die('Report: SESSION_WRITE_DIRECTORY wurde auf das Cache-Verzeichnis gerichtet.');
break;
case 'sess_default':
mysql_query('
xtc_db_query('
UPDATE configuration
SET configuration_value = "False"
WHERE configuration_key = "SESSION_FORCE_COOKIE_USE"
');
mysql_query('
xtc_db_query('
UPDATE configuration
SET configuration_value = "False"
WHERE configuration_key = "SESSION_CHECK_SSL_SESSION_ID"
');
mysql_query('
xtc_db_query('
UPDATE configuration
SET configuration_value = "False"
WHERE configuration_key = "SESSION_CHECK_USER_AGENT"
');
mysql_query('
xtc_db_query('
UPDATE configuration
SET configuration_value = "False"
WHERE configuration_key = "SESSION_CHECK_IP_ADDRESS"
');
mysql_query('
xtc_db_query('
UPDATE configuration
SET configuration_value = "False"
WHERE configuration_key = "SESSION_RECREATE"
');
die('Report: Die Session-Einstellungen wurden auf die Standardwerte zurückgesetzt.');
break;
//BOF - DokuMan - 2012-02-06 - reset template to xtcModified default template (xtc5)
case 'xtc5_template':
xtc_db_query('
UPDATE configuration
SET configuration_value = "xtc5"
WHERE configuration_key = "CURRENT_TEMPLATE"
');
die('Report: CURRENT_TEMPLATE wurde auf das xtc5-Standardtemplate zurückgesetzt.');
break;
//EOF - DokuMan - 2012-02-06 - reset template to xtcModified default template (xtc5)
default:
die('Report: repair-Befehl ungültig.');
}
}
else {
die('Zugriff verweigert.');
//error_reporting
if (xtc_not_null($_POST['show_error'])) {
$error_type = DIR_FS_DOCUMENT_ROOT . 'export/_error_reporting.' . $_POST['show_error'];
$filenames = scandir(DIR_FS_DOCUMENT_ROOT . 'export/');
foreach ($filenames as $filename) {
if (strpos($filename, '_error_reporting')!== false) {
$actual_reporting = $filename;
}
}
if ($actual_reporting) {
rename(DIR_FS_DOCUMENT_ROOT . 'export/'.$actual_reporting, $error_type);
die('Report: error_reporting wurde geändert auf: '. $_POST['show_error']);
} else {
$errorHandle = fopen($error_type, 'w') or die('Report: error_reporting kann nicht verändert werden. ('. $_POST['show_error'].')');
fclose($errorHandle);
die('Report: error_reporting wurde geändert auf: '. $_POST['show_error']);
}
}
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-15" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Admin-Login</title>
<meta http-equiv="content-language" content="de" />
<meta http-equiv="cache-control" content="no-cache" />
</head>
<body>
<br/><br/>
<form name="login" method="post" action="<?php echo $action ?>">
<table border=0 align="center" cellpadding=5 cellspacing=0 bgcolor="#F0F0F0" style="border:1px #aaaaaa solid;">
<form name="login" method="post" action="<?php echo $action; ?>">
<table border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#F0F0F0" style="border:1px #aaaaaa solid;">
<tr>
<td class="main"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email</font></td>
<td class="main"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">E-Mail</font></td>
<td><div><input type="text" name="email_address" style="width:150px" maxlength="50" /></div></td>
</tr>
<tr>
<td class="main"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Passwort</font> </td>
ca. Zeile 103
</tr>
<tr>
<td class="main"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Passwort</font> </td>
<td><div><input type="password" name="password" style="width:150px" maxlength="30" /></div></td>
</tr>
<tr>
<td> </td>
<td> <input type="submit" name="Submit" value="Anmelden">
<input type="hidden" name="repair" value="<?php echo $_GET['repair'] ?>"></td>
<td><input type="submit" name="Submit" value="Anmelden" />
<input type="hidden" name="repair" value="<?php echo $_GET['repair']; ?>" />
<input type="hidden" name="show_error" value="<?php echo $_GET['show_error']; ?>" /></td>
</tr>
</table>
</FORM>
</form>
</body>
</html>
print_order.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: print_order.php 1185 2005-08-26 15:16:31Z mz $
$Id$
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2003 nextcommerce (print_order.php,v 1.5 2003/08/24); www.nextcommerce.org
(c) 2005 xtCommerce (print_order.php); www.xt-commerce.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 34
WHERE orders_id=".$oID);
$order_check = xtc_db_fetch_array($order_query_check);
//BOF - DokuMan - 2010-03-18 - check for set customer_id
//if ($_SESSION['customer_id'] == $order_check['customers_id']) {
if (isset($_SESSION['customer_id']) && $_SESSION['customer_id'] == $order_check['customers_id']) {
if ((isset($_SESSION['customer_id']) && $_SESSION['customer_id'] == $order_check['customers_id']) || (isset($_POST['customer_id']) && $_POST['customer_id'] == $order_check['customers_id'])) {
//EOF - DokuMan - 2010-03-18 - check for set customer_id
// get order data
ca. Zeile 64
$smarty->assign('DATE', xtc_date_long($order->info['date_purchased']));
$path = DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/';
$smarty->assign('tpl_path', $path);
//BOF - web28 - 2010-08-17 - define missing charset
$smarty->assign('charset', $_SESSION['language_charset'] );
//EOF - web28 - 2010-08-17 - define missing charset
// dont allow cache
$smarty->caching = false;
$smarty->display(CURRENT_TEMPLATE.'/module/print_order.html');
print_product_info.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: print_product_info.php 1282 2005-10-03 19:39:36Z mz $
$Id$
XT-Commerce - community made shopping
http://www.xt-commerce.com
xtcModified - community made shopping
http://www.xtc-modified.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2010 xtcModified
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(product_info.php,v 1.94 2003/05/04); www.oscommerce.com
(c) 2003 nextcommerce (print_product_info.php,v 1.16 2003/08/25); www.nextcommerce.org
(c) 2006 XT-Commerce
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
ca. Zeile 26
//BOF - web28 - 2010-07-09 - define smarty template path
$smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
//EOF - web28 - 2010-07-09 - define smarty template path
//BOF - web28 - 2010-08-13 - define missing charset
$smarty->assign('charset', $_SESSION['language_charset'] );
//EOF - web28 - 2010-08-13 - define missing charset
$product_info_query = xtc_db_query("select * FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd where p.products_status = '1' and p.products_id = '".(int) $_GET['products_id']."' and pd.products_id = p.products_id and pd.language_id = '".(int) $_SESSION['languages_id']."'");
$product_info = xtc_db_fetch_array($product_info_query);
$products_price = $xtPrice->xtcGetPrice($product_info['products_id'], $format = true, 1, $product_info['products_tax_class_id'], $product_info['products_price'], 1);
product_info.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: product_info.php 1979 2011-05-24 15:24:21Z gtb-modified $
$Id: product_info.php 2809 2012-04-30 16:10:12Z hhacker $
xtcModified - community made shopping
http://www.xtc-modified.org
ca. Zeile 22
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
include ('includes/application_top.php');
// create smarty elements
$smarty = new Smarty;
//BOF - GTB - 2011-05-24 - check for products_id
if (!isset($_GET['products_id']) && !isset($_GET['action'])) {
// redirect
if (!isset($_GET['products_id']) && !isset($_GET['info']) && !isset($_GET['action'])) {
xtc_redirect(xtc_href_link(FILENAME_DEFAULT, '', 'NONSSL'));
}
//EOF - GTB - 2011-05-24 - check for products_id
// include boxes
if (isset($_GET['products_id'])) {
$cat = xtc_db_query("SELECT categories_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." WHERE products_id='".(int) $_GET['products_id']."'");
ca. Zeile 44
require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');
// include needed functions
require_once (DIR_FS_INC.'xtc_get_download.inc.php');
//require_once (DIR_FS_INC.'xtc_delete_file.inc.php'); // Hetfield - 2009-08-12 - removed never needed function
require_once (DIR_FS_INC.'xtc_get_all_get_params.inc.php');
require_once (DIR_FS_INC.'xtc_date_long.inc.php');
require_once (DIR_FS_INC.'xtc_draw_hidden_field.inc.php');
//require_once (DIR_FS_INC.'xtc_image_button.inc.php'); //DokuMan - 2010-08-30 - function already set in application_top.php
require_once (DIR_FS_INC.'xtc_draw_form.inc.php');
require_once (DIR_FS_INC.'xtc_draw_input_field.inc.php');
require_once (DIR_FS_INC.'xtc_image_submit.inc.php');
if (isset($_GET['action']) && $_GET['action'] == 'get_download') {
xtc_get_download((int)$_GET['cID']); // Hetfield - 2009-08-12 - update function call for security
xtc_get_download((int)$_GET['cID']);
}
include (DIR_WS_MODULES.'product_info.php');
reviews.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: reviews.php 1238 2005-09-24 10:51:19Z mz $
$Id: reviews.php 2913 2012-05-25 12:11:19Z gtb-modified $
XT-Commerce - community made shopping
http://www.xt-commerce.com
ca. Zeile 50
and p.products_id = pd.products_id
and pd.language_id = '".(int) $_SESSION['languages_id']."'
and rd.languages_id = '".(int) $_SESSION['languages_id']."'
order by r.reviews_id DESC";
$reviews_split = new splitPageResults($reviews_query_raw, $_GET['page'], MAX_DISPLAY_NEW_REVIEWS);
$reviews_split = new splitPageResults($reviews_query_raw, (int)$_GET['page'], MAX_DISPLAY_NEW_REVIEWS);
if ($reviews_split->number_of_rows > 0) {
//BOF - Dokuman - 2009-06-05 - replace table with div
send_order.phpTop ca. Zeile 48
$order_total = $order->getTotalData($insert_id); //ACHTUNG für Bestellbestätigung aus Admin Funktion in admin/includes/classes/order.php
$smarty->assign('order_data', $order->getOrderData($insert_id)); //ACHTUNG für Bestellbestätigung aus Admin Funktion in admin/includes/classes/order.php
$smarty->assign('order_total', $order_total['data']);
// assign language to template for caching
$smarty->assign('language', $_SESSION['language']);
// assign language to template for caching Web28 2012-04-25 - change all $_SESSION['language'] to $order->info['language']
$smarty->assign('language', $order->info['language']);
$smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/');
$smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');
$smarty->assign('oID', $insert_id);
//$smarty->assign('oID', $insert_id);
$smarty->assign('oID', $order->info['order_id']); //DokuMan - 2011-08-31 - fix order_id assignment
if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
if (isset($send_by_admin)) { // web28 - 2010-03-20 - Send Order by Admin - $send_by_admin is defined in /admin/orders.php
include (DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php'); //DokuMan - 2010-09-18 - Undefined variable: send_by_admin
include (DIR_FS_LANGUAGES.$order->info['language'].'/modules/payment/'.$order->info['payment_method'].'.php'); //DokuMan - 2010-09-18 - Undefined variable: send_by_admin
} else {
include (DIR_WS_LANGUAGES.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
include (DIR_WS_LANGUAGES.$order->info['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
}
$payment_method = constant(strtoupper('MODULE_PAYMENT_'.$order->info['payment_method'].'_TEXT_TITLE'));
}
$smarty->assign('PAYMENT_METHOD', $payment_method);
ca. Zeile 102
//BOF - web28 - 2010-06-11 - Send Order by Admin Paypal IPN
if(isset($send_by_admin)) { //DokuMan - 2010-09-18 - Undefined variable: send_by_admin
require (DIR_FS_CATALOG_MODULES.'payment/paypal_ipn.php');
include(DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/payment/paypal_ipn.php');
include(DIR_FS_LANGUAGES.$order->info['language'].'/modules/payment/paypal_ipn.php');
$payment_modules = new paypal_ipn;
}
//EOF - web28 - 2010-06-11 - Send Order by Admin Paypal IPN
ca. Zeile 134
// dont allow cache
$smarty->caching = 0;
$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/order_mail.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/order_mail.txt');
$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$order->info['language'].'/order_mail.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$order->info['language'].'/order_mail.txt');
// create subject
$order_subject = str_replace('{$nr}', $insert_id, EMAIL_BILLING_SUBJECT_ORDER);
$order_subject = str_replace('{$date}', strftime(DATE_FORMAT_LONG), $order_subject);
$order_subject = str_replace('{$date}', xtc_date_long($order->info['date_purchased']), $order_subject); // Tomcraft - 2011-12-28 - Use date_puchased instead of current date in E-Mail subject
$order_subject = str_replace('{$lastname}', $order->customer['lastname'], $order_subject);
$order_subject = str_replace('{$firstname}', $order->customer['firstname'], $order_subject);
// send mail to admin
ca. Zeile 193
//BOF - web28 - 2010-03-20 - Send Order by Admin
if(isset($send_by_admin)) { //DokuMan - 2010-09-18 - Undefined variable: send_by_admin
$customer_notified = '1';
$orders_status_id = '1';
//($orders_status_id < 1) ? $orders_status_id = $order->info['orders_status'] : $orders_status_id = '1';
//Comment out the next line for setting the $orders_status_id= '1 '- Auskommentieren der nächste Zeile, um die $orders_status_id = '1' zu setzen
($order->info['orders_status'] < 1) ? $orders_status_id = '1' : $orders_status_id = $order->info['orders_status'];
//web28 - 2011-03-20 - Fix order status
xtc_db_query("update ".TABLE_ORDERS." set orders_status = '".xtc_db_input($orders_status_id)."',
xtc_db_query("UPDATE ".TABLE_ORDERS."
SET orders_status = '".xtc_db_input($orders_status_id)."',
last_modified = now()
where orders_id = '".xtc_db_input($insert_id)."'");
WHERE orders_id = '".xtc_db_input($insert_id)."'");
//web28 - 2011-08-26 - Fix order status history
xtc_db_query("insert into ".TABLE_ORDERS_STATUS_HISTORY." (orders_id,
orders_status_id,
date_added,
customer_notified,
comments
) values (
'".xtc_db_input($insert_id)."',
'".xtc_db_input($orders_status_id)."',
now(),
'".$customer_notified."',
'".COMMENT_SEND_ORDER_BY_ADMIN."'
)");
xtc_db_query("INSERT INTO ".TABLE_ORDERS_STATUS_HISTORY."
SET orders_id = '".xtc_db_input($insert_id)."',
orders_status_id = '".xtc_db_input($orders_status_id)."',
date_added = now(),
customer_notified = '".$customer_notified."',
comments = '".COMMENT_SEND_ORDER_BY_ADMIN."'");
$messageStack->add_session(SUCCESS_ORDER_SEND, 'success');
if (isset($_GET['site']) && $_GET['site'] == 1) { //DokuMan - 2010-09-18 - Undefined variable
templates/xtc5/admin/print_order.htmlTop ca. Zeile 3
<html>
<head>
<title>{#title#} {$oID}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
<style type="text/css">
{literal}
body {font-family: Verdana, Arial, Helvetica, sans-serif;}
.small {font-size: 0.6em;}
.normal {font-size: 0.8em;}
.large {font-size: 1em; font-weight:bold;}
td .border {border-right: 2px solid; border-bottom: 2px solid; border-color: #fff;}
{/literal}
</style>
</head>
<body onload="window.print()">
<table width="100%" border="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$address_label_customer}<br />
<br />
<td>
<p> </p>
<p> </p>
<p class="small" style="text-decoration:underline;">{$store_name}</p>
<p class="normal">{$address_label_customer}</p>
<p> </p>
<p class="small">
{if $csID}<strong>{#csID#}</strong>{$csID}<br />{/if}
<strong>{#payment#}</strong> {$PAYMENT_METHOD}<br />
<strong>{#order#}</strong> {$oID}<br />
<strong>{#date#}</strong> {$DATE}<br />
</font></td>
<td width="1"><img src="{$logo_path}logo.gif"></td>
</p>
<p class="large">{#invoice#}</p>
</td>
<td width="1"><img src="{$logo_path}logo.gif" alt=""></td>
</tr>
</table>
<br />
<table style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
<table class="small" style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
<tr bgcolor="#f1f1f1">
<td width="50%">
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>
{#shipping_address#}
</strong><br />
</font></p></td>
<p><strong>{#shipping_address#}</strong></p>
</td>
<td>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong> </strong><strong>
{if $address_label_payment}{#payment_address#}{/if}
</strong><br />
</font> </p></td>
<p><strong>{if $address_label_payment}{#payment_address#}{/if}</strong></p>
</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> {$address_label_shipping}
</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
{$address_label_payment}
</font></td>
<td>{$address_label_shipping}</td>
<td>{$address_label_payment}</td>
</tr>
</table>
<p> </p></td>
<p> </p>
</td>
</tr>
</table>
<table style="border-bottom:1px solid;" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>{#heading_products#}</strong></font></td>
<td class="small"><strong>{#heading_products#}</strong></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<table class="small" width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<tr>
<td colspan="2" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_units#}</font></strong></div></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_products#}</font></strong></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_artnr#}</font></strong></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;" width="150"><div align="right"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_price#}</font></strong></div></td>
<td colspan="2" class="border"><div align="center"><strong>{#head_units#}</strong></div></td>
<td class="border"><strong>{#head_products#}</strong></td>
<td class="border"><strong>{#head_artnr#}</strong></td>
<td class="border" width="150"><div align="right"><strong>{#head_single_price#}</strong></div></td>
<td class="border" width="150"><div align="right"><strong>{#head_price#}</strong></div></td>
</tr>
{foreach name=aussen item=order_values from=$order_data}
<tr>
<td width="20" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_QTY}</font></div></td>
<td width="20" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">x</font></div></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>{$order_values.PRODUCTS_NAME}</strong><em>{$order_values.PRODUCTS_ATTRIBUTES}</em></font></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_MODEL}<em>{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</em></font></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;" width="150"><div align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_PRICE}</font></div></td>
<td width="20" class="border"><div align="center">{$order_values.PRODUCTS_QTY}</div></td>
<td width="20" class="border"><div align="center">x</div></td>
<td class="border"><strong>{$order_values.PRODUCTS_NAME}</strong>
{if ACTIVATE_SHIPPING_STATUS=='true'}
{if $order_values.PRODUCTS_SHIPPING_TIME neq ''}<br />{#text_shippingtime#} {$order_values.PRODUCTS_SHIPPING_TIME}
{/if}
{/if}<br /><em>{$order_values.PRODUCTS_ATTRIBUTES}</em></td>
<td class="border">{$order_values.PRODUCTS_MODEL}<em>{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</em></td>
<td width="150" class="border"><div align="right">{$order_values.PRODUCTS_SINGLE_PRICE}</div></td>
<td width="150" class="border"><div align="right">{$order_values.PRODUCTS_PRICE}</div></td>
</tr>
{/foreach} </table>
{/foreach}
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap> <table width="100%" border="0" cellpadding="3" cellspacing="0">
<td nowrap>
<table width="100%" border="0" cellpadding="3" cellspacing="0">
{foreach name=aussen item=order_total_values from=$order_total}
<tr>
<td nowrap width="100%" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="right"><font size="1" face="Arial, Helvetica, sans-serif">{$order_total_values.TITLE}
{$order_total_values.TEXT}</font></div></td>
<td nowrap width="100%" class="small">
<div align="right">
{$order_total_values.TITLE}{$order_total_values.TEXT}
</div>
</td>
</tr>
{/foreach} </table></td>
{/foreach}
</table>
</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<td>
<table style="border-bottom:1px solid;" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><br /><br /><strong>{#comments#}</strong> {$COMMENTS}</font></td>
<td class="small">
<br /><br /><strong>{#comments#}</strong> {$COMMENTS}
</td>
</tr>
</table>
<td>
<tr>
</td>
</tr>
</table>
</body>
</html>
templates/xtc5/admin/print_packingslip.htmlTop ca. Zeile 3
<html>
<head>
<title>{#title#} {$oID}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
<style type="text/css">
{literal}
body {font-family: Verdana, Arial, Helvetica, sans-serif;}
.small {font-size: 0.6em;}
.normal {font-size: 0.8em;}
.large {font-size: 1em; font-weight:bold;}
td .border {border-right: 2px solid; border-bottom: 2px solid; border-color: #fff;}
{/literal}
</style>
</head>
<body onload="window.print()">
<table width="100%" border="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$address_label_customer}<br />
<br />
<td>
<p> </p>
<p> </p>
<p class="small" style="text-decoration:underline;">{$store_name}</p>
<p class="normal">{$address_label_customer}</p>
<p> </p>
<p class="small">
{if $csID}<strong>{#csID#}</strong>{$csID}<br />{/if}
<strong>{#payment#}</strong> {$PAYMENT_METHOD}<br />
<strong>{#order#}</strong> {$oID}<br />
<strong>{#date#}</strong> {$DATE}<br />
</font></td>
<td width="1"><img src="{$logo_path}logo.gif"></td>
<strong>{#date#}</strong> {$DATE}
</p>
<p class="large">{#packingslip#}</p>
</td>
<td width="1"><img src="{$logo_path}logo.gif" alt=""></td>
</tr>
</table>
<br />
<table style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
<table class="small" style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
<tr bgcolor="#f1f1f1">
<td width="50%">
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>
{#shipping_address#}
</strong><br />
</font></p></td>
<p><strong>{#shipping_address#}</strong></p>
</td>
<td>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong> </strong><strong>
{if $address_label_payment}{#payment_address#}{/if}
</strong><br />
</font> </p></td>
<p><strong>{if $address_label_payment}{#payment_address#}{/if}</strong></p>
</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> {$address_label_shipping}
</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
{$address_label_payment}
</font></td>
<td>{$address_label_shipping}</td>
<td>{$address_label_payment}</td>
</tr>
</table>
<p> </p></td>
<p> </p>
</td>
</tr>
</table>
<table style="border-bottom:1px solid;" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>{#heading_products#}</strong></font></td>
<td class="small"><strong>{#heading_products#}</strong></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<table style="border-bottom:1px solid;" class="small" width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<tr>
<td colspan="2" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_units#}</font></strong></div></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_products#}</font></strong></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_artnr#}</font></strong></td>
<td colspan="2" class="border"><div align="center"><strong>{#head_units#}</strong></div></td>
<td class="border"><strong>{#head_products#}</strong></td>
<td class="border"><strong>{#head_artnr#}</strong></td>
</tr>
{foreach name=aussen item=order_values from=$order_data}
<tr>
<td width="20" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_QTY}</font></div></td>
<td width="20" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">x</font></div></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>{$order_values.PRODUCTS_NAME}</strong><em>{$order_values.PRODUCTS_ATTRIBUTES}</em></font></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_MODEL}<em>{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</em></font></td>
<td width="20" class="border">
<div align="center">{$order_values.PRODUCTS_QTY}</div>
</td>
<td width="20" class="border">
<div align="center">x</div>
</td>
<td class="border">
<strong>{$order_values.PRODUCTS_NAME}</strong>
{if ACTIVATE_SHIPPING_STATUS=='true'}
{if $order_values.PRODUCTS_SHIPPING_TIME neq ''}<br />{#text_shippingtime#} {$order_values.PRODUCTS_SHIPPING_TIME}
{/if}
{/if}<br /><em>{$order_values.PRODUCTS_ATTRIBUTES}</em>
</td>
<td class="border">{$order_values.PRODUCTS_MODEL}<em>{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</em></td>
</tr>
{/foreach} </table>
{/foreach}
</table>
</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><br /><br /><strong>{#comments#}</strong> {$COMMENTS}</font></td>
<td class="small">
<br /><br /><strong>{#comments#}</strong> {$COMMENTS}
</td>
</tr>
</table>
<td>
<tr>
</td>
</tr>
</table>
</body>
</html>
iles Z:/Quellen/xtcmodified-1.05-SP1b/templates/xtc5/buttons/english/button_confirm_order.gif and Z:/projects/xtcmodified-1.05-SP1c/templates/xtc5/buttons/english/button_confirm_order.gif differ
iles Z:/Quellen/xtcmodified-1.05-SP1b/templates/xtc5/buttons/german/button_confirm_order.gif and Z:/projects/xtcmodified-1.05-SP1c/templates/xtc5/buttons/german/button_confirm_order.gif differ
templates/xtc5/css/javascript.cssTop ca. Zeile 26
padding-bottom:0px;
padding-left:0px;
}
#tab_description ol, #tab_description ul, #accordion_product_info ul, #accordion_product_info ul{
#tab_description ol, #tab_description ul, #accordion_product_info ol, #accordion_product_info ul{
margin:10px 0px 10px 22px;
display: block;
}
templates/xtc5/javascript/thickbox.jsTop ca. Zeile 2
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
* Fix for jquery 1.7.x by web0null
*/
var tb_pathToImage = "images/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
//on page load call tb_init
$(document).ready(function(){
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
$(domChunk).click(function(){
var t = this.title || this.name || null;
var a = this.href || this.alt;
var g = this.rel || false;
tb_show(t,a,g);
this.blur();
return false;
});
}
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
$("body","html").css({height: "100%", width: "100%"});
$("html").css("overflow","hidden");
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
//BOF - DoKuman - 30.07.2009 - fix IE6 SSL Popup due to missing "src" on iframe
// $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
$("body").append("<iframe src='javascript:false;' id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
//EOF - DoKuman - 30.07.2009 - fix IE6 SSL Popup due to missing "src" on iframe
$("#TB_overlay").click(tb_remove);
}
}else{//all others
if(document.getElementById("TB_overlay") === null){
$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
$("#TB_overlay").click(tb_remove);
}
}
if(tb_detectMacXFF()){
$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
}else{
$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
$('#TB_load').show();//show loader
var baseURL;
if(url.indexOf("?")!==-1){ //ff there is a query string involved
baseURL = url.substr(0, url.indexOf("?"));
}else{
baseURL = url;
}
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
var urlType = baseURL.toLowerCase().match(urlString);
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
TB_PrevCaption = "";
TB_PrevURL = "";
TB_PrevHTML = "";
TB_NextCaption = "";
TB_NextURL = "";
TB_NextHTML = "";
TB_imageCount = "";
TB_FoundURL = false;
if(imageGroup){
// BOF - Tomcraft - 2009-09-30 - modified compatibility for jQuery 1.3.x
//TB_TempArray = $("a[@rel="+imageGroup+"]").get();
TB_TempArray = $("a[rel="+imageGroup+"]").get();
// EOF - Tomcraft - 2009-09-30 - modified compatibility for jQuery 1.3.x
for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
if (!(TB_TempArray[TB_Counter].href == url)) {
if (TB_FoundURL) {
TB_NextCaption = TB_TempArray[TB_Counter].title;
TB_NextURL = TB_TempArray[TB_Counter].href;
TB_NextHTML = "<span id='TB_next'> <a href='#'>→</a></span>";
} else {
TB_PrevCaption = TB_TempArray[TB_Counter].title;
TB_PrevURL = TB_TempArray[TB_Counter].href;
TB_PrevHTML = "<span id='TB_prev'> <a href='#'>←</a></span>";
}
} else {
TB_FoundURL = true;
TB_imageCount = "Bild/Image " + (TB_Counter + 1) +" / "+ (TB_TempArray.length);
}
}
}
imgPreloader = new Image();
imgPreloader.onload = function(){
imgPreloader.onload = null;
// Resizing large images - orginal by Christian Montoya edited by me.
var pagesize = tb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
}
}
// End Resizing
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>X</a></div>");
$("#TB_closeWindowButton").click(tb_remove);
if (!(TB_PrevHTML === "")) {
function goPrev(){
if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
return false;
}
$("#TB_prev").click(goPrev);
}
if (!(TB_NextHTML === "")) {
function goNext(){
$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
return false;
}
$("#TB_next").click(goNext);
}
document.onkeydown = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
} else if(keycode == 190){ // display previous image
if(!(TB_NextHTML == "")){
document.onkeydown = "";
goNext();
}
} else if(keycode == 188){ // display next image
if(!(TB_PrevHTML == "")){
document.onkeydown = "";
goPrev();
}
}
};
tb_position();
$("#TB_load").remove();
$("#TB_ImageOff").click(tb_remove);
$("#TB_window").css({display:"block"}); //for safari using css instead of show
};
imgPreloader.src = url;
}else{//code to show html
var queryString = url.replace(/^[^\?]+\??/,'');
var params = tb_parseQuery( queryString );
TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
ajaxContentW = TB_WIDTH - 30;
ajaxContentH = TB_HEIGHT - 45;
if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
urlNoQuery = url.split('TB_');
$("#TB_iframeContent").remove();
if(params['modal'] != "true"){//iframe no modal
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>X</a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
}else{//iframe modal
$("#TB_overlay").unbind();
$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
}
}else{// not an iframe, ajax
if($("#TB_window").css("display") != "block"){
if(params['modal'] != "true"){//ajax no modal
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>X</a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
}else{//ajax modal
$("#TB_overlay").unbind();
$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
}
}else{//this means the window is already up, we are just loading new content via ajax
$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
$("#TB_ajaxContent")[0].scrollTop = 0;
$("#TB_ajaxWindowTitle").html(caption);
}
}
$("#TB_closeWindowButton").click(tb_remove);
if(url.indexOf('TB_inline') != -1){
$("#TB_ajaxContent").append($('#' + params['inlineId']).children());
$("#TB_window").unload(function () {
$('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
});
tb_position();
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}else if(url.indexOf('TB_iframe') != -1){
tb_position();
if($.browser.safari){//safari needs help because it will not fire iframe onload
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
}else{
$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
tb_position();
$("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");
$("#TB_window").css({display:"block"});
});
}
}
if(!params['modal']){
document.onkeyup = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
}
};
}
} catch(e) {
//nothing here
}
}
//helper functions below
function tb_showIframe(){
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
function tb_remove() {
$("#TB_imageOff").unbind("click");
$("#TB_closeWindowButton").unbind("click");
$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
$("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", width: "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
document.onkeyup = "";
return false;
}
function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
}
function tb_parseQuery ( query ) {
var Params = {};
if ( ! query ) {return Params;}// return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] );
var val = unescape( KeyVal[1] );
val = val.replace(/\+/g, ' ');
Params[key] = val;
}
return Params;
}
function tb_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = [w,h];
return arrayPageSize;
}
function tb_detectMacXFF() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
return true;
}
}
var tb_pathToImage="images/loadingAnimation.gif";$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(domChunk){$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false})}function tb_show(caption,url,imageGroup){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe src='javascript:false;' id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(caption===null){caption=""}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$('#TB_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"))}else{baseURL=url}var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=$("a[rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'> <a href='#'>→</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'> <a href='#'>←</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Bild/Image "+(TB_Counter+1)+" / "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x}}TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>X</a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev)}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false}$("#TB_prev").click(goPrev)}if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false}$("#TB_next").click(goNext)}document.onkeydown=function(e){if(e==null){keycode=event.keyCode}else{keycode=e.which}if(keycode==27){tb_remove()}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext()}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev()}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=url}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30||630;TB_HEIGHT=(params['height']*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');$("#TB_iframeContent").remove();if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>X</a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>X</a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(caption)}}$("#TB_closeWindowButton").click(tb_remove);if(url.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+params['inlineId']).children());$("#TB_window").bind('tb_unload',function(){$('#'+params['inlineId']).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else if(url.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(url+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode}else{keycode=e.which}if(keycode==27){tb_remove()}}}}catch(e){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'})}}function tb_parseQuery(query){var Params={};if(!query){return Params}var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue}var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val}return Params}function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize}function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true}}
templates/xtc5/source/boxes/manufacturer_info.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: manufacturer_info.php 1873 2011-04-11 16:20:41Z dokuman $
$Id: manufacturer_info.php 2853 2012-05-10 08:48:39Z gtb-modified $
xtcModified - community made shopping
http://www.xtc-modified.org
ca. Zeile 68
$box_smarty->assign('LINK_MORE','<a href="' . xtc_href_link(FILENAME_DEFAULT, xtc_manufacturer_link($manufacturer['manufacturers_id'],$manufacturer['manufacturers_name'])) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a>');
}
}
if (!$cache) {
if ($manufacturer['manufacturers_name']!='') {
if ($cache && !$rebuild) {
$box_manufacturers_info = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_manufacturers_info.html', $cache_id);
} else {
$box_manufacturers_info = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_manufacturers_info.html');
$smarty->assign('box_MANUFACTURERS_INFO',$box_manufacturers_info);
}
} else {
// if $rebuild == false, the box is already cache. Otherwise only recreate if manufacturers_name is set.
if (!$rebuild || $manufacturer['manufacturers_name']!='') {
$box_manufacturers_info = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_manufacturers_info.html', $cache_id);
$smarty->assign('box_MANUFACTURERS_INFO',$box_manufacturers_info);
}
}
?>
templates/xtc5/stylesheet.cssTop ca. Zeile 1244
}
/* EOF - web28 - 2010-07-25 - NO JAVASCRIPT FALLBACK für TABS/ACCORDION in product_info */
/* BOF - web28 - 2010-07-25 - FIX DER AUFZÄHLUNGEN IM CONTENT für TABS/ACCORDION in product_info */
#tab_description ol, #tab_description ul, #accordion_product_info ul, #accordion_product_info ul{
#tab_description ol, #tab_description ul, #accordion_product_info ol, #accordion_product_info ul{
margin:10px 0 10px 22px;
display:block;
}
/* EOF - web28 - 2010-07-25 - FIX DER AUFZÄHLUNGEN IM CONTENT für TABS/ACCORDION in product_info */
xtc_installer/includes/application.phpTop ca. Zeile 15
Released under the GNU General Public License
(c) 2011 Strato document-root function v. 1.00 by web28 - www.rpa-com.de
--------------------------------------------------------------*/
// Set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
if (version_compare(PHP_VERSION, '5.1.0', '>=')) {
date_default_timezone_set('Europe/Berlin');
}
// Some FileSystem Directories
if (!defined('DIR_FS_DOCUMENT_ROOT')) {
//BOF - web28 - 2010.02.18 - STRATO ROOT PATCH
if (strpos($_SERVER['DOCUMENT_ROOT'],'strato') !== FALSE) {
ca. Zeile 52
// Start the Install_Session
session_start();
// Set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
define('CR', "\n");
define('BOX_BGCOLOR_HEADING', '#bbc3d3');
define('BOX_BGCOLOR_CONTENTS', '#f8f8f9');
define('BOX_SHADOW', '#b6b7cb');
xtc_installer/index.phpTop ca. Zeile 13
Released under the GNU General Public License
--------------------------------------------------------------*/
define('PHP_VERSION_MIN', '5.0.0');
define('PHP_VERSION_MAX', '5.3.99');
require('includes/application.php');
//BOF - web28 - 2011-05-19 - SUPPORT
$support = ' ';
ca. Zeile 72
-->
</style>
</head>
<body>
<?php
//BOF - DokuMan - 2009-05-19 - removed webbug to www.xt-commerce.com
//<img src='http://www.xt-commerce.com/_banner/adview.php?what=zone:18&n=a61c088d' border='0' alt=''>
//EOF - DokuMan - 2009-05-19 - removed webbug to www.xt-commerce.com
?>
<table width="800" style="border:30px solid #fff;" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="95" colspan="2" >
<table width="100%" border="0" cellpadding="0" cellspacing="0">
ca. Zeile 99
</tr>
<?php
// file and folder permission checks
$error_flag=false;
$folder_flag==false;
$folder_flag = false;
$message='';
$ok_message='';
// config files
if (!is_writeable(DIR_FS_CATALOG . 'includes/configure.php')) {
ca. Zeile 229
if ($folder_flag==true)
$status='<strong><font color="#ff0000">'.TEXT_ERROR.'</font></strong>';
$ok_message.= TEXT_FOLDER_PERMISSION_STATUS . '.............................. '.$status.'<br /><hr noshade />';
// check PHP-Version
$php_flag==false;
$php_flag = false;
//BOF - Dokuman - 2009-09-02: update PHP-Version check
if (function_exists('version_compare')) {
if(version_compare(phpversion(), "5.0.0", "<")){
if(version_compare(phpversion(), PHP_VERSION_MIN, "<")){
$error_flag = true;
$php_flag = true;
$message .= '<strong>ACHTUNG! Ihre PHP-Version ist zu alt. Der Shop setzt mindestens die Version 5.0.0 voraus.<br /><br />
$message .= '<strong>ACHTUNG! Ihre PHP-Version ist zu alt. Der Shop setzt mindestens die Version '. PHP_VERSION_MIN .' voraus.<br /><br />
Ihre PHP-Version: ' . phpversion() . '</strong>.';
}
if(version_compare(phpversion(), "5.3.3", ">=")){
if(version_compare(phpversion(), PHP_VERSION_MAX, ">")){
$error_flag = true;
$php_flag = true;
$message .= '<strong>ACHTUNG! Ihre PHP-Version ist zu neu. Der Shop funktioniert nur bis Version 5.3.2 einwandfrei.<br /><br />
$message .= '<strong>ACHTUNG! Ihre PHP-Version ist zu neu. Der Shop funktioniert nur bis Version '. PHP_VERSION_MAX .' einwandfrei.<br /><br />
Ihre PHP-Version: ' . phpversion() . '</strong>.';
}
} else {
$error_flag = true;
$php_flag = true;
$message .= '<strong>ACHTUNG! Ihre PHP-Version ist zu alt. Der Shop setzt mindestens die Version 5.0.0 voraus.<br /><br />
$message .= '<strong>ACHTUNG! Ihre PHP-Version ist zu alt. Der Shop setzt mindestens die Version '. PHP_VERSION_MIN .' voraus.<br /><br />
Ihre PHP-Version: ' . phpversion() . '</strong>.';
}
//EOF - Dokuman - 2009-09-02: update PHP-Version check
ca. Zeile 337
</tr>
</table>
<br />
<div align="center" style="font-family:Arial, sans-serif; font-size:11px;"><?php echo '<a href="http://www.xtc-modified.org" target="_blank">xtcModified</a>' . ' ' . '©' . date('Y') . ' ' . 'provides no warranty and is redistributable under the <a href="http://www.fsf.org/licensing/licenses/gpl.txt" target="_blank">GNU General Public License</a><br />eCommerce Engine 2006 based on <a href="http://www.xt-commerce.com/" rel="nofollow" target="_blank">xt:Commerce</a>'; ?></div>
<div align="center" style="padding-top:5px; font-size:11px;">Installer 105sp1b</div>
<div align="center" style="padding-top:5px; font-size:11px;">Installer 105sp1c</div>
<div align="center" style="padding-top:5px; font-size:11px;"><?php echo $support; ?></div>
</body>
</html>
xtc_installer/install_finished.phpTop ca. Zeile 88
</tr>
</table>
<br />
<div align="center" style="font-family:Arial, sans-serif; font-size:11px;"><?php echo TEXT_FOOTER; ?><br /><img src='http://images.xtc-modified.org/xtcmodified105sp1b.gif' border='0' alt='xtcModified eCommerce Shopsoftware'></div>
<div align="center" style="font-family:Arial, sans-serif; font-size:11px;"><?php echo TEXT_FOOTER; ?><br /><img src='http://images.xtc-modified.org/xtcmodified105sp1c.gif' border='0' alt='xtcModified eCommerce Shopsoftware'></div>
</body>
</html>
xtc_installer/install_step1.phpTop ca. Zeile 180
<?php echo xtc_draw_hidden_field_installer('DIR_WS_CATALOG', $dir_ws_www_root . '/'); ?>
<span style="border: #a3a3a3 1px solid; padding: 3px; background-color: #f4f4f4;"><?php echo $dir_ws_www_root . '/'; ?></span>
<p><?php echo TEXT_WS_ROOT_INFO; ?></p>
<?php //EOF - web28 - 2010.02.20 - NEW ROOT INFO ?>
<!--p><b><?php //echo TEXT_WS_ROOT; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DIR_FS_DOCUMENT_ROOT', DIR_FS_DOCUMENT_ROOT,'','size=60'); ?><br />
<?php //echo TEXT_WS_ROOT_LONG; ?></p>
<p><b><?php //echo TEXT_WS_XTC; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DIR_FS_CATALOG', $local_install_path,'','size=60'); ?><br />
<?php //echo TEXT_WS_XTC_LONG; ?></p>
<p><b> <?php //echo TEXT_WS_CATALOG; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DIR_WS_CATALOG', $dir_ws_www_root . '/','','size=60'); ?><br />
<?php //echo TEXT_WS_CATALOG_LONG; ?></p-->
</div>
</td>
</tr>
</table>
xtc_installer/install_step2.phpTop ca. Zeile 137
$db_warning = '';
if (!$db_error) {
if (function_exists('version_compare')) {
//BOF - web28 - 2010-02-10 - check for 'native'
if(version_compare(mysql_get_client_info(), "4.1.2", "<") && strpos(strtolower(mysql_get_client_info()), 'native')=== false){
//BOF - GTB - 2010-08-31 - check Development Version
preg_match("/[0-9]\.[0-9]\.[0-9]/",mysql_get_client_info(), $client_info);
if(version_compare($client_info[0], "4.1.2", "<") && strpos(strtolower(mysql_get_client_info()), 'native')=== false){
//if(version_compare(mysql_get_client_info(), "4.1.2", "<") && strpos(strtolower(mysql_get_client_info()), 'native')=== false){
//BOF - GTB - 2010-08-31 - check Development Version
//EOF - web28 - 2010-02-10 - check for 'native'
$db_warning = '<strong>' . TEXT_DB_CLIENT_VERSION_WARNING . '<br /><br />' . TEXT_DB_CLIENT_VERSION . mysql_get_client_info() . '</strong>.';
}
}
xtc_installer/install_step4.phpTop ca. Zeile 165
</p>
<div style="border: #a3a3a3 1px solid; padding: 3px; background-color: #f4f4f4;">
<?php echo TEXT_SSL_PROXY_EXP; ?>
</div>
<!--p><b><?php //echo TEXT_WS_CATALOG; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DIR_WS_CATALOG'); ?><br />
<?php //echo TEXT_WS_CATALOG_LONG; ?></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="border-top: 1px solid; border-color: #CFCFCF"><b>
<?php //echo TITLE_CHECK_FILES; ?></b></td>
<td style="border-top: 1px solid; border-color: #CFCFCF"> </td>
</tr>
</table-->
<?php //BOF - web28 - 2010.02.20 - NEW ROOT INFO ?>
<p><b><?php echo TEXT_WS_ROOT; ?></b></p>
<span style="border: #a3a3a3 1px solid; padding: 3px; background-color: #f4f4f4;">
<?php echo DIR_FS_DOCUMENT_ROOT; ?>
ca. Zeile 188
<?php echo $_POST['DIR_WS_CATALOG']; ?>
</span>
<p><?php echo TEXT_WS_ROOT_INFO; ?></p>
<?php //EOF - web28 - 2010.02.20 - NEW ROOT INFO ?>
<!--p><b><?php //echo TEXT_WS_XTC; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DIR_FS_CATALOG'); ?><br />
<?php //echo TEXT_WS_XTC_LONG; ?></p-->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="border-top: 1px solid; border-color: #CFCFCF">
<b><?php echo TITLE_CHECK_DATABASE; ?></b>
ca. Zeile 207
echo xtc_draw_hidden_field_installer('DB_DATABASE', $_POST['DB_DATABASE']);
echo xtc_draw_hidden_field_installer('install_db', $_POST['install_db']);
echo xtc_draw_hidden_field_installer('install_cfg', $_POST['install_cfg']);
?>
<!--p><b><?php //echo TEXT_DATABASE_SERVER; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DB_SERVER'); ?><br />
<?php //echo TEXT_DATABASE_SERVER_LONG; ?></p>
<p><b><?php //echo TEXT_USERNAME; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DB_SERVER_USERNAME'); ?><br />
<?php //echo TEXT_USERNAME_LONG; ?></p>
<p><b><?php //echo TEXT_PASSWORD; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DB_SERVER_PASSWORD'); ?><br />
<?php //echo TEXT_PASSWORD_LONG; ?></p>
<p><b><?php //echo TEXT_DATABASE; ?></b><br />
<?php //echo xtc_draw_input_field_installer('DB_DATABASE'); ?><br />
<?php //echo TEXT_DATABASE_LONG; ?></p-->
<p>
<?php echo xtc_draw_checkbox_field_installer('USE_PCONNECT', 'true'); ?>
<b><?php echo TEXT_PERSIST; ?></b><br />
<?php echo TEXT_PERSIST_LONG; ?>
</p>
<p>
<?php //echo xtc_draw_radio_field_installer('STORE_SESSIONS', 'files'); ?>
<!--b><?php //echo TEXT_SESS_FILE; ?></b><br /-->
<?php echo xtc_draw_radio_field_installer('STORE_SESSIONS', 'mysql', true); ?>
<b><?php echo TEXT_SESS_DB; ?></b> ( EMPFOHLEN )<br />
<?php echo TEXT_SESS_LONG; ?>
</p>
</div>
<br />
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><a href="index.php"><img src="buttons/<?php echo $lang;?>/button_cancel.gif" border="0" alt="Cancel" /></a> <!--input type="hidden" name="install[]" value="configure"--> <input type="image" src="buttons/<?php echo $lang;?>/button_continue.gif"></td>
<td align="right"><a href="index.php"><img src="buttons/<?php echo $lang;?>/button_cancel.gif" border="0" alt="Cancel" /></a> <input type="image" src="buttons/<?php echo $lang;?>/button_continue.gif"></td>
</tr>
</table>
<br />
</form>
xtc_installer/install_step5.phpTop ca. Zeile 291
' define(\'DB_SERVER_USERNAME\', \'' . $_POST['DB_SERVER_USERNAME'] . '\');' . "\n" .
' define(\'DB_SERVER_PASSWORD\', \'' . $_POST['DB_SERVER_PASSWORD']. '\');' . "\n" .
' define(\'DB_DATABASE\', \'' . $_POST['DB_DATABASE']. '\');' . "\n" .
' define(\'USE_PCONNECT\', \'' . (($_POST['USE_PCONNECT'] == 'true') ? 'true' : 'false') . '\'); // use persistent connections?' . "\n" .
' define(\'STORE_SESSIONS\', \'' . (($_POST['STORE_SESSIONS'] == 'files') ? '' : 'mysql') . '\'); // leave empty \'\' for default handler or set to \'mysql\'' . "\n" . '?>';
' define(\'STORE_SESSIONS\', \'' . (($_POST['STORE_SESSIONS'] == 'files') ? '' : 'mysql') . '\'); // leave empty \'\' for default handler or set to \'mysql\'' . "\n" .
'?>';
$fp = fopen(DIR_FS_CATALOG . 'includes/configure.php', 'w');
fputs($fp, $file_contents);
fclose($fp);
ca. Zeile 361
'' . "\n" .
' Copyright (c) 2003 XT-Commerce' . "\n" .
' --------------------------------------------------------------' . "\n" .
' based on:' . "\n" .
' (c) 2000-2001 The Exchange Project (earlier name of osCommerce)
' . "\n" .
' (c) 2000-2001 The Exchange Project (earlier name of osCommerce)' . "\n" .
' (c) 2002-2003 osCommerce (configure.php,v 1.14 2003/02/21); www.oscommerce.com' . "\n" .
'' . "\n" .
' Released under the GNU General Public License' . "\n" .
' --------------------------------------------------------------*/' . "\n" .
ca. Zeile 415
' define(\'DB_SERVER_PASSWORD\', \'' . $_POST['DB_SERVER_PASSWORD']. '\');' . "\n" .
' define(\'DB_DATABASE\', \'' . $_POST['DB_DATABASE']. '\');' . "\n" .
' define(\'USE_PCONNECT\', \'' . (($_POST['USE_PCONNECT'] == 'true') ? 'true' : 'false') . '\'); // use persisstent connections?' . "\n" .
' define(\'STORE_SESSIONS\', \'' . (($_POST['STORE_SESSIONS'] == 'files') ? '' : 'mysql') . '\'); // leave empty \'\' for default handler or set to \'mysql\'' . "\n" .
'' . "\n" .
'?>';
'' . "\n" . '?>';
$fp = fopen(DIR_FS_CATALOG . 'admin/includes/configure.php', 'w');
fputs($fp, $file_contents);
fclose($fp);
ca. Zeile 484
' define(\'DB_SERVER_PASSWORD\', \'' . $_POST['DB_SERVER_PASSWORD']. '\');' . "\n" .
' define(\'DB_DATABASE\', \'' . $_POST['DB_DATABASE']. '\');' . "\n" .
' define(\'USE_PCONNECT\', \'' . (($_POST['USE_PCONNECT'] == 'true') ? 'true' : 'false') . '\'); // use persisstent connections?' . "\n" .
' define(\'STORE_SESSIONS\', \'' . (($_POST['STORE_SESSIONS'] == 'files') ? '' : 'mysql') . '\'); // leave empty \'\' for default handler or set to \'mysql\'' . "\n" .
'' . "\n" .
'?>';
'' . "\n" . '?>';
$fp = fopen(DIR_FS_CATALOG . 'admin/includes/configure.org.php', 'w');
fputs($fp, $file_contents);
fclose($fp);
// BOF - web28 - 2010-03-18 NEW HANDLING FOR NO DB INSTALL
if($_POST['install_db'] == 1) $step= 'install_step6'; else $step = 'install_finished';
$step = ($_POST['install_db'] == 1) ? 'install_step6' : $step = 'install_finished';
//EOF - web28 - 2010-03-18 NEW HANDLING FOR NO DB INSTALL
?>
<center>
<font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><br /><br />
<?php echo TEXT_WS_CONFIGURATION_SUCCESS; ?> </center><br /><br />
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<?php //// BOF - web28 - 2010-03-18 NEW HANDLING FOR NO DB INSTALL?>
<?php // BOF - web28 - 2010-03-18 NEW HANDLING FOR NO DB INSTALL?>
<td align="center"><a href="<?php echo $step;?>.php?lg=<?php echo $lang; ?>"><img src="images/button_continue.gif" width="77" height="23" border="0"></a></td>
<?php //// BOF - web28 - 2010-03-18 NEW HANDLING FOR NO DB INSTALL?>
<?php // BOF - web28 - 2010-03-18 NEW HANDLING FOR NO DB INSTALL?>
</tr>
</table><br /><br />
</form>
<?php
xtc_installer/xtcommerce.sqlTop ca. Zeile 1358
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'ACCOUNT_GENDER', 'true', 5, 1, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'ACCOUNT_DOB', 'true', 5, 2, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'ACCOUNT_COMPANY', 'true', 5, 3, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'ACCOUNT_SUBURB', 'true', 5, 4, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'ACCOUNT_STATE', 'true', 5, 5, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'ACCOUNT_STATE', 'false', 5, 5, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'ACCOUNT_OPTIONS', 'account', 5, 6, NULL, '', NULL, 'xtc_cfg_select_option(array(\'account\', \'guest\', \'both\'),');
INSERT INTO configuration (configuration_id, configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'DELETE_GUEST_ACCOUNT', 'true', 5, 7, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
# configuration_group_id 6
weitere InfosTop
Bei der Selbstinstallation, insbesondere dann wenn ein XT:Commerce Shop oder Fork bereits modifiziert wurde,
ist das Risiko relativ hoch, dass beim Einbau unvorhergesehene Probleme auftreten, die zur Folge haben,
dass entweder Teilfunktionen des Shops oder gar der vollständig Shop nicht mehr ordungsgemäß funktioniert.
Um diesem Problem weitgehend entgegen zu wirken werden unsere Module in aller Regel in 2 Versionen ausgeliefert,
so dass eine unbelassene XTC Installation durch einfaches ersetzen von Dateien mit dem Modul erweitert werden kann und
alternativ durch manuelles verändern von existierenden Dateien. Diesen besonderen Service finden man im übrigen nicht generell
auch bei anderen Dienstleistern. Als weiteren Service wir zum Kauf eines jeder unsere Module gegen eine geringe
Gebühr einen Installationsservice inkl. 14-tägigen email Support an. Wer also auf Nummer sicher gehen möchte,
insbesondere wenn nur wenige Kenntnisse oder Erfahrungen hat, ist deshalb gut beraten diesen Service zu nutzen.
Jedem Kunden, der diesen Support mit erworben hat, stehen wir für Support Fragen über unser Kontaktformular zur Verfügung.
Aufgrund einer hohen Nachfrage nach unseren Entwicklungen ist es zeitlich bedingt nicht möglich telefonische Auskünfte zu
geben.Anfragen darüber werden i.d.R. binnen 24 Std. fachkundig beantwortet.
Sollte ein Modul ohne Support und Installationsservice erworben worden sein, steht Ihnen bei Fragen ebenso
unser Helpdesk, jedoch mit eingeschränkten Support Leistungen zur Verfügung. Mangels der dafür erbrachten
Vergütung ist ein weiterführender Support nicht möglich und kann nur gegen individuelle Aufwandsvergütung
erfolgen.
Wir danken für Ihr Verständnis und wünschen Ihnen Gute Geschäfte!
Ihr Alkim Media Team