partially implemented todo tracker
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
function admin_article_view()
|
||||
{
|
||||
$display = '
|
||||
$display = '
|
||||
<div class="view_card">
|
||||
<div class="row">
|
||||
<div class="row_space_between">
|
||||
<h3>Articles</h3>
|
||||
<a href="admin.php?view=users">View Users</a>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<form method="post">
|
||||
<input type="hidden" name="form_id" value="articles">
|
||||
<div class="row">
|
||||
<div class="row_space_between">
|
||||
<label for="delete" class="form_checkbox_container">Delete
|
||||
<input type="radio" class="button" name="action" id="delete" value="delete">
|
||||
<span class="checkmark"></span>
|
||||
@@ -33,11 +33,11 @@ function admin_article_view()
|
||||
</thead>
|
||||
<tbody>
|
||||
';
|
||||
$conn = get_connection();
|
||||
$results = $conn->query('SELECT article_id, username, title, read_count, article.created_at, updated_at, published_at, excerpt FROM article INNER JOIN user ON article.author_id = user.user_id;');
|
||||
$conn = get_connection();
|
||||
$results = $conn->query('SELECT article_id, username, title, read_count, article.created_at, updated_at, published_at, excerpt FROM article INNER JOIN user ON article.author_id = user.user_id;');
|
||||
|
||||
foreach ($results as $key => $result) {
|
||||
$display .= '
|
||||
foreach ($results as $key => $result) {
|
||||
$display .= '
|
||||
<tr data-href="articles.php?view=read&article_id=' . $result['article_id'] . '">
|
||||
<td class="excluded_cell">
|
||||
<label class="form_checkbox_container">
|
||||
@@ -54,9 +54,9 @@ function admin_article_view()
|
||||
<td>' . $result['read_count'] . '</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
$display .= '
|
||||
$display .= '
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -64,5 +64,5 @@ function admin_article_view()
|
||||
</div>
|
||||
';
|
||||
|
||||
return $display;
|
||||
return $display;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user