From: dinesh Date: Sat, 16 Aug 2008 17:47:26 +0000 (+0530) Subject: display a-z index for module search and some fixes X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=8d43fa7458b0102d440f242f1a3a1b45fbb41827;p=ccan-lca-2011.git display a-z index for module search and some fixes --- diff --git a/web/db/ccan.db b/web/db/ccan.db index 503c7fc..fcb87f8 100755 Binary files a/web/db/ccan.db and b/web/db/ccan.db differ diff --git a/web/dispmoduleinfo.php b/web/dispmoduleinfo.php index 9c26f9e..3906d3c 100644 --- a/web/dispmoduleinfo.php +++ b/web/dispmoduleinfo.php @@ -13,12 +13,12 @@ $row = sqlite3_fetch_array($result); Download'; ?> Download Dependencies'; ?> diff --git a/web/search.html b/web/search.html index 3a497b9..694dbf2 100644 --- a/web/search.html +++ b/web/search.html @@ -24,4 +24,15 @@ Display all + + + '. $i .''; + } + ?> + + + +
diff --git a/web/search.php b/web/search.php index d0c5533..d518d9f 100644 --- a/web/search.php +++ b/web/search.php @@ -12,16 +12,22 @@ if(isset($_POST['search'])) { if(trim($searchtext) == '') { echo '
Please enter some keyword to search
'; exit(); - } + } + $searchtext = '%'.$searchtext.'%'; } else if($_GET['author'] != '') { - $searchtext = $_GET['author']; + $searchtext = '%'.$_GET['author'].'%'; $in = "author"; } else if ($_GET['disp'] == 'all') { - $searchtext = ""; + $searchtext = "%"; + $in = "module"; +} +else if ($_GET['disp'] != '') { + $searchtext = $_GET['disp'].'%'; $in = "module"; } + else exit(); @@ -29,12 +35,14 @@ $result = searchdb($searchtext, $in, $db); echo ''; if($row = sqlite3_fetch_array($result)) echo ""; + "".$row["author"]." : ". $row["title"]. + "

"; else echo '
No results found
'; while($row = sqlite3_fetch_array($result)) { echo ""; + "".$row["author"]." : ". $row["title"]. + "

"; } echo '
".$row["module"]."
". - "".$row["author"]." : ". $row["title"]."

".$row["module"]."
". - "".$row["author"]." : ". $row["title"]."

'; ?> diff --git a/web/searchengine.php b/web/searchengine.php index 6117f38..fdc5e9f 100644 --- a/web/searchengine.php +++ b/web/searchengine.php @@ -4,11 +4,14 @@ function searchdb($text, $in, $db) //search db $handle = sqlite3_open($db) or die("Could not open database"); if($in == 'module') - $query = "select * from search where title LIKE \"%$text%\""; + $query = "select * from search where title LIKE \"$text\" order by module, + author"; else if($in == 'author') - $query = "select * from search where author LIKE \"%$text%\""; + $query = "select * from search where author LIKE \"$text\" order by module, + author"; else - $query = "select * from search where title LIKE \"%$text%\" or author LIKE \"%$text%\""; + $query = "select * from search where title LIKE \"$text\" or author LIKE \"$text\" + order by module, author"; $result = sqlite3_query($handle, $query) or die("Error in query: ".sqlite3_error($handle)); return $result; diff --git a/web/tarball/alloc-test.tar b/web/tarball/alloc-test.tar new file mode 100644 index 0000000..32b17f9 Binary files /dev/null and b/web/tarball/alloc-test.tar differ diff --git a/web/tarball/alloc-test_with_deps.tar b/web/tarball/alloc-test_with_deps.tar new file mode 100644 index 0000000..3cb4390 Binary files /dev/null and b/web/tarball/alloc-test_with_deps.tar differ diff --git a/web/tarball/alloc.tar b/web/tarball/alloc.tar index f6accbd..6e90ada 100644 Binary files a/web/tarball/alloc.tar and b/web/tarball/alloc.tar differ diff --git a/web/tarball/alloc_with_deps.tar b/web/tarball/alloc_with_deps.tar index e302074..265e05d 100644 Binary files a/web/tarball/alloc_with_deps.tar and b/web/tarball/alloc_with_deps.tar differ diff --git a/web/tarball/string-test.tar b/web/tarball/string-test.tar new file mode 100644 index 0000000..affcc51 Binary files /dev/null and b/web/tarball/string-test.tar differ diff --git a/web/tarball/string-test_with_deps.tar b/web/tarball/string-test_with_deps.tar new file mode 100644 index 0000000..bf05534 Binary files /dev/null and b/web/tarball/string-test_with_deps.tar differ diff --git a/web/tarball/string_with_deps.tar b/web/tarball/string_with_deps.tar index f7cde07..7a9f37f 100644 Binary files a/web/tarball/string_with_deps.tar and b/web/tarball/string_with_deps.tar differ diff --git a/web/tarball/talloc_with_deps.tar b/web/tarball/talloc_with_deps.tar index 38c87d3..7e222da 100644 Binary files a/web/tarball/talloc_with_deps.tar and b/web/tarball/talloc_with_deps.tar differ diff --git a/web/tarball/typesafe_cb.tar b/web/tarball/typesafe_cb.tar index 937e709..10fecaa 100644 Binary files a/web/tarball/typesafe_cb.tar and b/web/tarball/typesafe_cb.tar differ diff --git a/web/tarball/typesafe_cb_with_deps.tar b/web/tarball/typesafe_cb_with_deps.tar index 79b8e58..5fe6dc0 100644 Binary files a/web/tarball/typesafe_cb_with_deps.tar and b/web/tarball/typesafe_cb_with_deps.tar differ diff --git a/web/tools/create_dep_tar b/web/tools/create_dep_tar index 50234d8..715fb6b 100755 Binary files a/web/tools/create_dep_tar and b/web/tools/create_dep_tar differ diff --git a/web/tools/infotojson b/web/tools/infotojson index 9ceaa2f..366a79d 100755 Binary files a/web/tools/infotojson and b/web/tools/infotojson differ