<commit_before><?php
session_start();
require_once '../../DAO/DAO.php';
if (isset($_SESSION['userid'])) {
    $userid = $_SESSION['userid'];
    $username = $_SESSION['username'];
    $str = "select * from user where UserId = '{$userid}'";
    $row = sel($str);
    if (isset($row['JwxtNumber'])) {
        $str = "select * from run where UserId = '{$userid}'";
        $row = sel($str);
        if ($row) {
            if ($row['state']) {
                echo "已有约会";
            } else {
                if($_POST['runinformation']&&$_POST['runtime']) {
                    @$runinformation = $_POST['runinformation'];
                    @$runtime = $_POST['runtime'];
                    $postuser = $_SESSION['username'];
                    $str = "insert into run (UserId,PostUser,RunInformation,RunTime,state) VALUES ('{$userid}','{$postuser}','{$runinformation}','{$runtime}',1)";
                    ins($str);
                   echo '1';
                }
                else{
                    echo '信息不能为空';
                }
            }
        } else {
            if($_POST['runtime']&&$_POST['runinformation']) {
                @$runinformation = $_POST['runinformation'];
                @$runtime = $_POST['runtime'];
                $postuser = $_SESSION['username'];
                $str = "insert into run (UserId,PostUser,RunInformation,RunTime,state) VALUES ('{$userid}','{$postuser}','{$runinformation}','{$runtime}',1)";
                ins($str);
                echo "1";
            }
            else{
                echo '信息不能为空';
            }
        }
    } else {
        echo '请完善个人信息';
    }
}

<commit_msg>wanshan<commit_after><?php
session_start();
require_once '../../DAO/DAO.php';
require_once '../UserService/XSS.php';
if (isset($_SESSION['userid'])) {
    $userid = $_SESSION['userid'];
    $username = $_SESSION['username'];
    $str = "select * from user where UserId = '{$userid}'";
    $row = sel($str);
    if (isset($row['JwxtNumber'])) {
        $str = "select * from run where UserId = '{$userid}'";
        $row = sel($str);
        if ($row) {
            if ($row['state']) {
                echo "已有约会";
            } else {
                    if (empty($_POST['runinformation']) || empty($_POST['runtime'])) {
                        echo '信息不能为空';
                    } else {
                        @$runinformation = $_POST['runinformation'];
                        @$runtime = $_POST['runtime'];
                        if (xss($runinformation) || xss($runtime)) {
                            echo '请不要试图攻击!!!';
                            die();
                        }
                        $postuser = $_SESSION['username'];
                        $str = "insert into run (UserId,PostUser,RunInformation,RunTime,state) VALUES ('{$userid}','{$postuser}','{$runinformation}','{$runtime}',1)";
                        ins($str);
                        echo '1';
                    }
                }
        } else {
            if (empty($_POST['runtime']) || empty($_POST['runinformation'])) {
                echo '信息不能为空';
            } else {
                @$runinformation = $_POST['runinformation'];
                @$runtime = $_POST['runtime'];
                if (xss($runinformation)) {
                    echo '请不要试图攻击!!!';
                    die();
                }
                $postuser = $_SESSION['username'];
                $str = "insert into run (UserId,PostUser,RunInformation,RunTime,state) VALUES ('{$userid}','{$postuser}','{$runinformation}','{$runtime}',1)";
                ins($str);
                echo "";
            }
        }
    } else {
        echo '请完善个人信息';
    }
}


{'fraction_non_alphanumeric': 0.17721861471861472, 'fraction_numerical': 0.001893939393939394, 'mean_word_length': 1.5269993164730007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2210062', 'n_tokens_mistral': 1048, 'n_tokens_neox': 1020, 'n_words': 178}