From 80cd216eac90642e54f6980eae30ff6dd5005001 Mon Sep 17 00:00:00 2001 From: nacho Date: Sun, 30 Dec 2018 17:10:28 -0700 Subject: add directory type --- ncp-web/elements.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ncp-web') diff --git a/ncp-web/elements.php b/ncp-web/elements.php index 2a6c5734..ea2b4b65 100644 --- a/ncp-web/elements.php +++ b/ncp-web/elements.php @@ -23,7 +23,7 @@ HTML; $ret .= ""; // default to text input - if (!array_key_exists('type', $param)) + if (!array_key_exists('type', $param) || $param['type'] == 'directory' || $param['type'] == 'file') { $suggest = ''; if (array_key_exists('suggest', $param)) @@ -43,8 +43,14 @@ HTML; size=\"40\">"; if (array_key_exists('default', $param)) - { $ret .= ""; + + if ($param['type'] == 'directory') + { + if (file_exists($param['value'])) + $ret .= " directory exists"; + else + $ret .= " directory doesn't exist"; } $ret .= ""; @@ -84,7 +90,7 @@ HTML;
- +
-- cgit v1.2.3