diff --git a/helpers.inc.php b/helpers.inc.php index ff041e9..92af91e 100644 --- a/helpers.inc.php +++ b/helpers.inc.php @@ -1132,3 +1132,15 @@ if(!function_exists('str_ends_with')) return $needle === "" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false); } } + +function are_you_sure() +{ + echo "Are you sure you want to proceed?(type YES): "; + $resp = trim(fread(STDIN, 10)); + //var_dump($resp); + if($resp != "YES") + { + echo "exiting then\n"; + exit(); + } +}