<commit_before><html>

	<head>
		<!-- Latest compiled and minified CSS -->
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">

		<!-- Optional theme -->
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="<KEY>" crossorigin="anonymous">

		<style>
			h3 { 
			    display: block;
			    font-size: 3em;
			    margin-top: 1em;
			    margin-bottom: 1em;
			    margin-left: 0;
			    margin-right: 0;
			    font-weight: bold;
			}
			h4 { 
			    display: block;
			    font-size: 8em;
			    margin-top: 1em;
			    margin-bottom: 1em;
			    margin-left: 0;
			    margin-right: 0;
			    font-weight: bold;
			}
		</style>

		<nav class="navbar navbar-inverse navbar-static-top">
		  <div class="container-fluid">
		    <!-- Brand and toggle get grouped for better mobile display -->
		    <div class="navbar-header">
		      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
		      <a class="navbar-brand" href="#">Brand</a>
		    </div>

		    <!-- Collect the nav links, forms, and other content for toggling -->
		    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
		      <ul class="nav navbar-nav">
		        <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
		        <li><a href="#">Link</a></li>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
		          <ul class="dropdown-menu">
		            <li><a href="#">Action</a></li>
		            <li><a href="#">Another action</a></li>
		            <li><a href="#">Something else here</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="#">Separated link</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="#">One more separated link</a></li>
		          </ul>
		        </li>
		      </ul>
		      <form class="navbar-form navbar-left">
		        <div class="form-group">
		          <input type="text" class="form-control" placeholder="Search">
		        </div>
		        <button type="submit" class="btn btn-success">Submit</button>
		      </form>
		      <ul class="nav navbar-nav navbar-right">
		        <li><a href="#">Link</a></li>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
		          <ul class="dropdown-menu">
		            <li><a href="#">Action</a></li>
		            <li><a href="#">Another action</a></li>
		            <li><a href="#">Something else here</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="#">Separated link</a></li>
		          </ul>
		        </li>
		      </ul>
		    </div><!-- /.navbar-collapse -->
		  </div><!-- /.container-fluid -->
		</nav>

	</head>
	<body>
    
     

	<?php
	
	    // pass in some info;
		require("common.php"); 
		
		if(empty($_SESSION['user'])) { 
  
			// If they are not, we redirect them to the login page. 
			$location = "http://" . $_SERVER['HTTP_HOST'] . "/login.php";
			echo '<META HTTP-EQUIV="refresh" CONTENT="0;URL='.$location.'">';
			//exit;
         
        	// Remember that this die statement is absolutely critical.  Without it, 
        	// people can view your members-only content without logging in. 
        	die("Redirecting to login.php"); 
    	} 
		
		// To access $_SESSION['user'] values put in an array, show user his username
		$arr = array_values($_SESSION['user']);
		echo "<br><br><br>";
		echo "<center>";
		echo "<h3 class='panel-title'>";
		echo "<font size='8' color='black'>Welcome " . $arr[1] . "</font>";
		echo "</h3>";
		echo "</center>";

		echo "<br>";
		



		// open connection
		$connection = mysqli_connect($host, $username, $password) or die ("Unable to connect!");

		// select database
		mysqli_select_db($connection, $dbname) or die ("Unable to select database!");

		// create query
		$query = "SELECT * FROM symbols";
       
		// execute query
		$result = mysqli_query($connection,$query) or die ("Error in query: $query. ".mysqli_error());

		// see if any rows were returned
		if (mysqli_num_rows($result) > 0) {

    		// print them one after another
    		echo "<div class='container'>";
            echo "<div class='panel panel-default'>";
            echo "<div class='panel-heading'><h3 class='panel-title'><font size='4'>Countries And Animals</font></h3></div>";
            echo "<table class='table table-hover'>";
            echo "<div class='list-group'>";
            while($row = mysqli_fetch_row($result)) {
                echo "<tr>";
                echo "<td>".$row[0]."</td>";
                echo "<td>" . $row[1]."</td>";
                echo "<td>".$row[2]."</td>";
                echo "<td><a class='btn btn-danger' href=".$_SERVER['PHP_SELF']."?id=".$row[0].">Delete</a></td>";
                echo "</tr>";
            }
            echo "</div>";
            echo "</table>";
            echo "</div>";
            echo "</div>";

		} else {
			
    		// print status message
    		echo "No rows found!";
		}

		// free result set memory
		mysqli_free_result($connection,$result);

		// set variable values to HTML form inputs
		$country = $_POST['country'];
        $animal = $_POST['animal'];
        
        // check to see if user has entered anything
        if ($animal != "") {
            // build SQL query
            $query = "INSERT INTO symbols (country, animal) VALUES ('$country', '$animal')";
            // run the query
            $result = mysqli_query($connection,$query) or die ("Error in query: $query. " . mysqli_error());
            // refresh the page to show new update
            echo "<meta http-equiv='refresh' content='0'>";
        }
		
		// if DELETE pressed, set an id, if id is set then delete it from DB
		if (isset($_GET['id'])) {

            // create query to delete record
            echo $_SERVER['PHP_SELF'];
            $query = "DELETE FROM symbols WHERE id = ".$_GET['id'];

            // run the query
            $result = mysqli_query($connection,$query) or die ("Error in query: $query. " . mysqli_error());
            
            // reset the url to remove id $_GET variable
            $location = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
            echo '<META HTTP-EQUIV="refresh" CONTENT="0;URL='.$location.'">';
            exit;
            
        }
		
		// close connection
		mysqli_close($connection);

	?>
   

    <!-- This is the HTML form that appears in the browser -->
   	<br>
   	<div class="form-inline">
	   	<div class="container">
	        <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
	            <input class='form-control' placeholder='Your Tweet Here' type="text" name="country">
	            <input class='form-control' placeholder='Your Hashtags Here' type="text" name="animal">
	            <input class='btn btn-success' type="submit" name="submit">
	        </form>
	    </div>
	</div>
    <br>
    <center>
    	<form action="logout.php" method="post"><button class="btn btn-danger">Logout</button></form>
    </center>
    
	</body>
