diff options
author | Gitea <gitea@fake.local> | 2021-11-10 17:53:13 +0100 |
---|---|---|
committer | Gitea <gitea@fake.local> | 2021-11-10 17:53:13 +0100 |
commit | 7b4af63a90a726b98a59b83e53f040a7a566a11d (patch) | |
tree | b85747947816fe4375e85ab6b822ffabec548c7b /Neutron-trunk/cms-special/admin/pages/index.php | |
parent | 80f78c2925530e945503ab603e79d1acc53075f4 (diff) | |
download | electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.gz electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.bz2 electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.zip |
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin/pages/index.php')
-rw-r--r--[-rwxr-xr-x] | Neutron-trunk/cms-special/admin/pages/index.php | 66 |
1 files changed, 1 insertions, 65 deletions
diff --git a/Neutron-trunk/cms-special/admin/pages/index.php b/Neutron-trunk/cms-special/admin/pages/index.php index d8e1e3d..e977d90 100755..100644 --- a/Neutron-trunk/cms-special/admin/pages/index.php +++ b/Neutron-trunk/cms-special/admin/pages/index.php @@ -1,66 +1,2 @@ <?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 +<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"); require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php"; quit(); ?>
\ No newline at end of file |