<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
  Modules Model made for CRM Connect. @by Coman Paul
 */
class Module_model extends App_Model
{

    public function __construct()
    {
        parent::__construct();
    }

    public function is_active($slug){
        $this->db->select('*');
        $this->db->where('module_name',$slug);
        $data = $this->db->get(db_prefix() . 'modules')->row_array();
        if(empty($data)){
          return false;
        }
        if($data['active'] == "1" OR $data['active'] == 1){
          return true;
        }
        else{
          return false;
        }
    }
}
