<commit_before><!DOCTYPE html>

<?php
ob_start();
session_start();
?>


<html lang="en">
<head>
    <meta charset="UTF-8">
	<link rel="stylesheet" href="css/loginPage.css">
<?php
    print("<title>Rejestracja</title>");
    
print("</head>");

	$cookie_name = "kolor";
	if(!isset($_COOKIE[$cookie_name])) 
	{
		$cookie_value = "niebieski";
		setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
	}
	else
	{
		if(strcmp($_COOKIE[$cookie_name],"niebieski")==0)
		{
			print("<body style=\"background-color:#00A0FF\">");
		}	
		else if(strcmp($_COOKIE[$cookie_name],"czerwony")==0)
		{
			print("<body style=\"background-color:#FA5E5E\">");
		}
		else if(strcmp($_COOKIE[$cookie_name],"zielony")==0)
		{
			print("<body style=\"background-color:#FFFFFF\">");
		}
	}
	?>

<nav class= "navigation" >
    <ul class= "left" >
        <?php
$array=array(
 array("index.php","Jak zacząć ?"),
 array("pricelist.php","Cennik"),
 array("contact.php","Mam pytanie"),
 array("loginPage.php","Logowanie"),
 array("rejestracja.php","Rejestracja"),
 array("supersite.php", "Superstrona"));
   if ($_SESSION['valid']==true&&$_SESSION['timeout']-time()>=0)
   {
	   $array=array(
		 array("index.php","Jak zacząć ?"),
		 array("pricelist.php","Cennik"),
		 array("contact.php","Mam pytanie"),
		 array("loginPage.php","Logowanie"),
		 array("rejestracja.php","<NAME>"),
		 array("supersite.php", "Superstrona"));
   }
		foreach($array as $value)
		{
			print("<li class= \" active \"  ><a href= \" ".$value[0]." \" >".$value[1]."</a></li>");
        }
        ?>
    </ul>
</nav>

<div class = "container form-signin">
    <?php
	
	$servername = "localhost";
	$username = "root";
	$password = "<PASSWORD>";

	$database_name = "psw";

	// Create connection
	$conn = mysqli_connect($servername, $username, $password);
	$msg = '';
	$tempLogin='';
	$tempPass='';
	if ($_SESSION['valid']==true&&$_SESSION['timeout']-time()>=0)
   {
	   $tempLogin=$_SESSION['username'];
		$tempPass=$_SESSION['password'];
   }
   if (isset($_POST['login']) && !empty($_POST['username']) && !empty($_POST['password']))
   {
	   if ($_SESSION['valid']==true&&$_SESSION['timeout']-time()>=0)
	   {
		   //zmiena hasła
	   }
	   else
	   {
		   $sql = "INSERT INTO Users (login,password) VALUES('".$_POST['username']."','".$_POST['password']."');";
			mysqli_query($conn, $sql);
	   }
   }
    ?>
</div> <!-- /container -->



<div class="login-page"><commit_msg>Update database added in rejestracja.php<commit_after><!DOCTYPE html>

<?php
ob_start();
session_start();
?>


<html lang="en">
<head>
    <meta charset="UTF-8">
	<link rel="stylesheet" href="css/loginPage.css">
<?php
    print("<title>Rejestracja</title>");
    
print("</head>");

	$cookie_name = "kolor";
	if(!isset($_COOKIE[$cookie_name])) 
	{
		$cookie_value = "niebieski";
		setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
	}
	else
	{
		if(strcmp($_COOKIE[$cookie_name],"niebieski")==0)
		{
			print("<body style=\"background-color:#00A0FF\">");
		}	
		else if(strcmp($_COOKIE[$cookie_name],"czerwony")==0)
		{
			print("<body style=\"background-color:#FA5E5E\">");
		}
		else if(strcmp($_COOKIE[$cookie_name],"zielony")==0)
		{
			print("<body style=\"background-color:#FFFFFF\">");
		}
	}
	?>

<nav class= "navigation" >
    <ul class= "left" >
        <?php
$array=array(
 array("index.php","Jak zacząć ?"),
 array("pricelist.php","Cennik"),
 array("contact.php","<NAME>"),
 array("loginPage.php","Logowanie"),
 array("rejestracja.php","Rejestracja"),
 array("supersite.php", "Superstrona"));
   if ($_SESSION['valid']==true&&$_SESSION['timeout']-time()>=0)
   {
	   $array=array(
		 array("index.php","Jak zacząć ?"),
		 array("pricelist.php","Cennik"),
		 array("contact.php","<NAME>"),
		 array("loginPage.php","Logowanie"),
		 array("rejestracja.php","<NAME>"),
		 array("supersite.php", "Superstrona"));
   }
		foreach($array as $value)
		{
			print("<li class= \" active \"  ><a href= \" ".$value[0]." \" >".$value[1]."</a></li>");
        }
        ?>
    </ul>
</nav>

<div class = "container form-signin">
    <?php
	
	$servername = "localhost";
	$username = "root";
	$password = "<PASSWORD>";
	$database_name = "psw";

	// Create connection
	$conn = mysqli_connect($servername, $username, $password);
	$msg = '';
	$tempLogin='';
	$tempPass='';
	if ($_SESSION['valid']==true&&$_SESSION['timeout']-time()>=0)
   {
	   $tempLogin=$_SESSION['username'];
       $tempPass=$_SESSION['password'];
   }
   if (isset($_POST['login']) && !empty($_POST['username']) && !empty($_POST['password']))
   {
	   if ($_SESSION['valid']==true&&$_SESSION['timeout']-time()>=0)
	   {
		   $sql =  "UPDATE Users SET password='$<PASSWORD>' WHERE login='$tempLogin'";
           mysqli_query($conn, $sql);
	   }
	   else
	   {
		   $sql = "INSERT INTO Users (login,password) VALUES('".$_POST['username']."','".$_POST['password']."');";
			mysqli_query($conn, $sql);
	   }
   }
    ?>
</div> <!-- /container -->



<div class="login-page">
{'fraction_non_alphanumeric': 0.249800796812749, 'fraction_numerical': 0.010756972111553785, 'mean_word_length': 4.263102725366877, 'pattern_counts': {'":': 0, '<': 64, '<?xml version=': 0, '>': 70, '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': '1636305', 'n_tokens_mistral': 2018, 'n_tokens_neox': 1850, 'n_words': 266}