Example #1
0
        foreach ($array as $k => $v) {
            $nArray[$i] = $v;
            $i++;
        }
        return $nArray;
    }
}
$serverhost = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
$isAjaxZoomCom = strpos($serverhost, 'ajax-zoom.com');
if (!isset($_SESSION['referer']) && isset($_SERVER['HTTP_REFERER'])) {
    $_SESSION['referer'] = $_SERVER['HTTP_REFERER'];
}
$prevFile = false;
$nextFile = false;
$filesExamples = scandir(dirname(__FILE__));
$filesExamples = natIndex($filesExamples, false);
$arrayExamples = array();
$currentExample = basename($_SERVER['PHP_SELF']);
$currentIndex = 0;
$n = 0;
if (!empty($filesExamples)) {
    foreach ($filesExamples as $k => $file) {
        $baseName = basename($file);
        if (!stristr($baseName, 'vario')) {
            if (strstr($file, 'example') && strstr($file, '.php')) {
                $n++;
                $arrayExamples[$n] = $baseName;
                if ($currentExample == $baseName) {
                    $currentIndex = $n;
                }
            }
Example #2
0
        /pic/zoomVR/nike/60, /pic/zoomVR/nike/75, /pic/zoomVR/nike/90; 
        It is not important how these subfolders are named (e.g. it could be row1, row2 ...) and you also do not need to define these subfolder names anywhere. 
        AJAX-ZOOM will instantly detect them and process all the images in them. For more info and visualization of the 
        file structure see example28.php <br><br>
        ';
    echo "<h3>Batch processing images</h3>";
    echo "AJAX-ZOOM is designed to create all needed images like thumbs and tiles on-the-fly. \r\n        However if you have thousands of images it is a good idea to batch process all existing images planned to be shown over AJAX-ZOOM before launching it. \r\n        This can be done in <a href='axZm/zoomBatch.php'>/axZm/zoomBatch.php</a>; in order to access this file you will need to open it with \r\n        an editor and set your personal password in it.\r\n        ";
    echo "<br><br>\r\n        <div style='text-align: right;'>Have fun with AJAX-ZOOM.</div>";
}
echo '</div>';
echo '<div id="rightColumn">';
echo "<h1>Local Examples</h1>";
echo "<p>Local examples do not contain high-resolution images. \r\n        Please find these and other examples with high-resolution images at <br>" . makeLink('http://www.ajax-zoom.com/index.php?cid=examples') . " \r\n    </p>\r\n    ";
echo "<div class='clearfix' style='margin-right: -6px'>\r\n    ";
$files = scandir('examples');
$files = natIndex($files, false);
$prevNum = '';
$num = '';
$n = 0;
if (!empty($files)) {
    foreach (array_reverse($files, true) as $k => $file) {
        if (strstr($file, 'example') && strstr($file, 'php')) {
            if ($num) {
                $prevNum = $num;
            }
            $num = intval(str_replace(array('example', '.php'), '', basename($file)));
            $n++;
            $bbb = explode('_', basename($file), 2);
            if (isset($bbb[1])) {
                $bbb[1] = str_replace('.php', '', $bbb[1]);
            }
Example #3
0
         return imagecreatefromjpeg($fPath);
     } elseif ($fileType == 'png') {
         return imagecreatefrompng($fPath);
     } elseif ($fileType == 'gif') {
         return imagecreatefromgif($fPath);
     } elseif ($fileType == 'bmp') {
         return imagecreatefromwbmp($fPath);
     }
 }
 function getl($char, $str)
 {
     $pos = strrpos($str, $char);
     $ext = substr($str, $pos + 1);
     return $ext;
 }
 $framesArray = natIndex($framesArray);
 $framesCount = count($framesArray);
 if ($framesCount < 4) {
     exit(0);
 }
 $period = round($sTurn * 100 / $framesCount);
 foreach ($framesArray as $k => $dat) {
     $orgImgSize = getimagesize($prod3D . "/{$dat}");
     $sw = $orgImgSize[0];
     $sh = $orgImgSize[1];
     $target_preview = $target3D_preview . '/' . $dat;
     $target_thumb = $target3D_thumb . '/' . $dat;
     $frames_preview[] = $target_preview;
     $framed_preview[] = $period;
     $frames_thumb[] = $target_thumb;
     $framed_thumb[] = $period;