+++ /dev/null
-<html>
-<head>
-<title>ccan</title>
-</head>
-<body>
-<META HTTP-EQUIV="Refresh"
- CONTENT="0; URL=login.php">
-</body>
-</html>
-
--- /dev/null
+<?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>';
+?>
--- /dev/null
+<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>
Logout</a>
</td>
</table>
-<hr>
\ No newline at end of file
+<hr>