<commit_before><?php
	require('conn.php');
?>

<html>
<style type="text/css">
    .btn{
        color: white;
        padding: 
        background-color: #18BC9C;
        border-radius: 0px;
        font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    }
    #register{
        padding-top: 30px;
    }
</style>
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Up Pharma Down - Drug Database</title>

    <!-- Bootstrap Core CSS -->
    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Theme CSS -->
    <link href="css/freelancer.min.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>
	<div class = 'container'>
		<span><input type = 'text' id = 'search' style = "float:right"></span>
		<table class = 'table table-bordered'>
			<thead>
				<tr>
					<td>Name</td><td>Email</td><td>Address</td><td>Contact Number</td><td>Credit Card Number</td><td>Options</td>
				</tr>
			</thead>
			<tbody id = 'result'>
			</tbody>
		</table>
	</div>
</body>
</html>
<script src = 'js/jquery.min.js'></script>
<script>
$(document).ready(function(){
	$("#search").on("keyup", function(e){
		if(e.keyCode == 13){
			var search_string;
			search_string = $("#search").val();
			console.log(search_string+" is the search string");
			$.ajax({
				url:"searchAsAdmin.php",
				method:"POST",
				data:{ query: search_string },
				dataType:"json",
				success:function(data){
					console.log(data);
					$("#result").html("");
					$(data).each(function(key, value){
						console.log(value.name);
					var row = "<tr data-id = "+value.user_id+">";
						row += "<td>"+value.name+"</td>";
						row += "<td>"+value.email+"</td>";
						row += "<td>"+value.address+"</td>";
						row += "<td>"+value.contact_no+"</td>";
						row += "<td>"+value.credit_card_no+"</td>";
						row += "<td><button class = 'btn btn-xs btn-warning glyphicon glyphicon-pencil' name = '"+value.user_id+"'}></button><button class = 'btn btn-xs btn-danger glyphicon glyphicon-remove' name = '"+value.user_id+"'}></td>";
						row += "</tr>"

						$("#result").append(row);
					});
				},
				
				error:function(e){
					console.log(e);
				}
			});
		}
	});
});
</script><commit_msg>added FINAL SEARCH PLS<commit_after><?php
	require('conn.php');
?>

<html>
<style type="text/css">
    .btn{
        color: white;
        padding: 
        background-color: #18BC9C;
        border-radius: 0px;
        font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    }
    #register{
        padding-top: 30px;
    }
</style>
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Up Pharma Down - Drug Database</title>

    <!-- Bootstrap Core CSS -->
    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Theme CSS -->
    <link href="css/freelancer.min.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>
	<div class = 'container'>
	<a href = '#'>Return To Main Page</a>
		<span><input type = 'text' id = 'search' style = "float:right"></span>
		<table class = 'table table-bordered'>
			<thead>
				<tr>
					<td>Name</td><td>Email</td><td>Address</td><td>Contact Number</td><td>Credit Card Number</td><td>Options</td>
				</tr>
			</thead>
			<tbody id = 'result'>
			</tbody>
		</table>
	</div>
</body>
</html>
<script src = 'js/jquery.min.js'></script>
<script>
$(document).ready(function(){
	$("#search").on("keyup", function(e){
		if(e.keyCode == 13){
			var search_string;
			search_string = $("#search").val();
			console.log(search_string+" is the search string");
			$.ajax({
				url:"searchAsAdmin.php",
				method:"POST",
				data:{ query: search_string },
				dataType:"json",
				success:function(data){
					console.log(data);
					$("#result").html("");
					$(data).each(function(key, value){
						console.log(value.name);
					var row = "<tr data-id = "+value.user_id+">";
						row += "<td>"+value.name+"</td>";
						row += "<td>"+value.email+"</td>";
						row += "<td>"+value.address+"</td>";
						row += "<td>"+value.contact_no+"</td>";
						row += "<td>"+value.credit_card_no+"</td>";
						row += "<td><button class = 'btn btn-xs btn-warning glyphicon glyphicon-pencil' name = '"+value.user_id+"'}></button><button class = 'btn btn-xs btn-danger glyphicon glyphicon-remove' name = '"+value.user_id+"'}></td>";
						row += "</tr>"

						$("#result").append(row);
					});
				},
				
				error:function(e){
					console.log(e);
				}
			});
		}
	});
});
</script>
{'fraction_non_alphanumeric': 0.21770107663077898, 'fraction_numerical': 0.01266624445851805, 'mean_word_length': 3.242444593687038, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 161, 'https://': 8, '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': '4690525', 'n_tokens_mistral': 2534, 'n_tokens_neox': 2176, 'n_words': 408}