add_record.php
changeset 37 b785e54690ce
parent 13 2ff220cfde13
child 47 ae140472d97c
equal deleted inserted replaced
36:4ec5ab29f634 37:b785e54690ce
     1 <?php
     1 <?php
     2 
     2 
     3 require_once("inc/toolkit.inc.php");
     3 require_once("inc/toolkit.inc.php");
       
     4 
       
     5 $xsid = (isset($_GET['id'])) ? $_GET['id'] : $_POST['zoneid'];
       
     6 if ((!level(5)) && ((!xs($xsid) || ($_SESSION[$xsid.'_ispartial'])))) {
       
     7 	error(ERR_RECORD_ACCESS_DENIED);
       
     8 }
     4 
     9 
     5 if ($_POST["commit"]) {
    10 if ($_POST["commit"]) {
     6         $ret = add_record($_POST["zoneid"], $_POST["name"], $_POST["type"], $_POST["content"], $_POST["ttl"], $_POST["prio"]);
    11         $ret = add_record($_POST["zoneid"], $_POST["name"], $_POST["type"], $_POST["content"], $_POST["ttl"], $_POST["prio"]);
     7         if ($ret != '1') {
    12         if ($ret != '1') {
     8                 die("$ret");
    13                 die("$ret");