<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/src/init.php"; $pageTitle = "Admin Control Panel"; $session->adminLock(); $qord = NULL; $cord = NULL; if (isset($_GET['qord']) && $_GET['qord'] == 'count') { $qord = 'COUNT(*) DESC'; } elseif (isset($_GET['cord']) && $_GET['cord'] == 'count') { $cord = 'COUNT(*) DESC'; } $q_reports = QNA::get_reports('', $qord, true); $c_reports = Comment::get_reports('', $cord, true); //printX($q_reports); $sec = "staff"; include ROOT_PATH . 'inc/head.php'; ?> <body> <div class="main" id="admincp"> <div class="ui container section rep_mng"> <h2>Reports</h2> <h3>Reported Questions (<?php echo count($q_reports); ?> )</h3> <table class="ui red table"> <thead> <tr> <th>Post</th>
$session->adminLock(); if (isset($_POST['rp_rm']) && $_POST['rp_rm'] == 'true') { $id = $_POST['id']; Admin::removeReport($id); echo "1"; exit; } $id = $_GET['id']; $type = Post::PorQ($id); if (!$type) { Redirect::redirectTo('404'); } if ($type == 'q') { $QNA = new QNA(); $post = $QNA->get_question($id); $reps = QNA::get_reports($id); } else { $post = (object) Comment::getComment($id); $reps = Comment::get_reports($id); } $sec = "staff"; include ROOT_PATH . 'inc/head.php'; ?> <body> <div class="main" id="admincp"> <div class="ui container section rep_mng"> <?php if ($type == 'q') { ?> <div class="question report">