There are currently no domain names configured.
");
}
diff --git a/htdocs/domains/edit-process.php b/htdocs/domains/edit-process.php
index 5e7fb9a..c8c014a 100755
--- a/htdocs/domains/edit-process.php
+++ b/htdocs/domains/edit-process.php
@@ -264,7 +264,7 @@
if ($obj_domain->id)
{
$_SESSION["error"]["form"]["domain_edit"] = "failed";
- header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id ."");
+ header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id);
}
else
{
@@ -403,7 +403,7 @@
if ($obj_domain->id)
{
$_SESSION["error"]["form"]["domain_edit"] = "failed";
- header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id ."");
+ header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id);
}
else
{
@@ -424,7 +424,7 @@
if (empty($networks))
{
// multiple domains
- header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id ."");
+ header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id);
exit(0);
}
else
diff --git a/htdocs/domains/import-process.php b/htdocs/domains/import-process.php
index 8eac28c..5fae6d8 100755
--- a/htdocs/domains/import-process.php
+++ b/htdocs/domains/import-process.php
@@ -120,7 +120,7 @@
// open the file and read data
if ($zonefile = file($_FILES["import_upload_file"]["tmp_name"]))
{
- log_write("debug", "process", "Processing file ". $_FILES["import_upload_file"]["name"] ."");
+ log_write("debug", "process", "Processing file ". $_FILES["import_upload_file"]["name"]);
foreach ($zonefile as $line)
{
@@ -160,7 +160,7 @@
// domain origin
if (preg_match("/^\\\$ORIGIN\s(\S*)/", $line, $matches))
{
- log_write("debug", "process", "Header: ORIGIN: ". $matches[1] ."");
+ log_write("debug", "process", "Header: ORIGIN: ". $matches[1]);
if (empty($data["domain_name"]))
{
@@ -184,7 +184,7 @@
// domain TTL
if (preg_match("/^\\\$TTL\s([0-9]*)/", $line, $matches))
{
- log_write("debug", "process", "Header: TTL: ". $matches[1] ."");
+ log_write("debug", "process", "Header: TTL: ". $matches[1]);
if (empty($data["domain_ttl"]))
@@ -1119,7 +1119,7 @@
*/
// return
- header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id ."");
+ header("Location: ../index.php?page=domains/view.php&id=". $obj_domain->id);
exit(0);
diff --git a/htdocs/domains/import.php b/htdocs/domains/import.php
index d0ea6cb..deace59 100755
--- a/htdocs/domains/import.php
+++ b/htdocs/domains/import.php
@@ -21,7 +21,7 @@ class page_output
var $obj_form;
- function page_output()
+ function __construct()
{
$this->mode = @security_script_input('/^[0-9]*$/', $_GET["mode"]);
diff --git a/htdocs/domains/records-ajax.php b/htdocs/domains/records-ajax.php
index d419401..faa8149 100755
--- a/htdocs/domains/records-ajax.php
+++ b/htdocs/domains/records-ajax.php
@@ -28,7 +28,7 @@ class page_output
var $is_standard;
- function page_output()
+ function __construct()
{
// include custom scripts and/or logic
$this->requires["javascript"][] = "include/javascript/domain_records.js";
@@ -728,7 +728,7 @@ function render_html()
Draw messages
*/
-if ($_SESSION["error"]["message"])
+if (isset($_SESSION["error"]["message"]))
{
print "| ";
log_notification_render();
diff --git a/htdocs/domains/records-process.php b/htdocs/domains/records-process.php
index c8ec958..c4b3a69 100755
--- a/htdocs/domains/records-process.php
+++ b/htdocs/domains/records-process.php
@@ -212,7 +212,7 @@
}
$_SESSION["error"]["form"]["domain_records"] = "failed";
- header("Location: ../index.php?page=domains/records.php&id=". $obj_domain->id ."");
+ header("Location: ../index.php?page=domains/records.php&id=". $obj_domain->id);
exit(0);
}
@@ -289,7 +289,7 @@
*/
if ($record["reverse_ptr"])
{
- log_write("debug", "process", "Updating reverse PTR record for ". $record["name"] ."--> ". $record["content"] ."");
+ log_write("debug", "process", "Updating reverse PTR record for ". $record["name"] ."--> ". $record["content"]);
$obj_ptr = New domain_records;
@@ -406,7 +406,7 @@
$obj_reverse->load_data();
$obj_reverse->action_update_serial();
- log_write("notification", "process", "Updating serials for reverse domain ". $obj_reverse->data["domain_name"] ."");
+ log_write("notification", "process", "Updating serials for reverse domain ". $obj_reverse->data["domain_name"]);
}
}
diff --git a/htdocs/domains/records.php b/htdocs/domains/records.php
index e44c948..6432cfe 100755
--- a/htdocs/domains/records.php
+++ b/htdocs/domains/records.php
@@ -25,7 +25,7 @@ class page_output
var $is_standard;
- function page_output()
+ function __construct()
{
// include custom scripts and/or logic
$this->requires["javascript"][] = "include/javascript/domain_records.js";
@@ -40,9 +40,9 @@ function page_output()
// define the navigiation menu
$this->obj_menu_nav = New menu_nav;
- $this->obj_menu_nav->add_item("Domain Details", "page=domains/view.php&id=". $this->obj_domain->id ."");
- $this->obj_menu_nav->add_item("Domain Records", "page=domains/records.php&id=". $this->obj_domain->id ."", TRUE);
- $this->obj_menu_nav->add_item("Delete Domain", "page=domains/delete.php&id=". $this->obj_domain->id ."");
+ $this->obj_menu_nav->add_item("Domain Details", "page=domains/view.php&id=". $this->obj_domain->id);
+ $this->obj_menu_nav->add_item("Domain Records", "page=domains/records.php&id=". $this->obj_domain->id, TRUE);
+ $this->obj_menu_nav->add_item("Delete Domain", "page=domains/delete.php&id=". $this->obj_domain->id);
}
diff --git a/htdocs/domains/view.php b/htdocs/domains/view.php
index b227122..426cebf 100755
--- a/htdocs/domains/view.php
+++ b/htdocs/domains/view.php
@@ -15,7 +15,7 @@ class page_output
var $obj_form;
- function page_output()
+ function __construct()
{
// initate object
@@ -28,9 +28,9 @@ function page_output()
// define the navigiation menu
$this->obj_menu_nav = New menu_nav;
- $this->obj_menu_nav->add_item("Domain Details", "page=domains/view.php&id=". $this->obj_domain->id ."", TRUE);
- $this->obj_menu_nav->add_item("Domain Records", "page=domains/records.php&id=". $this->obj_domain->id ."");
- $this->obj_menu_nav->add_item("Delete Domain", "page=domains/delete.php&id=". $this->obj_domain->id ."");
+ $this->obj_menu_nav->add_item("Domain Details", "page=domains/view.php&id=". $this->obj_domain->id, TRUE);
+ $this->obj_menu_nav->add_item("Domain Records", "page=domains/records.php&id=". $this->obj_domain->id);
+ $this->obj_menu_nav->add_item("Delete Domain", "page=domains/delete.php&id=". $this->obj_domain->id);
}
diff --git a/htdocs/include/amberphplib/inc_file_uploads.php b/htdocs/include/amberphplib/inc_file_uploads.php
index e74fe92..d54535f 100755
--- a/htdocs/include/amberphplib/inc_file_uploads.php
+++ b/htdocs/include/amberphplib/inc_file_uploads.php
@@ -69,7 +69,7 @@ class file_storage
Constructor function
*/
- function file_storage()
+ function __construct()
{
$this->config["data_storage_method"] = sql_get_singlevalue("SELECT value FROM config WHERE name='DATA_STORAGE_METHOD' LIMIT 1");
$this->config["data_storage_location"] = sql_get_singlevalue("SELECT value FROM config WHERE name='DATA_STORAGE_LOCATION' LIMIT 1");
@@ -173,7 +173,7 @@ function verify_upload_form($fieldname, $acceptable_formats = NULL)
switch ($_FILES[ $fieldname ]["error"])
{
case UPLOAD_ERR_INI_SIZE:
- log_write("error", "file_storage", "File upload was in excess of maximum PHP limit of ". ini_get('upload_max_filesize') ."");
+ log_write("error", "file_storage", "File upload was in excess of maximum PHP limit of ". ini_get('upload_max_filesize'));
break;
case UPLOAD_ERR_NO_FILE:
@@ -181,7 +181,7 @@ function verify_upload_form($fieldname, $acceptable_formats = NULL)
break;
default:
- log_write("error", "file_storage", "Unexpected upload error: ". $_FILES[ $fieldname ]["error"] ."");
+ log_write("error", "file_storage", "Unexpected upload error: ". $_FILES[ $fieldname ]["error"]);
break;
}
@@ -764,7 +764,7 @@ function filedata_render()
// tell the browser how big the file is (in bytes)
// most browers seem to ignore this, but it's vital in order to make IE 7 work.
- header("Content-Length: ". $this->data["file_size"] ."");
+ header("Content-Length: ". $this->data["file_size"]);
@@ -775,7 +775,7 @@ function filedata_render()
has some files on disk and some in the DB, we can handle it accordingly.
*/
- log_write("debug", "file_storage", "Fetching file ". $this->id ." from location ". $this->data["file_location"] ."");
+ log_write("debug", "file_storage", "Fetching file ". $this->id ." from location ". $this->data["file_location"]);
if ($this->data["file_location"] == "db")
{
@@ -790,7 +790,7 @@ function filedata_render()
if (!$sql_obj->num_rows())
{
- die("No data found for file". $this->id ."");
+ die("No data found for file". $this->id);
}
$sql_obj->fetch_array();
@@ -876,7 +876,7 @@ function filedata_var()
$return_string = NULL;
- log_write("debug", "file_storage", "Fetching file ". $this->id ." from location ". $this->data["file_location"] ."");
+ log_write("debug", "file_storage", "Fetching file ". $this->id ." from location ". $this->data["file_location"]);
if ($this->data["file_location"] == "db")
{
@@ -897,7 +897,7 @@ function filedata_var()
if (!$sql_obj->num_rows())
{
- die("No data found for file". $this->id ."");
+ die("No data found for file". $this->id);
}
@@ -974,7 +974,7 @@ function filedata_write($filename)
has some files on disk and some in the DB, we can handle it accordingly.
*/
- log_write("debug", "file_storage", "Fetching file ". $this->id ." from location ". $this->data["file_location"] ."");
+ log_write("debug", "file_storage", "Fetching file ". $this->id ." from location ". $this->data["file_location"]);
if ($this->data["file_location"] == "db")
{
@@ -997,7 +997,7 @@ function filedata_write($filename)
if (!$sql_obj->num_rows())
{
- die("No data found for file ". $this->id ."");
+ die("No data found for file ". $this->id);
}
$sql_obj->fetch_array();
diff --git a/htdocs/include/amberphplib/inc_forms.php b/htdocs/include/amberphplib/inc_forms.php
index 7d8f172..212eab7 100755
--- a/htdocs/include/amberphplib/inc_forms.php
+++ b/htdocs/include/amberphplib/inc_forms.php
@@ -604,6 +604,11 @@ function render_field ($fieldname)
log_debug("form", "Executing render_field($fieldname)");
$helpmessagestatus = "false";
+
+ if (!isset($this->structure[$fieldname]) || !isset($this->structure[$fieldname]["type"])) {
+ log_debug("form", "Error: Tried to render unknown field ". $fieldname);
+ return 1;
+ }
switch ($this->structure[$fieldname]["type"])
{
@@ -1224,7 +1229,7 @@ function render_field ($fieldname)
// create value array if the SQL has not been executed yet
- if (is_string($this->structure[$fieldname]["values"]))
+ if (isset($this->structure[$fieldname]["values"]) && is_string($this->structure[$fieldname]["values"]))
{
if(!empty($this->structure[$fieldname]["defaultvalue"]))
{
@@ -1280,7 +1285,7 @@ function render_field ($fieldname)
else
{
// get translation for all options
- $translations = language_translate($this->language, $this->structure[$fieldname]["values"]);
+ $translations = language_translate($this->language, $this->structure[$fieldname]["values"] ?? []);
}
// input box for filtering
@@ -1338,7 +1343,7 @@ function render_field ($fieldname)
//echo "";
// add all the options
- foreach ($this->structure[$fieldname]["values"] as $value)
+ foreach ($this->structure[$fieldname]["values"] ?? [] as $value)
{
print " |