7 * @author Jan Altensen (Stricted)
8 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
9 * @copyright 2014-2016 Jan Altensen (Stricted)
11 class SecAddPage
extends AbstractPage
{
13 public function prepare() {
14 if (!isset($_GET['id']) ||
empty($_GET['id']) ||
!ENABLE_DNSSEC
) {
15 throw new \
Exception('The link you are trying to reach is no longer available or invalid.', 404);
18 $soaIDs = User
::getAccessibleDomains();
19 if (!in_array($_GET['id'], $soaIDs)) {
20 throw new \
Exception('Access denied. You\'re not authorized to view this page.', 403);
23 $sql = "SELECT * FROM dns_soa WHERE id = ?";
24 $res = DNS
::getDB()->query($sql, array($_GET['id']));
25 $soa = DNS
::getDB()->fetch_array($res);
27 DNS
::getTPL()->assign(array("soa" => $soa));