Added a Readme and a search header (with no functionality yet)
authorPaul J R <me@pjr.cc>
Tue, 18 Sep 2012 19:57:50 +0000 (05:57 +1000)
committerPaul J R <me@pjr.cc>
Tue, 18 Sep 2012 19:57:50 +0000 (05:57 +1000)
README [new file with mode: 0644]
gwvpmini/gwvpmini.php
gwvpmini/gwvpmini_search.php [new file with mode: 0644]
gwvpmini/gwvpmini_web.php

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..cd0247d
--- /dev/null
+++ b/README
@@ -0,0 +1,14 @@
+GWVP - Mini Version
+===================
+
+ALPHA
+
+Original I started GWVP as quite a large php project, then I got stalled with some problems and ultimately
+never really continued with it because I really needed to start from scratch. However it was providing a
+service I ultimately wanted for myself - an entirely web-based git reposity solution. So now i've started
+it again and this time i've got a new set of code starting from a smaller beginning that will then expand
+over time as I work on it.
+
+The current version "works", but its ugly as sin.
+
+There is no install info at this point, but it will be coming soon.
\ No newline at end of file
index d035b5d..e17cd84 100644 (file)
@@ -5,6 +5,7 @@ require_once("gwvpmini_auth.php");
 require_once("gwvpmini_db.php");
 require_once("gwvpmini_setup.php");
 require_once("gwvpmini_gitrepo.php");
+require_once("gwvpmini_search.php");
 require_once("gwvpmini_gitbackend.php");
 if(gwvpmini_isLoggedIn()) if(gwvpmini_isUserAdmin()) {
        require_once("gwvpmini_admin.php");
diff --git a/gwvpmini/gwvpmini_search.php b/gwvpmini/gwvpmini_search.php
new file mode 100644 (file)
index 0000000..0711779
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+
+\r
+$CALL_ME_FUNCTIONS["repoadmin"] = "gwvpmini_SearchCallMe";\r
+\r
+// the home_page_provders bit is an array\r
+\r
+\r
+\r
+function gwvpmini_SearchCallMe()\r
+{\r
+\r
+       error_log("in repoadmin callme - err?");\r
+       error_log(print_r($_REQUEST, true));\r
+       if(isset($_REQUEST["q"])) {\r
+               error_log("in repoadmin callme, for Q");\r
+               $query = $_REQUEST["q"];\r
+               $qspl = explode("/", $query);\r
+               if(isset($qspl[0])) {\r
+                       if($qspl[0] == "search") {\r
+                               return "gwvpmini_SearchMainPage";\r
+                       } else return false;\r
+               }\r
+               else return false;\r
+       }\r
+\r
+       return false;\r
+}\r
+
+
+function gwvpmini_SearchBuilder()
+{
+       global $BASE_URL;
+       
+       echo "<form method=\"post\" action=\"$BASE_URL/search\">";
+       echo "<input type=\"text\" name=\"searchstring\"><input type=\"submit\" name=\"Search\" value=\"Seach\">";
+       echo "</form>";
+               
+}
+
+function gwvpmini_SearchMainPage()
+{
+       gwvpmini_goMainPage("gwvpmini_SearchMainPageBody");
+}
+
+function gwvpmini_SearchMainPageBody()
+{
+       echo "You searched for ".$_REQUEST["searchstring"];
+}
+
+?>
\ No newline at end of file
index 72f95d7..b158226 100644 (file)
@@ -90,6 +90,11 @@ function gwvpmini_goMainPage($bodyFunction = null)
        
        
        echo "<table width=\"100%\">";
+       
+       echo "<tr width=\"100%\" bgcolor=\"#ddddff\"><td colspan=\"2\" align=\"right\">";
+       gwvpmini_SearchBuilder();
+       echo "</td></tr>";\r
+       
 
        if(isset($_SESSION["message"])) {
                echo "<tr width=\"100%\"><td colspan=\"2\">";