implemented admin control panel with the ability to delete articles/users in bulk, and open user panels with the standard options to reset passwords, change email/usernames, or delete. additionally, updated SQL schema, created dummy data, and fixed some bugs.
This commit is contained in:
+9
-5
@@ -9,20 +9,24 @@ include_once 'functions/article_functions.php';
|
||||
// TODO: Move to a grid, where the left hand column is either a search and filtering system, or...Table of Contents?
|
||||
|
||||
// Default view, it'll show articles by recency
|
||||
if (!isset($_GET['article_id']) && !isset($_GET['tag'])) {
|
||||
if (!isset($_GET['article_id']) && !isset($_GET['tag']) && !isset($_GET['author_id'])) {
|
||||
$ids = article_ids_by_recency();
|
||||
|
||||
foreach ($ids as $id) {
|
||||
foreach ($ids as $id)
|
||||
echo article_card($id);
|
||||
}
|
||||
} else if (isset($_GET['article_id'])) {
|
||||
increment_read_counter($_GET['article_id']);
|
||||
echo article_page_from_markdown($_GET['article_id']);
|
||||
} else if (isset($_GET['author_id'])) {
|
||||
$ids = articles_ids_by_author($_GET['author_id']);
|
||||
|
||||
foreach ($ids as $id)
|
||||
echo article_card($id);
|
||||
} else if (isset($_GET['tag'])) {
|
||||
$ids = article_ids_by_tag($_GET['tag']);
|
||||
|
||||
foreach ($ids as $id) {
|
||||
foreach ($ids as $id)
|
||||
echo article_card($id);
|
||||
}
|
||||
}
|
||||
|
||||
include_once 'components/foot.php';
|
||||
|
||||
Reference in New Issue
Block a user