Gestito login con token jwt

This commit is contained in:
2025-07-01 12:32:24 +02:00
parent 1ef37d47f5
commit 92da2191df
155 changed files with 578 additions and 353 deletions

View File

@@ -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=
SC_SECURITY=

View File

@@ -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);

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
?>
<!DOCTYPE html>
@@ -29,4 +29,4 @@ include_once "config.php";
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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\\
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "")
. "Il servizio EMS non &egrave; raggiungibile";
. "Il servizio EMS non &egrave; raggiungibile";
} else if ($errorCode === self::EMSHTTP) {
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p3}</b></span><hr class='mt-0 mb-10'/>" : "")
. "La chiamata al servizio ha restituito l'errore http <u>" . blankIfNull($p1) . "</u>" . (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
. "La chiamata al servizio ha restituito l'errore http <u>" . blankIfNull($p1) . "</u>"
. (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
} else if ($errorCode === self::EMSHTTP400) {
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "")
. "La chiamata al servizio ha restituito l'errore http <u>400</u> (Bad Request)" . (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
. "La chiamata al servizio ha restituito l'errore http <u>400</u> (Bad Request)"
. (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
} else if ($errorCode === self::EMSHTTP401) {
return $p2;
} else if ($errorCode === self::EMSHTTP550) {
return "<span class='text-monospace'>Licenza <b>non valida</b></span>";
@@ -57,12 +61,13 @@ class ErrorHandler {
return "<span class='text-monospace'>Application name non valorizzato</span>";
} else if ($errorCode === self::EMSPARSE) {
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "") .
"Parse della risposta del servizio <b>" . blankIfNull($p1) . "</b> fallita";
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "")
.
"Parse della risposta del servizio <b>" . blankIfNull($p1) . "</b> fallita";
} else if ($errorCode === self::EMSNOMESSAGE) {
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "")
. "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 = "<span class='small font-italic text-uppercase'>" . $GestSetup->getGestName() . " > " . $GestSetup->getSection() . " > <b>" . $GestSetup->getKeySection() . "</b></span>";
$message = "<span class='small font-italic text-uppercase'>" . $GestSetup->getGestName() . " > "
. $GestSetup->getSection() . " > <b>" . $GestSetup->getKeySection() . "</b></span>";
if (!is_null($description)) {
$message .= " <span class='text-xs opacity-90 font-italic'>(" . ucfirst($description) . ")</span>";
}
@@ -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;
}
}
}

View File

@@ -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 <i>%s</i>", $this->serviceName));
}
$Rest->header("Authorization", "Bearer $this->accessToken");
}
} else {
return $Ret->set_error("Credenziali di autenticazione al servizio <i>" . $this->serviceName
. "</i> 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 <i>" . $this->serviceName
. "</i> 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 "<script type='text/javascript'>window.location.href = 'login.php';</script>";
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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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()) {
?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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) {

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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"])) {
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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;
}

View File

@@ -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: <b>" . $ipRichiesta . "</b><br/>";
$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: <b>" . $uaparsed["device"]["full_desc"] . "</b><br/>";
$mailText .= "Dispositivo: <b>" . $uaparsed["device"]["full_desc"]
. "</b><br/>";
}
if (!is_null($browser)) {
$mailText .= "Browser: <b>" . $browser . "</b><br/>";
@@ -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;

View File

@@ -1,17 +1,27 @@
<?php
if (isset($_GET["login"]) || isset($_GET["md5_user"])) {
$userName = $password = $md5User = "";
$azienda = null;
$data = Utility::sanitizeB64JSON_parse($_GET["login"]);
if (isset($_GET["md5_user"])) {
$md5User = Utility::sanitize($_GET["md5_user"]);
} else {
$data = Utility::sanitizeB64JSON_parse($_GET["login"]);
$userName = $data["username"];
$password = $data["password"];
$azienda = $data["azienda"];
if (!is_array($data)) {
$data = array();
}
$data["md5_user"] = Utility::sanitize($_GET["md5_user"]);
}
$LoginRet = Login::authenticate($userName, $password, $md5User, $azienda);
// $userName = $password = $md5User = "";
// $azienda = null;
// if (isset($_GET["md5_user"])) {
// $md5User = Utility::sanitize($_GET["md5_user"]);
// } else {
// $data = Utility::sanitizeB64JSON_parse($_GET["login"]);
// $userName = $data["username"];
// $password = $data["password"];
// $azienda = $data["azienda"];
// }
$LoginRet = Login::authenticate($data);
if ($LoginRet->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();
}
}

View File

@@ -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();
$azienda = \Login::get_azienda();

View File

@@ -1,8 +1,8 @@
$(function () {
_login.signup.init();
_signup.init();
});
_login.signup = {
_signup = {
recaptchaToken: null,
init: function () {

View File

@@ -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;
}
};
};
window._login = _login;

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
include Controller::current_gestpath_include("ajax.php");

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

5
public_html/js/auth.ts Normal file
View File

@@ -0,0 +1,5 @@
import FingerprintJS from "@fingerprintjs/fingerprintjs";
const fpPromise = FingerprintJS.load();
export default fpPromise;

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();

View File

@@ -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");
include Controller::current_gestpath_include("ajax.php");

View File

@@ -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();

View File

@@ -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();
(new ModalSelezioneArticoliAjax())->checkAjaxRequests();

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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();
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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()) {
} ?>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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";
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

View File

@@ -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");
</div>
<?php include pvm_footerMinimal; ?>
</body>
</html>
</html>

Some files were not shown because too many files have changed in this diff Show More