<?php
// INCLUDE PATH
set_include_path(
'library' . PATH_SEPARATOR .
get_include_path());
// PIPHO VALUES
define('PIPHO_PHOTOS_FOLDER', 'photos');
define('PIPHO_FORCE_WRITE', false);
define('PIPHO_SLIDE_RESIZE_ENABLED', true);
define('PIPHO_SORT_GALLERIES_ENABLED', true);
define('PIPHO_SORT_GALLERIES_SORT_TYPE', SORT_REGULAR);
define('PIPHO_SORT_GALLERIES_REVERSE', false);
define('PIPHO_SORT_IMAGES_ENABLED', true);
define('PIPHO_SORT_IMAGES_SORT_TYPE', SORT_REGULAR);
define('PIPHO_SORT_IMAGES_REVERSE', false);
require_once 'Pipho/DeviceInfo.php';
require_once 'Pipho/FileManager.php';
$gallery_id = isset( $_GET['gallery_id']) ? $_GET['gallery_id'] : 'test';
$device_info = Pipho_DeviceInfo::getDeviceInfo();
try
{
$pipho = new Pipho_FileManager( $device_info, PIPHO_PHOTOS_FOLDER, PIPHO_FORCE_WRITE);
$pipho->init();
$gallery = $pipho->getGallery( $gallery_id);
$images = $pipho->getGalleryImages( $gallery_id);
}
catch (Exception $e)
{
die( $e->getMessage());
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<title>Jaipho - iPhone optimized javascript gallery</title>
<!--
JAIPHO - iPhone optimized javascript gallery
Check on http://www.jaipho.com/ for latest news and source updates
-->
<link href="jaipho/jaipho.css" rel="stylesheet" type="text/css"/>
<script src="jaipho/jaipho-0.52.01-src.js" type="text/javascript"></script>
</head>
<body>
<!--
Important!
Do not remove elements with html attribute id set to some value. Those elements are required by javascript application.
All other can be customized as required by project needs.
-->
<!-- THUMBNAILS -->
<div class="toolbar" id="thumbs-toolbar-top">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="wing">
<!--
<a class="button" href="">
Back
</a>
-->
</td>
<td class="center">
<?= $gallery->title ?>
</td>
<td class="wing"></td>
</tr>
</table>
</div>
<div id="thumbs-container">
<div id="thumbs-images-container">
</div>
<div id="thumbs-count-text">
</div>
</div>
<!-- SLIDER -->
<div id="slider-overlay">
<div class="toolbar" id="slider-toolbar-top">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="wing">
<a class="button" href="javascript: app.ShowThumbsAction();">
Thumbnails
</a>
</td>
<td class="center" id="navi-info">
</td>
<td class="wing"> </td>
</tr>
</table>
</div>
<div class="toolbar" id="slider-toolbar-bottom">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<a class="navi-button" id="navi-prev" href="javascript: void(0);">
<img src="jaipho/navPrev.png"/>
</a>
</td>
<td style="width: 80px;">
<a class="navi-button" id="navi-play" href="javascript: void(0);">
<img src="jaipho/navPlay.png"/>
</a>
<a class="navi-button" id="navi-pause" href="javascript: void(0);">
<img src="jaipho/navPause.png"/>
</a>
</td>
<td>
<a class="navi-button" id="navi-next" href="javascript: void(0);">
<img src="jaipho/navNext.png"/>
</a>
</td>
</tr>
</table>
</div>
</div>
<div id="slider-container">
</div>
<script type="text/javascript">
// CONFIGURATION BLOCK
// v 1.02
// basic parameters
var TOOLBARS_HIDE_TIMEOUT = 4000;
var SLIDESHOW_ROLL_TIMEOUT = 4000;
var SLIDE_SCROLL_DURATION = '1.0s';
var SLIDE_PRELOAD_TIMEOUT = 1100;
var SLIDE_PRELOAD_SEQUENCE = '1,-1,2';
// advanced parameters
var ENABLE_SAFARI_HISTORY_PATCH = true;
var MAX_CONCURENT_LOADING_THUMBNAILS = 4;
var MAX_CONCURENT_LOADING_SLIDE = 1;
var MIN_DISTANCE_TO_BE_A_DRAG = 50;
var MAX_DISTANCE_TO_BE_A_TOUCH = 5;
var CHECK_ORIENTATION_INTERVAL = 1000;
var BLOCK_VERTICAL_SCROLL = true;
var BASE_URL = 'jaipho/';
var SLIDE_MAX_IMAGE_ELEMENS = 50;
// debug parameters
var DEBUG_MODE = false;
var DEBUG_LEVELS = 'preload2';
// load images
var dao = new Jph_Dao();
<?php
foreach ($images as $image)
{
echo $image->getJsReadImage();
}
?>
var app = new Jph_Application( dao);
app.Init();
app.Run();
</script>
</body>
</html>