<commit_before><commit_msg>added profile page<commit_after><?php
session_start();
include('db/sql_functions.php');
$_SESSION['UserID']=3;
if(isset($_SESSION['UserID']))
{
	$userID=$_SESSION['UserID'];
	$result=getUserInfo($userID);
	$name=$result["Name"];
	$age=$result["Age"];
	$username=$result["UserName"];
	$imageLocation=$result["ImageLocation"];
	?>
	<table>
		<thead>
			<tr>
				<th rowspan = "5">
				<?php
				if($imageLocation==null||$imageLocation=="")
				{
			  		print("<img src= 'http://kystmuseetnorveg.no/wp-content/themes/museetmidt-avd/images/default-profile-img.jpg' alt= 'Profile Picture' width=200 height=200>");
				}
				else
				{
			  		print("<img src= '{$imageLocation}' alt= 'Profile Picture' width=200 height=200>");
				}
				print("</th>");
				print("<th>Name:</th>");
				print("<th>{$name}</th>");
			print("</tr>");
			print("<tr>");
				print("<th>Age:</th>");
				print("<th>{$age}</th>");
			print("</tr>");
			print("<tr>");
				print("<th>UserName:</th>");
				print("<th>{$username}</th>");
			print("</tr>");
			print("<tr>");
				print("<th>Host Rating:</th>");
				$HostRating=getHostRating($userID);
				$TotalHostRates=getLikes($userID);
				$PlayerRating=getPlayerRating($userID);
				$TotalPlayerRates=getTotalRatingsAsPlayer($userID);
				print("<th>{$HostRating}/{$TotalHostRates} ({$TotalHostRates} votes)</th>");
			print("</tr>");
			print("<tr>");
				print("<th>Player Rating</th>");
				print("<th>{$PlayerRating}/{$TotalPlayerRates} ({$TotalPlayerRates} votes)</th>");
			print("</tr>");
		print("</thead>");
	print("</table>");
	print("<a href='index.php?page=editprofile'>Edit Profile Information</a><br>");
	getUpcomingGames($userID);
}
else
{
	?>
	<p>You are not logged in! Please click the login button to login and visit your profile</p>
	<?php
}


?>
{'fraction_non_alphanumeric': 0.2472466960352423, 'fraction_numerical': 0.007709251101321586, 'mean_word_length': 5.076923076923077, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '4177308', 'n_tokens_mistral': 769, 'n_tokens_neox': 651, 'n_words': 93}