From a2cb30ef1db76451b4b8ca1893949d361191cbe2 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 12 Feb 2020 10:49:55 -0700 Subject: [PATCH] Users - Import: Misc consistency updates. --- core/users/user_imports.php | 52 +++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/core/users/user_imports.php b/core/users/user_imports.php index 239e28609d..34e94ebcd7 100644 --- a/core/users/user_imports.php +++ b/core/users/user_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) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-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"; @@ -55,10 +55,10 @@ } //get the http get values and set them as php variables - $action = check_str($_POST["action"]); - $from_row = check_str($_POST["from_row"]); - $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'])) { @@ -70,7 +70,7 @@ //copy the csv file //$_POST['submit'] == "Upload" && if (is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('user_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'].'*'); @@ -167,13 +167,13 @@ foreach ($line_fields as $line_field) { $line_field = trim(trim($line_field), $enclosure); echo "\n"; - echo "\n"; + echo " \n"; //echo " ".$text['label-zzz']."\n"; echo $line_field; - echo "\n"; - echo "\n"; - echo " \n"; + echo " \n"; foreach($schema as $row) { echo " \n"; foreach($row['fields'] as $field) { @@ -182,31 +182,27 @@ $selected = "selected='selected'"; } if ($field !== 'domain_uuid') { - echo " \n"; + echo " \n"; } } echo " \n"; } - echo " \n"; + echo " \n"; //echo "
\n"; //echo $text['description-zzz']."\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo "\n"; $x++; } - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo "\n"; + echo "

\n"; - echo " \n"; - - echo " \n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -429,7 +425,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";