-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfacesearch.php
More file actions
145 lines (103 loc) · 3.16 KB
/
facesearch.php
File metadata and controls
145 lines (103 loc) · 3.16 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
include 'api.php';
ob_start();
print_r($_FILES);
file_put_contents("log.txt", ob_get_clean(), FILE_APPEND);
if($_FILES["file-upload"]["tmp_name"])
{
if(!$_FILES["file-upload"]["error"])
{
file_put_contents("log.txt", $_FILES["file-upload"]["tmp_name"], FILE_APPEND);
unlink("test/test.jpg");
move_uploaded_file($_FILES["file-upload"]["tmp_name"], "test/test.jpg");
}
else
{
file_put_contents("log.txt", "Error1", FILE_APPEND);
}
}
else
{
file_put_contents("log.txt", "Error2", FILE_APPEND);
}
$id = python_api("test/test.jpg");
//$id = 447;
//echo $id;
//
include 'db.php';
?>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Encode+Sans" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link rel="stylesheet" href="res-search-page-style.css" type="text/css">
<link rel="stylesheet" href="lightbox.css" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="nav-bar">
<div class="logo">
<img src="images/logo.png" width="auto" height="70px">
</div>
<div style="display:none" class="name"> Guide Me </div>
</div>
<div class="search-results">
<?php
$sql = "SELECT id,name,experience,rating,city FROM guide WHERE id= '$id'";
$result = mysqli_query($link, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo'
<div class="info-container">';
$id = $row["id"];
$city = $row["city"];
$sql1 = "SELECT lang FROM lang WHERE guide_id= '$id'";
$result1 = mysqli_query($link, $sql1);
$name = $row["name"];
echo'<img src="png/face_'.$row["id"].'.png" width = "100%"> </img>';
echo'<div class="info">
<div class="details">
<dl class="details-list">
<h1 class="room-name">';
echo $row["name"];
echo '</h1>
<dt> Ratings: </dt>
<dd> <img src="images/stars/';
echo $row["rating"];
echo '-star.png"></img>
</dd> <hr>
<dt>Experience:</dt>
<dd>';
echo $row["experience"];
echo' years</dd><hr>
<dt>City: </dt>
<dd>';
echo $city;
echo '</dd>
<hr><dt>Languages:</dt>
<dd>';
$l = array();
while($row1 = mysqli_fetch_assoc($result1)) {
$l[] = $row1["lang"];
}
echo implode(", ", $l);
echo'</dd></dl></div>
<div class="contact-btn-holder">
<button type="button" class="contact-btn btn btn-primary">Contact Guide</button>
</div>
</form>
</div>
</div>';
}
}
else {
echo '<center> <p style="color:grey; font-size: 100px; opacity:0.5"> No Results Found... </p> </center>';
}
echo'
</div>
<script type="text/javascript" src="lightbox-plus-jquery.js"></script>
</body>
</html>';
mysqli_close($link);
?>