Update base.php

This commit is contained in:
Namhyeon Go 2018-02-13 16:11:13 +09:00 committed by GitHub
parent 0d7c023565
commit 2fa5e429ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,12 @@ if(!function_exists('renderView')) {
extract($data);
}
// set user profile
if(function_exists("get_user_profile")) {
$user_profile = get_user_profile();
}
// load view file
$viewfile = './view/' . $name . '.php';
if(file_exists($viewfile)) {
include($viewfile);
@ -16,6 +22,13 @@ if(!function_exists('renderView')) {
// load helper
if(!function_exists('loadHelper')) {
function loadHelper($name) {
// set user profile
if(function_exists("get_user_profile")) {
$user_profile = get_user_profile();
}
// load helper file
$helperfile = './helper/' . $name . '.php';
if(file_exists($helperfile)) {
include($helperfile);