4 include('menulist.html');
5 include('configuration');
6 include('searchengine.php');
7 include('search.html');
9 if(isset($_POST['search'])) {
10 $searchtext = $_REQUEST['searchtext'];
11 $in = $_REQUEST['searchmenu'];
12 if(trim($searchtext) == '') {
13 echo '<div align="center"><font color="RED">Please enter some keyword to search</font></div>';
16 $searchtext = '%'.$searchtext.'%';
18 else if($_GET['author'] != '') {
19 $searchtext = '%'.$_GET['author'].'%';
22 else if ($_GET['disp'] == 'all') {
26 else if ($_GET['disp'] != '') {
27 $searchtext = $_GET['disp'].'%';
34 $result = searchdb($searchtext, $in, $db);
35 echo '<table align="left" border="0" cellpadding="8" cellspacing="1">';
36 if($row = sqlite3_fetch_array($result))
37 echo "<tr><td><a href=\"dispmoduleinfo.php?module=".$row['module']."\">".$row["module"]."</a></br>".
38 "<a href=\"search.php?author=".$row["author"]."\">".$row["author"]."</a> : ". $row["title"].
39 " </br> </br></td></tr>";
41 echo '<div align="center"><font color="RED"> No results found</font></div>';
42 while($row = sqlite3_fetch_array($result)) {
43 echo "<tr><td><a href=\"dispmoduleinfo.php?module=".$row['module']."\">".$row["module"]."</a></br>".
44 "<a href=\"search.php?author=".$row["author"]."\">".$row["author"]."</a> : ". $row["title"].
45 " </br> </br></td></tr>";