<commit_before><?php
if(!Defined('BASEPATH')) exit('No direct script access allowed');


class Admin extends CI_Controller{

    public function index(){
        $this->load->view('Admin/dashboard');
    }

    public function addPost(){
        $this->load->view('Admin/addPost');
    }

    public function add()
    {

        if ($this->input->post('submit') == 'cancel') {
            $this->load->view('Admin/addPost');

        } else {
            $this->form_validation->set_rules('title', 'Title', 'required|is_unique[ring.title]');<commit_msg>23rd commit<commit_after><?php
if(!Defined('BASEPATH')) exit('No direct script access allowed');


class Admin extends CI_Controller{

    public function index(){
        $this->load->view('Admin/dashboard');
    }

    public function addPost(){
        $this->load->view('Admin/addPost');
    }

    public function add()
    {

        if ($this->input->post('submit') == 'cancel') {
            $this->load->view('Admin/addPost');

        } else {
            switch ($this->input->post('category')){
                case 'Ring':
                    $this->form_validation->set_rules('title', 'Title', 'required|is_unique[ring.title]');
                    break;
                case 'Necklace':
                    $this->form_validation->set_rules('title', 'Title', 'required|is_unique[necklace.title]');
                    break;
                case 'Earring':
                    $this->form_validation->set_rules('title', 'Title', 'required|is_unique[earring.title]');
                    break;
                default:
                    $this->form_validation->set_rules('title', 'Title', 'required');

            }
{'fraction_non_alphanumeric': 0.1670616113744076, 'fraction_numerical': 0.001184834123222749, 'mean_word_length': 2.217142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '907398', 'n_tokens_mistral': 481, 'n_tokens_neox': 455, 'n_words': 81}