From: Mike Taylor Date: Thu, 28 Jun 2007 13:37:11 +0000 (+0000) Subject: New X-Git-Tag: CPAN-v1.02~54^2~327 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=406d68d073252b2d4995f7a073f3701569a527c5;p=irspy-moved-to-github.git New --- diff --git a/web/htdocs/admin/upload.html b/web/htdocs/admin/upload.html new file mode 100644 index 0000000..52649fa --- /dev/null +++ b/web/htdocs/admin/upload.html @@ -0,0 +1,4 @@ +%# $Id: upload.html,v 1.1 2007-06-28 13:37:11 mike Exp $ +<& /chrome/layout.mc, %ARGS, + title => "Upload target record", + component => "/details/upload.mc" &> diff --git a/web/htdocs/details/upload.mc b/web/htdocs/details/upload.mc new file mode 100644 index 0000000..78b7850 --- /dev/null +++ b/web/htdocs/details/upload.mc @@ -0,0 +1,39 @@ +%# $Id: upload.mc,v 1.1 2007-06-28 13:37:11 mike Exp $ +<%args> +$filename => undef + +% if (!defined $filename) { +
+

+ ZeeRex file to upload: + +
+ +

+
+% return; +% } +<%perl> +my $fin = $r->upload()->fh(); +if (!defined $fin) { + $m->comp("/details/error.mc", msg => "Upload cancelled"); + return; +} + +my $xml = join("", <$fin>); +my $xc = irspy_xpath_context($xml); +my $id = irspy_record2identifier($xc); +my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0, + user => "admin", password => "fruitbat", + elementSetName => "zeerex"); +ZOOM::IRSpy::_really_rewrite_record($conn, $xc->getContextNode()); + +

+ Upload OK. +

+

+ Proceed to + the new record. +