chiark / gitweb /
Use the directory name "web" rather than "mason" for better completion; include pirat...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Aug 2009 20:18:25 +0000 (21:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Aug 2009 20:18:25 +0000 (21:18 +0100)
yarrg/web/.perl-lib [moved from yarrg/mason/.perl-lib with 100% similarity]
yarrg/web/check [moved from yarrg/mason/check with 100% similarity]
yarrg/web/pirate-island [new file with mode: 0644]
yarrg/web/pirates [moved from yarrg/mason/pirates with 100% similarity]

similarity index 100%
rename from yarrg/mason/.perl-lib
rename to yarrg/web/.perl-lib
similarity index 100%
rename from yarrg/mason/check
rename to yarrg/web/check
diff --git a/yarrg/web/pirate-island b/yarrg/web/pirate-island
new file mode 100644 (file)
index 0000000..a41410e
--- /dev/null
@@ -0,0 +1,33 @@
+<html><head><title>Select island</title></head><body>
+<form action="/ucgi/~clareb/mason/something" method="get">
+<select name="islandid">
+<%perl>
+my $sth=$dbh->prepare("SELECT islandid,archipelago,islandname
+                              FROM islands
+                             ORDER BY archipelago,islandname;");
+$sth->execute();
+</%perl>
+% my $row;
+% while ($row=$sth->fetchrow_hashref) {
+<option value="<% $row->{'islandid'} |h %>"><% $row->{'archipelago'} |h %> -
+<% $row->{'islandname'} |h %>
+% }
+<input type=submit name=submit value="Go">
+</form>
+
+<%init>
+
+use DBI;
+
+our $dbh;
+our $dbfn;
+$dbfn= "/home/ijackson/things/ypp-sc-tools.pctb-dict-test/yarrg/OCEAN-Midnight.db";
+
+    $dbh=DBI->connect("dbi:SQLite:$dbfn",'','',
+                       { AutoCommit=>0,
+                         RaiseError=>1, ShowErrorStatement=>1,
+                         unicode=>1 })
+        or die "$dbfn $DBI::errstr ?"
+       unless $dbh;
+
+</%init>
similarity index 100%
rename from yarrg/mason/pirates
rename to yarrg/web/pirates