diff --git a/system/base.php b/system/base.php index 10f7179..332994f 100644 --- a/system/base.php +++ b/system/base.php @@ -1,5 +1,29 @@ 0) { + extract($data); + } + + $viewfile = './view/' . $name . '.php'; + if(file_exists($viewfile)) { + include($viewfile); + } + } +} + +// load helper +if(!function_exists('loadHelper')) { + function loadHelper($name) { + $helperfile = './helper/' . $name . '.php'; + if(file_exists($helperfile)) { + include($helperfile); + } + } +} + +if(!function_exists('array_key_empty')) { function array_key_empty($key, $array) { $empty = true;