aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/admin-v2/pages/index.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
commit529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 (patch)
tree8a50c30271b9b328cde0d907b1441f2dabdc341b /Neutron-trunk/cms-special/admin-v2/pages/index.php
parent15e4724761c50b30803df1811a525c85058f70bf (diff)
downloadelectrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.gz
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.bz2
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.zip
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2/pages/index.php')
-rw-r--r--Neutron-trunk/cms-special/admin-v2/pages/index.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/pages/index.php b/Neutron-trunk/cms-special/admin-v2/pages/index.php
new file mode 100644
index 0000000..d8e1e3d
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/pages/index.php
@@ -0,0 +1,66 @@
+<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
+<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Gestionnaire de pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/precontent.php"; ?>
+
+ <div class="admin-pages-list">
+ <?php
+
+ $pages = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/");
+ $sizetotal = 0;
+ foreach ($pages as $page) {
+ if ($page != "." && $page != "..") {
+ $type = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagetypes/" . $page);
+ $size = filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $page);
+ if ($size > 1024) {
+ if ($size > 1048576) {
+ $sizestr = round($size / 1048576, 2) . " " . $lang["sizes"]["mib"];
+ } else {
+ $sizestr = round($size / 1024, 2) . " " . $lang["sizes"]["kib"];
+ }
+ } else {
+ $sizestr = $size . " " . $lang["sizes"]["bytes"];
+ }
+ $sizetotal = $sizetotal + $size;
+ $sizestr = str_replace(".", ",", $sizestr);
+ if ($page == "index"): ?>
+<!-- echo("<li><a href='/cms-special/admin/pages/manage/?slug={$page}' class='sblink' title='{$lang['admin-pages']['lore']}'>{$lang['admin-pages']['home']}</a> ({$page}), {$typestr}, {$sizestr}</li>");-->
+ <div class="mdc-card mdc-card--outlined" style="width:256px;margin:10px;display:inline-block;">
+ <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;">
+ <h2 style="margin-bottom:5px;white-space: nowrap;overflow: hidden !important;text-overflow: ellipsis;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-pages"]["home"] ?></h2>
+ <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?php $text = strip_tags(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $page));if (strlen($text)>100){echo(substr($text,0,100) . " …");}else{echo($text);} ?></h3>
+ </div><br><br>
+ <div class="mdc-card__actions mdc-card__actions-pages-list">
+ <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages/edit/?slug=<?= $page ?>" title="<?= $lang["admin-pages"]["editl"] ?>" class="mdc-button mdc-card__action mdc-card__action--button">
+ <div class="mdc-button__ripple"></div>
+ <span class="mdc-button__label"><?= $lang["admin-pages"]["edit"] ?></span>
+ </a>
+ <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages/edit/?slug=<?= $page ?>&forcehtml" class="material-icons mdc-icon-button mdc-card__action mdc-card__action--icon mdi-icbtn-card" title="<?= $lang["admin-pages"]["editcode"] ?>">code</a>
+ </div>
+ </div>
+ <?php else: ?>
+ <div class="mdc-card mdc-card--outlined" style="width:256px;margin:10px;display:inline-block;">
+ <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;">
+ <h2 style="margin-bottom:5px;white-space: nowrap;overflow: hidden !important;text-overflow: ellipsis;" class="mdc-typography mdc-typography--headline6"><?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $page . "/pagename") ?></h2>
+ <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?php $text = strip_tags(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $page));if (strlen($text)>100){echo(substr($text,0,100) . " …");}else{echo($text);} ?></h3>
+ </div><br><br>
+ <div class="mdc-card__actions mdc-card__actions-pages-list">
+ <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages/edit/?slug=<?= $page ?>" title="<?= $lang["admin-pages"]["editl"] ?>" class="mdc-button mdc-card__action mdc-card__action--button">
+ <div class="mdc-button__ripple"></div>
+ <span class="mdc-button__label"><?= $lang["admin-pages"]["edit"] ?></span>
+ </a>
+ <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages/rename/?slug=<?= $page ?>" class="material-icons mdc-icon-button mdc-card__action mdc-card__action--icon mdi-icbtn-card" title="<?= $lang["admin-pages"]["renamel"] ?>">create</a>
+ <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages/delete/?slug=<?= $page ?>" class="material-icons mdc-icon-button mdc-card__action mdc-card__action--icon mdi-icbtn-card" title="<?= $lang["admin-pages"]["deletel"] ?>">delete</a>
+ </div>
+ </div>
+ <?php endif;
+ }
+ }
+ ?>
+ </div>
+ <p><div style="text-align: center;">
+ <a title="<?= $lang["admin-pages"]["alore"] ?>" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages/add" class="mdc-button mdc-button--outlined">
+ <div class="mdc-button__ripple"></div>
+ <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">add</i>
+ <span class="mdc-button__label"><?= $lang["admin-pages"]["create"] ?></span>
+ </a>
+ </div></p>
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?> \ No newline at end of file