From dca96ee042a4b7cbc3ef2d1053c06388a7b731e2 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 28 Jun 2007 13:37:11 +0000 Subject: [PATCH] New --- web/htdocs/admin/upload.html | 4 ++++ web/htdocs/details/upload.mc | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 web/htdocs/admin/upload.html create mode 100644 web/htdocs/details/upload.mc 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. +

-- 1.7.10.4