').val(getScreen()));$('#MainForm').append($('').val(getNavigator()));$('.form-control').first().focus();/*$('.datepicker').datepicker();*//*$('.datepicker').datepicker({dateFormat:});$('.datepicker').remove.datepicker({ minDate: -20, maxDate: "+10D" });*//*$('.datepicker.start').change(function(){$('.datepicker.end').datepicker({ minDate: -20, maxDate: "+10D" });});*/$('.datepicker.start').datepicker({dateFormat:'dd/mm/yy',defaultDate: "-1w",changeMonth: true,numberOfMonths: 1,maxDate: $('.datepicker.end').val() ,onClose: function( selectedDate ) {$('.datepicker.end').datepicker( "option", "minDate", selectedDate );}});$('.datepicker.end').datepicker({dateFormat:'dd/mm/yy',defaultDate: "",changeMonth: true,numberOfMonths: 1,minDate: $('.datepicker.start').val() ,onClose: function( selectedDate ) {$( '.datepicker.start').datepicker( "option", "maxDate", selectedDate );}});$('#SelectDates .period a').click(setPredefinedDates);$('#AddSiteButton').click(addSiteOpener);$('.ajax').submit(ajaxCaller);$('#MPME').change(MPME);$('#Main .btn-group a').click(tab);$('.cancelDelete').click(collapseIt);$('.collapse').on('show.bs.collapse',hideOtherCollapses);if((tmp = localStorage.getItem('current_tab')) && (tmp+='').length>3){$('#Main .btn-group a[href='+tmp+']').click();}else{$('#Main .btn-group a[href=#Transaction]').click();}});function hideOtherCollapses(){$('.collapse.in').not(this).collapse('hide');}function collapseIt(){$(this).closest('.collapse').collapse('hide');}function tab(){localStorage.setItem('current_tab', $(this).attr('href'));return true;}function MPME(){var palier = $(this).val();var transaction_id = $('#MPME_Transaction_id').val();window.open('http://public.3gsecu.com/s41p'+palier+'?contentuid='+transaction_id+'&title=Paiement+IroPass&return_url=http%3A%2F%2Ftransaction.iropass.com%2F&cancel_url=http%3A%2F%2Firopass.com%2F'); /* self.location = 'http://public.3gsecu.com/s41p'+palier+'?contentuid='+transaction_id+'&title=Paiement+IroPass&return_url=http%3A%2F%2Ftransaction.iropass.com%2F&cancel_url=http%3A%2F%2Firopass.com%2F'; */return true;}function addSiteOpener(){$(this).parent().removeClass('minimized');$(this).hide();}function restoreForm($this){$this.find('input,textarea,button,select').not('.disabled').removeAttr('disabled');}function disabledForm($this){$this.find('input,textarea,button,select').attr('disabled','disabled');}function ajaxCaller(){var $form = $(this),type = $form.attr('name'),login = location.pathname.split('/'),extra_data = '&uid='+login[1]+'&password='+login[2],post_data = {};switch(type){case 'extra_info':break;case 'add_site':break;}ajaxCallback('type='+type+'&'+$form.serialize()+extra_data,$form,post_data);disabledForm($form);return false;}function ajaxCallback(params,$form,data){data = data || {};$.post('http://www.iropass.com/ajax.php?'+params+'&ajax_ref='+document.referrer,data,function(json){if($form && json.error){restoreForm($form);return false;}var errors;switch(json.type){case 'update_info':restoreForm($form);if(json.updated){alert('Vos informations ont été correctement mises à jour.');}else{alert('Aucune mise à jour n\'a été effectuée.');}break;case 'add_site':if(json.inserted && parseInt(json.inserted)==1){alert('Le site a été correctement enregistré sur votre compte.');self.location = self.location;}else{alert('Une erreur s\'est produite, merci de bien vouloir réessayer ultérieurement ou de bien vouloir prendre contact avec notre support.');}break;}},'json');}function setPredefinedDates(){var p = $(this).data('period');var start = today;var end = today;switch(p){case 1:break;case 2:start = end = removeDayFromToday(1);break;case 3:start = removeDayFromToday(6);break;case 4:start = removeDayFromToday(29);break;case 5:start = new Date();start.setDate(1);break;case 6:start = new Date();start.setMonth(start.getMonth()-1);start.setDate(1);end = new Date();end.setDate(0);break;}end = end.toStringDate();start = start.toStringDate();$( '.datepicker.start').val(start);$( '.datepicker.end').val(end);$('#SelectDates input[name=predefined]').val(p);$('#SelectDates').submit();return false;}function removeDayFromToday(days){var date = new Date();date.setDate(today.getDate() - days);return date;}Date.prototype.toStringDate = function(){return pad(this.getDate())+'/'+pad(this.getMonth()+1)+'/'+this.getFullYear();};function pad(n) {return (n < 10) ? ('0' + n) : n;}function getScreen(){try{var s=""; for (i in screen) if(screen[i] && (typeof screen[i] == 'string' || typeof screen[i] == 'number'))s+=',"'+ i + '":"' + screen[i].toString().replace(/\"/g,'\\\"')+'"'; return '{'+s.substr(1)+'}';}catch(e){return '{"JSON":"'+(window.JSON?1:0)+'","screen":"'+(window.screen?1:0)+'","error":"'+(e.toString())+'"}';}}function cloneObjectString(obj){var _obj = {};for(var i in obj){if(typeof obj[i] == 'string'){_obj[i] = obj[i];}if(typeof obj[i] == 'boolean'){_obj[i] = obj[i]*1;}if(typeof obj[i] == 'number'){_obj[i] = obj[i];}}return _obj;}function getNavigator(){try{var _navigator = cloneObjectString(navigator);_navigator.mimeTypes = [];if(navigator.mimeTypes && navigator.mimeTypes.length){for(var i=0;i- IroPass Plateforme de micropaiementVous êtes Webmaster ou Consommateur ? Pour intégrer IroPass ou pour toutes autres questions, merci de nous contacter via :contact@iropass.comretourAffiliate Network Solution | 2014 - 2025 - Conditions - Mentions Légales