change some structures
authorStricted <info@stricted.de>
Tue, 17 Feb 2015 12:39:26 +0000 (13:39 +0100)
committerStricted <info@stricted.de>
Tue, 17 Feb 2015 12:39:26 +0000 (13:39 +0100)
lib/page/ActionPage.class.php
lib/page/DomainAddPage.class.php
lib/page/UserList.class.php
lib/system/DNS.class.php
lib/system/ParseZone.class.php [deleted file]
lib/util/ParseZone.class.php [new file with mode: 0644]
templates/default/header.tpl
templates/default/index.tpl

index 00d4e88d029b9a6e9f43523d632511c680acdf24..13b2e96e98fcb86a82e8f49d8d8e9c9147525cf6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 namespace dns\page;
-use dns\system\ParseZone;
+use dns\util\ParseZone;
 use dns\system\DNS;
 use dns\system\User;
 
@@ -19,6 +19,11 @@ class ActionPage extends AbstractPage {
                $action = trim($_POST['action']);
                $dataID = intval(trim($_POST['dataID']));
                if ($action == "toggleDomain") {
+                       if (User::isReseller() === false) {
+                               echo "failure";
+                               exit;
+                       }
+                       
                        $soaIDs = User::getAccessibleDomains();
                        if (!in_array($dataID, $soaIDs)) {
                                echo "failure";
@@ -38,6 +43,11 @@ class ActionPage extends AbstractPage {
                        exit;
                }
                else if ($action == "deleteDomain") {
+                       if (User::isReseller() === false) {
+                               echo "failure";
+                               exit;
+                       }
+                       
                        $soaIDs = User::getAccessibleDomains();
                        if (!in_array($dataID, $soaIDs)) {
                                echo "failure";
@@ -169,7 +179,7 @@ class ActionPage extends AbstractPage {
                                $row = DNS::getDB()->fetch_array($res);
                                
                                if (empty($row)) {
-                                       $apiKey = sha1(uniqid(sha1(uniqid().time().uniqid())));
+                                       $apiKey = DNS::generateRandomID();
                                        
                                        $sql = "INSERT INTO dns_api (id, userID, apiKey) VALUES (NULL, ?, ?)";
                                        DNS::getDB()->query($sql, array($_SESSION['userID'], $apiKey));
@@ -183,6 +193,12 @@ class ActionPage extends AbstractPage {
                        if (isset($_POST['zone']) && !empty($_POST['zone'])) {
                                if ($dataID == 0) {
                                        if (isset($_POST['origin']) && !empty($_POST['origin'])) {
+                                               /*
+                                               if (User::isReseller() === false) {
+                                                       echo "failure";
+                                                       exit;
+                                               }
+                                               */
                                                // new zone
                                        }
                                }
index a038bb19e16cd7b872dbf637367f2d1b7ec9f684..333e7092a2b46378f74cefa6f376cab1ccb0ed5d 100644 (file)
@@ -12,6 +12,9 @@ class DomainAddPage extends AbstractPage {
        public $activeMenuItem = 'add';
        
        public function prepare() {
+               if (User::isReseller() === false) {
+                       throw new \Exeption('Forbidden', 403);
+               }
                if (isset($_POST['origin']) && isset($_POST['submit'])) {
                        if (!empty($_POST['origin'])) {
                                $origin = $_POST['origin'];
index 3388f37db15a0c874eba11e5dd69f10db634a505..442b6a0cc05f78ba95f71924b0647ec276eaf19a 100644 (file)
@@ -29,5 +29,8 @@ class UserListPage extends AbstractPage {
                        
                        DNS::getTPL()->assign(array("user" => $user));
                }
+               else {
+                       throw new \Exeption('Forbidden', 403);
+               }
        }
 }
index 9ab57e5f7f71f085a8b1543acdfc55048667f008..e75c6ec0739ff005d1e0dd26e29fd5c58a404fde 100644 (file)
@@ -183,7 +183,11 @@ class DNS {
                */
                
                /* assign language variables */
-               self::getTPL()->assign(array("language" => $this->language));
+               self::getTPL()->assign(array(
+                               "language" => $this->language,
+                               "isReseller" => User::isReseller(),
+                               "isAdmin" => User::isAdmin()
+                       ));
        }
        
        /**
@@ -193,6 +197,15 @@ class DNS {
                return self::$tplObj;
        }
        
+       /**
+        * Creates a random hash.
+        * 
+        * @return      string
+        */
+       public static function generateRandomID() {
+               return sha1(microtime() . uniqid(mt_rand(), true));
+       }
+       
        /**
         * build options from database
         *
diff --git a/lib/system/ParseZone.class.php b/lib/system/ParseZone.class.php
deleted file mode 100644 (file)
index 72a0eab..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-<?php
-namespace dns\system;
-
-/**
- * @author      Jan Altensen (Stricted)
- * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @copyright   2015 Jan Altensen (Stricted)
- */
-class ParseZone {
-       /**
-        * domain name
-        *
-        * var  string
-        */
-       private $origin = '';
-       
-       /**
-        * lines of zone file
-        *
-        * var  array
-        */
-       private $lines = array();
-       
-       /**
-        * global ttl
-        *
-        * var  integer
-        */
-       private $ttl = 0;
-       
-       /**
-        * parsed soa record
-        *
-        * var  array
-        */
-       private $soa = array();
-       
-       /**
-        * parsed resource records
-        *
-        * var  array
-        */
-       private $records = array();
-       
-       /**
-        * init this class
-        *
-        * param        string  $file
-        * param        string  $origin
-        */
-       public function __construct ($file, $origin = "") {
-               if (!empty($origin)) $this->origin = $origin;
-               // unify all lines
-               $file = preg_replace_callback('/(\([^()]*\))/', function ($matches) {
-                       $a = explode("\n", $matches[0]);
-                       $b = array();
-                       foreach ($a as $line) {
-                               
-                               // unify whitespaces
-                               $line = preg_replace('/\s+/', ' ', $line);
-                               
-                               // strip comments
-                               $line = preg_replace('/(\s+)?(;|#)([\s\S]+)?/i', '', $line);
-                               $b[] = $line;
-                       }
-                       $line = implode("", $b);
-                       
-                       return str_replace(array("( ", "(", " )", ")"), "", $line);
-               }, $file);
-               
-               $this->lines = explode("\n", $file);
-               
-               /*
-                * limit lines to 200, if more is needed we can change it
-                */
-               if (count($this->lines) > 200) {
-                       throw new \Exception('zone file to big for parsing');
-               }
-       }
-       
-       /**
-        * parse zone file
-        */
-       public function parse () {
-               foreach ($this->lines as $line) {
-                       // unify whitespaces
-                       $line = preg_replace('/\s+/', ' ', $line);
-                       
-                       // strip comments
-                       $line = preg_replace('/(\s+)?(;|#)([\s\S]+)?/i', '', $line);
-               
-                       /* ignore these lines */
-                       if (empty($line)) continue;
-                       if (strpos($line, "RRSIG") !== false) continue;
-                       if (strpos($line, "NSEC") !== false) continue;
-                       if (strpos($line, "DNSKEY") !== false) continue;
-                       if (strpos($line, "SPF") !== false) continue;
-
-                       $this->parseORIGIN($line);
-                       $this->parseTTL($line);
-                       
-                       if (strpos($line, "SOA") !== false) {
-                               $this->parseSOA($line);
-                               continue;
-                       }
-                       
-                       // parse all other records
-                       $this->parseRR($line);
-               }
-       }
-       
-       /**
-        * parse ORIGIN
-        *
-        * param        string  $line
-        */
-       public function parseORIGIN ($line) {
-               if (preg_match('/\$ORIGIN ([*-a-z0-9.]+)/i', $line, $match)) {
-                       $origin = $match[1];
-                       if (empty($this->origin)) {
-                               $this->origin = $origin;
-                       }
-                       else {
-                               if ($this->origin != $origin) {
-                                       throw new \Exception('parse error');
-                               }
-                       }
-               }
-       }
-       
-       /**
-        * parse TTL
-        *
-        * param        string  $line
-        */
-       public function parseTTL ($line) {
-               if (preg_match('/\$TTL ([0-9]+)([a-z]+)?/i', $line, $match)) {
-                       if (isset($match[2])) {
-                               $this->ttl = $this->formatTime($match[1], $match[2]);
-                       }
-                       else {
-                               $this->ttl = $match[1];
-                       }
-               }
-       }
-       
-       /**
-        * parse RR
-        *
-        * param        string  $line
-        */
-       public function parseRR ($line) {
-               if(preg_match("/([*-a-z0-9.]+)? ([0-9]+)?(?: )?(IN)?(?: )?([a-z]+) ([\s\S]+)/i", $line, $matches)) {
-                       $record=array();
-                       // parse domain name
-                       if (!empty($this->origin) && $matches[1] == "@") {
-                               $record['name'] = $this->origin;
-                       }
-                       else {
-                               if (empty($matches[1])) {
-                                       $record['name'] = $this->origin;
-                               }
-                               else {
-                                       $record['name'] = $matches[1];
-                               }
-                       }
-                       
-                       // parse ttl
-                       if (empty($matches[2])) {
-                               $record['ttl'] = $this->ttl;
-                       }
-                       else {
-                               $record['ttl'] = $matches[2];
-                       }
-                       
-                       // parse type
-                       $record['type'] = $matches[4];
-                       if ($matches[4] == 'MX' || $matches[4] == 'SRV' || $matches[4] == 'DS') {
-                               $exp = explode(' ', $matches[5], 2);
-                               $record['aux'] = $exp[0];
-                               $record['data'] = $exp[1];
-                       }
-                       else {
-                               $record['aux'] = 0;
-                               $record['data'] = $matches[5];
-                       }
-                       
-                       // parse data
-                       if (strpos($record['data'], "@") !== false && !empty($this->origin)) {
-                               $record['data'] = str_replace("@", $this->origin, $record['data']);
-                       }
-                       
-                       $this->records[] = $record;
-               }
-       }
-       
-       /**
-        * parse SOA
-        *
-        * param        string  $line
-        */
-       public function parseSOA ($line) {
-               if (preg_match("/([@a-z0-9.-]+) ([0-9]+)?([a-z]+)?(?: )?(IN)?(?: )?(?:[a-z]+) ([-a-z0-9.]+) ([@-a-z0-9.]+) ([0-9a-]+) ([0-9]+)([a-z]+)? ([0-9]+)([a-z]+)? ([0-9]+)([a-z]+)? ([0-9]+)([a-z]+)?/i", $line, $matches)) {
-                       // set domain name
-                       if ($matches[1] == "@") {
-                               if (empty($this->origin)) {
-                                       throw new \Exception('parse error');
-                               }
-                       }
-                       else {
-                               if (empty($this->origin)) {
-                                       if (empty($matches[1])) {
-                                               throw new \Exception('parse error');
-                                       }
-                                       else {
-                                               $this->origin = $matches[1];
-                                       }
-                               }
-                               else {
-                                       if ($this->origin != $matches[1]) {
-                                               throw new \Exception('parse error');
-                                       }
-                               }
-                       }
-                       
-                       $this->soa['origin'] = $this->origin;
-                       $this->soa['ns'] = $matches[5];
-                       
-                       // replace @ with .
-                       if (strpos($matches[6], "@") !== false) {
-                               $this->soa['mbox'] = str_replace("@", ".", $matches[6]);
-                       }
-                       else {
-                               $this->soa['mbox'] = $matches[6];
-                       }
-                       
-                       $this->soa['serial'] = $matches[7];
-                       
-                       // parse refresh
-                       if (isset($matches[9]) && !empty($matches[9])) {
-                               $this->soa['refresh'] =  $this->formatTime($matches[8], $matches[9]);
-                       }
-                       else {
-                               $this->soa['refresh'] =  $matches[8];
-                       }
-                       
-                       // parse retry
-                       if (isset($matches[11]) && !empty($matches[11])) {
-                               $this->soa['retry'] = $this->formatTime($matches[10], $matches[11]);
-                       }
-                       else {
-                               $this->soa['retry'] = $matches[10];
-                       }
-                       
-                       // parse expire
-                       if (isset($matches[13]) && !empty($matches[13])) {
-                               $this->soa['expire'] = $this->formatTime($matches[12], $matches[13]);
-                       }
-                       else {
-                               $this->soa['expire'] = $matches[12];
-                       }
-                       
-                       // parse minimum and ttl
-                       if (isset($matches[3]) && !empty($matches[3]) && $matches[3] != "IN" && $matches[3] != "SO") {
-                               $this->soa['minimum'] = $this->formatTime($matches[2], $matches[3]);
-                               $this->soa['ttl'] = $this->formatTime($matches[2], $matches[3]);
-                       }
-                       else {
-                               if (!empty($matches[2])) {
-                                       $this->soa['minimum'] = $matches[2];
-                                       $this->soa['ttl'] = $matches[2];
-                               }
-                               else {
-                                       $this->soa['minimum'] = $this->ttl;
-                                       $this->soa['ttl'] = $this->ttl;
-                               }
-                       }
-               }
-       }
-       
-       /**
-        * returns the parsed zone file
-        *
-        * @return      array
-        */
-       public function getParsedData () {
-               return array('soa' => $this->soa, 'rr' => $this->records);
-       }
-       
-       /**
-        * format ttl to seconds
-        *
-        * @param       integer $time
-        * @param       string  $modifier
-        * @return      integer
-        */
-       public function formatTime ($time, $modifier = '') {
-               if (!empty($modifier)) {
-                       switch($modifier) {
-                               case "y":
-                               case "Y":
-                                       $multiplier=86400*365;
-                                       break;
-                               case 'w':
-                               case 'W':
-                                       $multiplier=86400*7;
-                                       break;
-                               case "d":
-                               case "D":
-                                       $multiplier=86400;
-                                       break;
-                               case "h":
-                               case "H":
-                                       $multiplier=3600;
-                                       break;
-                               case "m":
-                               case "M":
-                                       $multiplier=60;
-                                       break;
-                               case "s":
-                               case "S":
-                               default:
-                                       $multiplier=1;
-                                       break;
-                       }
-                       
-                       return $time * $multiplier;
-               }
-               else {
-                       return $time;
-               }
-       }
-}
diff --git a/lib/util/ParseZone.class.php b/lib/util/ParseZone.class.php
new file mode 100644 (file)
index 0000000..2806522
--- /dev/null
@@ -0,0 +1,333 @@
+<?php
+namespace dns\util;
+
+/**
+ * @author      Jan Altensen (Stricted)
+ * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @copyright   2015 Jan Altensen (Stricted)
+ */
+class ParseZone {
+       /**
+        * domain name
+        *
+        * var  string
+        */
+       private $origin = '';
+       
+       /**
+        * lines of zone file
+        *
+        * var  array
+        */
+       private $lines = array();
+       
+       /**
+        * global ttl
+        *
+        * var  integer
+        */
+       private $ttl = 0;
+       
+       /**
+        * parsed soa record
+        *
+        * var  array
+        */
+       private $soa = array();
+       
+       /**
+        * parsed resource records
+        *
+        * var  array
+        */
+       private $records = array();
+       
+       /**
+        * init this class
+        *
+        * param        string  $file
+        * param        string  $origin
+        */
+       public function __construct ($file, $origin = "") {
+               if (!empty($origin)) $this->origin = $origin;
+               // unify all lines
+               $file = preg_replace_callback('/(\([^()]*\))/', function ($matches) {
+                       $a = explode("\n", $matches[0]);
+                       $b = array();
+                       foreach ($a as $line) {
+                               
+                               // unify whitespaces
+                               $line = preg_replace('/\s+/', ' ', $line);
+                               
+                               // strip comments
+                               $line = preg_replace('/(\s+)?(;|#)([\s\S]+)?/i', '', $line);
+                               $b[] = $line;
+                       }
+                       $line = implode("", $b);
+                       
+                       return str_replace(array("( ", "(", " )", ")"), "", $line);
+               }, $file);
+               
+               $this->lines = explode("\n", $file);
+               
+               /*
+                * limit lines to 200, if more is needed we can change it
+                */
+               if (count($this->lines) > 200) {
+                       throw new \Exception('zone file to big for parsing');
+               }
+       }
+       
+       /**
+        * parse zone file
+        */
+       public function parse () {
+               foreach ($this->lines as $line) {
+                       // unify whitespaces
+                       $line = preg_replace('/\s+/', ' ', $line);
+                       
+                       // strip comments
+                       $line = preg_replace('/(\s+)?(;|#)([\s\S]+)?/i', '', $line);
+               
+                       /* ignore these lines */
+                       if (empty($line)) continue;
+                       if (strpos($line, "RRSIG") !== false) continue;
+                       if (strpos($line, "NSEC") !== false) continue;
+                       if (strpos($line, "DNSKEY") !== false) continue;
+                       if (strpos($line, "SPF") !== false) continue;
+
+                       $this->parseORIGIN($line);
+                       $this->parseTTL($line);
+                       
+                       if (strpos($line, "SOA") !== false) {
+                               $this->parseSOA($line);
+                               continue;
+                       }
+                       
+                       // parse all other records
+                       $this->parseRR($line);
+               }
+       }
+       
+       /**
+        * parse ORIGIN
+        *
+        * param        string  $line
+        */
+       public function parseORIGIN ($line) {
+               if (preg_match('/\$ORIGIN ([*-a-z0-9.]+)/i', $line, $match)) {
+                       $origin = $match[1];
+                       if (empty($this->origin)) {
+                               $this->origin = $origin;
+                       }
+                       else {
+                               if ($this->origin != $origin) {
+                                       throw new \Exception('parse error');
+                               }
+                       }
+               }
+       }
+       
+       /**
+        * parse TTL
+        *
+        * param        string  $line
+        */
+       public function parseTTL ($line) {
+               if (preg_match('/\$TTL ([0-9]+)([a-z]+)?/i', $line, $match)) {
+                       if (isset($match[2])) {
+                               $this->ttl = $this->formatTime($match[1], $match[2]);
+                       }
+                       else {
+                               $this->ttl = $match[1];
+                       }
+               }
+       }
+       
+       /**
+        * parse RR
+        *
+        * param        string  $line
+        */
+       public function parseRR ($line) {
+               if(preg_match("/([*-a-z0-9.]+)? ([0-9]+)?(?: )?(IN)?(?: )?([a-z]+) ([\s\S]+)/i", $line, $matches)) {
+                       $record=array();
+                       // parse domain name
+                       if (!empty($this->origin) && $matches[1] == "@") {
+                               $record['name'] = $this->origin;
+                       }
+                       else {
+                               if (empty($matches[1])) {
+                                       $record['name'] = $this->origin;
+                               }
+                               else {
+                                       $record['name'] = $matches[1];
+                               }
+                       }
+                       
+                       // parse ttl
+                       if (empty($matches[2])) {
+                               $record['ttl'] = $this->ttl;
+                       }
+                       else {
+                               $record['ttl'] = $matches[2];
+                       }
+                       
+                       // parse type
+                       $record['type'] = $matches[4];
+                       if ($matches[4] == 'MX' || $matches[4] == 'SRV' || $matches[4] == 'DS') {
+                               $exp = explode(' ', $matches[5], 2);
+                               $record['aux'] = $exp[0];
+                               $record['data'] = $exp[1];
+                       }
+                       else {
+                               $record['aux'] = 0;
+                               $record['data'] = $matches[5];
+                       }
+                       
+                       // parse data
+                       if (strpos($record['data'], "@") !== false && !empty($this->origin)) {
+                               $record['data'] = str_replace("@", $this->origin, $record['data']);
+                       }
+                       
+                       $this->records[] = $record;
+               }
+       }
+       
+       /**
+        * parse SOA
+        *
+        * param        string  $line
+        */
+       public function parseSOA ($line) {
+               if (preg_match("/([@a-z0-9.-]+) ([0-9]+)?([a-z]+)?(?: )?(IN)?(?: )?(?:[a-z]+) ([-a-z0-9.]+) ([@-a-z0-9.]+) ([0-9a-]+) ([0-9]+)([a-z]+)? ([0-9]+)([a-z]+)? ([0-9]+)([a-z]+)? ([0-9]+)([a-z]+)?/i", $line, $matches)) {
+                       // set domain name
+                       if ($matches[1] == "@") {
+                               if (empty($this->origin)) {
+                                       throw new \Exception('parse error');
+                               }
+                       }
+                       else {
+                               if (empty($this->origin)) {
+                                       if (empty($matches[1])) {
+                                               throw new \Exception('parse error');
+                                       }
+                                       else {
+                                               $this->origin = $matches[1];
+                                       }
+                               }
+                               else {
+                                       if ($this->origin != $matches[1]) {
+                                               throw new \Exception('parse error');
+                                       }
+                               }
+                       }
+                       
+                       $this->soa['origin'] = $this->origin;
+                       $this->soa['ns'] = $matches[5];
+                       
+                       // replace @ with .
+                       if (strpos($matches[6], "@") !== false) {
+                               $this->soa['mbox'] = str_replace("@", ".", $matches[6]);
+                       }
+                       else {
+                               $this->soa['mbox'] = $matches[6];
+                       }
+                       
+                       $this->soa['serial'] = $matches[7];
+                       
+                       // parse refresh
+                       if (isset($matches[9]) && !empty($matches[9])) {
+                               $this->soa['refresh'] =  $this->formatTime($matches[8], $matches[9]);
+                       }
+                       else {
+                               $this->soa['refresh'] =  $matches[8];
+                       }
+                       
+                       // parse retry
+                       if (isset($matches[11]) && !empty($matches[11])) {
+                               $this->soa['retry'] = $this->formatTime($matches[10], $matches[11]);
+                       }
+                       else {
+                               $this->soa['retry'] = $matches[10];
+                       }
+                       
+                       // parse expire
+                       if (isset($matches[13]) && !empty($matches[13])) {
+                               $this->soa['expire'] = $this->formatTime($matches[12], $matches[13]);
+                       }
+                       else {
+                               $this->soa['expire'] = $matches[12];
+                       }
+                       
+                       // parse minimum and ttl
+                       if (isset($matches[3]) && !empty($matches[3]) && $matches[3] != "IN" && $matches[3] != "SO") {
+                               $this->soa['minimum'] = $this->formatTime($matches[2], $matches[3]);
+                               $this->soa['ttl'] = $this->formatTime($matches[2], $matches[3]);
+                       }
+                       else {
+                               if (!empty($matches[2])) {
+                                       $this->soa['minimum'] = $matches[2];
+                                       $this->soa['ttl'] = $matches[2];
+                               }
+                               else {
+                                       $this->soa['minimum'] = $this->ttl;
+                                       $this->soa['ttl'] = $this->ttl;
+                               }
+                       }
+               }
+       }
+       
+       /**
+        * returns the parsed zone file
+        *
+        * @return      array
+        */
+       public function getParsedData () {
+               return array('soa' => $this->soa, 'rr' => $this->records);
+       }
+       
+       /**
+        * format ttl to seconds
+        *
+        * @param       integer $time
+        * @param       string  $modifier
+        * @return      integer
+        */
+       public function formatTime ($time, $modifier = '') {
+               if (!empty($modifier)) {
+                       switch($modifier) {
+                               case "y":
+                               case "Y":
+                                       $multiplier=86400*365;
+                                       break;
+                               case 'w':
+                               case 'W':
+                                       $multiplier=86400*7;
+                                       break;
+                               case "d":
+                               case "D":
+                                       $multiplier=86400;
+                                       break;
+                               case "h":
+                               case "H":
+                                       $multiplier=3600;
+                                       break;
+                               case "m":
+                               case "M":
+                                       $multiplier=60;
+                                       break;
+                               case "s":
+                               case "S":
+                               default:
+                                       $multiplier=1;
+                                       break;
+                       }
+                       
+                       return $time * $multiplier;
+               }
+               else {
+                       return $time;
+               }
+       }
+}
index 162960295d35398a4451239fd897d0506a29626e..305941fb6d5a02d839fafdc4c049cdad12ca46e3 100644 (file)
@@ -50,7 +50,7 @@
                                                                <a href="#"><i class="fa fa-home"></i> Domains<span class="fa arrow"></span></a>
                                                                <ul class="{if $activeMenuItem == 'index' || $activeMenuItem == 'add' || $activeMenuItem == 'update'}nav nav-second-level collapse in{else}nav nav-second-level{/if}">
                                                                        <li><a {if $activeMenuItem == 'index'}class="active" {/if}href="index.php?page=DomainList"><i class="fa fa-list"></i> Auflisten</a></li>
-                                                                       <li><a {if $activeMenuItem == 'add'}class="active" {/if}href="index.php?page=DomainAdd"><i class="fa fa-plus"></i> Hinzufügen</a></li>
+                                                                       {if $isReseller === true}<li><a {if $activeMenuItem == 'add'}class="active" {/if}href="index.php?page=DomainAdd"><i class="fa fa-plus"></i> Hinzufügen</a></li>{/if}
                                                                </ul>
                                                        </li>
                                                        <li{if $activeMenuItem == 'settings' || $activeMenuItem == 'api'} class="active"{/if}>
index 2b86577ed6440c6430313f7f8f1bc947a934080f..3426b6ea598117891b74766ae79cf722ed1a84de 100644 (file)
@@ -6,6 +6,7 @@
                </ol>
        </div>
 </div>
+{if $isReseller === true}
 <div class="row">
        <div class="col-lg-12">
                <div class="page-header pull-right">
@@ -13,6 +14,7 @@
                </div>
        </div>
 </div>
+{/if}
 {hascontent}
        <div class="row">
                <div class="col-lg-12">
                                                                        <td>{$domain['serial']}</td>
                                                                        <td>{$domain['rrc']}</td>
                                                                        <td>
-                                                                               <span class="fa fa-remove ttips pointer deleteDomain" delete-id="{$domain['id']}" delete-confirm="{lang}domain.delete.message{/lang}" title="{lang}button.delete{/lang}"></span>
-                                                                               <span class="fa fa{if $domain['active']}-check{/if}-square-o ttips pointer toggleDomain" toggle-id="{$domain['id']}" title="{if $domain['active']}{lang}button.disable{/lang}{else}{lang}button.enable{/lang}{/if}" data-disable-message="{lang}button.disable{/lang}" data-enable-message="{lang}button.enable{/lang}"></span>
+                                                                               {if $isReseller === true}
+                                                                                       <span class="fa fa-remove ttips pointer deleteDomain" delete-id="{$domain['id']}" delete-confirm="{lang}domain.delete.message{/lang}" title="{lang}button.delete{/lang}"></span>
+                                                                                       <span class="fa fa{if $domain['active']}-check{/if}-square-o ttips pointer toggleDomain" toggle-id="{$domain['id']}" title="{if $domain['active']}{lang}button.disable{/lang}{else}{lang}button.enable{/lang}{/if}" data-disable-message="{lang}button.disable{/lang}" data-enable-message="{lang}button.enable{/lang}"></span>
+                                                                               {/if}
                                                                                <a href="index.php?page=SecList&id={$domain['id']}" class="ttips" title="Edit DNSSEC"><span class="fa fa-key"></span></a>
                                                                        </td>
                                                                </tr>