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

class Submit extends CI_Model {

	public function __construct() {
		parent::__construct();
		$this->load->database();
	}

	public function form($visitorID, $row) {
		$sql = 'INSERT INTO `submit`(`visitorID`, `name`, `num`, `birthday`, `gender`, `category`, `major`, `gpa`, `rank`, `phone`, `email`, `dormitory`, `remark`, `social`, `workshop`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
		$data = [$visitorID, $row['name'], $row['num'], $row['birthday'], $row['gender'], $row['category'], $row['major'], $row['gpa'], $row['rank'], $row['phone'], $row['email'], $row['dormitory'], $row['remark'], $row['social'], implode(',', $row['workshop'])];
		$this->db->query($sql, $data);
		return $this->db->insert_id();
	}

	public function avatar($submitID, $file) {
		$sql = 'UPDATE `submit` SET `avator` = ? WHERE `submitID` = ?';
		return $this->db->query($sql, [$file, $submitID]);
	}

	public function apply($submitID, $file) {
		$sql = 'UPDATE `submit` SET `apply` = ? WHERE `submitID` = ?';
		return $this->db->query($sql, [$file, $submitID]);
	}

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

class Submit extends CI_Model {

	public function __construct() {
		parent::__construct();
		$this->load->database();
	}

	public function form($visitorID, $row) {
		$sql = 'INSERT INTO `submit`(`visitorID`, `name`, `num`, `birthday`, `gender`, `category`, `major`, `gpa`, `rank`, `phone`, `email`, `dormitory`, `remark`, `social`, `workshop`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
		$data = [$visitorID, $row['name'], intval($row['num']), $row['birthday'], $row['gender'], $row['category'], $row['major'], $row['gpa'], $row['rank'], $row['phone'], $row['email'], $row['dormitory'], $row['remark'], $row['social'], implode(',', $row['workshop'])];
		$this->db->query($sql, $data);
		return $this->db->insert_id();
	}

	public function avatar($ID, $file) {
		$sql = 'UPDATE `submit` SET `avator` = ? WHERE `ID` = ?';
		return $this->db->query($sql, [$file, $ID]);
	}

	public function apply($ID, $file) {
		$sql = 'UPDATE `submit` SET `apply` = ? WHERE `ID` = ?';
		return $this->db->query($sql, [$file, $ID]);
	}

}
{'fraction_non_alphanumeric': 0.2751971954425942, 'fraction_numerical': 0.0, 'mean_word_length': 5.65597667638484, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '5082553', 'n_tokens_mistral': 869, 'n_tokens_neox': 823, 'n_words': 182}