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

class Video_course_front_end extends TT_user_login {
    public function __construct() {
        parent::__construct();
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : NULL
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : 
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    public function video_course_front_end_left_side_menu() {
        $data = Array();
        $data['active_menu'] = $sdata['active_menu'] = 'teacher';
        $data['active_sub_menu'] = $sdata['active_sub_menu'] = 'teacher_video_course';
        $data['tab'] = '';
        $data['left_side_menu_view'] = 1;
        $data['left_side'] = 1;
        $this->session->set_userdata($sdata);
        return $data;
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : teacher/video-course
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    public function teacher_video_course_front_end_list() {
        $data = $this->video_course_front_end_left_side_menu();
        
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/view_video_course_front_end_list', $data, TRUE);
        $this->load->view('user/master', $data);
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : user-add-video-course
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    public function add_video_course_front_end() {
        $data = $this->video_course_front_end_left_side_menu();
        
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/view_add_video_course', $data, TRUE);
        $this->load->view('user/master', $data);
    }
    
    /**
     * @Author              : Kazol
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : video-course-invite-learners
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    public function invite_learners(){
        $data = $this->video_course_front_end_left_side_menu();
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/view_video_course_invite_learner', $data, TRUE);
        $this->load->view('user/master', $data);
    } 
    
    /**
     * @Author              : Kazol
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : view-video
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    public function view_video(){
        $data = $this->video_course_front_end_left_side_menu();
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/view_video', $data, TRUE);
        $this->load->view('user/master', $data);       
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : add-video
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    public function add_video(){
        $data = $this->video_course_front_end_left_side_menu();
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/view_add_video', $data, TRUE);
        $this->load->view('user/master', $data);       
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : view-video-course-section
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    function video_course_section_by_video_course_id() {
        if($this->input->is_ajax_request()){
            $video_course_id = $this->input->post('video_course_id', TRUE);
            $data['section_counter'] = 1;
            $data['video_counter'] = 1;
            echo $this->load->view('video_course/video_course_front_end/video_course_ajax_page/view_video_section', $data, true);
        }
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : add-more-video-section
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    function add_more_video_course_section_area() {
        if($this->input->is_ajax_request()){
            $data['section_counter'] = 1;
            $data['video_counter'] = 1;
            echo $this->load->view('video_course/video_course_front_end/video_course_ajax_page/view_video_section', $data, true);
        }
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : add-more-single-video
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    function add_more_video() {
        if($this->input->is_ajax_request()){
            $data['section_counter'] = 1;
            $data['video_counter'] = 1;
            echo $this->load->view('video_course/video_course_front_end/video_course_ajax_page/view_add_single_video', $data, true);
        }
    }
    
    /**
     * @Author              : Md. Delwar Hossain  
     * @CreatedDate         : 21-06-17  
     * @ModifiedDate        : NULL
     * @Route               : language-search-information
     * @deprecated          :
     * @exception           :
     * @inheritDoc          : NULL
     * @link                :
     * @linkplain           :
     * @Parameter           : None
     * @Return              : NULL  
     * @see                 :
     * @serial              :
     * @serialData          :
     * @serialField         :
     * @since               :
     * @throws              :
     * @value               :
     * @version             : v2.1       
     * */
    function add_video_course_language_search_information(){
        $data = Array();
        $search_array = array("bangla", "english", "hindi", "urdu");
        $search_value = preg_replace('/\s+/', ' ', trim($this->input->post('search_value', TRUE)));
        if ($search_value != '') {
            if (in_array($search_value, $search_array)) {
                $data['search_data'] = $search_value;
                echo $this->load->view('video_course/video_course_front_end/video_course_ajax_page/view_language_search', $data, TRUE);
            }else{
                echo 'Result Not Found';
            }
        } else {
            echo 'Please Type Language';
        }
    }
    
    public function learner_video_course_list(){
        $data = Array();
        $data['active_menu'] = $sdata['active_menu'] = 'learner';
        $data['active_sub_menu'] = $sdata['active_sub_menu'] = 'learner_video_course';
        $data['tab'] = '';
        $data['left_side_menu_view'] = 1;
        $data['left_side'] = 1;
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/view_learner_video_course_front_end_list', $data, TRUE);
        $this->load->view('user/master', $data);
    }
    
    public function learner_video_course_view_invoice(){
        $data = Array();
        $data['active_menu'] = $sdata['active_menu'] = 'learner';
        $data['active_sub_menu'] = $sdata['active_sub_menu'] = 'learner_video_course';
        $data['tab'] = '';
        $data['left_side_menu_view'] = 1;
        $data['left_side'] = 1;
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/student_payment/view_learner_video_course_invoice', $data, TRUE);
        $this->load->view('user/master', $data);
    }
    
    public function video_course_registered_student(){
        $data = $this->video_course_front_end_left_side_menu();
        $data['main_content'] = $this->load->view('video_course/video_course_front_end/view_video_course_registered_student', $data, TRUE);
        $this->load->view('user/master', $data);
    }
            
}

