Want Boston's Complete Salsa News?!
   Club Guide | Dance Lessons | Bands/DJ's | Message Board | Submit Info | About Us See all ads | Advertise   
~; if($cgi->param("searchterm") eq "") { $PageNav = $PageNav.qq">@CategoryList - 1) { $nextindex = 0; } else { $nextindex = $CategoryIndex + 1; } $nextid = $CategoryList[$nextindex]->{CATID}; my $PageNav = qq~

~; for($counter = 0; $counter < @SubCats; $counter++) { if ($SubCats[$counter]->{VISIBLE} eq "true" && GoodStartDate($SubCats[$counter]->{STARTDATE}) && GoodEndDate($SubCats[$counter]->{ENDDATE})) { #OB if($counter % 2 == 0) { if($counter % 1 == 0) { $html = $html.qq">@SubCats) { FindSubCategories(); } if(@SubCats <= 0) { return; } my($html) = qq~

 

#!/usr/bin/perl

##############################################################
#
# This code is copyright iKing Networks 2000, 2001.
#
#  iKing Networks offers no warranties on this script.  
#  The user of the script is solely responsible for 
#  any problems caused by installation of the script or use 
#  of the script.
#
#  All copyright notices regarding Arcadia scripts and iKing
#  Networks must remain intact on the scripts and in the HTML
#  for the scripts.
#
#  http://www.ikingnet.com
#
###############################################################

#OB
use lib "/home/bleck/salsa/perlmodules/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi";
#use Image::Magick;

# gallery.cgi

#If you are on a Windows or other such server that runs scripts
#in a directory other than the one they reside in, modify this
#variable to the full path to uig.cfg.  (Do not include a trailing
#slash, / or \\)

$UigPath		= "";

#Modify this if you are on an old version of windows
$slash		= "/";

# flush the buffers
$| = 1;

# find if it is a windows operating system
my($dpath);
my($windows);

if ( ($^O eq 'MSWin32') || defined($ENV{'OS'}) ) {
	# this one for windows
	$windows = "true";
	$dpath = "$ENV{'PATH_TRANSLATED'}";
}else{
	# this one for unix type
	$windows = "false";
	$dpath = "$ENV{'SCRIPT_FILENAME'}";
}

push (@INC, "$dpath");

eval {
	# load required files
	if($UigPath eq "") {
		require 'uig.cfg';
	} else {
		require $UigPath.$slash."uig.cfg";
	}
	push(@INC, "$ScriptPath");
	require $ScriptPath.$slash."display.cgi";	
	require $ScriptPath.$slash."uiglib.cgi";
	require $ScriptPath.$slash."memory.cgi";	
};
if ($Image Arcadia Error
	Image Arcadia failed to Load.">@) {
	print "Content-type: text/html\n\n";
	print qq~Image Arcadia Error
	Image Arcadia failed to Load.

Error including the required files:
~; print qq~$@~; print qq~~; exit; } use CGI; use CGI::Carp qw(fatalsToBrowser); $cgi = new CGI; #eval use_named_parameters to work with both old and new versions of CGI.pm eval '$cgi->use_named_parameters'; #read cookie $CookieData = $cgi->cookie("$CookieName"); if ($CookieData){ CrumbleCookie(); } InitFromParameters(); LoadProfile(); #PrintHeader(); #print $cgi->dump(); if($cgi->param("func") eq "showlogin") { ShowLogin(); #We need to call exit here because ShowLogin doesn't call it. exit; } elsif($cgi->param("func") eq "login") { my $rval = Login(); if($rval eq "true") { WriteMessage("Welcome back $Username, you have been logged in."); } elsif($rval eq "false") { ShowLogin("You entered an incorrect password."); exit; } } elsif($cgi->param("func") eq "logout") { Logout(); } elsif($cgi->param("func") eq "showregister") { ShowRegister(); #We need to call exit here because ShowRegister doesn't call it. exit; } elsif($cgi->param("func") eq "register") { Register(); } elsif($cgi->param("func") eq "setsort") { $SortBy = $cgi->param("sort"); SetCookie(PrepareCookie()); } elsif($cgi->param("func") eq "showsort") { ShowSortOptions(); #We need to call exit here to stop from displaying what's down below. exit; } elsif($cgi->param("func") eq "search") { $SearchLink = "func=search&searchterm=".$cgi->param("searchterm")."&searchfield=".$cgi->param("searchfield")."&searchtype=".$cgi->param("searchtype"); if($cgi->param("searchterm")) { require $ScriptPath.$slash."categories.cgi"; require $ScriptPath.$slash."media.cgi"; #initialize media ReadCategories(); $searchterm = DecodeURL($cgi->param("searchterm")); ReadMedia(-1, $searchterm, $cgi->param("searchfield")); if(!@MediaList) { FatalError(qq~Found 0 Results for '$searchterm'~); } ShowGallery(); } else { ShowSearchForm(); } #We need to call exit here because ShowGallery doesn't call it. exit; } elsif($cgi->param("func") eq "showupload") { require $ScriptPath.$slash."categories.cgi"; require $ScriptPath.$slash."media.cgi"; #initialize media ReadCategories(); $CategoryPath = $MediaPath.$CategoryList[$CategoryIndex]->{PATH}."imagedata.cgi"; $CategoryPath = $MediaPath.$CategoryPath; $Category = $CategoryList[$CategoryIndex]->{NAME}; ShowUpload(); #We need to call exit here to stop from displaying what's down below. exit; } elsif($cgi->param("func") eq "upload") { require $ScriptPath.$slash."categories.cgi"; require $ScriptPath.$slash."media.cgi"; require $ScriptPath.$slash."plugins.cgi"; if(!$Username || $Username eq "Guest") { Login(); } ReadCategories(); ReadMedia($CategoryIndex); $CategoryPath = $MediaPath.$CategoryPath; $Category = $CategoryList[$CategoryIndex]->{NAME}; LoadPlugins(); Upload(); } if($cgi->param("func") eq "show") { require $ScriptPath.$slash."categories.cgi"; require $ScriptPath.$slash."media.cgi"; ReadCategories(); $Category = $CategoryList[$CategoryIndex]->{NAME}; $granted = "false"; if($CategoryList[$CategoryIndex]->{PROTECTED} eq "true") { if(($CategoryList[$CategoryIndex]->{GROUPS} =~ /$UserProfile[16]/ && $UserProfile[16] ne "" && $Username ne "") || ($CategoryList[$CategoryIndex]->{USERS} =~ /$Username/ && $Username ne "")) { $granted = "true"; } } else { $granted = "true"; } if($granted eq "true" && GoodStartDate($CategoryList[$CategoryIndex]->{STARTDATE}) && GoodEndDate($CategoryList[$CategoryIndex]->{ENDDATE})) { ShowMedia(); } else { if($Username eq "" || $LoggedIn eq "false") { ShowLogin("This is a restricted category, please login first."); exit; } FatalError("You do not have permission to access this category.

"); } } elsif($CategoryIndex < 0) { require $ScriptPath.$slash."categories.cgi"; ReadCategories(); ShowCategoryListing(); } elsif($cgi->param("func") eq "plugin") { #Run Plugins $PluginName = $cgi->param("plugin"); $PluginCall = $cgi->param("call"); #if($PluginName eq "") { # eval { require "$ScriptPath/plugins.cgi"; }; # LoadPlugins(); # if(@Plugins_Submit) { # RunPlugins([@Plugins_Submit]); # } #} else { eval { require $ScriptPath.$slash.$PluginName; }; if($Reason: $@"); } eval { &$PluginCall(); }; #} } else { #Category is set and nothing else needs to be done so show gallery require $ScriptPath.">@) { FatalError("Unable to include the specified plugin: $PluginName
Reason: $@"); } eval { &$PluginCall(); }; #} } else { #Category is set and nothing else needs to be done so show gallery require $ScriptPath.
$slash."categories.cgi"; require $ScriptPath.$slash."media.cgi"; #initialize media ReadCategories(); $Category = $CategoryList[$CategoryIndex]->{NAME}; $granted = "false"; if($CategoryList[$CategoryIndex]->{PROTECTED} eq "true") { if(($CategoryList[$CategoryIndex]->{GROUPS} =~ /$UserProfile[16]/ && $UserProfile[16] ne "" && $Username ne "") || ($CategoryList[$CategoryIndex]->{USERS} =~ /$Username/ && $Username ne "")) { $granted = "true"; } } else { $granted = "true"; } if($granted eq "true" && GoodStartDate($CategoryList[$CategoryIndex]->{STARTDATE}) && GoodEndDate($CategoryList[$CategoryIndex]->{ENDDATE})) { ReadMedia($CategoryIndex); $CategoryPath = $MediaPath.$CategoryPath; ShowGallery(); } else { if($Username eq "" || $LoggedIn eq "false") { ShowLogin("This is a restricted category, please login first."); exit; } FatalError("You do not have permission to access this category.

"); } } ######################################################################################## sub InitFromParameters { if($SortBy ne "") { } elsif($cgi->param("selectedsort") ne "") { $SortBy = $cgi->param("selectedsort"); } elsif($cgi->param("sort") ne "") { $SortBy = $cgi->param("sort"); } else { $SortBy = $DefaultSort; } if($cgi->param("Page") ne "") { $Page = $cgi->param("Page"); } else { $Page = 1; } if($cgi->param("Category") ne "") { $CategoryID = int($cgi->param("Category")); if(!@CategoryList) { require $ScriptPath.$slash."categories.cgi"; ReadCategories(); } $CategoryIndex = -1; for(my $counter = 0; $counter < param("func") eq "search") { $Category = "Search Results"; } else { $Category = "NONE"; } } } ######################################################################################## sub CategoryTree { ##Added by OB $dropdownJumpTable = '

'; if($cgi->param("searchterm")) { return; } if(!
@CatTree) { BuildCatTree($CategoryIndex); } my($html) = qq~
$GalleryTitle
\n~; my $useDropdown=0; #OB my $dropDown; my $menuLength; for(my($counter) = 0; $counter < {STARTDATE}) && GoodEndDate($CatTree[$counter]->{ENDDATE})) { for(my($index) = 0; $index < $CatTree[$counter]->{DEPTH}; $index++) { if (!$useDropdown) { #OB $html .">@CatTree; $counter++) { $useDropdown=1 if ($counter > 3); #OB if ($CatTree[$counter]->{VISIBLE} eq "true" && GoodStartDate($CatTree[$counter]->{STARTDATE}) && GoodEndDate($CatTree[$counter]->{ENDDATE})) { for(my($index) = 0; $index < $CatTree[$counter]->{DEPTH}; $index++) { if (!$useDropdown) { #OB $html .= "  "; $offset .= "  "; } } if($CatTree[$counter]->{INDEX} == $cgi->param("Category")) { if (!$useDropdown) { #OB $html = $html.qq~ $CatTree[$counter]->{NAME}
\n~; } else { #OB $dropDown.= qq~\n~; } } else { if (!$useDropdown) { #OB $html = $html.qq~ $CatTree[$counter]->{NAME}
\n~; } else { #OB $dropDown.= qq~\n~; } } } # end if ($CatTree... } # end for loop if ($dropDown) { #OB $dropdownJumpTable =~ s//$dropDown/; $dropdownJumpTable =~ s//$offset/; } else { $dropdownJumpTable=""; } $html = $html.$dropdownJumpTable.qq~
\n~; return $html; } sub SubCategoryList { if($cgi->param("searchterm")) { return; } if(!
Sub Categories:
~; for($counter = 0; $counter < @SubCats; $counter++) { if ($SubCats[$counter]->{VISIBLE} eq "true" && GoodStartDate($SubCats[$counter]->{STARTDATE}) && GoodEndDate($SubCats[$counter]->{ENDDATE})) { #OB if($counter % 2 == 0) { if($counter % 1 == 0) { $html = $html.qq~~; } if($SubCats[$counter]->{IMAGE} ne "") { $catimg = qq~ ~; } else { $catimg = ""; } $html = $html.qq~ ~; if($counter == @SubCats - 1 && @SubCats % 2 == 1) { $html = $html.qq~~; } if($counter % 2 == 1) { $html = $html.qq~~; } } } $html = $html.qq~
Sub Categories:

 
$catimg $SubCats[$counter]->{NAME} ~; if(GetDaysOld($SubCats[$counter]->{LASTMODIFIED}) <= $NewPeriodLength) { $html .= qq~ New ~; } $html .= qq~ $SubCats[$counter]->{DESC}
~; if($SubCats[$counter]->{SUBS} <= 0) { $html .= qq~ ($SubCats[$counter]->{COUNT} entries) ~; } else { $html .= qq~ ($SubCats[$counter]->{SUBS} Sub-Categories, $SubCats[$counter]->{COUNT} entries) ~; } $html .= qq~

 
~; return $html; } ######################################################################################## sub PageStats { if($cgi->param("func") eq "show") { return; } if($TotalPages == 0) { $PageStats = "$NumPictures entries
Page $Page of 1"; } else { $PageStats = "$NumPictures entries
Page $Page of $TotalPages"; } my($html); $html = qq~ $PageStats ~; return $html; } ######################################################################################## sub CategoryInline { my $filename = shift; $filename = (split(/\//, $filename))[-1]; if($cgi->param("searchterm") ne "") { $SearchDisplay = "Search Results for '".$cgi->param("searchterm")."'"; } elsif(!

Top ~; if($SearchDisplay) { $html = $html.">@CatInline) { BuildCatInline($CategoryIndex); } my($html) = qq~

Top ~; if($SearchDisplay) { $html = $html."> $SearchDisplay"; } else { for(my($counter) = 0; $counter < {INDEX} == $cgi->param("Category")) || $CatInline[$counter] eq "Search Results") { $html = $html.">@CatInline; $counter++) { if(($filename eq "" && $CatInline[$counter]->{INDEX} == $cgi->param("Category")) || $CatInline[$counter] eq "Search Results") { $html = $html."> $CatInline[$counter]->{NAME} "; } else { $html = $html.qq~> $CatInline[$counter]->{NAME} ~; # *** OB get the description if ($counter eq @CatInline-1) { $myDESC = qq~

$CatInline[$counter]->{DESC}~ if ($CatInline[$counter]->{DESC}); } } } if($filename) { $html = $html.qq~ > $filename~; } # *** OB append the description $html.=$myDESC; } $html = $html.qq~

~; return $html; } ######################################################################################## sub SortDropBox { my($html) = qq~

Sort files by: ~; return $html; } ######################################################################################## sub CategoryDropBox { if(!@CategoryList) { require $ScriptPath.$slash."categories.cgi"; ReadCategories(); } my($html) = qq~

