diff --git a/.env.example b/.env.example index 0c9bab580..baba71076 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,6 @@ NODE_ENV=development +LOGIN_JWT=true AZIENDA=integry ENABLED_PROFILES= @@ -7,4 +8,4 @@ SERVICES_BASE_URL=http://localhost:8080 PUBLIC_URL=http://localhost/pvm SC_PROJECT= -SC_SECURITY= \ No newline at end of file +SC_SECURITY= diff --git a/public_html/_form_cliente_fornitore.php b/public_html/_form_cliente_fornitore.php index ce09d4323..45085082f 100644 --- a/public_html/_form_cliente_fornitore.php +++ b/public_html/_form_cliente_fornitore.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(false); diff --git a/public_html/_form_vettore.php b/public_html/_form_vettore.php index d747f8033..dfb0c60d1 100644 --- a/public_html/_form_vettore.php +++ b/public_html/_form_vettore.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/accettazione.php b/public_html/accettazione.php index 381472ff0..403d11e8a 100644 --- a/public_html/accettazione.php +++ b/public_html/accettazione.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -35,4 +35,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/accettazione_floro.php b/public_html/accettazione_floro.php index 93d61eddf..a9116f257 100644 --- a/public_html/accettazione_floro.php +++ b/public_html/accettazione_floro.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/allegati.php b/public_html/allegati.php index bc866aeeb..f4d25646f 100644 --- a/public_html/allegati.php +++ b/public_html/allegati.php @@ -2,11 +2,11 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; +include_once "config.php"; if (!isset($_GET["render"])) { require_once "include_login.php"; } -include_once "config.php"; (new AllegatiAjax())->checkAjaxRequests(); ?> @@ -29,4 +29,4 @@ include_once "config.php"; - \ No newline at end of file + diff --git a/public_html/allevamento_bande.php b/public_html/allevamento_bande.php index 93d61eddf..a9116f257 100644 --- a/public_html/allevamento_bande.php +++ b/public_html/allevamento_bande.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/analisi_budget.php b/public_html/analisi_budget.php index c4e13b435..5c2bff469 100644 --- a/public_html/analisi_budget.php +++ b/public_html/analisi_budget.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -32,4 +32,4 @@ $className = "AnalisiBudget" . Utility\Str::ucfirst(preg_replace("/[^A-Za-z0-9\\ - \ No newline at end of file + diff --git a/public_html/analisi_costi.php b/public_html/analisi_costi.php index d747f8033..dfb0c60d1 100644 --- a/public_html/analisi_costi.php +++ b/public_html/analisi_costi.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/approv_ordini_vendita.php b/public_html/approv_ordini_vendita.php index 4102d0404..4622c9157 100644 --- a/public_html/approv_ordini_vendita.php +++ b/public_html/approv_ordini_vendita.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/articoli_anag.php b/public_html/articoli_anag.php index 93d61eddf..a9116f257 100644 --- a/public_html/articoli_anag.php +++ b/public_html/articoli_anag.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/associazione_articolo.php b/public_html/associazione_articolo.php index 93d61eddf..a9116f257 100644 --- a/public_html/associazione_articolo.php +++ b/public_html/associazione_articolo.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/associazione_report.php b/public_html/associazione_report.php index 93d61eddf..a9116f257 100644 --- a/public_html/associazione_report.php +++ b/public_html/associazione_report.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/autorizza_pagamenti.php b/public_html/autorizza_pagamenti.php index 4102d0404..4622c9157 100644 --- a/public_html/autorizza_pagamenti.php +++ b/public_html/autorizza_pagamenti.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/blacklist_art_clie.php b/public_html/blacklist_art_clie.php index 6448e383f..da99da299 100644 --- a/public_html/blacklist_art_clie.php +++ b/public_html/blacklist_art_clie.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; (new BlacklistArtClie())->checkAjaxRequests(); diff --git a/public_html/blacklist_linee_cliente.php b/public_html/blacklist_linee_cliente.php index 0320a0629..da8e4cf7d 100644 --- a/public_html/blacklist_linee_cliente.php +++ b/public_html/blacklist_linee_cliente.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/blank.php b/public_html/blank.php index 26cd76e43..ea5eb1dff 100644 --- a/public_html/blank.php +++ b/public_html/blank.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/budget_vendite.php b/public_html/budget_vendite.php index 0320a0629..da8e4cf7d 100644 --- a/public_html/budget_vendite.php +++ b/public_html/budget_vendite.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/calendario_pv.php b/public_html/calendario_pv.php index c88912cb4..f87ba5310 100644 --- a/public_html/calendario_pv.php +++ b/public_html/calendario_pv.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/campagne_marketing.php b/public_html/campagne_marketing.php index 93d61eddf..a9116f257 100644 --- a/public_html/campagne_marketing.php +++ b/public_html/campagne_marketing.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/catalogo.php b/public_html/catalogo.php index 4102d0404..4622c9157 100644 --- a/public_html/catalogo.php +++ b/public_html/catalogo.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/catalogo_moda.php b/public_html/catalogo_moda.php index 93d61eddf..a9116f257 100644 --- a/public_html/catalogo_moda.php +++ b/public_html/catalogo_moda.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/catasto_terreni.php b/public_html/catasto_terreni.php index cf82113fd..f1acb6309 100644 --- a/public_html/catasto_terreni.php +++ b/public_html/catasto_terreni.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/check_doc_acquisti.php b/public_html/check_doc_acquisti.php index 93d61eddf..a9116f257 100644 --- a/public_html/check_doc_acquisti.php +++ b/public_html/check_doc_acquisti.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/chiusura_tagli_prezzo.php b/public_html/chiusura_tagli_prezzo.php index 96dddb996..66a7a0a81 100644 --- a/public_html/chiusura_tagli_prezzo.php +++ b/public_html/chiusura_tagli_prezzo.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/classes/ErrorHandler.class.php b/public_html/classes/ErrorHandler.class.php index 5b5fc0256..7af672f6b 100644 --- a/public_html/classes/ErrorHandler.class.php +++ b/public_html/classes/ErrorHandler.class.php @@ -4,6 +4,7 @@ class ErrorHandler { const EMSCONNECT = 0; const EMSHTTP = 1; const EMSHTTP400 = 2; + const EMSHTTP401 = 401; const EMSPARSE = 3; const EMSNOMESSAGE = 4; const UNEXPECTED_AJAX_METHOD = 5; @@ -40,16 +41,19 @@ class ErrorHandler { // sostituito switch/case con if/elseif perche non veniva cfatta la comparazione col tipo if ($errorCode === self::EMSCONNECT) { return (!is_null($p1) ? "Servizio {$p1}
" : "") - . "Il servizio EMS non è raggiungibile"; + . "Il servizio EMS non è raggiungibile"; } else if ($errorCode === self::EMSHTTP) { return (!is_null($p1) ? "Servizio {$p3}
" : "") - . "La chiamata al servizio ha restituito l'errore http " . blankIfNull($p1) . "" . (!is_null($p2) ? "
{$p2}
" : ""); + . "La chiamata al servizio ha restituito l'errore http " . blankIfNull($p1) . "" + . (!is_null($p2) ? "
{$p2}
" : ""); } else if ($errorCode === self::EMSHTTP400) { return (!is_null($p1) ? "Servizio {$p1}
" : "") - . "La chiamata al servizio ha restituito l'errore http 400 (Bad Request)" . (!is_null($p2) ? "
{$p2}
" : ""); - + . "La chiamata al servizio ha restituito l'errore http 400 (Bad Request)" + . (!is_null($p2) ? "
{$p2}
" : ""); + } else if ($errorCode === self::EMSHTTP401) { + return $p2; } else if ($errorCode === self::EMSHTTP550) { return "Licenza non valida"; @@ -57,12 +61,13 @@ class ErrorHandler { return "Application name non valorizzato"; } else if ($errorCode === self::EMSPARSE) { - return (!is_null($p1) ? "Servizio {$p1}
" : "") . - "Parse della risposta del servizio " . blankIfNull($p1) . " fallita"; + return (!is_null($p1) ? "Servizio {$p1}
" : "") + . + "Parse della risposta del servizio " . blankIfNull($p1) . " fallita"; } else if ($errorCode === self::EMSNOMESSAGE) { return (!is_null($p1) ? "Servizio {$p1}
" : "") - . "Messaggio di errore non pervenuto"; + . "Messaggio di errore non pervenuto"; } else if ($errorCode === self::MISSINGINPUTSECRET) { return "Parametro secret mancante"; @@ -143,7 +148,8 @@ class ErrorHandler { if (\GestSetup::isGestSetupObject($GestSetup)) { $description = $GestSetup->getDescription(); - $message = "" . $GestSetup->getGestName() . " > " . $GestSetup->getSection() . " > " . $GestSetup->getKeySection() . ""; + $message = "" . $GestSetup->getGestName() . " > " + . $GestSetup->getSection() . " > " . $GestSetup->getKeySection() . ""; if (!is_null($description)) { $message .= " (" . ucfirst($description) . ")"; } @@ -155,7 +161,9 @@ class ErrorHandler { } public static function get_title($errorCode, $p1 = null, $p2 = null, $p3 = null) { - if (in_array($errorCode, array(self::EMSHTTP400, self::EMSHTTP, self::EMSPARSE, self::EMSNOMESSAGE, self::EMSCONNECT))) { + if (in_array($errorCode, array( + self::EMSHTTP400, self::EMSHTTP, self::EMSPARSE, self::EMSNOMESSAGE, self::EMSCONNECT + ))) { return "Servizio non disponibile"; } else if (in_array($errorCode, array(self::UNEXPECTED_AJAX_METHOD, self::UNEXPECTED_METHOD))) { @@ -173,9 +181,13 @@ class ErrorHandler { } else if (in_array($errorCode, array(self::UNAUTHORIZED_USER))) { return "Utente non autorizzato"; - } else if (in_array($errorCode, array(self::APIXU_MISSING_INVALID_KEY, self::APIXU_MISSING_Q, self::APIXU_INVALID_URL, self::APIXU_LOCATION_NOT_FOUND, self::APIXU_DAY_UNAVAILABLE, self::APIXU_INVALID_KEY, self::APIXU_EXCEED_QUOTA, self::APIXU_DISABLED_KEY, self::APIXU_INTERNAL_ERROR))) { + } else if (in_array($errorCode, array( + self::APIXU_MISSING_INVALID_KEY, self::APIXU_MISSING_Q, self::APIXU_INVALID_URL, + self::APIXU_LOCATION_NOT_FOUND, self::APIXU_DAY_UNAVAILABLE, self::APIXU_INVALID_KEY, + self::APIXU_EXCEED_QUOTA, self::APIXU_DISABLED_KEY, self::APIXU_INTERNAL_ERROR + ))) { return "Servizio meteo non disponibile"; } return null; } -} \ No newline at end of file +} diff --git a/public_html/classes/IMSApi.class.php b/public_html/classes/IMSApi.class.php index 0d86c6f5f..2b5bfb591 100644 --- a/public_html/classes/IMSApi.class.php +++ b/public_html/classes/IMSApi.class.php @@ -13,6 +13,7 @@ class IMSApi { private $endpoint = null; private $profileDB = null; private $queryParams = array(); + private $accessToken = null; private $authUsername = null; private $authPassword = null; private $anonymousAuth = false; @@ -68,6 +69,11 @@ class IMSApi { return $this; } + public function accessToken($value) { + $this->accessToken = $value; + return $this; + } + public function authUsername($value) { $this->authUsername = $value; return $this; @@ -107,18 +113,24 @@ class IMSApi { if ($type == Format::strftimeYMD) { $type = Format::strtotimeYMD; - } else if ($type == Format::strftimeYMDHMS) { - $type = Format::strtotimeYMDHMS; - } else if ($type == Format::strftimeSlashedYMD) { - $type = "Y/m/d"; + } else { + if ($type == Format::strftimeYMDHMS) { + $type = Format::strtotimeYMDHMS; + } else { + if ($type == Format::strftimeSlashedYMD) { + $type = "Y/m/d"; + } + } } $value = $dateTime->format($type); } catch (Exception $e) { } } - } else if ($type == \Format::latLng1) { + } else { + if ($type == \Format::latLng1) { + } } } @@ -215,11 +227,13 @@ class IMSApi { if (is_array($this->body)) { if ($this->contentType == Rest::FORM) { return http_build_query($this->body); - } else if ($this->contentType == Rest::MULTIPART) { - - return $this->body; } else { - return Utility::json_encode($this->body); + if ($this->contentType == Rest::MULTIPART) { + + return $this->body; + } else { + return Utility::json_encode($this->body); + } } } return $this->body; @@ -253,12 +267,18 @@ class IMSApi { $profileDb = !is_null($this->profileDB) ? $this->profileDB : (isset($GLOBALS["profileDB"]) ? $GLOBALS["profileDB"] : null); return array("username" => $profileDb, "password" => $profileDb); - } else if (!is_null($this->authUsername) && !is_null($this->authPassword)) { - return array("username" => $this->authUsername, "password" => $this->authPassword); - } else if (!is_null($this->authUsername)) { - return array("username" => $this->authUsername); - } else if (\User::is_authenticated() && isset($_SESSION["password"])) { - return array("username" => $_SESSION["username"], "password" => $_SESSION["password"]); + } else { + if (!is_null($this->authUsername) && !is_null($this->authPassword)) { + return array("username" => $this->authUsername, "password" => $this->authPassword); + } else { + if (!is_null($this->authUsername)) { + return array("username" => $this->authUsername); + } else { + if (\User::is_authenticated() && isset($_SESSION["password"])) { + return array("username" => $_SESSION["username"], "password" => $_SESSION["password"]); + } + } + } } return null; @@ -296,18 +316,33 @@ class IMSApi { $Rest->header("X-App-Token", self::X_APP_TOKEN); - $credentials = $this->get_authCredentials(); - if (!is_null($credentials)) { - if (array_get($credentials, "username")) { - $Rest->authUsername($credentials["username"]); - } + if (LOGIN_JWT) { + if (!$this->anonymousAuth) { + if (is_null($this->accessToken)) { + $this->accessToken = array_get($_SESSION, "accessToken"); + } - if (array_get($credentials, "password")) { - $Rest->authPassword($credentials["password"]); + if (!$this->accessToken) { + return $Ret->set_error(sprintf("Access token mancante al servizio %s", $this->serviceName)); + } + + $Rest->header("Authorization", "Bearer $this->accessToken"); } } else { - return $Ret->set_error("Credenziali di autenticazione al servizio " . $this->serviceName - . " non valide"); + $credentials = $this->get_authCredentials(); + + if (!is_null($credentials)) { + if (array_get($credentials, "username")) { + $Rest->authUsername($credentials["username"]); + } + + if (array_get($credentials, "password")) { + $Rest->authPassword($credentials["password"]); + } + } else { + return $Ret->set_error("Credenziali di autenticazione al servizio " . $this->serviceName + . " non valide"); + } } /********************************** HERE IT IS PERFORMED THE REST APIs CALL *************************************/ @@ -327,6 +362,44 @@ class IMSApi { if ($Ret->is_OK()) { @$Ret->set_Response(new IMSApi\Response($retData)); } + } else { + if (!\Utility\Str::contains("auth/refresh", $this->serviceName) + && $Ret->get_errorCode() == ErrorHandler::EMSHTTP401 + && isset($_SESSION["refreshToken"]) + && isset($_SESSION["deviceId"])) { + $imsApi = new IMSApi(); + + $ret = $imsApi + ->post("auth/refresh") + ->anonymousAuth() + ->profileDB($this->profileDB) + ->body(array( + "refreshToken" => $_SESSION["refreshToken"], + "deviceId" => $_SESSION["deviceId"], + )) + ->send(); + + if ($ret->is_KO()) { + unset($_SESSION["accessToken"]); + User::logout(); + + // non posso impostare alcun header perchè è già partito l'output con echo ┑( ̄Д  ̄)┍ + echo ""; + + return Ret::error(); + } + + $data = $ret->getDto(); + + $this->accessToken = $data["accessToken"]; + + $_SESSION["accessToken"] = $data["accessToken"]; + $_SESSION["refreshToken"] = $data["refreshToken"]; + $_SESSION["expiryDate"] = $data["expiryDate"]; + $_SESSION["expiresIn"] = $data["expireIn"]; + + return self::send(); + } } return $Ret; diff --git a/public_html/classes/Rest.class.php b/public_html/classes/Rest.class.php index 22568aad1..20b8486ae 100644 --- a/public_html/classes/Rest.class.php +++ b/public_html/classes/Rest.class.php @@ -382,6 +382,9 @@ class Rest { } else if ($httpCode == 400) { $errorLog = "400"; $Ret->set_errorCode(ErrorHandler::EMSHTTP400, $this->service, array_get($retData, "0.errorMessage")); + } else if ($httpCode == 401) { + $errorLog = "401"; + $Ret->set_errorCode(ErrorHandler::EMSHTTP401, $this->service, array_get($retData, "0.errorMessage")); } else if ($httpCode == 550) { $errorLog = "550"; $Ret->set_errorCode(ErrorHandler::EMSHTTP550, $this->service); diff --git a/public_html/classes/User.class.php b/public_html/classes/User.class.php index a647f6165..680577e2d 100644 --- a/public_html/classes/User.class.php +++ b/public_html/classes/User.class.php @@ -289,6 +289,18 @@ class User { public static function logout() { getSession(); + + if (LOGIN_JWT && isset($_SESSION["accessToken"])) { + $imsApi = new IMSApi(); + + $imsApi + ->put("auth/logout") + ->body(array( + "deviceId" => $_SESSION["deviceId"] + )) + ->send(); + } + //operazioni e controlli per effettura il logout dell'utente/agente if (isset($_SESSION["login"])) { $_SESSION["login"] = false; diff --git a/public_html/classificazione_prodotti_ecr.php b/public_html/classificazione_prodotti_ecr.php index 9cd3a0a3b..aa565908c 100644 --- a/public_html/classificazione_prodotti_ecr.php +++ b/public_html/classificazione_prodotti_ecr.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -27,4 +27,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { ?> - \ No newline at end of file + diff --git a/public_html/clienti_fid_anag.php b/public_html/clienti_fid_anag.php index 4102d0404..4622c9157 100644 --- a/public_html/clienti_fid_anag.php +++ b/public_html/clienti_fid_anag.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/colli_aperti.php b/public_html/colli_aperti.php index 4102d0404..4622c9157 100644 --- a/public_html/colli_aperti.php +++ b/public_html/colli_aperti.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/config.php b/public_html/config.php index 5c0b5871d..cda472163 100644 --- a/public_html/config.php +++ b/public_html/config.php @@ -20,6 +20,8 @@ $dotenv->safeLoad(); //$dotenv->required(array("AZIENDA", "SERVICES_BASE_URL"))->notEmpty(); //$dotenv->required("APP_ENV")->allowedValues(array("DEV", "PROD"))->notEmpty(); +define("LOGIN_JWT", array_key_exists("LOGIN_JWT", $_ENV) && $_ENV["LOGIN_JWT"] == "true"); + try { $cacheManager = \phpFastCache\CacheManager::getInstance("sqlite"); } catch (\phpFastCache\Exceptions\phpFastCacheDriverCheckException $e) { diff --git a/public_html/contatti_commesse.php b/public_html/contatti_commesse.php index 4102d0404..4622c9157 100644 --- a/public_html/contatti_commesse.php +++ b/public_html/contatti_commesse.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/conto_economico_prodotto.php b/public_html/conto_economico_prodotto.php index 64e4e7977..d079ecfc2 100644 --- a/public_html/conto_economico_prodotto.php +++ b/public_html/conto_economico_prodotto.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/contratti_di_acquisto.php b/public_html/contratti_di_acquisto.php index 93d61eddf..a9116f257 100644 --- a/public_html/contratti_di_acquisto.php +++ b/public_html/contratti_di_acquisto.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/contratti_di_vendita.php b/public_html/contratti_di_vendita.php index 8b6dc01fa..dbff8d575 100644 --- a/public_html/contratti_di_vendita.php +++ b/public_html/contratti_di_vendita.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/controllo_giacenze.php b/public_html/controllo_giacenze.php index 92ba54342..0311ce6e4 100644 --- a/public_html/controllo_giacenze.php +++ b/public_html/controllo_giacenze.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/delivery_plan.php b/public_html/delivery_plan.php index fb7ed47c9..9119a66f4 100644 --- a/public_html/delivery_plan.php +++ b/public_html/delivery_plan.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/doc_interni.php b/public_html/doc_interni.php index 2ee125d87..a28bbdc10 100644 --- a/public_html/doc_interni.php +++ b/public_html/doc_interni.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/elenco_pv.php b/public_html/elenco_pv.php index 4102d0404..4622c9157 100644 --- a/public_html/elenco_pv.php +++ b/public_html/elenco_pv.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/emis_ddt.php b/public_html/emis_ddt.php index 4102d0404..4622c9157 100644 --- a/public_html/emis_ddt.php +++ b/public_html/emis_ddt.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/empty_section.php b/public_html/empty_section.php index 863985f7d..a31419923 100644 --- a/public_html/empty_section.php +++ b/public_html/empty_section.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/export_art.php b/public_html/export_art.php index 78c47da06..7247474cb 100644 --- a/public_html/export_art.php +++ b/public_html/export_art.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; if (isset($_GET["arr_codMart"])) { @@ -83,4 +83,4 @@ if (isset($_GET["arr_codMart"])) { - \ No newline at end of file + diff --git a/public_html/fabb_linea.php b/public_html/fabb_linea.php index b829081aa..bdc519054 100644 --- a/public_html/fabb_linea.php +++ b/public_html/fabb_linea.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/fabb_olio_linea.php b/public_html/fabb_olio_linea.php index d747f8033..dfb0c60d1 100644 --- a/public_html/fabb_olio_linea.php +++ b/public_html/fabb_olio_linea.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/fabbisogno_materie_prime.php b/public_html/fabbisogno_materie_prime.php index 0320a0629..da8e4cf7d 100644 --- a/public_html/fabbisogno_materie_prime.php +++ b/public_html/fabbisogno_materie_prime.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/fattura_da_scontrino.php b/public_html/fattura_da_scontrino.php index 4102d0404..4622c9157 100644 --- a/public_html/fattura_da_scontrino.php +++ b/public_html/fattura_da_scontrino.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/file_exchange_panel.php b/public_html/file_exchange_panel.php index 93d61eddf..a9116f257 100644 --- a/public_html/file_exchange_panel.php +++ b/public_html/file_exchange_panel.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/filesharing_viewer.php b/public_html/filesharing_viewer.php index 269efc75b..9d0a82d4a 100644 --- a/public_html/filesharing_viewer.php +++ b/public_html/filesharing_viewer.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/form_articoli.php b/public_html/form_articoli.php index e100985e8..2a1ca7a80 100644 --- a/public_html/form_articoli.php +++ b/public_html/form_articoli.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(false); @@ -29,4 +29,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { - \ No newline at end of file + diff --git a/public_html/functions.php b/public_html/functions.php index 4f7266295..efe93ebec 100644 --- a/public_html/functions.php +++ b/public_html/functions.php @@ -360,12 +360,18 @@ function parse_size($size) { } function is_logged() { - $arr_fields = array("username", "password", "cod_mdep", "user_code", "fullname", "gruppo"); + if (LOGIN_JWT) { + $arr_fields = array("accessToken", "refreshToken"); + } else { + $arr_fields = array("username", "password", "cod_mdep", "user_code", "fullname", "gruppo"); + } + foreach ($arr_fields as $field) { if (!array_key_exists($field, $_SESSION)) { return false; } } + return true; } diff --git a/public_html/gest-lib/login/classes/Login.class.php b/public_html/gest-lib/login/classes/Login.class.php index 951dc3021..0b8484f4a 100644 --- a/public_html/gest-lib/login/classes/Login.class.php +++ b/public_html/gest-lib/login/classes/Login.class.php @@ -14,15 +14,25 @@ class Login { getSession(); } + if (LOGIN_JWT) { + $_SESSION["accessToken"] = $userData["accessToken"]; + $_SESSION["refreshToken"] = $userData["refreshToken"]; + $_SESSION["expiryDate"] = $userData["expiryDate"]; + $_SESSION["expiresIn"] = $userData["expireIn"]; + $_SESSION["deviceId"] = $userData["deviceId"]; + } else { + $_SESSION["password"] = $userData["password"]; + } + $_SESSION["username"] = $userData["user_name"]; - $_SESSION["password"] = $userData["password"]; $_SESSION["cod_mdep"] = $userData["cod_mdep"]; $_SESSION["user_code"] = $userData["user_code"]; $_SESSION["fullname"] = $userData["full_name"]; $_SESSION["cod_lang"] = isset($userData["cod_lang"]) ? $userData["cod_lang"] : "IT"; - $_SESSION["profileDB"] = $userData["profile_db"]; + $_SESSION["profileDB"] = $GLOBALS["profileDB"]; $_SESSION["gruppo"] = $userData["key_group"]; $_SESSION["sqldriver"] = null; + $_SESSION["login"] = "OK"; } @@ -75,7 +85,13 @@ class Login { return null; } - public static function authenticate($userName, $password, $md5User, $azienda) { + public static function authenticate($data) { + $userName = array_get($data, "username"); + $password = array_get($data, "password"); + $md5User = array_get($data, "md5_user"); + $azienda = array_get($data, "azienda"); + $deviceId = array_get($data, "deviceId"); + $Ret = self::get_endpointHost(); if ($Ret->is_OK()) { $endpoint = $Ret->get_string(); @@ -90,34 +106,76 @@ class Login { } }*/ - $IMSApi = new IMSApi; - $IMSApi->post("loginWeb") + $IMSApi = new IMSApi(); + + $IMSApi ->anonymousAuth() - ->profileDB(is_null($azienda) ? "" : $azienda) - ->body(array( - "profileDb" => is_null($azienda) ? "" : $azienda, - "username" => $userName, - "password" => $password, - "md5User" => $md5User - )); + ->profileDB(is_null($azienda) ? "" : $azienda); + + if (LOGIN_JWT) { + $IMSApi + ->post("auth/login") + ->body(array( + "username" => $userName, + "password" => $password, + "deviceId" => $deviceId, + "md5User" => $md5User + )); + } else { + $IMSApi + ->post("loginWeb") + ->body(array( + "profileDb" => is_null($azienda) ? "" : $azienda, + "username" => $userName, + "password" => $password, + "md5User" => $md5User + )); + } if (!PVM::isDevClient()) { $IMSApi->endpoint($endpoint); } $Ret = $IMSApi->send(); + if ($Ret->is_OK()) { self::destroy_session(); $retData = $Ret->get_data(); - $Ret->set_data(null); - if (isset($retData[0]["dto"])) { + $Ret->set_data(); + + if (isset($retData[0]["dto"])) { $user = $retData[0]["dto"]; - $user["password"] = $password; + + if (LOGIN_JWT) { + $user["deviceId"] = $deviceId; + } else { + $user["password"] = $password; + } + + if (!isset($user["username"])) { + $imsApi = new IMSApi(); + + $ret = $imsApi + ->get("auth/me") + ->profileDB(is_null($azienda) ? "" : $azienda) + ->accessToken($user["accessToken"]) + ->send(); + + if ($ret->is_KO()) { + $ret->display(); + } + + $user = array_merge( + $user, + $ret->getDto() + ); + } self::$_userData = $user; - $GLOBALS["profileDB"] = $user["profile_db"]; + + $GLOBALS["profileDB"] = is_null($azienda) ? $user["profile_db"] : $azienda; if (true) { self::fix_sessionUserPassword($md5User); // completamento $_SESSION["password"] per autenticazione con md5 da url @@ -132,15 +190,16 @@ class Login { // self::set_profileDB_cached($userName . $password . $md5User, $user["profile_db"]); self::set_sessionData($user); - $Ret->set_data(array( - "username" => $user["user_name"], - "fullname" => $user["full_name"], - "profileDb" => $user["profile_db"], - "endPoint" => Rest::get_endPointRemote() - )); +// $Ret->set_data(array( +// "username" => $user["user_name"], +// "fullname" => $user["full_name"], +// "profileDb" => $user["profile_db"], +// "endPoint" => Rest::get_endPointRemote() +// )); if (!is_null(nullIfBlank($md5User))) { - $idModuloRef = (isset($_GET["ref"]) && User::hasModulo($_GET["ref"])) ? $_GET["ref"] : null; + $idModuloRef = (isset($_GET["ref"]) + && User::hasModulo($_GET["ref"])) ? $_GET["ref"] : null; $params = array_get($_GET, "params"); if (!is_null($idModuloRef)) { @@ -273,7 +332,8 @@ class Login { if (!User::group_is(self::getGruppoValidatoriDefault(), User::AMMINISTRATORE_SISTEMA)) { $GestSetup = new GestSetup; - $verificaTokenAttiva = $GestSetup->section("LOGIN")->keySection("TOKEN_AUTHENTICATION")->defaultValue("N")->asBoolean()->get(); + $verificaTokenAttiva + = $GestSetup->section("LOGIN")->keySection("TOKEN_AUTHENTICATION")->defaultValue("N")->asBoolean()->get(); if ($verificaTokenAttiva) { $userName = $user["user_name"]; $tokenId = self::getTokenClient(); @@ -322,7 +382,8 @@ class Login { if (!is_null($tokenHash)) { $UrlBuilder = new \RemoteModuleUrl(); $urlData = array("token_id" => $tokenId, "hash" => $tokenHash); - $url = $UrlBuilder->module("login")->profileDB($profileDB)->data($urlData)->get_url(); + $url + = $UrlBuilder->module("login")->profileDB($profileDB)->data($urlData)->get_url(); $Mailer = new PVM\Mailer; @@ -333,11 +394,14 @@ class Login { $mailText .= "IP richiedente: " . $ipRichiesta . "
"; $uaparsed = Utility::parse_useragent($userAgent); - $browser = !is_null($uaparsed["browser"]["full_desc"]) ? $uaparsed["browser"]["full_desc"] : null; - $so = !is_null($uaparsed["operating_system"]["full_desc"]) ? $uaparsed["operating_system"]["full_desc"] : null; + $browser + = !is_null($uaparsed["browser"]["full_desc"]) ? $uaparsed["browser"]["full_desc"] : null; + $so + = !is_null($uaparsed["operating_system"]["full_desc"]) ? $uaparsed["operating_system"]["full_desc"] : null; if (!is_null($uaparsed["device"]["full_desc"])) { - $mailText .= "Dispositivo: " . $uaparsed["device"]["full_desc"] . "
"; + $mailText .= "Dispositivo: " . $uaparsed["device"]["full_desc"] + . "
"; } if (!is_null($browser)) { $mailText .= "Browser: " . $browser . "
"; @@ -529,7 +593,8 @@ class Login { if (!self::is_clientAndApplicationServer()) { $profileDB = is_null($profileDB) ? self::get_azienda() : $profileDB; $azienda = self::get_aziendaMain($profileDB); - $path_loginBg = str_replace(DIRECTORY_SEPARATOR, "/", AziendaUtils::getPathHome($azienda) . "login-bg" . DIRECTORY_SEPARATOR); + $path_loginBg = str_replace(DIRECTORY_SEPARATOR, "/", AziendaUtils::getPathHome($azienda) . "login-bg" + . DIRECTORY_SEPARATOR); if (\Utility\Str::ciEquals($azienda, "integry") && PVM::isDevClient()) { $path_loginBg .= "funnies/"; } @@ -537,7 +602,8 @@ class Login { $arr_images = glob($path_loginBg . "*.{jpg,png}", GLOB_BRACE); } if (count($arr_images) == 0) { - $arr_images[] = str_replace(DIRECTORY_SEPARATOR, "/", Controller::current_gestpath_images("teamwork-2600.jpg")); + $arr_images[] + = str_replace(DIRECTORY_SEPARATOR, "/", Controller::current_gestpath_images("teamwork-2600.jpg")); } } return $arr_images; diff --git a/public_html/gest-lib/login/include/ajax.php b/public_html/gest-lib/login/include/ajax.php index f6f00cf66..b9c5e9f28 100644 --- a/public_html/gest-lib/login/include/ajax.php +++ b/public_html/gest-lib/login/include/ajax.php @@ -1,17 +1,27 @@ is_OK()) { $LoginRet->display(); @@ -63,4 +73,4 @@ if (isset($_GET["login"]) || isset($_GET["md5_user"])) { } else if (Controller::is_ajaxRequest()) { $Ret = new Ret; $Ret->set_errorCode(ErrorHandler::UNEXPECTED_AJAX_METHOD)->display(); -} \ No newline at end of file +} diff --git a/public_html/gest-lib/login/include/tag-head.php b/public_html/gest-lib/login/include/tag-head.php index 6cf299d18..c927c4485 100644 --- a/public_html/gest-lib/login/include/tag-head.php +++ b/public_html/gest-lib/login/include/tag-head.php @@ -29,6 +29,8 @@ foreach (Controller::get_css_files() as $asset) { include "include/tag-head-include_css.php"; +include "include/tag-importmap.php"; + foreach (Controller::get_js_files() as $asset) { Utility::echoImportResourceTag($asset); } @@ -50,4 +52,4 @@ if ($build = Controller::get_build()) { Utility::echoImportResourceTag($scriptFileList); } -$azienda = \Login::get_azienda(); \ No newline at end of file +$azienda = \Login::get_azienda(); diff --git a/public_html/gest-lib/login/js/signup.js b/public_html/gest-lib/login/js/signup.js index 6e9214ca9..9e065c40d 100644 --- a/public_html/gest-lib/login/js/signup.js +++ b/public_html/gest-lib/login/js/signup.js @@ -1,8 +1,8 @@ $(function () { - _login.signup.init(); + _signup.init(); }); -_login.signup = { +_signup = { recaptchaToken: null, init: function () { diff --git a/public_html/gest-lib/login/js/main.js b/public_html/gest-lib/login/ts/main.module.js similarity index 97% rename from public_html/gest-lib/login/js/main.js rename to public_html/gest-lib/login/ts/main.module.js index 8af34f063..d9efbe47d 100644 --- a/public_html/gest-lib/login/js/main.js +++ b/public_html/gest-lib/login/ts/main.module.js @@ -1,3 +1,5 @@ +import fpPromise from "@js/auth.js"; + FontAwesomeConfig.autoReplaceSvg = false; $(function () { @@ -210,15 +212,20 @@ const _login = { return $("#azienda").getValue(); }, - send_loginRequest: function () { // fare controllo preventivo che non siano vuoti + send_loginRequest: async function () { // fare controllo preventivo che non siano vuoti const self = this; + + const fp = await fpPromise; + const result = await fp.get(); + const d = $.Deferred(); const $form = $("#form-signin"); const $btSubmit = $form.find("button[type='submit']"); const data = { username: $("#username").getValue(), password: $("#password").getValue(), - azienda: self.get_azienda() + deviceId: result.visitorId, + azienda: self.get_azienda(), }; const ajax = new Ajax(); @@ -252,7 +259,7 @@ const _login = { $div.find("button.modal-btn-ok").trigger("click"); }); - + }) .btOK({ text: "Conferma", style: "primary", @@ -399,4 +406,6 @@ const _bgCarousel = { } return false; } -}; \ No newline at end of file +}; + +window._login = _login; \ No newline at end of file diff --git a/public_html/gest-lib/user_settings/classes/UserSettings/LogDifferentUser.class.php b/public_html/gest-lib/user_settings/classes/UserSettings/LogDifferentUser.class.php index 2dd20ca44..9eb923d13 100644 --- a/public_html/gest-lib/user_settings/classes/UserSettings/LogDifferentUser.class.php +++ b/public_html/gest-lib/user_settings/classes/UserSettings/LogDifferentUser.class.php @@ -28,7 +28,8 @@ class LogDifferentUser { } $data = array_get($data, "data", array()); $srcTerm = array_get($data, "term"); - $query = new \Query("SELECT user_name, ISNULL(full_name, user_name) AS full_name FROM stb_user WHERE flag_attivo = 'S' AND flag_extra_user = 'S' AND (user_name LIKE '%[term]%' OR full_name LIKE '%[term]%')"); + $query + = new \Query("SELECT user_name, ISNULL(full_name, user_name) AS full_name FROM stb_user WHERE flag_attivo = 'S' AND flag_extra_user = 'S' AND (user_name LIKE '%[term]%' OR full_name LIKE '%[term]%')"); $termArray = explode(" ", $srcTerm); $terms = implode("%", $termArray); $query->setVar("term", $terms); @@ -44,7 +45,8 @@ class LogDifferentUser { return $ret; } - $query = new \Query("SELECT user_name, dbo.sys_dcd_pss(password) AS password FROM stb_user WHERE user_name = '[username]'"); + $query + = new \Query("SELECT user_name, dbo.sys_dcd_pss(password) AS password FROM stb_user WHERE user_name = '[username]'"); $ret = $query ->setVar("username", array_get($data, "user_name")) ->toRet() @@ -55,9 +57,12 @@ class LogDifferentUser { return $ret; } $userData = $ret->get_data(); - $username = array_get($userData, "user_name"); - $password = array_get($userData, "password"); - $ret = Login::authenticate($username, $password, null, \User::get_current_profileDb()); + $ret = Login::authenticate(array( + "username" => array_get($userData, "user_name"), + "password" => array_get($userData, "password"), + "azienda" => \User::get_current_profileDb(), + "deviceId" => array_get($_SESSION, "deviceId") + )); return $ret; } diff --git a/public_html/gestione_budget.php b/public_html/gestione_budget.php index f0bbeb097..4962cdfdb 100644 --- a/public_html/gestione_budget.php +++ b/public_html/gestione_budget.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/gestione_exchange.php b/public_html/gestione_exchange.php index d747f8033..dfb0c60d1 100644 --- a/public_html/gestione_exchange.php +++ b/public_html/gestione_exchange.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/gestione_menu.php b/public_html/gestione_menu.php index afb84ca9e..d69d9ac5e 100644 --- a/public_html/gestione_menu.php +++ b/public_html/gestione_menu.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/gestione_notifiche.php b/public_html/gestione_notifiche.php index 93d61eddf..a9116f257 100644 --- a/public_html/gestione_notifiche.php +++ b/public_html/gestione_notifiche.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/gestione_paghe.php b/public_html/gestione_paghe.php index afb84ca9e..d69d9ac5e 100644 --- a/public_html/gestione_paghe.php +++ b/public_html/gestione_paghe.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/gestione_partite.php b/public_html/gestione_partite.php index 42ae23862..8b15a5098 100644 --- a/public_html/gestione_partite.php +++ b/public_html/gestione_partite.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/gestione_ricambistica.php b/public_html/gestione_ricambistica.php index e100985e8..2a1ca7a80 100644 --- a/public_html/gestione_ricambistica.php +++ b/public_html/gestione_ricambistica.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(false); @@ -29,4 +29,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { - \ No newline at end of file + diff --git a/public_html/gestione_utenti.php b/public_html/gestione_utenti.php index 77a364f3f..7d81888a2 100644 --- a/public_html/gestione_utenti.php +++ b/public_html/gestione_utenti.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/giacenza.php b/public_html/giacenza.php index 4102d0404..4622c9157 100644 --- a/public_html/giacenza.php +++ b/public_html/giacenza.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/griglia_arttagcol.php b/public_html/griglia_arttagcol.php index 5a82b8917..2bf7927fb 100644 --- a/public_html/griglia_arttagcol.php +++ b/public_html/griglia_arttagcol.php @@ -2,10 +2,10 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; if (!class_exists("GrigliaArttagcol")) { include Controller::current_gestpath_classes("GrigliaArttagcol.class.php"); } -include Controller::current_gestpath_include("ajax.php"); \ No newline at end of file +include Controller::current_gestpath_include("ajax.php"); diff --git a/public_html/i18n.php b/public_html/i18n.php index 93d61eddf..a9116f257 100644 --- a/public_html/i18n.php +++ b/public_html/i18n.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/importa_ordini_vendita_web.php b/public_html/importa_ordini_vendita_web.php index afb84ca9e..d69d9ac5e 100644 --- a/public_html/importa_ordini_vendita_web.php +++ b/public_html/importa_ordini_vendita_web.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/impostazioni.php b/public_html/impostazioni.php index b0312c04c..bb2588666 100644 --- a/public_html/impostazioni.php +++ b/public_html/impostazioni.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -33,4 +33,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/incolla_da_appunti.php b/public_html/incolla_da_appunti.php index 93d61eddf..a9116f257 100644 --- a/public_html/incolla_da_appunti.php +++ b/public_html/incolla_da_appunti.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/inventario.php b/public_html/inventario.php index 4102d0404..4622c9157 100644 --- a/public_html/inventario.php +++ b/public_html/inventario.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/invio_variazioni_prezzi.php b/public_html/invio_variazioni_prezzi.php index 06e92e3ef..31c0bb18e 100644 --- a/public_html/invio_variazioni_prezzi.php +++ b/public_html/invio_variazioni_prezzi.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/js/auth.ts b/public_html/js/auth.ts new file mode 100644 index 000000000..1626f6e31 --- /dev/null +++ b/public_html/js/auth.ts @@ -0,0 +1,5 @@ +import FingerprintJS from "@fingerprintjs/fingerprintjs"; + +const fpPromise = FingerprintJS.load(); + +export default fpPromise; \ No newline at end of file diff --git a/public_html/listini_vendita.php b/public_html/listini_vendita.php index 84857ccf7..db9ec9b2b 100644 --- a/public_html/listini_vendita.php +++ b/public_html/listini_vendita.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/livello_serbatoi.php b/public_html/livello_serbatoi.php index 93d61eddf..a9116f257 100644 --- a/public_html/livello_serbatoi.php +++ b/public_html/livello_serbatoi.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/logs.php b/public_html/logs.php index 5a558c3d0..61038f23f 100644 --- a/public_html/logs.php +++ b/public_html/logs.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -28,4 +28,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/macchinari_prod.php b/public_html/macchinari_prod.php index 6d7407430..7b7bee22f 100644 --- a/public_html/macchinari_prod.php +++ b/public_html/macchinari_prod.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { - \ No newline at end of file + diff --git a/public_html/magazzino_prod.php b/public_html/magazzino_prod.php index 80cd509ef..4d55b0527 100644 --- a/public_html/magazzino_prod.php +++ b/public_html/magazzino_prod.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -32,4 +32,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/mappa_campi_di_raccolta.php b/public_html/mappa_campi_di_raccolta.php index 5719e6d00..662682911 100644 --- a/public_html/mappa_campi_di_raccolta.php +++ b/public_html/mappa_campi_di_raccolta.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/messenger.php b/public_html/messenger.php index ca83aaf47..dcef9cfae 100644 --- a/public_html/messenger.php +++ b/public_html/messenger.php @@ -2,10 +2,10 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; if (!class_exists("Messenger")) { include Controller::current_gestpath_classes("Messenger.class.php"); } -include Controller::current_gestpath_include("ajax.php"); \ No newline at end of file +include Controller::current_gestpath_include("ajax.php"); diff --git a/public_html/modal_mrp.php b/public_html/modal_mrp.php index 0bb29e90e..6e5d1b4ae 100644 --- a/public_html/modal_mrp.php +++ b/public_html/modal_mrp.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include Controller::current_mainClasspath(); (new ModalMrpAjax())->checkAjaxRequests(); diff --git a/public_html/modal_selezione_articoli.php b/public_html/modal_selezione_articoli.php index 10195cd66..d7dcf6981 100644 --- a/public_html/modal_selezione_articoli.php +++ b/public_html/modal_selezione_articoli.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include Controller::current_mainClasspath(); -(new ModalSelezioneArticoliAjax())->checkAjaxRequests(); \ No newline at end of file +(new ModalSelezioneArticoliAjax())->checkAjaxRequests(); diff --git a/public_html/modellini.php b/public_html/modellini.php index 93d61eddf..a9116f257 100644 --- a/public_html/modellini.php +++ b/public_html/modellini.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/monitoraggio_linee_v2.php b/public_html/monitoraggio_linee_v2.php index e554e752f..2f40c452b 100644 --- a/public_html/monitoraggio_linee_v2.php +++ b/public_html/monitoraggio_linee_v2.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/monitoraggio_ordini.php b/public_html/monitoraggio_ordini.php index 598c3a497..b4b9d0546 100644 --- a/public_html/monitoraggio_ordini.php +++ b/public_html/monitoraggio_ordini.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -27,4 +27,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/movimenti_contabili.php b/public_html/movimenti_contabili.php index 93d61eddf..a9116f257 100644 --- a/public_html/movimenti_contabili.php +++ b/public_html/movimenti_contabili.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/mrp.php b/public_html/mrp.php index 0c310043e..f025d01ce 100644 --- a/public_html/mrp.php +++ b/public_html/mrp.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/mrp_v2.php b/public_html/mrp_v2.php index 250eaaaea..decac341b 100644 --- a/public_html/mrp_v2.php +++ b/public_html/mrp_v2.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/notifiche.php b/public_html/notifiche.php index a45e0e923..22c793a35 100644 --- a/public_html/notifiche.php +++ b/public_html/notifiche.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; //include Controller::current_gestpath_include("ajax.php"); (new NotificheAjax())->checkAjaxRequests(); @@ -30,4 +30,4 @@ include_once "config.php"; - \ No newline at end of file + diff --git a/public_html/nuovo_cliente_web.php b/public_html/nuovo_cliente_web.php index 4102d0404..4622c9157 100644 --- a/public_html/nuovo_cliente_web.php +++ b/public_html/nuovo_cliente_web.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/offerte_di_vendita.php b/public_html/offerte_di_vendita.php index 93d61eddf..a9116f257 100644 --- a/public_html/offerte_di_vendita.php +++ b/public_html/offerte_di_vendita.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_a.php b/public_html/ordini_a.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_a.php +++ b/public_html/ordini_a.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_a_riass.php b/public_html/ordini_a_riass.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_a_riass.php +++ b/public_html/ordini_a_riass.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_a_riass_clie.php b/public_html/ordini_a_riass_clie.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_a_riass_clie.php +++ b/public_html/ordini_a_riass_clie.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_analisi.php b/public_html/ordini_analisi.php index 93d61eddf..a9116f257 100644 --- a/public_html/ordini_analisi.php +++ b/public_html/ordini_analisi.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_forno_cassa.php b/public_html/ordini_forno_cassa.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_forno_cassa.php +++ b/public_html/ordini_forno_cassa.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_forno_cucina.php b/public_html/ordini_forno_cucina.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_forno_cucina.php +++ b/public_html/ordini_forno_cucina.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_trasf.php b/public_html/ordini_trasf.php index 93d61eddf..a9116f257 100644 --- a/public_html/ordini_trasf.php +++ b/public_html/ordini_trasf.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_utils.php b/public_html/ordini_utils.php index 93d61eddf..a9116f257 100644 --- a/public_html/ordini_utils.php +++ b/public_html/ordini_utils.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_v.php b/public_html/ordini_v.php index bd782b121..78cdecc58 100644 --- a/public_html/ordini_v.php +++ b/public_html/ordini_v.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_v_slim2k.php b/public_html/ordini_v_slim2k.php index d747f8033..dfb0c60d1 100644 --- a/public_html/ordini_v_slim2k.php +++ b/public_html/ordini_v_slim2k.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/ordini_web_commerciale.php b/public_html/ordini_web_commerciale.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_web_commerciale.php +++ b/public_html/ordini_web_commerciale.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_web_ordikids.php b/public_html/ordini_web_ordikids.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_web_ordikids.php +++ b/public_html/ordini_web_ordikids.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/ordini_web_plants.php b/public_html/ordini_web_plants.php index 4102d0404..4622c9157 100644 --- a/public_html/ordini_web_plants.php +++ b/public_html/ordini_web_plants.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/overview.php b/public_html/overview.php index 93d61eddf..a9116f257 100644 --- a/public_html/overview.php +++ b/public_html/overview.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/package-lock.json b/public_html/package-lock.json index cb396083e..b19b1706b 100644 --- a/public_html/package-lock.json +++ b/public_html/package-lock.json @@ -11,6 +11,7 @@ "license": "ISC", "dependencies": { "@codemirror/lang-sql": "^6.5.5", + "@fingerprintjs/fingerprintjs": "^4.6.2", "@preact/signals-core": "^1.8.0", "bwip-js": "^4.3.2", "codemirror": "^6.0.1", @@ -421,6 +422,14 @@ "w3c-keyname": "^2.2.4" } }, + "node_modules/@fingerprintjs/fingerprintjs": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@fingerprintjs/fingerprintjs/-/fingerprintjs-4.6.2.tgz", + "integrity": "sha512-g8mXuqcFKbgH2CZKwPfVtsUJDHyvcgIABQI7Y0tzWEFXpGxJaXuAuzlifT2oTakjDBLTK4Gaa9/5PERDhqUjtw==", + "dependencies": { + "tslib": "^2.4.1" + } + }, "node_modules/@fortawesome/fontawesome-common-types": { "version": "6.7.2", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", @@ -1442,6 +1451,11 @@ "node": ">=4" } }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", diff --git a/public_html/package.json b/public_html/package.json index a60cbc6ff..b972c8350 100644 --- a/public_html/package.json +++ b/public_html/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@codemirror/lang-sql": "^6.5.5", + "@fingerprintjs/fingerprintjs": "^4.6.2", "@preact/signals-core": "^1.8.0", "bwip-js": "^4.3.2", "codemirror": "^6.0.1", diff --git a/public_html/pdf_utilities.php b/public_html/pdf_utilities.php index 4102d0404..4622c9157 100644 --- a/public_html/pdf_utilities.php +++ b/public_html/pdf_utilities.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/pian_acc_rossg.php b/public_html/pian_acc_rossg.php index fce5581b8..6a128ed73 100644 --- a/public_html/pian_acc_rossg.php +++ b/public_html/pian_acc_rossg.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -31,4 +31,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/pianificazione_produzione_orto.php b/public_html/pianificazione_produzione_orto.php index 6cef59f47..c8e73588e 100644 --- a/public_html/pianificazione_produzione_orto.php +++ b/public_html/pianificazione_produzione_orto.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/piano_arrivi.php b/public_html/piano_arrivi.php index 866a9d093..1684bcfe0 100644 --- a/public_html/piano_arrivi.php +++ b/public_html/piano_arrivi.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/piano_logistico.php b/public_html/piano_logistico.php index c9560ba18..b8c57f92b 100644 --- a/public_html/piano_logistico.php +++ b/public_html/piano_logistico.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -28,4 +28,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/piano_produzione_giornaliera.php b/public_html/piano_produzione_giornaliera.php index 93d61eddf..a9116f257 100644 --- a/public_html/piano_produzione_giornaliera.php +++ b/public_html/piano_produzione_giornaliera.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/prenotazione_merce.php b/public_html/prenotazione_merce.php index 4102d0404..4622c9157 100644 --- a/public_html/prenotazione_merce.php +++ b/public_html/prenotazione_merce.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/presenze.php b/public_html/presenze.php index 4102d0404..4622c9157 100644 --- a/public_html/presenze.php +++ b/public_html/presenze.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/presenze_export.php b/public_html/presenze_export.php index 4102d0404..4622c9157 100644 --- a/public_html/presenze_export.php +++ b/public_html/presenze_export.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/presenze_pv.php b/public_html/presenze_pv.php index 93d61eddf..a9116f257 100644 --- a/public_html/presenze_pv.php +++ b/public_html/presenze_pv.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/previsioni_raccolta.php b/public_html/previsioni_raccolta.php index 93d61eddf..a9116f257 100644 --- a/public_html/previsioni_raccolta.php +++ b/public_html/previsioni_raccolta.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/pricelist_update.php b/public_html/pricelist_update.php index 12362f07d..a242055a7 100644 --- a/public_html/pricelist_update.php +++ b/public_html/pricelist_update.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -40,4 +40,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produttivita.php b/public_html/produttivita.php index 4102d0404..4622c9157 100644 --- a/public_html/produttivita.php +++ b/public_html/produttivita.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produttivita2.php b/public_html/produttivita2.php index 4102d0404..4622c9157 100644 --- a/public_html/produttivita2.php +++ b/public_html/produttivita2.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produttivita_a_valore.php b/public_html/produttivita_a_valore.php index 93d61eddf..a9116f257 100644 --- a/public_html/produttivita_a_valore.php +++ b/public_html/produttivita_a_valore.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produzione_alert_carichi.php b/public_html/produzione_alert_carichi.php index 4102d0404..4622c9157 100644 --- a/public_html/produzione_alert_carichi.php +++ b/public_html/produzione_alert_carichi.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produzione_cruscotto.php b/public_html/produzione_cruscotto.php index 9c8da10ba..7cc41b118 100644 --- a/public_html/produzione_cruscotto.php +++ b/public_html/produzione_cruscotto.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; //include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produzione_inventario_mp.php b/public_html/produzione_inventario_mp.php index 4102d0404..4622c9157 100644 --- a/public_html/produzione_inventario_mp.php +++ b/public_html/produzione_inventario_mp.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produzione_planning.php b/public_html/produzione_planning.php index 93d61eddf..a9116f257 100644 --- a/public_html/produzione_planning.php +++ b/public_html/produzione_planning.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/produzione_tl.php b/public_html/produzione_tl.php index 4102d0404..4622c9157 100644 --- a/public_html/produzione_tl.php +++ b/public_html/produzione_tl.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/project.importmap b/public_html/project.importmap index a85e49c13..dc224de77 100644 --- a/public_html/project.importmap +++ b/public_html/project.importmap @@ -28,9 +28,11 @@ "vanilla-jsoneditor/index.js.map": "./node_modules/vanilla-jsoneditor/index.js.map", "codemirror-wrapped-line-indent": "./node_modules/codemirror-wrapped-line-indent/dist/index.js", "vanilla-jsoneditor/SECURITY.md": "./node_modules/vanilla-jsoneditor/SECURITY.md", + "@fingerprintjs/fingerprintjs/": "./node_modules/@fingerprintjs/fingerprintjs/", "svelte/internal/flags/tracing": "./node_modules/svelte/src/internal/flags/tracing.js", "vanilla-jsoneditor/index.d.ts": "./node_modules/vanilla-jsoneditor/index.d.ts", "vanilla-jsoneditor/LICENSE.md": "./node_modules/vanilla-jsoneditor/LICENSE.md", + "@fingerprintjs/fingerprintjs": "./node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js", "@sphinxxxx/color-conversion/": "./node_modules/@sphinxxxx/color-conversion/", "svelte/internal/flags/legacy": "./node_modules/svelte/src/internal/flags/legacy.js", "vanilla-jsoneditor/README.md": "./node_modules/vanilla-jsoneditor/README.md", @@ -179,9 +181,11 @@ "buffer": "./node_modules/buffer/index.js", "reefjs": "./node_modules/reefjs/dist/reef.es.min.js", "svelte": "./node_modules/svelte/src/index-client.js", + "tslib/": "./node_modules/tslib/", "acorn": "./node_modules/acorn/dist/acorn.mjs", "crelt": "./node_modules/crelt/index.js", "esrap": "./node_modules/esrap/src/index.js", + "tslib": "./node_modules/tslib/tslib.es6.mjs", "ajv/": "./node_modules/ajv/", "clsx": "./node_modules/clsx/dist/clsx.mjs", "jsep": "./node_modules/jsep/dist/jsep.js", diff --git a/public_html/proposta_ordine_a.php b/public_html/proposta_ordine_a.php index 4102d0404..4622c9157 100644 --- a/public_html/proposta_ordine_a.php +++ b/public_html/proposta_ordine_a.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/rapportini_fine_giornata.php b/public_html/rapportini_fine_giornata.php index 93d61eddf..a9116f257 100644 --- a/public_html/rapportini_fine_giornata.php +++ b/public_html/rapportini_fine_giornata.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/redirects_master_login.php b/public_html/redirects_master_login.php index 4102d0404..4622c9157 100644 --- a/public_html/redirects_master_login.php +++ b/public_html/redirects_master_login.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/registrazione_nuovi_utenti.php b/public_html/registrazione_nuovi_utenti.php index 93d61eddf..a9116f257 100644 --- a/public_html/registrazione_nuovi_utenti.php +++ b/public_html/registrazione_nuovi_utenti.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/report_area.php b/public_html/report_area.php index 8939ee0ab..a3e57120a 100644 --- a/public_html/report_area.php +++ b/public_html/report_area.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -33,4 +33,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/resi_cliente.php b/public_html/resi_cliente.php index 93d61eddf..a9116f257 100644 --- a/public_html/resi_cliente.php +++ b/public_html/resi_cliente.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/resi_consegna.php b/public_html/resi_consegna.php index 4102d0404..4622c9157 100644 --- a/public_html/resi_consegna.php +++ b/public_html/resi_consegna.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/riep_consegne.php b/public_html/riep_consegne.php index d747f8033..dfb0c60d1 100644 --- a/public_html/riep_consegne.php +++ b/public_html/riep_consegne.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/rilevazioni_steup.php b/public_html/rilevazioni_steup.php index 4102d0404..4622c9157 100644 --- a/public_html/rilevazioni_steup.php +++ b/public_html/rilevazioni_steup.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/sincronizzazioni.php b/public_html/sincronizzazioni.php index d747f8033..dfb0c60d1 100644 --- a/public_html/sincronizzazioni.php +++ b/public_html/sincronizzazioni.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/stampa_cartellini.php b/public_html/stampa_cartellini.php index 4102d0404..4622c9157 100644 --- a/public_html/stampa_cartellini.php +++ b/public_html/stampa_cartellini.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/statistiche_articoli.php b/public_html/statistiche_articoli.php index 93d61eddf..a9116f257 100644 --- a/public_html/statistiche_articoli.php +++ b/public_html/statistiche_articoli.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/statistiche_commerciali.php b/public_html/statistiche_commerciali.php index 4102d0404..4622c9157 100644 --- a/public_html/statistiche_commerciali.php +++ b/public_html/statistiche_commerciali.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/std_utils.php b/public_html/std_utils.php index e53c6c9a4..7a4361a65 100644 --- a/public_html/std_utils.php +++ b/public_html/std_utils.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; (new StdUtilsAjax())->checkAjaxRequests(); diff --git a/public_html/storico_eventi_macchina.php b/public_html/storico_eventi_macchina.php index 93d61eddf..a9116f257 100644 --- a/public_html/storico_eventi_macchina.php +++ b/public_html/storico_eventi_macchina.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/tasks_launcher.php b/public_html/tasks_launcher.php index 93d61eddf..a9116f257 100644 --- a/public_html/tasks_launcher.php +++ b/public_html/tasks_launcher.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/token_board.php b/public_html/token_board.php index 5515474ef..dc2e00fee 100644 --- a/public_html/token_board.php +++ b/public_html/token_board.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/tracciabilita.php b/public_html/tracciabilita.php index 1a2d3ec22..49f248329 100644 --- a/public_html/tracciabilita.php +++ b/public_html/tracciabilita.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); diff --git a/public_html/user_settings.php b/public_html/user_settings.php index 4102d0404..4622c9157 100644 --- a/public_html/user_settings.php +++ b/public_html/user_settings.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/verifica_aggiornamento_prezzi.php b/public_html/verifica_aggiornamento_prezzi.php index 0320a0629..da8e4cf7d 100644 --- a/public_html/verifica_aggiornamento_prezzi.php +++ b/public_html/verifica_aggiornamento_prezzi.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -26,4 +26,4 @@ if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) { } ?> - \ No newline at end of file + diff --git a/public_html/viaggi_ordini.php b/public_html/viaggi_ordini.php index 4102d0404..4622c9157 100644 --- a/public_html/viaggi_ordini.php +++ b/public_html/viaggi_ordini.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file + diff --git a/public_html/visualizzatore_sql.php b/public_html/visualizzatore_sql.php index f1d439cf9..b400345f6 100644 --- a/public_html/visualizzatore_sql.php +++ b/public_html/visualizzatore_sql.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -30,4 +30,4 @@ include Controller::current_mainClasspath(); - \ No newline at end of file + diff --git a/public_html/weather.php b/public_html/weather.php index 24384df8d..8eea8237c 100644 --- a/public_html/weather.php +++ b/public_html/weather.php @@ -2,10 +2,10 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; if (!class_exists("Weather")) { include Controller::current_gestpath_classes("Weather.class.php"); } -include Controller::current_gestpath_include("ajax.php"); \ No newline at end of file +include Controller::current_gestpath_include("ajax.php"); diff --git a/public_html/winact_web.php b/public_html/winact_web.php index f6321224f..be17aad70 100644 --- a/public_html/winact_web.php +++ b/public_html/winact_web.php @@ -2,7 +2,7 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; -header("Location: " . Controller::current_gestpath() . "index.html"); \ No newline at end of file +header("Location: " . Controller::current_gestpath() . "index.html"); diff --git a/public_html/wp.php b/public_html/wp.php index 93d61eddf..a9116f257 100644 --- a/public_html/wp.php +++ b/public_html/wp.php @@ -2,8 +2,8 @@ include_once "session.php"; $session = getSession(); include_once "functions.php"; -require_once "include_login.php"; include_once "config.php"; +require_once "include_login.php"; include_once "include/module.php"; include Controller::current_mainClasspath(); @@ -29,4 +29,4 @@ include Controller::current_gestpath_include("ajax.php"); - \ No newline at end of file +