git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edit: distinct admin template for missing pages
[minimedit.git]
/
foot.inc.php
diff --git
a/foot.inc.php
b/foot.inc.php
index e61346a1fab0b7e815bb94bbf1221a10ce748b1d..e2ac444285d6b3819a074a99f9682800f222ca4a 100755
(executable)
--- a/
foot.inc.php
+++ b/
foot.inc.php
@@
-1,39
+1,21
@@
-</div>
<hr class="footer" />
<?php
define('N', "\n");
<hr class="footer" />
<?php
define('N', "\n");
-global $
User, $Admin
;
+global $
Page, $User, $Edit
;
-$curfile = ltrim($_SERVER['SCRIPT_NAME'], '/');
-if (is_executable(__DIR__ . '/' . $curfile)) {
- // dynamic code is +x
- $Admin = FALSE;
-}
-
-if ($Admin) {
- $edit = preg_match('/[?]edit$/', $_SERVER['REQUEST_URI']);
-
- if ($edit) {
+if ($User['admin']) {
+ if ($Edit) {
echo '<script src="/ckeditor/ckeditor.js"></script>'.N;
echo '<script src="/edit.js"></script>'.N;
echo '<script src="/ckeditor/ckeditor.js"></script>'.N;
echo '<script src="/edit.js"></script>'.N;
- if (($notfound = $_SERVER['SCRIPT_NAME'] == '/404.php')) {
- echo <<<'EOT'
-<script>
-var pagebody = document.getElementsByClassName('article')[0];
-pagebody.innerHTML = '<h2>Nieuwe pagina</h2><p> </p>';
-</script>
-EOT;
- }
}
echo '<p class="footer">'.N;
}
echo '<p class="footer">'.N;
- echo "Beheer toegestaan voor
$User
:".N;
+ echo "Beheer toegestaan voor
{$User['name']}
:".N;
printf('<a href="?%s">%s</a>'.N,
printf('<a href="?%s">%s</a>'.N,
- $
e
dit ? '' : 'edit',
- $
e
dit ? 'lezen' : ($notfound ? 'aanmaken' : 'aanpassen')
+ $
E
dit ? '' : 'edit',
+ $
E
dit ? 'lezen' : ($notfound ? 'aanmaken' : 'aanpassen')
);
echo '</p>'.N;
}
);
echo '</p>'.N;
}
-?></body></html>