Skip to content
Snippets Groups Projects
Commit ba435bf3 authored by llaffont's avatar llaffont
Browse files

Webkiosk: fichiers oubliés

parent b225537d
Branches
Tags
No related merge requests found
......@@ -2019,6 +2019,7 @@ library/Class/Systeme/ModulesMenu/Tags.php -text
library/Class/Systeme/ModulesMenu/ToutApprendre.php -text
library/Class/Systeme/ModulesMenu/Url.php -text
library/Class/Systeme/ModulesMenu/Vodeclic.php -text
library/Class/Systeme/ModulesMenu/WebkioskReservation.php -text
library/Class/Systeme/ModulesNotice.php -text
library/Class/Systeme/PergameService.php -text
library/Class/Systeme/Sql.php -text
......@@ -2152,6 +2153,7 @@ library/Class/WebService/SRU.php -text
library/Class/WebService/SimpleWebClient.php -text
library/Class/WebService/Vignette.php -text
library/Class/WebService/XMLParser.php -text
library/Class/WebkioskLink.php -text
library/Class/Xml.php -text
library/Class/Xml/Builder.php -text
library/Class/Xml/Oai/DublinCoreBuilder.php -text
......
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* AFI-OPAC 2.0 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_Systeme_ModulesMenu_WebkioskReservation extends Class_Systeme_ModulesMenu_Null {
use Trait_Translator;
/** @var string */
protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES;
/** @var string */
protected $_type_module = 'WEBKIOSK_RESERVATION';
/** @var string */
protected $_libelle = 'Réserver un poste Webkiosk';
/** @var string */
protected $_url = '/abonne/webkiosk-reservation';
public function isVisibleForProfil($profil) {
return ('' != Class_AdminVar::get('WEBKIOSK_RESERVATION_URL'))
&& ('' != Class_AdminVar::get('WEBKIOSK_KEY'));
}
}
?>
\ No newline at end of file
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* AFI-OPAC 2.0 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebkioskLink {
protected
$_user;
public static function forUser($user) {
return (new self)->setUser($user);
}
public function setUser($user) {
$this->_user = $user;
return $this;
}
public function getBaseUrl() {
return Class_AdminVar::get('WEBKIOSK_RESERVATION_URL');
}
public function url() {
openssl_public_encrypt(json_encode(['login' => $this->_user->getLogin(),
'password' => $this->_user->getPassword(),
'date' => date('YMd')]),
$auth_crypte,
Class_AdminVar::get('WEBKIOSK_KEY'));
$auth_crypte_base64 = urlencode(base64_encode($auth_crypte));
return $this->getBaseUrl().'?sso='.$auth_crypte_base64;
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment