Ejemplo n.º 1
0
            {
                global $args;
                require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'chapter_view.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';
            }
        }
        break;
    case 'restore':
        break;
    default:
        if (isset_content_id($id)) {
            $args = content_data_by_id($id);
            /** Hiển thị các bản thay đổi của content có id như request */
            function admin_content_page()
            {
                global $args;
                require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'chapter_all.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';
            }
        }
}
Ejemplo n.º 2
0
         {
             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';
         }
     }
     break;
 case 'view':
     if (isset_content_id($id) == TRUE) {
         /** Thực hiện sửa content */
         $args = content_data_by_id($id);
         /** Hiển thị giao diện sửa content bằng array ở trên */
         function admin_content_page()
         {
             global $args;
             require_once BASEPATH . HM_ADMINCP_DIR . '/' . LAYOUT_DIR . '/' . 'content_view.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';
         }
     }
function content_ajax_add_chapter($id)
{
    global $hmcontent;
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    hook_action('content_ajax_add_chapter');
    if (isset_content_id($id) == TRUE) {
        $args_con = content_data_by_id($id);
        $key = $args_con['content']->key;
        $args = array('content_key' => $key, 'parent' => $id, 'status' => 'chapter');
        return content_ajax_add($args);
    }
}
Ejemplo n.º 4
0
 /** Update các field của 1 content */
 public function content_update_val($args = array())
 {
     $id = $args['id'];
     $values = $args['value'];
     if (isset_content_id($id)) {
         $tableName = DB_PREFIX . 'content';
         $whereArray = array('id' => $id);
         return $this->UpdateRows($tableName, $values, $whereArray);
     }
 }