#!/usr/local/bin/perl5 # -*- perl -*- package viewConfig ; use strict ; # # ################################################################# # Configuration file for special file viewer. ################################################################# # # my %ExtensionToType ; my %TypeData ; BEGIN() { # Keys: file extension (in uppercase) # value: A type code (must be unique) %viewConfig::ExtensionToType = ( HTML =>"HTML", HTM =>"HTML", GIF =>"GIF", JPEG =>"JPEG", JPG =>"JPEG", DOC =>"WINWORD", DOT =>"WINWORDT", PPT =>"PWRPT", RTF =>"RTF", PDF =>"PDF", ) ; # Special "about" url for html viewer my $htmlAbout = &P4CGI::ahref(-url => &P4CGI::SFV_HTML_URL() , "TYPE=ABOUT", "About Links and the HTML File Viewer") ; # Keys: Type code # value: A reference to an array: # [url for viewer,description of content, content type, optional about] %viewConfig::TypeData = ( HTML =>[&P4CGI::SFV_HTML_URL(),"HTML file using browser","text/html", $htmlAbout], GIF =>[&P4CGI::SFV_URL() ,"gif image using browser","image/gif"], JPEG =>[&P4CGI::SFV_URL() ,"jpeg image using browser","image/jpeg"], WINWORD =>[&P4CGI::SFV_URL() ,"MS-Word document","application/msword"], WINWORDT =>[&P4CGI::SFV_URL() ,"MS-Word template","application/msword"], PWRTP =>[&P4CGI::SFV_URL() ,"MS-PowerPoint document","application/ppt"], RTF =>[&P4CGI::SFV_URL() ,"RTF document","application/rtf"], PDF =>[&P4CGI::SFV_URL() ,"PDF document","application/pdf"] ) ; } ; 1;