function simple_fade(id, how) { setInterval(function(){ if(how == 'on') jQuery(id).animate({ 'opacity': '1' }); else jQuery(id).animate({ 'opacity': '0' }); }, 3000); } function save_status(obj) { status = obj.value; comanda = jQuery(obj).attr('comanda'); mytoast("Se salveaza..."); //jQuery(".changed_status_" + comanda).empty(); jQuery.ajax({ type: 'POST', url: '/push/save_status.php?comanda=' + comanda + '&status=' + status, success: function(msg){ jQuery(".status_" + comanda).val(status); mytoast(msg); } }); } function save_form_req(obj) { if(obj.checked == true) val = 1; else val = 0; field_id = obj.value; jQuery.ajax({ type: 'POST', url: '/push/edit_page_prop.php?save_val=1&prop=field_req&val=' + val + '&field_id=' + field_id, success: function(msg){ if(msg != '') mytoast(msg); } }); } function save_page_formular(obj) { if(obj.checked == true) val = 1; else val = 0; form_id = obj.value; page_id = jQuery(obj).attr('page_id'); prop = jQuery(obj).attr('prop'); jQuery.ajax({ type: 'POST', url: '/push/edit_page_prop.php?save_val=1&prop=' + prop + '&val=' + val + '&page_id=' + page_id + '&form_id=' + form_id, success: function(msg){ if(msg != '') mytoast(msg); } }); } function cerere_changed(obj, id) { if(jQuery(obj).prop('checked') == true) ; //jQuery('.atrib_' + id).prop('checked', true); else jQuery('.atrib_' + id).prop('checked', false); } function cerere_child_changed(obj, id) { checked_cerere = false; jQuery('.atrib_' + id).each(function(i, obj) { if(jQuery(obj).prop('checked') == true) checked_cerere = true; }); //if(jQuery(obj).prop('checked') == true) jQuery('#cerere_' + id).prop('checked', checked_cerere); } function show_chatw() { if(jQuery('#chatw').attr('show') != 1) { jQuery('#chatw').addClass('chatw_show'); jQuery('#chatw').attr('show', 1); jQuery('#contact_us').css('display', 'none'); if(jQuery('#chatw').attr('loaded') != 1) apage("/push/chat_users.php", "chatw_in", function() {jQuery('#chatw').attr('loaded', 1)}); } else { jQuery('#chatw').removeClass('chatw_show'); jQuery('#chatw').attr('show', 0); jQuery('#contact_us').css('display', 'block'); } } function show_intrebare(id) { jQuery('.intrebare_body').removeClass('intrebare_body_show'); jQuery('#intrebare_body_' + id).addClass('intrebare_body_show'); } function save_admin_notif(obj) { if(obj.checked == true) val = 1; else val = 0; notif_id = jQuery(obj).attr('notif_id'); user_id = jQuery(obj).attr('user_id'); jQuery.ajax({ type: 'POST', url: '/push/save_admin_notif.php?save_val=1¬if_id=' + notif_id + '&user_id=' + user_id + '&val=' + val, success: function(msg){ if(msg != '') mytoast(msg); } }); } function search_admin_prod() { qs_admin_search = jQuery('#qs_admin_search').val(); cat_admin_search = jQuery('#cat_admin_search').val(); apage('/push/edit_produse.php?cat_admin_search=' + cat_admin_search + '&qs_admin_search='+qs_admin_search, 'content_div_1_in'); } function search_admin_prod2() { qs_admin_search = jQuery('#qs_admin_search').val(); cat_admin_search = jQuery('#cat_admin_search').val(); apage('/go/edit_produse/?ajpage=1&cat_admin_search=' + cat_admin_search + '&qs_admin_search='+qs_admin_search, 'main_site_div'); } function aj_sbm_form(form_id, div_id, callback) { // ihtml = jQuery('#' + div_id).html(); // jQuery('#' + div_id).append(""); jQuery.ajax({ // create an AJAX call... data: jQuery('#' + form_id).serialize(), // get the form data type: jQuery('#' + form_id).attr('method'), // GET or POST url: jQuery('#' + form_id).attr('action'), // the file to call success: function(response) { // on success.. jQuery('#' + div_id).html(response); // update the DIV if(typeof callback === 'function') callback(); } }); return false; // cancel original event to prevent form submitting } function apage_append(url, div, callback) { // jQuery( "#loader" ).css("display", 'block'); jQuery.get( url, function( data ) { jQuery( "#" + div).append( data ); if(typeof callback === 'function') callback(); //jQuery('#loader').css('display', 'none' ); }); } function dialog(msg, yesCb) { show_content4(); message = "
" + msg + "

   
"; jQuery('#content_div_4_in').html(message); jQuery('#btnYes').click(function() { yesCb(); hide_content4(); }); jQuery('#btnNo').click(function() { hide_content4(); }); } function apage_p(url, div, callback) { // jQuery( "#loader" ).css("display", 'block'); jQuery.get( url, function( data ) { jQuery( "#" + div).prepend( data ); if(typeof callback === 'function') callback(); //jQuery('#loader').css('display', 'none' ); }); } function apage(url, div, callback) { //jQuery( "#loader" ).css("display", 'block'); jQuery.get( url, function( data ) { jQuery( "#" + div).html( data ); bind_all('#' + div, '#main_site_div'); if(typeof callback === 'function') callback(); // jQuery('#loader').css('display', 'none' ); }); } function load_site_adm() { if(jQuery('#site_adm_div').attr('loaded') != 1) apage('/push/inc_menu_admin.php', 'site_adm_div', function() {jQuery('#site_adm_div').attr('loaded', 1)} ); } function show_site_adm() { load_site_adm(); show_site_menu(2); } function show_menu_admin(how) { if(jQuery('#site_adm').attr('visible') == 1 || how == 1) { jQuery("#site_adm").animate({ 'right':'-201px'}, 500); jQuery(".site_top_top, .site_top, .site_mid_wrapper").animate({ 'margin-right':'0'}, 500); jQuery('#site_adm').attr('visible', '0'); } else { jQuery("#site_adm").animate({ 'right':'0px'}, 500, function() { } ); jQuery(".site_top_top, .site_top, .site_mid_wrapper").animate({ 'margin-right':'200px'}, 500); jQuery('#site_adm').attr('visible', '1'); load_site_adm(); show_user_menu(1); } } function show_user_menu(how) { if(jQuery('#user_menu_div').attr('visible') == 1 || how == 1) { jQuery("#user_menu_div").animate({ 'right':'-320px'}, 500); jQuery('#user_menu_div').attr('visible', '0'); remove_out_click(); } else { jQuery("#user_menu_div").animate({ 'right':'0px'}, 500, function() { add_out_click(); } ); jQuery('#user_menu_div').attr('visible', '1'); add_out_click(); show_site_menu(1); } } function show_site_conv(how) { if(jQuery('#conversations_top').attr('visible') == 1 || how == 1) { jQuery("#conversations_top").animate({ 'right':'-320px'}, 500); jQuery('#conversations_top').attr('visible', '0'); remove_out_click(); } else { add_out_click(); jQuery("#conversations_top").animate({ 'right':'0px'}, 500, function() { add_out_click(); } ); jQuery('#conversations_top').attr('visible', '1'); jQuery('#mob_notif').html(''); show_site_menu(1); } jQuery('#user_notif, #mess_notif').empty(); } function show_site_menu(how) { if(!isMobileWidth(799)) { if(jQuery('#site_left_div').attr('visible') == 1 || how == 1) { jQuery("#site_left_div").animate({ 'left':'-320px'}, 500); jQuery('#site_left_div').attr('visible', '0'); remove_out_click(); } else if(how != 2) { add_out_click(); jQuery("#site_left_div").animate({ 'left':'0px'}, 500, function() { add_out_click(); } ); jQuery('#site_left_div').attr('visible', '1'); show_user_menu(1); } if(how == 2) { add_out_click(); jQuery("#site_left_div").animate({ 'left':'0px'}, 500, function() { add_out_click(); } ); jQuery('#site_left_div').attr('visible', '1'); show_user_menu(1); } } } function add_out_click() { jQuery('#out_click_div').css({ 'opacity': '0' }); jQuery('#out_click_div').css({ 'display': 'block' }); jQuery('#out_click_div').animate({ 'opacity': '0.2' }); } function remove_out_click() { jQuery('#out_click_div').css({ 'display': 'none' }); } function hide_all_menus() { show_site_menu(1);show_site_conv(1);show_user_menu(1); } function isMobileWidth(n) { return jQuery('#mind_' + n).is(':visible'); } function add_touch(expr) { jQuery( expr ).each(function() { if(jQuery(this).attr("onswleft") != undefined && jQuery(this).attr("onswleftadd") != '1') { this.addEventListener('touchmove', h_tm, false); jQuery(this).attr("onswleftadd", "1"); } }); } function add_touch_id(div_id) { if(jQuery('#' + div_id).attr("onswleft") != undefined && jQuery(this).attr("onswleftadd") != '1') { document.getElementById(div_id).addEventListener('touchmove', h_tm, false); jQuery('#' + div_id).attr("onswleftadd", "1"); } if(jQuery('#' + div_id).attr("onswright") != undefined && jQuery(this).attr("onswrightadd") != '1') { document.getElementById(div_id).addEventListener('touchmove', h_tm, false); jQuery('#' + div_id).attr("onswrightadd", "1"); } } document.addEventListener('touchstart', handleTouchStart, false); document.addEventListener('touchmove', handleTouchMove, false); var xDown = null; var yDown = null; function handleTouchStart(evt) { xDown = evt.touches[0].clientX; yDown = evt.touches[0].clientY; }; function handleTouchMove(evt) { if(!isMobileWidth(799)) { if ( ! xDown || ! yDown ) { return; } var xUp = evt.touches[0].clientX; var yUp = evt.touches[0].clientY; var xDiff = xDown - xUp; var yDiff = yDown - yUp; if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {/*most significant*/ if ( xDiff > 0 ) { /* left swipe */ show_left_body(1); show_menu(1); } else { /* right swipe */ hide_r_menu(); } } /* reset values */ xDown = null; yDown = null; } //mobile } function h_ts(evt) { xDown = evt.touches[0].clientX; yDown = evt.touches[0].clientY; }; function h_tm(evt) { if(!isMobileWidth(799)) { if ( ! xDown || ! yDown ) { return; } var xUp = evt.touches[0].clientX; var yUp = evt.touches[0].clientY; var xDiff = xDown - xUp; var yDiff = yDown - yUp; if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {/*most significant*/ if ( xDiff > 0 ) { /* left swipe */ eval(jQuery(this).attr("onswleft")); } else { /* right swipe */ eval(jQuery(this).attr("onswright")); } } /* reset values */ xDown = null; yDown = null; } //mobile } var act_top_scr = jQuery(window).scrollTop(); function hide_all_contents() { hide_content(); hide_content2(); hide_content3(); hide_content4(); } function rem_all_contents() { jQuery('#content_back').css('display', 'none' ); jQuery('.content_div_div').css('display', 'none' ); if(act_top_scr != 0) jQuery(window).scrollTop(act_top_scr); if(!is_content_open()) { jQuery('html').removeClass('no_overflow'); jQuery('body').removeClass('no_overflow'); } } function hide_content_main(id) { jQuery('#' + id).css('display', 'none' ); jQuery('#' + id + '_in').empty(); //jQuery('#' + id + '_back').css('display', 'none' ); if(act_top_scr != 0) jQuery(window).scrollTop(act_top_scr); if(!is_content_open()) { jQuery('html').removeClass('no_overflow'); jQuery('body').removeClass('no_overflow'); } } function show_content_main(id, title) { show_site_menu(1); show_user_menu(1); jQuery('#' + id + '_top').html(''); jQuery('#' + id + '_in').css('padding', '20px'); if(jQuery('#' + id).attr('noscr') != 1) { act_top_scr = jQuery(window).scrollTop(); jQuery(window).scrollTop(0); } jQuery('#' + id).css('display', 'block' ); jQuery('#' + id).css({'opacity': '0.25'}); jQuery('#' + id).animate({ 'opacity': '1' }); history.pushState({}, 'Title', "#hide_" + id); history.pushState({}, 'Title', "#stayhere"); if(!isMobileWidth(799)) { jQuery('html').addClass('no_overflow'); jQuery('body').addClass('no_overflow'); } } function get_content_main(id, url, cb) { show_content_main(id); show_loader(); jQuery.get( url, function( data ) { jQuery('#' + id + '_in').html( data ); hide_loader(); h = jQuery('#' + id).height() - 80; //jQuery('#' + id + '_in').css( 'max-height', h + 'px' ); bind_all('#' + id, '#main_site_div'); if(typeof cb === 'function') cb(); }); } function get_content(url, cb) { hide_content2(); hide_content3(); hide_content4(); get_content_main('content_div_1', url, cb); } function get_content2(url, cb) { hide_content3(); hide_content4(); get_content_main('content_div_2', url, cb); } function get_content3(url, cb) { hide_content4(); get_content_main('content_div_3', url, cb); } function get_content4(url, cb) { get_content_main('content_div_4', url, cb); } function show_content() { show_content_main('content_div_1'); } function show_content2() { show_content_main('content_div_2'); } function show_content3() { show_content_main('content_div_3'); } function show_content4() { show_content_main('content_div_4'); } function hide_content() { hide_content_main('content_div_1'); } function hide_content2() { hide_content_main('content_div_2'); } function hide_content3() { hide_content_main('content_div_3'); } function hide_content4() { hide_content_main('content_div_4'); } function show_loader() { //jQuery('#loader').css('display', 'block' ); } function hide_loader() { //jQuery('#loader').css('display', 'none' ); } function mytoast(msg) { jQuery("#mytoast_div").html(msg); var x = document.getElementById("mytoast_div"); x.className = "show"; setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); } function show_photo(obj) { im = jQuery(obj).attr('im'); show_content3(); jQuery('#content_div_3_in').html('
'); } function bind_img(div) { jQuery(div + ' img').bind('click', function() { show_photo(this); }); } function new_photo_empty_photos(w) { for (var i = 0; i < document.getElementById('poza_' + w).files.length; ++i) { jQuery('#photos_' + w).append("
"); show_photos_div(w); } document.getElementById('photos_form_' + w).submit(); } function aleg_imagine(w) { document.getElementById('photos_form_' + w).submit(); } function new_photo(w) { apage('/push/se_photos.php?w='+ w + '&' + Math.random() ,'photos_' + w); } function show_photos_div(w) { jQuery('#photos_' + w).css('display', 'block'); if(!isMobileWidth(799)) jQuery('#mesaje_main_' + w).css('bottom','130px'); else { jQuery('#mesaje_main_' + w).css('height','220px');jQuery('#mesaje_main_' + w).css('margin-bottom','80px'); } // eval('scr_msg_'+w+'()'); } function hide_photos_div(w) { jQuery('#photos_' + w).css('display', 'none'); jQuery('#photos_' + w).empty(); if(!isMobileWidth(799)) jQuery('#mesaje_main_' + w).css('bottom','50px'); else { jQuery('#mesaje_main_' + w).css('height','300px'); jQuery('#mesaje_main_' + w).css('margin-bottom','0px'); } } function bind_all(div, target, params) { /* jQuery(div + ' a').bind('click', function() { hr_tmp = jQuery(this).attr('href'); if(hr_tmp == "/#") return false; ret = 0; if(hr_tmp.match(/#/)) ret = 1; // if(hr_tmp.includes("http") && !hr_tmp.includes("https://www.orbiterprojects.com")) ret = 1; if(jQuery(this).attr('target') == '_blank') ret = 1; if(jQuery(this).attr('nobind')!=1 && ret == 0) { href = jQuery(this).attr('href'); params = jQuery(this).attr('params'); hash = href.replace(/^/,''); if(hash != '#stayhere' && hash != "#" && href != "#" && hash != "/#" && href != "/#") { bind_navigate(href, target, params); return false; } } }); */ } function bind_navigate(href, target, ignorestate) { //alert('clicked'); load_after_bind = false; show_loader(); jQuery.ajax({ // create an AJAX call... data: { ajpage: 'subcat' }, // get the form data , params: params type: 'POST', // GET or POST url: href, // the file to call success: function(response) { // on success.. jQuery(target).html(response); // update the DIV hide_loader(); hide_all_menus(); remove_out_click(); bind_all(target,target); hide_all_contents(); if(load_after_bind) if(typeof after_bind === "function") after_bind(); jQuery('html, body').scrollTop(0); if(ignorestate != '1') window.history.pushState( { } , "...", href ); if(ga_code != '') { ga('create', ga_code, 'auto'); ga('send', 'pageview', href); } }, error: function(XMLHttpRequest, textStatus, errorThrown) { hide_loader(); } }); return false; } window.onpopstate = function(event) { //alert(window.location.href); if(window.location.hash.substr(0,'#stayhere'.length) != '#stayhere' && !window.location.href.match(/#/) ) bind_navigate(window.location.href,'#main_site_div', 1); }; function hide_content_lb() { jQuery('#content_lb').css('display', 'none' ); jQuery('#content_lb_in').empty(); jQuery('#content_lb').attr('activ', '0'); } function show_content_lb() { jQuery('#content_lb').css('display', 'block' ); jQuery('#content_lb').css({'opacity': '0.25'}); jQuery('#content_lb').animate({ 'opacity': '1' }); jQuery('#content_lb').attr('activ', '1'); history.pushState({}, 'Title', "#hide_lb"); history.pushState({}, 'Title', "#stayhere"); } function gallery(g, act) { if(jQuery('#content_lb').attr('activ')!= 1) show_content_lb(); show_loader(); jQuery.get( '/push/gallery.php?g=' + g + '&act=' + act, function( data ) { jQuery('#content_lb_in').html( data ); hide_loader(); }); } function cart_increase(id, nr, cb) { act_nr = parseInt(jQuery('#nr_' + id).val()); act_nr = act_nr + nr; if(act_nr > 0) jQuery('#nr_' + id).val(act_nr); //if(cb) //apage("/api_cart_add.php?id=" + id + "&nract=" + act_nr, "dmd"); } function fav_add(id) { get_content_cart("/push/add_fav_min.php?id=" + id); } function cart_add(id) { nr = parseInt(jQuery('#nr_' + id).val()); if(nr < 0) alert('Numarul trebuie sa fie mai mare decat 0'); else { atr = ""; jQuery('.catr').each(function(){ if(jQuery(this).val() * 1 != 0) atr = atr + "&atr_" + jQuery(this).attr('atr_id') + "=" + jQuery(this).val(); }); get_content_cart("/push/add_cart_min.php?id=" + id + "&nr=" + nr + atr); } } function sel_atr(atr_id, val_id) { if(jQuery('#catr_'+atr_id).val() == val_id) { jQuery('#catr_'+atr_id).val(''); jQuery('#vcart_'+val_id).removeClass('fs'); } else { jQuery('#acart_'+atr_id+' span').removeClass('fs'); jQuery('#vcart_'+val_id).addClass('fs'); jQuery('#catr_'+atr_id).val(val_id); } } function get_content_cart(url, cb) { jQuery('#content_cart_in').html(''); jQuery('#content_back' ).css('display', 'block' ); jQuery('#content_cart').css('display', 'block' ); jQuery('#content_cart').css({'opacity': '0.25'}); jQuery('#content_cart').animate({ 'opacity': '1' }); jQuery.get( url, function( data ) { jQuery('#content_cart_in').html( data ); if(typeof cb === 'function') cb(); }); } function hide_content_cart() { jQuery('#content_back' ).css('display', 'none' ); jQuery('#content_cart').css('display', 'none' ); } function ok_dialog(t) { jQuery('#content_back' ).css('display', 'block' ); jQuery('#content_cart').css('display', 'block' ); jQuery('#content_cart').css({'opacity': '0.25'}); jQuery('#content_cart').animate({ 'opacity': '1' }); jQuery('#content_cart_in').html("

"+t+"

Am inteles"); } function bind_tim(div) { jQuery(div + ' img').bind('click', function() { hr = jQuery(this).attr('src'); hr = hr.replace(/-orig/,''); hr = hr.replace(/.jpg/,''); hr = hr + '-orig.jpg'; show_content(); jQuery('#content_div_1_top').html('Imagine'); jQuery('#content_div_1_in').html('
'); }); } function search_prev() { } function search_submit() { qs = jQuery('#site_search_input').val(); if(qs != '') bind_navigate('/go/search/?qs=' + qs, '#main_site_div'); show_search(1); } function search_submit_prez() { qs = jQuery('#site_search_input').val(); if(qs != '') bind_navigate('/go/search_prez/?qs=' + qs, '#main_site_div'); show_search(1); } function show_search(how) { if(jQuery('#site_search').attr('visible') == 1 || how == 1) { jQuery("#site_search").removeClass('site_search_visible'); jQuery('#site_search').attr('visible', '0'); } else { jQuery("#site_search").addClass('site_search_visible'); jQuery('#site_search').attr('visible', '1'); } } function set_platita(id) { dialog("Se va marca platita?", function() {apage('/push/act_comanda.php?id='+id+'&plata=1', 'set_plata_'+id)} ) } function set_neplatita(id) { dialog("Se va marca NEPLATITA?", function() {apage('/push/act_comanda.php?id='+id+'&plata=-1', 'set_plata_'+id)} ) } function set_anulata(id) { dialog("Se va anula comanda?", function() {apage('/push/act_comanda.php?id='+id+'&plata=2', 'set_plata_'+id)} ) } function set_neanulata(id) { dialog("Se va reactiva?", function() {apage('/push/act_comanda.php?id='+id+'&plata=0', 'set_plata_'+id)} ) } function plata_fin(id) { dialog("Se va finaliza plata?", function() {apage('/push/act_plata.php?id='+id+'&act=finalizare', 'plata_ins_'+id)} ) } function plata_refund(id) { get_content2('/push/act_plata.php?id='+id+'&act=refund_dialog'); //dialog("Se va face refund la plata?
Banii vor fi returnati clientului.", function() {apage('/push/act_plata.php?id='+id+'&act=refund', 'plata_ins_'+id)} ) } function calcul_rp() { if(jQuery("#refund_partial_2").prop('checked') != true) { jQuery("#refund_partial_1").prop("checked", false); jQuery("#refund_partial_2").prop("checked", true); } tot = 0; jQuery('#rpdiv .rp').each(function(){ if(jQuery(this).prop('checked') == true) tot = 1 * tot + 1 * jQuery(this).val(); }); if(tot > jQuery('#suma_refund_total').val()) tot = jQuery('#suma_refund_total').val(); jQuery('#suma_refund').val(tot); } function set_div_content(d, c) { jQuery(d).html(c); } function chpass() { p_new1 = jQuery('#p_new1').val(); p_new2 = jQuery('#p_new2').val(); if(p_new1 != p_new2 || p_new1 == '') ok_dialog('Parolele noi nu coincid'); else aj_sbm_form('change_pass', 'change_pass_div'); } function sw_tab(obj) { id = jQuery(obj).attr('id'); jQuery('.tab_title').removeClass('tab_title_sel'); jQuery('.tab_content').css('display', 'none'); jQuery('#' + id).addClass('tab_title_sel'); jQuery('#' + id + '_content').css('display', 'block'); } function msnr(id, selector) { jQuery(window).on('load',function(){ imagesLoaded( id, function() { var $container = jQuery(id); // initialize $container.masonry({ itemSelector: selector }); }); }); } function save_atr_val(obj) { if(obj.checked == true) add_val = 1; else add_val = 0; prod_id = jQuery(obj).attr('prod_id'); atr_id = jQuery(obj).attr('atr_id'); val_id = jQuery(obj).attr('val_id'); jQuery.ajax({ type: 'POST', url: '/push/edit_atr_prod_vals.php?save_val=1', data: { prod_id: prod_id, atr_id: atr_id , val_id: val_id , add_val: add_val }, success: function(msg){ if(msg != '') mytoast(msg); } }); } function save_atr_col(val_id, col) { jQuery.ajax({ type: 'POST', url: '/push/edit_atr_init_vals.php?save_col=1&val_id=' + val_id + '&col=' + col, data: { save_col: 1 }, success: function(msg){ if(msg != '') mytoast(msg); } }); } function save_atr_prop(obj) { if(obj.checked == true) val = 1; else val = 0; res_id = jQuery(obj).attr('res_id'); t = jQuery(obj).attr('t'); f = jQuery(obj).attr('f'); jQuery.ajax({ type: 'POST', url: '/push/edit_atr.php?save_val=1&t=' + t + '&f=' + f + '&val=' + val + '&res_id=' + res_id, success: function(msg){ if(msg != '') mytoast(msg); } }); } function save_page_prop(obj) { if(obj.checked == true) val = obj.value; else val = 0; page_id = jQuery(obj).attr('page_id'); prop = jQuery(obj).attr('prop'); jQuery.ajax({ type: 'POST', url: '/push/edit_page_prop.php?save_val=1&prop=' + prop + '&val=' + val + '&page_id=' + page_id, success: function(msg){ if(msg != '') mytoast(msg); } }); } function save_page_detail(obj) { val = obj.value; page_id = jQuery(obj).attr('page_id'); prop = jQuery(obj).attr('prop'); jQuery.ajax({ type: 'POST', url: '/push/edit_page_detail.php?save_val=1&prop=' + prop + '&val=' + val + '&page_id=' + page_id, success: function(msg){ if(msg != '') mytoast(msg); } }); } function save_page_loc(obj) { if(obj.checked == true) val = 1; else val = 0; locatie_id = obj.value; page_id = jQuery(obj).attr('page_id'); prop = jQuery(obj).attr('prop'); jQuery.ajax({ type: 'POST', url: '/push/edit_page_prop.php?save_val=1&prop=' + prop + '&val=' + val + '&page_id=' + page_id + '&locatie_id=' + locatie_id, success: function(msg){ if(msg != '') mytoast(msg); } }); } function save_site_setting(obj) { setting_id = jQuery(obj).attr('setting_id'); val = jQuery(obj).val(); jQuery.ajax({ type: 'POST', url: '/push/save_site_setting.php?save_val=1&setting_id=' + setting_id + '&val=' + val , success: function(msg){ if(msg != '') mytoast(msg); } }); }