#!/usr/pkg/bin/perl ###!/usr/bin/perl ###!/bin/perl ###!/usr/pkg/bin/perl ######################################################################### #pic_show.pl $revision: 1.0 $ $date: 2002/07/ $ #copyright (c) DG2HL Roger Luff 2002 (rluff@gmx.de) #script that can create html-pages from the web page created by pic_uploader, #present pictures and add the comments below #requires cgi-lib.pl #Usage of this script: # #e.g.: ######################################################################### #add a path to the @INC use lib '/sdf/www/nz/v/visumod/cgi-bin'; require "cgi-lib.pl"; $mode = 4; if (($mode eq 1) || ($mode eq 2)) #Unimog-point database format! { $html_path="../"; $htmllayout = "
"; #userspecific layout for script response $back ="/userpics/index.html"; @path_list = (["userpics","NULL"]); @AoA = ([ "table2001.html" ], [ "table2002.html" ], [ "table.html" ]); #name of the html pages that has to be scanned, must exist! } if ($mode eq 3) #Rogers database Format { $html_path="/home/rluff/public_html/"; $htmllayout = "\n"; #userspecific layout for script response @path_list = (["GN400","NULL"],["UNIMOG","NULL"],["SHIPS","NULL"],["TMPSITE","NULL"],["EBAY","NULL"],["TEILE","NULL"]); $back = $ENV{'HTTP_REFERER'}; @AoA = ([ "guestpics.html" ]); } if ($mode eq 4) #freeshell database Format { $html_path="../"; $htmllayout = "\n"; #userspecific layout for script response @path_list = (["unimog/guestpics","NULL"],["gn400/guestpics","NULL"],["allbikes/guestpics","NULL"],["cruises/heinke92","NULL"],["cruises/sonne02","NULL"],["cruises/heinke94","NULL"],["cruises/sonne96","NULL"],["cruises/meteor98","NULL"],["cruises/valdivia90","NULL"],["cruises/heinke94","NULL"],["cruises/mya93","NULL"],["cruises/alkor89","NULL"],["tmpsite/guestpics","NULL"]); $back = $ENV{'HTTP_REFERER'}; @AoA = ([ "index.html" ]); } $nr = (@ARGV); if ($nr > 0) { $picturelink = "$ARGV[0]"; $picturelink =~ s/\\//g; } $max = $#path_list+1; print (PrintTXTHeader()); $status = ""; $html_file=""; $comment=""; for ($i=0; $i<$max; $i++) { if (index($picturelink,$path_list[$i][0]) ge 0) { $html_file=$path_list[$i][0]; } } $index= @AoA; for $i ( 0 .. $index-1 ) { $html_tablefile = $AoA[$i][0]; if ($html_file eq "") { $status = "${status} Pathlist error!";
}
if (open (FILE,"<${html_path}${html_file}/${html_tablefile}"))
{
while ($Line = ";
}
}
if ($comment eq "")
{
$status = "${status} Search error, can not find: $picturelink in database. ";
}
print (" \n");
print (" ${row[5]} ${row[7]} ");
}
if (($mode eq 3) || ($mode eq 4))
{
print (" \n");
print (" ${row[2]} ");
}
if ($mode eq 5)
{
print (" \n");
print (" ${row[2]}${row[3]} ${row[4]} ${row[5]} ");
}
}
else
{
print (" ");
print ("$status");
}
print ("\nINDEX!");
print (HtmlBot());
//g;
$comment =~ s/<\/TD>//g;
$comment =~ s/ //g;
@row = split(//,$comment);
}
else
{
$status = "${status} HTML-file error: ${html_path}${html_file}/${html_tablefile}!
\n
\n");
print ("
\n
\n");
print ("
\n
\n");
print (" ERROR !