#!/usr/bin/perl # (C) Copyright RoosTech 2002, all otillåten kopiering beivras ! # v1.0.0 010918 # 011204 Ändrat adress till hemsida # 020129 Adderat href utbyte, ändrat adress till hemsida # 020205 Ändrat adress till hemsida till ../ use CGI; $foo = new CGI; print $foo->header; print $foo->start_html(-title=>'a l f a d r e a m s'); #filnamn och storlek $fPath = $foo->param('P'); $wPath = "../../"; $fTop = "../picview.html"; $pData = ""; if ($fPath eq "") { &fNotSet; } else { open SIDA, "<$fTop" or &Err3; while ($rad = ) { $rad =~ s/\n//g; $rad =~ s/background=\"/background=\"$wPath/g; $rad =~ s/src=\"/src=\"$wPath/g; #$rad =~ s/\'library\/images/\'${wPath}library\/images/g; $rad =~ s/href=\"\//href=\"$wPath/g; $pData = "$pData$rad\n"; } close SIDA; ($pTop, $pBtm) = split /\;picview\;/, $pData; print "$pTop"; print ""; print "$pBtm"; } #do 'counter.cgi alfapic'; exit; #=======Subrutiner========= sub fNotSet { print "Parameter missmatch\P=$fPath \F=$fName \N=$fNr \E=$fExt \X=$xSize \Y=$ySize\n"; print $foo->end_html; exit; } sub Err3 { print "$fTop, access error / wrong path\n"; print $foo->end_html; exit; } sub Err7 { $pText = "" }