-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
67 lines (58 loc) · 2.7 KB
/
Copy pathindex.php
File metadata and controls
67 lines (58 loc) · 2.7 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel=stylesheet href="style.css" type="text/css">
<link rel="shortcut icon" href="flower.ico">
<title>Useful Tropical Plants</title>
</head>
<body>
<?php
include 'functions.php';
include 'dbconnect.php';
include 'header.php';
$numPlants = 5500;
$numPlantsRes = safe_query($db, "SELECT count(*) FROM `tropicalspecies`");
$numPlantsRow = mysqli_fetch_row($numPlantsRes);
if($numPlantsRow) {
$numPlants = $numPlantsRow[0];
}
echo <<<EOT
<div class="mainimage"><img width="200" src="front2.jpg" alt="Carica Papaya (Papaya)"/>
<div class="caption">Carica Papaya (Papaya)<br> growing in a woodland garden.</div>
</div>
<p class="mainpage">The <i><b>Useful Tropical Plants Database</b></i> contains information on the edible, medicinal and many other uses of several thousand plants that can be grown in tropical regions.<br><br>
It is very much a work in progress, with new records being entered and older records being updated on a regular basis. <br><br>
The plants can be browsed using the buttons below (please note that common names are not currently present for most of the records), or it is possible to search on any keyword. There is also a more advanced <a href="query.php">search feature</a> available.<br><br>
Any feedback and offers of assistance (especially in obtaining photographs of the plants) will be gratefully received. <br><br>The database currently lists $numPlants species.</p>
<div id="mainsearchbox">
<form action="query.php" method="get">
<input type="search" id="searchbox2" name="full" value="Search:" autocomplete="off"/>
<div id="searchResultsMain" class="autoCompleteList" style="display:none;"></div>
<script>
var handler = new AutoCompleteBox("searchbox2", "searchResultsMain");
</script>
<input type="submit" value="Search" />
</form>
</div>
<p class="mainpage">Browse botanical names:</p>
EOT;
echo '<p class="mainpageletters"><b>';
for ($char = 65; $char <= 90; $char++) {
echo "<a href=\"letter-index.php?letter=".chr($char)."\">".chr($char)."</a> ";
}
echo "</b></p>\n";
echo '<p class="mainpage">Browse common names</p>';
echo '<p class="mainpageletters"><b>';
for ($char = 65; $char <= 90; $char++) {
echo "<a href=\"common-index.php?letter=".chr($char)."\">".chr($char)."</a> ";
}
echo "</b></p>\n";
echo "<p class=\"mainpage\"><br>All the information in this database is fully referenced, these references can be viewed when looking at indivudual plants.
<br>There is a full list of references <a href=\"refs.php\">here.</a></p>\n";
include 'footer.php';
mysqli_close($db);
?>
</body>
</html>