diff --git a/app/devices/app_config.php b/app/devices/app_config.php
index b0c1783817..9d9d0003aa 100644
--- a/app/devices/app_config.php
+++ b/app/devices/app_config.php
@@ -361,6 +361,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Select the type.';
$z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = 'device_key_line';
+ $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the value.';
+ $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'device_key_value';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the value.';
diff --git a/app/devices/app_languages.php b/app/devices/app_languages.php
index 6459ed3130..3cf2186520 100644
--- a/app/devices/app_languages.php
+++ b/app/devices/app_languages.php
@@ -241,6 +241,12 @@
$text['description-device_key_type']['en-us'] = 'Select the type of key.';
$text['description-device_key_type']['pt-pt'] = '';
+ $text['label-device_key_line']['en-us'] = 'Line';
+ $text['label-device_key_line']['pt-pt'] = '';
+
+ $text['description-device_key_line']['en-us'] = 'Select the line number.';
+ $text['description-device_key_line']['pt-pt'] = '';
+
$text['label-device_key_value']['en-us'] = 'Value';
$text['label-device_key_value']['pt-pt'] = '';
diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php
index aa5736d791..a3947a9941 100644
--- a/app/devices/device_edit.php
+++ b/app/devices/device_edit.php
@@ -75,8 +75,10 @@ require_once "resources/require.php";
$auth_id = check_str($_POST["auth_id"]);
$password = check_str($_POST["password"]);
//keys
+ $device_key_category = check_str($_POST["device_key_category"]);
$device_key_id = check_str($_POST["device_key_id"]);
$device_key_type = check_str($_POST["device_key_type"]);
+ $device_key_line = check_str($_POST["device_key_line"]);
$device_key_value = check_str($_POST["device_key_value"]);
$device_key_label = check_str($_POST["device_key_label"]);
//settings
@@ -260,6 +262,7 @@ require_once "resources/require.php";
$sql .= "device_key_id, ";
$sql .= "device_key_category, ";
$sql .= "device_key_type, ";
+ $sql .= "device_key_line, ";
$sql .= "device_key_value, ";
$sql .= "device_key_label ";
$sql .= ")";
@@ -271,6 +274,7 @@ require_once "resources/require.php";
$sql .= "'$device_key_id', ";
$sql .= "'$device_key_category', ";
$sql .= "'$device_key_type', ";
+ $sql .= "'$device_key_line', ";
$sql .= "'$device_key_value', ";
$sql .= "'$device_key_label' ";
$sql .= ")";
@@ -559,6 +563,7 @@ require_once "resources/require.php";
echo "
".$text['label-device_key_category']." | \n";
echo " ".$text['label-device_key_id']." | \n";
echo " ".$text['label-device_key_type']." | \n";
+ echo " ".$text['label-device_key_line']." | \n";
echo " ".$text['label-device_key_value']." | \n";
echo " ".$text['label-device_key_label']." | \n";
echo " | \n";
@@ -589,6 +594,9 @@ require_once "resources/require.php";
echo " ".$row['device_key_type']." \n";
echo " \n";
echo " \n";
+ echo " ".$row['device_key_line']." \n";
+ echo " | \n";
+ echo " \n";
echo " ".$row['device_key_value']." \n";
echo " | \n";
echo " \n";
@@ -728,6 +736,24 @@ require_once "resources/require.php";
\n";
+ echo " | \n";
+ echo " \n";
+ echo " | \n";
+
echo "\n";
echo " \n";
echo " | \n";
diff --git a/app/devices/device_key_edit.php b/app/devices/device_key_edit.php
index 304a6bf77c..f54a235755 100644
--- a/app/devices/device_key_edit.php
+++ b/app/devices/device_key_edit.php
@@ -59,6 +59,7 @@ else {
$device_key_id = check_str($_POST["device_key_id"]);
$device_key_category = check_str($_POST["device_key_category"]);
$device_key_type = check_str($_POST["device_key_type"]);
+ $device_key_line = check_str($_POST["device_key_line"]);
$device_key_value = check_str($_POST["device_key_value"]);
$device_key_label = check_str($_POST["device_key_label"]);
}
@@ -74,6 +75,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//if (strlen($device_key_id) == 0) { $msg .= $text['message-required']." ".$text['label-device_key_id']."
\n"; }
//if (strlen($device_key_category) == 0) { $msg .= $text['message-required']." ".$text['label-device_key_category']."
\n"; }
//if (strlen($device_key_type) == 0) { $msg .= $text['message-required']." ".$text['label-device_key_type']."
\n"; }
+ //if (strlen($device_key_line) == 0) { $msg .= $text['message-required']." ".$text['label-device_key_line']."
\n"; }
//if (strlen($device_key_value) == 0) { $msg .= $text['message-required']." ".$text['label-device_key_value']."
\n"; }
//if (strlen($device_key_label) == 0) { $msg .= $text['message-required']." ".$text['label-device_key_label']."
\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
@@ -100,6 +102,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "device_key_id, ";
$sql .= "device_key_category, ";
$sql .= "device_key_type, ";
+ $sql .= "device_key_line, ";
$sql .= "device_key_value, ";
$sql .= "device_key_label ";
$sql .= ")";
@@ -111,7 +114,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'$device_key_id', ";
$sql .= "'$device_key_category', ";
$sql .= "'$device_key_type', ";
- $sql .= "'$device_key_value', ";
+ $sql .= "'$device_key_line', ";
$sql .= "'$device_key_label' ";
$sql .= ")";
$db->exec(check_sql($sql));
@@ -131,6 +134,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "device_key_id = '$device_key_id', ";
$sql .= "device_key_category = '$device_key_category', ";
$sql .= "device_key_type = '$device_key_type', ";
+ $sql .= "device_key_line = '$device_key_line', ";
$sql .= "device_key_value = '$device_key_value', ";
$sql .= "device_key_label = '$device_key_label' ";
$sql .= "where domain_uuid = '$domain_uuid' ";
@@ -162,6 +166,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$device_key_id = $row["device_key_id"];
$device_key_category = $row["device_key_category"];
$device_key_type = $row["device_key_type"];
+ $device_key_line = $row["device_key_line"];
$device_key_value = $row["device_key_value"];
$device_key_label = $row["device_key_label"];
}
@@ -344,6 +349,97 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
echo "\n";
+ echo "\n";
+ echo "| \n";
+ echo " ".$text['label-device_key_line'].": \n";
+ echo " | \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-device_key_line']."\n";
+ echo " | \n";
+ echo "
\n";
+
echo "\n";
echo "| \n";
echo " ".$text['label-device_key_type'].":\n";
|