X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_input.inc;h=2a51d80ffaa35e9d60cade6e3c8530105a806d4b;hb=3c4482206218de2faceeb2f6563c92f28e57db50;hp=0831e6103df0fd66369deac64cc2bbc30bfc66d1;hpb=de3a75773afa86df1739d14f24399d6f7a46f809;p=fa-stable.git diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 0831e610..2a51d80f 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -1,5 +1,25 @@ $postval ) { + if (strpos($postkey, $prefix) === 0) { + $id = substr($postkey, strlen($prefix)); + return $numeric ? (int)$id : $id; + } + } + return $numeric ? -1 : null; +} + +//------------------------------------------------------------------------------ +// +// Read numeric value from user formatted input +// function input_num($postname=null) { if (!isset($_POST[$postname])) return null;