</html><commit_msg>Username Shows Up When Posting<commit_after><html>

	<head>
		<!-- Latest compiled and minified CSS -->
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">

		<!-- Optional theme -->
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="<KEY>" crossorigin="anonymous">

		<style>
			h3 { 
			    display: block;
			    font-size: 3em;
			    margin-top: 1em;
			    margin-bottom: 1em;
			    margin-left: 0;
			    margin-right: 0;
			    font-weight: bold;
			}
			h4 { 
			    display: block;
			    font-size: 8em;
			    margin-top: 1em;
			    margin-bottom: 1em;
			    margin-left: 0;
			    margin-right: 0;
			    font-weight: bold;
			}
		</style>

		<nav class="navbar navbar-inverse navbar-static-top">
		  <div class="container-fluid">
		    <!-- Brand and toggle get grouped for better mobile display -->
		    <div class="navbar-header">
		      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
		      <a class="navbar-brand" href="#">Brand</a>
		    </div>

		    <!-- Collect the nav links, forms, and other content for toggling -->
		    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
		      <ul class="nav navbar-nav">
		        <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
		        <li><a href="#">Link</a></li>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
		          <ul class="dropdown-menu">
		            <li><a href="#">Action</a></li>
		            <li><a href="#">Another action</a></li>
		            <li><a href="#">Something else here</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="#">Separated link</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="#">One more separated link</a></li>
		          </ul>
		        </li>
		      </ul>
		      <form class="navbar-form navbar-left">
		        <div class="form-group">
		          <input type="text" class="form-control" placeholder="#Search">
		        </div>
		        <button type="submit" class="btn btn-success">Submit</button>
		      </form>
		      <ul class="nav navbar-nav navbar-right">
		        <li><a href="#">Link</a></li>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
		          <ul class="dropdown-menu">
		            <li><a href="#">Action</a></li>
		            <li><a href="#">Another action</a></li>
		            <li><a href="#">Something else here</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="#">Separated link</a></li>
		          </ul>
		        </li>
		      </ul>
		    </div><!-- /.navbar-collapse -->
		  </div><!-- /.container-fluid -->
		</nav>

	</head>
	<body>
    
     

	<?php
	
	    // pass in some info;
		require("common.php"); 
		
		if(empty($_SESSION['user'])) { 
  
			// If they are not, we redirect them to the login page. 
			$location = "http://" . $_SERVER['HTTP_HOST'] . "/login.php";
			echo '<META HTTP-EQUIV="refresh" CONTENT="0;URL='.$location.'">';
			//exit;
         
        	// Remember that this die statement is absolutely critical.  Without it, 
        	// people can view your members-only content without logging in. 
        	die("Redirecting to login.php"); 
    	} 
		
		// To access $_SESSION['user'] values put in an array, show user his username
		$arr = array_values($_SESSION['user']);
		echo "<br><br><br>";
		echo "<center>";
		echo "<h3 class='panel-title'>";
		echo "<font size='8' color='black'>Welcome " . $arr[1] . "</font>";
		echo "</h3>";
		echo "</center>";

		echo "<br>";
		



		// open connection
		$connection = mysqli_connect($host, $username, $password) or die ("Unable to connect!");

		// select database
		mysqli_select_db($connection, $dbname) or die ("Unable to select database!");

		// create query
		$query = "SELECT * FROM symbols";
       
		// execute query
		$result = mysqli_query($connection,$query) or die ("Error in query: $query. ".mysqli_error());

		// see if any rows were returned
		if (mysqli_num_rows($result) > 0) {

    		// print them one after another
    		echo "<div class='container'>";
            echo "<div class='panel panel-default'>";
            echo "<div class='panel-heading'><h3 class='panel-title'><font size='4'>New Tweets:</font></h3></div>";
            echo "<table class='table table-hover'>";
            echo "<div class='list-group'>";
            while($row = mysqli_fetch_row($result)) {
                echo "<tr>";
                echo "<td>".$row[3]."</td>";
                echo "<td>" . $row[1]."</td>";
                echo "<td>".$row[2]."</td>";
                echo "<td><a class='btn btn-danger' href=".$_SERVER['PHP_SELF']."?id=".$row[0].">Delete</a></td>";
                echo "</tr>";
            }
            echo "</div>";
            echo "</table>";
            echo "</div>";
            echo "</div>";

		} else {
			
    		// print status message
    		echo "No rows found!";
		}

		// free result set memory
		mysqli_free_result($connection,$result);

		// set variable values to HTML form inputs
		$name = $arr[1];
		$country = $_POST['country'];
        $animal = $_POST['animal'];
        
        // check to see if user has entered anything
        if ($animal != "") {
            // build SQL query
            $query = "INSERT INTO symbols (Name, country, animal) VALUES ('$name', '$country', '$animal')";
            // run the query
            $result = mysqli_query($connection,$query) or die ("Error in query: $query. " . mysqli_error());
            // refresh the page to show new update
            echo "<meta http-equiv='refresh' content='0'>";
        }
		
		// if DELETE pressed, set an id, if id is set then delete it from DB
		if (isset($_GET['id'])) {

            // create query to delete record
            echo $_SERVER['PHP_SELF'];
            $query = "DELETE FROM symbols WHERE id = ".$_GET['id'];

            // run the query
            $result = mysqli_query($connection,$query) or die ("Error in query: $query. " . mysqli_error());
            
            // reset the url to remove id $_GET variable
            $location = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
            echo '<META HTTP-EQUIV="refresh" CONTENT="0;URL='.$location.'">';
            exit;
            
        }
		
		// close connection
		mysqli_close($connection);

	?>
   

    <!-- This is the HTML form that appears in the browser -->
   	<br>
   	<div class="form-inline">
	   	<div class="container">
	        <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
	            <input class='form-control' placeholder='Your Tweet Here' type="text" name="country">
	            <input class='form-control' placeholder='Your Hashtags Here' type="text" name="animal">
	            <input class='btn btn-success' type="submit" name="submit">
	        </form>
	    </div>
	</div>
    <br>
    <center>
    	<form action="logout.php" method="post"><button class="btn btn-danger">Logout</button></form>
    </center>
    
	</body>
</html>
{'fraction_non_alphanumeric': 0.18420373952288846, 'fraction_numerical': 0.004577691811734365, 'mean_word_length': 2.244300355574148, 'pattern_counts': {'":': 0, '<': 363, '<?xml version=': 0, '>': 365, 'https://': 4, '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': '1382804', 'n_tokens_mistral': 5219, 'n_tokens_neox': 4578, 'n_words': 1154}