#!/usr/local/bin/perl -w

#servedatawithlinks routine

# July 23, 1997 rcg

#Reads data in from passed filename, and echos it out again, but
#when a URL "on-line" link is found, it
#recreates the link from .remoteobject information, variable name
#value and level and replaces this information with a proper
#URL.  Uses dir output to determine correct URL


$filename = $ARGV[0];
@argv 

--echo out data for now----
exit;

$level=$ARGV[0];
$level =~ s!.*/(\d)$!$1!;

$fieldvalue=$ARGV[0];
$fieldvalue=~ s!.*/(.*)/\d$!$1!;

$fieldname=$ARGV[0];
$fieldname=~ s!/.*/(.*)/$fieldvalue/$level$!$1!;

$object=$ARGV[0];
$object=~ s!^(.*)/$fieldname/$fieldvalue/$level$!$1!;

#
print "Content-type: text/html\n\n";

print <<STOPHERE;
<html>
<title>Test version of makeinvlink routine</title>
<head>
<h2 align>Test version of makeinvlink routine</h2>
</head>
<body>
Passed values:<p>
object=$object<br>
field name=$fieldname<br>
field value=$fieldvalue<br>
level=$level<br>

</body>
</html>
STOPHERE


