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

class Toko extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		//Do your magic here
	}

	public function index()
	{
		$this->load->view('toko/index',array('row' => $this->db->order_by('title','asc')->get('depkeu_product')));
	}

	function beli()
	{
		
	}
}<commit_msg>first<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Toko extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		//Do your magic here
	}

	public function index()
	{
		$this->load->view('toko/index',array('row' => $this->db->order_by('title','asc')->get('depkeu_product')));
	}

	function beli()
	{
		if ($this->input->post('id',TRUE)) {
			$row = $this->db->where('depkeu_product', array('id' => $this->input->post('id',TRUE)));

			$data = array('id' => $row->id ,
				'name' => $row->title ,
				'qty' => $row->1 ,
				'price' => $row->price ,
				'options' => array('image'=>$row->image) ,
			 );
			
			$this->cart->insert($data);
			echo $this->cart->total_items();
		} else {
			redirect(base_url());
		}
	}
}
{'fraction_non_alphanumeric': 0.22071307300509338, 'fraction_numerical': 0.0008488964346349745, 'mean_word_length': 4.148471615720524, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '7226426', 'n_tokens_mistral': 462, 'n_tokens_neox': 414, 'n_words': 76}