// // http://mig.sourceforge.net/ // $version = '1.4.0'; // // LICENSE INFORMATION // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // You can find a copy of the GPL online at: // http://www.gnu.org/copyleft/gpl.html // // END OF LICENSE INFORMATION // // // Please see the files in the docs subdirectory. // // Do not modify this file directly. Please see docs/text/install.txt // or docs/html/install.html for installation directions. Most things // you'd want to customize can be customized outside of this file. // (Exception: if you need to use the $pathConvert* features those should // be modified here). // // If you find that is not the case, and you hack in support for some // feature you want to see in Mig, please contact me with a code diff and // if I agree that it is useful to the general public, I will incorporate // your code into the main code base for distribution. If you have GNU // diff, a unified diff is best (diff -u), if you don't, then contextual // diff works too (diff -c). // // If I don't incorporate it I may very well offer it as "contributed" // code that others can download if they wish to do so. // ?> (%i, %s)"; $fileInfoFormatString['audio'] = "%n
(%s)"; $fileInfoFormatString['video'] = "%n
(%s)"; $folderNameLength = 15; $folderSortType = 'default'; $ignoreDotDirectories = FALSE; $imagePopLocationBar = FALSE; $imagePopMaxHeight = 480; $imagePopMaxWidth = 640; $imagePopMenuBar = FALSE; $imagePopToolBar = FALSE; $imagePopType = 'reuse'; $imagePopup = FALSE; $largeLinkFromMedium = TRUE; $largeLinkUseBorders = FALSE; $largeSubdir = 'large'; $maintAddr = 'webmaster@mydomain.com'; $markerLabel = 'th'; $markerType = 'suffix'; $maxFolderColumns = 2; $maxThumbColumns = 4; $maxThumbRows = 5; $mig_GeeklogCompatible = FALSE; $mig_GeeklogRBlockForFolder = 1; $mig_GeeklogRBlockForImage = 0; $mig_GeeklogRoot = ''; $mig_language = 'en'; $mig_xoopsCompatible = FALSE; $mig_xoopsRBlockForFolder = 1; $mig_xoopsRBlockForImage = 0; $mig_xoopsRoot = '../..'; $nextFormatString = '%l'; $noThumbs = FALSE; $omitImageName = FALSE; $pageTitle = 'My Photo Album'; $phpNukeCompatible = FALSE; $phpNukeRoot = ''; $phpWebThingsCompatible = FALSE; $phpWebThingsRoot = ''; $prevFormatString = '%l'; $randomFolderThumbs = FALSE; $showShortOnThumbPage = FALSE; $sortType = 'default'; $suppressAltTags = FALSE; $suppressImageInfo = FALSE; $thumbSubdir = 'thumbs'; $useLargeImages = FALSE; $useRealRandThumbs = TRUE; $useThumbSubdir = TRUE; $viewFolderCount = FALSE; //for old compatibility: remove in mig 2.0: if ($suppressImageInfo = 'true') $fileInfoFormatString=""; ?>' . $mig_config['lang']['backhome'] . ' ' . $homeLabel . ' ] '; } else { $retval = ''; } return $retval; } // Trim off the last directory, so we go "back" one. $junk = ereg_replace('/[^/]+$', '', $currDir); $newCurrDir = migURLencode($junk); $retval = '' . $label . ''; return $retval; } // -- End of buildBackLink() ?> "; exit; } while ($file = readdir($dir)) { // Only pay attention to directories $x = $mig_config['albumdir'].'/'.$currDir.'/'.$file; if (! is_dir($x)) { continue; } // Ignore . and .. if ($file == '.' || $file == '..') { continue; } // Ignore presorted items if ($presorted[$file]) { continue; } // Ignore directories whose name begins with "." if the // appropriate option is set if ($mig_config['ignoredotdirectories'] && ereg('^\.', $file)) { continue; } // If we got here, store it as a valid directory $directories[$file] = TRUE; // And stash a timestamp if (ereg('bydate.*', $mig_config['foldersorttype'])) { $timestamp = filemtime($mig_config['albumdir'].'/'.$currDir .'/'.$file); $filedates["$timestamp-$file"] = $file; } } closedir($dir); // If we have directories, start a table if ($directories) { $directoryList .= "\n" . ' '; } ksort($directories); // sort so we can yank them in sorted order reset($directories); // reset array pointer to beginning if ($mig_config['foldersorttype'] == 'bydate-ascend') { ksort($filedates); reset($filedates); } elseif ($mig_config['foldersorttype'] == 'bydate-descend') { krsort($filedates); reset($filedates); } // Join the two sorted lists together into a single list if (ereg('bydate.*', $mig_config['foldersorttype'])) { while (list($junk,$file) = each($filedates)) { $presorted[$file] = TRUE; } } else { while (list($file,$junk) = each($directories)) { $presorted[$file] = TRUE; } } // Make sure hidden items aren't displayed while (list($file,$junk) = each($mig_config['hidden'])) unset ($presorted[$file]); reset($presorted); // reset array pointer // Iterate through all folders now that we have our final list. while (list($file,$junk) = each($presorted)) { $folder = $mig_config['albumdir'].'/'.$currDir.'/'.$file; // Calculate how many images in the folder if desired if ($mig_config['viewfoldercount']) { $counts[$file] = getNumberOfImages($folder); $countdir[$file] = getNumberOfDirs($folder, $currDir); } // Handle random folder thumbnails if desired if ($mig_config['randomfolderthumbs']) { $samples[$file] = getRandomThumb($file, $folder, $currDir); } } reset($presorted); // Track columns $row = 0; $col = 0; --$maxColumns; // Tricks $maxColumns into working since it // really starts at 0, not 1 while (list($file,$junk) = each($presorted)) { // Start a new row if appropriate if ($col == 0) { $directoryList .= "\n "; } // Surmise the full path to work with $newCurrDir = $oldCurrDir . '/' . $file; // URL-encode the directory name in case it contains spaces // or other weirdness. $enc_file = migURLencode($newCurrDir); // Build the link itself for re-use below $linkURL = ''; // Reword $file so it doesn't allow wrapping of the label // (fixes odd formatting bug in MSIE). // Also, render _ as a space. // Also, shorten filename length if using random thumbs, // to make the table cleaner $nbspfile = $file; if ($mig_config['randomfolderthumbs'] && strlen($nbspfile) > $mig_config['foldernamelength']) { $nbspfile = substr($nbspfile,0,$mig_config['foldernamelength']-1) . '(..)'; } $nbspfile = str_replace(' ', ' ', $nbspfile); $nbspfile = str_replace('_', ' ', $nbspfile); if ($mig_config['randomfolderthumbs']) { $folderTableClass = 'folderthumbs'; $folderTableAlign = 'center'; } else { $folderTableClass = 'foldertext'; $folderTableAlign = 'left'; } // Build the full link (icon plus folder name) and tack it on // the end of the list. $directoryList .= "\n" . ' '; // Keep track of what row/column we're on if ($col == $maxColumns) { $directoryList .= "\n "; ++$row; $col = 0; } else { ++$col; } } // If there aren't any subfolders to look at, then just say so. if ($directoryList == '' || ereg('$', $directoryList)) { return 'NULL'; } elseif (!eregi('$', $directoryList)) { // Stick a on the end if it isn't there already, and close // the table. $directoryList .= "\n \n
' . $linkURL . '' . $altlabel . '' . $sep . $linkURL . $nbspfile . ''; // Display counts if appropriate if ($mig_config['viewfoldercount'] && (($counts[$file] > 0) || ($countdir[$file] > 0)) ) { $directoryList .= $sep . '(' . $countdir[$file] . '/' . $counts[$file] . ')'; } // Don't forget to close the table cell $directoryList .= '
"; } else { // Close the table. $directoryList .= "\n "; } return $directoryList; } // -- End of buildDirList() ?>"; exit; } // URL-encoded version of currDir $urlCurrDir = migURLencode($currDir); $row = 0; // Counters for the table formatting $col = 0; --$maxColumns; // Tricks maxColumns into working since it // really starts at 0, not 1. --$maxRows; // same for rows // prototype the arrays $imagefiles = array (); $filedates = array (); $thumbsInFolder = 0; // Count presorted images for pagination purposes if ($presorted) { while (list($x,$y) = each($presorted)) { ++$thumbsInFolder; } } // Reset array pointer reset($presorted); $markerLabel = $mig_config['markerlabel']; while ($file = readdir($dir)) { // Skip over thumbnails if (!$mig_config['usethumbsubdir']) { // unless $useThumbSubdir is set, // then don't waste time on this check if ($mig_config['markertype'] == 'suffix' && ereg("_$markerLabel\.[^.]+$", $file) && getFileType($file)) { continue; } if ($mig_config['markertype'] == 'prefix' && ereg("^$markerLabel\_", $file)) { continue; } } // We'll look at this one only if it's a file // and it matches our list of approved extensions if (is_file($mig_config['albumdir'].'/'.$currDir.'/'.$file) && ! $presorted[$file] && getFileType($file)) { // Increase thumb counter ++$thumbsInFolder; // Stash file in an array $imagefiles[$file] = TRUE; // and stash a timestamp as well if needed if (ereg('bydate.*', $mig_config['sorttype'])) { $timestamp = filemtime($mig_config['albumdir'] . "/$currDir/$file"); $filedates["$timestamp-$file"] = $file; } } } ksort($imagefiles); // sort, so we get a sorted list to stuff onto the // end of $presorted reset($imagefiles); // reset array pointer if ($mig_config['sorttype'] == 'bydate-ascend') { ksort($filedates); reset($filedates); } elseif ($mig_config['sorttype'] == 'bydate-descend') { krsort($filedates); reset($filedates); } // Join the two sorted lists together into a single list if (ereg('bydate.*', $mig_config['sorttype'])) { while (list($junk,$file) = each($filedates)) { $presorted[$file] = TRUE; } } else { while (list($file,$junk) = each($imagefiles)) { $presorted[$file] = TRUE; } } // Make sure hidden items don't show up while (list($file,$junk) = each($mig_config['hidden'])) unset ($presorted[$file]); reset($presorted); // reset array pointer // If there are images, start the table if ($thumbsInFolder) { $imageList .= "\n " . ''; } // Set up pagination environment $max_col = $maxColumns + 1; $max_row = $maxRows + 1; $firstThumb = $mig_config['startfrom'] * $max_col * $max_row; // This rounds off any fractional part $pages = ceil($thumbsInFolder / ($max_col * $max_row)); // Handle pagination if ($thumbsInFolder > ($max_col * $max_row)) { if ($mig_config['startfrom']) { $start_img = ($mig_config['startfrom'] * $max_col * $max_row) + 1; if (($start_img+($max_col*$max_row)-1) >= $thumbsInFolder) { // This must be the last page. $end_img = $thumbsInFolder; } else { // Not the first, not last - some middle page. $end_img = ($mig_config['startfrom'] + 1) * $max_col * $max_row; } } else { // Absence of startFrom means we're on page 1 (startFrom=0). // Therefore, we can easily calculate what we need. $start_img = 1; $end_img = $max_col * $max_row; } // Fetch template phrase to work with. $phrase = $mig_config[$lang]['total_images']; // %t is total images in folder $phrase = str_replace('%t', $thumbsInFolder, $phrase); // %s is start image $phrase = str_replace('%s', $start_img, $phrase); // %e is end image $phrase = str_replace('%e', $end_img, $phrase); $pageBlock .= "\n" . ' ' . "\n" . ' \n "; } $imageList .= $pageBlock; $thumbCounter = -1; while (list($file,$junk) = each($presorted)) { ++$thumbCounter; if ($thumbCounter >= $firstThumb && $row <= $maxRows) { // Only look at valid image types if (getFileType($file)) { // If this is a new row, start a new if ($col == 0) { $imageList .= "\n "; } $img = buildImageURL($currDir, $file, $description, $short_desc); $imageList .= $img; // Keep track of what row and column we are on if ($col == $maxColumns) { $imageList .= "\n "; ++$row; $col = 0; } else { ++$col; } } } } closedir($dir); $imageList .= $pageBlock; // If there aren't any images to work with, just say so. if ($imageList == '') { $imageList = 'NULL'; } elseif (!eregi('$', $imageList)) { // Stick a on the end if it isn't there already and close // the table $imageList .= "\n \n
' . $phrase; if ($mig_config['startfrom']) { $prevPage = $mig_config['startfrom'] - 1; $pageBlock .= '«  '; } for ($i = 1; $i <= $pages; ++$i) { if (floor(($i - 11) / 20) == (($i - 11) / 20)) { $pageBlock .= '
'; } if ($i == ($mig_config['startfrom'] + 1)) { $pageBlock .= '' . $i . '  '; } else { $ib = $i - 1; $pageBlock .= '' . $i . '  '; } } if (($mig_config['startfrom'] + 1) < $pages) { $nextPage = $mig_config['startfrom'] + 1; $pageBlock .= '»'; } $pageBlock .= "
"; } else { // Close the table. $imageList .= "\n "; } return $imageList; } // -- End of buildImageList() ?> 1048576) { $imageFileSize = sprintf('%01.1f', $imageFileSize / 1024 / 1024) . 'MB'; } elseif ($imageFileSize > 1024) { $imageFileSize = sprintf('%01.1f', $imageFileSize / 1024) . 'KB'; } else { $imageFileSize = $imageFileSize . $mig_config['lang']['bytes']; } // Figure out thumbnail geometry $thumbHTML = ''; if (file_exists($thumbFile)) { $thumbProps = GetImageSize($thumbFile); $thumbHTML = $thumbProps[3]; } // If not an image, just print a URL to the object // with a few extra trimmings. if ($type != 'image') { $url = "\n" . ' ' . '
'; $fileinfotable = array ( 'n' => $filename, 's' => $imageFileSize // 'i' => $imageWidth.'x'.$imageHeight ); // If $fileInfoFormatString is set, show the file info if ($mig_config['fileinfoformatstring']) { $url .= '
'; $newstr=replaceString($mig_config['fileinfoformatstring'][$type],$fileinfotable); if (!$mig_config['nothumbs']) { $url .= $newstr; } } $url .= ''; return $url; // It's an image - jump through all the hoops } else { // beginning of the table cell $url = "\n" . ' $mig_config['imagepopmaxwidth']) { $popup_width = $mig_config['imagepopmaxwidth']; } if ($popup_height > $mig_config['imagepopmaxheight']) { $popup_height = $mig_config['imagepopmaxheight']; } $url .= '#" onClick="window.open(\''; } $url .= $mig_config['baseurl'] . '?currDir=' . $currDir . '&pageType=image&image=' . $newFname . '.' . $ext; if ($mig_config['startfrom']) { $url .= '&startFrom=' . $mig_config['startfrom']; } if ($mig_config['mig_dl']) { $url .= '&mig_dl=' . $mig_config['mig_dl']; } if ($mig_config['imagepopup']) { $url .= "','"; if ($mig_config['imagepoptype'] == 'reuse') { $url .= 'mig_window_11190874'; } else { $url .= 'mig_window_' . time() . '_' . $newFname; } $url .= "','width=$popup_width,height=$popup_height," . 'resizable=yes,scrollbars=1'; // Set up various toolbar options if requested if ($mig_config['imagepoplocationbar']) { $url .= ',location=1'; } if ($mig_config['imagepoptoolbar']) { $url .= ',toolbar=1'; } if ($mig_config['imagepopmenubar']) { $url .= ',menubar=1'; } $url .= "');return false;"; } $url .= '">'; // If $noThumbs is true, just print the image filename rather // than the tag pointing to a thumbnail. if ($mig_config['nothumbs']) { $url .= "$newFname.$ext"; } else { $url .= ''; } $url .= ''; // End the element // If $fileInfoFormatString is set, show the image info if ($mig_config['fileinfoformatstring']) { $url .= '
'; //replace variables of the fileinfoformatstring // %n = Filename // %s = FileSize // %i = ImageSize $fileinfotable = array ( 'n' => $fname . '.' . $ext, 's' => $imageFileSize, 'i' => $imageWidth.'x'.$imageHeight); $newstr=replaceString($mig_config['fileinfoformatstring'][$type],$fileinfotable); if (!$mig_config['nothumbs']) { $url .= $newstr; } } // If $showShortOnThumbPage is TRUE, show short comment if ($mig_config['showshortonthumbpage']) { $url .= '
'; $url .= $alt_desc; } $url .= ''; // Close table cell return $url; } } // -- End of buildImageURL() ?> '; return $retval; } // -- End of buildLargeHrefStart() ?>' . $mig_config['lang']['largelink'] . '
'; return $retval; } // -- End of buildLargeLink() ?>'.$text.''; } function _prevNextLink($text,$currDir,$imgNr) { global $mig_config; $link = '' .$text. ''; return $link; } // buildNextPrevLinks() - Build links to the "next" and "previous" images. function buildNextPrevLinks ( $currDir, $presorted ) { global $mig_config; // newCurrDir is currDir without the leading "./" $newCurrDir = getNewCurrDir($currDir); if (is_dir($mig_config['albumdir']."/$currDir")) { if ($mig_config['pagetype'] == 'large') { $dir = opendir($mig_config['albumdir']."/$currDir/".$mig_config['largesubdir']); } else { $dir = opendir($mig_config['albumdir']."/$currDir"); } } else { print "ERROR: no such currDir '$currDir'
"; exit; } // Gather all files into an array $fileList = array (); while ($file = readdir($dir)) { $markerLabel = $mig_config['markerlabel']; // Ignore thumbnails if ($mig_config['markertype'] == 'prefix' && ereg("^$markerLabel\_", $file)) { continue; } if ($mig_config['markertype'] == 'suffix' && ereg("_$markerLabel\.[^.]+$", $file) && getFileType($file)) { continue; } // Only look at valid image formats if (! getFileType($file)) { continue; } // Ignore the hidden images if ($mig_config['hidden'][$file]) { continue; } // Make sure this is a file, not a directory. // and make sure it isn't presorted if (is_file($mig_config['albumdir']."/$currDir/$file") && ! $presorted[$file]) { $fileList[$file] = TRUE; // Store a date, too, if needed if (ereg('bydate.*', $mig_config['sorttype'])) { $timestamp = filemtime($mig_config['albumdir']."/$currDir/$file"); $filedates["$timestamp-$file"] = $file; } } } closedir($dir); ksort($fileList); // sort, so we see sorted results reset($fileList); // reset array pointer if ($mig_config['sorttype'] == 'bydate-ascend') { ksort($filedates); reset($filedates); } elseif ($mig_config['sorttype'] == 'bydate-descend') { krsort($filedates); reset($filedates); } // Generated final sorted list if (ereg('bydate.*', $mig_config['sorttype'])) { // since $filedates is sorted by date, and date is // the key, the key is pointless to put in the list now. // so we store the value, not the key, in $presorted while (list($junk,$file) = each($filedates)) { $presorted[$file] = TRUE; } } else { // however, here we have real data in the key, so we push // the key, not the value, into $presorted. while (list($file,$junk) = each($fileList)) { $presorted[$file] = TRUE; } } reset($presorted); // reset array pointer // Gather all files into an array $i = 1; // iteration counter, etc // Yes, position 0 is garbage. Makes the math easier later. $fList = array ( 'blah' ); while (list($file, $junk) = each($presorted)) { // If "this" is the one we're looking for, mark it as such. if ($file == $mig_config['image']) { $ThisImagePos = $i; } $fList[$i] = $file; // Stash filename in the array ++$i; // increment the counter, of course. } reset($fList); --$i; // Get rid of the last increment... // Next is one more than $ThisImagePos. Test if that has a value // and if it does, consider it "next". if ($fList[$ThisImagePos+1]) { $next = migURLencode($fList[$ThisImagePos+1]); } else { $next = 'NA'; } // Previous must always be one less than the current index. If // that has a value, that is. Unless the current index is "1" in // which case we know there is no previous. if ($ThisImagePos == 1) { $prev = 'NA'; } elseif ($fList[$ThisImagePos-1]) { $prev = migURLencode($fList[$ThisImagePos-1]); } // URL-encode currDir $currDir = migURLencode($currDir); // newCurrDir is currDir without the leading "./" $newCurrDir = getNewCurrDir($currDir); //build the links: //first parse the prev/nextFormatStrings... $fileinfotable = array ( 'l' => $mig_config['lang']['previmage'] ); $prevtext = replaceString($mig_config['prevformatstring'],$fileinfotable); $fileinfotable = array ( 'l' => $mig_config['lang']['nextimage'] ); $nexttext = replaceString($mig_config['nextformatstring'],$fileinfotable); // If there is no previous image, show a greyed-out link if ($prev == 'NA') $pLink = _greyLink($prevtext); // else show a real link else $pLink = _prevNextLink($prevtext,$currDir,$prev); // If there is no next image, show a greyed-out link if ($next == 'NA') $nLink = _greyLink($nexttext); // else show a real link else $nLink = _prevNextLink($nexttext,$currDir,$next); // Current position in the list $currPos = '#' . $ThisImagePos . ' of ' . $i; return array( $nLink, $pLink, $currPos ); } // -- End of buildNextPrevLinks() ?>' . "\n" . ' ' . $input . "\n" . ' ' . "\n" . ''; return $retval; } // -- End of buildTable() ?>' . $label . ''; } // Strip the last piece off of $workingCopy to go to next loop $workingCopy = ereg_replace('/[^/]+$', '', $workingCopy); // Build up the final path over each loop iteration $x = $hereString; $hereString = $url . $x; } // If we're down to "." as our currDir then this is "Main" if ($currDir == '.') { $url = $mig_config['lang']['main']; $x = $hereString; $hereString = $url . $x; // Or if we're not, then Main should be a link instead of just text } else { $url = '' . $mig_config['lang']['main'] . ''; $x = $hereString; $hereString = $url . $x; } // If there's an image, tack it onto the end of the hereString // unless we have $omitImageName set to TRUE if ($mig_config['image'] != '' && ! $mig_config['omitimagename']) { $hereString .= ' > ' . $mig_config['image']; } return $hereString; } // -- End of buildYouAreHere() ?> $exifData['comment'], 'a' => $exifData['aperture'], 'f' => $exifData['flash'], 'i' => $exifData['iso'], 'l' => $exifData['foclen'], 'm' => $exifData['model'], 's' => $exifData['shutter'], 'Y' => $exifData['year'], 'M' => $exifData['month'], 'D' => $exifData['day'], 'T' => $exifData['time'] ); // separate elements of format string $matches = explode('|', $formatString); while (list($key,$val) = each($matches)) { // $changeflag is used to tell us if we should bother // printing this block at all. If none of the format // characters in this block can be expanded, we never set // $changeflag to TRUE. If it's not TRUE at the end of this // while(), the block is just dumped. $changeflag = FALSE; // Keep on going until every %X atom has been examined and // expanded. while (ereg('%([a-zA-Z])', $val, $lettermatch)) { // which letter matched? $letter = $lettermatch[1]; // If this can be expanded, do so. If it can be, // set $changeflag to TRUE so we know to include this // block instead of dumping it. if ($table[$letter]) { $newtext = $table[$letter]; $changeflag = TRUE; } // Do interpolation $val = str_replace("%$letter", $newtext, $val); } // Only if $changeflag is TRUE do we bother tacking this // onto the final product. if ($changeflag) { $newstr .= $val; } } return $newstr; } // -- End of formatExifData() ?> $desc[$image], 'model' => $model[$image], 'year' => $year[$image], 'month' => $month[$image], 'day' => $day[$image], 'time' => $time[$image], 'iso' => $iso[$image], 'foclen' => $foclen[$image], 'shutter' => $shutter[$image], 'aperture' => $aperture[$image], 'flash' => $flash[$image] ); $retval = formatExifData($formatString, $exifData); return $retval; } else { return ''; } } // -- End of getExifDescription() ?> blocks if (eregi('^', $line)) { $line = fgets($file, 4096); while (! eregi('^', $line)) { $line = trim($line); $mig_config['hidden'][$line] = TRUE; $line = fgets($file, 4096); } } // Parse structure if (eregi('^', $line)) { $line = fgets($file, 4096); while (! eregi('^', $line)) { $line = trim($line); if (is_file("$directory/$line")) { $presort_img[$line] = TRUE; } elseif (is_dir("$directory/$line")) { $presort_dir[$line] = TRUE; } $line = fgets($file, 4096); } } // Parse structure if (eregi('^', $line)) { $line = fgets($file, 4096); while (! eregi('^', $line)) { $bulletin .= $line; $line = fgets($file, 4096); } } // Parse structure if (eregi('^', '', $commfilename); $commfilename = eregi_replace('^ structure if (eregi('^', '', $shortfilename); $shortfilename = eregi_replace('^\n"; print $line; } else { $incl_file = $line; if (file_exists($mig_config['templatedir'] ."/$incl_file")) { if (function_exists('virtual')) { // virtual() doesn't like absolute paths, // apparently, so just pass it a relative one. $tmplDir = ereg_replace('^.*/', '', $mig_config['templatedir']); virtual("$tmplDir/$incl_file"); } else { include( convertIncludePath($pathConvertFlag, $mig_config['templatedir']."/$incl_file", $pathConvertRegex, $pathConvertTarget)); } } else { // If the file doesn't exist, complain. $line = '\n"; print $line; } } } else { // Make sure this is URL encoded $encodedImageURL = migURLencode($mig_config['image']); // If pagetype is large, add largeSubdir to path. if ($mig_config['image']) { // Get image pixel size for element if ($mig_config['pagetype'] == 'image') { $imageProps = GetImageSize($mig_config['albumdir']."/$currDir/" .$mig_config['image']); } elseif ($mig_config['pagetype'] == 'large') { $imageProps = GetImageSize($mig_config['albumdir']."/$currDir/" . $mig_config['largesubdir'] . '/'.$mig_config['image']); } $imageSize = $imageProps[3]; } $albumURLroot = $mig_config['albumurlroot']; $baseURL = $mig_config['baseurl']; $image = $mig_config['image']; $largeSubdir = $mig_config['largesubdir']; $pageTitle = $mig_config['pagetitle']; // List of valid tags $replacement_list = array ( 'baseURL', 'maintAddr', 'version', 'folderList', 'imageList', 'backLink', 'currDir', 'newCurrDir', 'image', 'albumURLroot', 'pageTitle', 'nextLink', 'prevLink', 'currPos', 'description', 'youAreHere', 'distURL', 'encodedImageURL', 'imageSize', 'newLang', 'largeSubdir', 'largeLink', 'largeHrefStart', 'largeHrefEnd', 'largeLinkBorder' ); // Do substitution for various variables while (list($key,$val) = each($replacement_list)) { $line = str_replace("%%$val%%", $$val, $line); } print $line; // Print resulting line } $line = fgets($file, 4096); // Grab another line } fclose($file); return TRUE; } // -- End of printTemplate() ?> $mig_config['lang_lib']['br'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'voltar para', 'bytes' => ' bytes', 'flash_used' => 'flash usado', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Principal', 'must_auth' => 'Você deve entrar com um' . ' login e senha válido' . ' para acessar este ' . 'conteúdo', 'nextimage' => 'próxima imagem', 'no_contents' => 'Sem conteúdo.', 'previmage' => 'imagem anterior', 'thumbview' => 'Voltar para os thumbnails', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'subir um nível', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['cz'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'zpt dom', 'bytes' => ' byt', 'flash_used' => 'flash pouit', 'largelink' => 'zobrazit velk obrzek', 'largeview' => 'zpt na zobrazen malch&nbs;obrzk', 'main' => 'Hlavn', 'must_auth' => 'Muste vloit sprvn jmno a' . ' heslo pro vstup', 'nextimage' => 'nsledujc obrzek', 'no_contents' => 'dn obrzky.', 'previmage' => 'pedchoz obrzek', 'thumbview' => 'zpt na zobrazen nhled', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Zobrazuji obrzky %s-%e z %t' . ' celkem
', 'up_one' => 'o rove ve', 'month' => array ( '01' => 'Led', '02' => 'no', '03' => 'Be', '04' => 'Dub', '05' => 'Kv', '06' => 'en', '07' => 'ec', '08' => 'Srp', '09' => 'Z', '10' => 'j', '11' => 'Lis', '12' => 'Pro' ) ); ?> // Updated by Ekkehard Drre // Updated by Werner M. Krau $mig_config['lang_lib']['de'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'zurück zu', 'bytes' => ' bytes', 'flash_used' => 'Blitz benutzt', 'largelink' => 'Bild in voller Größe betrachten', 'largeview' => 'zurück&nbps;zur&nbps;Webseitendarstellung', 'main' => 'Hauptverzeichnis', 'must_auth' => 'Für den Zugang müssen ' . 'Sie eine gültige Benutzerkennung' . ' und Passwort eingeben', 'nextimage' => 'nächstes Bild', 'no_contents' => 'Kein Inhalt.', 'previmage' => 'vorheriges Bild', 'thumbview' => 'zurück zur Kleinbildübersicht', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Es werden die Bilder %s-' . '%e von %t angezeigt.
', 'up_one' => 'Eine Ebene höher', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'März', '04' => 'Apr', '05' => 'Mai', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Okt', '11' => 'Nov', '12' => 'Dez') ); ?> $mig_config['lang_lib']['dk'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'Tilbage til', 'bytes' => ' bytes', 'flash_used' => 'Flash brugt', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Hovedside', 'must_auth' => 'Du skal skrive et gyldigt' . ' brugernavn og password' . ' for at komme ind', 'nextimage' => 'Næste billede', 'no_contents' => 'Intet indhold.', 'previmage' => 'Forrige billede', 'thumbview' => 'Tilbage til oversigten', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Viser %s-%e af %t' . ' billeder
', 'up_one' => 'Tilbage', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Maj', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Okt', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['ee'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'tagasi', 'bytes' => ' baiti', 'flash_used' => 'kasutatud välku', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Avaleht', 'must_auth' => 'Vaatamiseks tuleb sisestada ' . 'kasutajatunnus ja arool', 'nextimage' => 'järgmine pilt', 'no_contents' => 'Kataloog on tühi', 'previmage' => 'eelmine pilt', 'thumbview' => 'tagasi ikoonide juurde', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Näitan pilte %s-%e (%t)' . ' 
', 'up_one' => 'tase kõrgemale', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> 'AM', 'pm' => 'PM', 'backhome' => 'back to', 'bytes' => ' bytes', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Main', 'must_auth' => 'You must enter a valid' . ' username and password to' . ' enter', 'nextimage' => 'next image', 'no_contents' => 'No contents.', 'previmage' => 'previous image', 'thumbview' => 'back to thumbnail view', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'up one level', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> // with some adjustments from JMN $mig_config['lang_lib']['es'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'regresar inicio', 'bytes' => ' bytes', 'flash_used' => 'flash usado', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Principal', 'must_auth' => 'Debes introducir un usuario y' . ' clave válidas para' . ' acceder', 'nextimage' => 'siguiente imágen', 'no_contents' => 'Sin contenidos.', 'previmage' => 'anterior imágen', 'thumbview' => 'volver a vista por iconos', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'subir un nivel', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['fi'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'takaisin', 'bytes' => ' byteä', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Etusivu', 'must_auth' => 'Sinun pitää antaa oikea' . ' tunnus ja salasana' . ' jatkaasesi eteenp äin', 'nextimage' => 'seuraava kuva', 'no_contents' => 'Albumi on tyhjä', 'previmage' => 'edellinen kuva', 'thumbview' => 'takaisin kuva valikkoon', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'paluu edelliselle sivulle', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> // Updated July 2002 by Yannick Mass $mig_config['lang_lib']['fr'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'Retourner sur', 'bytes' => ' octets', 'flash_used' => 'flash utilisé', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Liste des albums', 'must_auth' => 'Vous devez entrer un nom ' . 'login et un mot de passe' . ' valides pour entrer', 'nextimage' => 'Image suivante', 'no_contents' => 'VIDE', 'previmage' => 'Image précédente', 'thumbview' => 'Retour vue par vignettes', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Images %s à %e sur ' . '%t
', 'up_one' => 'Remonter niveau supérieur', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> // Updated by Fabio Fioravanti $mig_config['lang_lib']['it'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'torna a', 'bytes' => ' bytes', 'flash_used' => 'usato flash', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Principale', 'must_auth' => 'Devi inserire un nome utente' . ' ed una password validi' . ' per accedere', 'nextimage' => 'prossima immagine', 'no_contents' => 'Vuoto.', 'previmage' => 'immagine precedente', 'thumbview' => 'torna alla vista per icone', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Immagini %s-%e di %t' . ' totali
', 'up_one' => 'torna al livello superiore', 'month' => array ( '01' => 'Gen', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Mag', '06' => 'Giu', '07' => 'Lug', '08' => 'Ago', '09' => 'Set', '10' => 'Ott', '11' => 'Nov', '12' => 'Dic') ); ?> $mig_config['lang_lib']['jp'] = array ( 'am' => '午前', 'pm' => '午後', 'backhome' => 'ホームに戻る - ', 'bytes' => ' バイト', 'flash_used' => 'フラッシュ使用', 'largelink' => '最大サイズの画像を見る', 'largeview' => '大きいサイズの画像を見る', 'main' => 'メインページ', 'must_auth' => 'この画像を見るためには ID とパスワードの入力が必要です。', 'nextimage' => '次の画像', 'no_contents' => '画像がありません', 'previmage' => '前の画像', 'thumbview' => '一覧に戻る', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => '表示中 %s 枚目 ' . '- %e 枚目 / ' . '全画像数 %t 枚
', 'up_one' => '一つ上に行く', 'month' => array ( '01' => '1 月', '02' => '2 月', '03' => '3 月', '04' => '4 月', '05' => '5 月', '06' => '6 月', '07' => '7 月', '08' => '8 月', '09' => '9 月', '10' => '10 月', '11' => '11 月', '12' => '12 月' ) ); ?> $mig_config['lang_lib']['koi8r'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => '×ÅÒÎÕÔØ' . 'ÓÑ Ë', 'bytes' => ' ÂÁÊÔ', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'ìÉÃÅ×Á' . 'Ñ', 'must_auth' => '÷Ù ÄÏÌÖÎ' . 'Ù ××ÅÓÔÉ' . ' ËÏÒÒÅËÔ' . 'ÎÏÅ ÉÍÑ Ð' . 'ÏÌØÚÏ×Á' . 'ÔÅÌÑ É ÐÁ' . 'ÒÏÌØ', 'nextimage' => 'ÓÌÅÄÕÁÝ' . 'ÁÑ ËÁÒÔ' . 'ÉÎËÁ', 'no_contents' => 'ðÕÓÔÏ.', 'previmage' => 'ÐÒÅÄÙÄÕ' . 'ÝÁÑ ËÁÒ' . 'ÔÉÎËÁ', 'thumbview' => '×ÅÒÎÕÔØ' . 'ÓÑ Ë ÕÍ' . 'ÅÎØÛÅÎÎ' . 'ÏÍÕ ×ÉÄ' . 'Õ', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'ÐÒÅÄÙÄÕ' . 'ÝÁÑ ÐÁÐ' . 'ËÁ', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> 'AM', 'pm' => 'PM', 'backhome' => 'Terug naar', 'bytes' => ' bytes', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Hoofdmenu', 'must_auth' => 'Je moet een geldige naam en' . ' wachtwoord invoeren om hier' . ' naar binnen te gaan', 'nextimage' => 'volgende foto', 'no_contents' => 'Geen commentaar.', 'previmage' => 'vorige foto', 'thumbview' => 'terug naar overzicht', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'een niveau omhoog', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> 'AM', 'pm' => 'PM', 'backhome' => 'tilbake', 'bytes' => ' bytes', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Galleriet', 'must_auth' => 'Du må oppgi gyldig' . ' brukernavn og passord', 'nextimage' => 'neste bilde', 'no_contents' => 'Tom katalog', 'previmage' => 'forrige bilde', 'thumbview' => 'tilbake til oversikt', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'opp et nivå', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> 'AM', 'pm' => 'PM', 'backhome' => 'powrót do', 'bytes' => ' bajtów', 'flash_used' => 'u¿yto Flash', 'largeview' => 'back to web-sized view', 'largelink' => 'view full-size image', 'main' => 'G³ówna', 'must_auth' => 'Musisz wpisaæ prawid³ow¹' . ' nazwê u¿ytkownika i' . ' has³o by wejæ', 'nextimage' => 'nastêpny obrazek', 'no_contents' => 'nie ma zawartoci.', 'previmage' => 'poprzedni obrazek', 'thumbview' => 'powrót do widoku miniatur', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'powrót  ', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['pliso'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'powrót do', 'bytes' => ' bajtów', 'flash_used' => 'u¿yto Flash', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'G?ówna', 'must_auth' => 'Musisz wpisaæ prawid?ow±' . ' nazwê u¿ytkownika i' . ' has?o by wej¶æ;', 'nextimage' => 'nastêpny obrazek', 'no_contents' => 'nie ma zawarto¶ci.', 'previmage' => 'poprzedni obrazek', 'thumbview' => 'powrót do widoku miniatur', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'powrót  ', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['ro'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'înapoi la', 'bytes' => ' octeti', 'flash_used' => 'utilizat flash', 'largelink' => 'vedere marita', 'largeview' => 'înapoi la vederea normala', 'main' => 'Principal', 'must_auth' => 'Pentru a intra, trebuie sa' . ' introduceti un nume de' . ' utilizator si o parola' . ' valide', 'nextimage' => 'imaginea urmatoare', 'no_contents' => 'Repertoriu GOL', 'previmage' => 'imaginea precedenta', 'thumbview' => 'înapoi la repertoriu', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Vedere imaginile %s-%e din %t' . ' în total
', 'up_one' => 'nivelul precedent', 'month' => array ( '01' => 'ian', '02' => 'feb', '03' => 'mar', '04' => 'apr', '05' => 'mai', '06' => 'iun', '07' => 'iul', '08' => 'aug', '09' => 'sep', '10' => 'oct', '11' => 'noi', '12' => 'dec') ); ?> $mig_config['lang_lib']['ru'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'âåðíóòü' . 'ñÿ ê', 'bytes' => ' áàéò', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Ëèöåâàÿ', 'must_auth' => 'Âû äîëæí' . 'û ââåñòè' . ' êîððåêò' . 'íîå èìÿ ï' . 'îëüçîâà' . 'òåëÿ è ïà' . 'ðîëü', 'nextimage' => 'ñëåäóþù' . 'àÿ êàðò' . 'èíêà', 'no_contents' => 'Ïóñòî.', 'previmage' => 'ïðåäûäóù' . 'àÿ êàðò' . 'èíîà', 'thumbview' => 'âåðíóòü' . 'ñÿ ê óì' . 'åíüøåíí' . 'îìó âèä' . 'ó', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'ïðåäûäóù' . 'àÿ ïàïê' . 'à', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['se'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'tillbaka', 'bytes' => ' byte', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Första sidan', 'must_auth' => 'Du måste ange korrekt' . ' användarnamn och lösenord' . ' för att komma vidare', 'nextimage' => 'nästa bild', 'no_contents' => 'Det här albumet är' . ' tomt', 'previmage' => 'föregående bild', 'thumbview' => 'tillbaka till miniatyrbilderna', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'tillbaka till föregående' . ' sida', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['sk'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'spä? na', 'bytes' => ' bytov', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Hlavná stránka', 'must_auth' => 'Musíte uvies? u?ívate' . '¾ské meno a heslo ' . 'na vstup', 'nextimage' => 'ïal?í obrázok', 'no_contents' => 'Prázdny adresár.', 'previmage' => 'predchádzajúci obrázok', 'thumbview' => 'spä? na zmen?eniny obrá' . 'zkov(thumbnail)', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'o úroveò vy??ie', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['tr'] = array ( 'am' => 'AM', 'pm' => 'PM', 'backhome' => 'geri dön:', 'bytes' => ' bit', 'flash_used' => 'flash used', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'Ana', 'must_auth' => 'Geçerli bir kullanýcý' . ' adý ve þifre' . ' girmelisiniz.', 'nextimage' => 'sonraki resim', 'no_contents' => 'içerik yok.', 'previmage' => 'önceki resim', 'thumbview' => 'küçük resimlere geri' . ' dön', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => 'Showing images %s-%e of %t' . ' total
', 'up_one' => 'bir seviye yukarý', 'month' => array ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') ); ?> $mig_config['lang_lib']['zh'] = array ( 'am' => 'W', 'pm' => 'U', 'backhome' => '^', 'bytes' => ' 줸', 'flash_used' => 'ΰ{O', 'largelink' => 'view full-size image', 'largeview' => 'back to web-sized view', 'main' => 'D', 'must_auth' => 'AJĪΤW٤αKX~iiJ', 'nextimage' => 'U@iϤ', 'no_contents' => 'Se', 'previmage' => 'W@iϤ', 'thumbview' => '^Y˵', // total_images is special. It has three elements you can use: // %t : Total images in folder // %s : First image shown this page // %e : Last image shown this page 'total_images' => '%tiϤ%s-%ei', 'up_one' => '^W@h', 'month' => array ( '01' => '@', '02' => 'G', '03' => 'T', '04' => '|', '05' => '', '06' => '', '07' => 'C', '08' => 'K', '09' => 'E', '10' => 'Q', '11' => 'Q@', '12' => 'QG' ) ); ?> 1) { print 'FATAL ERROR: more than one content management system '; print 'is defined.'; exit; } // Fetch some settings into $mig_config $mig_config['commentfileperimage'] = $commentFilePerImage; $mig_config['commentfileshortcomments'] = $commentFileShortComments; $mig_config['fileinfoformatstring'] = $fileInfoFormatString; $mig_config['foldernamelength'] = $folderNameLength; $mig_config['foldersorttype'] = $folderSortType; $mig_config['homelabel'] = $homeLabel; $mig_config['homelink'] = $homeLink; $mig_config['ignoredotdirectories'] = $ignoreDotDirectories; $mig_config['imagepoplocationbar'] = $imagePopLocationBar; $mig_config['imagepopmaxheight'] = $imagePopMaxHeight; $mig_config['imagepopmaxwidth'] = $imagePopMaxWidth; $mig_config['imagepoptoolbar'] = $imagePopToolBar; $mig_config['imagepopup'] = $imagePopup; $mig_config['largesubdir'] = $largeSubdir; $mig_config['nextformatstring'] = $nextFormatString; $mig_config['nothumbs'] = $noThumbs; $mig_config['omitimagename'] = $omitImageName; $mig_config['randomfolderthumbs'] = $randomFolderThumbs; $mig_config['pagetitle'] = $pageTitle; $mig_config['prevformatstring'] = $prevFormatString; $mig_config['showshortonthumbpage'] = $showShortOnThumbPage; $mig_config['sorttype'] = $sortType; $mig_config['suppressalttags'] = $suppressAltTags; $mig_config['suppressimageinfo'] = $suppressImageInfo; $mig_config['thumbext'] = $thumbExt; $mig_config['thumbsubdir'] = $thumbSubdir; $mig_config['uselargeimages'] = $useLargeImages; $mig_config['userealrandthumbs'] = $useRealRandThumbs; $mig_config['usethumbsubdir'] = $useThumbSubdir; $mig_config['viewfoldercount'] = $viewFolderCount; // Change settings for Nuke mode if appropriate if ($phpNukeCompatible) { $mig_config['basedir'] .= '/mig'; if (! $phpNukeRoot) { print "FATAL ERROR: \$phpNukeRoot not defined!\n"; exit; } $result = chdir($phpNukeRoot); if (! $result) { print "FATAL ERROR: can not chdir() to \$phpNukeRoot!\n"; exit; } // Detect PostNuke if it's there if (file_exists('includes/pnAPI.php')) { include('includes/pnAPI.php'); pnInit(); } // or for PhpWebThings... } elseif ($phpWebThingsCompatible) { $mig_config['basedir'] .= '/mig'; if (! $phpWebThingsRoot) { print "FATAL ERROR: \$phpWebThingsRoot not defined!\n"; exit; } $result = chdir($phpWebThingsRoot); if (! $result) { print "FATAL ERROR: can not chdir() to \$phpWebThingsRoot!\n"; exit; } // phpWebThings library if (file_exists('core/main.php')) { include('core/main.php'); } else { print "FATAL ERROR: phpWebThings lib missing!\n"; exit; } // or for XOOPS... } elseif ($mig_xoopsCompatible) { if (! $mig_xoopsRoot) { print "FATAL ERROR: \$mig_xoopsRoot not defined!\n"; exit; } $result = chdir($mig_xoopsRoot); if (! $result) { print "FATAL ERROR: can not chdir() to \$mig_xoopsRoot!\n"; exit; } // XOOPS library if (file_exists('mainfile.php')) { include('mainfile.php'); } else { print "FATAL ERROR: XOOPS lib missing!\n"; exit; } // or for Geeklog... } elseif ($mig_GeeklogCompatible) { if (! $mig_GeeklogRoot) { print "FATAL ERROR: \$mig_GeeklogRoot not defined!\n"; exit; } $result = chdir($mig_GeeklogRoot); if (! $result) { print "FATAL ERROR: can not chdir() to \$mig_GeeklogRoot!\n"; exit; } // Geeklog library if (file_exists('lib-common.php')) { include('lib-common.php'); } else { print "FATAL ERROR: lib-common.php missing!\n"; exit; } } // Jump has to come before currDir redirect to work if (! $jump) { if ($_GET['jump']) { $jump = $_GET['jump']; } elseif ($HTTP_GET_VARS['jump']) { $jump = $HTTP_GET_VARS['jump']; } } if (! $SERVER_NAME) { if ($_SERVER['SERVER_NAME']) { $SERVER_NAME = $_SERVER['SERVER_NAME']; } elseif ($HTTP_SERVER_VARS['SERVER_NAME']) { $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; } } if (! $SERVER_PORT) { if ($_SERVER['SERVER_PORT']) { $SERVER_PORT = $_SERVER['SERVER_PORT']; } elseif ($HTTP_SERVER_VARS['SERVER_PORT']) { $SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT']; } } if (! $SERVER_PORT) { $SERVER_PORT = "80"; } if (! $PATH_INFO) { if ($_SERVER['PATH_INFO']) { $PATH_INFO = $_SERVER['PATH_INFO']; } elseif ($HTTP_SERVER_VARS['PATH_INFO']) { $PATH_INFO = $HTTP_SERVER_VARS['PATH_INFO']; } } // Is this a jump-tag URL? if ($jump && $jumpMap[$jump] && $SERVER_NAME) { header("Location: http://$SERVER_NAME:$SERVER_PORT" . $mig_config['baseurl'] . "?$jumpMap[$jump]"); exit; } // Jump-tag using PATH_INFO rather than "....?jump=x" URI if ($PATH_INFO && $jumpMap[$PATH_INFO] && $SERVER_NAME) { header("Location: http://$SERVER_NAME:$SERVER_PORT" . $mig_config['baseurl'] . "?$jumpMap[$PATH_INFO]"); exit; } //moved this some lines up... need it for checking if the image-file exists. wmk $mig_config['albumdir'] = $mig_config['basedir'] . '/albums'; // Where albums live // If you change the directory here also make sure to change $albumURLroot // Get currDir. If there isn't one, default to "." if ($_GET['currDir']) { $currDir = $_GET['currDir']; } elseif ($HTTP_GET_VARS['currDir']) { $currDir = $HTTP_GET_VARS['currDir']; } elseif (! $currDir) { if ($SERVER_NAME) { header("Location: http://$SERVER_NAME:$SERVER_PORT" . $mig_config['baseurl'] . '?currDir=.'); exit; } } // Look at currDir from a security angle. Don't let folks go outside // the album directory base if (strstr($currDir, '..')) { print 'SECURITY VIOLATION - ABANDON SHIP'; exit; } // Try to validate currDir // Must be either "." (root) or, // must begin with "./" and dot or slash can't follow that // for at least two positions. // if ( $currDir != '.' && ! ereg('^./[^/][^/]*', $currDir) ) { print 'ERROR: \$currDir is invalid. Exiting.'; exit; } // currDir may not end in / unless it is './' in its entirety if ( $currDir != './' && ereg('/$', $currDir) ) { print "ERROR: \$currDir is invalid. Exiting."; exit; } // Strip URL encoding $currDir = rawurldecode($currDir); // Get image, if there is one. if (! $image) { if ($_GET['image']) { $image = $_GET['image']; } elseif ($HTTP_GET_VARS['image']) { $image = $HTTP_GET_VARS['image']; } } $mig_config['image'] = $image; // check if the image exists... if (($mig_config['image'])AND(!file_exists($mig_config['albumdir']."/$currDir/".$mig_config['image']))){ echo "ERROR: ".$currDir."/".$mig_config['image']." is invalid. Exiting."; exit; } // Get pageType. If there isn't one, default to "folder" if (! $pageType) { if ($_GET['pageType']) { $pageType = $_GET['pageType']; } elseif ($HTTP_GET_VARS['pageType']) { $pageType = $HTTP_GET_VARS['pageType']; } else { $pageType = 'folder'; } } $mig_config['pagetype'] = $pageType; if (! $startFrom) { if ($_GET['startFrom']) { $startFrom = $_GET['startFrom']; } elseif ($HTTP_GET_VARS['startFrom']) { $startFrom = $HTTP_GET_VARS['startFrom']; } } $mig_config['startfrom'] = $startFrom; // use language set specified in URL, if one was. if (! $mig_dl) { if ($_GET['mig_dl']) { $mig_dl = $_GET['mig_dl']; } elseif ($HTTP_GET_VARS['mig_dl']) { $mig_dl = $HTTP_GET_VARS['mig_dl']; } } // Only use it if we find it - otherwise fall back to default language if ($mig_dl && $mig_config['lang_lib'][$mig_dl]) { $mig_language = $mig_dl; } else { unset ($mig_dl); // destroy it so it isn't used in URLs } $mig_config['mig_dl'] = $mig_dl; // Grab appropriate language from library $mig_config['lang'] = $mig_config['lang_lib'][$mig_language]; // Backward compatibility with older config.php/mig.cfg versions if ($maxColumns) { $maxThumbColumns = $maxColumns; } // Get rid of \'s if magic_quotes_gpc is turned on (causes problems). if (get_magic_quotes_gpc() == 1) { $currDir = stripslashes($currDir); if ($mig_config['image']) { $mig_config['image'] = stripslashes($mig_config['image']); } } // Turn off magic_quotes_runtime (causes trouble with some installations) set_magic_quotes_runtime(0); // // Handle any password authentication needs // $workCopy = $currDir; // temporary copy of currDir while ($workCopy) { if ($protect[$workCopy]) { if (! $PHP_AUTH_USER) { if ($_SERVER['PHP_AUTH_USER']) { $PHP_AUTH_USER = $_SERVER['PHP_AUTH_USER']; } elseif ($HTTP_SERVER_VARS['PHP_AUTH_USER']) { $PHP_AUTH_USER = $HTTP_SERVER_VARS['PHP_AUTH_USER']; } } if (! $PHP_AUTH_PW) { if ($_SERVER['PHP_AUTH_PW']) { $PHP_AUTH_PW = $_SERVER['PHP_AUTH_PW']; } elseif ($HTTP_SERVER_VARS['PHP_AUTH_PW']) { $PHP_AUTH_PW = $HTTP_SERVER_VARS['PHP_AUTH_PW']; } } // If there's not a username yet, fetch one by popping up a // login dialog box if (! $PHP_AUTH_USER) { header('WWW-Authenticate: Basic realm="protected"'); header('HTTP/1.0 401 Unauthorized'); print $mig_config['lang']['must_auth']; exit; } else { // Case #2: password/user are present but don't match up // with our known user base. Reject the attempt. if ( crypt($PHP_AUTH_PW, substr($protect[$workCopy][$PHP_AUTH_USER],0,2)) != $protect[$workCopy][$PHP_AUTH_USER] ) { header('WWW-Authenticate: Basic realm="protected"'); header('HTTP/1.0 401 Unauthorized'); print $mig_config['lang']['must_auth']; exit; } } break; // Since we had a match let's stop this loop } // if $workCopy is already down to "." just nullify to end loop if ($workCopy == '.') { $workCopy = FALSE; } else { // pare $workCopy down one directory at a time // so we can check back all the way to "." $workCopy = ereg_replace('/[^/]+$', '', $workCopy); } } // Where templates live $mig_config['templatedir'] = $mig_config['basedir'] . '/templates'; // baseURL with the scriptname torn off the end $baseHref = ereg_replace('/[^/]+$', '', $mig_config['baseurl']); // Adjust for Nuke mode if appropriate if ($phpNukeCompatible || $phpWebThingsCompatible) { $baseHref .= '/mig'; } // Location of image library (for instance, where icons are kept) $mig_config['imagedir'] = $baseHref . '/images'; // Root where album images are living $mig_config['albumurlroot'] = $baseHref . '/albums'; // NOTE: Sometimes Windows users have to set this manually, like: // $mig_config['albumurlroot'] = '/mig/albums'; // Well, GIGO... set default to sane if someone screws up their // config file if ($markerType != 'prefix' && $markerType != 'suffix' ) { $markerType = 'suffix'; } $mig_config['markertype'] = $markerType; if (! $markerLabel) { $markerLabel = 'th'; } $mig_config['markerlabel'] = $markerLabel; // Override folder sort if one's not present if (! $mig_config['foldersorttype']) { $mig_config['foldersorttype'] = $mig_config['sorttype']; } // Fetch mig.cf information list($presort_dir, $presort_img, $desc, $short_desc, $bulletin, $ficons, $folderTemplate, $folderFolderCols, $folderThumbCols, $folderThumbRows, $folderMaintAddr) = parseMigCf($mig_config['albumdir']."/$currDir"); // Set per-folder $maintAddr if one was defined if ($folderMaintAddr) { $maintAddr = $folderMaintAddr; } // Is this a phpNuke compatible site? if ($phpNukeCompatible) { if (! isset($mainfile)) { include('mainfile.php'); } include('header.php'); // A table to nest Mig in, inside the PHPNuke framework print '
' . '
'; // Is this a phpWebThings site? } elseif ($phpWebThingsCompatible) { draw_header(); if (function_exists('theme_draw_center_box_open')) { theme_draw_center_box_open($mig_config['pagetitle']); } elseif (function_exists('theme_draw_box_open')) { theme_draw_box_open($mig_config['pagetitle']); } else { print 'ERROR: Unable to find relevant drawing function'; exit; } // Is this a XOOPS site? } elseif ($mig_xoopsCompatible) { include(XOOPS_ROOT_PATH.'/header.php'); // is this a Geeklog site? } elseif ($mig_GeeklogCompatible) { echo COM_siteHeader ('menu'); } // strip URL encoding here too $mig_config['image'] = rawurldecode($mig_config['image']); // if pageType is "folder") generate a folder view if ($mig_config['pagetype'] == 'folder') { // Determine which template to use if ($folderTemplate) { $templateFile = $folderTemplate; } elseif ($usePortal) { // portal is in use $templateFile = $mig_config['templatedir'] . '/mig_folder.php'; } else { $templateFile = $mig_config['templatedir'] . '/folder.html'; } // Determine columns and rows to use if ($folderFolderCols) { $maxFolderColumns = $folderFolderCols; } if ($folderThumbCols) { $maxThumbColumns = $folderThumbCols; } // Generate some HTML to pass to the template printer // list of available folders $folderList = buildDirList($currDir, $maxFolderColumns, $presort_dir, $ficons); // list of available images $imageList = buildImageList($currDir, $maxThumbColumns, $maxThumbRows, $folderList, $presort_img, $desc, $short_desc); // Only frame the lists in table code when appropriate // Set style of table, either with text or thumbnails if ($mig_config['randomfolderthumbs']) { $folderTableClass = 'folderthumbs'; } else { $folderTableClass = 'foldertext'; } // no folders or images - print the "no contents" line if ($folderList == 'NULL' && $imageList == 'NULL') { $folderList = $mig_config['lang']['no_contents']; $tablesummary = 'Folders Frame'; $folderList = buildTable($folderList, $folderTableClass, $tablesummary); $imageList = ''; // images, no folders. Frame the imagelist in a table } elseif ($folderList == 'NULL' && $imageList != 'NULL') { $folderList = ''; $tablesummary = 'Images Frame'; $tableclass = 'image'; $imageList = buildTable($imageList, $tableclass, $tablesummary); // folders but no images. Frame the folderlist in a table } elseif ($imageList == 'NULL' && $folderList != 'NULL') { $imageList = ''; $tablesummary = 'Folders Frame'; $folderList = buildTable($folderList, $folderTableClass, $tablesummary); // We have folders and we have images, so frame both in tables. } else { $tablesummary = 'Folders Frame'; $folderList = buildTable($folderList, $folderTableClass, $tablesummary); $tablesummary = 'Images Frame'; $tableclass = 'image'; $imageList = buildTable($imageList, $tableclass, $tablesummary); } // We have a bulletin if ($bulletin != '') { $tablesummary = 'Bulletin Frame" width="60%'; //<--- kludge for now $tableclass = 'desc'; $bulletin = '
' . $bulletin . '
'; $bulletin = buildTable($bulletin, $tableclass, $tablesummary); } // build the "back" link $backLink = buildBackLink($currDir, 'back', ''); // build the "you are here" line $youAreHere = buildYouAreHere($currDir, '', $mig_config['omitimagename']); // newcurrdir is currdir without the leading "./" $newCurrDir = getNewCurrDir($currDir); // parse the template file and print to stdout printTemplate($templateFile, $version, $maintAddr, $folderList, $imageList, $backLink, '', $newCurrDir, '', '', '', $bulletin, $youAreHere, $distURL, $pathConvertFlag, $pathConvertRegex, $pathConvertTarget, '', '', '', ''); // If pageType is "image", show an image } elseif ($mig_config['pagetype'] == 'image') { // Trick back link into going to the right place by adding // a bogus directory at the end $backLink = buildBackLink("$currDir/blah", 'up'); // Get the "next image" and "previous image" links, and the current // position (#x of y) $Links = array (); $Links = buildNextPrevLinks($currDir, $presort_img); list($nextLink, $prevLink, $currPos) = $Links; // Get image description if ($mig_config['commentfileperimage']) { list($x, $description) = getImageDescFromFile($currDir); // If getImageDescFromFile() returned false, get the normal // comment if there is one. if (! $description) { list($x, $description) = getImageDescription($image, $desc, $short_desc); } } else { list($x, $description) = getImageDescription($image, $desc, $short_desc); } $exifDescription = getExifDescription($currDir, $exifFormatString); // If there's a description but no exifDescription, just make the // exifDescription the description if ($exifDescription && ! $description) { $description = $exifDescription; unset($exifDescription); } // If both descriptions are non-NULL, separate them with an
if ($description && $exifDescription) { $description .= '
'; $description .= $exifDescription; } // If there's a description at all, frame it in a table. if ($description != '') { $tablesummary = 'Description Frame" width="60%'; //<-- kludge for now $tableclass = 'desc'; $description = '
' . $description . '
'; $description = buildTable($description, $tableclass, $tablesummary); } // Build the "you are here" line $youAreHere = buildYouAreHere($currDir, $mig_config['omitimagename']); // Which template to use. if ($usePortal) { // portal is in use $templateFile = $mig_config['templatedir'] . '/mig_image.php'; } else { $templateFile = $mig_config['templatedir'] . '/image.html'; } // newcurrdir is currdir without the leading "./" $newCurrDir = getNewCurrDir($currDir); if ($mig_config['uselargeimages'] && file_exists($mig_config['albumdir']."/$currDir/" . $mig_config['largesubdir'] . '/'.$mig_config['image'])) { $largeLink = buildLargeLink($currDir); // Only build this link if we plan to use it if ($largeLinkFromMedium) { $largeHrefStart = buildLargeHrefStart($currDir); $largeHrefEnd = ''; } // Use a border? if (! $largeLinkUseBorders) { $largeLinkBorder = ' border="0"'; } } // Send it all to the template printer to dump to stdout printTemplate($templateFile, $version, $maintAddr, '', '', $backLink, $currDir, $newCurrDir, $prevLink, $nextLink, $currPos, $description, $youAreHere, $distURL, $pathConvertFlag, $pathConvertRegex, $pathConvertTarget, $largeLink, $largeHrefStart, $largeHrefEnd, $largeLinkBorder); // If the pageType is "large", show a large image } elseif ($mig_config['pagetype'] == 'large') { // Trick the back link into going to the right place by adding // a bogus directory at the end $backLink = buildBackLink("$currDir/blah", 'up', '', ''); // Get the "next image" and "previous image" links, and the current // position (#x of y) $Links = array (); $Links = buildNextPrevLinks($currDir, $presort_img); list($nextLink, $prevLink, $currPos) = $Links; // Get image description if ($mig_config['commentfileperimage']) { list($x, $description) = getImageDescFromFile($currDir); // If getImageDescFromFile() returned false, get the normal // comment if there is one. if (! $description) { list($x, $description) = getImageDescription($image, $desc,$short_desc); } } else { list($x, $description) = getImageDescription($image, $desc,$short_desc); } $exifDescription = getExifDescription($currDir,$exifFormatString); // If there's a description but no exifDescription, just make the // exifDescription the description if ($exifDescription && ! $description) { $description = $exifDescription; unset($exifDescription); } // If both descriptions are non-NULL, separate them with an
if ($description && $exifDescription) { $description .= '
'; $description .= $exifDescription; } // If there's a description at all, frame it in a table. if ($description != '') { $tablesummary = 'Description Frame" width="60%'; //<-- kludge for now $tableclass = 'desc'; $description = '
' . $description . '
'; $description = buildTable($description, $tableclass, $tablesummary); } // Build the "you are here" line $youAreHere = buildYouAreHere($currDir, $mig_config['omitimagename']); // Which template to use if ($usePortal) { // portal is in use $templateFile = $mig_config['templatedir'] . '/mig_large.php'; } else { $templateFile = $mig_config['templatedir'] . '/large.html'; } // newcurrdir is currdir without the leading "./" $newCurrDir = getNewCurrDir($currDir); // Send it all to the template printer to dump to stdout printTemplate($templateFile, $version, $maintAddr, '', '', $backLink, $currDir, $newCurrDir, $prevLink, $nextLink, $currPos, $description, $youAreHere, $distURL, $pathConvertFlag, $pathConvertRegex, $pathConvertTarget, '', '', '', ''); } // Finish up for content management systems if ($phpNukeCompatible) { print '
'; include('footer.php'); } elseif ($phpWebThingsCompatible) { if (function_exists('theme_draw_center_box_close')) { theme_draw_center_box_close(); } elseif (function_exists('theme_draw_box_close')) { theme_draw_box_close(); } else { print 'Unable to find relevant drawing function'; exit; } //if($modules['news']) draw_news(true); //draw_news(true); draw_footer(); } elseif ($mig_xoopsCompatible) { if ($mig_config['pagetype'] == 'image') { $xoopsOption['show_rblock'] = $mig_xoopsRBlockForImage; } else { $xoopsOption['show_rblock'] = $mig_xoopsRBlockForFolder; } include(XOOPS_ROOT_PATH.'/footer.php'); } elseif ($mig_GeeklogCompatible) { if ($mig_config['pagetype'] == 'folder') { echo COM_siteFooter($mig_GeeklogRBlockForFolder); } else { echo COM_siteFooter($mig_GeeklogRBlockForImage); } } include_once 'replacePngTags.php'; echo replacePngTags(ob_get_clean()); ?>