<commit_before><?php

	include("helper.php");
    
	$errors = array();
	$goToNextStep = false;

	$host = $configSpeechday->getConfig('database.host');
	$username = $configSpeechday->getConfig('database.username');
	$password = $configSpeechday->getConfig('database.password');
	$database = $configSpeechday->getConfig('database.name');

	// connect to db
	$con = mysqli_connect($host, $username, $password);
	mysqli_select_db($con, $database);
	
	// read import sql
	$import = file_get_contents("config/import.sql");
	
	$queries = array();
	PMA_splitSqlFile($queries, $import);
	
	foreach ($queries as $query)
	{
		if (!mysqli_query($con, $query['query']))
		{
			$errors[] = "<b>".mysqli_error($con)."</b><br>(".substr($query['query'], 0, 200)."...)";
		}
	}
   
   // insert admin account
   mysqli_query($con, "INSERT INTO user (userName, passwordHash, firstName, lastName, class, role) VALUES ('admin', '$2y$10$hx2Lrp17r0dMAuLzvgNPE.0fANerA14f.AsWSZl6pRA9khGNdM.O2', 'AdminVN', 'AdminNN', '', 'admin')");
   
	// close connection
	mysqli_close($con);<commit_msg>correct admin pwd hash<commit_after><?php

	include("helper.php");
    
	$errors = array();
	$goToNextStep = false;

	$host = $configSpeechday->getConfig('database.host');
	$username = $configSpeechday->getConfig('database.username');
	$password = $configSpeechday->getConfig('database.password');
	$database = $configSpeechday->getConfig('database.name');

	// connect to db
	$con = mysqli_connect($host, $username, $password);
	mysqli_select_db($con, $database);
	
	// read import sql
	$import = file_get_contents("config/import.sql");
	
	$queries = array();
	PMA_splitSqlFile($queries, $import);
	
	foreach ($queries as $query)
	{
		if (!mysqli_query($con, $query['query']))
		{
			$errors[] = "<b>".mysqli_error($con)."</b><br>(".substr($query['query'], 0, 200)."...)";
		}
	}
   
   // insert admin account
   mysqli_query($con, "INSERT INTO user (userName, passwordHash, firstName, lastName, class, role) VALUES ('admin', <PASSWORD>', 'AdminVN', 'AdminNN', '', 'admin')");
   
	// close connection
	mysqli_close($con);
{'fraction_non_alphanumeric': 0.19760765550239234, 'fraction_numerical': 0.010047846889952153, 'mean_word_length': 5.168141592920354, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 18, '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': '5899772', 'n_tokens_mistral': 788, 'n_tokens_neox': 742, 'n_words': 132}