Compare commits
282 Commits
Author | SHA1 | Date | |
---|---|---|---|
1f91f501d5 | |||
62d4954572 | |||
b0b5c9292b | |||
b0799c0f7b | |||
05a85c0e4c | |||
9a5d9870c4 | |||
c62f182b16 | |||
1b9027a24a | |||
234bf9d6bc | |||
72c791045d | |||
61e3cb6443 | |||
239fa36b47 | |||
d76beebd2d | |||
0848df4edc | |||
8a09d7c187 | |||
4a91e286dd | |||
c9f1789694 | |||
301ed4cf22 | |||
831d01987d | |||
a2bb3a51a7 | |||
d3e5547461 | |||
bc6cc75202 | |||
71fe3ee650 | |||
ccb7efdd8c | |||
8c5b6169cc | |||
697b94c608 | |||
73e07e92fa | |||
6b7679c997 | |||
e151f66b6e | |||
38b637361b | |||
90a669ac65 | |||
1dcadc41e5 | |||
90fee81365 | |||
eceed6b233 | |||
07e390d818 | |||
cbc7a1ad19 | |||
e7e0fef37e | |||
d0f14f0e60 | |||
cca646b1be | |||
6db9837238 | |||
ca313a2b18 | |||
547dea7350 | |||
9d6e229e0a | |||
22d69ccafb | |||
5e59984211 | |||
0301e1f31d | |||
1f0d490688 | |||
288393778a | |||
7773bc916f | |||
5ebbcfcb9d | |||
f237d0bca1 | |||
70fa6efee7 | |||
30ed4349d9 | |||
ad998c17d1 | |||
4d6b6f8d4f | |||
dd3582b9db | |||
0e26e71a50 | |||
9a56fc9572 | |||
ac8689b40a | |||
0f9a79411d | |||
b944a3bac7 | |||
4bab81c541 | |||
2f3dd5926b | |||
959139b239 | |||
e958287b9e | |||
e110e7b4f9 | |||
61ec8c04be | |||
f0ccf8eb2f | |||
b831275901 | |||
5217763afb | |||
6d19f6ebad | |||
ed2b2c2826 | |||
91e18a9408 | |||
9ae150f3aa | |||
88acbae810 | |||
162bb9a78d | |||
81a996c714 | |||
2e9cfaa991 | |||
f2df3743c6 | |||
83943c6b52 | |||
0c975d8f42 | |||
1b91289320 | |||
d9c57d2090 | |||
ddc590bd69 | |||
883e80cf0d | |||
2fcc01705b | |||
ac45c7e2f2 | |||
2a8d5af713 | |||
012300a061 | |||
c5d26ad9c2 | |||
309de4c823 | |||
cfdd9d11ea | |||
17f6a606c6 | |||
b95d341dfa | |||
9356a75946 | |||
845afe7dbb | |||
8bfcb0163a | |||
057b5f7dd8 | |||
![]() |
549f752aea | ||
![]() |
07d57d83ac | ||
![]() |
85f6c43d79 | ||
![]() |
8a07bf69a7 | ||
![]() |
978bfb2cdc | ||
![]() |
b297e2072d | ||
![]() |
018b3ebc5e | ||
![]() |
b74f0a8949 | ||
![]() |
d12d7b6ddb | ||
![]() |
1a746acfec | ||
![]() |
b147f44776 | ||
![]() |
9b92e29a96 | ||
![]() |
6104123582 | ||
![]() |
3736c2ebc9 | ||
384dc2503b | |||
b5ba4e755b | |||
![]() |
2a44e130f5 | ||
![]() |
65c9aa167d | ||
![]() |
fb06720a00 | ||
![]() |
23187d463f | ||
![]() |
aa9c231327 | ||
![]() |
3b661fa9e2 | ||
1899d2f260 | |||
46fd26c5c8 | |||
58b4ca15c6 | |||
b85a0bfa78 | |||
0e42a15ae1 | |||
d00770967e | |||
ff5edbc47c | |||
b50842b331 | |||
be01fa9414 | |||
73229b4726 | |||
926e8ea45c | |||
91bb26667f | |||
13f7203054 | |||
ed3779b6a0 | |||
c157ae9f41 | |||
27ec459730 | |||
dcb1ee360d | |||
cdc5293580 | |||
dfdda38b1c | |||
9bf614fcc5 | |||
9dba1b8e79 | |||
124aeeeb98 | |||
7d8d0d7a18 | |||
ab89016836 | |||
f172eb4961 | |||
276950b117 | |||
0c8c9f89fd | |||
1debefc9ab | |||
b93e08e9a4 | |||
c13aa495f0 | |||
e6d044d0e1 | |||
e596f5eef6 | |||
db2b6bc518 | |||
130b88ace1 | |||
9df1fe8be2 | |||
0f71d820c5 | |||
a8891b310f | |||
59de6bc32f | |||
3a25c33e3a | |||
eff57bf0ab | |||
20c09d8b0a | |||
a634445dde | |||
4c88d7a71d | |||
bb9b8b086f | |||
61752a9a51 | |||
889e2754fc | |||
77b241c69f | |||
442b84a99d | |||
09f9f6bdd6 | |||
5eace20e26 | |||
18df3848f8 | |||
7b9d145533 | |||
75ad5853cf | |||
7862815f1f | |||
a87d439282 | |||
509c1d6365 | |||
e641ec1c03 | |||
3dec8a8ce5 | |||
54f0b0c6e3 | |||
931e59db2e | |||
cae0e6c8fb | |||
afee77b1e7 | |||
cf8963248e | |||
22af8ac751 | |||
2d4385f038 | |||
c4bb124bea | |||
a474a41402 | |||
e9f65a1e22 | |||
8183b0bb0b | |||
585c888007 | |||
d0997ccbf9 | |||
1a6bfab54b | |||
23f38a606f | |||
f1e1989c97 | |||
9bb5793720 | |||
64443322a0 | |||
76258c835f | |||
dc81614114 | |||
8dc1adc28a | |||
65eac4ac4a | |||
a8f70dc73a | |||
02aeb6ec22 | |||
5bdb38dfec | |||
5700200bc3 | |||
4ffca0e34a | |||
f4553110e1 | |||
bf3b1f9cb0 | |||
05d8ae9e0b | |||
6128d0778d | |||
c38bd7d12f | |||
cd509dfcb1 | |||
5ab8efe72e | |||
6cf6a8d6b2 | |||
daaf309b4d | |||
2d5c395aec | |||
5d5b1e3140 | |||
8aa24e50ab | |||
8574970bb0 | |||
89e6e12748 | |||
9234b76062 | |||
08c1619162 | |||
576f349b4a | |||
be6eaa748e | |||
1dc7b08d2e | |||
35521766cd | |||
c8ee063963 | |||
f0aba44ddb | |||
e6236e5de2 | |||
e5629de660 | |||
92d3da27a3 | |||
1fd0c5492f | |||
bab06033ed | |||
f7cf0f94fc | |||
c244651b62 | |||
beb58da3bd | |||
8756162428 | |||
511a6ff0bb | |||
4175ff828d | |||
087b5d9999 | |||
fea1c40a4b | |||
2dce24f9f2 | |||
0e0fd23913 | |||
0eab6c9049 | |||
ca7ce4e857 | |||
510afbe8f1 | |||
c89a64ca7f | |||
9280d59aac | |||
3accdc135b | |||
3d31ce5e55 | |||
8c60eba918 | |||
b182c2ec90 | |||
523f30027a | |||
f9faaa651e | |||
1aca92b1c7 | |||
4444c58902 | |||
75dbae7cc6 | |||
79e0ac2a38 | |||
1cb4b191bf | |||
485392e772 | |||
9c5f6448b1 | |||
b78e52c5d4 | |||
e687f26d2d | |||
769808ca4e | |||
5ba20aec09 | |||
5c0efda0ca | |||
b6d3eb8ec2 | |||
30df948d81 | |||
15430af1d6 | |||
2aae298d7d | |||
adeaeb624b | |||
d98e235dfc | |||
ef5de018b0 | |||
c024340af7 | |||
6a964938bc | |||
f024a960e4 | |||
c3ff13856b | |||
806e1cc14f | |||
a48cdf6690 | |||
df646488d6 | |||
1a36e233be | |||
b8c5d613bc | |||
60455ae036 |
12
README.md
12
README.md
@ -1,7 +1,17 @@
|
|||||||
# ZwiiCampus 1.10.04
|
# ZwiiCampus 1.21.03
|
||||||
|
|
||||||
ZwiiCampus (Learning Management System) est logiciel auteur destiné à mettre en ligne des tutoriels. Il dispose de plusieurs modalités d'ouverture et d'accès des contenus. Basé sur la version 13 du CMS Zwii, la structure logicielle est solide, le framework de Zwii est éprouvé.
|
ZwiiCampus (Learning Management System) est logiciel auteur destiné à mettre en ligne des tutoriels. Il dispose de plusieurs modalités d'ouverture et d'accès des contenus. Basé sur la version 13 du CMS Zwii, la structure logicielle est solide, le framework de Zwii est éprouvé.
|
||||||
|
|
||||||
|
Ce logiciel s'installe en ligne ou localement depuis un serveur Web.
|
||||||
|
|
||||||
|
## Principales fonctionnalités :
|
||||||
|
- Gestion des espaces d'enseignement : Créez des espaces de formation avec accès restreint.
|
||||||
|
- Participation et suivi des apprenants : Inscription libre, imposée ou avec clé, et suivi statistique détaillé des participants.
|
||||||
|
- Gestion des accès : Contrôlez la disponibilité des espaces (ouvert, limité dans le temps, fermé).
|
||||||
|
- Outils statistiques : Visualisation et exportation CSV des progrès des apprenants.
|
||||||
|
- Facilité d'installation : Pas besoin de base de données, tout fonctionne avec des fichiers JSON.
|
||||||
|
- Sauvegarde et restauration : Outils de gestion pour réinitialiser les espaces et les participations.
|
||||||
|
|
||||||
|
|
||||||
## Configuration recommandée
|
## Configuration recommandée
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ class helper
|
|||||||
|
|
||||||
/** Filtres personnalisés */
|
/** Filtres personnalisés */
|
||||||
const FILTER_BOOLEAN = 1;
|
const FILTER_BOOLEAN = 1;
|
||||||
const FILTER_DATETIME = 2;
|
const FILTER_DATETIME = 2; // filtre pour le champ de formulaire A conserver pour la compatibilité
|
||||||
const FILTER_FLOAT = 3;
|
const FILTER_FLOAT = 3;
|
||||||
const FILTER_ID = 4;
|
const FILTER_ID = 4;
|
||||||
const FILTER_INT = 5;
|
const FILTER_INT = 5;
|
||||||
@ -16,8 +16,14 @@ class helper
|
|||||||
const FILTER_PASSWORD = 7;
|
const FILTER_PASSWORD = 7;
|
||||||
const FILTER_STRING_LONG = 8;
|
const FILTER_STRING_LONG = 8;
|
||||||
const FILTER_STRING_SHORT = 9;
|
const FILTER_STRING_SHORT = 9;
|
||||||
const FILTER_TIMESTAMP = 10;
|
const FILTER_TIMESTAMP = 10; // Saisie d'une date en locatime
|
||||||
const FILTER_URL = 11;
|
const FILTER_URL = 11;
|
||||||
|
const FILTER_DATE = 12; // filtre pour le champ de formulaire
|
||||||
|
const FILTER_TIME = 13; // filtre pour le champ de formulair
|
||||||
|
const FILTER_MONTH = 14; // filtre pour le champ de formulair
|
||||||
|
const FILTER_YEAR = 16; // filtre pour le champ de formulair
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,7 +83,7 @@ class helper
|
|||||||
// Créer la variable
|
// Créer la variable
|
||||||
$data = array_merge($data, [$text => '']);
|
$data = array_merge($data, [$text => '']);
|
||||||
}
|
}
|
||||||
file_put_contents('site/i18n/' . $to . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX);
|
file_put_contents('site/i18n/' . $to . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -191,14 +197,20 @@ class helper
|
|||||||
|
|
||||||
public static function autoBackup($folder, $filter = ['backup', 'tmp'])
|
public static function autoBackup($folder, $filter = ['backup', 'tmp'])
|
||||||
{
|
{
|
||||||
// Creation du ZIP
|
// Création du nom de fichier ZIP
|
||||||
$baseName = str_replace('/', '', helper::baseUrl(false, false));
|
$baseName = str_replace('/', '', helper::baseUrl(false, false));
|
||||||
$baseName = empty($baseName) ? 'Campus' : $baseName;
|
$baseName = empty($baseName) ? 'ZwiiCMS' : $baseName;
|
||||||
$fileName = $baseName . '-backup-' . date('Y-m-d-H-i-s', time()) . '.zip';
|
$fileName = $baseName . '-backup-' . date('Y-m-d-H-i-s') . '.zip';
|
||||||
|
|
||||||
|
// Initialisation de l'archive ZIP
|
||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
$zip->open($folder . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
|
if ($zip->open($folder . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== true) {
|
||||||
|
return false; // Retourne false si l'ouverture échoue
|
||||||
|
}
|
||||||
|
|
||||||
$directory = 'site/';
|
$directory = 'site/';
|
||||||
//$filter = array('backup','tmp','file');
|
|
||||||
|
// Récupération des fichiers et des dossiers
|
||||||
$files = new RecursiveIteratorIterator(
|
$files = new RecursiveIteratorIterator(
|
||||||
new RecursiveCallbackFilterIterator(
|
new RecursiveCallbackFilterIterator(
|
||||||
new RecursiveDirectoryIterator(
|
new RecursiveDirectoryIterator(
|
||||||
@ -206,21 +218,26 @@ class helper
|
|||||||
RecursiveDirectoryIterator::SKIP_DOTS
|
RecursiveDirectoryIterator::SKIP_DOTS
|
||||||
),
|
),
|
||||||
function ($fileInfo, $key, $iterator) use ($filter) {
|
function ($fileInfo, $key, $iterator) use ($filter) {
|
||||||
return $fileInfo->isFile() || !in_array($fileInfo->getBaseName(), $filter);
|
// Inclure les fichiers ou les répertoires non filtrés
|
||||||
|
return $fileInfo->isFile() || ($fileInfo->isDir() && !in_array($fileInfo->getBaseName(), $filter));
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach ($files as $name => $file) {
|
|
||||||
|
// Ajout des fichiers à l'archive
|
||||||
|
foreach ($files as $file) {
|
||||||
if (!$file->isDir()) {
|
if (!$file->isDir()) {
|
||||||
$filePath = $file->getRealPath();
|
$filePath = $file->getRealPath();
|
||||||
$relativePath = substr($filePath, strlen(realpath($directory)) + 1);
|
$relativePath = str_replace(DIRECTORY_SEPARATOR, '/', substr($filePath, strlen(realpath($directory)) + 1));
|
||||||
$zip->addFile($filePath, $relativePath);
|
$zip->addFile($filePath, $relativePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$zip->close();
|
|
||||||
return ($fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Fermeture de l'archive ZIP
|
||||||
|
$zip->close();
|
||||||
|
|
||||||
|
return $fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -337,7 +354,7 @@ class helper
|
|||||||
public static function checkRewrite()
|
public static function checkRewrite()
|
||||||
{
|
{
|
||||||
// N'interroge que le serveur Apache
|
// N'interroge que le serveur Apache
|
||||||
if (strpos($_SERVER["SERVER_SOFTWARE"], 'Apache') > 0) {
|
if ((helper::checkServerSoftware() === false)) {
|
||||||
self::$rewriteStatus = false;
|
self::$rewriteStatus = false;
|
||||||
} else {
|
} else {
|
||||||
// Ouvre et scinde le fichier .htaccess
|
// Ouvre et scinde le fichier .htaccess
|
||||||
@ -348,6 +365,14 @@ class helper
|
|||||||
return self::$rewriteStatus;
|
return self::$rewriteStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne vrai ou faux selon que le serveur est comptatible avec htaccess
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function checkServerSoftware() {
|
||||||
|
return (stripos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || stripos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie le numéro de version de Zwii est en ligne
|
* Renvoie le numéro de version de Zwii est en ligne
|
||||||
* @return string
|
* @return string
|
||||||
@ -373,7 +398,6 @@ class helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Génère des variations d'une couleur
|
* Génère des variations d'une couleur
|
||||||
* @param string $rgba Code rgba de la couleur
|
* @param string $rgba Code rgba de la couleur
|
||||||
@ -403,8 +427,8 @@ class helper
|
|||||||
*/
|
*/
|
||||||
public static function deleteCookie($cookieKey)
|
public static function deleteCookie($cookieKey)
|
||||||
{
|
{
|
||||||
unset($_COOKIE[$cookieKey]);
|
|
||||||
setcookie($cookieKey, '', time() - 3600, helper::baseUrl(false, false), '', false, true);
|
setcookie($cookieKey, '', time() - 3600, helper::baseUrl(false, false), '', false, true);
|
||||||
|
unset($_COOKIE[$cookieKey]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -427,7 +451,8 @@ class helper
|
|||||||
$text = (int) $date->format('U');
|
$text = (int) $date->format('U');
|
||||||
break;
|
break;
|
||||||
case self::FILTER_FLOAT:
|
case self::FILTER_FLOAT:
|
||||||
$text = filter_var($text, FILTER_SANITIZE_NUMBER_FLOAT);
|
$text = str_replace(',', '.', $text); // Remplacer les virgules par des points
|
||||||
|
$text = filter_var($text, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
|
||||||
$text = (float) $text;
|
$text = (float) $text;
|
||||||
break;
|
break;
|
||||||
case self::FILTER_ID:
|
case self::FILTER_ID:
|
||||||
@ -474,6 +499,11 @@ class helper
|
|||||||
case self::FILTER_URL:
|
case self::FILTER_URL:
|
||||||
$text = filter_var($text, FILTER_SANITIZE_URL);
|
$text = filter_var($text, FILTER_SANITIZE_URL);
|
||||||
break;
|
break;
|
||||||
|
case self::FILTER_DATE:
|
||||||
|
$text = date('Y-m-d', $text);
|
||||||
|
break;
|
||||||
|
case self::FILTER_TIME:
|
||||||
|
$text = date('H:i', $text);
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
@ -662,10 +692,30 @@ class helper
|
|||||||
public static function subword($text, $start, $length)
|
public static function subword($text, $start, $length)
|
||||||
{
|
{
|
||||||
$text = trim($text);
|
$text = trim($text);
|
||||||
if (strlen($text) > $length) {
|
|
||||||
|
// Vérifier si la longueur du texte sans les balises dépasse la longueur souhaitée
|
||||||
|
if (mb_strlen(strip_tags($text)) > $length) {
|
||||||
|
// Utiliser mb_substr pour couper le texte
|
||||||
$text = mb_substr($text, $start, $length);
|
$text = mb_substr($text, $start, $length);
|
||||||
$text = mb_substr($text, 0, min(mb_strlen($text), mb_strrpos($text, ' ')));
|
|
||||||
|
// S'assurer que le texte ne se termine pas au milieu d'un mot
|
||||||
|
$lastSpace = mb_strrpos($text, ' ');
|
||||||
|
if ($lastSpace !== false) {
|
||||||
|
$text = mb_substr($text, 0, $lastSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fermer les balises HTML ouvertes
|
||||||
|
$dom = new DOMDocument();
|
||||||
|
@$dom->loadHTML('<div>' . $text . '</div>', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
||||||
|
$text = $dom->saveHTML();
|
||||||
|
|
||||||
|
// Retirer la balise de conteneur ajoutée
|
||||||
|
$text = preg_replace('~^<div>(.*)</div>$~s', '$1', $text);
|
||||||
|
|
||||||
|
// Ajouter des points de suspension si le texte a été coupé
|
||||||
|
$text .= '...';
|
||||||
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
|
|||||||
*
|
*
|
||||||
* @param array|null $data Data
|
* @param array|null $data Data
|
||||||
*/
|
*/
|
||||||
public function __construct(array $data = null)
|
public function __construct(?array $data = null)
|
||||||
{
|
{
|
||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
@ -101,7 +101,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Iterate path
|
// Iterate path
|
||||||
$keys = explode('.', (string) $key);
|
$keys = explode('.', (string)$key);
|
||||||
if ($pop === true) {
|
if ($pop === true) {
|
||||||
array_pop($keys);
|
array_pop($keys);
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
|
|||||||
*/
|
*/
|
||||||
public function has($key)
|
public function has($key)
|
||||||
{
|
{
|
||||||
$keys = explode('.', (string) $key);
|
$keys = explode('.', (string)$key);
|
||||||
$data = &$this->data;
|
$data = &$this->data;
|
||||||
foreach ($keys as $key) {
|
foreach ($keys as $key) {
|
||||||
if (!isset($data[$key])) {
|
if (!isset($data[$key])) {
|
||||||
@ -371,7 +371,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
|
|||||||
*/
|
*/
|
||||||
public function isEmpty(): bool
|
public function isEmpty(): bool
|
||||||
{
|
{
|
||||||
return !(bool) count($this->data);
|
return !(bool)count($this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -391,7 +391,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
|
|||||||
*/
|
*/
|
||||||
public function toJson()
|
public function toJson()
|
||||||
{
|
{
|
||||||
return json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
return json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by PhpStorm.
|
* Created by PhpStorm.
|
||||||
* User: Andrey Mistulov
|
* User: Andrey Mistulov
|
||||||
@ -18,6 +19,10 @@ class JsonDb extends \Prowebcraft\Dot
|
|||||||
protected $db = '';
|
protected $db = '';
|
||||||
protected $data = null;
|
protected $data = null;
|
||||||
protected $config = [];
|
protected $config = [];
|
||||||
|
// Tentative d'écriture après échec
|
||||||
|
const MAX_FILE_WRITE_ATTEMPTS = 5;
|
||||||
|
// Délais entre deux tentaives
|
||||||
|
const RETRY_DELAY_SECONDS = 1;
|
||||||
|
|
||||||
public function __construct($config = [])
|
public function __construct($config = [])
|
||||||
{
|
{
|
||||||
@ -108,72 +113,97 @@ class JsonDb extends \Prowebcraft\Dot
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local database upload
|
* Charge les données depuis un fichier JSON.
|
||||||
* @param bool $reload Reboot data?
|
*
|
||||||
* @return array|mixed|null
|
* @param bool $reload Force le rechargement des données si true
|
||||||
|
*
|
||||||
|
* @return array|null Les données chargées ou null si le fichier n'existe pas
|
||||||
|
*
|
||||||
|
* @throws \RuntimeException En cas d'erreur lors de la création de la sauvegarde
|
||||||
|
* @throws \InvalidArgumentException Si le fichier contient des données JSON invalides
|
||||||
*/
|
*/
|
||||||
protected function loadData($reload = false)
|
protected function loadData($reload = false): ?array
|
||||||
{
|
{
|
||||||
if ($this->data === null || $reload) {
|
if ($this->data === null || $reload) {
|
||||||
$this->db = $this->config['dir'] . $this->config['name'];
|
$this->db = $this->config['dir'] . $this->config['name'];
|
||||||
|
|
||||||
if (!file_exists($this->db)) {
|
if (!file_exists($this->db)) {
|
||||||
return null; // Rebuild database manage by CMS
|
return null; // Rebuild database managed by CMS
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if ($this->config['backup']) {
|
if ($this->config['backup']) {
|
||||||
|
$backup_path = $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'] . '.backup';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
copy($this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'], $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'] . '.backup');
|
if (!copy($this->db, $backup_path)) {
|
||||||
|
throw new \RuntimeException('Échec de la création de la sauvegarde');
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
error_log('Erreur de chargement : ' . $e);
|
throw new \RuntimeException('Erreur de sauvegarde : ' . $e->getMessage());
|
||||||
exit('Erreur de chargement : ' . $e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$this->data = json_decode(file_get_contents($this->db), true);
|
$file_contents = file_get_contents($this->db);
|
||||||
if (!$this->data === null && json_last_error() !== JSON_ERROR_NONE) {
|
|
||||||
throw new \InvalidArgumentException('Le fichier ' . $this->db
|
$this->data = json_decode($file_contents, true);
|
||||||
. ' contient des données invalides.');
|
|
||||||
|
if ($this->data === null) {
|
||||||
|
throw new \InvalidArgumentException('Le fichier ' . $this->db . ' contient des données invalides.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save database
|
* Charge les données depuis un fichier JSON.
|
||||||
|
*
|
||||||
|
* @param bool $reload Force le rechargement des données si true
|
||||||
|
*
|
||||||
|
* @return array|null Les données chargées ou null si le fichier n'existe pas
|
||||||
|
*
|
||||||
|
* @throws \RuntimeException En cas d'erreur lors de la création de la sauvegarde
|
||||||
|
* @throws \InvalidArgumentException Si le fichier contient des données JSON invalides
|
||||||
*/
|
*/
|
||||||
public function save()
|
public function save(): void
|
||||||
{
|
{
|
||||||
// Encode les données au format JSON avec les options spécifiées
|
if ($this->data === null) {
|
||||||
$encoded_data = json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT | JSON_PRETTY_PRINT);
|
throw new \RuntimeException('Tentative de sauvegarde de données nulles');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$encoded_data = json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT | JSON_THROW_ON_ERROR);
|
||||||
|
} catch (\JsonException $e) {
|
||||||
|
throw new \RuntimeException('Erreur d\'encodage JSON : ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// Vérifie la longueur de la chaîne JSON encodée
|
|
||||||
$encoded_length = strlen($encoded_data);
|
$encoded_length = strlen($encoded_data);
|
||||||
|
$max_attempts = 5;
|
||||||
|
|
||||||
// Initialise le compteur de tentatives
|
for ($attempt = 0; $attempt < $max_attempts; $attempt++) {
|
||||||
$attempt = 0;
|
$temp_file = $this->db . '.tmp' . uniqid();
|
||||||
|
|
||||||
// Tente d'encoder les données en JSON et de les sauvegarder jusqu'à 5 fois en cas d'échec
|
try {
|
||||||
while ($attempt < 5) {
|
$write_result = file_put_contents($temp_file, $encoded_data, LOCK_EX);
|
||||||
// Essaye d'écrire les données encodées dans le fichier de base de données
|
|
||||||
$write_result = file_put_contents($this->db, $encoded_data, LOCK_EX); // Les utilisateurs multiples obtiennent un verrou
|
|
||||||
|
|
||||||
// Vérifie si l'écriture a réussi
|
|
||||||
if ($write_result === $encoded_length) {
|
if ($write_result === $encoded_length) {
|
||||||
// Sort de la boucle si l'écriture a réussi
|
if (rename($temp_file, $this->db)) {
|
||||||
break;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Incrémente le compteur de tentatives
|
|
||||||
$attempt++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vérifie si l'écriture a échoué même après plusieurs tentatives
|
|
||||||
if ($write_result !== $encoded_length) {
|
|
||||||
// Enregistre un message d'erreur dans le journal des erreurs
|
|
||||||
error_log('Erreur d\'écriture, les données n\'ont pas été sauvegardées.');
|
|
||||||
|
|
||||||
// Affiche un message d'erreur et termine le script
|
|
||||||
exit('Erreur d\'écriture, les données n\'ont pas été sauvegardées.');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_log("Échec sauvegarde : longueur incorrecte ou renommage échoué (tentative " . ($attempt + 1) . ")");
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
error_log('Erreur de sauvegarde : ' . $e->getMessage());
|
||||||
|
|
||||||
|
if (file_exists($temp_file)) {
|
||||||
|
unlink($temp_file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
usleep(pow(2, $attempt) * 250000);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new \RuntimeException('Échec de sauvegarde après ' . $max_attempts . ' tentatives');
|
||||||
|
}
|
||||||
}
|
}
|
@ -82,17 +82,25 @@ class layout extends common
|
|||||||
$content = 'col' . $blocks[1];
|
$content = 'col' . $blocks[1];
|
||||||
$blockright = 'col' . $blocks[2];
|
$blockright = 'col' . $blocks[2];
|
||||||
}
|
}
|
||||||
// Page pleine pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog
|
// Toujours en pleine page pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog
|
||||||
$pattern = ['config', 'edit', 'add', 'comment', 'data'];
|
$pattern = ['config', 'edit', 'add', 'comment', 'data', 'option', 'theme', 'comment', 'article', 'data', 'gallery', 'update', 'users', 'validate'];
|
||||||
if (
|
if (
|
||||||
(sizeof($blocks) === 1 ||
|
(sizeof($blocks) === 1 ||
|
||||||
in_array($this->getUrl(1), $pattern))
|
in_array($this->getUrl(1), $pattern))
|
||||||
) { // Pleine page en mode configuration
|
) { // Pleine page en mode configuration
|
||||||
if ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'top' || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'top') {
|
if (
|
||||||
|
($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'top'
|
||||||
|
|| $this->getData(['page', $this->getUrl(0), 'navRight']) === 'top')
|
||||||
|
&& in_array($this->getUrl(1), $pattern) === false
|
||||||
|
) {
|
||||||
$this->showNavButtons('top');
|
$this->showNavButtons('top');
|
||||||
}
|
}
|
||||||
$this->showContent();
|
$this->showContent();
|
||||||
if ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'bottom' || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'bottom') {
|
if (
|
||||||
|
($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'bottom'
|
||||||
|
|| $this->getData(['page', $this->getUrl(0), 'navRight']) === 'bottom')
|
||||||
|
&& in_array($this->getUrl(1), $pattern) === false
|
||||||
|
) {
|
||||||
$this->showNavButtons('bottom');
|
$this->showNavButtons('bottom');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -330,7 +338,7 @@ class layout extends common
|
|||||||
// Affichage du lien de connexion
|
// Affichage du lien de connexion
|
||||||
if (
|
if (
|
||||||
($this->getData(['theme', 'footer', 'loginLink'])
|
($this->getData(['theme', 'footer', 'loginLink'])
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === false
|
||||||
)
|
)
|
||||||
or $this->getUrl(0) === 'theme'
|
or $this->getUrl(0) === 'theme'
|
||||||
) {
|
) {
|
||||||
@ -345,7 +353,7 @@ class layout extends common
|
|||||||
}
|
}
|
||||||
// Affichage de la barre de membre simple
|
// Affichage de la barre de membre simple
|
||||||
if (
|
if (
|
||||||
$this->getUser('group') >= self::GROUP_MEMBER && $this->getUser('group') < self::GROUP_ADMIN
|
$this->getUser('role') >= self::ROLE_MEMBER && $this->getUser('role') < self::ROLE_ADMIN
|
||||||
&& $this->getData(['theme', 'footer', 'memberBar']) === true
|
&& $this->getData(['theme', 'footer', 'memberBar']) === true
|
||||||
) {
|
) {
|
||||||
$items .= '<span id="footerDisplayMemberAccount"';
|
$items .= '<span id="footerDisplayMemberAccount"';
|
||||||
@ -355,8 +363,9 @@ class layout extends common
|
|||||||
$this->getUser('permission', 'filemanager') === true
|
$this->getUser('permission', 'filemanager') === true
|
||||||
&& $this->getUser('permission', 'folder', (self::$siteContent === 'home' ? 'homePath' : 'coursePath')) !== 'none'
|
&& $this->getUser('permission', 'folder', (self::$siteContent === 'home' ? 'homePath' : 'coursePath')) !== 'none'
|
||||||
) {
|
) {
|
||||||
|
$folder = '&fldr=/' . (self::$siteContent === 'home' ? '' : self::$siteContent);
|
||||||
$items .= '<wbr>' . template::ico('folder', [
|
$items .= '<wbr>' . template::ico('folder', [
|
||||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']) . '&fldr=/' . self::$siteContent,
|
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']) . $folder,
|
||||||
'margin' => 'all',
|
'margin' => 'all',
|
||||||
'attr' => 'data-lity',
|
'attr' => 'data-lity',
|
||||||
'help' => 'Fichiers du site'
|
'help' => 'Fichiers du site'
|
||||||
@ -486,9 +495,11 @@ class layout extends common
|
|||||||
*/
|
*/
|
||||||
public function showMenu()
|
public function showMenu()
|
||||||
{
|
{
|
||||||
// Met en forme les items du menu
|
// Met en forme les items du menu si affiché
|
||||||
$itemsLeft = $this->formatMenu(false);
|
$itemsLeft = '';
|
||||||
|
if ($this->getData(['theme', 'menu', 'hidePages']) === false) {
|
||||||
|
$itemsLeft = $this->formatMenu();
|
||||||
|
}
|
||||||
// Menu extra
|
// Menu extra
|
||||||
$itemsRight = $this->formatMenu(true);
|
$itemsRight = $this->formatMenu(true);
|
||||||
|
|
||||||
@ -497,7 +508,7 @@ class layout extends common
|
|||||||
* Affichage du sélecteur d'espaces
|
* Affichage du sélecteur d'espaces
|
||||||
*/
|
*/
|
||||||
if (
|
if (
|
||||||
$this->getUser('group') === self::GROUP_MEMBER
|
$this->getUser('role') === self::ROLE_MEMBER
|
||||||
&& $this->getData(['theme', 'menu', 'selectSpace']) === true
|
&& $this->getData(['theme', 'menu', 'selectSpace']) === true
|
||||||
) {
|
) {
|
||||||
if ($this->getCoursesByProfil()) {
|
if ($this->getCoursesByProfil()) {
|
||||||
@ -510,20 +521,62 @@ class layout extends common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Affiche le bouton d'affichage des rapports individuels de consultation
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (
|
||||||
|
$this->getData(['theme', 'menu', 'userReport']) === true
|
||||||
|
&& self::$siteContent !== 'home'
|
||||||
|
// Pas de statistiques pour les espaces ouverts
|
||||||
|
&& $this->getData(['course', self::$siteContent, 'enrolment']) >= 1
|
||||||
|
) {
|
||||||
|
$href = '';
|
||||||
|
switch ($this->getUser('role')) {
|
||||||
|
case self::ROLE_MEMBER:
|
||||||
|
$href = helper::baseUrl() . 'course/userReport/' . self::$siteContent . '/' . $this->getUser('id');
|
||||||
|
break;
|
||||||
|
case self::ROLE_EDITOR:
|
||||||
|
if (
|
||||||
|
$this->getData(['enrolment', self::$siteContent]) && ($this->getUser('id') === $this->getData(['course', self::$siteContent, 'author']))
|
||||||
|
// Permission d'accéder aux espaces dans lesquels le membre est inscrit
|
||||||
|
||
|
||||||
|
($this->getData(['enrolment', self::$siteContent])
|
||||||
|
&& $this->getUser('permission', __CLASS__, 'tutor') === true
|
||||||
|
&& array_key_exists($this->getUser('id'), $this->getData(['enrolment', self::$siteContent])))
|
||||||
|
) {
|
||||||
|
$href = helper::baseUrl() . 'course/users/' . self::$siteContent;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case self::ROLE_ADMIN:
|
||||||
|
$href = helper::baseUrl() . 'course/users/' . self::$siteContent;
|
||||||
|
}
|
||||||
|
if ($href) {
|
||||||
|
$itemsRight .= '<li>' . template::ico('chart-line', [
|
||||||
|
'help' => 'Rapport des consultations',
|
||||||
|
'margin' => 'all',
|
||||||
|
'href' => $href
|
||||||
|
]) . '</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commandes pour les membres simples
|
* Commandes pour les membres simples
|
||||||
* Affichage des boutons gestionnaire de fichiers et mon compte
|
* Affichage des boutons gestionnaire de fichiers et mon compte
|
||||||
*/
|
*/
|
||||||
if (
|
if (
|
||||||
$this->getUser('group') === self::GROUP_MEMBER
|
$this->getUser('role') === self::ROLE_MEMBER
|
||||||
&& $this->getData(['theme', 'menu', 'memberBar']) === true
|
&& $this->getData(['theme', 'menu', 'memberBar']) === true
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// Affiche l'icône RFM
|
// Affiche l'icône RFM
|
||||||
if ($this->getUser('permission', 'filemanager') === true
|
if (
|
||||||
&& $this->getUser('permission', 'folder', (self::$siteContent === 'home' ? 'homePath' : 'coursePath')) !== 'none') {
|
$this->getUser('permission', 'filemanager') === true
|
||||||
|
&& $this->getUser('permission', 'folder', (self::$siteContent === 'home' ? 'homePath' : 'coursePath')) !== 'none'
|
||||||
|
) {
|
||||||
|
$folder = '&fldr=/' . (self::$siteContent === 'home' ? '' : self::$siteContent);
|
||||||
$itemsRight .= '<li>' . template::ico('folder', [
|
$itemsRight .= '<li>' . template::ico('folder', [
|
||||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']) . '&fldr=/' . self::$siteContent,
|
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']) . $folder,
|
||||||
'attr' => 'data-lity',
|
'attr' => 'data-lity',
|
||||||
'help' => 'Fichiers du site'
|
'help' => 'Fichiers du site'
|
||||||
]) . '</li>';
|
]) . '</li>';
|
||||||
@ -547,7 +600,7 @@ class layout extends common
|
|||||||
// Lien de connexion
|
// Lien de connexion
|
||||||
if (
|
if (
|
||||||
($this->getData(['theme', 'menu', 'loginLink'])
|
($this->getData(['theme', 'menu', 'loginLink'])
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === false
|
||||||
)
|
)
|
||||||
or $this->getUrl(0) === 'theme'
|
or $this->getUrl(0) === 'theme'
|
||||||
) {
|
) {
|
||||||
@ -560,8 +613,7 @@ class layout extends common
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Retourne les items du menu
|
// Retourne les items du menu
|
||||||
echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight;
|
echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight . '</ul>';
|
||||||
echo '</ul>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -573,6 +625,7 @@ class layout extends common
|
|||||||
{
|
{
|
||||||
$items = '';
|
$items = '';
|
||||||
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
|
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
|
||||||
|
|
||||||
foreach ($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
foreach ($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
||||||
// Menu extra ou standard
|
// Menu extra ou standard
|
||||||
|
|
||||||
@ -592,10 +645,10 @@ class layout extends common
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
($this->getData(['page', $parentPageId, 'disable']) === true
|
($this->getData(['page', $parentPageId, 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === false
|
||||||
) or ($this->getData(['page', $parentPageId, 'disable']) === true
|
) or ($this->getData(['page', $parentPageId, 'disable']) === true
|
||||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === true
|
||||||
and $this->getUser('group') < self::GROUP_EDITOR
|
and $this->getUser('role') < self::ROLE_EDITOR
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
||||||
@ -658,10 +711,10 @@ class layout extends common
|
|||||||
$items .= '<li id=' . $childKey . '>';
|
$items .= '<li id=' . $childKey . '>';
|
||||||
if (
|
if (
|
||||||
($this->getData(['page', $childKey, 'disable']) === true
|
($this->getData(['page', $childKey, 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === false
|
||||||
) or ($this->getData(['page', $childKey, 'disable']) === true
|
) or ($this->getData(['page', $childKey, 'disable']) === true
|
||||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === true
|
||||||
and $this->getUser('group') < self::GROUP_EDITOR
|
and $this->getUser('role') < self::ROLE_EDITOR
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
||||||
@ -754,7 +807,7 @@ class layout extends common
|
|||||||
$items .= '<li class="menuSideChild">';
|
$items .= '<li class="menuSideChild">';
|
||||||
if (
|
if (
|
||||||
$this->getData(['page', $parentPageId, 'disable']) === true
|
$this->getData(['page', $parentPageId, 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === false
|
||||||
) {
|
) {
|
||||||
$items .= '<a href="' . $this->getUrl(1) . '">';
|
$items .= '<a href="' . $this->getUrl(1) . '">';
|
||||||
} else {
|
} else {
|
||||||
@ -778,7 +831,7 @@ class layout extends common
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
$this->getData(['page', $childKey, 'disable']) === true
|
$this->getData(['page', $childKey, 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === false
|
||||||
) {
|
) {
|
||||||
$itemsChildren .= '<a href="' . $this->getUrl(1) . '">';
|
$itemsChildren .= '<a href="' . $this->getUrl(1) . '">';
|
||||||
} else {
|
} else {
|
||||||
@ -914,7 +967,7 @@ class layout extends common
|
|||||||
*/
|
*/
|
||||||
public function showBar()
|
public function showBar()
|
||||||
{
|
{
|
||||||
if ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')) {
|
if ($this->isConnected() === true) {
|
||||||
// Items de gauche
|
// Items de gauche
|
||||||
$leftItems = '';
|
$leftItems = '';
|
||||||
// Sélecteur de contenu
|
// Sélecteur de contenu
|
||||||
@ -922,7 +975,7 @@ class layout extends common
|
|||||||
* Les admins voient tous les contenus
|
* Les admins voient tous les contenus
|
||||||
* Les enseignants les contenus dont ils sont auteurs
|
* Les enseignants les contenus dont ils sont auteurs
|
||||||
*/
|
*/
|
||||||
if ($this->getUser('group') >= self::GROUP_EDITOR) {
|
if ($this->getUser('role') >= self::ROLE_EDITOR) {
|
||||||
if (is_array($this->getCoursesByProfil())) {
|
if (is_array($this->getCoursesByProfil())) {
|
||||||
$leftItems .= '<li><select id="barSelectCourse" >';
|
$leftItems .= '<li><select id="barSelectCourse" >';
|
||||||
$leftItems .= '<option name="' . helper::translate('Accueil') . '" value="' . helper::baseUrl(true) . 'course/swap/home" ' . ('home' === self::$siteContent ? 'selected' : '') . '>' . helper::translate('Accueil') . '</option>';
|
$leftItems .= '<option name="' . helper::translate('Accueil') . '" value="' . helper::baseUrl(true) . 'course/swap/home" ' . ('home' === self::$siteContent ? 'selected' : '') . '>' . helper::translate('Accueil') . '</option>';
|
||||||
@ -937,7 +990,7 @@ class layout extends common
|
|||||||
'help' => 'Gérer les espaces'
|
'help' => 'Gérer les espaces'
|
||||||
]) . '</li>';
|
]) . '</li>';
|
||||||
}
|
}
|
||||||
if ($this->getUser('group') >= self::GROUP_ADMIN) {
|
if ($this->getUser('role') >= self::ROLE_ADMIN) {
|
||||||
$leftItems .= '<li>' . template::ico('brush', [
|
$leftItems .= '<li>' . template::ico('brush', [
|
||||||
'help' => 'Thème',
|
'help' => 'Thème',
|
||||||
'href' => helper::baseUrl() . 'theme'
|
'href' => helper::baseUrl() . 'theme'
|
||||||
@ -945,8 +998,8 @@ class layout extends common
|
|||||||
}
|
}
|
||||||
// Liste des pages et bouton de gestion interdit pour l'accueil sauf admin
|
// Liste des pages et bouton de gestion interdit pour l'accueil sauf admin
|
||||||
if (
|
if (
|
||||||
($this->getUser('group') === self::GROUP_EDITOR && self::$siteContent != 'home')
|
($this->getUser('role') === self::ROLE_EDITOR && self::$siteContent != 'home')
|
||||||
|| $this->getUser('group') === self::GROUP_ADMIN
|
|| $this->getUser('role') === self::ROLE_ADMIN
|
||||||
) {
|
) {
|
||||||
$leftItems .= '<li><select id="barSelectPage">';
|
$leftItems .= '<li><select id="barSelectPage">';
|
||||||
$leftItems .= '<option value="">' . helper::translate('Pages du site') . '</option>';
|
$leftItems .= '<option value="">' . helper::translate('Pages du site') . '</option>';
|
||||||
@ -1011,8 +1064,8 @@ class layout extends common
|
|||||||
// Sur une page sans module
|
// Sur une page sans module
|
||||||
or $this->getData(['page', $this->getUrl(0), 'moduleId']) === ''
|
or $this->getData(['page', $this->getUrl(0), 'moduleId']) === ''
|
||||||
// Sur une page avec un module invalide
|
// Sur une page avec un module invalide
|
||||||
or (!is_null($this->getData(['page', $this->getUrl(2), 'moduleId'])) &&
|
or (empty($this->getData(['page', $this->getUrl(0), 'moduleId'])) === false
|
||||||
!class_exists($this->getData(['page', $this->getUrl(2), 'moduleId']))
|
and class_exists($this->getData(['page', $this->getUrl(0), 'moduleId'])) === false
|
||||||
)
|
)
|
||||||
// Sur une page d'accueil
|
// Sur une page d'accueil
|
||||||
or $this->getUrl(0) === ''
|
or $this->getUrl(0) === ''
|
||||||
@ -1032,6 +1085,7 @@ class layout extends common
|
|||||||
$this->getUser('permission', 'page', 'module')
|
$this->getUser('permission', 'page', 'module')
|
||||||
and $this->geturl(1) !== 'edit'
|
and $this->geturl(1) !== 'edit'
|
||||||
and $this->getData(['page', $this->getUrl(0), 'moduleId'])
|
and $this->getData(['page', $this->getUrl(0), 'moduleId'])
|
||||||
|
and class_exists($this->getData(['page', $this->getUrl(0), 'moduleId'])) === true
|
||||||
) {
|
) {
|
||||||
$leftItems .= '<li>' . template::ico('gear', [
|
$leftItems .= '<li>' . template::ico('gear', [
|
||||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||||
@ -1068,38 +1122,35 @@ class layout extends common
|
|||||||
$rightItems = '';
|
$rightItems = '';
|
||||||
if (
|
if (
|
||||||
(
|
(
|
||||||
$this->getUser('group') === self::GROUP_EDITOR
|
$this->getUser('role') === self::ROLE_EDITOR
|
||||||
&& $this->getUser('permission', 'filemanager') === true
|
&& $this->getUser('permission', 'filemanager') === true
|
||||||
&& $this->getUser('permission', 'folder', (self::$siteContent === 'home' ? 'homePath' : 'coursePath')) !== 'none'
|
&& $this->getUser('permission', 'folder', (self::$siteContent === 'home' ? 'homePath' : 'coursePath')) !== 'none'
|
||||||
)
|
)
|
||||||
|| $this->getUser('group') === self::GROUP_ADMIN
|
|| $this->getUser('role') === self::ROLE_ADMIN
|
||||||
) {
|
) {
|
||||||
|
$folder = '&fldr=/' . (self::$siteContent === 'home' ? '' : self::$siteContent);
|
||||||
$rightItems .= '<li>' . template::ico('folder', [
|
$rightItems .= '<li>' . template::ico('folder', [
|
||||||
'help' => 'Fichiers',
|
'help' => 'Fichiers',
|
||||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']) . '&fldr=/' . self::$siteContent,
|
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']) . $folder,
|
||||||
'attr' => 'data-lity'
|
'attr' => 'data-lity'
|
||||||
]) . '</li>';
|
]) . '</li>';
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
self::$siteContent === 'home'
|
self::$siteContent === 'home'
|
||||||
&& $this->getUser('group') >= self::GROUP_ADMIN
|
&& $this->getUser('role') >= self::ROLE_ADMIN
|
||||||
) {
|
) {
|
||||||
$rightItems .= '<li>' . template::ico('puzzle', [
|
|
||||||
'help' => 'Modules',
|
|
||||||
'href' => helper::baseUrl() . 'plugin'
|
|
||||||
]) . '</li>';
|
|
||||||
$rightItems .= '<li>' . template::ico('flag', [
|
$rightItems .= '<li>' . template::ico('flag', [
|
||||||
'help' => 'Langues',
|
'help' => 'Langues',
|
||||||
'href' => helper::baseUrl() . 'language'
|
'href' => helper::baseUrl() . 'language'
|
||||||
]) . '</li>';
|
]) . '</li>';
|
||||||
|
$rightItems .= '<li>' . template::ico('address-book', [
|
||||||
|
'help' => 'Utilisateurs',
|
||||||
|
'href' => helper::baseUrl() . 'user'
|
||||||
|
]) . '</li>';
|
||||||
$rightItems .= '<li>' . template::ico('cog-alt', [
|
$rightItems .= '<li>' . template::ico('cog-alt', [
|
||||||
'help' => 'Configuration',
|
'help' => 'Configuration',
|
||||||
'href' => helper::baseUrl() . 'config'
|
'href' => helper::baseUrl() . 'config'
|
||||||
]) . '</li>';
|
]) . '</li>';
|
||||||
$rightItems .= '<li>' . template::ico('users', [
|
|
||||||
'help' => 'Utilisateurs',
|
|
||||||
'href' => helper::baseUrl() . 'user'
|
|
||||||
]) . '</li>';
|
|
||||||
// Mise à jour automatique
|
// Mise à jour automatique
|
||||||
$today = mktime(0, 0, 0);
|
$today = mktime(0, 0, 0);
|
||||||
$checkUpdate = $this->getData(['core', 'lastAutoUpdate']);
|
$checkUpdate = $this->getData(['core', 'lastAutoUpdate']);
|
||||||
@ -1111,23 +1162,56 @@ class layout extends common
|
|||||||
$today > $checkUpdate + $this->getData(['config', 'autoUpdateDelay', 86400])
|
$today > $checkUpdate + $this->getData(['config', 'autoUpdateDelay', 86400])
|
||||||
) {
|
) {
|
||||||
// Dernier auto controle
|
// Dernier auto controle
|
||||||
$this->setData(['core', 'lastAutoUpdate', $today]);
|
$this->setData(['core', 'lastAutoUpdate', $today], false);
|
||||||
if (
|
if (
|
||||||
helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL)
|
helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL)
|
||||||
) {
|
) {
|
||||||
$this->setData(['core', 'updateAvailable', true]);
|
$this->setData(['core', 'updateAvailable', true], false);
|
||||||
|
}
|
||||||
|
// Modules installés
|
||||||
|
$infoModules = helper::getModules();
|
||||||
|
// Recherche de mise à jour des modules
|
||||||
|
$store = plugin::getStore();
|
||||||
|
if (is_array($store)) {
|
||||||
|
// Parcourir les données des modules du store
|
||||||
|
foreach ($store as $key => $value) {
|
||||||
|
if (empty($key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Mise à jour d'un module
|
||||||
|
// Le module est installé et une mise à jour est en ligne
|
||||||
|
if (
|
||||||
|
isset($infoModules[$key])
|
||||||
|
&&
|
||||||
|
version_compare($infoModules[$key]['version'], $value['version'], '<')
|
||||||
|
) {
|
||||||
|
$this->setData(['core', 'updateModuleAvailable', true], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Sauvegarde la base manuellement
|
||||||
|
$this->saveDB('core');
|
||||||
|
}
|
||||||
|
}
|
||||||
// Afficher le bouton : Mise à jour détectée + activée
|
// Afficher le bouton : Mise à jour détectée + activée
|
||||||
if ($this->getData(['core', 'updateAvailable'])) {
|
if ($this->getData(['core', 'updateAvailable'])) {
|
||||||
$rightItems .= '<li><a href="' . helper::baseUrl() . 'install/update" data-tippy-content="Mettre à jour Zwii ' . common::ZWII_VERSION . ' vers ' . helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) . '">' . template::ico('update colorRed') . '</a></li>';
|
$rightItems .= '<li><a href="' . helper::baseUrl() . 'install/update" data-tippy-content="Mettre à jour Zwii ' . common::ZWII_VERSION . ' vers ' . helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) . '">' . template::ico('update colorRed') . '</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($this->getData(['core', 'updateModuleAvailable'])) {
|
||||||
|
$rightItems .= '<li>' . template::ico('puzzle colorRed', [
|
||||||
|
'help' => 'Modules',
|
||||||
|
'href' => helper::baseUrl() . 'plugin'
|
||||||
|
]) . '</li>';
|
||||||
|
} else {
|
||||||
|
$rightItems .= '<li>' . template::ico('puzzle', [
|
||||||
|
'help' => 'Modules',
|
||||||
|
'href' => helper::baseUrl() . 'plugin'
|
||||||
|
]) . '</li>';
|
||||||
|
}
|
||||||
|
// Boutons depuis le rôle éditeur
|
||||||
if (
|
if (
|
||||||
$this->getUser('group') >= self::GROUP_EDITOR
|
$this->getUser('role') >= self::ROLE_EDITOR
|
||||||
&& $this->getUser('permission', 'user', 'edit')
|
&& $this->getUser('permission', 'user', 'edit')
|
||||||
|
|
||||||
) {
|
) {
|
||||||
@ -1188,7 +1272,6 @@ class layout extends common
|
|||||||
if ($style) {
|
if ($style) {
|
||||||
echo '<style type="text/css">' . helper::minifyCss(htmlspecialchars_decode($style)) . '</style>';
|
echo '<style type="text/css">' . helper::minifyCss(htmlspecialchars_decode($style)) . '</style>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1213,8 +1296,8 @@ class layout extends common
|
|||||||
$vars = 'var baseUrl = ' . json_encode(helper::baseUrl(false)) . ';';
|
$vars = 'var baseUrl = ' . json_encode(helper::baseUrl(false)) . ';';
|
||||||
$vars .= 'var baseUrlQs = ' . json_encode(helper::baseUrl()) . ';';
|
$vars .= 'var baseUrlQs = ' . json_encode(helper::baseUrl()) . ';';
|
||||||
if (
|
if (
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->isConnected() === true
|
||||||
and $this->getUser('group') >= self::GROUP_EDITOR
|
and $this->getUser('role') >= self::ROLE_EDITOR
|
||||||
) {
|
) {
|
||||||
$vars .= 'var privateKey = ' . json_encode(md5_file(self::DATA_DIR . 'core.json')) . ';';
|
$vars .= 'var privateKey = ' . json_encode(md5_file(self::DATA_DIR . 'core.json')) . ';';
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ class core extends common
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
// Token CSRF
|
// Token CSRF
|
||||||
if (empty($_SESSION['csrf'])) {
|
if (empty($_SESSION['csrf'])) {
|
||||||
$_SESSION['csrf'] = bin2hex(openssl_random_pseudo_bytes(128));
|
$_SESSION['csrf'] = bin2hex(openssl_random_pseudo_bytes(64));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fuseau horaire
|
// Fuseau horaire
|
||||||
@ -32,8 +32,6 @@ class core extends common
|
|||||||
}
|
}
|
||||||
// Date de la dernière suppression
|
// Date de la dernière suppression
|
||||||
$this->setData(['core', 'lastClearTmp', $lastClearTmp]);
|
$this->setData(['core', 'lastClearTmp', $lastClearTmp]);
|
||||||
// Enregistre les données
|
|
||||||
//$this->SaveData();
|
|
||||||
}
|
}
|
||||||
// Backup automatique des données
|
// Backup automatique des données
|
||||||
$lastBackup = mktime(0, 0, 0);
|
$lastBackup = mktime(0, 0, 0);
|
||||||
@ -142,7 +140,7 @@ class core extends common
|
|||||||
$css .= 'span.mce-text{background-color: unset !important;}';
|
$css .= 'span.mce-text{background-color: unset !important;}';
|
||||||
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
|
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
|
||||||
$css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
|
$css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
|
||||||
$css .= 'select,input[type=password],input[type=email],input[type=text],input[type=date],input[type=time],input[type=week],input[type=month],input[type=datetime-local],.inputFile,select,textarea{color:' . $this->getData(['theme', 'text', 'textColor']) . ';background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';}';
|
$css .= 'select,input[type=password],input[type=email],input[type=text],input[type=date],input[type=time],input[type=week],input[type=month],input[type=datetime-local],input[type=number],.inputFile,select,textarea{color:' . $this->getData(['theme', 'text', 'textColor']) . ';background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';}';
|
||||||
// spécifiques au module de blog
|
// spécifiques au module de blog
|
||||||
$css .= '.blogDate {color:' . $this->getData(['theme', 'text', 'textColor']) . ';}.blogPicture img{border:1px solid ' . $this->getData(['theme', 'text', 'textColor']) . '; box-shadow: 1px 1px 5px ' . $this->getData(['theme', 'text', 'textColor']) . ';}';
|
$css .= '.blogDate {color:' . $this->getData(['theme', 'text', 'textColor']) . ';}.blogPicture img{border:1px solid ' . $this->getData(['theme', 'text', 'textColor']) . '; box-shadow: 1px 1px 5px ' . $this->getData(['theme', 'text', 'textColor']) . ';}';
|
||||||
// Couleur fixée dans admin.css
|
// Couleur fixée dans admin.css
|
||||||
@ -170,7 +168,7 @@ class core extends common
|
|||||||
$colors = helper::colorVariants($this->getData(['theme', 'button', 'backgroundColor']));
|
$colors = helper::colorVariants($this->getData(['theme', 'button', 'backgroundColor']));
|
||||||
$css .= '.speechBubble,.button,.button:hover,button[type=submit],.pagination a,.pagination a:hover,input[type=checkbox]:checked + label:before,input[type=radio]:checked + label:before,.helpContent{background-color:' . $colors['normal'] . ';color:' . $colors['text'] . '}';
|
$css .= '.speechBubble,.button,.button:hover,button[type=submit],.pagination a,.pagination a:hover,input[type=checkbox]:checked + label:before,input[type=radio]:checked + label:before,.helpContent{background-color:' . $colors['normal'] . ';color:' . $colors['text'] . '}';
|
||||||
$css .= '.helpButton span{color:' . $colors['normal'] . '}';
|
$css .= '.helpButton span{color:' . $colors['normal'] . '}';
|
||||||
$css .= 'input[type=text]:hover,input[type=date]:hover,input[type=time]:hover,input[type=week]:hover,input[type=month]:hover,input[type=datetime-local]:hover,input[type=password]:hover,.inputFile:hover,select:hover,textarea:hover{border-color:' . $colors['normal'] . '}';
|
$css .= 'input[type=text]:hover,input[type=date]:hover,input[type=time]:hover,input[type=week]:hover,input[type=month]:hover,input[type=datetime-local]:hover,input[type=number]:hover,input[type=password]:hover,.inputFile:hover,select:hover,textarea:hover{border-color:' . $colors['normal'] . '}';
|
||||||
$css .= '.speechBubble:before{border-color:' . $colors['normal'] . ' transparent transparent transparent}';
|
$css .= '.speechBubble:before{border-color:' . $colors['normal'] . ' transparent transparent transparent}';
|
||||||
$css .= '.button:hover,button[type=submit]:hover,.pagination a:hover,input[type=checkbox]:not(:active):checked:hover + label:before,input[type=checkbox]:active + label:before,input[type=radio]:checked:hover + label:before,input[type=radio]:not(:checked):active + label:before{background-color:' . $colors['darken'] . '}';
|
$css .= '.button:hover,button[type=submit]:hover,.pagination a:hover,input[type=checkbox]:not(:active):checked:hover + label:before,input[type=checkbox]:active + label:before,input[type=radio]:checked:hover + label:before,input[type=radio]:not(:checked):active + label:before{background-color:' . $colors['darken'] . '}';
|
||||||
$css .= '.helpButton span:hover{color:' . $colors['darken'] . '}';
|
$css .= '.helpButton span:hover{color:' . $colors['darken'] . '}';
|
||||||
@ -253,6 +251,25 @@ class core extends common
|
|||||||
}
|
}
|
||||||
|
|
||||||
$css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) . ';font-family:' . $fonts[$this->getData(['theme', 'menu', 'font'])] . ';font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}';
|
$css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) . ';font-family:' . $fonts[$this->getData(['theme', 'menu', 'font'])] . ';font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}';
|
||||||
|
|
||||||
|
|
||||||
|
// Déterminer la hauteur max du menu pour éviter les débordements
|
||||||
|
// $padding = $this->getData(['theme', 'menu', 'height']); // Par exemple, "10px 20px"
|
||||||
|
// $fontSize = (float) $this->getData(['theme', 'text', 'fontSize']); // Taille de référence en pixels
|
||||||
|
// $menuFontSize = (float) $this->getData(['theme', 'menu', 'fontSize']); // Taille du menu en em
|
||||||
|
|
||||||
|
// Extraire la première valeur du padding (par exemple "10px 20px" -> "10px")
|
||||||
|
// $firstPadding = (float) explode(" ", $padding)[0]; // Nous prenons la première valeur, supposée être en px
|
||||||
|
|
||||||
|
// Convertir menuFontSize (en em) en pixels
|
||||||
|
// $menuFontSizeInPx = $menuFontSize * $fontSize;
|
||||||
|
|
||||||
|
// Calculer la hauteur totale
|
||||||
|
// $totalHeight = $firstPadding + $fontSize + $menuFontSizeInPx;
|
||||||
|
|
||||||
|
// Fixer la hauteur maximale de la barre de menu
|
||||||
|
// $css .= '#menuLeft, nav, a.active {max-height:' . $totalHeight . 'px}';
|
||||||
|
|
||||||
// Pied de page
|
// Pied de page
|
||||||
$colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor']));
|
$colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor']));
|
||||||
if ($this->getData(['theme', 'footer', 'margin'])) {
|
if ($this->getData(['theme', 'footer', 'margin'])) {
|
||||||
@ -364,7 +381,7 @@ class core extends common
|
|||||||
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}';
|
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}';
|
||||||
$colors = helper::colorVariants($this->getData(['admin', 'backgroundBlockColor']));
|
$colors = helper::colorVariants($this->getData(['admin', 'backgroundBlockColor']));
|
||||||
$css .= '.buttonTab, .block {border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}.buttonTab, .block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
|
$css .= '.buttonTab, .block {border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}.buttonTab, .block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
|
||||||
$css .= 'table tr,input[type=email],input[type=date],input[type=time],input[type=month],input[type=week],input[type=datetime-local],input[type=text],input[type=password],select:not(#barSelectCourse),select:not(#menuSelectCourse),select:not(#barSelectPage),textarea:not(.editorWysiwyg), textarea:not(.editorWysiwygComment),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}';
|
$css .= 'table tr,input[type=email],input[type=date],input[type=time],input[type=month],input[type=week],input[type=datetime-local],input[type=text],input[type=number],input[type=password],select:not(#barSelectLanguage),select:not(#barSelectPage),textarea:not(.editorWysiwyg), textarea:not(.editorWysiwygComment),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}';
|
||||||
// Bordure du contour TinyMCE
|
// Bordure du contour TinyMCE
|
||||||
$css .= '.mce-tinymce{border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . '!important;}';
|
$css .= '.mce-tinymce{border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . '!important;}';
|
||||||
// Enregistre la personnalisation
|
// Enregistre la personnalisation
|
||||||
@ -411,26 +428,43 @@ class core extends common
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sauvegarde la dernière page visitée par l'utilisateur connecté et enregistre l'historique des consultations
|
|
||||||
|
/*
|
||||||
|
* Récupère les statistiques de l'utilisateur non admin
|
||||||
|
* en dehors de home
|
||||||
|
* et si la connextion est nécessaire et que le membre est connecté
|
||||||
|
* stocke la progression dans la base des inscriptions
|
||||||
|
* */
|
||||||
if (
|
if (
|
||||||
|
// L'utilisateur est renseigné
|
||||||
$this->getUser('id')
|
$this->getUser('id')
|
||||||
|
// L'accueil ne stocke pas lea progression
|
||||||
&& common::$siteContent !== 'home'
|
&& common::$siteContent !== 'home'
|
||||||
|
// La page existe
|
||||||
&& in_array($this->getUrl(0), array_keys($this->getData(['page'])))
|
&& in_array($this->getUrl(0), array_keys($this->getData(['page'])))
|
||||||
// Le userId n'est pas celui d'un admis ni le prof du contenu
|
// L'espace dispose d'un accès nécessitant un compte
|
||||||
|
&& $this->getData(['course', self::$siteContent, 'enrolment']) > 0
|
||||||
|
// Le userId n'est pas celui d'un admis ni le compte d'un gestionnaire de cet espace
|
||||||
&& (
|
&& (
|
||||||
$this->getUser('group') < common::GROUP_ADMIN
|
$this->getUser('role') < common::ROLE_ADMIN
|
||||||
|| $this->getUser('id') !== $this->getData(['course', common::$siteContent, 'author'])
|
|| $this->getUser('id') !== $this->getData(['course', common::$siteContent, 'author'])
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
$course = new course();
|
||||||
|
|
||||||
|
// Met à jour la progression de l'utisateur et obtient le nombre de pages vues
|
||||||
|
$userProgress = $course->setUserProgress(self::$siteContent, $this->getUser('id'));
|
||||||
|
|
||||||
|
// Stockage dans les données d'inscription du membre
|
||||||
|
$this->setData(['enrolment', self::$siteContent, $this->getUser('id'), 'progress', $userProgress], false);
|
||||||
|
|
||||||
|
// Les rapports sont activés
|
||||||
// Stocke la dernière page vue et sa date de consultation
|
// Stocke la dernière page vue et sa date de consultation
|
||||||
$this->setData(['enrolment', common::$siteContent, $this->getUser('id'), 'lastPageView', $this->getUrl(0)]);
|
if ($this->getdata(['course', common::$siteContent, 'report']) === true) {
|
||||||
|
$this->setData(['enrolment', common::$siteContent, $this->getUser('id'), 'lastPageView', $this->getUrl(0)], false);
|
||||||
$this->setData(['enrolment', common::$siteContent, $this->getUser('id'), 'datePageView', time()]);
|
$this->setData(['enrolment', common::$siteContent, $this->getUser('id'), 'datePageView', time()]);
|
||||||
|
}
|
||||||
// Stocke le rapport en CSV
|
|
||||||
$file = fopen(common::DATA_DIR . common::$siteContent . '/report.csv', 'a+');
|
|
||||||
fputcsv($file, [$this->getUser('id'), $this->getUrl(0), time()], ';');
|
|
||||||
fclose($file);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Journalisation
|
// Journalisation
|
||||||
@ -438,8 +472,8 @@ class core extends common
|
|||||||
|
|
||||||
// Force la déconnexion des membres bannis ou d'une seconde session
|
// Force la déconnexion des membres bannis ou d'une seconde session
|
||||||
if (
|
if (
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->isConnected() === true
|
||||||
and ($this->getUser('group') === common::GROUP_BANNED
|
and ($this->getUser('role') === common::ROLE_BANNED
|
||||||
or ($_SESSION['csrf'] !== $this->getData(['user', $this->getUser('id'), 'accessCsrf'])
|
or ($_SESSION['csrf'] !== $this->getData(['user', $this->getUser('id'), 'accessCsrf'])
|
||||||
and $this->getData(['config', 'connect', 'autoDisconnect']) === true)
|
and $this->getData(['config', 'connect', 'autoDisconnect']) === true)
|
||||||
)
|
)
|
||||||
@ -452,9 +486,9 @@ class core extends common
|
|||||||
$this->getData(['config', 'maintenance'])
|
$this->getData(['config', 'maintenance'])
|
||||||
and in_array($this->getUrl(0), ['maintenance', 'user']) === false
|
and in_array($this->getUrl(0), ['maintenance', 'user']) === false
|
||||||
and $this->getUrl(1) !== 'login'
|
and $this->getUrl(1) !== 'login'
|
||||||
and ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and ($this->isConnected() === false
|
||||||
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
or ($this->isConnected() === true
|
||||||
and $this->getUser('group') < common::GROUP_ADMIN
|
and $this->getUser('role') < common::ROLE_ADMIN
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
@ -471,11 +505,11 @@ class core extends common
|
|||||||
$access = null;
|
$access = null;
|
||||||
if ($this->getData(['page', $this->getUrl(0)]) !== null) {
|
if ($this->getData(['page', $this->getUrl(0)]) !== null) {
|
||||||
if (
|
if (
|
||||||
$this->getData(['page', $this->getUrl(0), 'group']) === common::GROUP_VISITOR
|
$this->getData(['page', $this->getUrl(0), 'role']) === common::ROLE_VISITOR
|
||||||
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
or ($this->isConnected() === true
|
||||||
// and $this->getUser('group') >= $this->getData(['page', $this->getUrl(0), 'group'])
|
// and $this->getUser('role') >= $this->getData(['page', $this->getUrl(0), 'role'])
|
||||||
// Modification qui tient compte du profil de la page
|
// Modification qui tient compte du profil de la page
|
||||||
and ($this->getUser('group') * 10 + $this->getUser('profil')) >= ($this->getData(['page', $this->getUrl(0), 'group']) * 10 + $this->getData(['page', $this->getUrl(0), 'profil']))
|
and ($this->getUser('role') * 10 + $this->getUser('profil')) >= ($this->getData(['page', $this->getUrl(0), 'role']) * 10 + $this->getData(['page', $this->getUrl(0), 'profil']))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$access = true;
|
$access = true;
|
||||||
@ -489,10 +523,10 @@ class core extends common
|
|||||||
// Empêcher l'accès aux pages désactivées par URL directe
|
// Empêcher l'accès aux pages désactivées par URL directe
|
||||||
if (
|
if (
|
||||||
($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === false
|
||||||
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
||||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === true
|
||||||
and $this->getUser('group') < common::GROUP_EDITOR
|
and $this->getUser('role') < common::ROLE_EDITOR
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$access = false;
|
$access = false;
|
||||||
@ -505,6 +539,22 @@ class core extends common
|
|||||||
) {
|
) {
|
||||||
$access = false;
|
$access = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Empêche la consultation d'un espace laissé ouvert après la déconnexion et redirige vers home
|
||||||
|
* L'utilisateur n'est pas connecté
|
||||||
|
* ET l'accueil n'est pas affiché
|
||||||
|
* ET l'espace affiché nécessite un compte d'accès, enrolment vaut 1,2 ou 3
|
||||||
|
* */
|
||||||
|
|
||||||
|
if (
|
||||||
|
$this->isConnected() === false
|
||||||
|
and self::$siteContent !== 'home'
|
||||||
|
and $this->getData(['course', self::$siteContent, 'enrolment']) > 0
|
||||||
|
) {
|
||||||
|
$_SESSION['ZWII_SITE_CONTENT'] = 'home';
|
||||||
|
header('Location:' . helper::baseUrl(true) . 'swap/' . self::$siteContent);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -538,10 +588,11 @@ class core extends common
|
|||||||
}
|
}
|
||||||
// Accès concurrent stocke la page visitée
|
// Accès concurrent stocke la page visitée
|
||||||
if (
|
if (
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->isConnected() === true
|
||||||
&& $this->getUser('id')
|
&& $this->getUser('id')
|
||||||
|
&& !$this->isPost()
|
||||||
) {
|
) {
|
||||||
$this->setData(['user', $this->getUser('id'), 'accessUrl', $this->getUrl()]);
|
$this->setData(['user', $this->getUser('id'), 'accessUrl', $this->getUrl()], false);
|
||||||
$this->setData(['user', $this->getUser('id'), 'accessTimer', time()]);
|
$this->setData(['user', $this->getUser('id'), 'accessTimer', time()]);
|
||||||
}
|
}
|
||||||
// Breadcrumb
|
// Breadcrumb
|
||||||
@ -597,7 +648,6 @@ class core extends common
|
|||||||
'inlineStyle' => $inlineStyle,
|
'inlineStyle' => $inlineStyle,
|
||||||
'inlineScript' => $inlineScript,
|
'inlineScript' => $inlineScript,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
// Importe le module
|
// Importe le module
|
||||||
else {
|
else {
|
||||||
@ -655,11 +705,11 @@ class core extends common
|
|||||||
if (array_key_exists($action, $module::$actions)) {
|
if (array_key_exists($action, $module::$actions)) {
|
||||||
$module->$action();
|
$module->$action();
|
||||||
$output = $module->output;
|
$output = $module->output;
|
||||||
// Check le groupe de l'utilisateur
|
// Check le rôle de l'utilisateur
|
||||||
if (
|
if (
|
||||||
($module::$actions[$action] === common::GROUP_VISITOR
|
($module::$actions[$action] === common::ROLE_VISITOR
|
||||||
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
or ($this->isConnected() === true
|
||||||
and $this->getUser('group') >= $module::$actions[$action]
|
and $this->getUser('role') >= $module::$actions[$action]
|
||||||
and $this->getUser('permission', $moduleId, $action)
|
and $this->getUser('permission', $moduleId, $action)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -746,7 +796,7 @@ class core extends common
|
|||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'content' => ob_get_clean() . ($output['showPageContent'] ? $pageContent : '')
|
'content' => ob_get_clean() . ($output['showPageContent'] ? $pageContent : '')
|
||||||
]);
|
]);
|
||||||
} else if ($modpos === 'free') {
|
} elseif ($modpos === 'free' && strstr($pageContent, '[MODULE]')) {
|
||||||
if (strstr($pageContent, '[MODULE]', true) === false) {
|
if (strstr($pageContent, '[MODULE]', true) === false) {
|
||||||
$begin = strstr($pageContent, '[]', true);
|
$begin = strstr($pageContent, '[]', true);
|
||||||
} else {
|
} else {
|
||||||
@ -826,8 +876,7 @@ class core extends common
|
|||||||
|
|
||||||
// Pour éviter une 404, bascule dans l'espace correct si la page existe dans cet espace.
|
// Pour éviter une 404, bascule dans l'espace correct si la page existe dans cet espace.
|
||||||
// Parcourir les espaces y compris l'accueil
|
// Parcourir les espaces y compris l'accueil
|
||||||
foreach (array_merge(['home' => []], $this->getData(['course'])) as $courseId => $value) {
|
foreach (array_merge(['home' => []], $this->getData(['course'])) as $courseId => $value) {;
|
||||||
;
|
|
||||||
if (
|
if (
|
||||||
// l'espace existe
|
// l'espace existe
|
||||||
is_dir(common::DATA_DIR . $courseId) &&
|
is_dir(common::DATA_DIR . $courseId) &&
|
||||||
|
@ -128,7 +128,17 @@ class SitemapGenerator
|
|||||||
*/
|
*/
|
||||||
private $sampleRobotsLines = [
|
private $sampleRobotsLines = [
|
||||||
"User-agent: *",
|
"User-agent: *",
|
||||||
|
"Disallow: /",
|
||||||
|
"User-agent: Googlebot",
|
||||||
"Allow: /",
|
"Allow: /",
|
||||||
|
"User-agent: bingbot",
|
||||||
|
"Allow: /",
|
||||||
|
"User-agent: Slurp",
|
||||||
|
"Allow: /",
|
||||||
|
"User-agent: DuckDuckBot",
|
||||||
|
"Allow: /",
|
||||||
|
"User-agent: Baiduspider",
|
||||||
|
"Allow: /"
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
* @var array list of valid changefreq values according to the spec
|
* @var array list of valid changefreq values according to the spec
|
||||||
|
@ -224,7 +224,7 @@ class template
|
|||||||
* Crée un champ date
|
* Crée un champ date
|
||||||
* @param string $nameId Nom et id du champ
|
* @param string $nameId Nom et id du champ
|
||||||
* @param array $attributes Attributs ($key => $value)
|
* @param array $attributes Attributs ($key => $value)
|
||||||
* @param string type date time datetime-local month week
|
* @param string type date seule ; time heure seule ; datetime-local (jour et heure)
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function date($nameId, array $attributes = [])
|
public static function date($nameId, array $attributes = [])
|
||||||
@ -244,24 +244,49 @@ class template
|
|||||||
'placeholder' => '',
|
'placeholder' => '',
|
||||||
'readonly' => false,
|
'readonly' => false,
|
||||||
'value' => '',
|
'value' => '',
|
||||||
'type'=> 'date',
|
'type' => 'date',
|
||||||
|
'required' => false,
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Traduction de l'aide et de l'étiquette
|
// Traduction de l'aide et de l'étiquette
|
||||||
$attributes['label'] = helper::translate($attributes['label']);
|
$attributes['label'] = helper::translate($attributes['label']);
|
||||||
$attributes['help'] = helper::translate($attributes['help']);
|
$attributes['help'] = helper::translate($attributes['help']);
|
||||||
//$attributes['placeholder'] = helper::translate($attributes['placeholder']);
|
//$attributes['placeholder'] = helper::translate($attributes['placeholder']);
|
||||||
|
// Filtre selon le type
|
||||||
|
switch ($attributes['type']) {
|
||||||
|
case 'datetime-local':
|
||||||
|
$filter = helper::FILTER_TIMESTAMP;
|
||||||
|
break;
|
||||||
|
case 'date':
|
||||||
|
$filter = helper::FILTER_DATE; // Pour générer une valeur uniquement sur la date
|
||||||
|
break;
|
||||||
|
case 'time':
|
||||||
|
$filter = helper::FILTER_TIME; // Pour générer une valeur uniquement sur l'heure
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$filter = null; // pas de filtre pour month and year
|
||||||
|
break;
|
||||||
|
}
|
||||||
// Sauvegarde des données en cas d'erreur
|
// Sauvegarde des données en cas d'erreur
|
||||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||||
} else {
|
} else {
|
||||||
$attributes['value'] = ($attributes['value'] ? helper::filter($attributes['value'], helper::FILTER_TIMESTAMP) : '');
|
$attributes['value'] = ($attributes['value'] ? helper::filter($attributes['value'], $filter) : '');
|
||||||
|
}
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
}
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
if ($attributes['label']) {
|
if ($attributes['label']) {
|
||||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Notice
|
// Notice
|
||||||
@ -310,7 +335,9 @@ class template
|
|||||||
'name' => $nameId,
|
'name' => $nameId,
|
||||||
'type' => 2,
|
'type' => 2,
|
||||||
'value' => '',
|
'value' => '',
|
||||||
'language' => 'fr_FR'
|
'folder' => '',
|
||||||
|
'language' => 'fr_FR',
|
||||||
|
'required' => false,
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Traduction de l'aide et de l'étiquette
|
// Traduction de l'aide et de l'étiquette
|
||||||
$attributes['value'] = helper::translate($attributes['value']);
|
$attributes['value'] = helper::translate($attributes['value']);
|
||||||
@ -319,6 +346,13 @@ class template
|
|||||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||||
}
|
}
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Notice
|
// Notice
|
||||||
@ -331,7 +365,9 @@ class template
|
|||||||
// Label
|
// Label
|
||||||
if ($attributes['label']) {
|
if ($attributes['label']) {
|
||||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Champ caché contenant l'url de la page
|
// Champ caché contenant l'url de la page
|
||||||
@ -352,6 +388,8 @@ class template
|
|||||||
'&field_id=' . $attributes['id'] .
|
'&field_id=' . $attributes['id'] .
|
||||||
'&type=' . $attributes['type'] .
|
'&type=' . $attributes['type'] .
|
||||||
'&akey=' . md5_file(core::DATA_DIR . 'core.json') .
|
'&akey=' . md5_file(core::DATA_DIR . 'core.json') .
|
||||||
|
// Ajoute le nom du dossier si la variable est passée
|
||||||
|
(empty($attributes['folder']) ? '&fldr=/' : '&fldr=' . $attributes['folder']) .
|
||||||
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
|
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
|
||||||
. '"
|
. '"
|
||||||
class="inputFile %s %s"
|
class="inputFile %s %s"
|
||||||
@ -486,7 +524,7 @@ class template
|
|||||||
*/
|
*/
|
||||||
public static function flag($langId, $size = 'auto')
|
public static function flag($langId, $size = 'auto')
|
||||||
{
|
{
|
||||||
$lang = 'home';
|
$lang = 'fr_FR';
|
||||||
switch ($langId) {
|
switch ($langId) {
|
||||||
case '':
|
case '':
|
||||||
break;
|
break;
|
||||||
@ -496,6 +534,8 @@ class template
|
|||||||
case 'selected':
|
case 'selected':
|
||||||
if (isset($_SESSION['ZWII_SITE_CONTENT'])) {
|
if (isset($_SESSION['ZWII_SITE_CONTENT'])) {
|
||||||
$lang = $_SESSION['ZWII_SITE_CONTENT'];
|
$lang = $_SESSION['ZWII_SITE_CONTENT'];
|
||||||
|
} else {
|
||||||
|
$lang = 'fr_FR';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '<img class="flag" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $lang . '.png"
|
return '<img class="flag" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $lang . '.png"
|
||||||
@ -563,7 +603,8 @@ class template
|
|||||||
'name' => $nameId,
|
'name' => $nameId,
|
||||||
'placeholder' => '',
|
'placeholder' => '',
|
||||||
'readonly' => false,
|
'readonly' => false,
|
||||||
'value' => ''
|
'value' => '',
|
||||||
|
'required' => false,
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Traduction de l'aide et de l'étiquette
|
// Traduction de l'aide et de l'étiquette
|
||||||
$attributes['label'] = helper::translate($attributes['label']);
|
$attributes['label'] = helper::translate($attributes['label']);
|
||||||
@ -573,12 +614,21 @@ class template
|
|||||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||||
}
|
}
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
if ($attributes['label']) {
|
if ($attributes['label']) {
|
||||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Notice
|
// Notice
|
||||||
@ -631,18 +681,28 @@ class template
|
|||||||
//'maxlength' => '500',
|
//'maxlength' => '500',
|
||||||
'name' => $nameId,
|
'name' => $nameId,
|
||||||
'placeholder' => '',
|
'placeholder' => '',
|
||||||
'readonly' => false
|
'readonly' => false,
|
||||||
|
'required' => false,
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Traduction de l'aide et de l'étiquette
|
// Traduction de l'aide et de l'étiquette
|
||||||
$attributes['label'] = helper::translate($attributes['label']);
|
$attributes['label'] = helper::translate($attributes['label']);
|
||||||
//$attributes['placeholder'] = helper::translate($attributes['placeholder']);
|
//$attributes['placeholder'] = helper::translate($attributes['placeholder']);
|
||||||
$attributes['help'] = helper::translate($attributes['help']);
|
$attributes['help'] = helper::translate($attributes['help']);
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
if ($attributes['label']) {
|
if ($attributes['label']) {
|
||||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Notice
|
// Notice
|
||||||
@ -685,7 +745,8 @@ class template
|
|||||||
'name' => $nameId,
|
'name' => $nameId,
|
||||||
'selected' => '',
|
'selected' => '',
|
||||||
'font' => [],
|
'font' => [],
|
||||||
'multiple' => ''
|
'multiple' => '',
|
||||||
|
'required' => false,
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Traduction de l'aide et de l'étiquette
|
// Traduction de l'aide et de l'étiquette
|
||||||
$attributes['label'] = helper::translate($attributes['label']);
|
$attributes['label'] = helper::translate($attributes['label']);
|
||||||
@ -699,12 +760,21 @@ class template
|
|||||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||||
$attributes['selected'] = common::$inputBefore[$attributes['id']];
|
$attributes['selected'] = common::$inputBefore[$attributes['id']];
|
||||||
}
|
}
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
if ($attributes['label']) {
|
if ($attributes['label']) {
|
||||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Notice
|
// Notice
|
||||||
@ -748,6 +818,7 @@ class template
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crée une bulle de dialogue
|
* Crée une bulle de dialogue
|
||||||
* @param string $text Texte de la bulle
|
* @param string $text Texte de la bulle
|
||||||
@ -813,6 +884,10 @@ class template
|
|||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="tableWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="tableWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Début tableau
|
// Début tableau
|
||||||
$html .= '<table id="' . $attributes['id'] . '" class="table ' . $attributes['class'] . '">';
|
$html .= '<table id="' . $attributes['id'] . '" class="table ' . $attributes['class'] . '">';
|
||||||
|
// Pas de tableau d'Id transmis, générer une numérotation
|
||||||
|
if (empty($rowsId)) {
|
||||||
|
$rowsId = range(0, count($cols));
|
||||||
|
}
|
||||||
// Entêtes
|
// Entêtes
|
||||||
if ($head) {
|
if ($head) {
|
||||||
// Début des entêtes
|
// Début des entêtes
|
||||||
@ -820,21 +895,17 @@ class template
|
|||||||
$html .= '<tr class="nodrag">';
|
$html .= '<tr class="nodrag">';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($head as $th) {
|
foreach ($head as $th) {
|
||||||
$html .= '<th class="col' . $cols[$i++] . '">' . $th . '</th>';
|
$html .= '<th id="' . $rowsId[$i] . '" class="col' . $cols[$i++] . '">' . $th . '</th>';
|
||||||
}
|
}
|
||||||
// Fin des entêtes
|
// Fin des entêtes
|
||||||
$html .= '</tr>';
|
$html .= '</tr>';
|
||||||
$html .= '</thead>';
|
$html .= '</thead>';
|
||||||
}
|
}
|
||||||
// Pas de tableau d'Id transmis, générer une numérotation
|
|
||||||
if (empty($rowsId)) {
|
|
||||||
$rowsId = range(0, count($body));
|
|
||||||
}
|
|
||||||
// Début contenu
|
// Début contenu
|
||||||
$j = 0;
|
$j = 0;
|
||||||
foreach ($body as $tr) {
|
foreach ($body as $tr) {
|
||||||
// Id de ligne pour les tableaux drag and drop
|
// Id de ligne pour les tableaux drag and drop
|
||||||
$html .= '<tr id="' . $rowsId[$j++] . '">';
|
$html .= '<tr>';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($tr as $td) {
|
foreach ($tr as $td) {
|
||||||
$html .= '<td class="col' . $cols[$i++] . '">' . $td . '</td>';
|
$html .= '<td class="col' . $cols[$i++] . '">' . $td . '</td>';
|
||||||
@ -875,7 +946,8 @@ class template
|
|||||||
'placeholder' => '',
|
'placeholder' => '',
|
||||||
'readonly' => false,
|
'readonly' => false,
|
||||||
'value' => '',
|
'value' => '',
|
||||||
'type' => 'text'
|
'type' => 'text',
|
||||||
|
'required' => false,
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Traduction de l'aide et de l'étiquette
|
// Traduction de l'aide et de l'étiquette
|
||||||
$attributes['label'] = helper::translate($attributes['label']);
|
$attributes['label'] = helper::translate($attributes['label']);
|
||||||
@ -885,12 +957,21 @@ class template
|
|||||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||||
}
|
}
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
if ($attributes['label']) {
|
if ($attributes['label']) {
|
||||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Notice
|
// Notice
|
||||||
@ -902,7 +983,7 @@ class template
|
|||||||
$html .= self::notice($attributes['id'], $notice);
|
$html .= self::notice($attributes['id'], $notice);
|
||||||
// Texte
|
// Texte
|
||||||
$html .= sprintf(
|
$html .= sprintf(
|
||||||
'<input type="' . $attributes['type']. '" %s>',
|
'<input type="' . $attributes['type'] . '" %s>',
|
||||||
helper::sprintAttributes($attributes)
|
helper::sprintAttributes($attributes)
|
||||||
);
|
);
|
||||||
// Fin du wrapper
|
// Fin du wrapper
|
||||||
@ -911,6 +992,117 @@ class template
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Génère un champ de saisie de type number (input[type="number"])
|
||||||
|
*
|
||||||
|
* Cette méthode crée un champ numérique HTML complet avec son wrapper,
|
||||||
|
* son label et ses messages d'aide/erreur. Elle gère automatiquement
|
||||||
|
* la conversion des valeurs en nombres et les contraintes de validation.
|
||||||
|
*
|
||||||
|
* @param string $nameId Identifiant unique du champ, utilisé pour name et id
|
||||||
|
* @param array $attributes Tableau des attributs du champ avec les clés suivantes :
|
||||||
|
* @type boolean $before Active la récupération des données précédentes en cas d'erreur (défaut: true)
|
||||||
|
* @type string $class Classes CSS additionnelles pour l'input (défaut: '')
|
||||||
|
* @type string $classWrapper Classes CSS additionnelles pour le wrapper (défaut: '')
|
||||||
|
* @type boolean $noDirty Désactive le marquage dirty du champ (défaut: false)
|
||||||
|
* @type boolean $disabled Désactive le champ (défaut: false)
|
||||||
|
* @type string $help Texte d'aide affiché sous le label (défaut: '')
|
||||||
|
* @type string $label Texte du label (défaut: '')
|
||||||
|
* @type string $placeholder Texte de placeholder (défaut: '')
|
||||||
|
* @type boolean $readonly Rend le champ en lecture seule (défaut: false)
|
||||||
|
* @type mixed $value Valeur initiale du champ (défaut: '')
|
||||||
|
* @type number $min Valeur minimum autorisée (défaut: null)
|
||||||
|
* @type number $max Valeur maximum autorisée (défaut: null)
|
||||||
|
* @type number $step Pas d'incrémentation (ex: 1 pour entiers, 0.01 pour prix) (défaut: null)
|
||||||
|
* @type string $pattern Expression régulière de validation (défaut: null)
|
||||||
|
*
|
||||||
|
* @return string Code HTML du champ number complet
|
||||||
|
*/
|
||||||
|
public static function number($nameId, array $attributes = [])
|
||||||
|
{
|
||||||
|
// Attributs par défaut spécifiques aux champs numériques
|
||||||
|
$attributes = array_merge([
|
||||||
|
'type' => 'number',
|
||||||
|
'before' => true,
|
||||||
|
'class' => '',
|
||||||
|
'classWrapper' => '',
|
||||||
|
'noDirty' => false,
|
||||||
|
'disabled' => false,
|
||||||
|
'help' => '',
|
||||||
|
'id' => $nameId,
|
||||||
|
'label' => '',
|
||||||
|
'name' => $nameId,
|
||||||
|
'placeholder' => '',
|
||||||
|
'readonly' => false,
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'min' => null,
|
||||||
|
'max' => null,
|
||||||
|
'step' => null,
|
||||||
|
'pattern' => null
|
||||||
|
], $attributes);
|
||||||
|
|
||||||
|
// Conversion de la valeur en nombre si elle n'est pas vide
|
||||||
|
if ($attributes['value'] !== '') {
|
||||||
|
$attributes['value'] = floatval($attributes['value']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nettoyage des attributs null pour ne pas les afficher dans le HTML
|
||||||
|
foreach (['min', 'max', 'step', 'pattern'] as $attr) {
|
||||||
|
if ($attributes[$attr] === null) {
|
||||||
|
unset($attributes[$attr]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Traduction de l'aide et de l'étiquette
|
||||||
|
$attributes['label'] = helper::translate($attributes['label']);
|
||||||
|
$attributes['help'] = helper::translate($attributes['help']);
|
||||||
|
|
||||||
|
// Sauvegarde des données en cas d'erreur
|
||||||
|
if ($attributes['before'] && array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||||
|
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Début du wrapper
|
||||||
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
|
|
||||||
|
// Label
|
||||||
|
if ($attributes['label']) {
|
||||||
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Notice
|
||||||
|
$notice = '';
|
||||||
|
if (array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||||
|
$notice = common::$inputNotices[$attributes['id']];
|
||||||
|
$attributes['class'] .= ' notice';
|
||||||
|
}
|
||||||
|
$html .= self::notice($attributes['id'], $notice);
|
||||||
|
|
||||||
|
// Input number
|
||||||
|
$html .= sprintf(
|
||||||
|
'<input type="number" %s>',
|
||||||
|
helper::sprintAttributes($attributes)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Fin du wrapper
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crée un champ texte long
|
* Crée un champ texte long
|
||||||
* @param string $nameId Nom et id du champ
|
* @param string $nameId Nom et id du champ
|
||||||
@ -932,7 +1124,8 @@ class template
|
|||||||
//'maxlength' => '500',
|
//'maxlength' => '500',
|
||||||
'name' => $nameId,
|
'name' => $nameId,
|
||||||
'readonly' => false,
|
'readonly' => false,
|
||||||
'value' => ''
|
'value' => '',
|
||||||
|
'required' => false,
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Traduction de l'aide et de l'étiquette
|
// Traduction de l'aide et de l'étiquette
|
||||||
$attributes['label'] = helper::translate($attributes['label']);
|
$attributes['label'] = helper::translate($attributes['label']);
|
||||||
@ -941,12 +1134,21 @@ class template
|
|||||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||||
}
|
}
|
||||||
|
// Gestion du champ obligatoire
|
||||||
|
if (isset($attributes['required']) && $attributes['required']) {
|
||||||
|
// Affiche l'astérisque dans le label
|
||||||
|
$required = ' required-field';
|
||||||
|
// Ajoute l'attribut required au champ input
|
||||||
|
$attributes['required'] = 'required';
|
||||||
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
if ($attributes['label']) {
|
if ($attributes['label']) {
|
||||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help'],
|
||||||
|
// Ajoute la classe required-field si le champ est obligatoire
|
||||||
|
'class' => isset($required) ? $required : ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Notice
|
// Notice
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -116,30 +116,14 @@ core.confirm = function (text, yesCallback, noCallback) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Scripts à exécuter en dernier
|
* Scripts à exécuter en dernier
|
||||||
*/
|
|
||||||
core.end = function () {
|
core.end = function () {
|
||||||
/**
|
|
||||||
* Modifications non enregistrées du formulaire
|
|
||||||
*/
|
|
||||||
var formDOM = $("form");
|
|
||||||
// Ignore :
|
|
||||||
// - TinyMCE car il gère lui même le message
|
|
||||||
// - Les champs avec data-no-dirty
|
|
||||||
var inputsDOM = formDOM.find("input:not([data-no-dirty]), select:not([data-no-dirty]), textarea:not(.editorWysiwyg):not([data-no-dirty])");
|
|
||||||
var inputSerialize = inputsDOM.serialize();
|
|
||||||
$(window).on("beforeunload", function () {
|
|
||||||
if (inputsDOM.serialize() !== inputSerialize) {
|
|
||||||
message = "<?php echo helper::translate('Les modifications que vous avez apportées ne seront peut-être pas enregistrées.');?>";
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
formDOM.submit(function () {
|
|
||||||
$(window).off("beforeunload");
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
$(function () {
|
$(function () {
|
||||||
core.end();
|
core.end();
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajoute une notice
|
* Ajoute une notice
|
||||||
@ -216,15 +200,15 @@ core.start = function () {
|
|||||||
// Variables des cookies
|
// Variables des cookies
|
||||||
var getUrl = window.location;
|
var getUrl = window.location;
|
||||||
var domain = "domain=" + getUrl.hostname + ";";
|
var domain = "domain=" + getUrl.hostname + ";";
|
||||||
|
var basePath = getUrl.pathname.substring(0, getUrl.pathname.lastIndexOf('/') + 1);
|
||||||
|
var path = "path=" + basePath + ";";
|
||||||
var e = new Date();
|
var e = new Date();
|
||||||
e.setFullYear(e.getFullYear() + 1);
|
e.setFullYear(e.getFullYear() + 1);
|
||||||
var expires = "expires=" + e.toUTCString();
|
var expires = "expires=" + e.toUTCString() + ";";
|
||||||
|
|
||||||
// Stocke le cookie d'acceptation
|
// Stocke le cookie d'acceptation
|
||||||
document.cookie = "ZWII_COOKIE_CONSENT=true;samesite=strict;" + domain + expires;
|
document.cookie = "ZWII_COOKIE_CONSENT=true; samesite=lax; " + domain + path + expires;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fermeture de la popup des cookies
|
* Fermeture de la popup des cookies
|
||||||
*/
|
*/
|
||||||
@ -253,8 +237,6 @@ core.start = function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Choix de page dans la barre de membre
|
* Choix de page dans la barre de membre
|
||||||
*/
|
*/
|
||||||
@ -372,8 +354,32 @@ core.start = function () {
|
|||||||
}
|
}
|
||||||
}).trigger("resize");
|
}).trigger("resize");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Masque les pages du menu si demandé dans la configuration du thème du menu sauf dans home
|
||||||
|
*/
|
||||||
|
// Option active
|
||||||
|
var hidePages = "<?php echo $this->getData(['theme', 'menu', 'hidePages'])?>";
|
||||||
|
|
||||||
|
if (hidePages == 1) {
|
||||||
|
// Récupérer les valeurs de dimensions
|
||||||
|
var padding = "<?php echo $this->getData(['theme', 'menu', 'height'])?>";
|
||||||
|
var firstPadding = parseFloat(padding.split(" ")[0]); // Convertir la première valeur en nombre
|
||||||
|
var fontSize = parseFloat("<?php echo $this->getData(['theme', 'text', 'fontSize'])?>"); // Taille du texte
|
||||||
|
var menuFontSize = parseFloat("<?php echo $this->getData(['theme', 'menu', 'fontSize'])?>"); // Taille du menu
|
||||||
|
|
||||||
|
// Convertir menuFontSize en pixels
|
||||||
|
var menuFontSizeInPx = menuFontSize * fontSize;
|
||||||
|
|
||||||
|
// Calculer la hauteur totale
|
||||||
|
var totalHeight = firstPadding + fontSize + menuFontSizeInPx;
|
||||||
|
$("#menuLeft").css({
|
||||||
|
"visibility": "hidden",
|
||||||
|
"max-width": "10px"
|
||||||
|
});
|
||||||
|
|
||||||
|
// Par défaut pour tous les thèmes.
|
||||||
|
$("#menuLeft").css("max-height", totalHeight + "px").css("min-height", totalHeight + "px");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
436
core/core.php
436
core/core.php
@ -8,7 +8,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -24,13 +24,13 @@ class common
|
|||||||
const DISPLAY_LAYOUT_BLANK = 3;
|
const DISPLAY_LAYOUT_BLANK = 3;
|
||||||
const DISPLAY_LAYOUT_MAIN = 4;
|
const DISPLAY_LAYOUT_MAIN = 4;
|
||||||
const DISPLAY_LAYOUT_LIGHT = 5;
|
const DISPLAY_LAYOUT_LIGHT = 5;
|
||||||
const GROUP_BANNED = -1;
|
const ROLE_BANNED = -1;
|
||||||
const GROUP_VISITOR = 0;
|
const ROLE_VISITOR = 0;
|
||||||
const GROUP_MEMBER = 1;
|
const ROLE_MEMBER = 1;
|
||||||
const GROUP_EDITOR = 2;
|
const ROLE_EDITOR = 2;
|
||||||
// Groupe MODERATOR, compatibilité avec les anciens modules :
|
// Groupe MODERATOR, compatibilité avec les anciens modules :
|
||||||
const GROUP_MODERATOR = 2;
|
const ROLE_MODERATOR = 2;
|
||||||
const GROUP_ADMIN = 3;
|
const ROLE_ADMIN = 3;
|
||||||
const SIGNATURE_ID = 1;
|
const SIGNATURE_ID = 1;
|
||||||
const SIGNATURE_PSEUDO = 2;
|
const SIGNATURE_PSEUDO = 2;
|
||||||
const SIGNATURE_FIRSTLASTNAME = 3;
|
const SIGNATURE_FIRSTLASTNAME = 3;
|
||||||
@ -51,7 +51,7 @@ class common
|
|||||||
const ACCESS_TIMER = 1800;
|
const ACCESS_TIMER = 1800;
|
||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '1.10.06';
|
const ZWII_VERSION = '1.21.03';
|
||||||
|
|
||||||
// URL autoupdate
|
// URL autoupdate
|
||||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/';
|
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/';
|
||||||
@ -72,6 +72,9 @@ class common
|
|||||||
const COURSE_ENROLMENT_SELF_KEY = 2; // Ouvert à tous les membres disposant de la clé
|
const COURSE_ENROLMENT_SELF_KEY = 2; // Ouvert à tous les membres disposant de la clé
|
||||||
const COURSE_ENROLMENT_MANDATORY = 3;
|
const COURSE_ENROLMENT_MANDATORY = 3;
|
||||||
|
|
||||||
|
// Taille et rotation des journaux
|
||||||
|
const LOG_MAXSIZE = 4 * 1024 * 1024;
|
||||||
|
const LOG_MAXARCHIVE = 5;
|
||||||
|
|
||||||
public static $actions = [];
|
public static $actions = [];
|
||||||
public static $coreModuleIds = [
|
public static $coreModuleIds = [
|
||||||
@ -144,29 +147,29 @@ class common
|
|||||||
],
|
],
|
||||||
'view' => ''
|
'view' => ''
|
||||||
];
|
];
|
||||||
public static $groups = [
|
public static $roles = [
|
||||||
self::GROUP_BANNED => 'Banni',
|
self::ROLE_BANNED => 'Banni',
|
||||||
self::GROUP_VISITOR => 'Visiteur',
|
self::ROLE_VISITOR => 'Visiteur',
|
||||||
self::GROUP_MEMBER => 'Étudiant',
|
self::ROLE_MEMBER => 'Étudiant',
|
||||||
self::GROUP_EDITOR => 'Formateur',
|
self::ROLE_EDITOR => 'Formateur',
|
||||||
self::GROUP_ADMIN => 'Administrateur'
|
self::ROLE_ADMIN => 'Administrateur'
|
||||||
];
|
];
|
||||||
public static $groupEdits = [
|
public static $roleEdits = [
|
||||||
self::GROUP_BANNED => 'Banni',
|
self::ROLE_BANNED => 'Banni',
|
||||||
self::GROUP_MEMBER => 'Étudiant',
|
self::ROLE_MEMBER => 'Étudiant',
|
||||||
self::GROUP_EDITOR => 'Formateur',
|
self::ROLE_EDITOR => 'Formateur',
|
||||||
self::GROUP_ADMIN => 'Administrateur'
|
self::ROLE_ADMIN => 'Administrateur'
|
||||||
];
|
];
|
||||||
public static $groupNews = [
|
public static $roleNews = [
|
||||||
self::GROUP_MEMBER => 'Étudiant',
|
self::ROLE_MEMBER => 'Étudiant',
|
||||||
self::GROUP_EDITOR => 'Formateur',
|
self::ROLE_EDITOR => 'Formateur',
|
||||||
self::GROUP_ADMIN => 'Administrateur'
|
self::ROLE_ADMIN => 'Administrateur'
|
||||||
];
|
];
|
||||||
public static $groupPublics = [
|
public static $rolePublics = [
|
||||||
self::GROUP_VISITOR => 'Visiteur',
|
self::ROLE_VISITOR => 'Visiteur',
|
||||||
self::GROUP_MEMBER => 'Étudiant',
|
self::ROLE_MEMBER => 'Étudiant',
|
||||||
self::GROUP_EDITOR => 'Formateur',
|
self::ROLE_EDITOR => 'Formateur',
|
||||||
self::GROUP_ADMIN => 'Administrateur'
|
self::ROLE_ADMIN => 'Administrateur'
|
||||||
];
|
];
|
||||||
|
|
||||||
//Langues de l'UI
|
//Langues de l'UI
|
||||||
@ -174,8 +177,11 @@ class common
|
|||||||
public static $dialog;
|
public static $dialog;
|
||||||
// Langue de l'interface sélectionnée
|
// Langue de l'interface sélectionnée
|
||||||
public static $i18nUI = 'fr_FR';
|
public static $i18nUI = 'fr_FR';
|
||||||
// Langues de contenu
|
|
||||||
|
// Espace, contenu sélectionné
|
||||||
public static $siteContent = 'home';
|
public static $siteContent = 'home';
|
||||||
|
// Progression d'un participant
|
||||||
|
// public static $userProgress = '';
|
||||||
|
|
||||||
public static $languages = [
|
public static $languages = [
|
||||||
'de' => 'Deutsch',
|
'de' => 'Deutsch',
|
||||||
@ -199,20 +205,20 @@ class common
|
|||||||
// Descripteur de données Entrées / Sorties
|
// Descripteur de données Entrées / Sorties
|
||||||
// Liste ici tous les fichiers de données
|
// Liste ici tous les fichiers de données
|
||||||
public $dataFiles = [
|
public $dataFiles = [
|
||||||
'admin' => '',
|
'admin' => null,
|
||||||
'blacklist' => '',
|
'blacklist' => null,
|
||||||
'config' => '',
|
'config' => null,
|
||||||
'core' => '',
|
'core' => null,
|
||||||
'course' => '',
|
'course' => null,
|
||||||
'font' => '',
|
'font' => null,
|
||||||
'module' => '',
|
'module' => null,
|
||||||
'page' => '',
|
'page' => null,
|
||||||
'theme' => '',
|
'theme' => null,
|
||||||
'user' => '',
|
'user' => null,
|
||||||
'language' => '',
|
'language' => null,
|
||||||
'profil' => '',
|
'profil' => null,
|
||||||
'enrolment' => '',
|
'enrolment' => null,
|
||||||
'category' => '',
|
'category' => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
private $configFiles = [
|
private $configFiles = [
|
||||||
@ -320,29 +326,58 @@ class common
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Construct cache
|
||||||
|
if (isset($GLOBALS['common_construct'])) {
|
||||||
|
$this->input['_POST'] = $GLOBALS['common_construct']['input']['_POST'];
|
||||||
|
$this->input['_COOKIE'] = $GLOBALS['common_construct']['input']['_COOKIE'];
|
||||||
|
self::$siteContent = $GLOBALS['common_construct']['siteContent'];
|
||||||
|
$this->dataFiles = $GLOBALS['common_construct']['dataFiles'];
|
||||||
|
$this->configFiles = $GLOBALS['common_construct']['configFiles'];
|
||||||
|
$this->user = $GLOBALS['common_construct']['user'];
|
||||||
|
self::$i18nUI = $GLOBALS['common_construct']['i18nUI'];
|
||||||
|
$this->hierarchy = $GLOBALS['common_construct']['hierarchy'];
|
||||||
|
$this->url = $GLOBALS['common_construct']['url'];
|
||||||
|
self::$dialog = $GLOBALS['common_construct']['dialog'];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Extraction des données http
|
// Extraction des données http
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$this->input['_POST'] = $_POST;
|
$this->input['_POST'] = $_POST;
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['input']['_POST'] = $this->input['_POST'];
|
||||||
}
|
}
|
||||||
if (isset($_COOKIE)) {
|
if (isset($_COOKIE)) {
|
||||||
$this->input['_COOKIE'] = $_COOKIE;
|
$this->input['_COOKIE'] = $_COOKIE;
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['input']['_COOKIE'] = $this->input['_COOKIE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Déterminer le contenu du site
|
// Déterminer le contenu du site
|
||||||
if (isset($_SESSION['ZWII_SITE_CONTENT'])) {
|
if (isset($_SESSION['ZWII_SITE_CONTENT'])) {
|
||||||
// Déterminé par la session présente
|
// Déterminé par la session présente
|
||||||
self::$siteContent = $_SESSION['ZWII_SITE_CONTENT'];
|
self::$siteContent = $_SESSION['ZWII_SITE_CONTENT'];
|
||||||
|
} else {
|
||||||
|
$_SESSION['ZWII_SITE_CONTENT'] = 'home';
|
||||||
|
self::$siteContent = 'home';
|
||||||
}
|
}
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['siteContent'] = self::$siteContent;
|
||||||
|
|
||||||
// Instanciation de la classe des entrées / sorties
|
// Instanciation de la classe des entrées / sorties
|
||||||
// Les fichiers de configuration
|
// Les fichiers de configuration
|
||||||
foreach ($this->configFiles as $module => $value) {
|
foreach ($this->configFiles as $module => $value) {
|
||||||
$this->initDB($module);
|
$this->initDB($module);
|
||||||
}
|
}
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['configFiles'] = $this->configFiles;
|
||||||
// Les fichiers des contenus
|
// Les fichiers des contenus
|
||||||
foreach ($this->contentFiles as $module => $value) {
|
foreach ($this->contentFiles as $module => $value) {
|
||||||
$this->initDB($module, self::$siteContent);
|
$this->initDB($module, self::$siteContent);
|
||||||
}
|
}
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['dataFiles'] = $this->dataFiles;
|
||||||
|
|
||||||
|
|
||||||
// Installation fraîche, initialisation de la configuration inexistante
|
// Installation fraîche, initialisation de la configuration inexistante
|
||||||
// Nécessaire pour le constructeur
|
// Nécessaire pour le constructeur
|
||||||
@ -361,13 +396,14 @@ class common
|
|||||||
$this->initData($stageId, self::$siteContent);
|
$this->initData($stageId, self::$siteContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Récupère un utilisateur connecté
|
// Récupère un utilisateur connecté
|
||||||
if ($this->user === []) {
|
if ($this->user === []) {
|
||||||
$this->user = $this->getData(['user', $this->getInput('ZWII_USER_ID')]);
|
$this->user = $this->getData(['user', $this->getInput('ZWII_USER_ID')]);
|
||||||
}
|
}
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['user'] = $this->user;
|
||||||
|
|
||||||
// Langue de l'administration si le user est connecté
|
// Langue de l'administration si le user est connecté
|
||||||
if ($this->getData(['user', $this->getUser('id'), 'language'])) {
|
if ($this->getData(['user', $this->getUser('id'), 'language'])) {
|
||||||
@ -378,25 +414,36 @@ class common
|
|||||||
? self::$i18nUI
|
? self::$i18nUI
|
||||||
: 'fr_FR';
|
: 'fr_FR';
|
||||||
} else {
|
} else {
|
||||||
if (isset($_SESSION['ZWII_UI'])) {
|
// Par défaut la langue définie par défaut à l'installation
|
||||||
self::$i18nUI = $_SESSION['ZWII_UI'];
|
if ($this->getData(['config', 'defaultLanguageUI'])) {
|
||||||
} elseif (isset($_COOKIE['ZWII_UI'])) {
|
self::$i18nUI = $this->getData(['config', 'defaultLanguageUI']);
|
||||||
self::$i18nUI = $_COOKIE['ZWII_UI'];
|
|
||||||
} else {
|
} else {
|
||||||
self::$i18nUI = 'fr_FR';
|
self::$i18nUI = 'fr_FR';
|
||||||
|
$this->setData(['config', 'defaultLanguageUI', 'fr_FR']);
|
||||||
}
|
}
|
||||||
$_SESSION['ZWII_UI'] = self::$i18nUI;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stocker le cookie de langue pour l'éditeur de texte ainsi que l'url du contenu pour le theme
|
// Stocker le cookie de langue pour l'éditeur de texte ainsi que l'url du contenu pour le theme
|
||||||
setcookie('ZWII_UI', self::$i18nUI, time() + 3600, '', '', false, false);
|
setcookie('ZWII_UI', self::$i18nUI, [
|
||||||
|
'expires' => time() + 3600,
|
||||||
|
'path' => helper::baseUrl(false, false),
|
||||||
|
'domain' => '',
|
||||||
|
'secure' => false,
|
||||||
|
'httponly' => false,
|
||||||
|
'samesite' => 'Lax' // Vous pouvez aussi utiliser 'Strict' ou 'None'
|
||||||
|
]);
|
||||||
// Stocker l'courseId pour le thème de TinyMCE
|
// Stocker l'courseId pour le thème de TinyMCE
|
||||||
setcookie('ZWII_SITE_CONTENT', self::$siteContent, time() + 3600, '', '', false, false);
|
//setcookie('ZWII_SITE_CONTENT', self::$siteContent, time() + 3600, '', '', false, false);
|
||||||
setlocale(LC_ALL, self::$i18nUI);
|
setlocale(LC_ALL, self::$i18nUI);
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['i18nUI'] = self::$i18nUI;
|
||||||
|
|
||||||
// Construit la liste des pages parents/enfants
|
// Construit la liste des pages parents/enfants
|
||||||
if ($this->hierarchy['all'] === []) {
|
if ($this->hierarchy['all'] === []) {
|
||||||
$this->buildHierarchy();
|
$this->buildHierarchy();
|
||||||
}
|
}
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['hierarchy'] = $this->hierarchy;
|
||||||
|
|
||||||
// Construit l'url
|
// Construit l'url
|
||||||
if ($this->url === '') {
|
if ($this->url === '') {
|
||||||
@ -406,6 +453,8 @@ class common
|
|||||||
$this->url = $this->homePageId();
|
$this->url = $this->homePageId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['url'] = $this->url;
|
||||||
|
|
||||||
// Chargement des dialogues
|
// Chargement des dialogues
|
||||||
if (!file_exists(self::I18N_DIR . self::$i18nUI . '.json')) {
|
if (!file_exists(self::I18N_DIR . self::$i18nUI . '.json')) {
|
||||||
@ -425,6 +474,8 @@ class common
|
|||||||
self::$dialog = array_merge(self::$dialog, $d);
|
self::$dialog = array_merge(self::$dialog, $d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Cache
|
||||||
|
$GLOBALS['common_construct']['dialog'] = self::$dialog;
|
||||||
|
|
||||||
// Données de proxy
|
// Données de proxy
|
||||||
$proxy = $this->getData(['config', 'proxyType']) . $this->getData(['config', 'proxyUrl']) . ':' . $this->getData(['config', 'proxyPort']);
|
$proxy = $this->getData(['config', 'proxyType']) . $this->getData(['config', 'proxyUrl']) . ':' . $this->getData(['config', 'proxyPort']);
|
||||||
@ -448,12 +499,9 @@ class common
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Mise à jour des données core
|
// Mise à jour des données core
|
||||||
include ('core/include/update.inc.php');
|
include('core/include/update.inc.php');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajoute les valeurs en sortie
|
* Ajoute les valeurs en sortie
|
||||||
* @param array $output Valeurs en sortie
|
* @param array $output Valeurs en sortie
|
||||||
@ -498,7 +546,7 @@ class common
|
|||||||
public function deleteData($keys)
|
public function deleteData($keys)
|
||||||
{
|
{
|
||||||
// Descripteur de la base
|
// Descripteur de la base
|
||||||
$db = $this->dataFiles[$keys[0]];
|
$db = (object) $this->dataFiles[$keys[0]];
|
||||||
// Initialisation de la requête par le nom de la base
|
// Initialisation de la requête par le nom de la base
|
||||||
$query = $keys[0];
|
$query = $keys[0];
|
||||||
// Construire la requête
|
// Construire la requête
|
||||||
@ -507,14 +555,16 @@ class common
|
|||||||
}
|
}
|
||||||
// Effacer la donnée
|
// Effacer la donnée
|
||||||
$success = $db->delete($query, true);
|
$success = $db->delete($query, true);
|
||||||
return is_object($success);
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sauvegarde des données
|
* Sauvegarde des données
|
||||||
* @param array $keys Clé(s) des données
|
* @param array $keys Clé(s) des données
|
||||||
|
* @param bool $save Indique si le fichier doit être sauvegardé après modification (par défaut true)
|
||||||
|
* @return bool Succès de l'opération
|
||||||
*/
|
*/
|
||||||
public function setData($keys = [])
|
public function setData($keys = [], $save = true)
|
||||||
{
|
{
|
||||||
// Pas d'enregistrement lorsqu'une notice est présente ou tableau transmis vide
|
// Pas d'enregistrement lorsqu'une notice est présente ou tableau transmis vide
|
||||||
if (
|
if (
|
||||||
@ -534,7 +584,7 @@ class common
|
|||||||
// Construire la requête dans la base inf à 1 retourner toute la base
|
// Construire la requête dans la base inf à 1 retourner toute la base
|
||||||
if (count($keys) >= 1) {
|
if (count($keys) >= 1) {
|
||||||
// Descripteur de la base
|
// Descripteur de la base
|
||||||
$db = $this->dataFiles[$keys[0]];
|
$db = (object) $this->dataFiles[$keys[0]];
|
||||||
$query = $keys[0];
|
$query = $keys[0];
|
||||||
// Construire la requête
|
// Construire la requête
|
||||||
// Ne pas tenir compte du dernier élément qui une une value donc <
|
// Ne pas tenir compte du dernier élément qui une une value donc <
|
||||||
@ -542,11 +592,12 @@ class common
|
|||||||
$query .= '.' . $keys[$i];
|
$query .= '.' . $keys[$i];
|
||||||
}
|
}
|
||||||
// Appliquer la modification, le dernier élément étant la donnée à sauvegarder
|
// Appliquer la modification, le dernier élément étant la donnée à sauvegarder
|
||||||
$success = is_object($db->set($query, $keys[count($keys) - 1], true));
|
$success = $db->set($query, $keys[count($keys) - 1], $save);
|
||||||
}
|
}
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accède aux données
|
* Accède aux données
|
||||||
* @param array $keys Clé(s) des données
|
* @param array $keys Clé(s) des données
|
||||||
@ -557,7 +608,7 @@ class common
|
|||||||
// Eviter une requete vide
|
// Eviter une requete vide
|
||||||
if (count($keys) >= 1) {
|
if (count($keys) >= 1) {
|
||||||
// descripteur de la base
|
// descripteur de la base
|
||||||
$db = $this->dataFiles[$keys[0]];
|
$db = (object) $this->dataFiles[$keys[0]];
|
||||||
$query = $keys[0];
|
$query = $keys[0];
|
||||||
// Construire la requête
|
// Construire la requête
|
||||||
for ($i = 1; $i < count($keys); $i++) {
|
for ($i = 1; $i < count($keys); $i++) {
|
||||||
@ -616,7 +667,7 @@ class common
|
|||||||
* Écrit les données dans un fichier avec plusieurs tentatives d'écriture et verrouillage
|
* Écrit les données dans un fichier avec plusieurs tentatives d'écriture et verrouillage
|
||||||
*
|
*
|
||||||
* @param string $filename Le nom du fichier
|
* @param string $filename Le nom du fichier
|
||||||
* @param array $data Les données à écrire dans le fichier
|
* @param string $data Les données à écrire dans le fichier
|
||||||
* @param int $flags Les drapeaux optionnels à passer à la fonction $this->secure_file_put_contents
|
* @param int $flags Les drapeaux optionnels à passer à la fonction $this->secure_file_put_contents
|
||||||
* @return bool True si l'écriture a réussi, sinon false
|
* @return bool True si l'écriture a réussi, sinon false
|
||||||
*/
|
*/
|
||||||
@ -626,45 +677,59 @@ class common
|
|||||||
// Initialise le compteur de tentatives
|
// Initialise le compteur de tentatives
|
||||||
$attempts = 0;
|
$attempts = 0;
|
||||||
|
|
||||||
// Convertit les données en chaîne de caractères
|
|
||||||
$serialized_data = serialize($data);
|
|
||||||
|
|
||||||
// Vérifie la longueur des données
|
// Vérifie la longueur des données
|
||||||
$data_length = strlen($serialized_data);
|
$data_length = strlen($data);
|
||||||
|
|
||||||
// Effectue jusqu'à 5 tentatives d'écriture
|
// Effectue jusqu'à 5 tentatives d'écriture
|
||||||
while ($attempts < 5) {
|
while ($attempts < 5) {
|
||||||
// Essaye d'écrire les données dans le fichier avec verrouillage exclusif
|
// Essaye d'écrire les données dans le fichier avec verrouillage exclusif
|
||||||
$write_result = file_put_contents($filename, $data, LOCK_EX | $flags);
|
$write_result = file_put_contents($filename, $data, LOCK_EX | $flags);
|
||||||
|
|
||||||
|
// $now = \DateTime::createFromFormat('U.u', microtime(true));
|
||||||
|
// file_put_contents("tmplog.txt", '[SecurePut][' . $now->format('H:i:s.u') . ']' . "\r\n", FILE_APPEND);
|
||||||
|
|
||||||
// Vérifie si l'écriture a réussi
|
// Vérifie si l'écriture a réussi
|
||||||
if ($write_result !== false && $write_result === $data_length) {
|
if ($write_result !== false && $write_result === $data_length) {
|
||||||
// Sort de la boucle si l'écriture a réussi
|
// Sort de la boucle si l'écriture a réussi
|
||||||
return true;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Incrémente le compteur de tentatives
|
// Incrémente le compteur de tentatives
|
||||||
$attempts++;
|
$attempts++;
|
||||||
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
// Etat de l'écriture
|
||||||
// Échec de l'écriture après plusieurs tentatives
|
return ($attempts < 5);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function initDB($module, $path = '')
|
public function initDB($module, $path = '')
|
||||||
{
|
{
|
||||||
// Instanciation de la classe des entrées / sorties
|
// Chemin complet vers le fichier JSON
|
||||||
// Constructeur JsonDB;
|
$dir = empty($path) ? self::DATA_DIR : self::DATA_DIR . $path . '/';
|
||||||
$this->dataFiles[$module] = new \Prowebcraft\JsonDb([
|
$config = [
|
||||||
'name' => $module . '.json',
|
'name' => $module . '.json',
|
||||||
'dir' => empty($path) ? self::DATA_DIR : self::DATA_DIR . $path . '/',
|
'dir' => $dir,
|
||||||
'backup' => file_exists('site/data/.backup')
|
'backup' => file_exists('site/data/.backup'),
|
||||||
]);
|
'update' => false,
|
||||||
|
];
|
||||||
|
|
||||||
|
// Instanciation de l'objet et stockage dans dataFiles
|
||||||
|
$this->dataFiles[$module] = new \Prowebcraft\JsonDb($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cette fonction est liée à saveData
|
||||||
|
* @param mixed $module
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function saveDB($module): void
|
||||||
|
{
|
||||||
|
$db = (object) $this->dataFiles[$module];
|
||||||
|
$db->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialisation des données sur un contenu ou la page d'accueil
|
* Initialisation des données sur un contenu ou la page d'accueil
|
||||||
* @param string $course : id du module à générer
|
* @param string $course : id du module à générer
|
||||||
@ -676,7 +741,7 @@ class common
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Tableau avec les données vierges
|
// Tableau avec les données vierges
|
||||||
require_once ('core/module/install/ressource/defaultdata.php');
|
require_once('core/module/install/ressource/defaultdata.php');
|
||||||
|
|
||||||
// L'arborescence
|
// L'arborescence
|
||||||
if (!file_exists(self::DATA_DIR . $path)) {
|
if (!file_exists(self::DATA_DIR . $path)) {
|
||||||
@ -696,12 +761,11 @@ class common
|
|||||||
if ($module === 'page') {
|
if ($module === 'page') {
|
||||||
$content = $path === 'home' ? init::$siteContent : init::$courseContent;
|
$content = $path === 'home' ? init::$siteContent : init::$courseContent;
|
||||||
foreach ($content as $key => $value) {
|
foreach ($content as $key => $value) {
|
||||||
$this->setPage($key, $value, $path);
|
$this->setPage($key, $value['content'], $path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
common::$coreNotices[] = $module;
|
common::$coreNotices[] = $module;
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Initialisation des données
|
* Initialisation des données
|
||||||
@ -711,7 +775,7 @@ class common
|
|||||||
public function saveConfig($module)
|
public function saveConfig($module)
|
||||||
{
|
{
|
||||||
// Tableau avec les données vierges
|
// Tableau avec les données vierges
|
||||||
require_once ('core/module/install/ressource/defaultdata.php');
|
require_once('core/module/install/ressource/defaultdata.php');
|
||||||
// Installation des données des autres modules cad theme profil font config, admin et core
|
// Installation des données des autres modules cad theme profil font config, admin et core
|
||||||
$this->setData([$module, init::$defaultData[$module]]);
|
$this->setData([$module, init::$defaultData[$module]]);
|
||||||
common::$coreNotices[] = $module;
|
common::$coreNotices[] = $module;
|
||||||
@ -747,7 +811,7 @@ class common
|
|||||||
* Fonction pour construire le tableau des pages
|
* Fonction pour construire le tableau des pages
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function buildHierarchy()
|
public function buildHierarchy()
|
||||||
{
|
{
|
||||||
|
|
||||||
$pages = helper::arrayColumn($this->getData(['page']), 'position', 'SORT_ASC');
|
$pages = helper::arrayColumn($this->getData(['page']), 'position', 'SORT_ASC');
|
||||||
@ -757,11 +821,11 @@ class common
|
|||||||
// Page parent
|
// Page parent
|
||||||
$this->getData(['page', $pageId, 'parentPageId']) === ""
|
$this->getData(['page', $pageId, 'parentPageId']) === ""
|
||||||
// Ignore les pages dont l'utilisateur n'a pas accès
|
// Ignore les pages dont l'utilisateur n'a pas accès
|
||||||
and ($this->getData(['page', $pageId, 'group']) === self::GROUP_VISITOR
|
and ($this->getData(['page', $pageId, 'role']) === self::ROLE_VISITOR
|
||||||
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
or ($this->getUser('authKey') === $this->getInput('ZWII_AUTH_KEY')
|
||||||
//and $this->getUser('group') >= $this->getData(['page', $pageId, 'group'])
|
//and $this->getUser('role') >= $this->getData(['page', $pageId, 'role'])
|
||||||
// Modification qui tient compte du profil de la page
|
// Modification qui tient compte du profil de la page
|
||||||
and ($this->getUser('group') * self::MAX_PROFILS + $this->getUser('profil')) >= ($this->getData(['page', $pageId, 'group']) * self::MAX_PROFILS + $this->getData(['page', $pageId, 'profil']))
|
and ($this->getUser('role') * self::MAX_PROFILS + $this->getUser('profil')) >= ($this->getData(['page', $pageId, 'role']) * self::MAX_PROFILS + $this->getData(['page', $pageId, 'profil']))
|
||||||
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -784,14 +848,14 @@ class common
|
|||||||
// Ignore les pages dont l'utilisateur n'a pas accès
|
// Ignore les pages dont l'utilisateur n'a pas accès
|
||||||
and (
|
and (
|
||||||
(
|
(
|
||||||
$this->getData(['page', $pageId, 'group']) === self::GROUP_VISITOR
|
$this->getData(['page', $pageId, 'role']) === self::ROLE_VISITOR
|
||||||
and
|
and
|
||||||
$this->getData(['page', $parentId, 'group']) === self::GROUP_VISITOR
|
$this->getData(['page', $parentId, 'role']) === self::ROLE_VISITOR
|
||||||
)
|
)
|
||||||
or (
|
or (
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->getUser('authKey') === $this->getInput('ZWII_AUTH_KEY')
|
||||||
and
|
and
|
||||||
$this->getUser('group') * self::MAX_PROFILS + $this->getUser('profil')) >= ($this->getData(['page', $pageId, 'group']) * self::MAX_PROFILS + $this->getData(['page', $pageId, 'profil'])
|
$this->getUser('role') * self::MAX_PROFILS + $this->getUser('profil')) >= ($this->getData(['page', $pageId, 'role']) * self::MAX_PROFILS + $this->getData(['page', $pageId, 'profil'])
|
||||||
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -956,7 +1020,9 @@ class common
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Accède à l'utilisateur connecté
|
* Accède à l'utilisateur connecté
|
||||||
* @param int $key Clé de la valeur
|
* @param string $key Clé de la valeur
|
||||||
|
* @param mixed $perm1
|
||||||
|
* @param mixed $perm2
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getUser($key, $perm1 = null, $perm2 = null)
|
public function getUser($key, $perm1 = null, $perm2 = null)
|
||||||
@ -976,45 +1042,56 @@ class common
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne les permissions de l'utilisateur connecté
|
* Retourne les permissions de l'utilisateur connecté
|
||||||
* @param int $key Clé de la valeur du groupe
|
* @param int $key Clé de la valeur du rôle
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getPermission($key1, $key2 = null)
|
public function getPermission($key1, $key2 = null)
|
||||||
{
|
{
|
||||||
// Administrateur, toutes les permissions
|
// Administrateur, toutes les permissions
|
||||||
if ($this->getUser('group') === self::GROUP_ADMIN) {
|
if ($this->getUser('role') === self::ROLE_ADMIN) {
|
||||||
return true;
|
return true;
|
||||||
} elseif ($this->getUser('group') <= self::GROUP_VISITOR) { // Groupe sans autorisation
|
} elseif ($this->getUser('role') <= self::ROLE_VISITOR) { // Groupe sans autorisation
|
||||||
return false;
|
return false;
|
||||||
} elseif (
|
} elseif (
|
||||||
// Groupe avec profil, consultation des autorisations sur deux clés
|
// Groupe avec profil, consultation des autorisations sur deux clés
|
||||||
$key1
|
$key1
|
||||||
&& $key2
|
&& $key2
|
||||||
&& $this->user
|
&& $this->user
|
||||||
&& $this->getData(['profil', $this->user['group'], $this->user['profil'], $key1])
|
&& $this->getData(['profil', $this->user['role'], $this->user['profil'], $key1])
|
||||||
&& array_key_exists($key2, $this->getData(['profil', $this->user['group'], $this->user['profil'], $key1]))
|
&& array_key_exists($key2, $this->getData(['profil', $this->user['role'], $this->user['profil'], $key1]))
|
||||||
) {
|
) {
|
||||||
return $this->getData(['profil', $this->user['group'], $this->user['profil'], $key1, $key2]);
|
return $this->getData(['profil', $this->user['role'], $this->user['profil'], $key1, $key2]);
|
||||||
// Groupe avec profil, consultation des autorisations sur une seule clé
|
// Groupe avec profil, consultation des autorisations sur une seule clé
|
||||||
} elseif (
|
} elseif (
|
||||||
$key1
|
$key1
|
||||||
&& $this->user
|
&& $this->user
|
||||||
&& $this->getData(['profil', $this->user['group'], $this->user['profil']])
|
&& $this->getData(['profil', $this->user['role'], $this->user['profil']])
|
||||||
&& array_key_exists($key1, $this->getData(['profil', $this->user['group'], $this->user['profil']]))
|
&& array_key_exists($key1, $this->getData(['profil', $this->user['role'], $this->user['profil']]))
|
||||||
) {
|
) {
|
||||||
return $this->getData(['profil', $this->user['group'], $this->user['profil'], $key1]);
|
return $this->getData(['profil', $this->user['role'], $this->user['profil'], $key1]);
|
||||||
} else {
|
} else {
|
||||||
// Une permission non spécifiée dans le profil est autorisée selon la valeur de $actions
|
// Une permission non spécifiée dans le profil est autorisée selon la valeur de $actions
|
||||||
if (class_exists($key1)) {
|
if (class_exists($key1)) {
|
||||||
$module = new $key1;
|
$module = new $key1;
|
||||||
if (array_key_exists($key2, $module::$actions)) {
|
if (array_key_exists($key2, $module::$actions)) {
|
||||||
return $this->getUser('group') >= $module::$actions[$key2];
|
return $this->getUser('role') >= $module::$actions[$key2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool l'utilisateur est connecté true sinon false
|
||||||
|
*/
|
||||||
|
public function isConnected()
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
!empty($this->getUser('authKey'))
|
||||||
|
&&
|
||||||
|
$this->getUser('authKey') === $this->getInput('ZWII_AUTH_KEY'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check qu'une valeur est transmise par la méthode _POST
|
* Check qu'une valeur est transmise par la méthode _POST
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -1054,6 +1131,7 @@ class common
|
|||||||
* @param string Valeurs possibles
|
* @param string Valeurs possibles
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public function updateSitemap()
|
public function updateSitemap()
|
||||||
{
|
{
|
||||||
// Le drapeau prend true quand au moins une page est trouvée
|
// Le drapeau prend true quand au moins une page est trouvée
|
||||||
@ -1091,7 +1169,7 @@ class common
|
|||||||
foreach ($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
foreach ($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
||||||
// Exclure les barres et les pages non publiques et les pages masquées
|
// Exclure les barres et les pages non publiques et les pages masquées
|
||||||
if (
|
if (
|
||||||
$this->getData(['page', $parentPageId, 'group']) !== 0 ||
|
$this->getData(['page', $parentPageId, 'role']) !== 0 ||
|
||||||
$this->getData(['page', $parentPageId, 'block']) === 'bar'
|
$this->getData(['page', $parentPageId, 'block']) === 'bar'
|
||||||
) {
|
) {
|
||||||
continue;
|
continue;
|
||||||
@ -1119,7 +1197,7 @@ class common
|
|||||||
}
|
}
|
||||||
// Sous-pages
|
// Sous-pages
|
||||||
foreach ($childrenPageIds as $childKey) {
|
foreach ($childrenPageIds as $childKey) {
|
||||||
if ($this->getData(['page', $childKey, 'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
|
if ($this->getData(['page', $childKey, 'role']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Cas de la page d'accueil ne pas dupliquer l'URL
|
// Cas de la page d'accueil ne pas dupliquer l'URL
|
||||||
@ -1170,26 +1248,38 @@ class common
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (file_exists('sitemap.xml') && file_exists('robots.txt'));
|
return (file_exists('sitemap.xml') && file_exists('robots.txt'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Création d'une miniature
|
/**
|
||||||
* Fonction utilisée lors de la mise à jour d'une version 9 à une version 10
|
* Crée une miniature à partir d'une image source.
|
||||||
* @param string $src image source
|
* Cette fonction prend en charge les formats raster (JPEG, PNG, GIF, WebP, AVIF) et vectoriels (SVG).
|
||||||
* @param string $dets image destination
|
* Pour les images vectorielles (SVG), aucune redimension n'est effectuée : une copie est réalisée.
|
||||||
* @param integer $desired_width largeur demandée
|
*
|
||||||
|
* @param string $src Chemin de l'image source.
|
||||||
|
* @param string $dest Chemin de l'image destination (avec le nom du fichier et l'extension).
|
||||||
|
* @param int $desired_width Largeur demandée pour la miniature (ignorée pour les SVG).
|
||||||
|
* @return bool True si l'opération a réussi, false sinon.
|
||||||
*/
|
*/
|
||||||
function makeThumb($src, $dest, $desired_width)
|
function makeThumb($src, $dest, $desired_width)
|
||||||
{
|
{
|
||||||
// Vérifier l'existence du dossier de destination.
|
// Vérifier l'existence du dossier de destination.
|
||||||
$fileInfo = pathinfo($dest);
|
$fileInfo = pathinfo($dest);
|
||||||
if (!is_dir($fileInfo['dirname'])) {
|
if (!is_dir($fileInfo['dirname'])) {
|
||||||
mkdir($fileInfo['dirname'], 0755, true);
|
mkdir($fileInfo['dirname'], 0755, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$extension = strtolower($fileInfo['extension']);
|
||||||
|
$mime_type = mime_content_type($src);
|
||||||
|
|
||||||
|
// Gestion des fichiers SVG (copie simple sans redimensionnement)
|
||||||
|
if ($extension === 'svg' || $mime_type === 'image/svg+xml') {
|
||||||
|
return copy($src, $dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chargement de l'image source selon le type
|
||||||
$source_image = '';
|
$source_image = '';
|
||||||
// Type d'image
|
switch ($extension) {
|
||||||
switch ($fileInfo['extension']) {
|
|
||||||
case 'jpeg':
|
case 'jpeg':
|
||||||
case 'jpg':
|
case 'jpg':
|
||||||
$source_image = imagecreatefromjpeg($src);
|
$source_image = imagecreatefromjpeg($src);
|
||||||
@ -1204,35 +1294,51 @@ class common
|
|||||||
$source_image = imagecreatefromwebp($src);
|
$source_image = imagecreatefromwebp($src);
|
||||||
break;
|
break;
|
||||||
case 'avif':
|
case 'avif':
|
||||||
|
if (function_exists('imagecreatefromavif')) {
|
||||||
$source_image = imagecreatefromavif($src);
|
$source_image = imagecreatefromavif($src);
|
||||||
|
} else {
|
||||||
|
return false; // AVIF non supporté
|
||||||
}
|
}
|
||||||
// Image valide
|
break;
|
||||||
if ($source_image) {
|
default:
|
||||||
|
return false; // Format non pris en charge
|
||||||
|
}
|
||||||
|
|
||||||
|
// Image valide (formats raster uniquement)
|
||||||
|
if (is_resource($source_image) || (is_object($source_image) && $source_image instanceof GdImage)) {
|
||||||
$width = imagesx($source_image);
|
$width = imagesx($source_image);
|
||||||
$height = imagesy($source_image);
|
$height = imagesy($source_image);
|
||||||
/* find the "desired height" of this thumbnail, relative to the desired width */
|
|
||||||
|
// Calcul de la hauteur proportionnelle à la largeur demandée
|
||||||
$desired_height = floor($height * ($desired_width / $width));
|
$desired_height = floor($height * ($desired_width / $width));
|
||||||
/* create a new, "virtual" image */
|
|
||||||
|
// Création d'une nouvelle image virtuelle redimensionnée
|
||||||
$virtual_image = imagecreatetruecolor($desired_width, $desired_height);
|
$virtual_image = imagecreatetruecolor($desired_width, $desired_height);
|
||||||
/* copy source image at a resized size */
|
|
||||||
|
// Copie de l'image source dans l'image virtuelle avec redimensionnement
|
||||||
imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height);
|
imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height);
|
||||||
switch (mime_content_type($src)) {
|
|
||||||
|
// Enregistrement de l'image redimensionnée au format approprié
|
||||||
|
switch ($mime_type) {
|
||||||
case 'image/jpeg':
|
case 'image/jpeg':
|
||||||
case 'image/jpg':
|
case 'image/jpg':
|
||||||
return (imagejpeg($virtual_image, $dest));
|
return imagejpeg($virtual_image, $dest);
|
||||||
case 'image/png':
|
case 'image/png':
|
||||||
return (imagepng($virtual_image, $dest));
|
return imagepng($virtual_image, $dest);
|
||||||
case 'image/gif':
|
case 'image/gif':
|
||||||
return (imagegif($virtual_image, $dest));
|
return imagegif($virtual_image, $dest);
|
||||||
case 'image/webp':
|
case 'image/webp':
|
||||||
return (imagewebp($virtual_image, $dest));
|
return imagewebp($virtual_image, $dest);
|
||||||
case 'image/avif':
|
case 'image/avif':
|
||||||
return (imageavif($virtual_image, $dest));
|
if (function_exists('imageavif')) {
|
||||||
}
|
return imageavif($virtual_image, $dest);
|
||||||
} else {
|
|
||||||
return (false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false; // En cas d'échec
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1439,18 +1545,67 @@ class common
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Journalisation
|
* Journalisation avec gestion de la taille maximale et compression
|
||||||
*/
|
*/
|
||||||
public function saveLog($message = '')
|
public function saveLog($message = '')
|
||||||
{
|
{
|
||||||
// Journalisation
|
// Chemin du fichier journal
|
||||||
$dataLog = helper::dateUTF8('%Y%m%d', time(), self::$i18nUI) . ';' . helper::dateUTF8('%H:%M', time(), self::$i18nUI) . ';';
|
$logFile = self::DATA_DIR . 'journal.log';
|
||||||
|
|
||||||
|
// Vérifier la taille du fichier
|
||||||
|
if (file_exists($logFile) && filesize($logFile) > self::LOG_MAXSIZE) {
|
||||||
|
$this->rotateLogFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Création de l'entrée de journal
|
||||||
|
$dataLog = helper::dateUTF8('%Y%m%d', time(), self::$i18nUI) . ';' .
|
||||||
|
helper::dateUTF8('%H:%M', time(), self::$i18nUI) . ';';
|
||||||
$dataLog .= helper::getIp($this->getData(['config', 'connect', 'anonymousIp'])) . ';';
|
$dataLog .= helper::getIp($this->getData(['config', 'connect', 'anonymousIp'])) . ';';
|
||||||
$dataLog .= empty($this->getUser('id')) ? 'visitor;' : $this->getUser('id') . ';';
|
$dataLog .= empty($this->getUser('id')) ? 'visitor;' : $this->getUser('id') . ';';
|
||||||
$dataLog .= $message ? $this->getUrl() . ';' . $message : $this->getUrl();
|
$dataLog .= $message ? $this->getUrl() . ';' . $message : $this->getUrl();
|
||||||
$dataLog .= PHP_EOL;
|
$dataLog .= PHP_EOL;
|
||||||
|
|
||||||
|
// Écriture dans le fichier si la journalisation est activée
|
||||||
if ($this->getData(['config', 'connect', 'log'])) {
|
if ($this->getData(['config', 'connect', 'log'])) {
|
||||||
file_put_contents(self::DATA_DIR . 'journal.log', $dataLog, FILE_APPEND);
|
file_put_contents($logFile, $dataLog, FILE_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gère la rotation et la compression des fichiers journaux
|
||||||
|
*/
|
||||||
|
private function rotateLogFile()
|
||||||
|
{
|
||||||
|
$logFile = self::DATA_DIR . 'journal.log';
|
||||||
|
|
||||||
|
// Décaler tous les fichiers d'archive existants
|
||||||
|
for ($i = self::LOG_MAXARCHIVE - 1; $i > 0; $i--) {
|
||||||
|
$oldFile = self::DATA_DIR . 'journal-' . $i . '.log.gz';
|
||||||
|
$newFile = self::DATA_DIR . 'journal-' . ($i + 1) . '.log.gz';
|
||||||
|
|
||||||
|
if (file_exists($oldFile)) {
|
||||||
|
if ($i == self::LOG_MAXARCHIVE - 1) {
|
||||||
|
unlink($oldFile); // Supprimer le plus ancien
|
||||||
|
} else {
|
||||||
|
rename($oldFile, $newFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Compresser le fichier journal actuel
|
||||||
|
if (file_exists($logFile)) {
|
||||||
|
$gz = gzopen(self::DATA_DIR . 'journal-1.log.gz', 'w9');
|
||||||
|
$handle = fopen($logFile, 'r');
|
||||||
|
|
||||||
|
while (!feof($handle)) {
|
||||||
|
gzwrite($gz, fread($handle, 8192));
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose($handle);
|
||||||
|
gzclose($gz);
|
||||||
|
|
||||||
|
// Créer un nouveau fichier journal vide
|
||||||
|
file_put_contents($logFile, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1460,7 +1615,7 @@ class common
|
|||||||
* Retourne les contenus d'un utilisateur
|
* Retourne les contenus d'un utilisateur
|
||||||
* @param string $userId identifiant
|
* @param string $userId identifiant
|
||||||
* @param string $serStatus teacher ou student ou admin
|
* @param string $serStatus teacher ou student ou admin
|
||||||
*
|
* @return array
|
||||||
* CETTE FONCTION EST UTILISEE PAR LAYOUT
|
* CETTE FONCTION EST UTILISEE PAR LAYOUT
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -1469,11 +1624,11 @@ class common
|
|||||||
$courses = $this->getData([('course')]);
|
$courses = $this->getData([('course')]);
|
||||||
$courses = helper::arraycolumn($courses, 'title', 'SORT_ASC');
|
$courses = helper::arraycolumn($courses, 'title', 'SORT_ASC');
|
||||||
$filter = array();
|
$filter = array();
|
||||||
switch ($this->getUser('group')) {
|
switch ($this->getUser('role')) {
|
||||||
case self::GROUP_ADMIN:
|
case self::ROLE_ADMIN:
|
||||||
// Affiche tout
|
// Affiche tout
|
||||||
return $courses;
|
return $courses;
|
||||||
case self::GROUP_EDITOR:
|
case self::ROLE_EDITOR:
|
||||||
foreach ($courses as $courseId => $value) {
|
foreach ($courses as $courseId => $value) {
|
||||||
// Affiche les espaces gérés par l'éditeur, les espaces où il participe et les espaces anonymes
|
// Affiche les espaces gérés par l'éditeur, les espaces où il participe et les espaces anonymes
|
||||||
if (
|
if (
|
||||||
@ -1488,7 +1643,7 @@ class common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $filter;
|
return $filter;
|
||||||
case self::GROUP_MEMBER:
|
case self::ROLE_MEMBER:
|
||||||
foreach ($courses as $courseId => $value) {
|
foreach ($courses as $courseId => $value) {
|
||||||
// Affiche les espaces du participant et les espaces anonymes
|
// Affiche les espaces du participant et les espaces anonymes
|
||||||
if (
|
if (
|
||||||
@ -1499,7 +1654,7 @@ class common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $filter;
|
return $filter;
|
||||||
case self::GROUP_VISITOR:
|
case self::ROLE_VISITOR:
|
||||||
foreach ($courses as $courseId => $value) {
|
foreach ($courses as $courseId => $value) {
|
||||||
// Affiche les espaces anonymes
|
// Affiche les espaces anonymes
|
||||||
if ($this->getData(['course', $courseId, 'enrolment']) === self::COURSE_ENROLMENT_GUEST) {
|
if ($this->getData(['course', $courseId, 'enrolment']) === self::COURSE_ENROLMENT_GUEST) {
|
||||||
@ -1508,7 +1663,7 @@ class common
|
|||||||
}
|
}
|
||||||
return $filter;
|
return $filter;
|
||||||
default:
|
default:
|
||||||
return null;
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1530,5 +1685,4 @@ class common
|
|||||||
return $this->getData(['user', $userId, 'firstname']);
|
return $this->getData(['user', $userId, 'firstname']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -3,20 +3,17 @@
|
|||||||
/**
|
/**
|
||||||
* Vérification de la version de PHP
|
* Vérification de la version de PHP
|
||||||
*/
|
*/
|
||||||
|
if (version_compare(PHP_VERSION, '7.2.0', '<')) {
|
||||||
if(version_compare(PHP_VERSION, '7.2.0', '<') ) {
|
displayErrorPage('PHP 7.2+ mini requis - PHP 7.2+ mini required');
|
||||||
exit('PHP 7.2+ mini requis - PHP 7.2+ mini required');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( version_compare(PHP_VERSION, '8.3.999', '>') ) {
|
if (version_compare(PHP_VERSION, '8.3.999', '>')) {
|
||||||
exit('PHP 8.3 pas encore supporté, installez PHP 7.n ou PHP 8.1.n - PHP 8.3 not yet supported, install PHP 7.n or PHP 8.1.n');
|
displayErrorPage('PHP 8.3 pas encore supporté, installez PHP 7.n ou PHP 8.1.n - PHP 8.3 not yet supported, install PHP 7.n or PHP 8.1.n');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check les modules installés
|
* Check les modules installés
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$e = [
|
$e = [
|
||||||
'gd',
|
'gd',
|
||||||
'json',
|
'json',
|
||||||
@ -31,18 +28,22 @@ $e = [
|
|||||||
];
|
];
|
||||||
$m = get_loaded_extensions();
|
$m = get_loaded_extensions();
|
||||||
$b = false;
|
$b = false;
|
||||||
|
$missingModules = [];
|
||||||
foreach ($e as $k => $v) {
|
foreach ($e as $k => $v) {
|
||||||
if (array_search($v,$m) === false) {
|
if (array_search($v, $m) === false) {
|
||||||
$b = true;
|
$b = true;
|
||||||
echo '<pre><p>Module PHP : ' . $v . ' manquant - Module PHP ' . $v . ' missing.</p></pre>';
|
$missingModules[] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($b)
|
if ($b) {
|
||||||
exit('<pre><p>ZwiiCMS ne peut pas démarrer ; activez les extensions requises dans PHP.ini- ZwiiCMS cannot start, enabled PHP missing extensions into PHP.ini</p></pre>');
|
$errorMessage = 'ZwiiCMS ne peut pas démarrer ; les modules PHP suivants sont manquants : ' . implode(', ', $missingModules) . '<br />';
|
||||||
/**
|
$errorMessage .= 'ZwiiCMS cannot start, the following PHP modules are missing: ' . implode(', ', $missingModules);
|
||||||
* Contrôle les htacess
|
displayErrorPage($errorMessage);
|
||||||
*/
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contrôle les htaccess
|
||||||
|
*/
|
||||||
$d = [
|
$d = [
|
||||||
'',
|
'',
|
||||||
'site/data/',
|
'site/data/',
|
||||||
@ -51,6 +52,33 @@ $d = [
|
|||||||
// 'site/i18n/', pas contrôler pour éviter les pbs de mise à jour
|
// 'site/i18n/', pas contrôler pour éviter les pbs de mise à jour
|
||||||
];
|
];
|
||||||
foreach ($d as $key) {
|
foreach ($d as $key) {
|
||||||
if (file_exists($key . '.htaccess') === false)
|
if (file_exists($key . '.htaccess') === false) {
|
||||||
exit('<pre>ZwiiCMS ne peut pas démarrer, le fichier ' .$key . '.htaccess est manquant.<br />ZwiiCMS cannot start, file ' . $key . '.htaccess is missing.</pre>' );
|
$errorMessage = 'ZwiiCMS ne peut pas démarrer, le fichier ' . $key . '.htaccess est manquant.<br />';
|
||||||
|
$errorMessage .= 'ZwiiCMS cannot start, file ' . $key . '.htaccess is missing.';
|
||||||
|
displayErrorPage($errorMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fonction pour afficher une page d'erreur stylisée
|
||||||
|
*/
|
||||||
|
function displayErrorPage($message)
|
||||||
|
{
|
||||||
|
echo '<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Erreur - ZwiiCMS</title>
|
||||||
|
<link rel="stylesheet" href="core\layout\error.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="error-container">
|
||||||
|
<h1>Erreur</h1>
|
||||||
|
<p>' . $message . '</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>';
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -4,25 +4,25 @@
|
|||||||
* Mises à jour suivant les versions de ZwiiCampus
|
* Mises à jour suivant les versions de ZwiiCampus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Version 1.7.00
|
||||||
if (
|
if (
|
||||||
$this->getData(['core', 'dataVersion']) < 1700
|
$this->getData(['core', 'dataVersion']) < 1700
|
||||||
) {
|
) {
|
||||||
// Supprime la variable path des profils, seul l'accès à l'espace et autorisé.
|
// Supprime la variable path des profils, seul l'accès à l'espace et autorisé.
|
||||||
foreach (['1', '2'] as $group) {
|
foreach (['1', '2'] as $role) {
|
||||||
foreach (array_keys($this->getData(['profil', $group])) as $profil) {
|
foreach (array_keys($this->getData(['profil', $role])) as $profil) {
|
||||||
if (is_null($this->getData(['profil', $group, $profil, 'folder', 'path'])) === false) {
|
if (is_null($this->getData(['profil', $role, $profil, 'folder', 'path'])) === false) {
|
||||||
$path = $this->getData(['profil', $group, $profil, 'folder', 'path']);
|
$path = $this->getData(['profil', $role, $profil, 'folder', 'path']);
|
||||||
$this->setData(['profil', $group, $profil, 'folder', 'homePath', $path]);
|
$this->setData(['profil', $role, $profil, 'folder', 'homePath', $path]);
|
||||||
$this->setData(['profil', $group, $profil, 'folder', 'coursePath', $path]);
|
$this->setData(['profil', $role, $profil, 'folder', 'coursePath', $path]);
|
||||||
$this->deleteData(['profil', $group, $profil, 'folder', 'path']);
|
$this->deleteData(['profil', $role, $profil, 'folder', 'path']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->setData(['core', 'dataVersion', 1700]);
|
$this->setData(['core', 'dataVersion', 1700]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Version 1.8.00
|
||||||
if (
|
if (
|
||||||
$this->getData(['core', 'dataVersion']) < 1800
|
$this->getData(['core', 'dataVersion']) < 1800
|
||||||
) {
|
) {
|
||||||
@ -46,3 +46,90 @@ if (
|
|||||||
}
|
}
|
||||||
$this->setData(['core', 'dataVersion', 1800]);
|
$this->setData(['core', 'dataVersion', 1800]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Version 1.20.02
|
||||||
|
if (
|
||||||
|
$this->getData(['core', 'dataVersion']) < 12002
|
||||||
|
) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installe dans le thème du menu la variable hidePages
|
||||||
|
**/
|
||||||
|
// Tableau à insérer
|
||||||
|
$a = [
|
||||||
|
'theme' =>
|
||||||
|
[
|
||||||
|
'menu' => [
|
||||||
|
'hidePages' => false
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
// Parcourir la structure pour écrire dans les fichiers JSON
|
||||||
|
foreach ($this->getData(['course']) as $courseId => $courseValues) {
|
||||||
|
$d = json_decode(file_get_contents(self::DATA_DIR . $courseId . '/theme.json'), true);
|
||||||
|
// Insérer la variable hidePages si elle n'existe pas
|
||||||
|
if (isset($d['theme']['menu']['hidePages']) === false) {
|
||||||
|
$result = array_replace_recursive($d, $a);
|
||||||
|
file_put_contents(self::DATA_DIR . $courseId . '/theme.json', json_encode($result,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
|
||||||
|
}
|
||||||
|
// Forcer la régénération du fichier theme.css
|
||||||
|
if (file_exists(self::DATA_DIR . $courseId . '/theme.css')) {
|
||||||
|
unlink(self::DATA_DIR . $courseId . '/theme.css');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->setData(['core', 'dataVersion', 12002]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Version 1.21.00
|
||||||
|
|
||||||
|
if (
|
||||||
|
$this->getData(['core', 'dataVersion']) < 12100
|
||||||
|
) {
|
||||||
|
/**
|
||||||
|
* Renomme la clé dans la base des utilisateurs
|
||||||
|
*/
|
||||||
|
if (
|
||||||
|
is_array($this->getData(['user']))
|
||||||
|
&& empty($this->getData(['user'])) === false
|
||||||
|
) {
|
||||||
|
foreach ($this->getData(['user']) as $userId => $userValue) {
|
||||||
|
$d = $this->getData(['user', $userId]);
|
||||||
|
if (isset($d['group']) && $d['group'] !== '') {
|
||||||
|
$position = array_search('group', array_keys($d)) + 1;
|
||||||
|
$l = array_merge(
|
||||||
|
array_slice($d, 0, $position),
|
||||||
|
['role' => $d['group']],
|
||||||
|
array_slice($d, $position)
|
||||||
|
);
|
||||||
|
unset($l['group']);
|
||||||
|
$this->setData(['user', $userId, $l], false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->saveDb('user');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convertit les pages et les modules
|
||||||
|
*/
|
||||||
|
$courses = array_merge($this->getData(['course']), ['home' => array()]);
|
||||||
|
|
||||||
|
foreach ($courses as $courseId => $courseValue) {
|
||||||
|
// Les pages
|
||||||
|
$filePath = self::DATA_DIR . $courseId . '/page.json';
|
||||||
|
$jsonContent = file_get_contents($filePath);
|
||||||
|
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
|
||||||
|
if ($updatedJsonContent !== $jsonContent) {
|
||||||
|
file_put_contents($filePath, $updatedJsonContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Les modules
|
||||||
|
$filePath = self::DATA_DIR . $courseId . '/module.json';
|
||||||
|
$jsonContent = file_get_contents($filePath);
|
||||||
|
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
|
||||||
|
if ($updatedJsonContent !== $jsonContent) {
|
||||||
|
file_put_contents($filePath, $updatedJsonContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->setData(['core', 'dataVersion', 12100]);
|
||||||
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
|
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html;">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<?php $layout->showMetaTitle(); ?>
|
<?php $layout->showMetaTitle(); ?>
|
||||||
<?php $layout->showMetaDescription(); ?>
|
<?php $layout->showMetaDescription(); ?>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -354,6 +354,14 @@ td>.col12 {
|
|||||||
color: #E74C3C;
|
color: #E74C3C;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Asterisque des champs obligatoires */
|
||||||
|
.required-field::after {
|
||||||
|
content: '\00204E';
|
||||||
|
color: #E74C3C;
|
||||||
|
margin-left: 4px;
|
||||||
|
font-size: larger;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Mauvaise position dans les champs File
|
/* Mauvaise position dans les champs File
|
||||||
.inputFile.notice {
|
.inputFile.notice {
|
||||||
@ -649,6 +657,7 @@ nav a:hover {
|
|||||||
|
|
||||||
#menuLeft {
|
#menuLeft {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menuRight {
|
#menuRight {
|
||||||
@ -1192,6 +1201,7 @@ input[type='datetime-local'],
|
|||||||
input[type='time'],
|
input[type='time'],
|
||||||
input[type='month'],
|
input[type='month'],
|
||||||
input[type='week'],
|
input[type='week'],
|
||||||
|
input[type='number'],
|
||||||
.inputFile,
|
.inputFile,
|
||||||
select,
|
select,
|
||||||
textarea {
|
textarea {
|
||||||
@ -1217,6 +1227,7 @@ input[type='datetime-local']:hover,
|
|||||||
input[type='time']:hover,
|
input[type='time']:hover,
|
||||||
input[type='month']:hover,
|
input[type='month']:hover,
|
||||||
input[type='week']:hover,
|
input[type='week']:hover,
|
||||||
|
input[type='number']:hover,
|
||||||
.inputFile:hover,
|
.inputFile:hover,
|
||||||
select:hover,
|
select:hover,
|
||||||
textarea:hover {
|
textarea:hover {
|
||||||
@ -1231,6 +1242,7 @@ input[type='datetime-local'].notice,
|
|||||||
input[type='time'].notice,
|
input[type='time'].notice,
|
||||||
input[type='month'].notice,
|
input[type='month'].notice,
|
||||||
input[type='week'].notice,
|
input[type='week'].notice,
|
||||||
|
input[type='number'].notice,
|
||||||
.inputFile.notice,
|
.inputFile.notice,
|
||||||
select.notice,
|
select.notice,
|
||||||
textarea.notice {
|
textarea.notice {
|
||||||
@ -1246,6 +1258,7 @@ input[type='datetime-local'].notice:hover,
|
|||||||
input[type='time'].notice:hover,
|
input[type='time'].notice:hover,
|
||||||
input[type='month'].notice:hover,
|
input[type='month'].notice:hover,
|
||||||
input[type='week'].notice:hover,
|
input[type='week'].notice:hover,
|
||||||
|
input[type='number'].notice:hover,
|
||||||
.inputFile.notice:hover,
|
.inputFile.notice:hover,
|
||||||
select.notice:hover,
|
select.notice:hover,
|
||||||
textarea.notice:hover {
|
textarea.notice:hover {
|
||||||
|
22
core/layout/error.css
Normal file
22
core/layout/error.css
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
body {
|
||||||
|
color: #000;
|
||||||
|
font: 75%/1.7em "Helvetica Neue", Helvetica, arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 80px;
|
||||||
|
background: url('../vendor/zwiico/png/error.png') 30px 30px no-repeat #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000;
|
||||||
|
font-size: 300%;
|
||||||
|
margin: 20px 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 10px 0;
|
||||||
|
color: #777;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
|
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html;">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<?php $layout->showMetaTitle(); ?>
|
<?php $layout->showMetaTitle(); ?>
|
||||||
<?php $layout->showMetaDescription(); ?>
|
<?php $layout->showMetaDescription(); ?>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr_FR">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr_FR">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html;">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="x-apple-disable-message-reformatting">
|
<meta name="x-apple-disable-message-reformatting">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
|
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html;">
|
||||||
<meta meta="description=" content="ZwiiCMS le CMS multilingue sans base de données">
|
<meta meta="description=" content="ZwiiCMS le CMS multilingue sans base de données">
|
||||||
<meta name="generator" content="ZiiCMS https://forge.chapril.org/ZwiiCMS-Team/ZwiiCMS">
|
<meta name="generator" content="ZiiCMS https://forge.chapril.org/ZwiiCMS-Team/ZwiiCMS">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Barre d'administration -->
|
<!-- Barre d'administration -->
|
||||||
<?php if ($this->getUser('group') > self::GROUP_MEMBER) : ?>
|
<?php if ($this->getUser('role') > self::ROLE_MEMBER) : ?>
|
||||||
<?php $layout->showBar(); ?>
|
<?php $layout->showBar(); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
@ -47,8 +47,8 @@
|
|||||||
if (
|
if (
|
||||||
$this->getData(['theme', 'menu', 'position']) === 'top'
|
$this->getData(['theme', 'menu', 'position']) === 'top'
|
||||||
and $this->getData(['theme', 'menu', 'fixed']) === true
|
and $this->getData(['theme', 'menu', 'fixed']) === true
|
||||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
and $this->isConnected() === true
|
||||||
and $this->getUser('group') > self::GROUP_MEMBER
|
and $this->getUser('role') > self::ROLE_MEMBER
|
||||||
) {
|
) {
|
||||||
echo '<nav id="navfixedconnected" >';
|
echo '<nav id="navfixedconnected" >';
|
||||||
} else {
|
} else {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -18,19 +18,20 @@ class config extends common
|
|||||||
{
|
{
|
||||||
|
|
||||||
public static $actions = [
|
public static $actions = [
|
||||||
'backup' => self::GROUP_ADMIN,
|
'backup' => self::ROLE_ADMIN,
|
||||||
'copyBackups' => self::GROUP_ADMIN,
|
'copyBackups' => self::ROLE_ADMIN,
|
||||||
'delBackups' => self::GROUP_ADMIN,
|
'delBackups' => self::ROLE_ADMIN,
|
||||||
'configMetaImage' => self::GROUP_ADMIN,
|
'configMetaImage' => self::ROLE_ADMIN,
|
||||||
'siteMap' => self::GROUP_ADMIN,
|
'sitemap' => self::ROLE_ADMIN,
|
||||||
'index' => self::GROUP_ADMIN,
|
'index' => self::ROLE_ADMIN,
|
||||||
'restore' => self::GROUP_ADMIN,
|
'restore' => self::ROLE_ADMIN,
|
||||||
'updateBaseUrl' => self::GROUP_ADMIN,
|
'updateBaseUrl' => self::ROLE_ADMIN,
|
||||||
'script' => self::GROUP_ADMIN,
|
'script' => self::ROLE_ADMIN,
|
||||||
'logReset' => self::GROUP_ADMIN,
|
'logReset' => self::ROLE_ADMIN,
|
||||||
'logDownload' => self::GROUP_ADMIN,
|
'logDownload' => self::ROLE_ADMIN,
|
||||||
'blacklistReset' => self::GROUP_ADMIN,
|
'blacklistReset' => self::ROLE_ADMIN,
|
||||||
'blacklistDownload' => self::GROUP_ADMIN
|
'blacklistDownload' => self::ROLE_ADMIN,
|
||||||
|
'testmail' => self::ROLE_ADMIN,
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $timezones = [
|
public static $timezones = [
|
||||||
@ -213,7 +214,7 @@ class config extends common
|
|||||||
* Sitemap compressé et non compressé
|
* Sitemap compressé et non compressé
|
||||||
* Robots.txt
|
* Robots.txt
|
||||||
*/
|
*/
|
||||||
public function siteMap()
|
public function sitemap()
|
||||||
{
|
{
|
||||||
// La page n'existe pas
|
// La page n'existe pas
|
||||||
if (
|
if (
|
||||||
@ -528,11 +529,24 @@ class config extends common
|
|||||||
'autoDisconnect' => $this->getInput('connectAutoDisconnect', helper::FILTER_BOOLEAN),
|
'autoDisconnect' => $this->getInput('connectAutoDisconnect', helper::FILTER_BOOLEAN),
|
||||||
'captchaType' => $this->getInput('connectCaptchaType'),
|
'captchaType' => $this->getInput('connectCaptchaType'),
|
||||||
'showPassword' => $this->getInput('connectShowPassword', helper::FILTER_BOOLEAN),
|
'showPassword' => $this->getInput('connectShowPassword', helper::FILTER_BOOLEAN),
|
||||||
'redirectLogin' => $this->getInput('connectRedirectLogin', helper::FILTER_BOOLEAN)
|
'redirectLogin' => $this->getInput('connectRedirectLogin', helper::FILTER_BOOLEAN),
|
||||||
|
'mailAuth' => $this->getInput('connectAuthMail', helper::FILTER_BOOLEAN),
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
// Sauvegarde la position des onglets de la vue de l'utilisateur courant
|
||||||
|
$this->setData([
|
||||||
|
'user',
|
||||||
|
$this->getUser('id'),
|
||||||
|
'view',
|
||||||
|
[
|
||||||
|
'config' => $this->getInput('containerSelected'),
|
||||||
|
'page' => $this->getData(['user', $this->getUser('id'), 'view', 'page']),
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
// Efface les fichiers de backup lorsque l'option est désactivée
|
// Efface les fichiers de backup lorsque l'option est désactivée
|
||||||
if ($this->getInput('configFileBackup', helper::FILTER_BOOLEAN) === false) {
|
if ($this->getInput('configFileBackup', helper::FILTER_BOOLEAN) === false) {
|
||||||
$path = realpath('site/data');
|
$path = realpath('site/data');
|
||||||
@ -592,7 +606,7 @@ class config extends common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Générer robots.txt et sitemap
|
// Générer robots.txt et sitemap
|
||||||
$this->siteMap();
|
$this->sitemap();
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => helper::translate('Configuration'),
|
'title' => helper::translate('Configuration'),
|
||||||
@ -972,4 +986,32 @@ class config extends common
|
|||||||
return getenv('HTTP_MOD_REWRITE') == 'On' || getenv('REDIRECT_STATUS') == '200';
|
return getenv('HTTP_MOD_REWRITE') == 'On' || getenv('REDIRECT_STATUS') == '200';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Envoi un message de test
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testmail()
|
||||||
|
{
|
||||||
|
$sent = $this->sendMail(
|
||||||
|
$this->getUser('mail'),
|
||||||
|
helper::translate('Test de la messagerie du site'),
|
||||||
|
'<strong>' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</strong>,<br><br>' .
|
||||||
|
'<h4>' . helper::translate('Il semblerait que votre messagerie fonctionne correctement !') . '</h4>',
|
||||||
|
null,
|
||||||
|
'no-reply@localhost'
|
||||||
|
);
|
||||||
|
if ($sent !== true) {
|
||||||
|
// Désactivation de l'authentification par email
|
||||||
|
$this->setData(['config', 'connect', 'mailAuth', 0]);
|
||||||
|
// Journalisation
|
||||||
|
$this->saveLog($sent);
|
||||||
|
}
|
||||||
|
// Valeurs en sortie
|
||||||
|
$this->addOutput([
|
||||||
|
'redirect' => helper::baseUrl() . 'config/' . $this->getUrl(2),
|
||||||
|
'state' => $sent === true ? true : false,
|
||||||
|
'notification' => $sent === true ? helper::translate('Message de test envoyé avec succès') : helper::translate('Message non envoyé')
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4><?php echo helper::translate('Paramètres de la sauvegarde'); ?>
|
<h4>
|
||||||
|
<?php echo helper::translate('Paramètres de la sauvegarde'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
@ -27,7 +28,10 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<em>L'archive est générée dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>&lang=<?php echo $this->getData(['user', $this->getUser('id'), 'language']);?>" data-lity>le dossier Backup</a> du gestionnaire de fichiers.</em>
|
<em>L'archive est générée dans
|
||||||
|
<a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>&lang=<?php echo $this->getData(['user', $this->getUser('id'), 'language']); ?>"
|
||||||
|
data-lity>le dossier Backup</a> du gestionnaire de fichiers.
|
||||||
|
</em>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,13 +3,7 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4><?php echo helper::translate('Sécurité de la connexion'); ?>
|
<h4><?php echo helper::translate('Sécurité de la connexion'); ?>
|
||||||
<!--<span id="specialeHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/connexion" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php // echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::checkbox('connectShowPassword', true, 'Dévoiler le mot de passe', [
|
<?php echo template::checkbox('connectShowPassword', true, 'Dévoiler le mot de passe', [
|
||||||
@ -32,18 +26,104 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('connectAttempt', $module::$connectAttempt, [
|
<?php echo template::select('connectAttempt', config::$connectAttempt, [
|
||||||
'label' => 'Limitation des tentatives',
|
'label' => 'Limitation des tentatives',
|
||||||
'selected' => $this->getData(['config', 'connect', 'attempt'])
|
'selected' => $this->getData(['config', 'connect', 'attempt'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('connectTimeout', $module::$connectTimeout, [
|
<?php echo template::select('connectTimeout', config::$connectTimeout, [
|
||||||
'label' => 'Blocage après échecs',
|
'label' => 'Blocage après échecs',
|
||||||
'selected' => $this->getData(['config', 'connect', 'timeout'])
|
'selected' => $this->getData(['config', 'connect', 'timeout'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::select('connectAuthMail', array_merge([0 => 'Aucune'], self::$roleNews), [
|
||||||
|
'label' => 'Validation par clé ⚠️',
|
||||||
|
'selected' => $this->getData(['config', 'connect', 'mailAuth']),
|
||||||
|
'help' => 'La connexion est confirmée à l\'aide d\'une clé transmise par messagerie. Depuis le rôle sélectionné et les rôles supérieurs.'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
<div class="col3 verticalAlignBottom">
|
<div class="col3 verticalAlignBottom">
|
||||||
|
<?php echo template::button('ConfigSendMail', [
|
||||||
|
'href' => helper::baseUrl() . 'config/testmail',
|
||||||
|
'value' => 'Message de test',
|
||||||
|
'ico' => 'mail'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<div class="block">
|
||||||
|
<h4><?php echo helper::translate('Captcha à la connexion'); ?>
|
||||||
|
</h4>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::checkbox('connectCaptcha', true, 'Activer', [
|
||||||
|
'checked' => $this->getData(['config', 'connect', 'captcha'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::checkbox('connectCaptchaStrong', true, 'Captcha complexe', [
|
||||||
|
'checked' => $this->getData(['config', 'connect', 'captchaStrong']),
|
||||||
|
'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::select('connectCaptchaType', config::$captchaTypes, [
|
||||||
|
'label' => 'Type de captcha',
|
||||||
|
'selected' => $this->getData(['config', 'connect', 'captchaType'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<div class="block">
|
||||||
|
<h4><?php echo helper::translate('Journalisation'); ?>
|
||||||
|
</h4>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col6">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col6">
|
||||||
|
<?php echo template::checkbox('connectLog', true, 'Activer la journalisation', [
|
||||||
|
'checked' => $this->getData(['config', 'connect', 'log'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col6">
|
||||||
|
<?php echo template::select('connectAnonymousIp', config::$anonIP, [
|
||||||
|
'label' => 'Anonymat des adresses IP',
|
||||||
|
'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
|
||||||
|
'help' => 'La règlementation française impose un anonymat de niveau 2'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col6 ">
|
||||||
|
<?php echo template::button('ConfigLogDownload', [
|
||||||
|
'href' => helper::baseUrl() . 'config/logDownload',
|
||||||
|
'value' => 'Télécharger le journal',
|
||||||
|
'ico' => 'download'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col6">
|
||||||
|
<?php echo template::button('ConnectLogReset', [
|
||||||
|
'class' => 'buttonRed',
|
||||||
|
'href' => helper::baseUrl() . 'config/logReset',
|
||||||
|
'value' => 'Réinitialiser le journal',
|
||||||
|
'ico' => 'trash'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col6 verticalAlignBottom">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col6 verticalAlignBottom">
|
||||||
<label id="helpBlacklist"><?php echo helper::translate('Liste noire'); ?>
|
<label id="helpBlacklist"><?php echo helper::translate('Liste noire'); ?>
|
||||||
<?php echo template::help(
|
<?php echo template::help(
|
||||||
'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP.
|
'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP.
|
||||||
@ -57,7 +137,7 @@
|
|||||||
'ico' => 'download'
|
'ico' => 'download'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3 verticalAlignBottom">
|
<div class="col6 verticalAlignBottom">
|
||||||
<?php echo template::button('CnnectBlackListReset', [
|
<?php echo template::button('CnnectBlackListReset', [
|
||||||
'class' => 'buttonRed',
|
'class' => 'buttonRed',
|
||||||
'href' => helper::baseUrl() . 'config/blacklistReset',
|
'href' => helper::baseUrl() . 'config/blacklistReset',
|
||||||
@ -66,66 +146,6 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col3">
|
|
||||||
<?php echo template::checkbox('connectCaptcha', true, 'Captcha à la connexion', [
|
|
||||||
'checked' => $this->getData(['config', 'connect', 'captcha'])
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col3">
|
|
||||||
<?php echo template::checkbox('connectCaptchaStrong', true, 'Captcha complexe', [
|
|
||||||
'checked' => $this->getData(['config', 'connect', 'captchaStrong']),
|
|
||||||
'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col3">
|
|
||||||
<?php echo template::select('connectCaptchaType', $module::$captchaTypes, [
|
|
||||||
'label' => 'Type de captcha',
|
|
||||||
'selected' => $this->getData(['config', 'connect', 'captchaType'])
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col12">
|
|
||||||
<div class="block">
|
|
||||||
<h4><?php echo helper::translate('Journalisation'); ?>
|
|
||||||
<!--<span id="specialeHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/journalisation" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php // echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
-->
|
|
||||||
</h4>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col3">
|
|
||||||
<?php echo template::checkbox('connectLog', true, 'Activer la journalisation', [
|
|
||||||
'checked' => $this->getData(['config', 'connect', 'log'])
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col3">
|
|
||||||
<?php echo template::select('connectAnonymousIp', $module::$anonIP, [
|
|
||||||
'label' => 'Anonymat des adresses IP',
|
|
||||||
'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
|
|
||||||
'help' => 'La règlementation française impose un anonymat de niveau 2'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col3 verticalAlignBottom">
|
|
||||||
<?php echo template::button('ConfigLogDownload', [
|
|
||||||
'href' => helper::baseUrl() . 'config/logDownload',
|
|
||||||
'value' => 'Télécharger le journal',
|
|
||||||
'ico' => 'download'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col3 verticalAlignBottom">
|
|
||||||
<?php echo template::button('ConnectLogReset', [
|
|
||||||
'class' => 'buttonRed',
|
|
||||||
'href' => helper::baseUrl() . 'config/logReset',
|
|
||||||
'value' => 'Réinitialiser le journal',
|
|
||||||
'ico' => 'trash'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -66,11 +66,12 @@ $(document).ready(function () {
|
|||||||
$("#connectCaptchaStrong").prop("checked", false);
|
$("#connectCaptchaStrong").prop("checked", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
var configLayout = getCookie("configLayout");
|
let configLayout = "<?php echo $this->getData(['user', $this->getUser('id'), 'view', 'config']);?>";
|
||||||
if (configLayout == null) {
|
// Non défini, valeur par défaut
|
||||||
configLayout = "locale";
|
if (configLayout == "") {
|
||||||
setCookie("configLayout", "locale");
|
configLayout = "setup";
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#localeContainer").hide();
|
$("#localeContainer").hide();
|
||||||
$("#socialContainer").hide();
|
$("#socialContainer").hide();
|
||||||
$("#connectContainer").hide();
|
$("#connectContainer").hide();
|
||||||
@ -83,6 +84,16 @@ $(document).ready(function () {
|
|||||||
// Gestion des événements
|
// Gestion des événements
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transmet le bouton de l'onglet sélectionné avant la soumission
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Mettre à jour le champ caché avant la soumission
|
||||||
|
$('#configForm').on('submit', function () {
|
||||||
|
$('#containerSelected').val(configLayout);
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Afficher et masquer options smtp
|
* Afficher et masquer options smtp
|
||||||
*/
|
*/
|
||||||
@ -163,12 +174,12 @@ $(document).ready(function () {
|
|||||||
$("#connectContainer").hide();
|
$("#connectContainer").hide();
|
||||||
$("#networkContainer").hide();
|
$("#networkContainer").hide();
|
||||||
$("#localeContainer").show();
|
$("#localeContainer").show();
|
||||||
|
configLayout = "locale";
|
||||||
$("#configSetupButton").removeClass("activeButton");
|
$("#configSetupButton").removeClass("activeButton");
|
||||||
$("#configLocaleButton").addClass("activeButton");
|
$("#configLocaleButton").addClass("activeButton");
|
||||||
$("#configSocialButton").removeClass("activeButton");
|
$("#configSocialButton").removeClass("activeButton");
|
||||||
$("#configConnectButton").removeClass("activeButton");
|
$("#configConnectButton").removeClass("activeButton");
|
||||||
$("#configNetworkButton").removeClass("activeButton");
|
$("#configNetworkButton").removeClass("activeButton");
|
||||||
setCookie("configLayout", "locale");
|
|
||||||
});
|
});
|
||||||
$("#configSetupButton").on("click", function () {
|
$("#configSetupButton").on("click", function () {
|
||||||
$("#localeContainer").hide();
|
$("#localeContainer").hide();
|
||||||
@ -176,12 +187,12 @@ $(document).ready(function () {
|
|||||||
$("#connectContainer").hide();
|
$("#connectContainer").hide();
|
||||||
$("#networkContainer").hide();
|
$("#networkContainer").hide();
|
||||||
$("#setupContainer").show();
|
$("#setupContainer").show();
|
||||||
|
configLayout = "setup";
|
||||||
$("#configSetupButton").addClass("activeButton");
|
$("#configSetupButton").addClass("activeButton");
|
||||||
$("#configLocaleButton").removeClass("activeButton");
|
$("#configLocaleButton").removeClass("activeButton");
|
||||||
$("#configSocialButton").removeClass("activeButton");
|
$("#configSocialButton").removeClass("activeButton");
|
||||||
$("#configConnectButton").removeClass("activeButton");
|
$("#configConnectButton").removeClass("activeButton");
|
||||||
$("#configNetworkButton").removeClass("activeButton");
|
$("#configNetworkButton").removeClass("activeButton");
|
||||||
setCookie("configLayout", "setup");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#configSocialButton").on("click", function () {
|
$("#configSocialButton").on("click", function () {
|
||||||
@ -190,12 +201,12 @@ $(document).ready(function () {
|
|||||||
$("#localeContainer").hide();
|
$("#localeContainer").hide();
|
||||||
$("#networkContainer").hide();
|
$("#networkContainer").hide();
|
||||||
$("#socialContainer").show();
|
$("#socialContainer").show();
|
||||||
|
configLayout = "social";
|
||||||
$("#configSetupButton").removeClass("activeButton");
|
$("#configSetupButton").removeClass("activeButton");
|
||||||
$("#configLocaleButton").removeClass("activeButton");
|
$("#configLocaleButton").removeClass("activeButton");
|
||||||
$("#configSocialButton").addClass("activeButton");
|
$("#configSocialButton").addClass("activeButton");
|
||||||
$("#configConnectButton").removeClass("activeButton");
|
$("#configConnectButton").removeClass("activeButton");
|
||||||
$("#configNetworkButton").removeClass("activeButton");
|
$("#configNetworkButton").removeClass("activeButton");
|
||||||
setCookie("configLayout", "social");
|
|
||||||
});
|
});
|
||||||
$("#configConnectButton").on("click", function () {
|
$("#configConnectButton").on("click", function () {
|
||||||
$("#setupContainer").hide();
|
$("#setupContainer").hide();
|
||||||
@ -203,12 +214,12 @@ $(document).ready(function () {
|
|||||||
$("#socialContainer").hide();
|
$("#socialContainer").hide();
|
||||||
$("#networkContainer").hide();
|
$("#networkContainer").hide();
|
||||||
$("#connectContainer").show();
|
$("#connectContainer").show();
|
||||||
|
configLayout = "connect";
|
||||||
$("#configSetupButton").removeClass("activeButton");
|
$("#configSetupButton").removeClass("activeButton");
|
||||||
$("#configLocaleButton").removeClass("activeButton");
|
$("#configLocaleButton").removeClass("activeButton");
|
||||||
$("#configSocialButton").removeClass("activeButton");
|
$("#configSocialButton").removeClass("activeButton");
|
||||||
$("#configConnectButton").addClass("activeButton");
|
$("#configConnectButton").addClass("activeButton");
|
||||||
$("#configNetworkButton").removeClass("activeButton");
|
$("#configNetworkButton").removeClass("activeButton");
|
||||||
setCookie("configLayout", "connect");
|
|
||||||
});
|
});
|
||||||
$("#configNetworkButton").on("click", function () {
|
$("#configNetworkButton").on("click", function () {
|
||||||
$("#setupContainer").hide();
|
$("#setupContainer").hide();
|
||||||
@ -216,12 +227,12 @@ $(document).ready(function () {
|
|||||||
$("#socialContainer").hide();
|
$("#socialContainer").hide();
|
||||||
$("#connectContainer").hide();
|
$("#connectContainer").hide();
|
||||||
$("#networkContainer").show();
|
$("#networkContainer").show();
|
||||||
|
configLayout = "network";
|
||||||
$("#configSetupButton").removeClass("activeButton");
|
$("#configSetupButton").removeClass("activeButton");
|
||||||
$("#configLocaleButton").removeClass("activeButton");
|
$("#configLocaleButton").removeClass("activeButton");
|
||||||
$("#configSocialButton").removeClass("activeButton");
|
$("#configSocialButton").removeClass("activeButton");
|
||||||
$("#configConnectButton").removeClass("activeButton");
|
$("#configConnectButton").removeClass("activeButton");
|
||||||
$("#configNetworkButton").addClass("activeButton");
|
$("#configNetworkButton").addClass("activeButton");
|
||||||
setCookie("configLayout", "network");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -246,7 +257,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
// Contrôle l'image Open Screen Graph
|
// Contrôle l'image Open Screen Graph
|
||||||
// Type d'image
|
// Type d'image
|
||||||
$("span#screenType").each(function(){
|
$("span#screenType").each(function () {
|
||||||
var text = $(this).text();
|
var text = $(this).text();
|
||||||
if (text.includes("jpg") || text.includes("jpeg") || text.includes("png")) {
|
if (text.includes("jpg") || text.includes("jpeg") || text.includes("png")) {
|
||||||
$(this).css("color", "green");
|
$(this).css("color", "green");
|
||||||
@ -255,7 +266,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// La largeur
|
// La largeur
|
||||||
$("span#screenWide").each(function(){
|
$("span#screenWide").each(function () {
|
||||||
var screenId = parseInt($(this).text());
|
var screenId = parseInt($(this).text());
|
||||||
if (screenId >= 1200) {
|
if (screenId >= 1200) {
|
||||||
$(this).css("color", "green");
|
$(this).css("color", "green");
|
||||||
@ -264,7 +275,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// La hauteur
|
// La hauteur
|
||||||
$("span#screenHeight").each(function(){
|
$("span#screenHeight").each(function () {
|
||||||
var screenId = parseInt($(this).text());
|
var screenId = parseInt($(this).text());
|
||||||
if (screenId >= 630) {
|
if (screenId >= 630) {
|
||||||
$(this).css("color", "green");
|
$(this).css("color", "green");
|
||||||
@ -273,7 +284,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Le ratio
|
// Le ratio
|
||||||
$('span#screenRatio').each(function(){
|
$('span#screenRatio').each(function () {
|
||||||
var ratio = parseFloat($(this).text());
|
var ratio = parseFloat($(this).text());
|
||||||
if (ratio >= 1.90 && ratio <= 1.92) {
|
if (ratio >= 1.90 && ratio <= 1.92) {
|
||||||
$(this).css("color", "green");
|
$(this).css("color", "green");
|
||||||
@ -284,7 +295,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Le poids
|
// Le poids
|
||||||
$('span#screenWeight').each(function(index){
|
$('span#screenWeight').each(function (index) {
|
||||||
var weight = parseFloat($(this).text());
|
var weight = parseFloat($(this).text());
|
||||||
var fileType = $('span#screenType').eq(index).text();
|
var fileType = $('span#screenType').eq(index).text();
|
||||||
if ((fileType === "jpg" || fileType === "jpeg") && weight < 5000000) {
|
if ((fileType === "jpg" || fileType === "jpeg") && weight < 5000000) {
|
||||||
@ -294,7 +305,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('span#screenWeight').each(function(index){
|
$('span#screenWeight').each(function (index) {
|
||||||
var weight = parseFloat($(this).text());
|
var weight = parseFloat($(this).text());
|
||||||
var fileType = $('span#screenType').eq(index).text();
|
var fileType = $('span#screenType').eq(index).text();
|
||||||
|
|
||||||
@ -308,27 +319,6 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function setCookie(name, value, days) {
|
|
||||||
var expires = "";
|
|
||||||
if (days) {
|
|
||||||
var date = new Date();
|
|
||||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
||||||
expires = "; expires=" + date.toUTCString();
|
|
||||||
}
|
|
||||||
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCookie(name) {
|
|
||||||
var nameEQ = name + "=";
|
|
||||||
var ca = document.cookie.split(';');
|
|
||||||
for (var i = 0; i < ca.length; i++) {
|
|
||||||
var c = ca[i];
|
|
||||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
||||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define function to capitalize the first letter of a string
|
// Define function to capitalize the first letter of a string
|
||||||
function capitalizeFirstLetter(string) {
|
function capitalizeFirstLetter(string) {
|
||||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||||
|
@ -7,45 +7,37 @@
|
|||||||
'value' => template::ico('home')
|
'value' => template::ico('home')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1">
|
<div class="col2 offset9">
|
||||||
<?php /**echo template::button('configHelp', [
|
|
||||||
'class' => 'buttonHelp',
|
|
||||||
'href' => 'https://doc.zwiicms.fr/configuration-du-site',
|
|
||||||
'target' => '_blank',
|
|
||||||
'value' => template::ico('help'),
|
|
||||||
'help' => 'Consulter l\'aide en ligne'
|
|
||||||
]); */?>
|
|
||||||
</div>
|
|
||||||
<div class="col2 offset8">
|
|
||||||
<?php echo template::submit('Submit'); ?>
|
<?php echo template::submit('Submit'); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<?php echo template::button('configLocaleButton', [
|
<?php echo template::button('configLocaleButton', [
|
||||||
'value' => 'Identité - Etiquettes',
|
'value' => 'Identité - Étiquettes',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab'
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::button('configSetupButton', [
|
<?php echo template::button('configSetupButton', [
|
||||||
'value' => 'Configuration - Outils',
|
'value' => 'Configuration',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::button('configSocialButton', [
|
<?php echo template::button('configSocialButton', [
|
||||||
'value' => 'Réseaux sociaux',
|
'value' => 'Référencement',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
<?php echo template::button('configConnectButton', [
|
<?php echo template::button('configConnectButton', [
|
||||||
'value' => 'Sécurité',
|
'value' => 'Connexion',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
<?php echo template::button('configNetworkButton', [
|
<?php echo template::button('configNetworkButton', [
|
||||||
'value' => 'Réseau',
|
'value' => 'Réseau',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Champ caché pour transmettre l'onglet-->
|
||||||
|
<?php echo template::hidden('containerSelected'); ?>
|
||||||
|
|
||||||
|
<!-- Pages de formulaires -->
|
||||||
<?php include('core/module/config/view/locale/locale.php') ?>
|
<?php include('core/module/config/view/locale/locale.php') ?>
|
||||||
<?php include('core/module/config/view/setup/setup.php') ?>
|
<?php include('core/module/config/view/setup/setup.php') ?>
|
||||||
<?php include('core/module/config/view/social/social.php') ?>
|
<?php include('core/module/config/view/social/social.php') ?>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -44,21 +44,21 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('configLocaleHomePageId', helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC'), [
|
<?php echo template::select('configLocaleHomePageId', helper::arrayColumn(config::$pagesList, 'title', 'SORT_ASC'), [
|
||||||
'label' => 'Page d\'accueil de la plate-forme',
|
'label' => 'Page d\'accueil de la plate-forme',
|
||||||
'selected' => $this->homePageId(),
|
'selected' => $this->homePageId(),
|
||||||
'help' => 'Ce n\'est pas la page d\'accueil d\'un espace.'
|
'help' => 'Ce n\'est pas la page d\'accueil d\'un espace.'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('configLocalePage403', array_merge(['none' => 'Page par défaut'], helper::arrayColumn($module::$orphansList, 'title', 'SORT_ASC')), [
|
<?php echo template::select('configLocalePage403', array_merge(['none' => 'Page par défaut'], helper::arrayColumn(config::$orphansList, 'title', 'SORT_ASC')), [
|
||||||
'label' => 'Accès interdit, erreur 403',
|
'label' => 'Accès interdit, erreur 403',
|
||||||
'selected' => $this->getData(['config', 'page403']),
|
'selected' => $this->getData(['config', 'page403']),
|
||||||
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
|
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('configLocalePage404', array_merge(['none' => 'Page par défaut'], helper::arrayColumn($module::$orphansList, 'title', 'SORT_ASC')), [
|
<?php echo template::select('configLocalePage404', array_merge(['none' => 'Page par défaut'], helper::arrayColumn(config::$orphansList, 'title', 'SORT_ASC')), [
|
||||||
'label' => 'Page inexistante, erreur 404',
|
'label' => 'Page inexistante, erreur 404',
|
||||||
'selected' => $this->getData(['config', 'page404']),
|
'selected' => $this->getData(['config', 'page404']),
|
||||||
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
|
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
|
||||||
@ -67,14 +67,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('configLocaleLegalPageId', array_merge(['none' => 'Aucune'], helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC')), [
|
<?php echo template::select('configLocaleLegalPageId', array_merge(['none' => 'Aucune'], helper::arrayColumn(config::$pagesList, 'title', 'SORT_ASC')), [
|
||||||
'label' => 'Mentions légales',
|
'label' => 'Mentions légales',
|
||||||
'selected' => $this->getData(['config', 'legalPageId']),
|
'selected' => $this->getData(['config', 'legalPageId']),
|
||||||
'help' => 'Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.'
|
'help' => 'Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('configLocaleSearchPageId', array_merge(['none' => 'Aucune'], helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC')), [
|
<?php echo template::select('configLocaleSearchPageId', array_merge(['none' => 'Aucune'], helper::arrayColumn(config::$pagesList, 'title', 'SORT_ASC')), [
|
||||||
'label' => 'Recherche dans le site',
|
'label' => 'Recherche dans le site',
|
||||||
'selected' => $this->getData(['config', 'searchPageId']),
|
'selected' => $this->getData(['config', 'searchPageId']),
|
||||||
'help' => 'Sélectionnez une page contenant le module \'Recherche\'. Une option du pied de page ajoute un lien discret vers cette page.'
|
'help' => 'Sélectionnez une page contenant le module \'Recherche\'. Une option du pied de page ajoute un lien discret vers cette page.'
|
||||||
@ -82,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php
|
<?php
|
||||||
echo template::select('configLocalePage302', array_merge(['none' => 'Page par défaut'], helper::arrayColumn($module::$orphansList, 'title', 'SORT_ASC')), [
|
echo template::select('configLocalePage302', array_merge(['none' => 'Page par défaut'], helper::arrayColumn(config::$orphansList, 'title', 'SORT_ASC')), [
|
||||||
'label' => 'Site en maintenance',
|
'label' => 'Site en maintenance',
|
||||||
'selected' => $this->getData(['config', 'page302']),
|
'selected' => $this->getData(['config', 'page302']),
|
||||||
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
|
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
|
||||||
@ -98,7 +98,7 @@
|
|||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Étiquettes des pages spéciales'); ?>
|
<?php echo helper::translate('Étiquettes des pages spéciales'); ?>
|
||||||
<!--<span id="labelHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
|
<!--<span id="labelHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
|
||||||
<a href="https://doc.zwiicms.fr/etiquettes-des-pages-speciales" target="_blank">
|
<a href="https://doc.zwiicms.fr/Étiquettes-des-pages-speciales" target="_blank">
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
||||||
</a>
|
</a>
|
||||||
</span>-->
|
</span>-->
|
||||||
|
@ -4,15 +4,10 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Paramètres'); ?>
|
<?php echo helper::translate('Paramètres'); ?>
|
||||||
<!--<span id="specialeHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/reseau" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<?php echo template::select('configProxyType', $module::$proxyType, [
|
<?php echo template::select('configProxyType', config::$proxyType, [
|
||||||
'label' => 'Type de proxy',
|
'label' => 'Type de proxy',
|
||||||
'selected' => $this->getData(['config', 'proxyType'])
|
'selected' => $this->getData(['config', 'proxyType'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -25,7 +20,7 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<?php echo template::text('configProxyPort', [
|
<?php echo template::number('configProxyPort', [
|
||||||
'label' => 'Port du proxy',
|
'label' => 'Port du proxy',
|
||||||
'placeholder' => '6060',
|
'placeholder' => '6060',
|
||||||
'value' => $this->getData(['config', 'proxyPort'])
|
'value' => $this->getData(['config', 'proxyPort'])
|
||||||
@ -40,11 +35,6 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('SMTP'); ?>
|
<?php echo helper::translate('SMTP'); ?>
|
||||||
<!--<span id="specialeHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/smtp" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
@ -79,7 +69,7 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<?php echo template::select('smtpAuth', $module::$SMTPauth, [
|
<?php echo template::select('smtpAuth', config::$SMTPauth, [
|
||||||
'label' => 'Authentification',
|
'label' => 'Authentification',
|
||||||
'selected' => $this->getData(['config', 'smtp', 'auth'])
|
'selected' => $this->getData(['config', 'smtp', 'auth'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -101,7 +91,7 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<?php echo template::select('smtpSecure', $module::$SMTPEnc, [
|
<?php echo template::select('smtpSecure', config::$SMTPEnc, [
|
||||||
'label' => 'Sécurité',
|
'label' => 'Sécurité',
|
||||||
'selected' => $this->getData(['config', 'smtp', 'secure'])
|
'selected' => $this->getData(['config', 'smtp', 'secure'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -113,3 +103,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -3,12 +3,6 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4><?php echo helper::translate('Paramètres'); ?>
|
<h4><?php echo helper::translate('Paramètres'); ?>
|
||||||
<!--<span id="setupHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/parametres" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']);
|
|
||||||
?>
|
|
||||||
</a>-->
|
|
||||||
</span>
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
@ -17,7 +11,8 @@
|
|||||||
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
||||||
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
|
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
|
||||||
'label' => 'Favicon',
|
'label' => 'Favicon',
|
||||||
'value' => $this->getData(['config', 'favicon'])
|
'value' => $this->getData(['config', 'favicon']),
|
||||||
|
'folder' => $this->getData(['config', 'favicon']) ? dirname($this->getData(['config', 'favicon'])) : ''
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
@ -26,11 +21,12 @@
|
|||||||
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
||||||
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
|
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
|
||||||
'label' => 'Favicon thème sombre',
|
'label' => 'Favicon thème sombre',
|
||||||
'value' => $this->getData(['config', 'faviconDark'])
|
'value' => $this->getData(['config', 'faviconDark']),
|
||||||
|
'folder' => $this->getData(['config', 'faviconDark']) ? dirname($this->getData(['config', 'faviconDark'])) : ''
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('configTimezone', $module::$timezones, [
|
<?php echo template::select('configTimezone', config::$timezones, [
|
||||||
'label' => 'Fuseau horaire',
|
'label' => 'Fuseau horaire',
|
||||||
'selected' => $this->getData(['config', 'timezone']),
|
'selected' => $this->getData(['config', 'timezone']),
|
||||||
'help' => 'Le fuseau horaire est utile au bon référencement'
|
'help' => 'Le fuseau horaire est utile au bon référencement'
|
||||||
@ -48,7 +44,7 @@
|
|||||||
<?php echo template::checkbox('configRewrite', true, 'Apache URL intelligentes', [
|
<?php echo template::checkbox('configRewrite', true, 'Apache URL intelligentes', [
|
||||||
'checked' => helper::checkRewrite(),
|
'checked' => helper::checkRewrite(),
|
||||||
'help' => 'Supprime le point d\'interrogation dans les URL, l\'option est indisponible avec les autres serveurs Web',
|
'help' => 'Supprime le point d\'interrogation dans les URL, l\'option est indisponible avec les autres serveurs Web',
|
||||||
'disabled' => stripos($_SERVER["SERVER_SOFTWARE"], 'Apache') === false and $module->isModRewriteEnabled()
|
'disabled' => helper::checkServerSoftware() === false and self::isModRewriteEnabled()
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -59,12 +55,6 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4><?php echo helper::translate('Mise à jour automatisée'); ?>
|
<h4><?php echo helper::translate('Mise à jour automatisée'); ?>
|
||||||
<!--<span id="updateHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/mise-a-jour" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']);
|
|
||||||
?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
@ -84,20 +74,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('configAutoUpdateDelay', $module::$updateDelay, [
|
<?php echo template::select('configAutoUpdateDelay', config::$updateDelay, [
|
||||||
'label' => 'Fréquence de recherche',
|
'label' => 'Fréquence de recherche',
|
||||||
'selected' => $this->getData(['config', 'autoUpdateDelay']),
|
'selected' => $this->getData(['config', 'autoUpdateDelay']),
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3 offset1 verticalAlignBottom">
|
<div class="col3 offset1 verticalAlignBottom">
|
||||||
<pre>Version installée : <strong><?php echo common::ZWII_VERSION ; ?></strong></pre>
|
<pre>Version installée : <strong><?php echo common::ZWII_VERSION; ?></strong></pre>
|
||||||
<pre>Version en ligne : <strong><?php echo helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) ; ?></strong></pre>
|
<pre>Version en ligne : <strong><?php echo helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL); ?></strong></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3 offset2 verticalAlignBottom">
|
<div class="col3 offset2 verticalAlignBottom">
|
||||||
<?php echo template::button('configUpdateForced', [
|
<?php echo template::button('configUpdateForced', [
|
||||||
'ico' => 'download-cloud',
|
'ico' => 'download-cloud',
|
||||||
'href' => helper::baseUrl() . 'install/update',
|
'href' => helper::baseUrl() . 'install/update',
|
||||||
'value' => $module::$updateButtonText,
|
'value' => config::$updateButtonText,
|
||||||
'class' => 'buttonRed',
|
'class' => 'buttonRed',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -109,12 +99,6 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4><?php echo helper::translate('Maintenance'); ?>
|
<h4><?php echo helper::translate('Maintenance'); ?>
|
||||||
<!--<span id="maintenanceHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/mode-maintenance" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']);
|
|
||||||
?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
@ -169,12 +153,6 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4><?php echo helper::translate('Scripts externes'); ?>
|
<h4><?php echo helper::translate('Scripts externes'); ?>
|
||||||
<!--<span id="specialeHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/scripts-externes" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']);
|
|
||||||
?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4 offset1 verticalAlignBottom">
|
<div class="col4 offset1 verticalAlignBottom">
|
||||||
@ -198,13 +176,21 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>ZwiiCMS <a href="https://zwiicms.fr" target="_blank">Site Web</a> - <a href="https://forum.zwiicms.fr" target="_blank">Forum</a>
|
<h4>ZwiiCMS <a href="https://zwiicms.fr" target="_blank">Site Web</a> - <a
|
||||||
|
href="https://forum.zwiicms.fr" target="_blank">Forum</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row textAlignCenter">
|
<div class="row textAlignCenter">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Licence Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a>
|
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img
|
||||||
<p>Cette œuvre est mise à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Licence Creative Commons Attribution - Pas d'Utilisation Commerciale - Pas de Modification 4.0 International.</a></p>
|
alt="Licence Creative Commons" style="border-width:0"
|
||||||
<p>Pour voir une copie de cette licence, visitez http://creativecommons.org/licenses/by-nc-nd/4.0/ ou écrivez à Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</p>
|
src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a>
|
||||||
|
<p>Cette œuvre est mise à disposition selon les termes de la <a rel="license"
|
||||||
|
href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Licence Creative Commons
|
||||||
|
Attribution - Pas d'Utilisation Commerciale - Pas de Modification 4.0
|
||||||
|
International.</a></p>
|
||||||
|
<p>Pour voir une copie de cette licence, visitez
|
||||||
|
http://creativecommons.org/licenses/by-nc-nd/4.0/ ou écrivez à Creative Commons, PO Box
|
||||||
|
1866, Mountain View, CA 94042, USA.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Capture d\'écran Open Graph'); ?>
|
<?php echo helper::translate('Capture d\'écran Open Graph'); ?>
|
||||||
<!--<span id="specialeHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
@ -18,6 +13,7 @@
|
|||||||
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
||||||
'label' => 'Image Open Graph',
|
'label' => 'Image Open Graph',
|
||||||
'value' => $this->getData(['config', 'seo', 'openGraphImage']),
|
'value' => $this->getData(['config', 'seo', 'openGraphImage']),
|
||||||
|
'folder' => $this->getData(['config', 'seo', 'openGraphImage']) ? dirname($this->getData(['config', 'seo', 'openGraphImage'])) : '',
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
'help' => sprintf('%s : JPG - PNG<br />', helper::translate('Format')) .
|
'help' => sprintf('%s : JPG - PNG<br />', helper::translate('Format')) .
|
||||||
sprintf('%s : 1200 x 630 pixels<br />', helper::translate('Dimensions minimales')) .
|
sprintf('%s : 1200 x 630 pixels<br />', helper::translate('Dimensions minimales')) .
|
||||||
@ -28,18 +24,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col10 textAlignCenter">
|
<div class="col10 textAlignCenter">
|
||||||
<?php if( !empty($module::$imageOpenGraph['type']) ): ?>
|
<?php if (!empty(config::$imageOpenGraph['type'])): ?>
|
||||||
<p>
|
<p>
|
||||||
<?php echo sprintf('%s : <span id="screenType">%s</span>', helper::translate('Format'), $module::$imageOpenGraph['type']); ?>
|
<?php echo sprintf('%s : <span id="screenType">%s</span>', helper::translate('Format'), config::$imageOpenGraph['type']); ?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<?php echo sprintf('%s : <span id="screenWide">%s</span> x <span id="screenHeight">%s</span> pixels', helper::translate('Dimensions minimales'), $module::$imageOpenGraph['wide'], $module::$imageOpenGraph['height'] ); ?>
|
<?php echo sprintf('%s : <span id="screenWide">%s</span> x <span id="screenHeight">%s</span> pixels', helper::translate('Dimensions minimales'), config::$imageOpenGraph['wide'], config::$imageOpenGraph['height']); ?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<?php echo sprintf('%s : <span id="screenRatio">%s</span><span id="screenFract">:1</span>' , helper::translate('Ratio'), round($module::$imageOpenGraph['ratio'], 2)); ?>
|
<?php echo sprintf('%s : <span id="screenRatio">%s</span><span id="screenFract">:1</span>', helper::translate('Ratio'), round(config::$imageOpenGraph['ratio'], 2)); ?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<?php echo sprintf('%s : <span id="screenWeight">%s</span>', helper::translate('Poids'), $module::$imageOpenGraph['size']); ?>
|
<?php echo sprintf('%s : <span id="screenWeight">%s</span>', helper::translate('Poids'), config::$imageOpenGraph['size']); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
@ -84,12 +80,6 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Réseaux sociaux'); ?>
|
|
||||||
<!--<span id="specialeHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/reseaux-sociaux" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
|
File diff suppressed because it is too large
Load Diff
98
core/module/course/resource/style.css
Normal file
98
core/module/course/resource/style.css
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
/* Réinitialisation de base pour supprimer les marges et les espacements par défaut */
|
||||||
|
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 20px;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #2c3e50;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #3498db;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header, .footer {
|
||||||
|
background-color: #34495e;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header h1, .footer p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
border: 1px solid #e1e1e1;
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-family: "Courier New", Courier, monospace;
|
||||||
|
color: #c7254e;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
border: 1px solid #e1e1e1;
|
||||||
|
padding: 10px;
|
||||||
|
font-family: "Courier New", Courier, monospace;
|
||||||
|
overflow-x: auto;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Media Queries pour rendre la page responsive */
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
body {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -31,19 +31,19 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col5">
|
<div class="col5">
|
||||||
<?php echo template::select('courseAddAuthor', $module::$courseTeachers, [
|
<?php echo template::select('courseAddAuthor', course::$courseTeachers, [
|
||||||
'label' => 'Auteur'
|
'label' => 'Auteur'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('courseAddTheme', $module::$courses, [
|
<?php echo template::select('courseAddTheme', course::$courses, [
|
||||||
'label' => 'Copier le thème depuis',
|
'label' => 'Copier le thème depuis',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('courseAddCategorie', $module::$courseCategories, [
|
<?php echo template::select('courseAddCategorie', course::$courseCategories, [
|
||||||
'label' => 'Catégorie',
|
'label' => 'Catégorie',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('courseAddAccess', $module::$courseAccess, [
|
<?php echo template::select('courseAddAccess', course::$courseAccess, [
|
||||||
'label' => 'Accès'
|
'label' => 'Accès'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('courseAddEnrolment', $module::$courseEnrolment, [
|
<?php echo template::select('courseAddEnrolment', course::$courseEnrolment, [
|
||||||
'label' => 'Participation'
|
'label' => 'Participation'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -87,6 +87,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col4">
|
||||||
|
<?php echo template::checkbox('courseAddEnrolmentReport', true, 'Rapport des consultations', [
|
||||||
|
'help' => 'Enregistre une trace des consultations. Ne s\'applique pas à l\'inscription anonyme',
|
||||||
|
'checked' => true
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::checkbox('courseAddEnrolmentLimit', true, 'Date de fin d\'inscription', [
|
<?php echo template::checkbox('courseAddEnrolmentLimit', true, 'Date de fin d\'inscription', [
|
||||||
'help' => 'Ne s\'applique pas à l\'inscription anonyme',
|
'help' => 'Ne s\'applique pas à l\'inscription anonyme',
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if($module::$courseCategories): ?>
|
<?php if(course::$courseCategories): ?>
|
||||||
<?php echo template::table([5,5,1,1], $module::$courseCategories, ['Id', 'Titre', '','']); ?>
|
<?php echo template::table([5,5,1,1], course::$courseCategories, ['Id', 'Titre', '','']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucune catégorie'); ?>
|
<?php echo template::speech('Aucune catégorie'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col5">
|
<div class="col5">
|
||||||
<?php echo template::select('courseEditAuthor', $module::$courseTeachers, [
|
<?php echo template::select('courseEditAuthor', course::$courseTeachers, [
|
||||||
'label' => 'Auteur',
|
'label' => 'Auteur',
|
||||||
'selected' => $this->getdata(['course', $this->getUrl(2), 'author'])
|
'selected' => $this->getdata(['course', $this->getUrl(2), 'author'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -33,13 +33,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('courseEditHomePageId', helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC'), [
|
<?php echo template::select('courseEditHomePageId', helper::arrayColumn(course::$pagesList, 'title'), [
|
||||||
'label' => 'Page d\'accueil',
|
'label' => 'Page d\'accueil',
|
||||||
'selected' => $this->getdata(['course', $this->getUrl(2), 'homePageId']),
|
'selected' => $this->getdata(['course', $this->getUrl(2), 'homePageId']),
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('courseEditCategorie', $module::$courseCategories, [
|
<?php echo template::select('courseEditCategorie', course::$courseCategories, [
|
||||||
'label' => 'Catégorie',
|
'label' => 'Catégorie',
|
||||||
'selected' => $this->getdata(['course', $this->getUrl(2), 'category'])
|
'selected' => $this->getdata(['course', $this->getUrl(2), 'category'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('courseEditAccess', $module::$courseAccess, [
|
<?php echo template::select('courseEditAccess', course::$courseAccess, [
|
||||||
'label' => 'Disponibilité',
|
'label' => 'Disponibilité',
|
||||||
'selected' => $this->getdata(['course', $this->getUrl(2), 'access'])
|
'selected' => $this->getdata(['course', $this->getUrl(2), 'access'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('courseEditEnrolment', $module::$courseEnrolment, [
|
<?php echo template::select('courseEditEnrolment', course::$courseEnrolment, [
|
||||||
'label' => 'Participation',
|
'label' => 'Participation',
|
||||||
'selected' => $this->getdata(['course', $this->getUrl(2), 'enrolment'])
|
'selected' => $this->getdata(['course', $this->getUrl(2), 'enrolment'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -90,6 +90,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col4">
|
||||||
|
<?php echo template::checkbox('courseEditEnrolmentReport', true, 'Rapport des consultations', [
|
||||||
|
'checked' => $this->getdata(['course', $this->getUrl(2), 'report']),
|
||||||
|
'help' => 'Enregistre une trace des consultations. Ne s\'applique pas à l\'inscription anonyme',
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::checkbox('courseEditEnrolmentLimit', true, 'Date de fin d\'inscription', [
|
<?php echo template::checkbox('courseEditEnrolmentLimit', true, 'Date de fin d\'inscription', [
|
||||||
'checked' => $this->getdata(['course', $this->getUrl(2), 'limitEnrolment']),
|
'checked' => $this->getdata(['course', $this->getUrl(2), 'limitEnrolment']),
|
||||||
@ -99,7 +105,7 @@
|
|||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::date('courseEditEnrolmentLimitDate', [
|
<?php echo template::date('courseEditEnrolmentLimitDate', [
|
||||||
'type' => 'datetime-local',
|
'type' => 'datetime-local',
|
||||||
'label' => 'Fermeture',
|
'label' => 'Fin d\'inscription',
|
||||||
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate']) / 60) * 60
|
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate']) / 60) * 60
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
18
core/module/course/view/export/export.css
Normal file
18
core/module/course/view/export/export.css
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of Zwii.
|
||||||
|
*
|
||||||
|
* For full copyright and license information, please see the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*
|
||||||
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
|
* @link http://zwiicms.fr/
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/** NE PAS EFFACER
|
||||||
|
* admin.css
|
||||||
|
*/
|
27
core/module/course/view/export/export.js.php
Normal file
27
core/module/course/view/export/export.js.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of Zwii.
|
||||||
|
*
|
||||||
|
* For full copyright and license information, please see the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*
|
||||||
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
|
* @link http://zwiicms.fr/
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Quand le bouton "Cocher toutes" est cliqué
|
||||||
|
$('#courseExportSelectAll').on('click', function() {
|
||||||
|
// Cocher toutes les checkboxes avec la classe 'courseManageCheckbox'
|
||||||
|
$('.courseManageCheckbox').prop('checked', true);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Quand le bouton "Décocher toutes" est cliqué
|
||||||
|
$('#courseExportSelectNone').on('click', function() {
|
||||||
|
// Décocher toutes les checkboxes avec la classe 'courseManageCheckbox'
|
||||||
|
$('.courseManageCheckbox').prop('checked', false);
|
||||||
|
});
|
||||||
|
});
|
42
core/module/course/view/export/export.php
Normal file
42
core/module/course/view/export/export.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php echo template::formOpen('courseExportForm'); ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col1">
|
||||||
|
<?php echo template::button('courseExportBack', [
|
||||||
|
'class' => 'buttonGrey',
|
||||||
|
'href' => helper::baseUrl() . 'course/manage/' . $this->getUrl(2),
|
||||||
|
'value' => template::ico('left')
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1 offset7">
|
||||||
|
<?php echo template::button('courseExportSelectAll', [
|
||||||
|
'value' => template::ico('square-check'),
|
||||||
|
'help' => 'Tout sélectionner'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1">
|
||||||
|
<?php echo template::button('courseExportSelectNone', [
|
||||||
|
'value' => template::ico('square-check-empty'),
|
||||||
|
'help' => 'Tout désélectionner'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col2">
|
||||||
|
<?php echo template::submit('courseExportSubmit', [
|
||||||
|
'value' => 'Valider'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<div class="block">
|
||||||
|
<h4><?php echo helper::translate('Sélection des pages de l\'espace') ?></h4>
|
||||||
|
<div class='row'>
|
||||||
|
<div class='col10 offset2'>
|
||||||
|
<?php foreach (course::$pagesList as $key => $value) {
|
||||||
|
echo $value;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -18,6 +18,7 @@ $(document).ready(function () {
|
|||||||
},
|
},
|
||||||
locale: 'fr',
|
locale: 'fr',
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "Tout"]],
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
target: 2,
|
target: 2,
|
||||||
|
@ -7,16 +7,6 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1 offset8">
|
<div class="col1 offset8">
|
||||||
<?php if ($this->getUser('permission', 'course', 'add') === true): ?>
|
|
||||||
<?php echo template::button('courseAdd', [
|
|
||||||
'class' => 'buttonGreen',
|
|
||||||
'href' => helper::baseUrl() . 'course/add',
|
|
||||||
'value' => template::ico('plus'),
|
|
||||||
'help' => 'Ajouter un espace'
|
|
||||||
]); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
<div class="col1">
|
|
||||||
<?php if ($this->getUser('permission', 'course', 'category') === true): ?>
|
<?php if ($this->getUser('permission', 'course', 'category') === true): ?>
|
||||||
<?php echo template::button('courseCategory', [
|
<?php echo template::button('courseCategory', [
|
||||||
'href' => helper::baseUrl() . 'course/category',
|
'href' => helper::baseUrl() . 'course/category',
|
||||||
@ -33,11 +23,20 @@
|
|||||||
'help' => 'Restaurer un espace'
|
'help' => 'Restaurer un espace'
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1">
|
||||||
|
<?php if ($this->getUser('permission', 'course', 'add') === true): ?>
|
||||||
|
<?php echo template::button('courseAdd', [
|
||||||
|
'class' => 'buttonGreen',
|
||||||
|
'href' => helper::baseUrl() . 'course/add',
|
||||||
|
'value' => template::ico('plus'),
|
||||||
|
'help' => 'Ajouter un espace'
|
||||||
|
]); ?>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($module::$courses): ?>
|
<?php if (course::$courses): ?>
|
||||||
<?php echo template::table([4, 3, 3, 1, 1], $module::$courses, ['Titre court', 'Description', 'Inscription', '', '',], ['id' => 'dataTables']); ?>
|
<?php echo template::table([4, 3, 3, 1, 1], course::$courses, ['Titre court', 'Description', 'Inscription', '', '',], ['id' => 'dataTables']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun espace'); ?>
|
<?php echo template::speech('Aucun espace'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
'class' => 'courseDelete buttonRed',
|
'class' => 'courseDelete buttonRed',
|
||||||
'href' => helper::baseUrl() . 'course/delete/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/delete/' . $this->getUrl(2),
|
||||||
'value' => 'Supprimer',
|
'value' => 'Supprimer',
|
||||||
'ico' => 'trash'
|
'ico' => 'trash',
|
||||||
|
'help' => 'Supprime l\'espace et les historiques des participants',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -24,7 +25,8 @@
|
|||||||
'class' => 'courseReset buttonRed',
|
'class' => 'courseReset buttonRed',
|
||||||
'href' => helper::baseUrl() . 'course/reset/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/reset/' . $this->getUrl(2),
|
||||||
'value' => 'Réinitaliser',
|
'value' => 'Réinitaliser',
|
||||||
'ico' => 'cancel'
|
'ico' => 'cancel',
|
||||||
|
'help' => 'Désinscrit les participants et supprime les historiques',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -33,7 +35,8 @@
|
|||||||
<?php echo template::button('courseManageDownload' . $this->getUrl(2), [
|
<?php echo template::button('courseManageDownload' . $this->getUrl(2), [
|
||||||
'href' => helper::baseUrl() . 'course/backup/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/backup/' . $this->getUrl(2),
|
||||||
'value' => 'Sauvegarder',
|
'value' => 'Sauvegarder',
|
||||||
'ico' => 'download-cloud'
|
'ico' => 'download-cloud',
|
||||||
|
'help' => 'Génère une copie de sauvegarde de l\'espace',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -42,7 +45,8 @@
|
|||||||
<?php echo template::button('courseManageDuplicate' . $this->getUrl(2), [
|
<?php echo template::button('courseManageDuplicate' . $this->getUrl(2), [
|
||||||
'href' => helper::baseUrl() . 'course/clone/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/clone/' . $this->getUrl(2),
|
||||||
'value' => 'Cloner',
|
'value' => 'Cloner',
|
||||||
'ico' => 'clone'
|
'ico' => 'clone',
|
||||||
|
'help' => 'Copie l\'espace et son contenu sans les participants et leurs historiques',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -51,7 +55,18 @@
|
|||||||
<?php echo template::button('courseManageEdit' . $this->getUrl(2), [
|
<?php echo template::button('courseManageEdit' . $this->getUrl(2), [
|
||||||
'href' => helper::baseUrl() . 'course/edit/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/edit/' . $this->getUrl(2),
|
||||||
'value' => 'Éditer',
|
'value' => 'Éditer',
|
||||||
'ico' => 'pencil'
|
'ico' => 'pencil',
|
||||||
|
'help' => 'Modifie les paramètres de l\'espace',
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->getUser('permission', 'course', 'export') === true): ?>
|
||||||
|
<div class="col2">
|
||||||
|
<?php echo template::button('courseManageExport' . $this->getUrl(2), [
|
||||||
|
'href' => helper::baseUrl() . 'course/export/' . $this->getUrl(2),
|
||||||
|
'value' => 'Exporter HTML',
|
||||||
|
'ico' => 'upload',
|
||||||
|
'help' => 'Le contenu de l\'espace est exporté dans une page web autonome',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -83,14 +98,14 @@
|
|||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::text('courseManageHomePageId', [
|
<?php echo template::text('courseManageHomePageId', [
|
||||||
'label' => 'Page d\'accueil',
|
'label' => 'Page d\'accueil',
|
||||||
'value' => $module::$pagesList[$this->getdata(['course', $this->getUrl(2), 'homePageId'])]['shortTitle'],
|
'value' => course::$pagesList[$this->getdata(['course', $this->getUrl(2), 'homePageId'])]['shortTitle'],
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::text('courseManageCategorie', [
|
<?php echo template::text('courseManageCategorie', [
|
||||||
'label' => 'Catégorie',
|
'label' => 'Catégorie',
|
||||||
'value' => $module::$courseCategories[$this->getdata(['course', $this->getUrl(2), 'category'])],
|
'value' => course::$courseCategories[$this->getdata(['course', $this->getUrl(2), 'category'])],
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -108,7 +123,7 @@
|
|||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::text('courseManageAccess', [
|
<?php echo template::text('courseManageAccess', [
|
||||||
'label' => 'Disponibilité',
|
'label' => 'Disponibilité',
|
||||||
'value' => $module::$courseAccess[$this->getdata(['course', $this->getUrl(2), 'access'])],
|
'value' => course::$courseAccess[$this->getdata(['course', $this->getUrl(2), 'access'])],
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -133,7 +148,7 @@
|
|||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::text('courseManageEnrolment', [
|
<?php echo template::text('courseManageEnrolment', [
|
||||||
'label' => 'Participation',
|
'label' => 'Participation',
|
||||||
'value' => $module::$courseEnrolment[$this->getdata(['course', $this->getUrl(2), 'enrolment'])],
|
'value' => course::$courseEnrolment[$this->getdata(['course', $this->getUrl(2), 'enrolment'])],
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -146,6 +161,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col4">
|
||||||
|
<?php echo template::checkbox('courseManageEnrolmentReport', true, 'Rapport des consultations', [
|
||||||
|
'checked' => $this->getdata(['course', $this->getUrl(2), 'report']),
|
||||||
|
'help' => 'Ne s\'applique pas à l\'inscription anonyme',
|
||||||
|
'disabled' => true,
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::checkbox('courseManageEnrolmentLimit', true, 'Date de fin d\'inscription', [
|
<?php echo template::checkbox('courseManageEnrolmentLimit', true, 'Date de fin d\'inscription', [
|
||||||
'checked' => $this->getdata(['course', $this->getUrl(2), 'limitEnrolment']),
|
'checked' => $this->getdata(['course', $this->getUrl(2), 'limitEnrolment']),
|
||||||
@ -156,7 +178,7 @@
|
|||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::date('courseManageEnrolmentLimitDate', [
|
<?php echo template::date('courseManageEnrolmentLimitDate', [
|
||||||
'type' => 'datetime-local',
|
'type' => 'datetime-local',
|
||||||
'label' => 'Fermeture',
|
'label' => 'Fin d\'inscription',
|
||||||
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate']) / 60) * 60,
|
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate']) / 60) * 60,
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
]); ?>
|
]); ?>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -4,16 +4,16 @@
|
|||||||
<?php echo "<h3>Auteur : " . $this->signature($this->getData(['course', $this->getUrl(2), 'author'])) . "</h3>"; ?>
|
<?php echo "<h3>Auteur : " . $this->signature($this->getData(['course', $this->getUrl(2), 'author'])) . "</h3>"; ?>
|
||||||
<?php echo "<p>Description : " . $this->getData(['course', $this->getUrl(2), 'description']) . "</p>"; ?>
|
<?php echo "<p>Description : " . $this->getData(['course', $this->getUrl(2), 'description']) . "</p>"; ?>
|
||||||
<!--Restriction de date limite d'ouverture-->
|
<!--Restriction de date limite d'ouverture-->
|
||||||
<?php echo "<p>Disponibilité : " . $module::$courseAccess[$this->getData(['course', $this->getUrl(2), 'access'])]; ?>
|
<?php echo "<p>Disponibilité : " . course::$courseAccess[$this->getData(['course', $this->getUrl(2), 'access'])]; ?>
|
||||||
<?php if ($this->getData(['course', $this->getUrl(2), 'access']) === $module::COURSE_ACCESS_DATE): ?>
|
<?php if ($this->getData(['course', $this->getUrl(2), 'access']) === course::COURSE_ACCESS_DATE): ?>
|
||||||
<?php $from = helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'openingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'openingDate']), self::$i18nUI); ?>
|
<?php $from = helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'openingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'openingDate']), self::$i18nUI); ?>
|
||||||
<?php $to = helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'closingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'closingDate']), self::$i18nUI); ?>
|
<?php $to = helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'closingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'closingDate']), self::$i18nUI); ?>
|
||||||
<?php echo sprintf(helper::translate(' du %s au %s'), $from, $to); ?>
|
<?php echo sprintf(helper::translate(' du %s au %s'), $from, $to); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php echo '</p>'; ?>
|
<?php echo '</p>'; ?>
|
||||||
<?php echo "<p>Inscription : " . $module::$courseEnrolment[$this->getData(['course', $this->getUrl(2), 'enrolment'])] . '.'; ?>
|
<?php echo "<p>Inscription : " . course::$courseEnrolment[$this->getData(['course', $this->getUrl(2), 'enrolment'])] . '.'; ?>
|
||||||
<!--Restriction de date limite d'insription-->
|
<!--Restriction de date limite d'insription-->
|
||||||
<?php if ($this->getData(['course', $this->getUrl(2), 'limitEnrolment']) === true && $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']) <= time()):?>
|
<?php if ($this->getData(['course', $this->getUrl(2), 'limitEnrolment']) === true && $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']) <= time()): ?>
|
||||||
<?php echo helper::translate(' Les inscriptions sont closes depuis le ') ?>
|
<?php echo helper::translate(' Les inscriptions sont closes depuis le ') ?>
|
||||||
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI); ?>
|
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -22,12 +22,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php if ($module::$swapMessage['enrolmentKey']) {
|
<?php if (course::$swapMessage['enrolmentKey']) {
|
||||||
echo $module::$swapMessage['enrolmentKey'];
|
echo course::$swapMessage['enrolmentKey'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php if ($module::$swapMessage['enrolmentMessage']) {
|
<?php if (course::$swapMessage['enrolmentMessage']) {
|
||||||
echo $module::$swapMessage['enrolmentMessage'];
|
echo course::$swapMessage['enrolmentMessage'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($module::$swapMessage['submitLabel'] === 'Connexion'): ?>
|
<?php if (course::$swapMessage['submitLabel'] === 'Connexion'): ?>
|
||||||
<div class="col2 offset8">
|
<div class="col2 offset8">
|
||||||
<?php echo template::button('courseConnect', [
|
<?php echo template::button('courseConnect', [
|
||||||
'href' => helper::baseUrl(true) . 'user/login',
|
'href' => helper::baseUrl(true) . 'user/login',
|
||||||
@ -49,13 +49,12 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="col3 offset7">
|
<div class="col5 offset5">
|
||||||
<?php echo template::submit('courseSwapSubmit', [
|
<?php echo template::submit('courseSwapSubmit', [
|
||||||
'value' => $module::$swapMessage['submitLabel'],
|
'value' => course::$swapMessage['submitLabel'],
|
||||||
'disabled' => !($module->courseIsAvailable($this->getUrl(2))
|
'disabled' => course::$courseAvailable === false
|
||||||
&& !($this->getData(['course', $this->getUrl(2), 'limitEnrolment']) === true
|
&& !($this->getData(['course', $this->getUrl(2), 'limitEnrolment']) === true
|
||||||
&& $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']) <= time())
|
&& $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']) <= time())
|
||||||
),
|
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,16 +6,16 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready((function () {
|
$(document).ready((function () {
|
||||||
|
|
||||||
var dataX = <?php echo json_encode(array_map(function ($item) { return $item[0]; }, $module::$userGraph)); ?>;
|
var dataX = <?php echo json_encode(array_map(function ($item) { return $item[0]; }, course::$userGraph)); ?>;
|
||||||
var dataY = <?php echo json_encode(array_map(function ($item) { return $item[1];}, $module::$userGraph)); ?>;
|
var dataY = <?php echo json_encode(array_map(function ($item) { return $item[1];}, course::$userGraph)); ?>;
|
||||||
var dataText = <?php echo json_encode(array_map(function ($item) { return $item[2];}, $module::$userGraph)); ?>;
|
var dataText = <?php echo json_encode(array_map(function ($item) { return $item[2];}, course::$userGraph)); ?>;
|
||||||
|
|
||||||
var data = [{
|
var data = [{
|
||||||
x: dataX,
|
x: dataX,
|
||||||
|
@ -2,15 +2,18 @@
|
|||||||
<div class="col1">
|
<div class="col1">
|
||||||
<?php echo template::button('courseUserHistoryBack', [
|
<?php echo template::button('courseUserHistoryBack', [
|
||||||
'class' => 'buttonGrey',
|
'class' => 'buttonGrey',
|
||||||
'href' => helper::baseUrl() . 'course/users/' . $this->getUrl(2),
|
// Le retour est différent selon que c'est un admin ou un tuteur ou l'utilisateur lui-même
|
||||||
|
'href' => $this->getUser('role') === self::ROLE_MEMBER ? helper::baseUrl(false) : helper::baseUrl() . 'course/users/' . $this->getUrl(2),
|
||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1 offset10">
|
<div class="col1 offset10">
|
||||||
<?php echo template::button('userDeleteAll', [
|
<?php echo template::button('userReportExportAll', [
|
||||||
'href' => helper::baseUrl() . 'course/userHistoryExport/' . $this->getUrl(2) . '/' . $this->getUrl(3),
|
'href' => helper::baseUrl() . 'course/userReportExport/' . $this->getUrl(2) . '/' . $this->getUrl(3),
|
||||||
'value' => template::ico('download'),
|
'value' => template::ico('download'),
|
||||||
'help' => 'Exporter',
|
'help' => 'Exporter rapport',
|
||||||
|
// Le memebre ne peut pas exporter
|
||||||
|
'disabled' => $this->getUser('role') === self::ROLE_MEMBER
|
||||||
]) ?>
|
]) ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -20,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($module::$userReport): ?>
|
<?php if (course::$userReport): ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4 offset2">
|
<div class="col4 offset2">
|
||||||
<?php if ($this->getData(['course', $this->getUrl(2), 'access']) === self::COURSE_ACCESS_DATE): ?>
|
<?php if ($this->getData(['course', $this->getUrl(2), 'access']) === self::COURSE_ACCESS_DATE): ?>
|
||||||
@ -34,19 +37,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<p>Commencé le :
|
<p>Commencé le :
|
||||||
<?php echo $module::$userStat['floor']; ?>
|
<?php echo course::$userStat['floor']; ?>
|
||||||
</p>
|
</p>
|
||||||
<p>Terminé le :
|
<p>Terminé le :
|
||||||
<?php echo $module::$userStat['top']; ?>
|
<?php echo course::$userStat['top']; ?>
|
||||||
</p>
|
</p>
|
||||||
<p>Temps passé :
|
<p>Temps passé :
|
||||||
<?php echo $module::$userStat['time']; ?>
|
<?php echo course::$userStat['time']; ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row textAlignCenter">
|
<div class="row textAlignCenter">
|
||||||
<div class="col8">
|
<div class="col8">
|
||||||
<?php echo template::table([6, 3, 3], $module::$userReport, ['Page', 'Début de Consultation', 'Temps consultation']); ?>
|
<?php echo template::table([6, 3, 3], course::$userReport, ['Page', 'Début de Consultation', 'Temps consultation']); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -21,7 +21,6 @@ $(document).ready((function () {
|
|||||||
$(location).attr("href", _this.attr("href"))
|
$(location).attr("href", _this.attr("href"))
|
||||||
}))
|
}))
|
||||||
}));
|
}));
|
||||||
$.fn.dataTable.moment( 'DD/MM/YYYY' );
|
|
||||||
$('#dataTables').DataTable({
|
$('#dataTables').DataTable({
|
||||||
language: {
|
language: {
|
||||||
url: "core/vendor/datatables/french.json"
|
url: "core/vendor/datatables/french.json"
|
||||||
@ -29,13 +28,29 @@ $(document).ready((function () {
|
|||||||
order: [[3, 'desc']],
|
order: [[3, 'desc']],
|
||||||
locale: 'fr',
|
locale: 'fr',
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
"lengthMenu": [[10, 25, 50, 100, 299, -1], [10, 25, 50, 100, 200, "Tout"]],
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
target: 6,
|
targets: 2,
|
||||||
|
type: 'datetime',
|
||||||
|
searchable: false,
|
||||||
|
render: function (data, type, row) {
|
||||||
|
if (type === 'display') {
|
||||||
|
if (typeof data === 'number' || !isNaN(data)) {
|
||||||
|
return moment(Number(data) * 1000).format('DD/MM/YYYY HH:mm');
|
||||||
|
} else {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Pour le tri, retournez la valeur au format ISO
|
||||||
|
return moment(Number(data) * 1000).toISOString();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targets: 5,
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false
|
searchable: false
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}));
|
}));
|
@ -8,16 +8,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col1 offset8">
|
<div class="col1 offset8">
|
||||||
<?php echo template::button('userDeleteAll', [
|
<?php echo template::button('userDeleteAll', [
|
||||||
'href' => helper::baseUrl() . 'course/usersHistoryExport/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/usersReportExport/' . $this->getUrl(2),
|
||||||
'value' => template::ico('download'),
|
'value' => template::ico('download'),
|
||||||
'help' => 'Exporter',
|
'help' => 'Exporter rapports',
|
||||||
]) ?>
|
]) ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1">
|
<div class="col1">
|
||||||
<?php echo template::button('userDeleteAll', [
|
<?php echo template::button('userDeleteAll', [
|
||||||
'class' => 'userDeleteAll buttonRed',
|
'class' => 'userDeleteAll buttonRed',
|
||||||
'href' => helper::baseUrl() . 'course/usersDelete/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/usersDelete/' . $this->getUrl(2),
|
||||||
'value' => template::ico('users'),
|
'value' => template::ico('user-times'),
|
||||||
'help' => 'Désinscrire en masse',
|
'help' => 'Désinscrire en masse',
|
||||||
])?>
|
])?>
|
||||||
</div>
|
</div>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<?php echo template::button('userDeleteAll', [
|
<?php echo template::button('userDeleteAll', [
|
||||||
'class' => 'buttonGreen',
|
'class' => 'buttonGreen',
|
||||||
'href' => helper::baseUrl() . 'course/usersAdd/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/usersAdd/' . $this->getUrl(2),
|
||||||
'value' => template::ico('users'),
|
'value' => template::ico('user-plus'),
|
||||||
'help' => 'Inscription en masse',
|
'help' => 'Inscription en masse',
|
||||||
]) ?>
|
]) ?>
|
||||||
</div>
|
</div>
|
||||||
@ -33,27 +33,27 @@
|
|||||||
<?php echo template::formOpen('courseFilterUserForm'); ?>
|
<?php echo template::formOpen('courseFilterUserForm'); ?>
|
||||||
<div class="row" id="Bfrtip">
|
<div class="row" id="Bfrtip">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
|
<?php echo template::select('courseFilterGroup', course::$courseGroups, [
|
||||||
'label' => 'Groupes / Profils',
|
'label' => 'Rôles/ Profils',
|
||||||
'selected' => isset($_POST['courseFilterGroup']) ? $_POST['courseFilterGroup'] : 'all',
|
'selected' => isset($_POST['courseFilterGroup']) ? $_POST['courseFilterGroup'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterFirstName', $module::$alphabet, [
|
<?php echo template::select('courseFilterFirstName', course::$alphabet, [
|
||||||
'label' => 'Prénom commence par',
|
'label' => 'Prénom commence par',
|
||||||
'selected' => isset($_POST['courseFilterFirstName']) ? $_POST['courseFilterFirstName'] : 'all',
|
'selected' => isset($_POST['courseFilterFirstName']) ? $_POST['courseFilterFirstName'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterLastName', $module::$alphabet, [
|
<?php echo template::select('courseFilterLastName', course::$alphabet, [
|
||||||
'label' => 'Nom commence par',
|
'label' => 'Nom commence par',
|
||||||
'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all',
|
'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php echo template::formClose(); ?>
|
<?php echo template::formClose(); ?>
|
||||||
<?php if ($module::$courseUsers): ?>
|
<?php if (course::$courseUsers): ?>
|
||||||
<?php echo template::table([3, 4, 1, 1, 1, 1, 1], $module::$courseUsers, ['Nom Prénom', 'Dernière page vue', 'Date' , 'Heure', 'Étiquettes', 'Progression', ''], ['id' => 'dataTables']); ?>
|
<?php echo template::table([3, 3, 2, 2, 1, 1], course::$courseUsers, ['Nom Prénom', 'Dernière consultation', 'Date' , 'Étiquette', 'Progression', ''], ['id' => 'dataTables']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun participant'); ?>
|
<?php echo template::speech('Aucun participant'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -40,6 +40,7 @@ $(document).ready((function () {
|
|||||||
},
|
},
|
||||||
locale: 'fr',
|
locale: 'fr',
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
"lengthMenu": [[10, 25, 50, 100, 299, -1], [10, 25, 50, 100, 200, "Tout"]],
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
target: 0,
|
target: 0,
|
||||||
|
@ -7,47 +7,47 @@
|
|||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1 offset8">
|
<div class="col2 offset9">
|
||||||
<?php echo template::button('courseUserAddSelectAll', [
|
|
||||||
'value' => template::ico('square-check'),
|
|
||||||
'help' => 'Tout sélectionner'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col1">
|
|
||||||
<?php echo template::button('courseUserAddSelectNone', [
|
|
||||||
'value' => template::ico('square-check-empty'),
|
|
||||||
'help' => 'Tout désélectionner'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col1">
|
|
||||||
<?php echo template::submit('courseUsersAddSubmit', [
|
<?php echo template::submit('courseUsersAddSubmit', [
|
||||||
'value' => '',
|
'value' => 'Inscrire',
|
||||||
'ico' => 'plus',
|
'ico' => 'plus',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" id="Bfrtip">
|
<div class="row" id="Bfrtip">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
|
<?php echo template::select('courseFilterGroup', course::$courseGroups, [
|
||||||
'label' => 'Groupes / Profils',
|
'label' => 'Rôles/ Profils',
|
||||||
'selected' => isset($_POST['courseFilterGroup']) ? $_POST['courseFilterGroup'] : 'all',
|
'selected' => isset($_POST['courseFilterGroup']) ? $_POST['courseFilterGroup'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterFirstName', $module::$alphabet, [
|
<?php echo template::select('courseFilterFirstName', course::$alphabet, [
|
||||||
'label' => 'Prénom commence par',
|
'label' => 'Prénom commence par',
|
||||||
'selected' => isset($_POST['courseFilterFirstName']) ? $_POST['courseFilterFirstName'] : 'all',
|
'selected' => isset($_POST['courseFilterFirstName']) ? $_POST['courseFilterFirstName'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterLastName', $module::$alphabet, [
|
<?php echo template::select('courseFilterLastName', course::$alphabet, [
|
||||||
'label' => 'Nom commence par',
|
'label' => 'Nom commence par',
|
||||||
'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all',
|
'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col1 offset1 verticalAlignBottom">
|
||||||
|
<?php echo template::button('courseUserAddSelectAll', [
|
||||||
|
'value' => template::ico('square-check'),
|
||||||
|
'help' => 'Tout sélectionner'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1 verticalAlignBottom">
|
||||||
|
<?php echo template::button('courseUserAddSelectNone', [
|
||||||
|
'value' => template::ico('square-check-empty'),
|
||||||
|
'help' => 'Tout désélectionner'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($module::$courseUsers): ?>
|
<?php if (course::$courseUsers): ?>
|
||||||
<?php echo template::table([1, 2, 3, 3, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom', 'Étiquettes'], ['id' => 'dataTables']); ?>
|
<?php echo template::table([1, 2, 3, 3, 3], course::$courseUsers, ['', 'Id', 'Prénom', 'Nom', 'Étiquettes'], ['id' => 'dataTables']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun inscrit'); ?>
|
<?php echo template::speech('Aucun inscrit'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -39,6 +39,7 @@ $(document).ready((function () {
|
|||||||
url: "core/vendor/datatables/french.json"
|
url: "core/vendor/datatables/french.json"
|
||||||
},
|
},
|
||||||
locale: 'fr',
|
locale: 'fr',
|
||||||
|
"lengthMenu": [[10, 25, 50, 100, 299, -1], [10, 25, 50, 100, 200, "Tout"]],
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
target: 0,
|
target: 0,
|
||||||
|
@ -7,48 +7,48 @@
|
|||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1 offset8">
|
<div class="col2 offset9">
|
||||||
<?php echo template::button('courseUserDeleteSelectAll', [
|
|
||||||
'value' => template::ico('square-check'),
|
|
||||||
'help' => 'Tout sélectionner'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col1">
|
|
||||||
<?php echo template::button('courseUserDeleteSelectNone', [
|
|
||||||
'value' => template::ico('square-check-empty'),
|
|
||||||
'help' => 'Tout désélectionner'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col1">
|
|
||||||
<?php echo template::submit('courseUsersDeleteSubmit', [
|
<?php echo template::submit('courseUsersDeleteSubmit', [
|
||||||
'class' => 'buttonRed',
|
'class' => 'buttonRed',
|
||||||
'ico' => '',
|
'ico' => 'minus',
|
||||||
'value' => template::ico('minus'),
|
'value' => 'Désinscrire',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" id="Bfrtip">
|
<div class="row" id="Bfrtip">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
|
<?php echo template::select('courseFilterGroup', course::$courseGroups, [
|
||||||
'label' => 'Groupes / Profils',
|
'label' => 'Rôles/ Profils',
|
||||||
'selected' => isset($_POST['courseFilterGroup']) ? $_POST['courseFilterGroup'] : 'all',
|
'selected' => isset($_POST['courseFilterGroup']) ? $_POST['courseFilterGroup'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterFirstName', $module::$alphabet, [
|
<?php echo template::select('courseFilterFirstName', course::$alphabet, [
|
||||||
'label' => 'Prénom commence par',
|
'label' => 'Prénom commence par',
|
||||||
'selected' => isset($_POST['courseFilterFirstName']) ? $_POST['courseFilterFirstName'] : 'all',
|
'selected' => isset($_POST['courseFilterFirstName']) ? $_POST['courseFilterFirstName'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterLastName', $module::$alphabet, [
|
<?php echo template::select('courseFilterLastName', course::$alphabet, [
|
||||||
'label' => 'Nom commence par',
|
'label' => 'Nom commence par',
|
||||||
'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all',
|
'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col1 offset1 verticalAlignBottom">
|
||||||
|
<?php echo template::button('courseUserDeleteSelectAll', [
|
||||||
|
'value' => template::ico('square-check'),
|
||||||
|
'help' => 'Tout sélectionner'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1 verticalAlignBottom">
|
||||||
|
<?php echo template::button('courseUserDeleteSelectNone', [
|
||||||
|
'value' => template::ico('square-check-empty'),
|
||||||
|
'help' => 'Tout désélectionner'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($module::$courseUsers): ?>
|
<?php if (course::$courseUsers): ?>
|
||||||
<?php echo template::table([1, 2, 3, 3, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom', 'Étiquettes'], ['id' => 'dataTables']); ?>
|
<?php echo template::table([1, 2, 3, 3, 3], course::$courseUsers, ['', 'Id', 'Prénom', 'Nom', 'Étiquettes'], ['id' => 'dataTables']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun inscrit'); ?>
|
<?php echo template::speech('Aucun inscrit'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -18,10 +18,10 @@ class install extends common
|
|||||||
{
|
{
|
||||||
|
|
||||||
public static $actions = [
|
public static $actions = [
|
||||||
'index' => self::GROUP_VISITOR,
|
'index' => self::ROLE_VISITOR,
|
||||||
"postinstall" => self::GROUP_VISITOR,
|
"postinstall" => self::ROLE_VISITOR,
|
||||||
'steps' => self::GROUP_ADMIN,
|
'steps' => self::ROLE_ADMIN,
|
||||||
'update' => self::GROUP_ADMIN
|
'update' => self::ROLE_ADMIN
|
||||||
];
|
];
|
||||||
|
|
||||||
// Type de proxy
|
// Type de proxy
|
||||||
@ -119,6 +119,8 @@ class install extends common
|
|||||||
// Validation de la langue transmise
|
// Validation de la langue transmise
|
||||||
self::$i18nUI = $_SESSION['ZWII_UI'];
|
self::$i18nUI = $_SESSION['ZWII_UI'];
|
||||||
self::$i18nUI = array_key_exists(self::$i18nUI, self::$languages) ? self::$i18nUI : 'fr_FR';
|
self::$i18nUI = array_key_exists(self::$i18nUI, self::$languages) ? self::$i18nUI : 'fr_FR';
|
||||||
|
// Stockage de la langue par défaut afin d'afficher le site dans cette langue lors de l'affichage de la bannière de connexion.
|
||||||
|
$this->setData(['config', 'defaultLanguageUI', self::$i18nUI], false);
|
||||||
|
|
||||||
// Création du dossier de contenu avec le marqueur de langue par défaut
|
// Création du dossier de contenu avec le marqueur de langue par défaut
|
||||||
if (!is_dir(self::DATA_DIR . $_SESSION['ZWII_SITE_CONTENT'])) {
|
if (!is_dir(self::DATA_DIR . $_SESSION['ZWII_SITE_CONTENT'])) {
|
||||||
@ -133,7 +135,7 @@ class install extends common
|
|||||||
[
|
[
|
||||||
'firstname' => $userFirstname,
|
'firstname' => $userFirstname,
|
||||||
'forgot' => 0,
|
'forgot' => 0,
|
||||||
'group' => self::GROUP_ADMIN,
|
'role' => self::ROLE_ADMIN,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'lastname' => $userLastname,
|
'lastname' => $userLastname,
|
||||||
'pseudo' => 'Admin',
|
'pseudo' => 'Admin',
|
||||||
@ -158,9 +160,9 @@ class install extends common
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Sauvegarder la configuration du Proxy
|
// Sauvegarder la configuration du Proxy
|
||||||
$this->setData(['config', 'proxyType', $this->getInput('installProxyType')]);
|
$this->setData(['config', 'proxyType', $this->getInput('installProxyType')], false);
|
||||||
$this->setData(['config', 'proxyUrl', $this->getInput('installProxyUrl')]);
|
$this->setData(['config', 'proxyUrl', $this->getInput('installProxyUrl')], false);
|
||||||
$this->setData(['config', 'proxyPort', $this->getInput('installProxyPort', helper::FILTER_INT)]);
|
$this->setData(['config', 'proxyPort', $this->getInput('installProxyPort', helper::FILTER_INT)], false);
|
||||||
|
|
||||||
// Images exemples livrées dans tous les cas
|
// Images exemples livrées dans tous les cas
|
||||||
try {
|
try {
|
||||||
@ -203,7 +205,7 @@ class install extends common
|
|||||||
$this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR);
|
$this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR);
|
||||||
|
|
||||||
// Fixe l'adresse from pour les envois d'email
|
// Fixe l'adresse from pour les envois d'email
|
||||||
$this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])]);
|
$this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])], false);
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
@ -212,9 +214,10 @@ class install extends common
|
|||||||
'state' => true
|
'state' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
// Force la sauvegarde
|
||||||
|
$this->saveDB('config');
|
||||||
|
|
||||||
// Affichage du formulaire
|
// Affichage du formulaire
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
||||||
|
@ -64,7 +64,7 @@ class init extends common
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
'core' => [
|
'core' => [
|
||||||
'dataVersion' => 1700,
|
'dataVersion' => 12002,
|
||||||
'lastBackup' => 0,
|
'lastBackup' => 0,
|
||||||
'lastClearTmp' => 0,
|
'lastClearTmp' => 0,
|
||||||
'lastAutoUpdate' => 0,
|
'lastAutoUpdate' => 0,
|
||||||
@ -246,7 +246,7 @@ class init extends common
|
|||||||
'manage' => false,
|
'manage' => false,
|
||||||
'users' => false,
|
'users' => false,
|
||||||
'userHistory' => false,
|
'userHistory' => false,
|
||||||
'userHistoryExport' => false,
|
'userReportExport' => false,
|
||||||
'usersAdd' => false,
|
'usersAdd' => false,
|
||||||
'userDelete' => false,
|
'userDelete' => false,
|
||||||
'usersDelete' => false,
|
'usersDelete' => false,
|
||||||
@ -343,7 +343,7 @@ class init extends common
|
|||||||
'manage' => false,
|
'manage' => false,
|
||||||
'users' => false,
|
'users' => false,
|
||||||
'userHistory' => false,
|
'userHistory' => false,
|
||||||
'userHistoryExport' => false,
|
'userReportExport' => false,
|
||||||
'usersAdd' => false,
|
'usersAdd' => false,
|
||||||
'userDelete' => false,
|
'userDelete' => false,
|
||||||
'usersDelete' => false,
|
'usersDelete' => false,
|
||||||
@ -445,7 +445,7 @@ class init extends common
|
|||||||
'manage' => true,
|
'manage' => true,
|
||||||
'users' => true,
|
'users' => true,
|
||||||
'userHistory' => true,
|
'userHistory' => true,
|
||||||
'userHistoryExport' => true,
|
'userReportExport' => true,
|
||||||
'usersAdd' => true,
|
'usersAdd' => true,
|
||||||
'userDelete' => false,
|
'userDelete' => false,
|
||||||
'usersDelete' => false,
|
'usersDelete' => false,
|
||||||
@ -543,7 +543,7 @@ class init extends common
|
|||||||
'manage' => true,
|
'manage' => true,
|
||||||
'users' => true,
|
'users' => true,
|
||||||
'userHistory' => true,
|
'userHistory' => true,
|
||||||
'userHistoryExport' => true,
|
'userReportExport' => true,
|
||||||
'usersAdd' => true,
|
'usersAdd' => true,
|
||||||
'userDelete' => true,
|
'userDelete' => true,
|
||||||
'usersDelete' => true,
|
'usersDelete' => true,
|
||||||
@ -645,7 +645,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 1,
|
'position' => 1,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Accueil',
|
'title' => 'Accueil',
|
||||||
@ -676,7 +676,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 6,
|
'position' => 6,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Contact',
|
'title' => 'Contact',
|
||||||
@ -707,7 +707,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 0,
|
'position' => 0,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Mentions légales',
|
'title' => 'Mentions légales',
|
||||||
@ -739,7 +739,7 @@ class init extends common
|
|||||||
'modulePosition' => '',
|
'modulePosition' => '',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 0,
|
'position' => 0,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Maintenance en cours',
|
'title' => 'Maintenance en cours',
|
||||||
@ -771,7 +771,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 0,
|
'position' => 0,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Erreur 403',
|
'title' => 'Erreur 403',
|
||||||
@ -802,7 +802,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 0,
|
'position' => 0,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Erreur 404',
|
'title' => 'Erreur 404',
|
||||||
@ -903,7 +903,8 @@ class init extends common
|
|||||||
'selectSpace' => true,
|
'selectSpace' => true,
|
||||||
'burgerLogo' => '',
|
'burgerLogo' => '',
|
||||||
'burgerContent' => 'title',
|
'burgerContent' => 'title',
|
||||||
'width' => 'container'
|
'width' => 'container',
|
||||||
|
'hidePages' => false,
|
||||||
],
|
],
|
||||||
'site' => [
|
'site' => [
|
||||||
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
||||||
@ -937,7 +938,7 @@ class init extends common
|
|||||||
'config' => [
|
'config' => [
|
||||||
'button' => '',
|
'button' => '',
|
||||||
'captcha' => true,
|
'captcha' => true,
|
||||||
'group' => self::GROUP_ADMIN,
|
'role' => self::ROLE_ADMIN,
|
||||||
'pageId' => '',
|
'pageId' => '',
|
||||||
'subject' => ''
|
'subject' => ''
|
||||||
],
|
],
|
||||||
@ -1064,7 +1065,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 1,
|
'position' => 1,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Sommaire',
|
'title' => 'Sommaire',
|
||||||
@ -1095,7 +1096,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 1,
|
'position' => 1,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Première page',
|
'title' => 'Première page',
|
||||||
@ -1126,7 +1127,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 1,
|
'position' => 1,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Seconde page',
|
'title' => 'Seconde page',
|
||||||
@ -1157,7 +1158,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 1,
|
'position' => 1,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Troisième page',
|
'title' => 'Troisième page',
|
||||||
@ -1188,7 +1189,7 @@ class init extends common
|
|||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'position' => 0,
|
'position' => 0,
|
||||||
'group' => 0,
|
'role' => 0,
|
||||||
'profil' => 0,
|
'profil' => 0,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => 'Menu',
|
'title' => 'Menu',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'Do not display' creates an orphan page not accessible through menus.",
|
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'Do not display' creates an orphan page not accessible through menus.",
|
||||||
"'Sauvegarder et télécharger les données du module": "'Save and download module data",
|
"'Sauvegarder et télécharger les données du module": "'Save and download module data",
|
||||||
"1 jour": "1 jour",
|
"1 jour": "1 day",
|
||||||
"1/4 : Préparation...": "1/4: preparation ...",
|
"1/4 : Préparation...": "1/4: preparation ...",
|
||||||
"10 minutes": "10 minutes",
|
"10 minutes": "10 minutes",
|
||||||
"10 tentatives": "10 attempts",
|
"10 tentatives": "10 attempts",
|
||||||
@ -31,7 +31,7 @@
|
|||||||
"Adaptation": "Adaptation",
|
"Adaptation": "Adaptation",
|
||||||
"Administrateur": "Administrator",
|
"Administrateur": "Administrator",
|
||||||
"Administration": "Administration",
|
"Administration": "Administration",
|
||||||
"Adresse SMTP": "SMTP Address",
|
"Adresse SMTP": "SMTP address",
|
||||||
"Adresse du proxy": "Proxy address",
|
"Adresse du proxy": "Proxy address",
|
||||||
"Adresse électronique": "email address",
|
"Adresse électronique": "email address",
|
||||||
"Affectation": "Assignment",
|
"Affectation": "Assignment",
|
||||||
@ -60,10 +60,10 @@
|
|||||||
"Archive copiée dans le dossier Modules du gestionnaire de fichier": "Archive copied in the Modules folder",
|
"Archive copiée dans le dossier Modules du gestionnaire de fichier": "Archive copied in the Modules folder",
|
||||||
"Archive de thème invalide": "Invalid theme archive",
|
"Archive de thème invalide": "Invalid theme archive",
|
||||||
"Archive invalide": "Invalid archive",
|
"Archive invalide": "Invalid archive",
|
||||||
"Archive invalide, l'écriture dans le dossier core est interdite": "Invalid archive, writing in the core file is prohibited",
|
"Archive invalide, l'écriture dans le dossier core est interdite": "Invalid archive, writing in the core folder is prohibited",
|
||||||
"Archive invalide, le descripteur est absent": "Invalid archive, the descriptor is absent",
|
"Archive invalide, le descripteur est absent": "Invalid archive, the descriptor is absent",
|
||||||
"Archive invalide, le fichier de classe est absent": "Invalide archive, the class file is absent",
|
"Archive invalide, le fichier de classe est absent": "Invalid archive, the class file is absent",
|
||||||
"Archive invalide, les dossiers ne correspondent pas au descripteur": "Invalid archive, the files do not correspond to the descriptor",
|
"Archive invalide, les dossiers ne correspondent pas au descripteur": "Invalid archive, the files do not match the descriptor",
|
||||||
"Archive non spécifiée ou introuvable": "Archive not specified or not found",
|
"Archive non spécifiée ou introuvable": "Archive not specified or not found",
|
||||||
"Archive à restaurer": "Archive to restore",
|
"Archive à restaurer": "Archive to restore",
|
||||||
"Arrière plan": "Background",
|
"Arrière plan": "Background",
|
||||||
@ -86,7 +86,7 @@
|
|||||||
"Aucune liste noire à télécharger": "No blacklist to download",
|
"Aucune liste noire à télécharger": "No blacklist to download",
|
||||||
"Auteur :": "Author:",
|
"Auteur :": "Author:",
|
||||||
"Authentification": "Authentication",
|
"Authentification": "Authentication",
|
||||||
"Automatique": "Automatique",
|
"Automatique": "Automatic",
|
||||||
"Autoriser les robots à référencer le site": "Allow robots to reference the site",
|
"Autoriser les robots à référencer le site": "Allow robots to reference the site",
|
||||||
"Autorisé": "Allowed",
|
"Autorisé": "Allowed",
|
||||||
"Avant la bannière": "Before the banner",
|
"Avant la bannière": "Before the banner",
|
||||||
@ -104,9 +104,9 @@
|
|||||||
"Barre latérale": "Sidebar",
|
"Barre latérale": "Sidebar",
|
||||||
"Barre latérale droite :": "Right sidebar:",
|
"Barre latérale droite :": "Right sidebar:",
|
||||||
"Barre latérale gauche :": "Left sidebar:",
|
"Barre latérale gauche :": "Left sidebar:",
|
||||||
"Barres latérales": "Side bars",
|
"Barres latérales": "Sidebars",
|
||||||
"Bienvenue %s %s": "Welcome %s %s",
|
"Bienvenue %s %s": "Welcome %s %s",
|
||||||
"Blocage après échecs": "Blocking after chess",
|
"Blocage après échecs": "Blocking after failure",
|
||||||
"Blog": "Blog",
|
"Blog": "Blog",
|
||||||
"Bords arrondis": "Rounded edges",
|
"Bords arrondis": "Rounded edges",
|
||||||
"Bordure des blocs": "Blocks border",
|
"Bordure des blocs": "Blocks border",
|
||||||
@ -122,16 +122,16 @@
|
|||||||
"Caché": "Hidden",
|
"Caché": "Hidden",
|
||||||
"Cachée": "Hidden",
|
"Cachée": "Hidden",
|
||||||
"Captcha complexe": "Complex captcha",
|
"Captcha complexe": "Complex captcha",
|
||||||
"Captcha à la connexion": "Captcha at connecting",
|
"Captcha à la connexion": "Captcha",
|
||||||
"Captcha, identifiant ou mot de passe incorrects": "Incorrect captcha, login or password",
|
"Captcha, identifiant ou mot de passe incorrects": "Incorrect captcha, login or password",
|
||||||
"Capture d'écran Open Graph": "Open Graph screenshot",
|
"Capture d'écran Open Graph": "Open Graph screenshot",
|
||||||
"Capture d'écran générée avec succès": "Successful generated screenshot",
|
"Capture d'écran générée avec succès": "Successful generated screenshot",
|
||||||
"Casse": "Case",
|
"Casse": "Case",
|
||||||
"Catalogue": "Store",
|
"Catalogue": "Store",
|
||||||
"Catégorie": "Category",
|
"Catégorie": "Category",
|
||||||
"Ce membre pourra téléverser ou télécharger des fichiers dans le dossier 'partage' et ses sous-dossiers": "This member upload or download files in the 'Sharing' folder and its subfolders",
|
"Ce membre pourra téléverser ou télécharger des fichiers dans le dossier 'partage' et ses sous-dossiers": "This member can upload or download files in the 'Sharing' folder and its subfolders",
|
||||||
"Cette page ne doit pas apparaître dans l'arborescence du menu. Créez une page orpheline.": "This page should not appear in the menu tree. Create an orphan page.",
|
"Cette page ne doit pas apparaître dans l'arborescence du menu. Créez une page orpheline.": "This page should not appear in the menu tree. Create an orphan page.",
|
||||||
"Cette redirection ne concerne que les pages d'administration du site.": "This redirection only concerns the administration pages of the site.",
|
"Cette redirection ne concerne que les pages d'administration du site.": "This redirection only concerns the site administration pages.",
|
||||||
"Chaîne Youtube": "Youtube channel",
|
"Chaîne Youtube": "Youtube channel",
|
||||||
"Chiffres": "Numbers",
|
"Chiffres": "Numbers",
|
||||||
"Cible": "Target",
|
"Cible": "Target",
|
||||||
@ -158,8 +158,8 @@
|
|||||||
"Consulter l'aide en ligne": "Online help",
|
"Consulter l'aide en ligne": "Online help",
|
||||||
"Contents": "Contents",
|
"Contents": "Contents",
|
||||||
"Contenu": "Contents",
|
"Contenu": "Contents",
|
||||||
"Contenu HTML": "HTML contents",
|
"Contenu HTML": "HTML content",
|
||||||
"Contenu avancé": "Advanced contents",
|
"Contenu avancé": "Advanced content",
|
||||||
"Contenu du menu vertical": "Vertical menu content",
|
"Contenu du menu vertical": "Vertical menu content",
|
||||||
"Contrôle total": "Full control",
|
"Contrôle total": "Full control",
|
||||||
"Cookies": "Cookies",
|
"Cookies": "Cookies",
|
||||||
@ -174,7 +174,7 @@
|
|||||||
"Couleur de fond automatique": "Automatic background color",
|
"Couleur de fond automatique": "Automatic background color",
|
||||||
"Couleur icône haut de page": "Color of top page icon",
|
"Couleur icône haut de page": "Color of top page icon",
|
||||||
"Couleur texte page active": "Active page text color",
|
"Couleur texte page active": "Active page text color",
|
||||||
"Couleur unie ou papier-peint": "United color or wallpaper",
|
"Couleur unie ou papier-peint": "Plain color or wallpaper",
|
||||||
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence.": "Visible color in the absence of an image. <br /> The horizontal cursor regulates the level of transparency.",
|
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence.": "Visible color in the absence of an image. <br /> The horizontal cursor regulates the level of transparency.",
|
||||||
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.": "Visible color in the absence of an image. <br /> The horizontal cursor regulates the level of transparency. The color of the text is automatic.",
|
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.": "Visible color in the absence of an image. <br /> The horizontal cursor regulates the level of transparency. The color of the text is automatic.",
|
||||||
"Couleurs": "Colors",
|
"Couleurs": "Colors",
|
||||||
@ -190,8 +190,8 @@
|
|||||||
"Dossier": "Folder",
|
"Dossier": "Folder",
|
||||||
"Droits sur les dossiers": "Folder authorizations",
|
"Droits sur les dossiers": "Folder authorizations",
|
||||||
"Droits sur les fichiers": "File authorizations",
|
"Droits sur les fichiers": "File authorizations",
|
||||||
"Dupliquer": "Duplicate",
|
"Dupliquer": "Clone",
|
||||||
"Dupliquer la page": "Duplicate the page",
|
"Dupliquer la page": "Clone page",
|
||||||
"Déconnecte les sessions ouvertes précédemment sur d'autres navigateurs ou terminaux. Activation recommandée.": "Disconnects the previously opened sessions on other browsers or terminals. Recommended activation.",
|
"Déconnecte les sessions ouvertes précédemment sur d'autres navigateurs ou terminaux. Activation recommandée.": "Disconnects the previously opened sessions on other browsers or terminals. Recommended activation.",
|
||||||
"Déconnecter": "Disconnect",
|
"Déconnecter": "Disconnect",
|
||||||
"Déconnexion !": "Logout!",
|
"Déconnexion !": "Logout!",
|
||||||
@ -199,7 +199,7 @@
|
|||||||
"Définir par défaut": "Set as default",
|
"Définir par défaut": "Set as default",
|
||||||
"Dévoiler le mot de passe": "Reveal the password",
|
"Dévoiler le mot de passe": "Reveal the password",
|
||||||
"Effacer": "Delete",
|
"Effacer": "Delete",
|
||||||
"Effacer la page": "Delete the page",
|
"Effacer la page": "Delete page",
|
||||||
"Effacer tous les commentaires": "Delete all Comments",
|
"Effacer tous les commentaires": "Delete all Comments",
|
||||||
"Effacer toutes les statistiques": "Delete all statistics",
|
"Effacer toutes les statistiques": "Delete all statistics",
|
||||||
"Effacer un commentaire": "Delete Comment",
|
"Effacer un commentaire": "Delete Comment",
|
||||||
@ -212,9 +212,9 @@
|
|||||||
"En cas de changement de module, les données du module précédent seront supprimées.": "In the event of a module change, data from the previous module will be deleted.",
|
"En cas de changement de module, les données du module précédent seront supprimées.": "In the event of a module change, data from the previous module will be deleted.",
|
||||||
"En dessous du site": "Below the site",
|
"En dessous du site": "Below the site",
|
||||||
"En haut au centre": "Top in the center",
|
"En haut au centre": "Top in the center",
|
||||||
"En haut à droite": "Top right",
|
"En haut à droite": "Top right corner",
|
||||||
"En haut à gauche": "On the top corner left",
|
"En haut à gauche": "Top left corner",
|
||||||
"En position libre ajoutez le module en plaçant [MODULE] à l'endroit voulu dans votre page.": "In free position add the module by placing [module] to the desired location in your page.",
|
"En position libre ajoutez le module en plaçant [MODULE] à l'endroit voulu dans votre page.": "In free position add the module by placing [MODULE] to the desired location in your page.",
|
||||||
"En-dehors du site": "Outside the site",
|
"En-dehors du site": "Outside the site",
|
||||||
"Enregistrer": "Save",
|
"Enregistrer": "Save",
|
||||||
"Envoyer un message de confirmation": "Send a confirmation message",
|
"Envoyer un message de confirmation": "Send a confirmation message",
|
||||||
@ -226,7 +226,7 @@
|
|||||||
"Erreur de lecture, vérifiez les permissions": "Reading error, check permissions",
|
"Erreur de lecture, vérifiez les permissions": "Reading error, check permissions",
|
||||||
"Erreur inconnue": "unknown error",
|
"Erreur inconnue": "unknown error",
|
||||||
"Erreur inconnue, le module n'est pas installé": "Unknown error, the module is not installed",
|
"Erreur inconnue, le module n'est pas installé": "Unknown error, the module is not installed",
|
||||||
"Export CSV": "Export CSV",
|
"Export CSV": "CSV Export",
|
||||||
"Expéditeur": "From",
|
"Expéditeur": "From",
|
||||||
"Extension": "Extension",
|
"Extension": "Extension",
|
||||||
"Extraire": "Extract",
|
"Extraire": "Extract",
|
||||||
@ -260,10 +260,10 @@
|
|||||||
"Grande": "Large",
|
"Grande": "Large",
|
||||||
"Grande (220%)": "Grande (220%)",
|
"Grande (220%)": "Grande (220%)",
|
||||||
"Grande (300px)": "Grande (300px)",
|
"Grande (300px)": "Grande (300px)",
|
||||||
"Gras": "Fetter",
|
"Gras": "Bold",
|
||||||
"Groupe": "Group",
|
"Rôle": "role",
|
||||||
"Groupe associé": "Associated Group",
|
"Rôle associé": "Associated role",
|
||||||
"Groupe requis pour accéder à la page :": "Group required to access the page:",
|
"Rôle requis pour accéder à la page :": "role required to access the page:",
|
||||||
"Groupes": "Groups",
|
"Groupes": "Groups",
|
||||||
"Générer sitemap.xml et robots.txt": "Generate sitemap.xml and robots.txt",
|
"Générer sitemap.xml et robots.txt": "Generate sitemap.xml and robots.txt",
|
||||||
"Générer une capture Open Graph": "Generate an Open Graph capture",
|
"Générer une capture Open Graph": "Generate an Open Graph capture",
|
||||||
@ -295,7 +295,7 @@
|
|||||||
"Importer dans": "Import into",
|
"Importer dans": "Import into",
|
||||||
"Importer des utilisateurs en masse": "Import mass users",
|
"Importer des utilisateurs en masse": "Import mass users",
|
||||||
"Impossible d'ouvrir l'archive": "Impossible to open the archive",
|
"Impossible d'ouvrir l'archive": "Impossible to open the archive",
|
||||||
"Impossible de modifier votre propre groupe.": "Unable to modify your own group.",
|
"Impossible de modifier votre propre rôle.": "Unable to modify your own group.",
|
||||||
"Impossible de soumettre le formulaire, car il contient des erreurs": "Unable to submit the form, as it contains errors",
|
"Impossible de soumettre le formulaire, car il contient des erreurs": "Unable to submit the form, as it contains errors",
|
||||||
"Impossible de supprimer une page contenant des pages enfants": "Unable to delete a page containing children's pages",
|
"Impossible de supprimer une page contenant des pages enfants": "Unable to delete a page containing children's pages",
|
||||||
"Impossible de supprimer votre propre compte": "Unable to delete your own account",
|
"Impossible de supprimer votre propre compte": "Unable to delete your own account",
|
||||||
@ -318,7 +318,7 @@
|
|||||||
"Journalisation": "Journalization",
|
"Journalisation": "Journalization",
|
||||||
"L'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.": "The archive was deposited in the file manager. Archives below version 9 are not accepted.",
|
"L'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.": "The archive was deposited in the file manager. Archives below version 9 are not accepted.",
|
||||||
"L'identifiant est défini lors de la création du compte, il ne peut pas être modifié.": "The identifier is defined when creating the account, it cannot be changed.",
|
"L'identifiant est défini lors de la création du compte, il ne peut pas être modifié.": "The identifier is defined when creating the account, it cannot be changed.",
|
||||||
"La carte du site a été mise à jour": "The site card has been updated",
|
"La carte du site a été mise à jour": "The sitemap has been updated",
|
||||||
"La copie de sauvegarde du fichier htaccess n'a pas été restaurée !": "Backup copy of htaccess file has not been restored!",
|
"La copie de sauvegarde du fichier htaccess n'a pas été restaurée !": "Backup copy of htaccess file has not been restored!",
|
||||||
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "The description of a page participates in its referencing, each page must have a different description.",
|
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "The description of a page participates in its referencing, each page must have a different description.",
|
||||||
"La page %s est ouverte par l'utilisateur %s": "Page %s opened by user %s",
|
"La page %s est ouverte par l'utilisateur %s": "Page %s opened by user %s",
|
||||||
@ -340,8 +340,8 @@
|
|||||||
"Largeur": "Width",
|
"Largeur": "Width",
|
||||||
"Largeur de l'image": "Image Width",
|
"Largeur de l'image": "Image Width",
|
||||||
"Largeur du site": "Site Width",
|
"Largeur du site": "Site Width",
|
||||||
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "The horizontal cursor regulates the level of transparency, place it on the left for invisible highlights.",
|
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "The horizontal cursor sets the level of transparency, place it on the left for invisible highlights.",
|
||||||
"Le curseur horizontal règle le niveau de transparence.": "The horizontal cursor regulates the level of transparency.",
|
"Le curseur horizontal règle le niveau de transparence.": "The horizontal cursor sets the level of transparency.",
|
||||||
"Le fuseau horaire est utile au bon référencement": "The time zone is useful for the right SEO",
|
"Le fuseau horaire est utile au bon référencement": "The time zone is useful for the right SEO",
|
||||||
"Le menu accessoire est aligné à droite de la barre de menu, c'est un emplacement réservé aux drapeaux et au bouton de connexion.": "The accessory menu is aligned to the right of the menu bar, it is a place reserved for flags and the login button.",
|
"Le menu accessoire est aligné à droite de la barre de menu, c'est un emplacement réservé aux drapeaux et au bouton de connexion.": "The accessory menu is aligned to the right of the menu bar, it is a place reserved for flags and the login button.",
|
||||||
"Le menu horizontal intégral": "The full horizontal menu",
|
"Le menu horizontal intégral": "The full horizontal menu",
|
||||||
@ -349,7 +349,7 @@
|
|||||||
"Le module %s de la page %s a été supprimé": "The %s module of the %s has been deleted",
|
"Le module %s de la page %s a été supprimé": "The %s module of the %s has been deleted",
|
||||||
"Le module %s est désinstallé, il reste peut-être des données dans %s": "The module %s is uninstalled, there may be data in %s",
|
"Le module %s est désinstallé, il reste peut-être des données dans %s": "The module %s is uninstalled, there may be data in %s",
|
||||||
"Le sous-menu de la page parente": "The parent page submenu",
|
"Le sous-menu de la page parente": "The parent page submenu",
|
||||||
"Le survol d'une icône de l'écran de connexion affiche temporairement le mot de passe.": "Flyover of an icon on the connection screen temporarily displays the password.",
|
"Le survol d'une icône de l'écran de connexion affiche temporairement le mot de passe.": "Hovering over a login screen icon temporarily displays the password",
|
||||||
"Le titre court est affiché dans les menus. Il peut être identique au titre de la page.": "The short title is displayed in the menus. It can be identical to the page title.",
|
"Le titre court est affiché dans les menus. Il peut être identique au titre de la page.": "The short title is displayed in the menus. It can be identical to the page title.",
|
||||||
"Les langues sélectionnées sont identiques": "The selected languages are identical",
|
"Les langues sélectionnées sont identiques": "The selected languages are identical",
|
||||||
"Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.": "Legal notices are compulsory in France. An option of the footer adds a discrete link to this page.",
|
"Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.": "Legal notices are compulsory in France. An option of the footer adds a discrete link to this page.",
|
||||||
@ -359,7 +359,7 @@
|
|||||||
"Libre": "Libre",
|
"Libre": "Libre",
|
||||||
"Licence :": "Licence:",
|
"Licence :": "Licence:",
|
||||||
"Lien de connexion": "Login link",
|
"Lien de connexion": "Login link",
|
||||||
"Lien page des mentions légales.": "Link of legal notices.",
|
"Lien page des mentions légales.": "Link to legal notices.",
|
||||||
"Liens": "Links",
|
"Liens": "Links",
|
||||||
"Limitation des tentatives": "Limitation of attempts",
|
"Limitation des tentatives": "Limitation of attempts",
|
||||||
"Limitée au site": "Limited to the site",
|
"Limitée au site": "Limited to the site",
|
||||||
@ -371,7 +371,7 @@
|
|||||||
"Légère": "Light",
|
"Légère": "Light",
|
||||||
"Maigre": "Lean",
|
"Maigre": "Lean",
|
||||||
"Maintenance": "Maintenance",
|
"Maintenance": "Maintenance",
|
||||||
"Majuscule à chaque mot": "Capper with each word",
|
"Majuscule à chaque mot": "Capitalize each word",
|
||||||
"Majuscules": "Capital letters",
|
"Majuscules": "Capital letters",
|
||||||
"Marges verticales": "Vertical margins",
|
"Marges verticales": "Vertical margins",
|
||||||
"Masquer la bannière en écran réduit": "Hide the banner in reduced screen",
|
"Masquer la bannière en écran réduit": "Hide the banner in reduced screen",
|
||||||
@ -405,20 +405,20 @@
|
|||||||
"Modules installés": "Installed modules",
|
"Modules installés": "Installed modules",
|
||||||
"Modules orphelins": "Orphaned modules",
|
"Modules orphelins": "Orphaned modules",
|
||||||
"Mot de passe": "Password",
|
"Mot de passe": "Password",
|
||||||
"Mot de passe oublié": "Forgot your password",
|
"Mot de passe oublié": "Forgot password",
|
||||||
"Mot de passe perdu": "Lost password",
|
"Mot de passe perdu": "Lost password",
|
||||||
"Motorisé par": "Powered by",
|
"Motorisé par": "Powered by",
|
||||||
"Moyen": "Medium",
|
"Moyen": "Medium",
|
||||||
"Moyenne": "Medium",
|
"Moyenne": "Medium",
|
||||||
"Moyenne (200%)": "Average (200%)",
|
"Moyenne (200%)": "Medium (200%)",
|
||||||
"Moyenne (200px)": "Average (200px)",
|
"Moyenne (200px)": "Medium (200px)",
|
||||||
"Méta-description": "Meta-description",
|
"Méta-description": "Meta-description",
|
||||||
"Méta-titre": "Meta title",
|
"Méta-titre": "Meta title",
|
||||||
"Ne pas afficher": "Do not display",
|
"Ne pas afficher": "Do not display",
|
||||||
"Ne pas charger l'exemple de site (utilisateurs avancés)": "Do not load the example of a site (advanced users)",
|
"Ne pas charger l'exemple de site (utilisateurs avancés)": "Do not load the example of a site (advanced users)",
|
||||||
"Ne pas répéter": "Do not repeat",
|
"Ne pas répéter": "Do not repeat",
|
||||||
"Ne pas saisir les balises": "Don't type tags",
|
"Ne pas saisir les balises": "Don't type tags",
|
||||||
"News": "",
|
"News": "News",
|
||||||
"Niveau 1 (192.168.12.x)": "Level 1 (192.168.12.x)",
|
"Niveau 1 (192.168.12.x)": "Level 1 (192.168.12.x)",
|
||||||
"Niveau 2 (192.168.x.x)": "Level 2 (192.168.x.x)",
|
"Niveau 2 (192.168.x.x)": "Level 2 (192.168.x.x)",
|
||||||
"Niveau 3 (192.x.x.x)": "Level 3 (192.x.x.x)",
|
"Niveau 3 (192.x.x.x)": "Level 3 (192.x.x.x)",
|
||||||
@ -427,18 +427,18 @@
|
|||||||
"Nom du profil": "Profile Name",
|
"Nom du profil": "Profile Name",
|
||||||
"Nom utilisateur": "Username",
|
"Nom utilisateur": "Username",
|
||||||
"Non": "No",
|
"Non": "No",
|
||||||
"Non tronquée": "Unmanned",
|
"Non tronquée": "Untruncated",
|
||||||
"Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.": "Our site is currently under maintenance. We are sorry for the inconvenience caused and do our best to be quickly back.",
|
"Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.": "Our site is currently under maintenance. Sorry for the inconvenience and we do our best to be back soon.",
|
||||||
"Nouveau contenu localisé": "New localized content",
|
"Nouveau contenu localisé": "New localized content",
|
||||||
"Nouveau mot de passe": "New Password",
|
"Nouveau mot de passe": "New Password",
|
||||||
"Nouveau mot de passe enregistré": "New password recorded",
|
"Nouveau mot de passe enregistré": "New password recorded",
|
||||||
"Nouvel utilisateur": "New user",
|
"Nouvel utilisateur": "New user",
|
||||||
"Nouvelle page créée": "New page created",
|
"Nouvelle page créée": "New page created",
|
||||||
"Nouvelle page ou barre latérale": "New page or sidebar",
|
"Nouvelle page ou barre latérale": "New page or sidebar",
|
||||||
"Obligatoire": "Missing",
|
"Obligatoire": "Required",
|
||||||
"Ombre": "Shadow",
|
"Ombre": "Shadow",
|
||||||
"Option active en mode déconnecté uniquement, les pages enfants sont visibles et accessibles.": "Active option in disconnected mode only, children's pages are visible and accessible.",
|
"Option active en mode déconnecté uniquement, les pages enfants sont visibles et accessibles.": "Active option in disconnected mode only, children's pages are visible and accessible.",
|
||||||
"Option recommandée pour sécuriser la connexion. S'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.": "Recommended option to secure the connection. Applies to all the Captchas of the site. Simple Captcha is limited to an addition of numbers from 0 to 10. Complex Captcha uses four numbers of 0 to 20. Recommended activation.",
|
"Option recommandée pour sécuriser la connexion. S'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.": "Recommended option to secure the connection. Applies to all the Captchas of the site. Simple Captcha is limited to an addition of numbers from 0 to 10. Complex Captcha uses four numbers from 0 to 20. Recommended activation.",
|
||||||
"Options": "Options",
|
"Options": "Options",
|
||||||
"Options avancées": "Advanced options",
|
"Options avancées": "Advanced options",
|
||||||
"Origine": "Origin",
|
"Origine": "Origin",
|
||||||
@ -450,7 +450,7 @@
|
|||||||
"Page de recherche": "Search page",
|
"Page de recherche": "Search page",
|
||||||
"Page dupliquée": "Duplicate page",
|
"Page dupliquée": "Duplicate page",
|
||||||
"Page et module dupliqués": "Duplicated page and module",
|
"Page et module dupliqués": "Duplicated page and module",
|
||||||
"Page inexistante, erreur 404": "Page non-existent, error 404",
|
"Page inexistante, erreur 404": "Non-existent page, error 404",
|
||||||
"Page non cliquable": "Non-clickable page",
|
"Page non cliquable": "Non-clickable page",
|
||||||
"Page parent": "Parent page",
|
"Page parent": "Parent page",
|
||||||
"Page standard": "Standard page",
|
"Page standard": "Standard page",
|
||||||
@ -476,7 +476,7 @@
|
|||||||
"Permissions sur les pages": "Page Permissions",
|
"Permissions sur les pages": "Page Permissions",
|
||||||
"Petite": "Small",
|
"Petite": "Small",
|
||||||
"Petite (150px)": "Small (150px)",
|
"Petite (150px)": "Small (150px)",
|
||||||
"Petite (180%)": "Petite (180%)",
|
"Petite (180%)": "Small (180%)",
|
||||||
"Pied de page": "Footer",
|
"Pied de page": "Footer",
|
||||||
"Pinterest": "Pinterest",
|
"Pinterest": "Pinterest",
|
||||||
"Plan du site": "Sitemap",
|
"Plan du site": "Sitemap",
|
||||||
@ -489,10 +489,10 @@
|
|||||||
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "To define the page as a sidebar, choose the option from the list.",
|
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "To define the page as a sidebar, choose the option from the list.",
|
||||||
"Presse Papier": "Clipboard",
|
"Presse Papier": "Clipboard",
|
||||||
"Presse papier": "Clipboard",
|
"Presse papier": "Clipboard",
|
||||||
"Profils des groupes": "Group Profiles",
|
"Profils des rôles": "Group Profiles",
|
||||||
"Proportionnelle à la taille définie dans le site.": "Proportional to that defined in the site.",
|
"Proportionnelle à la taille définie dans le site.": "Proportional to the size defined in the site.",
|
||||||
"Prénom": "First name",
|
"Prénom": "First name",
|
||||||
"Prénom Nom": "Firstname name",
|
"Prénom Nom": "First name Name",
|
||||||
"Préparation de la mise à jour": "Preparation of the update",
|
"Préparation de la mise à jour": "Preparation of the update",
|
||||||
"Préserver le fichier htaccess racine": "Preserve the root htaccess file",
|
"Préserver le fichier htaccess racine": "Preserve the root htaccess file",
|
||||||
"Préserver les comptes des utilisateurs déjà installés": "Preserve user accounts already installed",
|
"Préserver les comptes des utilisateurs déjà installés": "Preserve user accounts already installed",
|
||||||
@ -579,7 +579,7 @@
|
|||||||
"Sur les deux axes": "On both axes",
|
"Sur les deux axes": "On both axes",
|
||||||
"Sécurité": "Security",
|
"Sécurité": "Security",
|
||||||
"Sécurité de la connexion": "Connection security",
|
"Sécurité de la connexion": "Connection security",
|
||||||
"Sécurité désactivée": "Safety deactivated",
|
"Sécurité désactivée": "Security disabled",
|
||||||
"Sélectionner un fichier": "Select a file",
|
"Sélectionner un fichier": "Select a file",
|
||||||
"Sélectionnez au moins un contenu à afficher": "Select at least one content to display",
|
"Sélectionnez au moins un contenu à afficher": "Select at least one content to display",
|
||||||
"Sélectionnez la langue à copier vers une langue cible": "Select the language to copy to a target language",
|
"Sélectionnez la langue à copier vers une langue cible": "Select the language to copy to a target language",
|
||||||
@ -686,8 +686,21 @@
|
|||||||
"Modèle": "Template",
|
"Modèle": "Template",
|
||||||
"Bouton de navigation droit": "Right Navigation Button",
|
"Bouton de navigation droit": "Right Navigation Button",
|
||||||
"Bouton de navigation gauche": "Left Navigation Button",
|
"Bouton de navigation gauche": "Left Navigation Button",
|
||||||
"Groupes / Profils": "Groups / Profiles",
|
"Rôles/ Profils": "Groups / Profiles",
|
||||||
"Prénom commence par": "First Name starts with",
|
"Prénom commence par": "First Name starts with",
|
||||||
"Nom commence par": "Last Name starts with",
|
"Nom commence par": "Last Name starts with",
|
||||||
"Impossible de réinitialiser le mot de passe de ce compte !": "Impossible to reset this account password!"
|
"Impossible de réinitialiser le mot de passe de ce compte !": "Impossible to reset this account password!",
|
||||||
|
"Test de la messagerie du site": "Site messaging test",
|
||||||
|
"Il semblerait que votre messagerie fonctionne correctement !": "It seems that your messaging is working correctly!",
|
||||||
|
"Message de test envoyé avec succès": "Test message sent successfully",
|
||||||
|
"Message non envoyé": "Message not sent",
|
||||||
|
"Validation par clé ⚠️": "Key-based validation ⚠️",
|
||||||
|
"La connexion est confirmée à l'aide d'une clé transmise par messagerie. Depuis le rôle sélectionné et les rôles supérieurs.": "The connection is confirmed using a key sent via messaging. From the selected group and the higher groups.",
|
||||||
|
"Envoi du message d'authentification": "Sending authentication message",
|
||||||
|
"Connexion réussie": "Login successful",
|
||||||
|
"Erreur de mot de passe": "Password error",
|
||||||
|
"Erreur de captcha": "Captcha error",
|
||||||
|
"Clé de sécurité": "Security key",
|
||||||
|
"Message de test": "Test message",
|
||||||
|
"Clé d'authentification envoyée à votre adresse mail %s": "Authentication key sent to your email address %s"
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'No mostrar' crea una página huérfana a la que no se puede acceder a través de los menús.",
|
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'No mostrar' crea una página huérfana a la que no se puede acceder a través de los menús.",
|
||||||
"'Sauvegarder et télécharger les données du module": "Guardar y descargar de los datos del módulo",
|
"'Sauvegarder et télécharger les données du module": "Guardar y descargar de los datos del módulo",
|
||||||
"1 jour": "1 Jour",
|
"1 jour": "1 diaz",
|
||||||
"1/4 : Préparation...": "1/4: Preparando...",
|
"1/4 : Préparation...": "1/4: Preparando...",
|
||||||
"10 minutes": "10 minutos",
|
"10 minutes": "10 minutos",
|
||||||
"10 tentatives": "6 intentos",
|
"10 tentatives": "6 intentos",
|
||||||
@ -261,9 +261,9 @@
|
|||||||
"Grande (220%)": "Grande (220%)",
|
"Grande (220%)": "Grande (220%)",
|
||||||
"Grande (300px)": "Grande (300px)",
|
"Grande (300px)": "Grande (300px)",
|
||||||
"Gras": "Negrita",
|
"Gras": "Negrita",
|
||||||
"Groupe": "Grupo",
|
"Rôle": "Grupo",
|
||||||
"Groupe associé": "Grupo asociado",
|
"Rôle associé": "Grupo asociado",
|
||||||
"Groupe requis pour accéder à la page :": "Grupo necesario para acceder a la página:",
|
"Rôle requis pour accéder à la page :": "Grupo necesario para acceder a la página:",
|
||||||
"Groupes": "Grupos",
|
"Groupes": "Grupos",
|
||||||
"Générer sitemap.xml et robots.txt": "Generar sitemap.xml y robots.txt",
|
"Générer sitemap.xml et robots.txt": "Generar sitemap.xml y robots.txt",
|
||||||
"Générer une capture Open Graph": "Generar una captura de Open Graph",
|
"Générer une capture Open Graph": "Generar una captura de Open Graph",
|
||||||
@ -295,7 +295,7 @@
|
|||||||
"Importer dans": "Importar a",
|
"Importer dans": "Importar a",
|
||||||
"Importer des utilisateurs en masse": "Importar usuarios de forma masiva",
|
"Importer des utilisateurs en masse": "Importar usuarios de forma masiva",
|
||||||
"Impossible d'ouvrir l'archive": "No se puede abrir el archivo",
|
"Impossible d'ouvrir l'archive": "No se puede abrir el archivo",
|
||||||
"Impossible de modifier votre propre groupe.": "No puede editar su propio grupo.",
|
"Impossible de modifier votre propre rôle.": "No puede editar su propio grupo.",
|
||||||
"Impossible de soumettre le formulaire, car il contient des erreurs": "No se puede enviar el formulario porque contiene errores",
|
"Impossible de soumettre le formulaire, car il contient des erreurs": "No se puede enviar el formulario porque contiene errores",
|
||||||
"Impossible de supprimer une page contenant des pages enfants": "No se puede eliminar una página que contiene páginas secundarias",
|
"Impossible de supprimer une page contenant des pages enfants": "No se puede eliminar una página que contiene páginas secundarias",
|
||||||
"Impossible de supprimer votre propre compte": "No puede eliminar su propia cuenta",
|
"Impossible de supprimer votre propre compte": "No puede eliminar su propia cuenta",
|
||||||
@ -322,7 +322,7 @@
|
|||||||
"La copie de sauvegarde du fichier htaccess n'a pas été restaurée !": "¡La copia de seguridad del archivo htaccess no ha sido restaurada!",
|
"La copie de sauvegarde du fichier htaccess n'a pas été restaurée !": "¡La copia de seguridad del archivo htaccess no ha sido restaurada!",
|
||||||
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "La descripción de una página participa en su referenciación, cada página debe tener una descripción diferente.",
|
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "La descripción de una página participa en su referenciación, cada página debe tener una descripción diferente.",
|
||||||
"La page %s est ouverte par l'utilisateur %s": "La página %s ha sido abierta por el usuario %s",
|
"La page %s est ouverte par l'utilisateur %s": "La página %s ha sido abierta por el usuario %s",
|
||||||
"La page demandée n'existe pas ou est introuvable (erreur 404)": "La page demandée n'existe pas ou est introuvable (erreur 404)",
|
"La page demandée n'existe pas ou est introuvable (erreur 404)": "La página solicitada no existe o no se encuentra (error 404).",
|
||||||
"La page est affichée dans un menu horizontal mais pas dans le menu vertical d'une barre latérale.": "La página se muestra en un menú horizontal pero no en el menú vertical de una barra lateral.",
|
"La page est affichée dans un menu horizontal mais pas dans le menu vertical d'une barre latérale.": "La página se muestra en un menú horizontal pero no en el menú vertical de una barra lateral.",
|
||||||
"La première page que vos visiteurs verront.": "La primera página que verán tus visitantes.",
|
"La première page que vos visiteurs verront.": "La primera página que verán tus visitantes.",
|
||||||
"La règlementation française impose un anonymat de niveau 2": "La normativa francesa impone el anonimato de nivel 2",
|
"La règlementation française impose un anonymat de niveau 2": "La normativa francesa impone el anonimato de nivel 2",
|
||||||
@ -476,7 +476,7 @@
|
|||||||
"Permissions sur les pages": "Permisos de las páginas",
|
"Permissions sur les pages": "Permisos de las páginas",
|
||||||
"Petite": "Pequeño",
|
"Petite": "Pequeño",
|
||||||
"Petite (150px)": "Pequeño (150px)",
|
"Petite (150px)": "Pequeño (150px)",
|
||||||
"Petite (180%)": "Petite (180%)",
|
"Petite (180%)": "Pequeño (180px)",
|
||||||
"Pied de page": "Pie de página",
|
"Pied de page": "Pie de página",
|
||||||
"Pinterest": "Pinterest",
|
"Pinterest": "Pinterest",
|
||||||
"Plan du site": "Mapa del sitio",
|
"Plan du site": "Mapa del sitio",
|
||||||
@ -489,7 +489,7 @@
|
|||||||
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "Para configurar la página como barra lateral, elija la opción de la lista.",
|
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "Para configurar la página como barra lateral, elija la opción de la lista.",
|
||||||
"Presse Papier": "Portapapeles",
|
"Presse Papier": "Portapapeles",
|
||||||
"Presse papier": "Portapapeles",
|
"Presse papier": "Portapapeles",
|
||||||
"Profils des groupes": "Perfiles de grupos",
|
"Profils des rôles": "Perfiles de grupos",
|
||||||
"Proportionnelle à la taille définie dans le site.": "Proporcional a la definida en el sitio.",
|
"Proportionnelle à la taille définie dans le site.": "Proporcional a la definida en el sitio.",
|
||||||
"Prénom": "Nombre de pila",
|
"Prénom": "Nombre de pila",
|
||||||
"Prénom Nom": "Nombre Apellido",
|
"Prénom Nom": "Nombre Apellido",
|
||||||
@ -686,8 +686,21 @@
|
|||||||
"Modèle": "Plantilla",
|
"Modèle": "Plantilla",
|
||||||
"Bouton de navigation droit": "Botón de navegación derecha",
|
"Bouton de navigation droit": "Botón de navegación derecha",
|
||||||
"Bouton de navigation gauche": "Botón de navegación izquierda",
|
"Bouton de navigation gauche": "Botón de navegación izquierda",
|
||||||
"Groupes / Profils": "Grupos / Perfiles",
|
"Rôles/ Profils": "Grupos / Perfiles",
|
||||||
"Prénom commence par": "El nombre comienza con",
|
"Prénom commence par": "El nombre comienza con",
|
||||||
"Nom commence par": "El apellido comienza con",
|
"Nom commence par": "El apellido comienza con",
|
||||||
"Impossible de réinitialiser le mot de passe de ce compte !": "No puedo restablecer la contraseña de esta cuenta."
|
"Impossible de réinitialiser le mot de passe de ce compte !": "No puedo restablecer la contraseña de esta cuenta.",
|
||||||
|
"Test de la messagerie du site": "Prueba de mensajería del sitio",
|
||||||
|
"Il semblerait que votre messagerie fonctionne correctement !": "¡Parece que su mensajería funciona correctamente!",
|
||||||
|
"Message de test envoyé avec succès": "Mensaje de prueba enviado con éxito",
|
||||||
|
"Message non envoyé": "Mensaje no enviado",
|
||||||
|
"Validation par clé ⚠️": "Validación por clave ⚠️",
|
||||||
|
"La connexion est confirmée à l'aide d'une clé transmise par messagerie. Depuis le rôle sélectionné et les rôles supérieurs.": "La conexión se confirma con una clave enviada por mensajería. Desde el grupo seleccionado y los grupos superiores.",
|
||||||
|
"Envoi du message d'authentification": "Envío del mensaje de autenticación",
|
||||||
|
"Connexion réussie": "Conexión exitosa",
|
||||||
|
"Erreur de mot de passe": "Error de contraseña",
|
||||||
|
"Erreur de captcha": "Error de captcha",
|
||||||
|
"Clé de sécurité": "Clave de seguridad",
|
||||||
|
"Message de test": "Mensaje de prueba",
|
||||||
|
"Clé d'authentification envoyée à votre adresse mail %s": "Clave de autenticación enviada a su dirección de correo electrónico %s"
|
||||||
}
|
}
|
@ -261,9 +261,9 @@
|
|||||||
"Grande (220%)": "",
|
"Grande (220%)": "",
|
||||||
"Grande (300px)": "",
|
"Grande (300px)": "",
|
||||||
"Gras": "",
|
"Gras": "",
|
||||||
"Groupe": "",
|
"Rôle": "",
|
||||||
"Groupe associé": "",
|
"Rôle associé": "",
|
||||||
"Groupe requis pour accéder à la page :": "",
|
"Rôle requis pour accéder à la page :": "",
|
||||||
"Groupes": "",
|
"Groupes": "",
|
||||||
"Générer sitemap.xml et robots.txt": "",
|
"Générer sitemap.xml et robots.txt": "",
|
||||||
"Générer une capture Open Graph": "",
|
"Générer une capture Open Graph": "",
|
||||||
@ -295,7 +295,7 @@
|
|||||||
"Importer dans": "",
|
"Importer dans": "",
|
||||||
"Importer des utilisateurs en masse": "",
|
"Importer des utilisateurs en masse": "",
|
||||||
"Impossible d'ouvrir l'archive": "",
|
"Impossible d'ouvrir l'archive": "",
|
||||||
"Impossible de modifier votre propre groupe.": "",
|
"Impossible de modifier votre propre rôle.": "",
|
||||||
"Impossible de soumettre le formulaire, car il contient des erreurs": "",
|
"Impossible de soumettre le formulaire, car il contient des erreurs": "",
|
||||||
"Impossible de supprimer une page contenant des pages enfants": "",
|
"Impossible de supprimer une page contenant des pages enfants": "",
|
||||||
"Impossible de supprimer votre propre compte": "",
|
"Impossible de supprimer votre propre compte": "",
|
||||||
@ -489,7 +489,7 @@
|
|||||||
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "",
|
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "",
|
||||||
"Presse Papier": "",
|
"Presse Papier": "",
|
||||||
"Presse papier": "",
|
"Presse papier": "",
|
||||||
"Profils des groupes": "",
|
"Profils des rôles": "",
|
||||||
"Proportionnelle à la taille définie dans le site.": "",
|
"Proportionnelle à la taille définie dans le site.": "",
|
||||||
"Prénom": "",
|
"Prénom": "",
|
||||||
"Prénom Nom": "",
|
"Prénom Nom": "",
|
||||||
@ -686,8 +686,21 @@
|
|||||||
"Modèle": "",
|
"Modèle": "",
|
||||||
"Bouton de navigation droit": "",
|
"Bouton de navigation droit": "",
|
||||||
"Bouton de navigation gauche": "",
|
"Bouton de navigation gauche": "",
|
||||||
"Groupes / Profils": "",
|
"Rôles/ Profils": "",
|
||||||
"Prénom commence par": "",
|
"Prénom commence par": "",
|
||||||
"Nom commence par": "",
|
"Nom commence par": "",
|
||||||
"Impossible de réinitialiser le mot de passe de ce compte !": ""
|
"Impossible de réinitialiser le mot de passe de ce compte !": "",
|
||||||
|
"Test de la messagerie du site": "",
|
||||||
|
"Il semblerait que votre messagerie fonctionne correctement !": "",
|
||||||
|
"Message de test envoyé avec succès": "",
|
||||||
|
"Message non envoyé": "",
|
||||||
|
"Validation par clé ⚠️": "",
|
||||||
|
"La connexion est confirmée à l'aide d'une clé transmise par messagerie. Depuis le rôle sélectionné et les rôles supérieurs.": "",
|
||||||
|
"Envoi du message d'authentification": "",
|
||||||
|
"Connexion réussie": "",
|
||||||
|
"Erreur de mot de passe": "",
|
||||||
|
"Erreur de captcha": "",
|
||||||
|
"Clé de sécurité": "",
|
||||||
|
"Message de test": "",
|
||||||
|
"Clé d'authentification envoyée à votre adresse mail %s": ""
|
||||||
}
|
}
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -16,3 +16,7 @@
|
|||||||
/** NE PAS EFFACER
|
/** NE PAS EFFACER
|
||||||
* admin.css
|
* admin.css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.container.light {
|
||||||
|
filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.2));
|
||||||
|
}
|
@ -4,9 +4,9 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6 offset3">
|
<div class="col6 offset3">
|
||||||
<?php echo template::select('installLanguage', $module::$i18nFiles, [
|
<?php echo template::select('installLanguage', install::$i18nFiles, [
|
||||||
'label' => 'Langues installées',
|
'label' => 'Langues installées',
|
||||||
'selected' => array_key_exists ('fr_FR', $module::$i18nFiles) ? 'fr_FR': reset($module::$i18nFiles),
|
'selected' => isset(self::$i18nUI) ? self::$i18nUI : 'fr_FR',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -20,3 +20,7 @@
|
|||||||
.title {
|
.title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container.light {
|
||||||
|
filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.2));
|
||||||
|
}
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('installProxyType', $module::$proxyType, [
|
<?php echo template::select('installProxyType', install::$proxyType, [
|
||||||
'label' => 'Type de proxy'
|
'label' => 'Type de proxy'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<?php echo self::ZWII_VERSION; ?>
|
<?php echo self::ZWII_VERSION; ?>
|
||||||
<?php echo helper::translate('vers'); ?>
|
<?php echo helper::translate('vers'); ?>
|
||||||
|
|
||||||
<?php echo $module::$newVersion; ?>
|
<?php echo install::$newVersion; ?>
|
||||||
</strong></p>
|
</strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php echo helper::translate('Afin d\'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l\'opération.'); ?>
|
<?php echo helper::translate('Afin d\'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l\'opération.'); ?>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -20,19 +20,19 @@ class language extends common
|
|||||||
const ZWII_UI_URL = 'https://forge.chapril.org/ZwiiCMS-Team/zwiicms-translations/raw/branch/master/v13/';
|
const ZWII_UI_URL = 'https://forge.chapril.org/ZwiiCMS-Team/zwiicms-translations/raw/branch/master/v13/';
|
||||||
|
|
||||||
public static $actions = [
|
public static $actions = [
|
||||||
'index' => self::GROUP_ADMIN,
|
'index' => self::ROLE_ADMIN,
|
||||||
'copy' => self::GROUP_ADMIN,
|
'copy' => self::ROLE_ADMIN,
|
||||||
'add' => self::GROUP_ADMIN,
|
'add' => self::ROLE_ADMIN,
|
||||||
// Ajouter une langue de contenu
|
// Ajouter une langue de contenu
|
||||||
'edit' => self::GROUP_ADMIN,
|
'edit' => self::ROLE_ADMIN,
|
||||||
// Éditer une langue de l'UI
|
// Éditer une langue de l'UI
|
||||||
'locale' => self::GROUP_ADMIN,
|
'locale' => self::ROLE_ADMIN,
|
||||||
// Éditer une langue de contenu
|
// Éditer une langue de contenu
|
||||||
'delete' => self::GROUP_ADMIN,
|
'delete' => self::ROLE_ADMIN,
|
||||||
// Effacer une langue de contenu ou de l'interface
|
// Effacer une langue de contenu ou de l'interface
|
||||||
'content' => self::GROUP_VISITOR,
|
'content' => self::ROLE_VISITOR,
|
||||||
'update' => self::GROUP_ADMIN,
|
'update' => self::ROLE_ADMIN,
|
||||||
'default' => self::GROUP_ADMIN
|
'default' => self::ROLE_ADMIN
|
||||||
];
|
];
|
||||||
|
|
||||||
const PAGINATION = '20';
|
const PAGINATION = '20';
|
||||||
@ -91,16 +91,15 @@ class language extends common
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Télécharger le descripteur en ligne
|
// Télécharger le descripteur en ligne
|
||||||
$languageData = json_decode(helper::getUrlContents(self::ZWII_UI_URL . $lang . '.json'), true);
|
$languageData = helper::getUrlContents(self::ZWII_UI_URL . $lang . '.json');
|
||||||
$descripteur = json_decode(helper::getUrlContents(self::ZWII_UI_URL . 'language.json'), true);
|
$descripteur = json_decode(helper::getUrlContents(self::ZWII_UI_URL . 'language.json'), true);
|
||||||
$success = false;
|
$success = false;
|
||||||
if (
|
if (
|
||||||
is_array($languageData) &&
|
$languageData &&
|
||||||
is_array($descripteur['language'][$lang])
|
is_array($descripteur['language'][$lang])
|
||||||
) {
|
) {
|
||||||
if ($this->setData(['language', $lang, $descripteur['language'][$lang]])) {
|
if ($this->setData(['language', $lang, $descripteur['language'][$lang]])) {
|
||||||
$success = $this->secure_file_put_contents(self::I18N_DIR . $lang . '.json', json_encode($languageData, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
$success = $this->secure_file_put_contents(self::I18N_DIR . $lang . '.json', $languageData);
|
||||||
$success = is_int($success) ? true : false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +500,7 @@ class language extends common
|
|||||||
$data[$key] = $target;
|
$data[$key] = $target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_put_contents(self::I18N_DIR . $lang . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX);
|
file_put_contents(self::I18N_DIR . $lang . '.json', json_encode($data));
|
||||||
|
|
||||||
// Mettre à jour le descripteur
|
// Mettre à jour le descripteur
|
||||||
$this->setData([
|
$this->setData([
|
||||||
@ -529,13 +528,18 @@ class language extends common
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ajout des champs absents selon la langue de référence
|
// Ajout des champs absents selon la langue de référence
|
||||||
|
/*
|
||||||
$dataFr = json_decode(file_get_contents(self::I18N_DIR . 'fr_FR.json'), true);
|
$dataFr = json_decode(file_get_contents(self::I18N_DIR . 'fr_FR.json'), true);
|
||||||
foreach ($dataFr as $key => $value) {
|
foreach ($dataFr as $key => $value) {
|
||||||
if (!array_key_exists($key, $data)) {
|
if (!array_key_exists($key, $data)) {
|
||||||
$data[$key] = '';
|
$data[$key] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_put_contents(self::I18N_DIR . $lang . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX);
|
file_put_contents(self::I18N_DIR . $lang . '.json', $data);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Trier le tableau
|
||||||
|
asort($data);
|
||||||
|
|
||||||
// Tableau des chaines à traduire dans la langue sélectionnée
|
// Tableau des chaines à traduire dans la langue sélectionnée
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
@ -558,7 +562,7 @@ class language extends common
|
|||||||
'title' => helper::translate('Éditer les dialogues') . ' ' . template::flag($lang, '20 %'),
|
'title' => helper::translate('Éditer les dialogues') . ' ' . template::flag($lang, '20 %'),
|
||||||
'view' => 'edit',
|
'view' => 'edit',
|
||||||
'vendor' => [
|
'vendor' => [
|
||||||
'flatpickr',
|
'tablednd'
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4 offset4">
|
<div class="col4 offset4">
|
||||||
<?php echo template::select('translateAddContent', $module::$i18nFiles, [
|
<?php echo template::select('translateAddContent', language::$i18nFiles, [
|
||||||
'label' => 'Langues disponibles'
|
'label' => 'Langues disponibles'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -20,12 +20,12 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('translateFormCopySource', $module::$languagesInstalled, [
|
<?php echo template::select('translateFormCopySource', language::$languagesInstalled, [
|
||||||
'label' => 'Source'
|
'label' => 'Source'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('translateFormCopyTarget', $module::$languagesTarget, [
|
<?php echo template::select('translateFormCopyTarget', language::$languagesTarget, [
|
||||||
'label' => 'Cible'
|
'label' => 'Cible'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<?php foreach ($module::$dialogues as $key => $value) : ?>
|
<?php foreach (language::$dialogues as $key => $value) : ?>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo sprintf('%g -', $key); ?>
|
<?php echo sprintf('%g -', $key); ?>
|
||||||
<?php echo $value['source']; ?>
|
<?php echo $value['source']; ?>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $module::$pages; ?>
|
<?php echo language::$pages; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Langues installées'); ?>
|
<?php echo helper::translate('Langues installées'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<?php if ($module::$languagesUiInstalled): ?>
|
<?php if (language::$languagesUiInstalled): ?>
|
||||||
<?php echo template::table([2, 1, 1, 5, 1, 1], $module::$languagesUiInstalled, ['Langues', 'Version', 'Date', '', '', '']); ?>
|
<?php echo template::table([2, 1, 1, 4, 1, 1, 1], language::$languagesUiInstalled, ['Langues', 'Version', 'Date', '', '', '', '']); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -35,8 +35,8 @@
|
|||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Catalogue'); ?>
|
<?php echo helper::translate('Catalogue'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<?php if ($module::$languagesStore): ?>
|
<?php if (language::$languagesStore): ?>
|
||||||
<?php echo template::table([2, 1, 2, 6, 1], $module::$languagesStore, ['Langues', 'Version', 'Date', '', '']); ?>
|
<?php echo template::table([2, 1, 2, 6, 1], language::$languagesStore, ['Langues', 'Version', 'Date', '', '']); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -17,7 +17,7 @@ class maintenance extends common
|
|||||||
{
|
{
|
||||||
|
|
||||||
public static $actions = [
|
public static $actions = [
|
||||||
'index' => self::GROUP_VISITOR
|
'index' => self::ROLE_VISITOR
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -18,12 +18,12 @@ class page extends common
|
|||||||
{
|
{
|
||||||
|
|
||||||
public static $actions = [
|
public static $actions = [
|
||||||
'add' => self::GROUP_EDITOR,
|
'add' => self::ROLE_EDITOR,
|
||||||
'delete' => self::GROUP_EDITOR,
|
'delete' => self::ROLE_EDITOR,
|
||||||
'edit' => self::GROUP_EDITOR,
|
'edit' => self::ROLE_EDITOR,
|
||||||
'duplicate' => self::GROUP_EDITOR,
|
'duplicate' => self::ROLE_EDITOR,
|
||||||
'jsEditor' => self::GROUP_EDITOR,
|
'jsEditor' => self::ROLE_EDITOR,
|
||||||
'cssEditor' => self::GROUP_EDITOR
|
'cssEditor' => self::ROLE_EDITOR,
|
||||||
];
|
];
|
||||||
public static $pagesNoParentId = [
|
public static $pagesNoParentId = [
|
||||||
'' => 'Aucune'
|
'' => 'Aucune'
|
||||||
@ -118,14 +118,16 @@ class page extends common
|
|||||||
$page
|
$page
|
||||||
]);
|
]);
|
||||||
// Ecriture
|
// Ecriture
|
||||||
$this->setData(['page', $pageId, $data]);
|
$this->setData(['page', $pageId, $data], false);
|
||||||
$notification = helper::translate('Page dupliquée');
|
$notification = helper::translate('Page dupliquée');
|
||||||
// Duplication du module présent
|
// Duplication du module présent
|
||||||
if ($this->getData(['page', $page, 'moduleId'])) {
|
if ($this->getData(['page', $page, 'moduleId'])) {
|
||||||
$data = $this->getData(['module', $page]);
|
$data = $this->getData(['module', $page]);
|
||||||
$this->setData(['module', $pageId, $data]);
|
$this->setData(['module', $pageId, $data], false);
|
||||||
$notification = helper::translate('Page et module dupliqués');
|
$notification = helper::translate('Page et module dupliqués');
|
||||||
}
|
}
|
||||||
|
// Force la sauvegarde
|
||||||
|
$this->saveDB('page');
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
@ -178,7 +180,7 @@ class page extends common
|
|||||||
'parentPageId' => '',
|
'parentPageId' => '',
|
||||||
'modulePosition' => 'bottom',
|
'modulePosition' => 'bottom',
|
||||||
'position' => 0,
|
'position' => 0,
|
||||||
'group' => self::GROUP_VISITOR,
|
'role' => self::ROLE_VISITOR,
|
||||||
'targetBlank' => false,
|
'targetBlank' => false,
|
||||||
'title' => $pageTitle,
|
'title' => $pageTitle,
|
||||||
'shortTitle' => $pageTitle,
|
'shortTitle' => $pageTitle,
|
||||||
@ -203,8 +205,8 @@ class page extends common
|
|||||||
//file_put_contents(self::DATA_DIR . self::$siteContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
|
//file_put_contents(self::DATA_DIR . self::$siteContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
|
||||||
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$siteContent);
|
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$siteContent);
|
||||||
|
|
||||||
// Met à jour le sitemap
|
// Ne met à jour le sitemap pour éviter un warning, de toute manière la nouvelle page doit être éditée.
|
||||||
$this->updateSitemap();
|
// $this->updateSitemap();
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
@ -390,11 +392,11 @@ class page extends common
|
|||||||
$pageId = helper::increment($pageId, self::$moduleIds);
|
$pageId = helper::increment($pageId, self::$moduleIds);
|
||||||
// Met à jour les enfants
|
// Met à jour les enfants
|
||||||
foreach ($this->getHierarchy($this->getUrl(2), null) as $childrenPageId) {
|
foreach ($this->getHierarchy($this->getUrl(2), null) as $childrenPageId) {
|
||||||
$this->setData(['page', $childrenPageId, 'parentPageId', $pageId]);
|
$this->setData(['page', $childrenPageId, 'parentPageId', $pageId], false);
|
||||||
}
|
}
|
||||||
// Change l'id de page dans les données des modules
|
// Change l'id de page dans les données des modules
|
||||||
if ($this->getData(['module', $this->getUrl(2)]) !== null) {
|
if ($this->getData(['module', $this->getUrl(2)]) !== null) {
|
||||||
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])]);
|
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])], false);
|
||||||
$this->deleteData(['module', $this->getUrl(2)]);
|
$this->deleteData(['module', $this->getUrl(2)]);
|
||||||
// Renommer le dossier du module
|
// Renommer le dossier du module
|
||||||
$moduleId = $this->getData(['page', $this->getUrl(2), 'moduleId']);
|
$moduleId = $this->getData(['page', $this->getUrl(2), 'moduleId']);
|
||||||
@ -405,10 +407,14 @@ class page extends common
|
|||||||
copy($modulesData[$moduleId]['dataDirectory'] . $this->getUrl(2), $modulesData[$moduleId]['dataDirectory'] . $pageId);
|
copy($modulesData[$moduleId]['dataDirectory'] . $this->getUrl(2), $modulesData[$moduleId]['dataDirectory'] . $pageId);
|
||||||
$this->deleteDir($modulesData[$moduleId]['dataDirectory'] . $this->getUrl(2));
|
$this->deleteDir($modulesData[$moduleId]['dataDirectory'] . $this->getUrl(2));
|
||||||
// Mettre à jour le nom de la feuille de style
|
// Mettre à jour le nom de la feuille de style
|
||||||
$this->setData(['module', $pageId, 'theme', 'style', $modulesData[$moduleId]['dataDirectory'] . $pageId]);
|
$this->setData(['module', $pageId, 'theme', 'style', $modulesData[$moduleId]['dataDirectory'] . $pageId], false);
|
||||||
}
|
}
|
||||||
|
// Sauvegarde la base manuellement
|
||||||
|
$this->saveDB('module');
|
||||||
}
|
}
|
||||||
// Met à jour les historiques des utilisateurs
|
/*
|
||||||
|
*
|
||||||
|
* Met à jour les historiques des utilisateurs
|
||||||
foreach ($this->getData(['enrolment', self::$siteContent]) as $userId => $userData) {
|
foreach ($this->getData(['enrolment', self::$siteContent]) as $userId => $userData) {
|
||||||
// Vérifier si l'utilisateur a un historique
|
// Vérifier si l'utilisateur a un historique
|
||||||
if (
|
if (
|
||||||
@ -417,14 +423,18 @@ class page extends common
|
|||||||
) {
|
) {
|
||||||
// Remplacer l'ancienne ID par la nouvelle
|
// Remplacer l'ancienne ID par la nouvelle
|
||||||
$datas = $this->getData(['enrolment', self::$siteContent, $userId, 'history', $this->getUrl(2)]);
|
$datas = $this->getData(['enrolment', self::$siteContent, $userId, 'history', $this->getUrl(2)]);
|
||||||
$this->setData(['enrolment', self::$siteContent, $userId, 'history', $pageId, $datas]);
|
$this->setData(['enrolment', self::$siteContent, $userId, 'history', $pageId, $datas], false);
|
||||||
$this->deleteData(['enrolment', self::$siteContent, $userId, 'history', $this->getUrl(2)]);
|
$this->deleteData(['enrolment', self::$siteContent, $userId, 'history', $this->getUrl(2)]);
|
||||||
}
|
}
|
||||||
// Mettre à jour la dernière page vue si nécessaire
|
// Mettre à jour la dernière page vue si nécessaire
|
||||||
if ($this->getData(['enrolment', self::$siteContent, $userId, 'lastPageView']) === $this->getUrl(2)) {
|
if ($this->getData(['enrolment', self::$siteContent, $userId, 'lastPageView']) === $this->getUrl(2)) {
|
||||||
$this->setData(['enrolment', self::$siteContent, $userId, 'lastPageView', $pageId]);
|
$this->setData(['enrolment', self::$siteContent, $userId, 'lastPageView', $pageId], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Sauvegarde la base manuellement
|
||||||
|
$this->saveDB('enrolment');
|
||||||
|
**/
|
||||||
|
|
||||||
// Met à jour la homePage si nécessaire
|
// Met à jour la homePage si nécessaire
|
||||||
if ($this->getUrl(2) === $this->getData(['course', self::$siteContent, 'homePageId'])) {
|
if ($this->getUrl(2) === $this->getData(['course', self::$siteContent, 'homePageId'])) {
|
||||||
$this->setData(['course', self::$siteContent, 'homePageId', $pageId]);
|
$this->setData(['course', self::$siteContent, 'homePageId', $pageId]);
|
||||||
@ -432,7 +442,7 @@ class page extends common
|
|||||||
|
|
||||||
// Si la page correspond à la page d'accueil, change l'id dans la configuration du site
|
// Si la page correspond à la page d'accueil, change l'id dans la configuration du site
|
||||||
if ($this->getData(['config', 'homePageId']) === $this->getUrl(2)) {
|
if ($this->getData(['config', 'homePageId']) === $this->getUrl(2)) {
|
||||||
$this->setData(['config', 'homePageId', $pageId]);
|
$this->setData(['config', 'homePageId', $pageId], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Supprime les données du module en cas de changement de module
|
// Supprime les données du module en cas de changement de module
|
||||||
@ -448,20 +458,22 @@ class page extends common
|
|||||||
}
|
}
|
||||||
// Traitement des pages spéciales affectées dans la config :
|
// Traitement des pages spéciales affectées dans la config :
|
||||||
if ($this->getUrl(2) === $this->getData(['config', 'legalPageId'])) {
|
if ($this->getUrl(2) === $this->getData(['config', 'legalPageId'])) {
|
||||||
$this->setData(['config', 'legalPageId', $pageId]);
|
$this->setData(['config', 'legalPageId', $pageId], false);
|
||||||
}
|
}
|
||||||
if ($this->getUrl(2) === $this->getData(['config', 'searchPageId'])) {
|
if ($this->getUrl(2) === $this->getData(['config', 'searchPageId'])) {
|
||||||
$this->setData(['config', 'searchPageId', $pageId]);
|
$this->setData(['config', 'searchPageId', $pageId], false);
|
||||||
}
|
}
|
||||||
if ($this->getUrl(2) === $this->getData(['config', 'page404'])) {
|
if ($this->getUrl(2) === $this->getData(['config', 'page404'])) {
|
||||||
$this->setData(['config', 'page404', $pageId]);
|
$this->setData(['config', 'page404', $pageId], false);
|
||||||
}
|
}
|
||||||
if ($this->getUrl(2) === $this->getData(['config', 'page403'])) {
|
if ($this->getUrl(2) === $this->getData(['config', 'page403'])) {
|
||||||
$this->setData(['config', 'page403', $pageId]);
|
$this->setData(['config', 'page403', $pageId], false);
|
||||||
}
|
}
|
||||||
if ($this->getUrl(2) === $this->getData(['config', 'page302'])) {
|
if ($this->getUrl(2) === $this->getData(['config', 'page302'])) {
|
||||||
$this->setData(['config', 'page302', $pageId]);
|
$this->setData(['config', 'page302', $pageId], false);
|
||||||
}
|
}
|
||||||
|
// Sauvegarde la base manuellement
|
||||||
|
$this->saveDB('config');
|
||||||
// Si la page est une page enfant, actualise les positions des autres enfants du parent, sinon actualise les pages sans parents
|
// Si la page est une page enfant, actualise les positions des autres enfants du parent, sinon actualise les pages sans parents
|
||||||
$lastPosition = 1;
|
$lastPosition = 1;
|
||||||
$hierarchy = $this->getInput('pageEditParentPageId') ? $this->getHierarchy($this->getInput('pageEditParentPageId')) : array_keys($this->getHierarchy());
|
$hierarchy = $this->getInput('pageEditParentPageId') ? $this->getHierarchy($this->getInput('pageEditParentPageId')) : array_keys($this->getHierarchy());
|
||||||
@ -480,11 +492,12 @@ class page extends common
|
|||||||
$lastPosition++;
|
$lastPosition++;
|
||||||
}
|
}
|
||||||
// Change la position
|
// Change la position
|
||||||
$this->setData(['page', $hierarchyPageId, 'position', $lastPosition]);
|
$this->setData(['page', $hierarchyPageId, 'position', $lastPosition], false);
|
||||||
// Incrémente pour la prochaine position
|
// Incrémente pour la prochaine position
|
||||||
$lastPosition++;
|
$lastPosition++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getinput('pageEditBlock') !== 'bar') {
|
if ($this->getinput('pageEditBlock') !== 'bar') {
|
||||||
$barLeft = $this->getinput('pageEditBarLeft');
|
$barLeft = $this->getinput('pageEditBarLeft');
|
||||||
$barRight = $this->getinput('pageEditBarRight');
|
$barRight = $this->getinput('pageEditBarRight');
|
||||||
@ -505,7 +518,7 @@ class page extends common
|
|||||||
) {
|
) {
|
||||||
foreach ($this->getHierarchy($pageId) as $parentId => $childId) {
|
foreach ($this->getHierarchy($pageId) as $parentId => $childId) {
|
||||||
if ($this->getData(['page', $childId, 'parentPageId']) === $pageId) {
|
if ($this->getData(['page', $childId, 'parentPageId']) === $pageId) {
|
||||||
$this->setData(['page', $childId, 'position', 0]);
|
$this->setData(['page', $childId, 'position', 0], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -514,32 +527,32 @@ class page extends common
|
|||||||
if ($this->getinput('pageEditBlock') === 'bar') {
|
if ($this->getinput('pageEditBlock') === 'bar') {
|
||||||
foreach ($this->getHierarchy() as $eachPageId => $parentId) {
|
foreach ($this->getHierarchy() as $eachPageId => $parentId) {
|
||||||
if ($this->getData(['page', $eachPageId, 'barRight']) === $this->getUrl(2)) {
|
if ($this->getData(['page', $eachPageId, 'barRight']) === $this->getUrl(2)) {
|
||||||
$this->setData(['page', $eachPageId, 'barRight', $pageId]);
|
$this->setData(['page', $eachPageId, 'barRight', $pageId], false);
|
||||||
}
|
}
|
||||||
if ($this->getData(['page', $eachPageId, 'barLeft']) === $this->getUrl(2)) {
|
if ($this->getData(['page', $eachPageId, 'barLeft']) === $this->getUrl(2)) {
|
||||||
$this->setData(['page', $eachPageId, 'barLeft', $pageId]);
|
$this->setData(['page', $eachPageId, 'barLeft', $pageId], false);
|
||||||
}
|
}
|
||||||
foreach ($parentId as $childId) {
|
foreach ($parentId as $childId) {
|
||||||
if ($this->getData(['page', $childId, 'barRight']) === $this->getUrl(2)) {
|
if ($this->getData(['page', $childId, 'barRight']) === $this->getUrl(2)) {
|
||||||
$this->setData(['page', $childId, 'barRight', $pageId]);
|
$this->setData(['page', $childId, 'barRight', $pageId], false);
|
||||||
}
|
}
|
||||||
if ($this->getData(['page', $childId, 'barLeft']) === $this->getUrl(2)) {
|
if ($this->getData(['page', $childId, 'barLeft']) === $this->getUrl(2)) {
|
||||||
$this->setData(['page', $childId, 'barLeft', $pageId]);
|
$this->setData(['page', $childId, 'barLeft', $pageId], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Détermine le groupe selon que la page est une barre ou une page standard
|
// Détermine le rôle selon que la page est une barre ou une page standard
|
||||||
$group = $this->getinput('pageEditBlock') !== 'bar' ? $this->getInput('pageEditGroup', helper::FILTER_INT) : 0;
|
$role = $this->getinput('pageEditBlock') !== 'bar' ? $this->getInput('pageEditGroup', helper::FILTER_INT) : 0;
|
||||||
|
|
||||||
//Détermine le profil d'utilisateur en fonction du groupe sinon le groupe vaut 0
|
//Détermine le profil d'utilisateur en fonction du rôle sinon le rôle vaut 0
|
||||||
$profil = 0;
|
$profil = 0;
|
||||||
if (
|
if (
|
||||||
$this->getinput('pageEditBlock') !== 'bar' ||
|
$this->getinput('pageEditBlock') !== 'bar' ||
|
||||||
$group === 1 ||
|
$role === 1 ||
|
||||||
$group === 2
|
$role === 2
|
||||||
) {
|
) {
|
||||||
$profil = $this->getInput('pageEditProfil' . $group, helper::FILTER_INT);
|
$profil = $this->getInput('pageEditProfil' . $role, helper::FILTER_INT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modifie la page ou en crée une nouvelle si l'id a changé
|
// Modifie la page ou en crée une nouvelle si l'id a changé
|
||||||
@ -559,7 +572,7 @@ class page extends common
|
|||||||
'modulePosition' => $this->getInput('pageModulePosition'),
|
'modulePosition' => $this->getInput('pageModulePosition'),
|
||||||
'parentPageId' => $this->getInput('pageEditParentPageId'),
|
'parentPageId' => $this->getInput('pageEditParentPageId'),
|
||||||
'position' => $position,
|
'position' => $position,
|
||||||
'group' => $group,
|
'role' => $role,
|
||||||
'profil' => $profil,
|
'profil' => $profil,
|
||||||
'targetBlank' => $this->getInput('pageEditTargetBlank', helper::FILTER_BOOLEAN),
|
'targetBlank' => $this->getInput('pageEditTargetBlank', helper::FILTER_BOOLEAN),
|
||||||
'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT),
|
'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT),
|
||||||
@ -580,6 +593,19 @@ class page extends common
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sauvegarde l'onglet de l'utilisateur
|
||||||
|
*/
|
||||||
|
$this->setData([
|
||||||
|
'user',
|
||||||
|
$this->getUser('id'),
|
||||||
|
'view',
|
||||||
|
[
|
||||||
|
'page' => $this->getInput('containerSelected'),
|
||||||
|
'config' => $this->getData(['user', $this->getUser('id'), 'view', 'config']),
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
// Creation du contenu de la page
|
// Creation du contenu de la page
|
||||||
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
||||||
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
||||||
@ -640,11 +666,11 @@ class page extends common
|
|||||||
// Profils installés
|
// Profils installés
|
||||||
// Profils disponibles
|
// Profils disponibles
|
||||||
foreach ($this->getData(['profil']) as $profilId => $profilData) {
|
foreach ($this->getData(['profil']) as $profilId => $profilData) {
|
||||||
if ($profilId < self::GROUP_MEMBER) {
|
if ($profilId < self::ROLE_MEMBER) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($profilId === self::GROUP_ADMIN) {
|
if ($profilId === self::ROLE_ADMIN) {
|
||||||
self::$userProfils[$profilId][self::GROUP_ADMIN] = $profilData['name'];
|
self::$userProfils[$profilId][self::ROLE_ADMIN] = $profilData['name'];
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foreach ($profilData as $key => $value) {
|
foreach ($profilData as $key => $value) {
|
||||||
@ -740,7 +766,7 @@ class page extends common
|
|||||||
{
|
{
|
||||||
$p = $this->getData(['page']);
|
$p = $this->getData(['page']);
|
||||||
$d = array_map(function ($d) {
|
$d = array_map(function ($d) {
|
||||||
unset ($d["css"], $d["js"]);
|
unset($d["css"], $d["js"]);
|
||||||
return $d;
|
return $d;
|
||||||
}, $p);
|
}, $p);
|
||||||
return json_encode($d);
|
return json_encode($d);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @author Rémi Jean <remi.jean@outlook.com>
|
* @author Rémi Jean <remi.jean@outlook.com>
|
||||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
||||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
* @copyright Copyright (C) 2018-2025, Frédéric Tempez
|
||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
@ -67,16 +67,18 @@ $( document ).ready(function() {
|
|||||||
/**
|
/**
|
||||||
* Sélection des onglets
|
* Sélection des onglets
|
||||||
*/
|
*/
|
||||||
var pageLayout = getCookie("pageLayout");
|
var pageLayout = "<?php echo $this->getData(['user', $this->getUser('id'), 'view', 'page']);?>";
|
||||||
if (pageLayout == null) {
|
// Non défini, valeur par défaut
|
||||||
|
if (pageLayout == "") {
|
||||||
pageLayout = "content";
|
pageLayout = "content";
|
||||||
setCookie("pageLayout", "content");
|
|
||||||
}
|
}
|
||||||
|
// Tout cacher
|
||||||
$("#pageEditContentContainer").hide();
|
$("#pageEditContentContainer").hide();
|
||||||
$("#pageEditExtensionContainer").hide();
|
$("#pageEditExtensionContainer").hide();
|
||||||
$("#pageEditPositionContainer").hide();
|
$("#pageEditPositionContainer").hide();
|
||||||
$("#pageEditLayoutContainer").hide();
|
$("#pageEditLayoutContainer").hide();
|
||||||
$("#pageEditPermissionContainer").hide();
|
$("#pageEditPermissionContainer").hide();
|
||||||
|
// Afficher la bonne tab
|
||||||
$("#pageEdit" + capitalizeFirstLetter(pageLayout) + "Container").show();
|
$("#pageEdit" + capitalizeFirstLetter(pageLayout) + "Container").show();
|
||||||
$("#pageEdit" + capitalizeFirstLetter(pageLayout) + "Button").addClass("activeButton");
|
$("#pageEdit" + capitalizeFirstLetter(pageLayout) + "Button").addClass("activeButton");
|
||||||
|
|
||||||
@ -281,10 +283,18 @@ $( document ).ready(function() {
|
|||||||
// Gestion des évènements
|
// Gestion des évènements
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transmet le bouton de l'onglet sélectionné avant la soumission
|
||||||
|
*/
|
||||||
|
$('#pageEditForm').on('submit', function () {
|
||||||
|
$('#containerSelected').val(pageLayout);
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sélection de la page de configuration à afficher
|
* Sélection de la page de configuration à afficher
|
||||||
*/
|
*/
|
||||||
$("#pageEditContentButton").on("click", function () {
|
$("#pageEditContentButton").on("click", function () {
|
||||||
|
pageLayout = "content";
|
||||||
$("#pageEditContentContainer").show();
|
$("#pageEditContentContainer").show();
|
||||||
$("#pageEditExtensionContainer").hide();
|
$("#pageEditExtensionContainer").hide();
|
||||||
$("#pageEditPositionContainer").hide();
|
$("#pageEditPositionContainer").hide();
|
||||||
@ -292,25 +302,12 @@ $( document ).ready(function() {
|
|||||||
$("#pageEditPermissionContainer").hide();
|
$("#pageEditPermissionContainer").hide();
|
||||||
$("#pageEditContentButton").addClass("activeButton");
|
$("#pageEditContentButton").addClass("activeButton");
|
||||||
$("#pageEditExtensionButton").removeClass("activeButton");
|
$("#pageEditExtensionButton").removeClass("activeButton");
|
||||||
$("#PageEditPositionButton").removeClass("activeButton");
|
$("#pageEditPositionButton").removeClass("activeButton");
|
||||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||||
setCookie("pageLayout", "content");
|
|
||||||
});
|
});
|
||||||
$("#pageEditExtensionButton").on("click", function () {
|
$("#pageEditPositionButton").on("click", function () {
|
||||||
$("#pageEditContentContainer").hide();
|
pageLayout = "position";
|
||||||
$("#pageEditExtensionContainer").show();
|
|
||||||
$("#pageEditPositionContainer").hide();
|
|
||||||
$("#pageEditLayoutContainer").hide();
|
|
||||||
$("#pageEditPermissionContainer").hide();
|
|
||||||
$("#pageEditContentButton").removeClass("activeButton");
|
|
||||||
$("#pageEditExtensionButton").addClass("activeButton");
|
|
||||||
$("#PageEditPositionButton").removeClass("activeButton");
|
|
||||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
|
||||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
|
||||||
setCookie("pageLayout", "extension");
|
|
||||||
});
|
|
||||||
$("#PageEditPositionButton").on("click", function () {
|
|
||||||
$("#pageEditContentContainer").hide();
|
$("#pageEditContentContainer").hide();
|
||||||
$("#pageEditExtensionContainer").hide();
|
$("#pageEditExtensionContainer").hide();
|
||||||
$("#pageEditPositionContainer").show();
|
$("#pageEditPositionContainer").show();
|
||||||
@ -318,12 +315,25 @@ $( document ).ready(function() {
|
|||||||
$("#pageEditPermissionContainer").hide();
|
$("#pageEditPermissionContainer").hide();
|
||||||
$("#pageEditContentButton").removeClass("activeButton");
|
$("#pageEditContentButton").removeClass("activeButton");
|
||||||
$("#pageEditExtensionButton").removeClass("activeButton");
|
$("#pageEditExtensionButton").removeClass("activeButton");
|
||||||
$("#PageEditPositionButton").addClass("activeButton");
|
$("#pageEditPositionButton").addClass("activeButton");
|
||||||
|
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||||
|
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||||
|
});
|
||||||
|
$("#pageEditExtensionButton").on("click", function () {
|
||||||
|
pageLayout = "extension";
|
||||||
|
$("#pageEditContentContainer").hide();
|
||||||
|
$("#pageEditExtensionContainer").show();
|
||||||
|
$("#pageEditPositionContainer").hide();
|
||||||
|
$("#pageEditLayoutContainer").hide();
|
||||||
|
$("#pageEditPermissionContainer").hide();
|
||||||
|
$("#pageEditContentButton").removeClass("activeButton");
|
||||||
|
$("#pageEditExtensionButton").addClass("activeButton");
|
||||||
|
$("#pageEditPositionButton").removeClass("activeButton");
|
||||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||||
setCookie("pageLayout", "position");
|
|
||||||
});
|
});
|
||||||
$("#pageEditLayoutButton").on("click", function () {
|
$("#pageEditLayoutButton").on("click", function () {
|
||||||
|
pageLayout = "layout";
|
||||||
$("#pageEditContentContainer").hide();
|
$("#pageEditContentContainer").hide();
|
||||||
$("#pageEditExtensionContainer").hide();
|
$("#pageEditExtensionContainer").hide();
|
||||||
$("#pageEditPositionContainer").hide();
|
$("#pageEditPositionContainer").hide();
|
||||||
@ -331,12 +341,12 @@ $( document ).ready(function() {
|
|||||||
$("#pageEditPermissionContainer").hide();
|
$("#pageEditPermissionContainer").hide();
|
||||||
$("#pageEditContentButton").removeClass("activeButton");
|
$("#pageEditContentButton").removeClass("activeButton");
|
||||||
$("#pageEditExtensionButton").removeClass("activeButton");
|
$("#pageEditExtensionButton").removeClass("activeButton");
|
||||||
$("#PageEditPositionButton").removeClass("activeButton");
|
$("#pageEditPositionButton").removeClass("activeButton");
|
||||||
$("#pageEditLayoutButton").addClass("activeButton");
|
$("#pageEditLayoutButton").addClass("activeButton");
|
||||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||||
setCookie("pageLayout", "layout");
|
|
||||||
});
|
});
|
||||||
$("#pageEditPermissionButton").on("click", function () {
|
$("#pageEditPermissionButton").on("click", function () {
|
||||||
|
pageLayout = "permission";
|
||||||
$("#pageEditContentContainer").hide();
|
$("#pageEditContentContainer").hide();
|
||||||
$("#pageEditExtensionContainer").hide();
|
$("#pageEditExtensionContainer").hide();
|
||||||
$("#pageEditPositionContainer").hide();
|
$("#pageEditPositionContainer").hide();
|
||||||
@ -347,7 +357,6 @@ $( document ).ready(function() {
|
|||||||
$("#pageEditPositionButton").removeClass("activeButton");
|
$("#pageEditPositionButton").removeClass("activeButton");
|
||||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||||
$("#pageEditPermissionButton").addClass("activeButton");
|
$("#pageEditPermissionButton").addClass("activeButton");
|
||||||
setCookie("pageLayout", "permission");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -722,30 +731,6 @@ function buildPagesList(extraPosition) {
|
|||||||
positionDOM.val(positionSelected);
|
positionDOM.val(positionSelected);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Cookies
|
|
||||||
*/
|
|
||||||
function setCookie(name, value, days) {
|
|
||||||
var expires = "";
|
|
||||||
if (days) {
|
|
||||||
var date = new Date();
|
|
||||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
||||||
expires = "; expires=" + date.toUTCString();
|
|
||||||
}
|
|
||||||
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCookie(name) {
|
|
||||||
var nameEQ = name + "=";
|
|
||||||
var ca = document.cookie.split(';');
|
|
||||||
for (var i = 0; i < ca.length; i++) {
|
|
||||||
var c = ca[i];
|
|
||||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
||||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define function to capitalize the first letter of a string
|
// Define function to capitalize the first letter of a string
|
||||||
function capitalizeFirstLetter(string) {
|
function capitalizeFirstLetter(string) {
|
||||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php echo template::formOpen('pageEditForm'); ?>
|
<?php echo template::formOpen('pageEditForm'); ?>
|
||||||
|
<!-- Variable transmise à TinyMCE -->
|
||||||
|
<div id="zwii_site_content" data-variable="<?php echo htmlspecialchars(isset($_SESSION['ZWII_SITE_CONTENT']) ? $_SESSION['ZWII_SITE_CONTENT'] : 'home'); ?>"></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col1">
|
<div class="col1">
|
||||||
<?php echo template::button('configModulesBack', [
|
<?php echo template::button('configModulesBack', [
|
||||||
@ -7,16 +9,7 @@
|
|||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1">
|
<div class="col1 offset7">
|
||||||
<?php /**echo template::button('pageEditHelp', [
|
|
||||||
'href' => 'https://doc.zwiicms.fr/edition-des-pages',
|
|
||||||
'target' => '_blank',
|
|
||||||
'value' => template::ico('help'),
|
|
||||||
'class' => 'buttonHelp',
|
|
||||||
'help' => 'Consulter l\'aide en ligne'
|
|
||||||
]); */?>
|
|
||||||
</div>
|
|
||||||
<div class="col1 offset6">
|
|
||||||
<?php echo template::button('pageEditDelete', [
|
<?php echo template::button('pageEditDelete', [
|
||||||
'class' => 'buttonRed',
|
'class' => 'buttonRed',
|
||||||
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '/' . self::$siteContent,
|
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '/' . self::$siteContent,
|
||||||
@ -41,37 +34,40 @@
|
|||||||
<div class="tab">
|
<div class="tab">
|
||||||
<?php echo template::button('pageEditContentButton', [
|
<?php echo template::button('pageEditContentButton', [
|
||||||
'value' => 'Contenu',
|
'value' => 'Contenu',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
|
//'href' => helper::baseUrl() . 'page/register/content/' . $this->geturl(2)
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::button('PageEditPositionButton', [
|
<?php echo template::button('pageEditPositionButton', [
|
||||||
'value' => 'Menu',
|
'value' => 'Menu',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
|
//'href' => helper::baseUrl() . 'page/register/position/' . $this->geturl(2)
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::button('pageEditExtensionButton', [
|
<?php echo template::button('pageEditExtensionButton', [
|
||||||
'value' => 'Extension',
|
'value' => 'Extension',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
|
//'href' => helper::baseUrl() . 'page/register/extension/' . $this->geturl(2)
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::button('pageEditLayoutButton', [
|
<?php echo template::button('pageEditLayoutButton', [
|
||||||
'value' => 'Mise en page',
|
'value' => 'Mise en page',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
|
//'href' => helper::baseUrl() . 'page/register/layout/' . $this->geturl(2)
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::button('pageEditPermissionButton', [
|
<?php echo template::button('pageEditPermissionButton', [
|
||||||
'value' => 'Permission',
|
'value' => 'Permission',
|
||||||
'class' => 'buttonTab'
|
'class' => 'buttonTab',
|
||||||
|
//'href' => helper::baseUrl() . 'page/register/permission/' . $this->geturl(2)
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Champ caché pour transmettre l'onglet-->
|
||||||
|
<?php echo template::hidden('containerSelected'); ?>
|
||||||
|
|
||||||
<div id="pageEditContentContainer" class="tabContent">
|
<div id="pageEditContentContainer" class="tabContent">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Titres'); ?>
|
<?php echo helper::translate('Titres'); ?>
|
||||||
<!--<span id="infoHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/informations-generales" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col8">
|
<div class="col8">
|
||||||
@ -120,11 +116,6 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Emplacement dans le menu'); ?>
|
<?php echo helper::translate('Emplacement dans le menu'); ?>
|
||||||
<!--<span id="positionHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/emplacement-dans-le-menu" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="blockContainer">
|
<div class="blockContainer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -140,14 +131,14 @@
|
|||||||
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::select('pageEditParentPageId', $module::$pagesNoParentId, [
|
<?php echo template::select('pageEditParentPageId', page::$pagesNoParentId, [
|
||||||
'label' => 'Page parent',
|
'label' => 'Page parent',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('pageEditExtraPosition', $module::$extraPosition, [
|
<?php echo template::select('pageEditExtraPosition', page::$extraPosition, [
|
||||||
'label' => 'Emplacement',
|
'label' => 'Emplacement',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'extraPosition']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'extraPosition']),
|
||||||
'help' => 'Le menu accessoire est aligné à droite de la barre de menu, c\'est un emplacement réservé aux drapeaux et au bouton de connexion.'
|
'help' => 'Le menu accessoire est aligné à droite de la barre de menu, c\'est un emplacement réservé aux drapeaux et au bouton de connexion.'
|
||||||
@ -176,16 +167,11 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Options avancées'); ?>
|
<?php echo helper::translate('Options avancées'); ?>
|
||||||
<!--<span id="advancedHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/options-d-emplacement-avancee" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="blockContainer">
|
<div class="blockContainer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('pageTypeMenu', $module::$typeMenu, [
|
<?php echo template::select('pageTypeMenu', page::$typeMenu, [
|
||||||
'label' => 'Apparence',
|
'label' => 'Apparence',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
|
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -195,7 +181,8 @@
|
|||||||
'help' => 'Sélectionnez une image ou une icône de petite dimension',
|
'help' => 'Sélectionnez une image ou une icône de petite dimension',
|
||||||
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
||||||
'label' => 'Icône',
|
'label' => 'Icône',
|
||||||
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
|
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']),
|
||||||
|
'folder' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) ? dirname($this->getData(['page', $this->getUrl(2), 'iconUrl'])) : '',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -228,14 +215,14 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col10">
|
<div class="col10">
|
||||||
<?php echo template::hidden('pageEditModuleRedirect'); ?>
|
<?php echo template::hidden('pageEditModuleRedirect'); ?>
|
||||||
<?php echo template::select('pageEditModuleId', $module::$moduleIds, [
|
<?php echo template::select('pageEditModuleId', page::$moduleIds, [
|
||||||
'help' => 'En cas de changement de module, les données du module précédent seront supprimées.',
|
'help' => 'En cas de changement de module, les données du module précédent seront supprimées.',
|
||||||
'label' => 'Module',
|
'label' => 'Module',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId'])
|
'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId'])
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::hidden('pageEditModuleIdOld', ['value' => $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?>
|
<?php echo template::hidden('pageEditModuleIdOld', ['value' => $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?>
|
||||||
<?php echo template::hidden('pageEditModuleIdOldText', [
|
<?php echo template::hidden('pageEditModuleIdOldText', [
|
||||||
'value' => array_key_exists($this->getData(['page', $this->getUrl(2), 'moduleId']), $module::$moduleIds) ? $module::$moduleIds[$this->getData(['page', $this->getUrl(2), 'moduleId'])] : ucfirst($this->getData(['page', $this->getUrl(2), 'moduleId']))
|
'value' => array_key_exists($this->getData(['page', $this->getUrl(2), 'moduleId']), page::$moduleIds) ? page::$moduleIds[$this->getData(['page', $this->getUrl(2), 'moduleId'])] : ucfirst($this->getData(['page', $this->getUrl(2), 'moduleId']))
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2 verticalAlignBottom">
|
<div class="col2 verticalAlignBottom">
|
||||||
@ -248,7 +235,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php echo template::select('pageModulePosition', $module::$modulePosition, [
|
<?php echo template::select('pageModulePosition', page::$modulePosition, [
|
||||||
'help' => 'En position libre ajoutez le module en plaçant [MODULE] à l\'endroit voulu dans votre page.',
|
'help' => 'En position libre ajoutez le module en plaçant [MODULE] à l\'endroit voulu dans votre page.',
|
||||||
'label' => 'Position du module',
|
'label' => 'Position du module',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
|
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
|
||||||
@ -292,18 +279,13 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Mise en page'); ?>
|
<?php echo helper::translate('Mise en page'); ?>
|
||||||
<!--<span id="layoutHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/mise-en-page-2" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="blockContainer">
|
<div class="blockContainer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php echo template::select('pageEditBlock', $module::$pageBlocks, [
|
<?php echo template::select('pageEditBlock', page::$pageBlocks, [
|
||||||
'label' => 'Gabarits de page - Barre latérale',
|
'label' => 'Gabarits de page - Barre latérale',
|
||||||
'help' => 'Pour définir la page comme barre latérale, choisissez l\'option dans la liste.',
|
'help' => 'Pour définir la page comme barre latérale, choisissez l\'option dans la liste.',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'block'])
|
'selected' => $this->getData(['page', $this->getUrl(2), 'block'])
|
||||||
@ -318,7 +300,7 @@
|
|||||||
'value' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
'value' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::select('pageEditBarLeft', $module::$pagesBarId, [
|
<?php echo template::select('pageEditBarLeft', page::$pagesBarId, [
|
||||||
'label' => 'Barre latérale gauche :',
|
'label' => 'Barre latérale gauche :',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
'selected' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -328,12 +310,12 @@
|
|||||||
'value' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
'value' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::select('pageEditBarRight', $module::$pagesBarId, [
|
<?php echo template::select('pageEditBarRight', page::$pagesBarId, [
|
||||||
'label' => 'Barre latérale droite :',
|
'label' => 'Barre latérale droite :',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
'selected' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php echo template::select('pageEditDisplayMenu', $module::$displayMenu, [
|
<?php echo template::select('pageEditDisplayMenu', page::$displayMenu, [
|
||||||
'label' => 'Contenu du menu vertical',
|
'label' => 'Contenu du menu vertical',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']),
|
||||||
'help' => 'Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.'
|
'help' => 'Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.'
|
||||||
@ -342,19 +324,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row navSelect">
|
<div class="row navSelect">
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('pageEditNavLeft', $module::$navIconPosition, [
|
<?php echo template::select('pageEditNavLeft', page::$navIconPosition, [
|
||||||
'label' => 'Bouton de navigation gauche',
|
'label' => 'Bouton de navigation gauche',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'navLeft']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'navLeft']),
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('pageEditNavTemplate', $module::$navIconTemplate, [
|
<?php echo template::select('pageEditNavTemplate', page::$navIconTemplate, [
|
||||||
'label' => 'Modèle',
|
'label' => 'Modèle',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'navTemplate']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'navTemplate']),
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('pageEditNavRight', $module::$navIconPosition, [
|
<?php echo template::select('pageEditNavRight', page::$navIconPosition, [
|
||||||
'label' => 'Bouton de navigation droit',
|
'label' => 'Bouton de navigation droit',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'navRight']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'navRight']),
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -372,33 +354,28 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Permission et référencement'); ?>
|
<?php echo helper::translate('Permission et référencement'); ?>
|
||||||
<!--<span id="seoHelpButton" class="helpDisplayButton">
|
|
||||||
<a href="https://doc.zwiicms.fr/permission-et-referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
|
||||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
|
||||||
</a>
|
|
||||||
</span>-->
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="blockContainer">
|
<div class="blockContainer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class='col6'>
|
<div class='col6'>
|
||||||
<?php echo template::select('pageEditGroup', self::$groupPublics, [
|
<?php echo template::select('pageEditGroup', self::$rolePublics, [
|
||||||
'label' => 'Groupe minimal pour accéder à la page',
|
'label' => 'Rôle minimal pour accéder à la page',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'group']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'role']),
|
||||||
'help' => 'Les groupes de niveau supérieur accèdent à la page.'
|
'help' => 'Les rôles de niveau supérieur accèdent à la page.'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<div class="pageEditGroupProfil displayNone"
|
<div class="pageEditGroupProfil displayNone"
|
||||||
id="pageEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
|
id="pageEditGroupProfil<?php echo self::ROLE_MEMBER; ?>">
|
||||||
<?php echo template::select('pageEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
<?php echo template::select('pageEditProfil' . self::ROLE_MEMBER, page::$userProfils[self::ROLE_MEMBER], [
|
||||||
'label' => 'Profil minimal pour accéder à la page',
|
'label' => 'Profil minimal pour accéder à la page',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
||||||
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="pageEditGroupProfil displayNone"
|
<div class="pageEditGroupProfil displayNone"
|
||||||
id="pageEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
id="pageEditGroupProfil<?php echo self::ROLE_EDITOR; ?>">
|
||||||
<?php echo template::select('pageEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
<?php echo template::select('pageEditProfil' . self::ROLE_EDITOR, page::$userProfils[self::ROLE_EDITOR], [
|
||||||
'label' => 'Profil minimal pour accéder à la page',
|
'label' => 'Profil minimal pour accéder à la page',
|
||||||
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
||||||
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
||||||
@ -424,5 +401,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo template::formClose(); ?>
|
<?php echo template::formClose(); ?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user