Jump To:
 
~; return $html; } ######################################################################################## sub SearchBox { my($html) = qq~
Search:
~; return $html; } ######################################################################################## ######################################################################################## sub NavBack { my($html) = qq~

Go Back to $SiteTitle

~; } ######################################################################################## sub PageNavigation { my($previd, $nextid, $html, $previndex, $nextindex); $previndex = $CategoryIndex - 1; $previd = $CategoryList[$previndex]->{CATID}; if($CategoryIndex ==
~; if($cgi->param("searchterm") eq "") { $PageNav = $PageNav.qq~ ~; $width = "33%"; } else { $width = "100%"; } $PageNav = $PageNav.qq(); } ##### if($Page > 1 && $TotalPages > 1) { if($SearchLink) { $PageNav = $PageNav."<< "; } else { $PageNav = $PageNav."<< "; } } if($Page < 1) { $PageNav = $PageNav."No Pages Exist!"; } #### for($j = 1; $j <= $TotalPages; $j++) { if($j == $Page) { $PageNav = $PageNav."[".$j."]"; } else { if($SearchLink) { $PageNav = $PageNav."[".$j."]"; } else { $PageNav = $PageNav."[".$j."]"; } } } #### if($Page < $TotalPages) { if($SearchLink) { $PageNav = $PageNav." >>"; } else { $PageNav = $PageNav." >>"; } } ##### $PageNav = $PageNav.""; if($cgi->param("searchterm") eq "") { $PageNav = $PageNav.qq~ ~; } $PageNav = $PageNav.""; $html = qq~ $PageNav ~; return $html; } sub ShowNavigation { $prev = $MediaIndex - 1; if($MediaIndex == ~; $PageNav = $PageNav.qq">@MediaList - 1) { $next = 0; } else { $next = $MediaIndex + 1; } my $PrevName = (split(/\//, $MediaList[$prev][$FILENAME]))[-1]; my $NextName = (split(/\//, $MediaList[$next][$FILENAME]))[-1]; my $PageNav = qq~ ~; $PageNav = $PageNav.qq~ ~; $PageNav = $PageNav.qq(); $PageNav = $PageNav.qq~ ~; $PageNav = $PageNav.""; $html = qq~ $PageNav ~; return $html; } ######################################################################################## sub MediaField { my($index) = shift; my($field) = shift; return $MediaList[$index][$field]; } ######################################################################################## sub CategoryTable { my($html); $html = qq~
$CategoryName Listing:
~; if(@CategoryList == 0) { $html = $html.qq~ ~; } my($catcount) = 0; for($counter = 0; $counter < {STARTDATE}) && GoodEndDate($CategoryList[$counter]->{ENDDATE})) { if($catcount % 2 == 0) { $html = $html.">@CategoryList; $counter++) { if($CategoryList[$counter]->{DEPTH} == 0 && $CategoryList[$counter]->{VISIBLE} eq "true" && GoodStartDate($CategoryList[$counter]->{STARTDATE}) && GoodEndDate($CategoryList[$counter]->{ENDDATE})) { if($catcount % 2 == 0) { $html = $html.""; } $html = $html.qq~"; if($catcount % 2 == 1){ $html = $html.""; } $catcount++; } } $html = $html.qq~
Sorry, no categories exist yet.
~; if($CategoryList[$counter]->{IMAGE} ne "") { $catimg = qq~~; } else { $catimg = ""; } $html = $html.qq~ $catimg $CategoryList[$counter]->{NAME} ~; if(GetDaysOld($CategoryList[$counter]->{LASTMODIFIED}) <= $NewPeriodLength) { $html .= qq~ New ~; } $html .= qq~
~; if($CategoryList[$counter]->{SUBS} <= 0) { $html .= qq~ $CategoryList[$counter]->{DESC}
($CategoryList[$counter]->{COUNT} entries)
~; } else { $html .= qq~ $CategoryList[$counter]->{DESC}
($CategoryList[$counter]->{SUBS} Sub-Categories, $CategoryList[$counter]->{COUNT} entries)
~; } $html .= qq~
~; $html = $html."
~; return $html; } sub ThumbTable { my($html); if($NumPictures == 0) { if(!\n); $html = $html.qq">@SubCats) { FindSubCategories(); } if(!@SubCats) { $html = qq(\n); $html = $html.qq(); $html = $html.qq(

No pictures available

); } } else { $start = $Index; $width = 100 / $PageColumns; $maxindex = $PicsOnPage + $Index; my($counter); my($stop) = 0; $html = $html.qq(); for($rowcounter = 0, $imgcount = 0; $rowcounter < $PageRows; $rowcounter++) { if($imgcount >= $PicsOnPage) { last; } $html = $html.qq(\n); for($colcounter = 0; $colcounter < $PageColumns; $colcounter++, $imgcount++, $Index++) { if($imgcount >= $PicsOnPage) { #stop trying to print images, fill the remaining columns, then get outta here. $html = $html.qq(\n\n); $stop = 1; } else { $html = $html.qq(\n\n); } } $html = $html.qq(\n); if($stop == 1) { last; } } $html = $html.qq(
); $html = $html.qq(
 ); $html = $html.qq(
); $html = $html.qq(
); $html = $html.qq(
\n); #OB $html = $html.ThumbHTML($Index); $html = $html.qq(
\n); } return $html; } ######################################################################################## sub ThumbHTML { my($index) = shift; my $catindex = -1; for(my $counter = 0; $counter <
@CategoryList; $counter++) { if($MediaList[$index][$CATID] eq $CategoryList[$counter]->{CATID}) { $catindex = $counter; last; } } if($MediaList[$index][$FILENAME] eq "") { return ""; } if ($MediaList[$index][$THUMBNAME] eq "") { #the thumbname is not present, check using prefix and filename $imagesrc = $MediaPath.$CategoryList[$catindex]->{PATH}."thumbs$slash".$thumbprefix.$MediaList[$index][$FILENAME]; if (-e "$imagesrc") { #thumb exists $imagesrc = $MediaUrl.$CategoryList[$catindex]->{PATH}."thumbs/".$thumbprefix.$MediaList[$index][$FILENAME]; } else { #does not exist, use a default my $ext = lc(GetFileExt($MediaList[$index][$FILENAME])); if(-e $SkinPath."/ico-".$ext.".gif") { $imagesrc = $SkinUrl."/ico-".$ext.".gif"; } elsif(-e $SkinPath."/ico-".$ext.".jpg") { $imagesrc = $SkinUrl."/ico-".$ext.".jpg"; } else { $imagesrc = $SkinUrl."/notfound.gif"; } } } else { #thumb is present see if exists in dir $imagesrc = $MediaPath.$CategoryList[$catindex]->{PATH}."thumbs$slash".$MediaList[$index][$THUMBNAME]; if (-e "$imagesrc") { #thumb exists $imagesrc = $MediaUrl.$CategoryList[$catindex]->{PATH}."thumbs/".$MediaList[$index][$THUMBNAME]; } else { #does not exist, use a default my $ext = lc(GetFileExt($MediaList[$index][$FILENAME])); if(-e $SkinPath."/ico-".$ext.".gif") { $imagesrc = $SkinUrl."/ico-".$ext.".gif"; } elsif(-e $SkinPath."/ico-".$ext.".jpg") { $imagesrc = $SkinUrl."/ico-".$ext.".jpg"; } else { $imagesrc = $SkinUrl."/ico-notfound.gif"; } } } ReadFileTypes(); if($MediaList[$index][$TYPE] eq "Unknown") { #if the file was added before its file type, lets see if we can correct that... $MediaList[$index][$TYPE] = AssignType($MediaList[$index][$FILENAME]); } $OpenFileIn = $FileOpen{$MediaList[$index][$TYPE]}; if($OpenFileIn eq "samewindow") { $link = qq~ {CATID}&Page=$Page> ~; } elsif($OpenFileIn eq "newwindow") { $link = qq~ {CATID}&Page=$Page target="_new"> ~; } elsif($OpenFileIn eq "download") { $MediaLink = $MediaUrl.$CategoryList[$catindex]->{PATH}."media/".$MediaList[$index][$FILENAME]; $link = qq~ ~; } else { $link = qq~ {CATID}&Page=$Page> ~; } $ThumbDisplayFormat = "\n\n".$ThumbDisplay; #used to contain: $ThumbDisplayFormat =~ s//$MediaList[$index][$FILESIZE]/g; if($MediaList[$index][$FILENAME] ne "") { my $DisplayName; my /$MediaList[$index][$TYPE]/g; } if($MediaList[$index][$DATE] ne "") { my $tempdate = NormalDateTime($MediaList[$index][$DATE]); $ThumbDisplayFormat =~ s//$tempdate/g; } if($MediaList[$index][$COPYRIGHT] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$COPYRIGHT]/g; } if($MediaList[$index][$AUTHOR] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$AUTHOR]/g; } if($MediaList[$index][$DOWNLOADS] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$DOWNLOADS]/g; } if($MediaList[$index][$DESCRIPTION] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$DESCRIPTION]/g; } if($MediaList[$index][$USER] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$USER]/g; } if($MediaList[$index][$IP] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$IP]/g; } for(my $counter = $FILENAME; $counter < @MediaFormat; $counter++) { if($MediaFormat[$counter]->{KEYWORD} ne "") { $ThumbDisplayFormat =~ s/$MediaFormat[$counter]->{KEYWORD}/$MediaList[$index][$counter]/g; } } $ThumbDisplayFormat =~ s//$link/g; #Run Plugins eval { require "$ScriptPath/plugins.cgi">@temp = split(/\//, $MediaList[$index][$FILENAME]); $DisplayName = $temp[-1]; $ThumbDisplayFormat =~ s//$DisplayName/g; } if($MediaList[$index][$TYPE] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$TYPE]/g; } if($MediaList[$index][$DATE] ne "") { my $tempdate = NormalDateTime($MediaList[$index][$DATE]); $ThumbDisplayFormat =~ s//$tempdate/g; } if($MediaList[$index][$COPYRIGHT] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$COPYRIGHT]/g; } if($MediaList[$index][$AUTHOR] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$AUTHOR]/g; } if($MediaList[$index][$DOWNLOADS] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$DOWNLOADS]/g; } if($MediaList[$index][$DESCRIPTION] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$DESCRIPTION]/g; } if($MediaList[$index][$USER] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$USER]/g; } if($MediaList[$index][$IP] ne "") { $ThumbDisplayFormat =~ s//$MediaList[$index][$IP]/g; } for(my $counter = $FILENAME; $counter < @MediaFormat; $counter++) { if($MediaFormat[$counter]->{KEYWORD} ne "") { $ThumbDisplayFormat =~ s/$MediaFormat[$counter]->{KEYWORD}/$MediaList[$index][$counter]/g; } } $ThumbDisplayFormat =~ s//$link/g; #Run Plugins eval { require "$ScriptPath/plugins.cgi"; }; LoadPlugins(); if(@Plugins_ThumbDisplay) { RunPlugins([@Plugins_ThumbDisplay]); } return $ThumbDisplayFormat."\n\n"; } ######################################################################################## sub FullsizeHtml { my $DisplayName = $ShowData[$FILENAME]; if($ShowData[$FILENAME] =~ /^http:\/\//) { $baseimglink = $ShowData[$FILENAME]; my {PATH}media$slash$ShowData[$FILENAME]"; } ReadFileTypes(); if($ShowData[$TYPE] eq "Unknown") { $ShowData[$TYPE] = AssignType($ShowData[$FILENAME]); } if($FileCode{"$ShowData[$TYPE]"} ne "") { $code = $FileCode{"$ShowData[$TYPE]"}; } else { $code = $FileCode{"Image/GIF"}; } $code =~ s//$baseimglink/g; #Old code to just replace width #$code =~ s//width=\"$ShowData[$WIDTH]\"/g; #Old Code to replace height #$code =~ s//height=\"$ShowData[$HEIGHT]\"/g; #This new way replaces the with a attr parameter #it also allows the setting of a default attr if none is found.">@temp = split(/\//, $ShowData[$FILENAME]); $DisplayName = $temp[-1]; } else { $baseimglink = "$MediaUrl$CategoryList[$CategoryIndex]->{PATH}media$slash$ShowData[$FILENAME]"; } ReadFileTypes(); if($ShowData[$TYPE] eq "Unknown") { $ShowData[$TYPE] = AssignType($ShowData[$FILENAME]); } if($FileCode{"$ShowData[$TYPE]"} ne "") { $code = $FileCode{"$ShowData[$TYPE]"}; } else { $code = $FileCode{"Image/GIF"}; } $code =~ s//$baseimglink/g; #Old code to just replace width #$code =~ s//width=\"$ShowData[$WIDTH]\"/g; #Old Code to replace height #$code =~ s//height=\"$ShowData[$HEIGHT]\"/g; #This new way replaces the with a attr parameter #it also allows the setting of a default attr if none is found. # Ex: is replaced with width="640" if width DNE. while($code =~ /^(.*?)(.*)$/) { my $line = $1; my(@default) = split(/=/, $2); if($ShowData[$WIDTH] ne "") { $code = $line."width=\"$ShowData[$WIDTH]\"".$3; } elsif($default[1] ne "") { #we have a default width... $code = $line."width=\"$default[1]\"".$3; } else { #no width at all, leave blank... $code = $line.$3; } } while($code =~ /^(.*?)(.*)$/) { my $line = $1; my(@default) = split(/=/, $2); if($ShowData[$HEIGHT] ne "") { $code = $line."height=\"$ShowData[$HEIGHT]\"".$3; } elsif($default[1] ne "") { #we have a default width... $code = $line."height=\"$default[1]\"".$3; } else { #no width at all, leave blank... $code = $line.$3; } } $ImageDisplayFormat = qq(\n
); $ImageDisplayFormat = $ImageDisplayFormat.$ImageDisplay; $ImageDisplayFormat =~ s//$code/g; $ImageDisplayFormat =~ s//$DisplayName/g; $ImageDisplayFormat =~ s//$ShowData[$FILESIZE]/g; $ImageDisplayFormat =~ s//$ShowData[$TYPE]/g; if($ShowData[$DATE] ne "") { my $tempdate = NormalDateTime($ShowData[$DATE]); $ImageDisplayFormat =~ s//$tempdate/g; } if($ShowData[$COPYRIGHT] ne "") { $ImageDisplayFormat =~ s//$ShowData[$COPYRIGHT]/g; } if($ShowData[$AUTHOR] ne "") { $ImageDisplayFormat =~ s//$ShowData[$AUTHOR]/g; } $ImageDisplayFormat =~ s//$ShowData[$DOWNLOADS]/g; if($ShowData[$DESCRIPTION] ne "") { $ImageDisplayFormat =~ s//$ShowData[$DESCRIPTION]/g; } if($ShowData[$USER] ne "") { $ImageDisplayFormat =~ s//$ShowData[$USER]/g; } if($ShowData[$IP] ne "") { $ImageDisplayFormat =~ s//$ShowData[$IP]/g; } for(my $counter = 0; $counter < {KEYWORD}/$ShowData[$counter]/g; } } $ImageDisplayFormat = $ImageDisplayFormat.qq">@MediaFormat; $counter++) { if($MediaFormat[$counter]->{KEYWORD} ne "") { $ImageDisplayFormat =~ s/$MediaFormat[$counter]->{KEYWORD}/$ShowData[$counter]/g; } } $ImageDisplayFormat = $ImageDisplayFormat.qq(
); #Run Plugins eval { require "$ScriptPath/plugins.cgi"; }; LoadPlugins(); if(@Plugins_FullsizeDisplay) { RunPlugins([@Plugins_FullsizeDisplay]); } return $ImageDisplayFormat; }

Click to Visit Click to Visit Click to Visit Click to Visit
Salsa Lessons with Johnny and Kelly
Visit Salsaweb.com