<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Editor extends CI_Controller {

    //put your code here
    public function __construct() {
        parent::__construct();
        $user_id = $this->session->userdata('user_id');
        if ($user_id == NULL) {
            redirect('sign-in', 'refresh');
        }
        $data['left_side_menu_view'] = 1;
        $data['left_side']=1;
//        $this->load->model('quiz_model', 'q_model');
        $this->load->model('f_end_model', 'f_model');
        $sdata['f_group'] = count($this->f_model->select_all_group());
        $sdata['f_quiz'] = count($this->f_model->select_all_quiz());
        $sdata['f_question'] = count($this->f_model->select_all_question());
        $sdata['f_group_mem'] = count($this->f_model->select_all_member_group());
        $this->session->set_userdata($sdata);
    }

    public function html_editor() {
        $data['user_role'] = '';
        $data['active'] = '' . '_User';
        $data['main_content'] = $this->load->view('f_end/html_editor', $data, true);
        $this->load->view('f_end/f_end_master', $data);
    }

    public function logout() {
        $this->session->sess_destroy();
        redirect('user_author', 'refresh');
    }

   
    
    
    
 
    
    
    
}
