1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-21 13:52:35 +02:00

e_dashboard.php upgrades. (replacing e_latest.php and e_status.php)

This commit is contained in:
Cameron
2015-01-22 22:28:41 -08:00
parent 2fef44272e
commit 833567be4c
5 changed files with 60 additions and 50 deletions

View File

@@ -0,0 +1,43 @@
<?php
if (!defined('e107_INIT')) { exit; }
class forum_dashboard // include plugin-folder in the name.
{
function chart()
{
return false;
}
function status()
{
$sql = e107::getDb();
$forum_posts = $sql->count('forum_post');
$var[0]['icon'] = E_16_FORUM;
$var[0]['title'] = ADLAN_113;
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php";
$var[0]['total'] = $forum_posts;
return $var;
}
function latest()
{
$sql = e107::getDb();
$reported_posts = $sql->count('generic', '(*)', "WHERE gen_type='reported_post' OR gen_type='Reported Forum Post'");
$var[0]['icon'] = E_16_FORUM;
$var[0]['title'] = ADLAN_LAT_6;
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php?sr";
$var[0]['total'] = $reported_posts;
return $var;
}
}
?>