<commit_before><?php
$_POST['base_dir'] = addslashes($_POST['base_dir']);

$base_dir = $_POST['base_dir'];
$base_url = $_POST['base_url'];
$site_name = $_POST['site_name'];
$curl_enabled = $_POST['curl_enabled'];
$mail_server = $_POST['mail_server'];
$mail_user = $_POST['mail_user'];
$mail_pw = $_POST['mail_pw'];
$sa_user = $_POST['sa_user'];
$sa_id = $_POST['sa_id'];
$sa_email = $_POST['sa_email'];
$pw_plain = $_POST['sa_password'];
    
$sql = file_get_contents('../sql/PHPLoginDB.sql');    

$_POST['sa_password'] = password_hash($pw_plain, PASSWORD_DEFAULT);

if (preg_match_all("/{{(.*?)}}/", $sql, $m)) {
  foreach ($m[1] as $i => $varname) {
    $sql = str_replace($m[0][$i], sprintf('%s', '\''.$_POST[$varname].'\''), $sql);
  }
}

echo '<b>1) Copy/Paste this SQL statement into your SQL client and execute as user with root privileges</b><br>
    <textarea id="sqlResults" class="form-control" rows="10" cols="70">'. $sql .'</textarea>
    <button id="copySql" class="btn btn-default col-md-4">Copy to Clipboard</button><span class="col-md-4" id="copyNotifSql"></span><br>
    <br><script>
     $("#copySql").click(function(){

        $("#sqlResults").select();
        document.execCommand("copy");

        $("#copyNotifSql").html("Copied text to clipboard</div>").fadeOut(2000);

    });</script>';

<commit_msg>changed sql install file<commit_after><?php
$_POST['base_dir'] = addslashes($_POST['base_dir']);

$base_dir = $_POST['base_dir'];
$base_url = $_POST['base_url'];
$site_name = $_POST['site_name'];
$curl_enabled = $_POST['curl_enabled'];
$mail_server = $_POST['mail_server'];
$mail_user = $_POST['mail_user'];
$mail_pw = $_POST['mail_pw'];
$sa_user = $_POST['sa_user'];
$sa_id = $_POST['sa_id'];
$sa_email = $_POST['sa_email'];
$pw_plain = $_POST['sa_password'];
    
$sql = file_get_contents('../sql/PHPLoginDB.txt');    

$_POST['sa_password'] = password_hash($pw_plain, PASSWORD_DEFAULT);

if (preg_match_all("/{{(.*?)}}/", $sql, $m)) {
  foreach ($m[1] as $i => $varname) {
    $sql = str_replace($m[0][$i], sprintf('%s', '\''.$_POST[$varname].'\''), $sql);
  }
}

echo '<b>1) Copy/Paste this SQL statement into your SQL client and execute as user with root privileges</b><br>
    <textarea id="sqlResults" class="form-control" rows="10" cols="70">'. $sql .'</textarea>
    <button id="copySql" class="btn btn-default col-md-4">Copy to Clipboard</button><span class="col-md-4" id="copyNotifSql"></span><br>
    <br><script>
     $("#copySql").click(function(){

        $("#sqlResults").select();
        document.execCommand("copy");

        $("#copyNotifSql").html("Copied text to clipboard</div>").fadeOut(2000);

    });</script>';


{'fraction_non_alphanumeric': 0.23754215061820907, 'fraction_numerical': 0.009741476208317721, 'mean_word_length': 5.357142857142857, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '6862819', 'n_tokens_mistral': 992, 'n_tokens_neox': 974, 'n_words': 175}