diff options
-rw-r--r-- | web/index.html | 10 | ||||
-rw-r--r-- | web/index.php | 40 | ||||
-rw-r--r-- | web/main.html | 46 | ||||
-rw-r--r-- | web/menulist.html | 2 |
4 files changed, 87 insertions, 11 deletions
diff --git a/web/index.html b/web/index.html deleted file mode 100644 index b3e3c954..00000000 --- a/web/index.html +++ /dev/null @@ -1,10 +0,0 @@ -<html> -<head> -<title>ccan</title> -</head> -<body> -<META HTTP-EQUIV="Refresh" - CONTENT="0; URL=login.php"> -</body> -</html> - diff --git a/web/index.php b/web/index.php new file mode 100644 index 00000000..20f400c5 --- /dev/null +++ b/web/index.php @@ -0,0 +1,40 @@ +<?php +session_start(); +include('logo.html'); +include('menulist.html'); +include('configuration'); +include('searchengine.php'); +include('main.html'); + +if(isset($_POST['search'])) { + $searchtext = $_REQUEST['searchtext']; + $in = $_REQUEST['searchmenu']; + if(trim($searchtext) == '') { + echo '<div align="center"><font color="RED">Please enter some keyword to search</font></div>'; + exit(); + } +} +else if($_GET['author'] != '') { + $searchtext = $_GET['author']; + $in = "author"; +} +else if ($_GET['disp'] == 'all') { + $searchtext = ""; + $in = "module"; +} +else + exit(); + +$result = searchdb($searchtext, $in, $db); +echo '<table align="left" border="0" cellpadding="8" cellspacing="1">'; +if($row = sqlite3_fetch_array($result)) + echo "<tr><td><a href=\"dispmoduleinfo.php?module=".$row['module']."\">".$row["module"]."</a></br>". + "<a href=\"search.php?author=".$row["author"]."\">".$row["author"]."</a> : ". $row["title"]." </br> </br></td></tr>"; +else + echo '<div align="center"><font color="RED"> No results found</font></div>'; +while($row = sqlite3_fetch_array($result)) { + echo "<tr><td><a href=\"dispmoduleinfo.php?module=".$row['module']."\">".$row["module"]."</a></br>". + "<a href=\"search.php?author=".$row["author"]."\">".$row["author"]."</a> : ". $row["title"]." </br> </br></td></tr>"; +} +echo '</table>'; +?> diff --git a/web/main.html b/web/main.html new file mode 100644 index 00000000..773e3a13 --- /dev/null +++ b/web/main.html @@ -0,0 +1,46 @@ +<p>CCAN provides two kinds of useful C +code: <a href="http://ccan.ozlabs.org/repo/?cmd=inventory;path=junkcode">junkcode</a> is a +collection of uploaded code with no particular order, and + +<a href="search.php?disp=all">CCAN modules</a> are more structured, +with documentation, dependencies and testcases. + +</p> + +<h2>Using The Code</h2> + +<p> + +You can <a href="search.php">search</a>, <a href="search.php?disp=all">browse summary pages for all the modules</a> or use the +<a href="http://bazaar-vcs.org/">Bazaar</a> repository +at <a href="http://ccan.ozlabs.org/repo">http://ccan.ozlabs.org/repo</a>. + +</p> + +<h2>Contributing Code</h2> + +<p> +You can <a href="upload.php">upload a .tar.gz, .tar.bz, .tar or .zip +containing C code</a>; if you have not created an account this won't be +visible until the contents have been checked by a human. +</p> + +<p>"GPLv2 or later" and supersets thereof (eg. LGPLv2+ or BSD) +licenses preferred. +</p> + +<h2>Questions?</h2> + +<p> +We have a <a href="http://ozlabs.org/mailman/listinfo/ccan">low volume +mailing list</a> for discussion of CCAN in general, and you're welcome +to join. +</p> + +<p> +We also have an IRC channel: #ccan on <a href="http://freenode.net">Freenode</a>. +</p> + +<p> +We also have a <a href="Wiki/">wiki</a>; feel free to enhance it. +</p> diff --git a/web/menulist.html b/web/menulist.html index 6e7e63b0..7e0232cb 100644 --- a/web/menulist.html +++ b/web/menulist.html @@ -27,4 +27,4 @@ session_start(); Logout</a> </td> </table> -<hr>
\ No newline at end of file +<hr> |