<commit_before><?php
session_start();
include_once 'dbconnect.php';
if(!isset($_SESSION['user']))
{
 header("Location: index.php");
}

$res=mysql_query("SELECT * FROM users LEFT JOIN privileges on privileges.user_id = users.id WHERE users.id=".$_SESSION['user']);
$row=mysql_fetch_array($res);
$userid = $row['user_id'];
$res=mysql_query("INSERT INTO requests (user_id) values ('$userid')");
$res=mysql_query("INSERT INTO request_contents (requets_id, content, status) values (LAST_INSERT_ID(), $content1), 'added_by_user");
$last_request_id=mysql_fetch_array($res);
?>
        <script>alert('<?php echo $last_request_id; ?>');</script>
        <?php
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome - <?php echo $userRow['email']; ?></title>
<link rel="stylesheet" href="../css/main.css" type="text/css" />
<link rel="stylesheet" href="../css/normalize.css" type="text/css" />
</head>
<body>
<div id="header">
 <div id="left">
    <label>Google Trends Watch</label>
    </div>
    <div id="right">
     <div id="content">
         User name: <?php echo $userRow['username']; ?>
         Email: <?php echo $userRow['email']; ?>
         Your status is: <?php echo $userRow['privilege']; ?>
         <a href="logout.php?logout">Sign Out</a>
     </div>
     <div id="create_request">
     	<h1>Copngrats, you created a request</h1>
     	<form method="post">
			<table align="center" width="30%" border="0">
			<tr>
			<td><input type="text" name="content1" placeholder="Content 1" required /></td>
			</tr>
			<tr>
			<td><input type="text" name="content2" placeholder="Content 2"/></td><commit_msg>added create request<commit_after><?php
session_start();
include_once 'dbconnect.php';
if(!isset($_SESSION['user']))
{
 header("Location: index.php");
}

$res=mysql_query("SELECT * FROM users LEFT JOIN privileges on privileges.user_id = users.id WHERE users.id=".$_SESSION['user']);
$row=mysql_fetch_array($res);
$userid = $row['user_id'];
$res=mysql_query("INSERT INTO requests (user_id) values ('$userid')");
$res=mysql_query("INSERT INTO request_contents (requets_id, content, status) values (LAST_INSERT_ID(), $content1), 'added_by_user'");
$last_request_id=mysql_fetch_array($res);
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome - <?php echo $userRow['email']; ?></title>
<link rel="stylesheet" href="../css/main.css" type="text/css" />
<link rel="stylesheet" href="../css/normalize.css" type="text/css" />
</head>
<body>
<div id="header">
 <div id="left">
    <label>Google Trends Watch</label>
    </div>
    <div id="right">
     <div id="content">
         User name: <?php echo $userRow['username']; ?>
         Email: <?php echo $userRow['email']; ?>
         Your status is: <?php echo $userRow['privilege']; ?>
         <a href="logout.php?logout">Sign Out</a>
     </div>
     <div id="create_request">
     	<h1>Copngrats, you created a request</h1>
     	<form method="post">
			<table align="center" width="30%" border="0">
			<tr>
			<td><input type="text" name="content1" placeholder="Content 1" required /></td>
			</tr>
			<tr>
			<td><input type="text" name="content2" placeholder="Content 2"/></td>
{'fraction_non_alphanumeric': 0.2087912087912088, 'fraction_numerical': 0.012397858551704706, 'mean_word_length': 4.68, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, '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': '1513249', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1212, 'n_words': 260}