|
|
@ -347,7 +347,9 @@ function get_recent_posts() { |
|
|
$posts = get_profile($_SESSION[config("site.url")]['user'], 1, 5); |
|
|
$posts = get_profile($_SESSION[config("site.url")]['user'], 1, 5); |
|
|
if(!empty($posts)) { |
|
|
if(!empty($posts)) { |
|
|
echo '<table class="post-list">'; |
|
|
echo '<table class="post-list">'; |
|
|
echo '<tr class="head"><th>Title</th><th>Published</th><th>Views</th><th>Tag</th><th>Operations</th></tr>'; |
|
|
|
|
|
|
|
|
echo '<tr class="head"><th>Title</th><th>Published</th>'; |
|
|
|
|
|
if(config("views.counter") == "true") echo '<th>Views</th>'; |
|
|
|
|
|
echo '<th>Tag</th><th>Operations</th></tr>'; |
|
|
$i = 0; $len = count($posts); |
|
|
$i = 0; $len = count($posts); |
|
|
foreach($posts as $p) { |
|
|
foreach($posts as $p) { |
|
|
if ($i == 0) { |
|
|
if ($i == 0) { |
|
|
@ -363,7 +365,7 @@ function get_recent_posts() { |
|
|
echo '<tr class="' . $class . '">'; |
|
|
echo '<tr class="' . $class . '">'; |
|
|
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>'; |
|
|
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>'; |
|
|
echo '<td>' . date('d F Y', $p->date) . '</td>'; |
|
|
echo '<td>' . date('d F Y', $p->date) . '</td>'; |
|
|
echo '<td>' . $p->views . '</td>'; |
|
|
|
|
|
|
|
|
if(config("views.counter") == "true") echo '<td>' . $p->views . '</td>'; |
|
|
echo '<td>' . $p->tag . '</td>'; |
|
|
echo '<td>' . $p->tag . '</td>'; |
|
|
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>'; |
|
|
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>'; |
|
|
echo '</tr>'; |
|
|
echo '</tr>'; |
|
|
@ -380,7 +382,9 @@ function get_recent_pages() { |
|
|
if(!empty($posts)) { |
|
|
if(!empty($posts)) { |
|
|
krsort($posts); |
|
|
krsort($posts); |
|
|
echo '<table class="post-list">'; |
|
|
echo '<table class="post-list">'; |
|
|
echo '<tr class="head"><th>Title</th><th>Views</th><th>Operations</th></tr>'; |
|
|
|
|
|
|
|
|
echo '<tr class="head"><th>Title</th>'; |
|
|
|
|
|
if(config("views.counter") == "true") echo '<th>Views</th>'; |
|
|
|
|
|
echo '<th>Operations</th></tr>'; |
|
|
$i = 0; $len = count($posts); |
|
|
$i = 0; $len = count($posts); |
|
|
foreach($posts as $p) { |
|
|
foreach($posts as $p) { |
|
|
if ($i == 0) { |
|
|
if ($i == 0) { |
|
|
@ -395,7 +399,7 @@ function get_recent_pages() { |
|
|
$i++; |
|
|
$i++; |
|
|
echo '<tr class="' . $class . '">'; |
|
|
echo '<tr class="' . $class . '">'; |
|
|
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>'; |
|
|
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>'; |
|
|
echo '<td>' . $p->views . '</td>'; |
|
|
|
|
|
|
|
|
if(config("views.counter") == "true") echo '<td>' . $p->views . '</td>'; |
|
|
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>'; |
|
|
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>'; |
|
|
echo '</tr>'; |
|
|
echo '</tr>'; |
|
|
} |
|
|
} |
|
|
|