/** Đăng xuất admin cp */
function admin_cp_logout()
{
    $back = hm_get('back', SITE_URL);
    setcookie('admin_login', $_SESSION['admin_login'], 1);
    unset($_SESSION['admin_login']);
    header('Location: ' . $back);
    hm_edit('Đang thoát tài khoản');
}
Пример #2
0
function admin_content_page()
{
    $key = hm_get('key');
    $id = hm_get('id');
    $action = hm_get('action');
    $setting_page = get_admin_setting_page();
    if (isset($setting_page[$key])) {
        $func = $setting_page[$key]['function'];
        $func_input = $setting_page[$key]['function_input'];
        if (!function_exists($func)) {
            echo _('Không tìm thấy hàm : ') . $func;
        } else {
            call_user_func($func, $func_input);
        }
    } else {
        require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'admincp_404.php';
    }
}
Пример #3
0
    $latest = array('id' => $insert_id, 'name' => $menu_name, 'key' => 'menu', 'parent' => '0');
    return json_encode(array('latest' => $latest));
}
/** Sửa menu */
function edit_menu($id)
{
    hook_action('edit_menu');
    global $hmdb;
    $menu_id = hm_get('id');
    $taxonomy = hm_post('taxonomy');
    if (is_array($taxonomy)) {
        $tableName = DB_PREFIX . 'object';
        foreach ($taxonomy as $tax_id) {
            /** insert menu item */
            $args = array('name' => 'name', 'id' => $tax_id);
            $tax_name = get_tax_val($args);
            $data_array = array('name' => MySQL::SQLValue($tax_name), 'key' => MySQL::SQLValue('menu_item'), 'parent' => MySQL::SQLValue($menu_id), 'order_number' => MySQL::SQLValue(0, MySQL::SQLVALUE_NUMBER));
            $insert_id_array[$tax_id] = $hmdb->InsertRow($tableName, $data_array);
        }
        /** tạo field cho các menu item vừa insert */
        foreach ($insert_id_array as $tax_id => $insert_id) {
            if (is_numeric($insert_id)) {
                $tableName = DB_PREFIX . 'field';
                $args = array('name' => 'name', 'id' => $tax_id);
                $tax_name = get_tax_val($args);
                $data_array = array('name' => MySQL::SQLValue('menu_name'), 'val' => MySQL::SQLValue($tax_name), 'object_id' => MySQL::SQLValue($insert_id), 'object_type' => MySQL::SQLValue('menu_item'));
                $hmdb->InsertRow($tableName, $data_array);
                $tableRequestName = DB_PREFIX . 'request_uri';
                $whereArray = array('object_id' => MySQL::SQLValue($tax_id), 'object_type' => MySQL::SQLValue('taxonomy'));
                $hmdb->SelectRows($tableRequestName, $whereArray);
                if ($hmdb->HasRecords()) {
                    $row = $hmdb->Row();
                    $request_id = $row->id;
                    $data_array = array('name' => MySQL::SQLValue('menu_request_uri'), 'val' => MySQL::SQLValue($request_id), 'object_id' => MySQL::SQLValue($insert_id), 'object_type' => MySQL::SQLValue('menu_item'));
                    $hmdb->InsertRow($tableName, $data_array);
                }
            }
					</label>
				</div>
				<?php 
}
?>
			</div>
			
			<div class="row admin_sidebar_box">
				<p class="admin_sidebar_box_title"><?php 
echo $args_tax['taxonomy_name'];
?>
</p>
				<ul class="taxnomy_list tree">
					<?php 
$field_array['key'] = $args['taxonomy_key'];
$field_array['object_id'] = hm_get('id');
taxonomy_checkbox_list($field_array);
unset($field_array);
?>
				</ul>
			</div>
			
			<div class="row admin_sidebar_box">
				<p class="admin_sidebar_box_title"><?php 
echo _('Ảnh đại diện');
?>
</p>
				<?php 
$field_array['name'] = 'content_thumbnail';
$field_array['label'] = 'Chọn ảnh đại diện';
$field_array['imageonly'] = TRUE;
Пример #5
0
<?php

/** 
 * Đây là tệp tin xử lý quản trị admin
 * Vị trí : /admin/admin.php 
 */
if (!defined('BASEPATH')) {
    exit('403');
}
$disallow_check = array('login.php', 'login_ajax.php');
if (!in_array(hm_get('run'), $disallow_check)) {
    $cookie_admin_login = $_COOKIE['admin_login'];
    $session_admin_login = $_SESSION['admin_login'];
    if ($cookie_admin_login == NULL or $session_admin_login == NULL) {
        $login_page = SITE_URL . FOLDER_PATH . HM_ADMINCP_DIR . '?run=login.php&back=' . urlencode(SITE_URL . $_SERVER['REQUEST_URI']);
        echo '<meta http-equiv="refresh" content="0;' . $login_page . '">';
        hm_exit(_('Đang chuyển hướng đến trang đăng nhập'));
    }
    if ($cookie_admin_login == $session_admin_login) {
        /** Làm mới cookie admin */
        setcookie('admin_login', $cookie_admin_login, time() + COOKIE_EXPIRES, '/');
        define('ADMIN_LOGIN', $session_admin_login);
    } else {
        $login_page = SITE_URL . FOLDER_PATH . HM_ADMINCP_DIR . '?run=login.php&back=' . SITE_URL . $_SERVER['REQUEST_URI'];
        echo '<meta http-equiv="refresh" content="0;' . $login_page . '">';
        hm_exit(_('Đang chuyển hướng đến trang đăng nhập'));
    }
}
Пример #6
0
/** bảng danh sách thành viên */
function user_show_data($user_group, $perpage)
{
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    hook_action('user_show_data');
    $request_paged = hm_get('paged', 1);
    $paged = $request_paged - 1;
    $offset = $paged * $perpage;
    $limit = "LIMIT {$perpage} OFFSET {$offset}";
    if (!$hmdb->Query("SELECT * FROM " . DB_PREFIX . "users WHERE `user_group` = '{$user_group}' ORDER BY id DESC {$limit}")) {
        $hmdb->Kill();
    }
    if ($hmdb->HasRecords()) {
        /* Trả về các user */
        while ($row = $hmdb->Row()) {
            $array_use[] = array('id' => $row->id, 'user_nicename' => $row->user_nicename, 'user_role' => user_role_id_to_nicename($row->user_role));
        }
        $array['user'] = $array_use;
        /* Tạo pagination */
        $hmdb->Query(" SELECT * FROM " . DB_PREFIX . "users WHERE `user_group` = '{$user_group}' ");
        $total_item = $hmdb->RowCount();
        $total_page = ceil($total_item / $perpage);
        $first = '1';
        if ($request_paged > 1) {
            $previous = $request_paged - 1;
        } else {
            $previous = $first;
        }
        if ($request_paged < $total_page) {
            $next = $request_paged + 1;
        } else {
            $next = $total_page;
        }
        $array['pagination'] = array('first' => $first, 'previous' => $previous, 'next' => $next, 'last' => $total_page, 'total' => $total_item, 'paged' => $request_paged);
    } else {
        $array['user'] = array();
        $array['pagination'] = array();
    }
    return hook_filter('user_show_data', json_encode($array, TRUE));
}
function content_show_data($key, $status, $perpage)
{
    global $hmcontent;
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    hook_action('content_show_data');
    $request_paged = hm_get('paged', 1);
    $paged = $request_paged - 1;
    $offset = $paged * $perpage;
    $limit = "LIMIT {$perpage} OFFSET {$offset}";
    if (!$hmdb->Query("SELECT * FROM " . DB_PREFIX . "content WHERE `key` = '{$key}' AND status = '{$status}' ORDER BY id DESC {$limit}")) {
        $hmdb->Kill();
    }
    if ($hmdb->HasRecords()) {
        /* Trả về các content */
        while ($row = $hmdb->Row()) {
            $array_con[] = array('id' => $row->id, 'name' => $row->name, 'slug' => $row->slug);
        }
        $array['content'] = $array_con;
        /* Tạo pagination */
        $hmdb->Query(" SELECT * FROM " . DB_PREFIX . "content WHERE `key` = '{$key}' AND status = '{$status}' ");
        $total_item = $hmdb->RowCount();
        $total_page = ceil($total_item / $perpage);
        $first = '1';
        if ($request_paged > 1) {
            $previous = $request_paged - 1;
        } else {
            $previous = $first;
        }
        if ($request_paged < $total_page) {
            $next = $request_paged + 1;
        } else {
            $next = $total_page;
        }
        $array['pagination'] = array('first' => $first, 'previous' => $previous, 'next' => $next, 'last' => $total_page, 'total' => $total_item, 'paged' => $request_paged);
        $all_content = $hmcontent->hmcontent;
        if (isset($all_content[$key]['chapter']) and $all_content[$key]['chapter'] == TRUE) {
            $array['chapter'] = TRUE;
        } else {
            $array['chapter'] = FALSE;
        }
    } else {
        $array['content'] = array();
        $array['pagination'] = array();
        $array['chapter'] = FALSE;
    }
    return hook_filter('content_show_data', json_encode($array, TRUE));
}
Пример #8
0
</button>
					</div>
					
				</div>
			
			</div>

		</div>
		
		
		<div class="col-md-6 admin_mainbar">

			<p class="page_action"><?php 
echo _('Thông tin cá nhân');
?>
</p>

			<div class="row admin_mainbar_box">
			
				<?php 
user_field(hm_get('id'));
?>
			
			</div>

		</div>
		
	</form>
	
</div>
Пример #9
0
 */
if (!defined('BASEPATH')) {
    exit('403');
}
/** gọi tệp tin admin base */
require_once dirname(__FILE__) . '/admin.php';
/** gọi model xử lý user */
require_once dirname(__FILE__) . '/user/user_model.php';
$key = hm_get('key');
$id = hm_get('id');
$action = hm_get('action');
switch ($action) {
    case 'data':
        /** Show list user */
        $user_group = hm_get('user_group', '1');
        $perpage = hm_get('perpage', '30');
        echo user_show_data($user_group, $perpage);
        break;
    case 'add':
        /** Thêm user mới */
        echo ajax_add_user();
        break;
    case 'edit':
        /** Sửa thông tin user */
        $args = array('id_update' => $id);
        echo ajax_add_user($args);
        break;
    case 'ban':
        /** Khóa user */
        echo ajax_ban_user();
        break;
Пример #10
0
				</ul>
				<div class="tab-content tabs-login col-lg-12 col-md-12 col-sm-12 cols-xs-12">
					<div id="login-access" class="tab-pane fade active in">
						<form method="post" accept-charset="utf-8" autocomplete="off" role="form" class="form-horizontal ajaxFormAdminCpNewpw" action="<?php 
echo SITE_URL . FOLDER_PATH . HM_ADMINCP_DIR;
?>
/?run=login_ajax.php&action=newpw">
							<div class="form-group">
								<label for="password" class="">Mật khẩu mới</label>
								<input type="password" class="form-control" name="password" id="password_value" tabindex="1" value="" />
							</div>
							<div class="form-group">
								<label for="password2" class="">Nhập lại mật khẩu mới</label>
								<input type="password" class="form-control" name="password2" id="password2_value" tabindex="1" value="" />
								<input type="hidden" name="key" value="<?php 
echo hm_get('key');
?>
">
							</div>
							<div class="form-group ">
								<button type="submit" name="reset-password" id="submit" tabindex="5" class="btn btn-lg" value="<?php 
echo time();
?>
">Tạo mật khẩu mới</button>
							</div>
						</form>
					</div>
				</div>
			</section>
		</article>
	</div>
Пример #11
0
/** Ajax hiển thị danh sách file */
function show_media_file()
{
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    /** danh sách folder */
    $media_group_id = media_group_id();
    $tableName = DB_PREFIX . "media_groups";
    $whereArray = array('parent' => MySQL::SQLValue($media_group_id));
    $hmdb->SelectRows($tableName, $whereArray);
    $rowCount_folder = $hmdb->RowCount();
    if ($rowCount_folder > 0) {
        while ($row = $hmdb->Row()) {
            $folder_name = $row->name;
            $folder_slug = $row->folder;
            $folder_id = $row->id;
            $thumbnail_src = SITE_URL . FOLDER_PATH . HM_CONTENT_DIR . '/images/folder-icon.png';
            echo '<li class="file_thumbnail col-md-2">';
            echo '	<div class="folder_item" folder_id="' . $folder_id . '" folder_name="' . $folder_name . '" folder_slug="' . $folder_slug . '">';
            echo '		<span class="folder_item_name">' . $folder_name . '</span>';
            echo '		<img data-toggle="tooltip" data-placement="bottom" title="' . $folder_name . '" src="' . $thumbnail_src . '" class="img-responsive" />';
            echo '	</div>';
            echo '</li>';
        }
    }
    /** danh sách file */
    $whereArray = NULL;
    $media_group_id = media_group_id();
    if (is_numeric($media_group_id)) {
        $whereArray['media_group_id'] = MySQL::SQLValue($media_group_id, MySQL::SQLVALUE_NUMBER);
    }
    if (hm_get('imageonly') == 'true') {
        $whereArray['file_is_image'] = MySQL::SQLValue('true');
    }
    $tableName = DB_PREFIX . "media";
    $hmdb->SelectRows($tableName, $whereArray);
    $rowCount_file = $hmdb->RowCount();
    if ($media_group_id != '/') {
        $file_folder_part = '/' . get_media_group_part($media_group_id) . '/';
    } else {
        $file_folder_part = '/';
    }
    if ($rowCount_file > 0) {
        while ($row = $hmdb->Row()) {
            $id = $row->id;
            $file_info = $row->file_info;
            $file_name = $row->file_name;
            $file_folder = $row->file_folder;
            $media_group_id = $row->media_group_id;
            $file_info = json_decode($file_info, TRUE);
            $file_src = SITE_URL . FOLDER_PATH . HM_CONTENT_DIR . '/uploads' . $file_folder_part . $file_info['file_dst_name'];
            echo '<li class="file_thumbnail col-md-2">';
            if ($file_info['file_is_image'] == TRUE) {
                $file_is_image = 1;
            } else {
                $file_is_image = 0;
            }
            if (isset($file_info['thumbnail'])) {
                $thumbnail_src = SITE_URL . FOLDER_PATH . HM_CONTENT_DIR . '/uploads' . $file_folder_part . $file_info['thumbnail'];
                echo '<div class="file_item" file_id="' . $id . '" file_is_image="' . $file_is_image . '" file_dst_name="' . $file_info['file_dst_name'] . '" file_src_name_ext="' . $file_info['file_src_name_ext'] . '" file_src_mime="' . $file_info['file_src_mime'] . '" file_src_size="' . $file_info['file_src_size'] . '" file_src="' . $file_src . '" >';
                echo '<input type="checkbox" class="hide file_deep_checkbox" value="' . $id . '">';
                echo '<img data-toggle="tooltip" data-placement="bottom" title="' . $file_info['file_src_name'] . '" src="' . $thumbnail_src . '" class="img-responsive" />';
                echo '</div>';
            } else {
                $file_src_name_ext = strtolower($file_info['file_src_name_ext']);
                $file_ext_icon = './' . HM_CONTENT_DIR . '/icon/fileext/' . $file_src_name_ext . '.png';
                if (file_exists($file_ext_icon)) {
                    $thumbnail_src = SITE_URL . FOLDER_PATH . HM_CONTENT_DIR . '/icon/fileext/' . $file_src_name_ext . '.png';
                } else {
                    $thumbnail_src = SITE_URL . FOLDER_PATH . HM_CONTENT_DIR . '/icon/fileext/blank.png';
                }
                echo '<div class="file_item" file_id="' . $id . '" file_is_image="' . $file_is_image . '" file_dst_name="' . $file_info['file_dst_name'] . '" file_src_name_ext="' . $file_info['file_src_name_ext'] . '" file_src_mime="' . $file_info['file_src_mime'] . '" file_src_size="' . $file_info['file_src_size'] . '" file_src="' . $file_src . '" >';
                echo '<input type="checkbox" class="hide file_deep_checkbox" value="' . $id . '">';
                echo '<img data-toggle="tooltip" data-placement="bottom" title="' . $file_info['file_src_name'] . '" src="' . $thumbnail_src . '" class="img-responsive" />';
                echo '</div>';
            }
            echo '</li>';
        }
    }
    if ($rowCount_file == 0 and $rowCount_folder == 0) {
        echo '<div class="alert alert-success" role="alert">' . _('Bạn chưa tải lên tệp tin nào') . '</div>';
    }
}
<!-- custom js page -->
<script src="<?php 
echo ADMIN_LAYOUT_PATH;
?>
/js/menu.js"></script>
<link rel="stylesheet" href="<?php 
echo ADMIN_LAYOUT_PATH;
?>
/css/menu.css">


<div class="row" >

	<?php 
if (hm_get('mes') == 'save_success') {
    ?>
		<div class="alert alert-success" role="alert"><?php 
    echo _('Đã lưu cài đặt vị trí trình đơn');
    ?>
</div>
	<?php 
}
?>

	<div class="col-md-12">
		<h1 class="page_title"><?php 
echo _('Quản lý vị trí trình đơn');
?>
</h1>
	</div>
		
Пример #13
0
<?php

get_template_part('header');
?>
        <div class="row">
            <div class="col-lg-12">
				<div class="row">
					<div class="col-md-9">
						<div class="main_content">
						<?php 
$args = array('field_query' => array(array('field' => 'status', 'compare' => '=', 'value' => 'public'), array('field' => 'public_time', 'compare' => '<=', 'value' => time()), array('field' => 'name', 'compare' => 'like%', 'value' => hm_get('s'))));
foreach (query_content($args) as $cid) {
    $name = get_con_val("name=name&id={$cid}");
    $link = request_uri("type=content&id={$cid}");
    $description = get_con_val("name=description&id={$cid}");
    $public_time = get_con_val("name=public_time&id={$cid}");
    $content_thumbnail = get_con_val("name=content_thumbnail&id={$cid}");
    $img = create_image("file={$content_thumbnail}&w=300&h=200");
    ?>
							<div class="row content_item">
								<div class="col-md-3">
									<a href="<?php 
    echo $link;
    ?>
" title="<?php 
    echo $name;
    ?>
">
										<img src="<?php 
    echo $img;
    ?>
?>
</p>
			
			<div class="row admin_mainbar_box">

				<div class="list-form-input">
					<?php 
$fields = $args['taxonomy_field'];
$fields_val = $args_tax['field'];
foreach ($fields as $field) {
    if (isset($fields_val[$field['name']])) {
        $field['default_value'] = $fields_val[$field['name']];
    } else {
        $field['default_value'] = NULL;
    }
    $field['object_id'] = hm_get('id');
    $field['object_type'] = 'taxonomy';
    build_input_form($field);
}
?>
				</div>
			
			</div>
			<?php 
taxonomy_box(array('taxonomy_key' => $args['taxonomy_key'], 'position' => 'left'));
?>
		</div>
		
		<div class="col-md-3 admin_sidebar">
		
			<div class="row admin_sidebar_box">
Пример #15
0
function seo_box_sitemap()
{
    /* include */
    $args = array('nice_name' => 'Có trong sitemap', 'name' => 'include_to_sitemap', 'input_type' => 'select', 'input_option' => array(array('value' => 'yes', 'label' => 'Có'), array('value' => 'no', 'label' => 'Không')));
    if (hm_get('run') == 'taxonomy.php') {
        $args['default_value'] = get_tax_val(array('name' => 'include_to_sitemap', 'id' => hm_get('id')));
    } elseif (hm_get('run') == 'content.php') {
        $args['default_value'] = get_con_val(array('name' => 'include_to_sitemap', 'id' => hm_get('id')));
    }
    build_input_form($args);
    /* Change Frequency */
    $args = array('nice_name' => 'Change Frequency', 'name' => 'sitemap_change_frequency', 'input_type' => 'select', 'input_option' => array(array('value' => 'auto', 'label' => 'Mặc định'), array('value' => 'always', 'label' => 'always'), array('value' => 'hourly', 'label' => 'hourly'), array('value' => 'daily', 'label' => 'daily'), array('value' => 'weekly', 'label' => 'weekly'), array('value' => 'monthly', 'label' => 'monthly'), array('value' => 'yearly', 'label' => 'yearly'), array('value' => 'never', 'label' => 'never')));
    if (hm_get('run') == 'taxonomy.php') {
        $args['default_value'] = get_tax_val(array('name' => 'sitemap_change_frequency', 'id' => hm_get('id')));
    } elseif (hm_get('run') == 'content.php') {
        $args['default_value'] = get_con_val(array('name' => 'sitemap_change_frequency', 'id' => hm_get('id')));
    }
    build_input_form($args);
    /* Priority */
    $args = array('nice_name' => 'Priority', 'name' => 'sitemap_priority', 'input_type' => 'select', 'input_option' => array(array('value' => 'auto', 'label' => 'Mặc định'), array('value' => '0.0', 'label' => '0.0'), array('value' => '0.1', 'label' => '0.1'), array('value' => '0.2', 'label' => '0.2'), array('value' => '0.3', 'label' => '0.3'), array('value' => '0.4', 'label' => '0.4'), array('value' => '0.5', 'label' => '0.5'), array('value' => '0.6', 'label' => '0.6'), array('value' => '0.7', 'label' => '0.7'), array('value' => '0.8', 'label' => '0.8'), array('value' => '0.9', 'label' => '0.9'), array('value' => '1.0', 'label' => '1.0')));
    if (hm_get('run') == 'taxonomy.php') {
        $args['default_value'] = get_tax_val(array('name' => 'sitemap_priority', 'id' => hm_get('id')));
    } elseif (hm_get('run') == 'content.php') {
        $args['default_value'] = get_con_val(array('name' => 'sitemap_priority', 'id' => hm_get('id')));
    }
    build_input_form($args);
}
Пример #16
0
<!-- custom js page -->
<script src="<?php 
echo ADMIN_LAYOUT_PATH;
?>
/js/menu.js"></script>
<link rel="stylesheet" href="<?php 
echo ADMIN_LAYOUT_PATH;
?>
/css/menu.css">
<div class="row" >
	<?php 
if (hm_get('mes') == 'add_success') {
    ?>
		<div class="alert alert-success" role="alert"><?php 
    echo _('Đã tạo trình đơn, bây giờ bạn có thể chỉnh sửa nó');
    ?>
</div>
	<?php 
}
?>

	<div class="col-md-12">
		<h1 class="page_title"><?php 
echo _('Tạo hoặc sửa trình đơn');
?>
</h1>
	</div>
	<div class="col-md-12">
	
		<div class="row admin_fullbar_box">
		
							<input type="hidden" id="multi" value="<?php 
    echo hm_get('multi');
    ?>
" />
							<input type="hidden" id="imageonly" value="<?php 
    echo hm_get('imageonly');
    ?>
" />
							<button type="button" class="btn btn-default use_media_file_insert" use_media_file="<?php 
    echo hm_get('use_media_file');
    ?>
" multi="<?php 
    echo hm_get('multi');
    ?>
" imageonly="<?php 
    echo hm_get('imageonly');
    ?>
">
								<span class="glyphicon glyphicon-pencil"></span><?php 
    echo _('Sử dụng');
    ?>
							</button>
							<?php 
}
?>
							<button type="button" class="btn btn-default hide_media_file_info">
								<span class="glyphicon glyphicon-remove"></span> <?php 
echo _('Ẩn');
?>
							</button>
						</div>
Пример #18
0
<?php

/** 
 * Tệp tin xử lý menu trong admin
 * Vị trí : admin/menu.php 
 */
if (!defined('BASEPATH')) {
    exit('403');
}
/** gọi tệp tin admin base */
require_once dirname(__FILE__) . '/admin.php';
/** gọi model xử lý menu */
require_once dirname(__FILE__) . '/menu/menu_model.php';
$key = hm_get('key');
$id = hm_get('id');
$action = hm_get('action');
switch ($action) {
    case 'add':
        echo add_menu();
        break;
    case 'edit':
        echo edit_menu($id);
        break;
    case 'delete':
        $menu_id = hm_post('id');
        echo delete_menu($menu_id);
        break;
    case 'delete_item':
        $item_id = hm_post('id');
        echo delete_menu_item($item_id);
        break;
function quick_edit_tax_form()
{
    hook_action('quick_edit_tax_form');
    if ($_SERVER['HTTP_HOST'] == parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)) {
        $args = taxonomy_data(hm_get('key'));
        $args['object_id'] = hm_get('id');
        $args['object_type'] = 'taxonomy';
        require_once BASEPATH . HM_ADMINCP_DIR . '/' . TEMPLATE_DIR . '/' . 'quick_edit_tax_form.php';
    }
}
Пример #20
0
    echo _('Đã tạo trình đơn, bây giờ bạn có thể chỉnh sửa nó');
    ?>
</div>
	<?php 
}
?>
	<div class="col-md-12">
		<h1 class="page_title"><?php 
echo _('Chỉnh sửa trình đơn');
?>
</h1>
	</div>
	
	<div class="col-md-12">
	
		<div class="row admin_fullbar_box">
		
			<div class="col-md-3 menu_select_choise">
				<?php 
menu_select_choise(hm_get('id'));
?>
			</div>
			<div class="col-md-3">
				<div class="form_new_menu"> 
					<input class="new_menu col-md-9" name="name" placeholder="Tạo một trình đơn mới">
					<button name="submit" type="button" class="btn btn-default col-md-3 submit_new_menu">Tạo</button>
				</div>
			</div>
			<div class="col-md-3">
				<div class="form_new_menu"> 
					<input class="form-control" name="name" value="[shortcode=menu&menu_id=<?php 
Пример #21
0
 * Vị trí : admin/index.php 
 */
define('IN_ADMIN', TRUE);
if (!defined('BASEPATH')) {
    define('BASEPATH', dirname(__DIR__) . '/');
    require_once BASEPATH . 'hm_config.php';
    require_once BASEPATH . 'hm_loader.php';
    require_once BASEPATH . 'hm_setup.php';
}
/** gọi tệp tin admin base */
require_once dirname(__FILE__) . '/admin.php';
/**
 * Cấu hình tệp tin fontend
 */
define('LAYOUT_DIR', 'layout');
define('TEMPLATE_DIR', 'template');
define('ADMIN_LAYOUT_PATH', SITE_URL . FOLDER_PATH . '/' . HM_ADMINCP_DIR . '/' . LAYOUT_DIR);
$dir = BASEPATH . HM_ADMINCP_DIR . '/' . hm_get('run', 'dashboard.php');
if (file_exists($dir) && !is_dir($dir)) {
    require_once BASEPATH . HM_ADMINCP_DIR . '/' . 'function.php';
    require_once BASEPATH . HM_ADMINCP_DIR . '/' . hm_get('run', 'dashboard.php');
} else {
    require_once BASEPATH . HM_ADMINCP_DIR . '/' . 'function.php';
    /** Không tồn tại file như request, hiển thị giao diện 404 */
    function admin_content_page()
    {
        require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'admincp_404.php';
    }
    /** fontend */
    require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'layout.php';
}