Added deletion completion page and delete link to nav bar

This commit is contained in:
Starbeamrainbowlabs 2014-12-28 10:16:28 +00:00
parent bf388f7a8e
commit 19241a8128
3 changed files with 18 additions and 8 deletions

View File

@ -541,7 +541,7 @@ switch($_GET["action"])
file_put_contents("./pageindex.json", json_encode($pageindex)); //save the new page index
unlink("./$page.md"); //delete the page from the disk
exit(renderpage("Deleting $pagename - $sitename", "Coming soon..."));
exit(renderpage("Deleting $page - $sitename", "<p>$page has been deleted. <a href='index.php'>Go back to the main page</a>.</p>"));
break;
/*

View File

@ -68,6 +68,8 @@ $navlinks = [
[ "Edit", "index.php?action=edit&page={page}" ],
[ "Printable", "index.php?action=view&printable=yes&page={page}" ],
" | ",
[ $admindisplaychar . "Delete", "index.php?action=delete&page={page}" ],
" | ",
[ "All Pages", "index.php?action=list" ],
" | ",
[ "Credits", "index.php?action=credits" ],
@ -95,12 +97,12 @@ $cookieprefix = preg_replace("/[^0-9a-z]/i", "", strtolower($sitename));
/*
Actions:
view - view a page
page - path to page
page - page name
printable=[yes/no] - make output printable
edit - open editor for page
page - path to page
page - page name
save - save edits to page
page - path to page
page - page name
list - list pages
category - the category to list [optional]
login - login to the site
@ -110,6 +112,9 @@ Actions:
string - string to hash
help - get help
credits - view the credits
delete - delete a page
page - page name
delete=yes - actually do the deletion (otherwise we display a prompt)
*/
@ -651,7 +656,7 @@ switch($_GET["action"])
file_put_contents("./pageindex.json", json_encode($pageindex)); //save the new page index
unlink("./$page.md"); //delete the page from the disk
exit(renderpage("Deleting $pagename - $sitename", "Coming soon..."));
exit(renderpage("Deleting $page - $sitename", "<p>$page has been deleted. <a href='index.php'>Go back to the main page</a>.</p>"));
break;
/*

View File

@ -65,6 +65,8 @@ $navlinks = [
[ "Edit", "index.php?action=edit&page={page}" ],
[ "Printable", "index.php?action=view&printable=yes&page={page}" ],
" | ",
[ $admindisplaychar . "Delete", "index.php?action=delete&page={page}" ],
" | ",
[ "All Pages", "index.php?action=list" ],
" | ",
[ "Credits", "index.php?action=credits" ],
@ -92,12 +94,12 @@ $cookieprefix = preg_replace("/[^0-9a-z]/i", "", strtolower($sitename));
/*
Actions:
view - view a page
page - path to page
page - page name
printable=[yes/no] - make output printable
edit - open editor for page
page - path to page
page - page name
save - save edits to page
page - path to page
page - page name
list - list pages
category - the category to list [optional]
login - login to the site
@ -107,5 +109,8 @@ Actions:
string - string to hash
help - get help
credits - view the credits
delete - delete a page
page - page name
delete=yes - actually do the deletion (otherwise we display a prompt)
*/
?>