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';
    }
}
Пример #2
0
         function admin_content_page()
         {
             global $args;
             global $args_tax;
             global $args_con;
             require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'content_add_chapter.php';
         }
     }
     break;
 case 'edit':
     if (isset_content_id($id) == TRUE) {
         /** Thực hiện sửa content */
         $args_con = content_data_by_id($id);
         $key = $args_con['content']->key;
         $args = content_data($key);
         $args_tax = taxonomy_data($args['taxonomy_key']);
         /** Hiển thị giao diện sửa content bằng array ở trên */
         function admin_content_page()
         {
             global $args;
             global $args_tax;
             global $args_con;
             require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'content_edit.php';
         }
     } else {
         /** Không tồn tại content có id như request, hiển thị giao diện 404 */
         function admin_content_page()
         {
             require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'admincp_404.php';
         }
     }
Пример #3
0
$action = hm_get('action');
switch ($action) {
    case 'add':
        /** Thực hiện thêm taxonomy trả về array */
        $args = taxonomy_data($key);
        /** Hiển thị giao diện thêm taxonomy bằng array ở trên */
        function admin_content_page()
        {
            global $args;
            require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'taxonomy_add.php';
        }
        break;
    case 'edit':
        $args_tax = taxonomy_data_by_id($id);
        $key = $args_tax['taxonomy']->key;
        $args = taxonomy_data($key);
        function admin_content_page()
        {
            global $args;
            global $args_tax;
            require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'taxonomy_edit.php';
        }
        break;
    default:
        $args = taxonomy_show_all($key);
        /** Hiển thị giao diện thêm tất cả taxonomy */
        function admin_content_page()
        {
            global $args;
            require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'taxonomy_all.php';
        }