<commit_before><?php
	session_start();

	if (!isset($_SESSION['username'])) {
		$_SESSION['msg'] = "You must log in first";
		header('location: index.php');
	}

	if (isset($_POST['logout'])) {
		session_destroy();
		unset($_SESSION['username']);
		header("location: index.php");
	}

?>
<!DOCTYPE html>
<html>
<head>
	<title>Home | Pi In The Sky</title>
	<link rel="stylesheet" type="text/css" href="/css/style.css">
</head>
<body>
	<div class="header">
		<h2>Home Page</h2>
	</div>
	<div class="content">

		<!-- Notification Message: Appears only the first time during any session -->
		<?php if (isset($_SESSION['success'])) : ?>
			<div class="error success" >
				<h3>
					<?php
						echo $_SESSION['success'];
						unset($_SESSION['success']);
					?>
				</h3>
			</div>
		<?php endif ?>

		<!-- Logged in user information -->
		<?php  if (isset($_SESSION['username'])) : ?>
			<div class="content">
				<p>Welcome <strong><?php echo $_SESSION['username']; ?></strong></p>
				Enter <a href="/owncloud" target="_blank">OwnCloud</a>
			</div>
		<?php endif ?>

	</div>

	<div class="footer">
		<form action="home.php" method="post">
			<button type="submit" name="logout" class="btn btn-danger">Logout</button>
		</form>
	</div>

</body>
</html><commit_msg>Add link to register new user<commit_after><?php
	session_start();

	if (!isset($_SESSION['username'])) {
		$_SESSION['msg'] = "You must log in first";
		header('location: index.php');
	}

	if (isset($_POST['logout'])) {
		session_destroy();
		unset($_SESSION['username']);
		header("location: index.php");
	}

?>
<!DOCTYPE html>
<html>
<head>
	<title>Home | Pi In The Sky</title>
	<link rel="stylesheet" type="text/css" href="/css/style.css">
</head>
<body>
	<div class="header">
		<h2>Home Page</h2>
	</div>
	<div class="content">

		<!-- Notification Message: Appears only the first time during any session -->
		<?php if (isset($_SESSION['success'])) : ?>
			<div class="error success" >
				<h3>
					<?php
						echo $_SESSION['success'];
						unset($_SESSION['success']);
					?>
				</h3>
			</div>
		<?php endif ?>

		<!-- Logged in user information -->
		<?php  if (isset($_SESSION['username'])) : ?>
			<div class="content">
				<p>Welcome <strong><?php echo $_SESSION['username']; ?></strong></p>
				Enter <a href="/owncloud" target="_blank">OwnCloud</a>
			</div>
			<div class="content">
				Create a <a href="/register.php">new user</a>
			</div>
		<?php endif ?>

	</div>

	<div class="footer">
		<form action="home.php" method="post">
			<button type="submit" name="logout" class="btn btn-danger">Logout</button>
		</form>
	</div>

</body>
</html>
{'fraction_non_alphanumeric': 0.2227290003800836, 'fraction_numerical': 0.003040668947168377, 'mean_word_length': 3.892193308550186, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, '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': '6096990', 'n_tokens_mistral': 1034, 'n_tokens_neox': 896, 'n_words': 214}