3 use dns\system\helper\IDatabase
;
4 use dns\system\helper\TDatabase
;
9 * @author Jan Altensen (Stricted)
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @copyright 2014-2016 Jan Altensen (Stricted)
13 class SecAddPage
extends AbstractPage
implements IDatabase
{
16 public function prepare() {
17 if (!isset($_GET['id']) ||
empty($_GET['id']) ||
!ENABLE_DNSSEC
) {
18 throw new \
Exception('The link you are trying to reach is no longer available or invalid.', 404);
21 $soaIDs = User
::getAccessibleDomains();
22 if (!in_array($_GET['id'], $soaIDs)) {
23 throw new \
Exception('Access denied. You\'re not authorized to view this page.', 403);
26 $sql = "SELECT * FROM dns_soa WHERE id = ?";
27 $res = $this->db
->query($sql, array($_GET['id']));
28 $soa = $this->db
->fetch_array($res);
30 $this->tpl
->assign(array("soa" => $soa));