Merge branch '10302' into blog_v3

This commit is contained in:
Fred Tempez 2020-10-03 14:13:27 +02:00
commit f8430c9745
48 changed files with 107 additions and 38 deletions

View File

@ -12,6 +12,11 @@
- Limiter l'édition des articles et des commentaires à l'id de l'éditeur
- Approbation des commentaires
## version 10.3.02
- Modifications :
- Nouvelles images de captcha.
- Option de configuration, captcha demandé à la connexion.
## version 10.3.01
- Corrections :
- Configuration du site :

View File

@ -53,11 +53,18 @@ class template {
$letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a');
$firstNumber = rand ( 0 , count($letters)-1 );
$secondNumber = rand ( 0 , count($letters)-1 );
$result = $firstNumber + $secondNumber;
$result = password_hash($result, PASSWORD_BCRYPT);
$firstLetter = uniqid();
$secondLetter = uniqid();
// Masquage image source
copy ('core/vendor/zwiico/png/'.$letters[$firstNumber] . '.png', 'site/tmp/' . $firstLetter . '.png');
copy ('core/vendor/zwiico/png/'.$letters[$secondNumber] . '.png', 'site/tmp/' . $secondLetter . '.png');
// Début du wrapper
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
// Label
$html .= self::label($attributes['id'],
'<img class="captchaNumber" src="core/vendor/zwiico/png/'.$letters[$firstNumber] . '.png" /> + <img class="captchaNumber" src="core/vendor/zwiico/png/' . $letters[$secondNumber] . '.png" /> = en chiffres ?', [
'<img class="captchaNumber" src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" /> + <img class="captchaNumber" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" /> = en chiffres ?', [
'help' => $attributes['help']
]);
// Notice
@ -72,7 +79,13 @@ class template {
'<input type="text" %s>',
helper::sprintAttributes($attributes)
);
// Champ résultat caché
$html .= self::hidden($attributes['id'] . 'Result', [
'value' => $result,
'before' => false
]);
// Champs cachés contenant les nombres
/*
$html .= self::hidden($attributes['id'] . 'FirstNumber', [
'value' => $firstNumber,
'before' => false
@ -81,6 +94,7 @@ class template {
'value' => $secondNumber,
'before' => false
]);
*/
// Fin du wrapper
$html .= '</div>';
// Retourne le html

View File

@ -1419,6 +1419,12 @@ class common {
}
$this->setData(['core', 'dataVersion', 10301]);
}
// Version 10.3.02
if ($this->getData(['core', 'dataVersion']) < 10302) {
// Activation par défaut du captcha à la connexion
$this->setData(['config', 'connect','captcha', true]);
$this->setData(['core', 'dataVersion', 10302]);
}
// Version 10.4.00
if ($this->getData(['core', 'dataVersion']) < 10400) {
// Ajouter le prénom comme pseudo et le pseudo comme signature

View File

@ -1363,10 +1363,18 @@ th.col12 {
* Taille des images
*/
.captchaNumber {
height: 25px;
height: 30px;
vertical-align: bottom;
padding-left: 5px;
padding-right: 5px;
padding-left: 10px;
padding-right: 10px;
}
#userLoginCaptcha,
#formcaptcha,
#blogArticlecaptcha {
width: 20%;
text-align: center;
margin: auto;
}
/*

View File

@ -483,7 +483,8 @@ class config extends common {
'connect' => [
'attempt' => $this->getInput('configConnectAttempt',helper::FILTER_INT),
'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT),
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN)
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN),
'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN)
]
]
]);

View File

@ -94,7 +94,7 @@
'help' => 'Le fuseau horaire est utile au bon référencement'
]); ?>
</div>
<div class="col8 verticalAlignBottom">
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent'])
]); ?>
@ -499,6 +499,13 @@
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('configConnectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -353,6 +353,15 @@ class user extends common {
public function login() {
// Soumission du formulaire
if($this->isPost()) {
// Check la captcha
if(
//$this->getInput('userLoginCaptcha', helper::FILTER_INT) !== $this->getInput('userLoginCaptchaFirstNumber', helper::FILTER_INT) + $this->getInput('userLoginCaptchaSecondNumber', helper::FILTER_INT))
password_verify($this->getInput('userLoginCaptcha', helper::FILTER_INT), $this->getInput('userLoginCaptchaResult') ) === false )
{
self::$inputNotices['blogArticlecaptcha'] = 'Incorrect';
}
// Lire Id du compte
$userId = $this->getInput('userLoginId', helper::FILTER_ID, true);
/**

View File

@ -12,6 +12,13 @@
]); ?>
</div>
</div>
<?php if ($this->getData(['config', 'connect','captcha'])): ?>
<div class="row">
<div class="col12 textAlignCenter">
<?php echo template::captcha('userLoginCaptcha'); ?>
</div>
</div>
<?php endif;?>
<div class="row">
<div class="col6">
<?php echo template::checkbox('userLoginLongTime', true, 'Se souvenir de moi', [
@ -25,7 +32,6 @@
<div class="row">
<div class="col3 offset6">
<?php echo template::button('userLoginBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))),
'ico' => 'left',
'value' => 'Annuler'

View File

@ -40,6 +40,7 @@
.zwiico-linkedin:before { content: '\f0e1'; } /* '' */
.zwiico-download-cloud:before { content: '\f0ed'; } /* '' */
.zwiico-upload-cloud:before { content: '\f0ee'; } /* '' */
.zwiico-github:before { content: '\f113'; } /* '' */
.zwiico-code:before { content: '\f121'; } /* '' */
.zwiico-youtube:before { content: '\f167'; } /* '' */
.zwiico-instagram:before { content: '\f16d'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -40,6 +40,7 @@
.zwiico-linkedin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;&nbsp;'); }
.zwiico-download-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;&nbsp;'); }
.zwiico-upload-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;&nbsp;'); }
.zwiico-github { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf113;&nbsp;'); }
.zwiico-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;&nbsp;'); }
.zwiico-youtube { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;&nbsp;'); }
.zwiico-instagram { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;&nbsp;'); }

View File

@ -51,6 +51,7 @@
.zwiico-linkedin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;&nbsp;'); }
.zwiico-download-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;&nbsp;'); }
.zwiico-upload-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;&nbsp;'); }
.zwiico-github { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf113;&nbsp;'); }
.zwiico-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;&nbsp;'); }
.zwiico-youtube { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;&nbsp;'); }
.zwiico-instagram { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;&nbsp;'); }

View File

@ -1,11 +1,11 @@
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.eot?5225631');
src: url('../font/zwiico.eot?5225631#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?5225631') format('woff2'),
url('../font/zwiico.woff?5225631') format('woff'),
url('../font/zwiico.ttf?5225631') format('truetype'),
url('../font/zwiico.svg?5225631#zwiico') format('svg');
src: url('../font/zwiico.eot?40040077');
src: url('../font/zwiico.eot?40040077#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?40040077') format('woff2'),
url('../font/zwiico.woff?40040077') format('woff'),
url('../font/zwiico.ttf?40040077') format('truetype'),
url('../font/zwiico.svg?40040077#zwiico') format('svg');
font-weight: normal;
font-style: normal;
}
@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.svg?5225631#zwiico') format('svg');
src: url('../font/zwiico.svg?40040077#zwiico') format('svg');
}
}
*/
@ -96,6 +96,7 @@
.zwiico-linkedin:before { content: '\f0e1'; } /* '' */
.zwiico-download-cloud:before { content: '\f0ed'; } /* '' */
.zwiico-upload-cloud:before { content: '\f0ee'; } /* '' */
.zwiico-github:before { content: '\f113'; } /* '' */
.zwiico-code:before { content: '\f121'; } /* '' */
.zwiico-youtube:before { content: '\f167'; } /* '' */
.zwiico-instagram:before { content: '\f16d'; } /* '' */

View File

@ -1 +0,0 @@
@font-face{font-family:zwiico;src:url(../font/zwiico.eot?1220194);src:url(../font/zwiico.eot?1220194#iefix) format('embedded-opentype'),url(../font/zwiico.woff2?1220194) format('woff2'),url(../font/zwiico.woff?1220194) format('woff'),url(../font/zwiico.ttf?1220194) format('truetype'),url(../font/zwiico.svg?1220194#zwiico) format('svg');font-weight:400;font-style:normal}[class*=" zwiico-"]:before,[class^=zwiico-]:before{font-family:zwiico;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.zwiico-logout:before{content:'\e800'}.zwiico-check:before{content:'\e801'}.zwiico-cancel:before{content:'\e802'}.zwiico-plus:before{content:'\e803'}.zwiico-minus:before{content:'\e804'}.zwiico-help:before{content:'\e805'}.zwiico-pencil:before{content:'\e806'}.zwiico-gear:before{content:'\e807'}.zwiico-eye:before{content:'\e808'}.zwiico-up:before{content:'\e809'}.zwiico-folder:before{content:'\e80a'}.zwiico-download:before{content:'\e80b'}.zwiico-left:before{content:'\e80c'}.zwiico-users:before{content:'\e80d'}.zwiico-user:before{content:'\e80e'}.zwiico-comment:before{content:'\e80f'}.zwiico-home:before{content:'\e810'}.zwiico-mimi:before{content:'\e811'}.zwiico-down:before{content:'\e812'}.zwiico-lock:before{content:'\e813'}.zwiico-chat:before{content:'\e814'}.zwiico-eye-off:before{content:'\e815'}.zwiico-update:before{content:'\e816'}.zwiico-upload:before{content:'\e817'}.zwiico-down-open:before{content:'\e818'}.zwiico-left-open:before{content:'\e819'}.zwiico-cogs:before{content:'\e81a'}.zwiico-cog-alt:before{content:'\e81b'}.zwiico-trash:before{content:'\e81c'}.zwiico-edit:before{content:'\e81d'}.zwiico-flag:before{content:'\e81e'}.zwiico-spin:before{content:'\e831'}.zwiico-twitter:before{content:'\f099'}.zwiico-facebook:before{content:'\f09a'}.zwiico-menu:before{content:'\f0c9'}.zwiico-sort:before{content:'\f0dc'}.zwiico-linkedin:before{content:'\f0e1'}.zwiico-download-cloud:before{content:'\f0ed'}.zwiico-upload-cloud:before{content:'\f0ee'}.zwiico-github:before{content:'\f113'}.zwiico-code:before{content:'\f121'}.zwiico-youtube:before{content:'\f167'}.zwiico-instagram:before{content:'\f16d'}.zwiico-brush:before{content:'\f1fc'}.zwiico-pinterest:before{content:'\f231'}

Binary file not shown.

View File

@ -88,6 +88,8 @@
<glyph glyph-name="upload-cloud" unicode="&#xf0ee;" d="M714 368q0 8-5 13l-196 196q-5 5-13 5t-13-5l-196-196q-5-6-5-13 0-8 5-13t13-5h125v-196q0-8 5-13t12-5h108q7 0 12 5t5 13v196h125q8 0 13 5t5 13z m357-161q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24 0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35 59 0 101-42t42-101q0-43-23-77 72-17 119-76t46-133z" horiz-adv-x="1071.4" />
<glyph glyph-name="github" unicode="&#xf113;" d="M357 171q0-22-7-45t-24-43-40-19-41 19-24 43-7 45 7 46 24 43 41 19 40-19 24-43 7-46z m357 0q0-22-7-45t-24-43-40-19-41 19-24 43-7 45 7 46 24 43 41 19 40-19 24-43 7-46z m90 0q0 67-39 114t-104 47q-23 0-109-12-40-6-88-6t-87 6q-85 12-109 12-66 0-104-47t-39-114q0-49 18-85t45-58 68-33 78-17 83-4h94q46 0 83 4t78 17 69 33 45 58 18 85z m125 99q0-116-34-185-22-43-59-74t-79-48-95-27-96-12-93-3q-43 0-79 2t-82 7-85 17-77 29-67 45-48 64q-35 69-35 185 0 132 76 221-15 45-15 95 0 64 28 121 61 0 106-22t106-69q82 20 172 20 83 0 157-18 58 46 104 67t105 22q29-57 29-121 0-49-15-94 76-89 76-222z" horiz-adv-x="928.6" />
<glyph glyph-name="code" unicode="&#xf121;" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" />
<glyph glyph-name="youtube" unicode="&#xf167;" d="M542 156v-118q0-37-22-37-13 0-25 12v168q12 12 25 12 22 0 22-37z m189-1v-25h-51v25q0 38 25 38t26-38z m-540 122h60v52h-174v-52h59v-318h55v318z m161-318h50v276h-50v-211q-17-23-32-23-10 0-11 11-1 2-1 20v203h-50v-218q0-28 5-41 7-21 32-21 27 0 57 34v-30z m240 83v110q0 41-5 55-10 31-40 31-28 0-52-30v121h-50v-370h50v27q25-31 52-31 30 0 40 31 5 15 5 56z m188 6v7h-51q0-29-1-34-4-20-22-20-26 0-26 38v49h100v57q0 44-15 65-22 28-59 28-38 0-60-28-15-21-15-65v-96q0-44 16-65 22-29 60-29 40 0 60 30 10 15 12 30 1 5 1 33z m-339 509v117q0 39-24 39t-24-39v-117q0-39 24-39t24 39z m401-419q0-131-14-195-8-33-33-56t-57-25q-102-12-309-12t-310 12q-32 3-57 25t-32 56q-15 62-15 195 0 131 15 195 7 33 32 56t57 26q103 11 310 11t309-11q33-4 58-26t32-56q14-62 14-195z m-557 712h57l-67-223v-151h-56v151q-8 42-34 119-21 57-37 104h60l39-147z m207-186v-97q0-46-16-66-21-29-59-29-37 0-59 29-15 21-15 66v97q0 45 15 66 22 28 59 28 38 0 59-28 16-21 16-66z m187 91v-279h-51v31q-30-35-58-35-25 0-33 21-4 13-4 42v220h51v-205q0-19 0-20 2-12 12-12 15 0 32 24v213h51z" horiz-adv-x="857.1" />

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -23,7 +23,7 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
/* Set locale to French */
date_default_timezone_set('Europe/Paris');
setlocale (LC_TIME, 'fra_FRA', 'french');
setlocale (LC_TIME, 'fr_FR.utf8','fra');
/**
* Initialisation de Zwii

View File

@ -183,7 +183,7 @@ class blog extends common {
]);
}
self::$comments[] = [
utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])),
strftime('%d %B %Y - %H:%M', $comment['createdOn']),
$comment['content'],
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
$buttonApproval,
@ -340,9 +340,9 @@ class blog extends common {
$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'title']) .
'</a>',
// date('d/m/Y H:i', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])),
utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])))
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))
.' à '.
utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))),
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])),
self::$states[$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'state'])],
// Bouton pour afficher les commentaires de l'article
template::button('blogConfigComment' . $articleIds[$i], [
@ -511,7 +511,8 @@ class blog extends common {
// Check la captcha
if(
$this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
AND $this->getInput('blogArticlecaptcha', helper::FILTER_INT) !== $this->getInput('blogArticlecaptchaFirstNumber', helper::FILTER_INT) + $this->getInput('blogArticlecaptchaSecondNumber', helper::FILTER_INT))
//AND $this->getInput('blogArticlecaptcha', helper::FILTER_INT) !== $this->getInput('blogArticlecaptchaFirstNumber', helper::FILTER_INT) + $this->getInput('blogArticlecaptchaSecondNumber', helper::FILTER_INT))
AND password_verify($this->getInput('blogArticlecaptcha', helper::FILTER_INT), $this->getInput('blogArticlecaptchaResult') ) === false )
{
self::$inputNotices['blogArticlecaptcha'] = 'Incorrect';
}

View File

@ -3,7 +3,7 @@
<div class="col10">
<div class="blogDate">
<i class="far fa-calendar-alt"></i>
<?php echo utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
<?php echo strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?>
à <?php echo utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
</div>
</div>
@ -102,7 +102,7 @@
<?php foreach($module::$comments as $commentId => $comment): ?>
<div class="block">
<h4><?php echo $module::$commentsSignature[$commentId]; ?>
le <?php echo utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])); ?>
le <?php echo strftime('%d %B %Y - %H:%M', $comment['createdOn']); ?>
</h4>
<?php echo $comment['content']; ?>
</div>

View File

@ -35,7 +35,7 @@
</div>
<div class="blogDate">
<i class="far fa-calendar-alt"></i>
<?php echo utf8_encode(strftime('%d %B %Y', $article['publishedOn'])); ?>
<?php echo strftime('%d %B %Y', $article['publishedOn']); ?>
</div>
<p class="blogContent">
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...

View File

@ -282,7 +282,8 @@ class form extends common {
// Check la captcha
if(
$this->getData(['module', $this->getUrl(0), 'config', 'captcha'])
AND $this->getInput('formcaptcha', helper::FILTER_INT) !== $this->getInput('formcaptchaFirstNumber', helper::FILTER_INT) + $this->getInput('formcaptchaSecondNumber', helper::FILTER_INT))
// AND $this->getInput('formcaptcha', helper::FILTER_INT) !== $this->getInput('formcaptchaFirstNumber', helper::FILTER_INT) + $this->getInput('formcaptchaSecondNumber', helper::FILTER_INT))
AND password_verify($this->getInput('formcaptcha', helper::FILTER_INT), $this->getInput('formcaptchaResult') ) === false )
{
self::$inputNotices['formcaptcha'] = 'Incorrect';

View File

@ -91,9 +91,9 @@ class news extends common {
// Met en forme le tableau
self::$news[] = [
$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'title']),
utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])))
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))
.' à '.
utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))),
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])),
self::$states[$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'state'])],
template::button('newsConfigEdit' . $newsIds[$i], [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsIds[$i]. '/' . $_SESSION['csrf'],

View File

@ -10,7 +10,7 @@
</div>
<div class="newsSignature">
<i class="far fa-calendar-alt"></i>
<?php echo utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
<?php echo strftime('%d %B %Y', $news['publishedOn']); ?>
- <?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
</div>
<div class="clearBoth"></div>

View File

@ -1,3 +1,8 @@
# Bloque l'accès aux données temporaires
Order deny,allow
Deny from all
# Sauf l'accès aux images pour le captcha
<Files *.png>
Order Allow,Deny
Allow from all
</Files>