= 2) { if (preg_match('/(.*)x(.*)/i', $argv[1], $match)) { $width = intval($match[1]); $height = intval($match[2]); } } if ($argc >= 3) { if (preg_match('/(.*)x(.*)/i', $argv[2], $match)) { $pwidth = intval($match[1]); $pheight = intval($match[2]); } } if ($argc >= 4) { $zoom = intval($argv[3]); } if ($width <= 0) { $width = JPHOTO_SCREENWIDTH; } if ($height <= 0) { $height = JPHOTO_SCREENHEIGHT; } if ($pwidth <= 0) { $pwidth = JPHOTO_WIDTH; } if ($pheight <= 0) { $pheight = JPHOTO_HEIGHT; } if ($zoom <= 100) { $zoom = JPHOTO_ZOOMRATIO; } $version = '6,0,0,0'; $classid = 'D27CDB6E-AE6D-11cf-96B8-444553540000'; $bgcolor = '#FFFFFF'; $quality = 'high'; $swf = SKIN_DIR . 'jphoto3p.swf'; $id = 'jphoto'; $wmode = 'opaque'; $config = 'pThumbnailWidth=' . $pwidth; $config .= '&pThumbnailHeight=' . $pheight; $config .= '&pThumbnailSparse=' . JPHOTO_SPARSE; $config .= '&pThumbnailZoomRatio=' . $zoom; $config .= '&pBorderLineColor=' . JPHOTO_BORDERCOLOR; $config .= '&pBackgroundColor=' . JPHOTO_BGCOLOR; $config .= '&pXoffset=' . JPHOTO_XOFFSET; $config .= '&pYoffset=' . JPHOTO_YOFFSET; $config .= '&pScaleUpStep=' . JPHOTO_SCALEUPSTEP; $config .= '&pScaleDownStep=' . JPHOTO_SCALEDNSTEP; $config .= '&pShadowDistance=' . JPHOTO_SHADOWDISTANCE; $photo3 = ''; $dir = opendir(UPLOAD_DIR); $page_pattern = ($page == '') ? '(?:[0-9A-F]{2})+' : preg_quote(encode($page), '/'); $age_pattern = '(?:\.([0-9]+))?'; $pattern = "/^({$page_pattern})_((?:[0-9A-F]{2})+){$age_pattern}$/"; $matches = array(); $dx = intval($pwidth * ($zoom/200) + JPHOTO_SPARSE); $dy = intval($pheight * ($zoom/200) + JPHOTO_SPARSE); $x = $dx; $y = $dy; while ($file = readdir($dir)) { if (! preg_match($pattern, $file, $matches)) continue; $_page = decode($matches[1]); $_file = decode($matches[2]); $_age = isset($matches[3]) ? $matches[3] : 0; if (! preg_match(JPHOTO_REF_IMAGE, $_file)) continue; $line = $script . '?plugin=ref&page=' . $_page . '&src=' . $_file; $photo3 .= $line . ',' . $line . ',' . $x . ',' . $y . "\n"; $x += $pwidth + JPHOTO_SPARSE; if ($x + $dx >= $width) { $x = $dx; $y += $pheight + JPHOTO_SPARSE; } } closedir($dir); if ($x == $dx && $y != $dy) { $y -= $pheight + JPHOTO_SPARSE; } if (($y + $dy) >= $height) { $height = $y + $dy; } $photo3 = str_replace("\n", ";", $photo3); $photo3 = rawurlencode($photo3); $config .= '&pPhotos=' . $photo3; $width = 'width="'. $width . '"'; $height = 'height="'. $height . '"'; // IE's Bug? umm... if (UA_NAME == 'MSIE') { return << Error: Flash Player Cannot Installed. EOD; } return << Error: Flash Player Cannot Installed. EOD; } ?>