License: MIT Copyright (c) 2016 Samerton
Example #1
0
<?php

/* 
 *  Made by Partydragen And Samerton
 *  http://partydragen.com/
 *
 */
// page for ModCP sidebar
$mod_page = 'banappeal';
require 'addons/BanAppeal/BanAppeal.php';
$banappeal = new BanAppeal();
// Mod check
if ($user->isLoggedIn()) {
    if (!$user->canViewMCP($user->data()->id) || !$banappeal->canViewBanAppeal($user->data()->id)) {
        Redirect::to('/');
        die;
    }
} else {
    Redirect::to('/');
    die;
}
if (isset($_GET['app'])) {
    // Does the ban appeal exist?
    $application = $queries->getWhere('banappeal_replies', array('id', '=', htmlspecialchars($_GET['app'])));
    if (empty($application)) {
        // Doesn't exist
        echo '<script>window.location.replace(\'/mod/banappeal\');</script>';
        die;
    } else {
        $application = $application[0];
        if (!isset($_GET['action'])) {