<commit_before><?php

function alert_and_redirect($msg = '', $url = '') {
    if (empty($msg)) {
        $msg = '올바른 방법으로 이용해 주십시오.';
    }

    echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=\"utf-8\">";
    echo "<script type='text/javascript'>alert('{$msg}');";
    if (!empty($url)) {
        echo "location.replace('{$url}');";
    } else {
        echo "history.go(-1);";
    }
    echo "</script>";
    exit;
}<commit_msg>Add an alert and close popup function<commit_after><?php

function alert_and_redirect($msg = '', $url = '') {
    if (empty($msg)) {
        $msg = '올바른 방법으로 이용해 주십시오.';
    }

    echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=\"utf-8\">";
    echo "<script type='text/javascript'>alert('{$msg}');";
    if (!empty($url)) {
        echo "location.replace('{$url}');";
    } else {
        echo "history.go(-1);";
    }
    echo "</script>";
    exit;
}

function alert_and_close_popup($msg = '') {
    if (empty($msg)) {
        $msg = '올바른 방법으로 이용해 주십시오.';
    }

    echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=\"utf-8\">";
    echo "<script type='text/javascript'>alert('{$msg}');";
    echo "window.close();";
    echo "</script>";
    exit;
}
{'fraction_non_alphanumeric': 0.23354735152487963, 'fraction_numerical': 0.0040128410914927765, 'mean_word_length': 2.8606811145510838, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 12, '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': '4136019', 'n_tokens_mistral': 451, 'n_tokens_neox': 486, 'n_words': 86}