<?php
/**
 * app/plugins/comments/controllers/moderator.php
 *
 * This is the Moderator controller.
 *
 * @version 3.0
 * @author  Joey Kimsey <Joey@thetempusproject.com>
 * @link    https://TheTempusProject.com
 * @license https://opensource.org/licenses/MIT [MIT LICENSE]
 */
namespace TheTempusProject\Controllers;

use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Classes\Controller;
use TheTempusProject\TheTempusProject as App;
use TheTempusProject\Hermes\Functions\Redirect;
use TheTempusProject\Bedrock\Functions\Session;

class Moderator extends Controller {
    public function __construct() {
        parent::__construct();
        Template::noIndex();
        if ( !App::$isMod ) {
            Session::flash( 'error', 'You do not have permission to view this page.' );
            return Redirect::home();
        }
    }

    public function index() {
        self::$title = 'Moderator\'s Area';
        Views::view( 'comments.moderator' );
    }
}
