src/service/servicesGlobale.php line 39

Open in your IDE?
  1. <?php
  2. namespace App\service;
  3. use Symfony\Component\HttpFoundation\RequestStack;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  6. class servicesGlobale
  7. {   
  8.     public function __construct(SessionInterface $session RequestStack $request )
  9.     {
  10.         $this->session $session;
  11.         $this->request $request ;
  12.         $this->sadmin_l "sadmin_akoya";
  13.         
  14.         $this->salt1 "Qs94fzL8F" ;
  15.         $this->salt2 "5ZQiBq4k8" ;
  16.         $password "i5wMXi2mhEZzzx27gb0Ld0se" ;
  17.         
  18.         $this->sadmin_p sha1($this->salt1.$password.$this->salt2) ;
  19.     }
  20.     public function verifSession()
  21.     {
  22.         
  23.         if($this->session->get('userxYtssA') == null ){
  24.             return false ;
  25.         }
  26.         else{
  27.             return true ;
  28.         }
  29.     }
  30.     
  31.     public function sadmin($username $password
  32.     {
  33.         
  34.         if(( $this->sadmin_l == $username )&&( $this->sadmin_p == sha1$this->salt1.$password.$this->salt2)  )){
  35.             return 'Qs94fzL8F' ;
  36.         }
  37.         
  38.     }
  39.     function getUrls(){
  40.         $urls = [
  41.             'url_site'=> 'https://akoya.services-unifies.fr' ,
  42.             'url_dashboard'=> 'https://akoyaconfig.services-unifies.fr' ,
  43.             
  44.             ] ;
  45.         return $urls ;
  46.     }
  47.    
  48.    
  49.   
  50. }
  51. ?>