<commit_before><?php
class Products extends CI_Controller {


		public function __construct()
        {
				parent::__construct();
				$this->load->model('header_model');
				$this->load->model('products_model');
                $this->load->helper('url_helper');
				
        }
		
		
        public function index()
        {
			
				if ( ! file_exists(APPPATH.'views/pages/projects.php'))
				{
					// Whoops, we don't have a page for that!
					show_404();
				}
				$data['header_logo'] = $this->header_model->get_logo("header");
				$data['social_media'] = $this->header_model->get_social();
				$data['private_gallery'] = $this->header_model->get_heading("all","header");
				
				// Capitalize the first letter
				$data['title'] = ucfirst("products"); 
				
				// get Projects
				$data['products'] = $this->products_model->get_ProductById();
				
				$this->load->helper('url');
				
                $this->load->view('templates/header', $data);
				$this->load->view('pages/products', $data);
				$this->load->view('templates/footer', $data);
        }
		
		
		public function view($id = NULL){
			
				$data['header_logo'] = $this->header_model->get_logo("header");
				$data['social_media'] = $this->header_model->get_social();
				$data['private_gallery'] = $this->header_model->get_heading("all","header");
				
				// Capitalize the first letter
				$data['title'] = ucfirst("products"); 
				
				$this->load->helper('url');
				
				$data['product'] = $this->products_model->get_ProductById($id);
				
				
				$this->load->view('templates/header', $data);
				$this->load->view('pages/product', $data);
				$this->load->view('templates/footer', $data);
				
		}
}<commit_msg>add filter functionalty to website<commit_after><?php
class Products extends CI_Controller {


		public function __construct()
        {
				parent::__construct();
				$this->load->model('header_model');
				$this->load->model('products_model');
				$this->load->model('product_model');
                $this->load->helper('url_helper');
				
        }
		
		
        public function index()
        {
			
				if ( ! file_exists(APPPATH.'views/pages/projects.php'))
				{
					// Whoops, we don't have a page for that!
					show_404();
				}
				$data['header_logo'] = $this->header_model->get_logo("header");
				$data['social_media'] = $this->header_model->get_social();
				$data['private_gallery'] = $this->header_model->get_heading("all","header");
				
				
				
				// Capitalize the first letter
				$data['title'] = ucfirst("products"); 
				
				// get Projects
				$data['products'] = $this->products_model->get_ProductById();
				$data['country_cat'] = $this->product_model->get_categories("products","country");
				$data['type_cat'] = $this->product_model->get_categories("products","type");
				$data['color_cat'] = $this->product_model->get_categories("products","color");
				$data['size_cat'] = $this->product_model->get_categories("products","size");
				$data['product_by_condition'] = $this->product_model->get_products(null,null,null,null);
				
				
				$this->load->helper('url');
				
                $this->load->view('templates/header', $data);
				$this->load->view('pages/products', $data);
				$this->load->view('templates/footer', $data);
        }
		
		
		public function view($id = NULL){
			
				$data['header_logo'] = $this->header_model->get_logo("header");
				$data['social_media'] = $this->header_model->get_social();
				$data['private_gallery'] = $this->header_model->get_heading("all","header");
				
				// Capitalize the first letter
				$data['title'] = ucfirst("products"); 
				
				$this->load->helper('url');
				
				$data['product'] = $this->products_model->get_ProductById($id);
				
				
				$this->load->view('templates/header', $data);
				$this->load->view('pages/product', $data);
				$this->load->view('templates/footer', $data);
				
		}
}
{'fraction_non_alphanumeric': 0.1960431654676259, 'fraction_numerical': 0.001541623843782117, 'mean_word_length': 3.213203463203463, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4874583', 'n_tokens_mistral': 1533, 'n_tokens_neox': 1183, 'n_words': 163}