File size: 2,860 Bytes
61e5297 ec3c508 1ebef1d 61e5297 ac6d351 61e5297 33da520 61e5297 9e5155c 61e5297 | 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 | <!DOCTYPE html>
<html>
<head>
<title>Location Data</title>
<style>
body {
background-image: url("static//bg.jpg");
color: black;
font-family: sans-serif;
backdrop-filter: blur(5px);
font-size: medium;
color: burlywood;
text-shadow: 1px 1px black;
}
form {
padding: 5px;
border-radius: 5px;
display: flex;
align-items: center;
}
label {
font-weight: bold;
margin-right: 10px;
}
input[type="text"],
select {
font-weight: bold;
font-size: 1em;
padding: 5px;
border: 1px solid #ccc;
border-radius: 3px;
flex: 1}
input[type="submit"]
select{
background-color: grey;
color: black;
font-weight: bold;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
margin-top: 10px;
border-style: outset;
}
table {
border-collapse: collapse;
width: 100%;
margin-top: 20px;
backdrop-filter: blur(5px);
}
th,
td {
text-align: left;
padding: 10px;
border: 1px solid #ddd;
}
th {
font-weight: bold;
}
</style>
</head>
<body>
<h1>Search Locations\Businesses</h1>
<form method="POST">
<label for="location">Locations\Businesses (Ex: "cafes in new york"):</label>
<input type="text" id="location" name="location" placeholder="Enter location keyword">
<br>
<label for="country_code">Country:</label>
<select id="country_code" name="country_code">
<option value="">Select Server Country</option>
<option value="FR">France</option>
<option value="DE">Germany</option>
<option value="IN">India</option>
<option value="IT">Italy</option>
<option value="JP">Japan</option>
<option value="UK">United Kingdom</option>
<option value="US">United States</option>
</select>
<br>
<input type="submit" value="Search">
</form>
<body>
{% if error_message %}
<p class="error-message">{{ error_message }}</p>
{% else %}
{% if all_place_details %}
<h2>Places Found for {{ location }}</h2>
<table>
<thead>
<tr>
<th>Title</th>
<th>Address</th>
<th>Website</th>
</tr>
</thead>
<tbody>
{% for place_details in all_place_details %}
<tr>
<td>{{ place_details[0] }}</td>
<td>{{ place_details[1] }}</td>
<td>
{% if place_details[2] %} <a href="{{ place_details[2] }}">{{ place_details[2] }}</a> {% else %} N/A {% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No data available yet. Please enter a location and country to search.</p>
{% endif %}
{% endif %}
</body>
</html>
|