-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
71 lines (64 loc) · 1.84 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<link href="main.css" rel="stylesheet">
</head>
<body>
<h1>CIS 475 Biometric Server Authentication</h1>
<h2>Otto Juba</h2>
<form action="/" method="post">
<input class="btn blue" type="submit" name="index" value="index">
<input class="btn blue" type="submit" name="search" value="search">
<input class="btn" type="submit" name="enroll" value="enroll">
<input class="btn red" type="submit" name="delete" value="delete">
</form>
</body>
</html>
<?php
if(isset($_POST['index'])) {
indexFunc();
}
if(isset($_POST['enroll'])) {
enrollFunc();
}
if(isset($_POST['delete'])) {
deleteFunc();
}
if(isset($_POST['search'])) {
searchFunc();
}
function indexFunc(){
$command = 'python pyfingerprint/src/files/examples/example_index.py';
exec($command,$output,$status);
//print_r($output);
foreach($output as &$line){
echo $line . '<br/> ';
}
}
function enrollFunc(){
$command = 'python pyfingerprint/src/files/examples/example_enroll.py';
exec($command,$output,$status);
foreach($output as &$line){
echo $line . '<br/> ';
}
}
function deleteFunc(){
$command = 'python pyfingerprint/src/files/examples/example_delete.py';
exec($command,$output,$status);
//print_r($output);
foreach($output as &$line){
echo $line . '<br/> ';
}
}
function searchFunc(){
$command = 'python pyfingerprint/src/files/examples/example_search.py';
exec($command,$output,$status);
//print_r($output);
foreach($output as &$line){
echo $line . '<br/> ';
}
if (isset($output[4])) {
header("Location: http://localhost/loggedin.html");
}
}
?>