| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/gm/javascript/ |
Upload File : |
/* GMGPrintCartWishlistManager.js <?php
# --------------------------------------------------------------
# GMGPrintCartWishlistManager.js 2018-06-15
# Gambio GmbH
# http://www.gambio.de
# Copyright (c) 2018 Gambio GmbH
# Released under the GNU General Public License (Version 2)
# [http://www.gnu.org/licenses/gpl-2.0.html]
# --------------------------------------------------------------
?>*/
/*<?php
if($GLOBALS['coo_debugger']->is_enabled('uncompressed_js') == false)
{
?>*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4 2k(){2.2j=4(c,d){5 e=7,1i=0,1g=0,A=2;$(\'#Y X\').m(4(){3($(2).9(\'8\')==\'1c\'){1g++}});3($(\'#H\').1m>0){$(\'#H\').1n();$(\'#H\').2i(\'<1s 1t="1u/1w/1y/15.1E" 1I="16" 1M="11" 1k="10" />\')}$(\'#Y X\').m(4(){3($(2).9(\'8\')==\'1c\'){e=j;o=j;5 b=$(2).9(\'U\'),19=b.F(/2h/g,\'2g\'),1z=A.V(),1D=A.N();$(\'#\'+b).1n();$(\'#\'+19).2f(\'<1s 1t="1u/1w/1y/15.1E" 1I="16" 1M="11" 1k="10" U="1L\'+b+\'" />\');$.2e({v:\'u.t?s=r&l=15&2d=\'+6(b)+\'&D=\'+6(1z)+\'&17=\'+6(d)+\'&n=\'+q+1D,2b:7,2a:b,28:\'E\',1C:4(a){3(a[\'27\']==7){$(\'#1L\'+a[\'1P\']).1J();1i++;3(1i==1g&&o==j){$(\'#\'+19).24(\'\');3(d==\'18\'){A.K(c)}I 3(d==\'1b\'){A.L(c)}}I 3(o==7){$(\'#\'+a[\'1P\']).Z()}}I{$(\'.10\').1J();3($(\'#H\').1m>0){$(\'#H\').Z()}$(\'.21 X\').m(4(){3($(2).9(\'8\')==\'1c\'){$(2).Z()}});o=7;20(1Z(a[\'1Y\']))}},1X:4(){3(1V)1U.1T("1S 1R: "+b)}})}});3(!e){3(d==\'18\'){A.K(c)}I 3(d==\'1b\'){A.L(c)}}};2.K=4(b){5 c=\'\',i=1x;Q(J S b.T){i=b.T[J];Q(h S i.p){3(i.p[h].C()==\'1F\'||i.p[h].C()==\'1G\'||i.p[h].C()==\'1H\'){c+=\'&W\'+6(h)+\'=\'+6($(\'#W\'+h).k())}}}5 d=2.V();d=6(d);5 e=2.N();B.z({y:\'l=K\'+c+\'&D=\'+d+\'&n=\'+q+e,v:\'u.t?s=r\',8:"x",w:j,1C:4(a){3(a==\'j\'){25.Y.1Q()}}}).1O};2.1N=4(){5 b=7,14=7;$(\'#Y X\').m(4(){3($(2).9(\'8\')==\'13\'&&$(2).P(\'O\')==j){14=j;5 a=6($(2).k());b=B.z({y:\'l=1N&D=\'+a+\'&n=\'+q,v:\'u.t?s=r\',8:"x",w:7}).E}});3(!14){b=j}G b};2.L=4(a){5 b=\'\',i=1x;Q(J S a.T){i=a.T[J];Q(h S i.p){3(i.p[h].C()==\'1F\'||i.p[h].C()==\'1G\'||i.p[h].C()==\'1H\'){b+=\'&W\'+h+\'=\'+6($(\'#W\'+h).k())}}}5 c=2.V();c=6(c);5 d=2.N(),o=B.z({y:\'l=L\'+b+\'&D=\'+c+\'&n=\'+q+d,v:\'u.t?s=r\',8:"x",w:7}).1O;3(o==\'j\'){1W()}};2.1q=4(){5 b=7;$(\'.1p\').m(4(){3($(2).9(\'8\')==\'13\'&&$(2).P(\'O\')==j){5 a=6($(2).k());b=B.z({y:\'l=1q&D=\'+a+\'&n=\'+q,v:\'u.t?s=r\',8:"x",w:7}).E}});G b};2.1o=4(){5 b=7;$(\'.1p\').m(4(){3($(2).9(\'8\')==\'13\'&&$(2).P(\'O\')==j){5 a=6($(2).k());b=B.z({y:\'l=1o&D=\'+a+\'&n=\'+q,v:\'u.t?s=r\',8:"x",w:7}).E}});G b};2.V=4(){5 a=\'0\',1f=\'0\',M=$(\'#22\').k();$(\'.23\').m(4(){3((($(2).P(\'O\')==j&&$(2).9(\'8\')==\'1K\')||$(2).9(\'8\')!=\'1K\')&&$(2).9(\'R\').26(\'12\')==-1){a=$(2).9(\'R\');a=a.F(/U\\[/g,\'{\');a=a.F(/\\]/g,\'}\');1f=$(2).k();M+=a+1f}});a=$(\'#1A\').9(\'R\');a=a.F(/U\\[/g,\'{\');a=a.F(/\\]/g,\'}\');M+=a+$(\'#1A\').k();G M};2.N=4(){5 a=\'\';$(\'29[R="12[]"]\').m(4(){a+=\'&\'+6(\'12[]\')+\'=\'+$(2).k()});G a};2.1e=4(a,b,c,d,e){5 f=2c(a),1j=6(b),1h=6(c),1d=6(d),1a=6(e);3(d==\'18\'){o=B.z({y:\'l=1e&1v=\'+f+\'&1r=\'+1j+\'&1B=\'+1h+\'&17=\'+1d+\'&1l=\'+1a+\'&n=\'+q,v:\'u.t?s=r\',8:"x",w:7}).E}I 3(d==\'1b\'){o=B.z({y:\'l=1e&1v=\'+f+\'&1r=\'+1j+\'&1B=\'+1h+\'&17=\'+1d+\'&1l=\'+1a+\'&n=\'+q,v:\'u.t?s=r\',8:"x",w:7}).E}}}',62,145,'||this|if|function|var|encodeURIComponent|false|type|attr||||||||t_elements_id|coo_surface|true|val|action|each|mode|t_success|v_elements|c_mode|GPrint|module|php|request_port|url|async|POST|data|ajax|coo_cart_wishlist_manager|jQuery|get_type|products_id|json|replace|return|details_cart_part|else|t_surfaces_id|add_cart|add_wishlist|t_ids|get_properties_values_ids|checked|prop|for|name|in|v_surfaces|id|get_products_id|element_|input|cart_quantity|show|gm_gprint_loading||properties_values_ids|checkbox|t_delete|upload||target|cart|t_element_container|c_source|wishlist|file|c_target|copy_file|t_option_value_id|count_uploads|c_new_product|count_passes|c_old_product|class|source|length|hide|wishlist_to_cart|wishlist_checkbox|update_wishlist|old_product|img|src|gm|elements_id|images|null|gprint|t_products_id|gm_gprint_random|new_product|success|t_properties_values_ids|gif|text_input|textarea|dropdown|width|remove|radio|loading_|height|update_cart|responseText|UPLOAD_FIELD_ID|submit|failed|Upload|log|console|fb|submit_to_wishlist|error|ERROR_MESSAGE|gm_unescape|alert|gm_gprint_surface|gm_products_id|gm_attr_calc_input|html|document|search|ERROR|dataType|select|fileElementId|secureuri|gm_gprint_clear_number|upload_field_id|ajaxFileUpload|append|_container_|_|after|get_customers_data|GMGPrintCartWishlistManager'.split('|'),0,{}));
/*<?php
}
else
{
?>*/
function GMGPrintCartWishlistManager()
{
this.get_customers_data = function(p_coo_surfaces_manager, p_target)
{
var t_found_file = false;
var count_passes = 0;
var count_uploads = 0;
var coo_cart_wishlist_manager = this;
$('#cart_quantity input').each(function()
{
if($(this).attr('type') == 'file')
{
count_uploads++;
}
});
if($('#details_cart_part').length > 0)
{
$('#details_cart_part').hide();
$('#details_cart_part').after('<img src="gm/images/gprint/upload.gif" width="16" height="11" class="gm_gprint_loading" />')
}
$('#cart_quantity input').each(function()
{
if($(this).attr('type') == 'file')
{
t_found_file = true;
t_success = true;
var t_upload_field_id = $(this).attr('id');
var t_element_container = t_upload_field_id.replace(/_/g, '_container_');
var t_products_id = coo_cart_wishlist_manager.get_products_id();
var t_properties_values_ids = coo_cart_wishlist_manager.get_properties_values_ids();
$('#' + t_upload_field_id).hide();
$('#' + t_element_container).append('<img src="gm/images/gprint/upload.gif" width="16" height="11" class="gm_gprint_loading" id="loading_' + t_upload_field_id + '" />');
$.ajaxFileUpload({
url: 'request_port.php?module=GPrint&action=upload&upload_field_id=' + encodeURIComponent(t_upload_field_id)
+ '&products_id=' + encodeURIComponent(t_products_id)
+ '&target=' + encodeURIComponent(p_target)
+ '&mode=' + c_mode
+ t_properties_values_ids,
secureuri: false,
fileElementId: t_upload_field_id,
dataType: 'json',
success: function(p_filename)
{
if(p_filename['ERROR'] == false)
{
$('#loading_' + p_filename['UPLOAD_FIELD_ID']).remove();
count_passes++;
if(count_passes == count_uploads && t_success == true)
{
$('#'+t_element_container).html('');
if(p_target == 'cart')
{
coo_cart_wishlist_manager.add_cart(p_coo_surfaces_manager);
}
else if(p_target == 'wishlist')
{
coo_cart_wishlist_manager.add_wishlist(p_coo_surfaces_manager);
}
}
else if(t_success == false)
{
$('#' + p_filename['UPLOAD_FIELD_ID']).show();
}
}
else
{
$('.gm_gprint_loading').remove();
if($('#details_cart_part').length > 0)
{
$('#details_cart_part').show();
}
$('.gm_gprint_surface input').each(function()
{
if($(this).attr('type') == 'file')
{
$(this).show();
}
});
t_success = false;
alert(gm_unescape(p_filename['ERROR_MESSAGE']));
}
},
error: function()
{
if(fb)console.log("Upload failed: " + t_upload_field_id);
}
});
}
});
if(!t_found_file)
{
if(p_target == 'cart')
{
coo_cart_wishlist_manager.add_cart(p_coo_surfaces_manager);
}
else if(p_target == 'wishlist')
{
coo_cart_wishlist_manager.add_wishlist(p_coo_surfaces_manager);
}
}
}
this.add_cart = function(p_coo_surfaces_manager)
{
var t_user_input = '';
var coo_surface = null;
for(t_surfaces_id in p_coo_surfaces_manager.v_surfaces)
{
coo_surface = p_coo_surfaces_manager.v_surfaces[t_surfaces_id];
for(t_elements_id in coo_surface.v_elements)
{
if(coo_surface.v_elements[t_elements_id].get_type() == 'text_input'
|| coo_surface.v_elements[t_elements_id].get_type() == 'textarea'
|| coo_surface.v_elements[t_elements_id].get_type() == 'dropdown')
{
t_user_input += '&element_' + encodeURIComponent(t_elements_id) + '=' + encodeURIComponent($('#element_' + t_elements_id).val());
}
}
}
var t_products_id = this.get_products_id();
t_products_id = encodeURIComponent(t_products_id);
var t_properties_values_ids = this.get_properties_values_ids();
jQuery.ajax({
data: 'action=add_cart' + t_user_input + '&products_id=' + t_products_id + '&mode=' + c_mode + t_properties_values_ids,
url: 'request_port.php?module=GPrint',
type: "POST",
async: true,
success: function(t_success)
{
if(t_success == 'true')
{
document.cart_quantity.submit();
}
}
}).responseText;
}
this.update_cart = function()
{
var t_success = false;
var t_delete = false;
$('#cart_quantity input').each(function()
{
if($(this).attr('type') == 'checkbox' && $(this).prop('checked') == true)
{
t_delete = true;
var t_products_id = encodeURIComponent($(this).val());
t_success = jQuery.ajax({
data: 'action=update_cart&products_id=' + t_products_id + '&mode=' + c_mode,
url: 'request_port.php?module=GPrint',
type: "POST",
async: false
}).json;
}
});
if(!t_delete)
{
t_success = true;
}
return t_success;
}
this.add_wishlist = function(p_coo_surfaces_manager)
{
var t_user_input = '';
var coo_surface = null;
for(t_surfaces_id in p_coo_surfaces_manager.v_surfaces)
{
coo_surface = p_coo_surfaces_manager.v_surfaces[t_surfaces_id];
for(t_elements_id in coo_surface.v_elements)
{
if(coo_surface.v_elements[t_elements_id].get_type() == 'text_input'
|| coo_surface.v_elements[t_elements_id].get_type() == 'textarea'
|| coo_surface.v_elements[t_elements_id].get_type() == 'dropdown')
{
t_user_input += '&element_' + t_elements_id + '=' + encodeURIComponent($('#element_' + t_elements_id).val());
}
}
}
var t_products_id = this.get_products_id();
t_products_id = encodeURIComponent(t_products_id);
var t_properties_values_ids = this.get_properties_values_ids();
var t_success = jQuery.ajax({
data: 'action=add_wishlist' + t_user_input + '&products_id=' + t_products_id + '&mode=' + c_mode + t_properties_values_ids,
url: 'request_port.php?module=GPrint',
type: "POST",
async: false
}).responseText;
if(t_success == 'true')
{
submit_to_wishlist();
}
}
this.update_wishlist = function()
{
var t_success = false;
$('.wishlist_checkbox').each(function()
{
if($(this).attr('type') == 'checkbox' && $(this).prop('checked') == true)
{
var t_products_id = encodeURIComponent($(this).val());
t_success = jQuery.ajax({
data: 'action=update_wishlist&products_id=' + t_products_id + '&mode=' + c_mode,
url: 'request_port.php?module=GPrint',
type: "POST",
async: false
}).json;
}
});
return t_success;
}
this.wishlist_to_cart = function()
{
var t_success = false;
$('.wishlist_checkbox').each(function()
{
if($(this).attr('type') == 'checkbox' && $(this).prop('checked') == true)
{
var t_products_id = encodeURIComponent($(this).val());
t_success = jQuery.ajax({
data: 'action=wishlist_to_cart&products_id=' + t_products_id + '&mode=' + c_mode,
url: 'request_port.php?module=GPrint',
type: "POST",
async: false
}).json;
}
});
return t_success;
}
this.get_products_id = function()
{
var t_option_id = '0';
var t_option_value_id = '0';
var t_ids = $('#gm_products_id').val();
$('.gm_attr_calc_input').each(function()
{
if((($(this).prop('checked') == true && $(this).attr('type') == 'radio') || $(this).attr('type') != 'radio') && $(this).attr('name').search('properties_values_ids') == -1)
{
t_option_id = $(this).attr('name');
t_option_id = t_option_id.replace(/id\[/g, '{');
t_option_id = t_option_id.replace(/\]/g, '}');
t_option_value_id = $(this).val();
t_ids += t_option_id + t_option_value_id;
}
});
t_option_id = $('#gm_gprint_random').attr('name');
t_option_id = t_option_id.replace(/id\[/g, '{');
t_option_id = t_option_id.replace(/\]/g, '}');
t_ids += t_option_id + $('#gm_gprint_random').val();
return t_ids;
}
this.get_properties_values_ids = function()
{
var t_properties_values_ids = '';
$('select[name="properties_values_ids[]"]').each(function()
{
t_properties_values_ids += '&' + encodeURIComponent('properties_values_ids[]') + '=' + $(this).val();
});
return t_properties_values_ids;
}
this.copy_file = function(p_elements_id, p_old_product, p_new_product, p_target, p_source)
{
var c_elements_id = gm_gprint_clear_number(p_elements_id);
var c_old_product = encodeURIComponent(p_old_product);
var c_new_product = encodeURIComponent(p_new_product);
var c_target = encodeURIComponent(p_target);
var c_source = encodeURIComponent(p_source);
if(p_target == 'cart')
{
t_success = jQuery.ajax({
data: 'action=copy_file&elements_id=' + c_elements_id + '&old_product=' + c_old_product + '&new_product=' + c_new_product + '&target=' + c_target + '&source=' + c_source + '&mode=' + c_mode,
url: 'request_port.php?module=GPrint',
type: "POST",
async: false
}).json;
}
else if(p_target == 'wishlist')
{
t_success = jQuery.ajax({
data: 'action=copy_file&elements_id=' + c_elements_id + '&old_product=' + c_old_product + '&new_product=' + c_new_product + '&target=' + c_target + '&source=' + c_source + '&mode=' + c_mode,
url: 'request_port.php?module=GPrint',
type: "POST",
async: false
}).json;
}
}
}
/*<?php
}
?>*/