init editeur

This commit is contained in:
Fred Tempez 2020-11-18 22:28:05 +01:00
parent 348634accc
commit 7d88215f62
308 changed files with 186 additions and 155 deletions

0
.htaccess Normal file → Executable file
View File

0
core/class/.htaccess Normal file → Executable file
View File

0
core/class/SitemapGenerator.class.php Normal file → Executable file
View File

0
core/class/autoload.php Normal file → Executable file
View File

0
core/class/helper.class.php Normal file → Executable file
View File

0
core/class/jsondb/Dot.class.php Normal file → Executable file
View File

0
core/class/jsondb/JsonDb.class.php Normal file → Executable file
View File

0
core/class/phpmailer/.htaccess Normal file → Executable file
View File

0
core/class/phpmailer/Exception.class.php Normal file → Executable file
View File

0
core/class/phpmailer/PHPMailer.class.php Normal file → Executable file
View File

0
core/class/phpmailer/SMTP.class.php Normal file → Executable file
View File

0
core/class/template.class.php Normal file → Executable file
View File

0
core/core.js.php Normal file → Executable file
View File

25
core/core.php Normal file → Executable file
View File

@ -430,6 +430,9 @@ class common {
case 7:
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6]);
break;
case 8:
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6].'.'.$keys[7]);
break;
}
return $tempData;
}
@ -979,6 +982,10 @@ class common {
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5],$keys[6]);
$db->save();
break;
case 8:
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6],$keys[7] );
$db->save();
break;
}
return true;
}
@ -1446,7 +1453,7 @@ class common {
}
// Mettre à jour les données des blogs les articles sont dans posts
foreach ($pageList as $parentKey => $parent) {
//La page a une blog
//La page a une galerie
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
foreach ( $this->getData(['module', $parent]) as $blogKey => $blogItem) {
$data = $this->getdata(['module',$parent,$blogKey]);
@ -1456,7 +1463,7 @@ class common {
}
}
foreach ($pageList as $parentKey => $parent) {
//La page a une news
//La page a une galerie
if ($this->getData(['page',$parent,'moduleId']) === 'news' ) {
foreach ( $this->getData(['module', $parent]) as $newsKey => $newsItem) {
$data = $this->getdata(['module',$parent,$newsKey]);
@ -1485,11 +1492,16 @@ class common {
}
}
// Parcourir pageList et rechercher les modules de blog
foreach ($pageList as $parentKey => $parent) {
//La page a une galerie
//La page est un blog
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent,'posts']), 'publishedOn', 'SORT_DESC'));
//echo "<pre>".$parent;
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $parent, 'posts']), 'publishedOn', 'SORT_DESC'));
//var_dump($articleIds);
foreach ($articleIds as $key => $article) {
//echo $article;
//echo "<p>";
// Droits les deux groupes
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
// Limite de taille 500
@ -1501,6 +1513,7 @@ class common {
// groupe de notification
$this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]);
}
// Traitement des commentaires
if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) {
foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) {
@ -1931,7 +1944,7 @@ class core extends common {
'title' => $title,
// Meta description = 160 premiers caractères de l'article
'metaDescription' => $this->getData(['page',$this->getUrl(0),'moduleId']) === 'blog' && !empty($this->getUrl(1))
? strip_tags(substr($this->getData(['module',$this->getUrl(0),$this->getUrl(1),'content']) ,0,159))
? strip_tags(substr($this->getData(['module',$this->getUrl(0),'posts',$this->getUrl(1),'content']) ,0,159))
: $this->getData(['page', $this->getUrl(0), 'metaDescription']),
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
@ -2103,7 +2116,7 @@ class core extends common {
// Librairie googtrans ajouté dynamiquement
if ( substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr'
AND $this->getData(['translate','active']) === true
AND $this->getData(['translate','active']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) {
$this->addOutput([
'vendor' => array_merge($this->output['vendor'], ['i18n'])

0
core/layout/blank.php Normal file → Executable file
View File

0
core/layout/light.php Normal file → Executable file
View File

0
core/layout/mail.php Normal file → Executable file
View File

0
core/layout/main.php Normal file → Executable file
View File

0
core/module/config/config.php Normal file → Executable file
View File

0
core/module/config/view/backup/backup.js.php Normal file → Executable file
View File

0
core/module/config/view/backup/backup.php Normal file → Executable file
View File

0
core/module/config/view/index/index.js.php Normal file → Executable file
View File

0
core/module/config/view/index/index.php Normal file → Executable file
View File

0
core/module/config/view/manage/manage.php Normal file → Executable file
View File

0
core/module/config/view/script/script.php Normal file → Executable file
View File

0
core/module/install/install.php Normal file → Executable file
View File

0
core/module/install/ressource/.htaccess Normal file → Executable file
View File

0
core/module/install/ressource/defaultdata.php Normal file → Executable file
View File

0
core/module/install/view/index/index.js.php Normal file → Executable file
View File

0
core/module/install/view/index/index.php Normal file → Executable file
View File

0
core/module/install/view/update/update.js.php Normal file → Executable file
View File

0
core/module/install/view/update/update.php Normal file → Executable file
View File

0
core/module/maintenance/maintenance.php Normal file → Executable file
View File

0
core/module/maintenance/view/index/index.css Normal file → Executable file
View File

0
core/module/maintenance/view/index/index.php Normal file → Executable file
View File

0
core/module/page/page.php Normal file → Executable file
View File

0
core/module/page/view/edit/edit.js.php Normal file → Executable file
View File

0
core/module/page/view/edit/edit.php Normal file → Executable file
View File

0
core/module/sitemap/sitemap.php Normal file → Executable file
View File

0
core/module/sitemap/view/index/index.css Normal file → Executable file
View File

32
core/module/sitemap/view/index/index.php Normal file → Executable file
View File

@ -1,48 +1,48 @@
<ul>
<?php foreach($this->getHierarchy(null,true,null) as $parentId => $childIds): ?>
<li>
<?php
<?php
if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
{ ?>
{ ?>
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
<?php
} else {
<?php
} else {
// page désactivée
echo $this->getData(['page', $parentId, 'title']);
echo $this->getData(['page', $parentId, 'title']);
} ?>
<ul>
<?php foreach($childIds as $childId): ?>
<li>
<!-- Sous-page -->
<?php if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
{ ?>
<?php if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
{ ?>
<a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a>
<?php } else { ?>
<!-- page désactivée -->
<?php echo $this->getData(['page', $childId, 'title']); }?>
<?php echo $this->getData(['page', $childId, 'title']); }?>
<!-- articles d'une sous-page blog-->
<ul>
<?php if ($this->getData(['page', $childId, 'moduleId']) === 'blog') { ?>
<?php
foreach($this->getData(['module',$childId]) as $articleId => $article): ?>
<?php if($this->getData(['module',$childId,$articleId,'state']) === true) {?>
<?php if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) {?>
<li>
<a href="<?php echo helper::baseUrl() . $childId . '/' . $articleId;?>"><?php echo $article['title']; ?></a>
</li>
<?php } ?>
<?php } ?>
<?php endforeach;
} ?>
</ul>
</ul>
</li>
<?php endforeach; ?>
<!-- ou articles d'un blog-->
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' &&
!empty($this->getData(['module',$parentId])) ) { ?>
<?php foreach($this->getData(['module',$parentId]) as $articleId => $article): ?>
<?php if($this->getData(['module',$parentId,$articleId,'state']) === true ): ?>
!empty($this->getData(['module',$parentId, 'posts' ])) ) { ?>
<?php foreach($this->getData(['module',$parentId, 'posts' ]) as $articleId => $article): ?>
<?php if($this->getData(['module',$parentId,'posts',$articleId,'state']) === true ): ?>
<li>
<a href="<?php echo helper::baseUrl() . $parentId. '/' . $articleId;?>"><?php echo $article['title']; ?></a>
</li>

0
core/module/theme/theme.php Normal file → Executable file
View File

0
core/module/theme/view/admin/admin.js.php Normal file → Executable file
View File

0
core/module/theme/view/admin/admin.php Normal file → Executable file
View File

0
core/module/theme/view/advanced/advanced.js.php Normal file → Executable file
View File

0
core/module/theme/view/advanced/advanced.php Normal file → Executable file
View File

0
core/module/theme/view/body/body.js.php Normal file → Executable file
View File

0
core/module/theme/view/body/body.php Normal file → Executable file
View File

0
core/module/theme/view/footer/footer.js.php Normal file → Executable file
View File

0
core/module/theme/view/footer/footer.php Normal file → Executable file
View File

0
core/module/theme/view/header/header.js.php Normal file → Executable file
View File

0
core/module/theme/view/header/header.php Normal file → Executable file
View File

0
core/module/theme/view/index/index.js.php Normal file → Executable file
View File

0
core/module/theme/view/index/index.php Normal file → Executable file
View File

0
core/module/theme/view/manage/manage.js.php Normal file → Executable file
View File

0
core/module/theme/view/manage/manage.php Normal file → Executable file
View File

0
core/module/theme/view/menu/menu.js.php Normal file → Executable file
View File

0
core/module/theme/view/menu/menu.php Normal file → Executable file
View File

0
core/module/theme/view/site/site.js.php Normal file → Executable file
View File

0
core/module/theme/view/site/site.php Normal file → Executable file
View File

0
core/module/translate/ressource/de.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 119 B

0
core/module/translate/ressource/en.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
core/module/translate/ressource/es.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

0
core/module/translate/ressource/fr.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 96 B

After

Width:  |  Height:  |  Size: 96 B

0
core/module/translate/ressource/googtrans.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

0
core/module/translate/ressource/it.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 96 B

After

Width:  |  Height:  |  Size: 96 B

0
core/module/translate/ressource/nl.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 108 B

0
core/module/translate/ressource/pt.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 395 B

0
core/module/translate/translate.php Normal file → Executable file
View File

0
core/module/translate/view/index/index.css Normal file → Executable file
View File

0
core/module/translate/view/index/index.php Normal file → Executable file
View File

0
core/module/user/ressource/.htaccess Normal file → Executable file
View File

0
core/module/user/ressource/template.csv Normal file → Executable file
View File

0
core/module/user/user.php Normal file → Executable file
View File

0
core/module/user/view/add/add.js.php Normal file → Executable file
View File

0
core/module/user/view/add/add.php Normal file → Executable file
View File

0
core/module/user/view/edit/edit.js.php Normal file → Executable file
View File

0
core/module/user/view/edit/edit.php Normal file → Executable file
View File

0
core/module/user/view/forgot/forgot.css Normal file → Executable file
View File

0
core/module/user/view/forgot/forgot.php Normal file → Executable file
View File

0
core/module/user/view/import/import.css vendored Normal file → Executable file
View File

0
core/module/user/view/import/import.php Normal file → Executable file
View File

0
core/module/user/view/index/index.js.php Normal file → Executable file
View File

0
core/module/user/view/index/index.php Normal file → Executable file
View File

0
core/module/user/view/login/login.php Normal file → Executable file
View File

0
core/module/user/view/reset/reset.php Normal file → Executable file
View File

0
core/vendor/favicon-switcher/favicon-switcher.js vendored Normal file → Executable file
View File

0
core/vendor/filemanager/UploadHandler.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/ajax_calls.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/config/.htaccess vendored Normal file → Executable file
View File

0
core/vendor/filemanager/config/config.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/dialog.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/execute.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/force_download.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/include/FtpClient.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/include/FtpException.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/include/FtpWrapper.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/include/Response.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/include/ftp_class.php vendored Normal file → Executable file
View File

0
core/vendor/filemanager/include/mime_type_lib.php vendored Normal file → Executable file
View File

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