diff --git a/app/devices/device_imports.php b/app/devices/device_imports.php index ca9b79beeb..b9b6454d62 100644 --- a/app/devices/device_imports.php +++ b/app/devices/device_imports.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2018 + Portions created by the Initial Developer are Copyright (C) 2018-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -25,7 +25,7 @@ */ //includes - include "root.php"; + require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; @@ -58,12 +58,10 @@ ini_set('max_execution_time',7200); //get the http get values and set them as php variables - $action = check_str($_POST["action"]); - $from_row = check_str($_POST["from_row"]); - $order_by = check_str($_POST["order_by"]); - $order = check_str($_POST["order"]); - $delimiter = check_str($_POST["data_delimiter"]); - $enclosure = check_str($_POST["data_enclosure"]); + $action = $_POST["action"]; + $from_row = $_POST["from_row"]; + $delimiter = $_POST["data_delimiter"]; + $enclosure = $_POST["data_enclosure"]; //save the data to the csv file if (isset($_POST['data'])) { @@ -75,7 +73,7 @@ //copy the csv file //$_POST['submit'] == "Upload" && if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('device_imports')) { - if (check_str($_POST['type']) == 'csv') { + if ($_POST['type'] == 'csv') { move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']); $save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']); //system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*'); @@ -157,7 +155,7 @@ echo "
\n"; echo "
\n"; - echo "
".$text['header-import']."
\n"; + echo "
".$text['header-device_import']."
\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px;','link'=>'device_imports.php']); echo button::create(['type'=>'submit','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import']]); @@ -180,8 +178,8 @@ echo $line_field; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; foreach($schema as $row) { echo " \n"; foreach($row['fields'] as $field) { @@ -204,6 +202,7 @@ } echo "\n"; + echo "

\n"; echo "\n"; echo "\n"; @@ -390,7 +389,7 @@ echo " ".$text['label-import_data']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-import_data']."\n"; echo "\n";