<commit_before><?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Proposal
 *
 * @author frielj
 */
class Proposal extends CI_Controller{
    public $data = [];
    const userid = 'FRIELJ';
    public function __construct() {
        parent::__construct();
        $this->load->model('DropDownValues_model');
         
        $this->load->model('Proposal_model');
    }
    
    public function index(){
        $data['dropdowns'] = $this->getDropDowns();

        $this->load->view('templates/header',$data);
        $this->load->view('pages/proposal', $data);
        $this->load->view('templates/footer',$data);
        
    }
    
    public function getDropDowns(){
        return  $this->DropDownValues_model->getDropDown();
    }
    
    public function insert(){

        $data = ArrayToUpper::arrayToUp($this->input->post());
       
        $proposalid = $this->Proposal_model->insertProposal($data);

        $propid = [];
        foreach ($proposalid as $value) {

            $propid = $value;
        }

        $this->session->set_userdata('USERID', self::userid);
        $this->session->set_userdata('PROPID',$propid['PROPID']);
       
        $data['proposal'] = $this->Proposal_model->getProposal();

        $data['dropdowns'] = $this->getDropDowns();

        $this->load->view('templates/header',$data);
        $this->load->view('pages/proposalcourses',$data);
        $this->load->view('templates/footer',$data);

    }
    
    public function update(){
        $data = ArrayToUpper::arrayToUp($this->input->post());
        $data['PROPID'] = $this->session->PROPID;
        
        var_dump($data);
    }
    
    function view($propid){
        if (!isset($data) || !$data['dropdowns']){
            $data['dropdowns'] = $this->getDropDowns();
        }
        //if primary sequence number exists in session, remove it.
        if ($this->session->PRI_SEQ_NUM){
            $this->session->unset_userdata('PRI_SEQ_NUM');            
        }
        $this->session->set_userdata('PROPID',$propid);
        
        $data['proposal'] = $this->Proposal_model->getProposal();
        
        $clob = $this->Proposal_model->processClob($data['proposal']);
        $data['propclobtext'] = $clob->load();
        
        $this->load->view('templates/header',$data);
        $this->load->view('pages/proposalcourses',$data);
        $this->load->view('templates/footer',$data);
        
    }
    
    
    //put your code here
}
<commit_msg>Fixed error<commit_after><?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Proposal
 *
 * @author frielj
 */
class Proposal extends CI_Controller{
    public $data = [];
    const userid = 'FRIELJ';
    public function __construct() {
        parent::__construct();
        $this->load->model('DropDownValues_model');
         
        $this->load->model('Proposal_model');
    }
    
    public function index(){
        $data['dropdowns'] = $this->getDropDowns();

        $this->load->view('templates/header',$data);
        $this->load->view('pages/proposal', $data);
        $this->load->view('templates/footer',$data);
        
    }
    
    public function getDropDowns(){
        return  $this->DropDownValues_model->getDropDown();
    }
    
    public function insert(){

        $data = ArrayToUpper::arrayToUp($this->input->post());
       
        $proposalid = $this->Proposal_model->insertProposal($data);

        $propid = [];
        foreach ($proposalid as $value) {

            $propid = $value;
        }

        $this->session->set_userdata('USERID', self::userid);
        $this->session->set_userdata('PROPID',$propid['PROPID']);
       
        $data['proposal'] = $this->Proposal_model->getProposal();
        $clob = $this->Proposal_model->processClob($data['proposal']);
        $data['propclobtext'] = $clob->load();
        $data['dropdowns'] = $this->getDropDowns();

        $this->load->view('templates/header',$data);
        $this->load->view('pages/proposalcourses',$data);
        $this->load->view('templates/footer',$data);

    }
    
    public function update(){
        $data = ArrayToUpper::arrayToUp($this->input->post());
        $data['PROPID'] = $this->session->PROPID;
        
        var_dump($data);
    }
    
    function view($propid){
        if (!isset($data) || !$data['dropdowns']){
            $data['dropdowns'] = $this->getDropDowns();
        }
        //if primary sequence number exists in session, remove it.
        if ($this->session->PRI_SEQ_NUM){
            $this->session->unset_userdata('PRI_SEQ_NUM');            
        }
        $this->session->set_userdata('PROPID',$propid);
        
        $data['proposal'] = $this->Proposal_model->getProposal();
        
        $clob = $this->Proposal_model->processClob($data['proposal']);
        $data['propclobtext'] = $clob->load();
        
        $this->load->view('templates/header',$data);
        $this->load->view('pages/proposalcourses',$data);
        $this->load->view('templates/footer',$data);
        
    }
    
    
    //put your code here
}

{'fraction_non_alphanumeric': 0.1740665056659855, 'fraction_numerical': 0.0, 'mean_word_length': 2.4780361757105944, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 110, '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': '912827', 'n_tokens_mistral': 1639, 'n_tokens_neox': 1623, 'n_words': 257}