=')) { die("You need at least PHP 5.2 to use this application."); } if (!extension_loaded('pdo_sqlite')) { die("You need PHP PDO SQLite extension to use this application."); } error_reporting(E_ALL); require 'class.fotoo.php'; require 'functions.php'; // Against bad configurations if (get_magic_quotes_gpc()) { foreach ($_GET as $k=>$v) { $_GET[$k] = stripslashes($v); } } if (file_exists(dirname(__FILE__) . '/user_config.php')) { require dirname(__FILE__) . '/user_config.php'; } if (!function_exists('__')) { function __($str, $mode=false, $datas=false) { if ($mode == 'TIME') return strftime($str, $time); elseif ($mode == 'REPLACE') return strtr($str, $datas); else return $str; } } if (!defined('BASE_DIR')) define('BASE_DIR', dirname(__FILE__)); if (!defined('CACHE_DIR')) define('CACHE_DIR', BASE_DIR . '/cache'); if (!defined('BASE_URL')) define('BASE_URL', 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']).'/'); if (!defined('SELF_URL')) define('SELF_URL', BASE_URL . (basename($_SERVER['SCRIPT_NAME']) == 'index.php' ? '' : basename($_SERVER['SCRIPT_NAME']))); if (!defined('GEN_SMALL')) define('GEN_SMALL', 0); if (!defined('MAX_IMAGE_SIZE')) define('MAX_IMAGE_SIZE', 2048); if (!defined('SMALL_IMAGE_SIZE')) define('SMALL_IMAGE_SIZE', 600); if (!defined('GALLERY_TITLE')) define('GALLERY_TITLE', __('My pictures')); if (!defined('ALLOW_EMBED')) define('ALLOW_EMBED', true); if (!isset($f) || !($f instanceOf fotooManager)) $f = new fotooManager; $mode = false; if (isset($_GET['update_js'])) { header('Content-Type: text/javascript'); require 'update.js'; exit; } if (isset($_GET['feed'])) { $last = $f->getNewPhotos(20); $last_update = $last[0]['time']; header('Content-Type: text/xml'); echo ' '.GALLERY_TITLE.' Last pictures added in "'.GALLERY_TITLE.'" '.SELF_URL.' '.date(DATE_W3C, $last_update).' daily 1 '.date(DATE_W3C, $last_update).' '; foreach ($last as &$photo) { echo ' '; } echo ' '; foreach ($last as &$photo) { if (file_exists($f->getSmallPath($photo['hash']))) $small_url = get_url('cache_small', $photo); else $small_url = get_url('cache_thumb', $photo); $content = '

' . ''.escape($photo['filename']).'

' . '

'.$f->formatText($photo['comment']).'

'; $title = $photo['path'] ? strtr($photo['path'] . '/' . $photo['filename'], array('/' => ' / ', '_' => ' ')) : $photo['filename']; $title = preg_replace('!\.[a-z]+$!i', '', $title); echo ' '.escape($title).' '.get_url('image', $photo).' '.date(DATE_W3C, $photo['time']).' '.escape($content).' '.escape($photo['filename']).' '; } echo '
'; exit; } if (isset($_GET['style_css'])) { header('Content-Type: text/css'); $img_home = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAgVBMVEX%2F%2F%2F%2F%2B%2Ffr%2F%2F%2F%2Fx5svn06W%2FrYL06tPw48T69%2B769er17drv4sH%2B%2Fv39%2Bvb48uT2793s27SzoXn38ODq163r163q2Kzp2Kzz6dLz6M%2Fv4sP38eHu4L748eLz6dHt3Lfs3Ljw4sPu4L3s3Lfy6M%2Ft3bhmXEXMuIv%2FgICdjmvMAAD8%2BfNB06UXAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfUDB4RJBdfkpQSAAAAfElEQVR42o3MyRKCQAxF0WaeZwFRAQdId%2Fj%2FDzQNVEpc8Xb3VCVCbJNSHCYR5V8fhNq2f4S6qS41C3X%2BHqch34X6HnWe94xemyCCdW1dt%2F9YgLjeQJiVj1uZhbA%2FhTRQtCBl8Bc1z2rxGRJDg5EwxKYGM2ZwCv2jcECc2ReExg8II8b%2F0AAAAABJRU5ErkJggg%3D%3D'; $img_tag = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAAE3RFWHRBdXRob3IATWF1cmljZSBTdmF52MWWvwAAAaNJREFUeNrEU7FOAkEQnb2QGBIRKS38E402BgtCIXaCDedhDJY0Wml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rP50xP5uwf6Az%2F57yv49m%2F9YuP1tv%2F40k%2F9Yr%2F9Pqf9htf9zxf55yP5nu%2F9fvf13x%2F5luv5Bpf2Nw%2F8zk%2F%2F%2F%2F%2F9%2Bzf4NgFg2AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfUDB4RJAzV913%2BAAAAx0lEQVR42o2P1RaCUBBFAQEFCwU7ELu7u7tbGP7%2FN7zWu%2Fvt7DWz1jkYhtAQOkXRERrsi4HyOIbqtkoZPlleVwJXl7TJ10zy%2B54656wugLSZ44OvL8ITsKoSAJ2M6EsEEqyjp7aNZTp11zMzFgllqa6MAKA9Mnun8hKxxq1PA3SZcTGzQ8KXmJ7MIwAx2xKiPiTw%2BnzR0QLYHoLXjSNBUhcOZQC71%2BIn38VM%2FES0DewhS1P%2BVg2G485Dwe2Xf2NIHI1jcRL7iycAMB5ogC93MwAAAABJRU5ErkJggg%3D%3D'; if (isset($_GET['style_css'])) { echo <<addInfos($_GET['updateFile'], $_GET['updateDir']); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header('Content-Type: image/gif'); echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="); exit; } if (isset($_GET['index_all'])) { if (!isset($_SESSION)) { session_start(); if (!isset($_SESSION['processed'])) $_SESSION['processed'] = array(); if ($_GET['index_all'] == 'done') { $_SESSION = array(); session_destroy(); session_write_close(); setcookie(session_name(), '', time() - 3600); } } if ($_GET['index_all'] != 'done') { define('TIMER_START', time()); function update_dir($dir) { global $f; // Let's start again if timer seems too late, because processing a lot of // directories could be very slow if ((time() - TIMER_START) >= (ini_get('max_execution_time') - 5)) { header('Location: '.SELF_URL.'?index_all='.time()); exit; } if (in_array($dir, $_SESSION['processed'])) $dont_check = true; else $dont_check = false; $pics = $dirs = $update = $desc = false; $list = $f->getDirectory($dir, $dont_check); $_SESSION['processed'][] = $dir; if (empty($list)) return false; else list($dirs, $pics, $update, $desc) = $list; if (!empty($update)) { return array($dir, $update); } foreach ($dirs as $subdir) { $subdir = (!empty($dir) ? $dir . '/' : '') . $subdir; $res = update_dir($subdir); if ($res) return $res; } return false; } $res = update_dir(''); if (!$res) { header('Location: '.SELF_URL.'?index_all=done'); exit; } } else { $res = false; } echo ''; if ($res) { list($dir, $update_list) = $res; echo "\n" .''; } echo '

'; if ($res) { echo ' '.__('Updating').'
... '.$dir; } else { echo ''.__('Update done.').''; } echo '

'; exit; } // For cache force url if (!empty($_GET['r'])) { unset($_GET['r']); $_SERVER['QUERY_STRING'] = ''; } // Small image redirect if (!empty($_GET['i']) && preg_match('!^(.*)(?:/?([^/]+)[_.](jpe?g))?$!Ui', $_GET['i'], $match)) { $selected_dir = fotooManager::getValidDirectory($match[1]); $selected_file = $match[2] . '.' . $match[3]; $pic = $f->getInfos($selected_file, $selected_dir); header('Content-Type: ', true); if (!is_array($pic)) { header('HTTP/1.1 404 Not Found', true, 404); exit; } $orig_url = get_url('real_image', $pic); if ($pic['width'] <= SMALL_IMAGE_SIZE && $pic['height'] <= SMALL_IMAGE_SIZE) { $small_url = $orig_url; } elseif (file_exists($f->getSmallPath($pic['hash']))) { $small_url = get_url('cache_small', $pic); } else { $small_url = false; } header('HTTP/1.1 302 Found', true, 302); header('Location: '.($small_url ? $small_url : $orig_url)); exit; } // Get which display mode is asked elseif (isset($_GET['date']) || isset($_GET['timeline'])) { $day = $year = $month = $date = false; if (!empty($_GET['date']) && preg_match('!^[0-9]{4}(/[0-9]{2}){0,2}$!', $_GET['date'])) $date = explode('/', $_GET['date']); if (!empty($date[0])) $year = $date[0]; if (!empty($date[1])) $month = $date[1]; if (!empty($date[2])) $day = $date[2]; if ($day) $title = __('Pictures for %A %d %B %Y', 'TIME', strtotime($_GET['date'])); elseif ($month) $title = __('Pictures for %B %Y', 'TIME', strtotime($_GET['date'].'/01')); elseif ($year) $title = __('Pictures for %Y', 'REPLACE', array('%Y' => $year)); else $title = __('Pictures by date'); $mode = 'date'; } elseif (isset($_GET['tags'])) { $title = __('Pictures by tag'); $mode = 'tags'; } elseif (isset($_GET['slideshow']) || isset($_GET['embed'])) { $mode = isset($_GET['embed']) ? 'embed' : 'slideshow'; $title = __('Slideshow'); if (!empty($_GET['tag'])) { $selected_tag = explode('/', $_GET['tag']); $current_index = isset($selected_tag[1]) ? (int) $selected_tag[1] : 1; $selected_tag = $f->getTagId($selected_tag[0]); } else { $src = isset($_GET['embed']) ? $_GET['embed'] : $_GET['slideshow']; $selected_file = basename($src); if (preg_match('!\.jpe?g$!i', $selected_file)) { $selected_dir = fotooManager::getValidDirectory(dirname($src)); } else { $selected_dir = fotooManager::getValidDirectory($src); $selected_file = false; } } } elseif (!empty($_GET['tag'])) { $mode = 'tag'; $tag = $f->getTagId($_GET['tag']); $tag_name = $f->getTagNameFromId($tag); $title = __('Pictures in tag %TAG', 'REPLACE', array('%TAG' => $tag_name)); } else { $mode = 'dir'; $title = false; if (isset($_GET['cleanUpdate'])) { $cleanUpdate = true; unset($_GET['cleanUpdate']); $_SERVER['QUERY_STRING'] = ''; } if (!empty($_SERVER['QUERY_STRING']) && preg_match('!^(.*)(?:/?([^/]+)[_.](jpe?g))?$!Ui', urldecode($_SERVER['QUERY_STRING']), $match)) { $selected_dir = fotooManager::getValidDirectory($match[1]); if ($selected_dir !== false) { $title = strtr(escape($match[1]), array('/' => ' / ', '_' => ' ')); if (!empty($match[2])) { $selected_file = $match[2] . '.' . $match[3]; $mode = 'pic'; $title = strtr(escape($match[2]), array('_' => ' ', '-' => ' - ')); } } } else { $selected_dir = ''; } } if (file_exists(BASE_DIR . '/user_style.css')) $css = BASE_URL . 'user_style.css'; else $css = SELF_URL . '?style.css'; $f->html_tags['tag'] = get_url('tag', 'KEYWORD'); $f->html_tags['date'] = get_url('date', 'KEYWORD'); $menu = '
'.__('My Pictures').' '.__('By tags').' '.__('By date').'
'; header('Content-Type: text/html; charset=UTF-8'); if ($mode != 'slideshow' && $mode != 'embed') { if (file_exists(BASE_DIR . '/user_header.php')) require BASE_DIR . '/user_header.php'; else { if (!$title) $title = GALLERY_TITLE; else $title .= ' - '.GALLERY_TITLE; echo ' '.escape($title).' '; } } if ($mode == 'date') { echo '

'.escape($title).'

'; echo ''; $pics = $f->getByDate($year, $month, $day); if (empty($pics)) echo '

'.__('No picture found.').'

'; if ($day) { echo '\n"; } else { echo ''; echo '
  • '; if (!$year) { echo '

    '.$pic['year'].'

    '; if (isset($pic['more'])) echo '

    '.__("(%NB more pictures)", 'REPLACE', array('%NB' => $pic['more'])).'

    '; echo ''; } } elseif ($mode == 'tags') { echo '

    '.$title.'

    '; echo ''; $tags = $f->getTagList(); if (empty($tags)) echo '

    '.__('No tag found.').'

    '; else { $max = max(array_values($tags)); $min = min(array_values($tags)); $spread = $max - $min; if ($spread == 0) $spread = 1; $step = 200 / $spread; echo '

    '; foreach ($tags as $tag=>$nb) { $size = 100 + round(($nb - $min) * $step); echo '' .escape($tag).' ('.$nb.') '; } echo '

    '; } } elseif ($mode == 'tag') { $pics = $f->getByTag($tag); echo '

    '.$title.'

    '; echo ''; $tags = $f->getNearTags($tag); if (!empty($tags)) { $max = max(array_values($tags)); $min = min(array_values($tags)); $spread = $max - $min; if ($spread == 0) $spread = 1; $step = 100 / $spread; echo ''; } if (empty($pics)) { echo '

    '.__('No picture found.').'

    '; } else { echo '\n"; if (ALLOW_EMBED) { echo '
    '.__('Embed:').'
    '; } } } elseif ($mode == 'pic') { $pic = $f->getInfos($selected_file, $selected_dir); if (!is_array($pic)) { echo '

    '.__('Picture not found').'

    '.__('Back to homepage').'

    '; exit; } echo '

    '.$title.'

    \n"; $orig_url = get_url('real_image', $pic); $wh = ''; if (file_exists($f->getSmallPath($pic['hash']))) { $small_url = get_url('cache_small', $pic); } elseif ($pic['width'] <= MAX_IMAGE_SIZE && $pic['height'] <= MAX_IMAGE_SIZE) { $small_url = $orig_url; list($nw, $nh) = $f->getNewSize($pic['width'], $pic['height'], SMALL_IMAGE_SIZE); $wh = 'width="'.$nw.'" height="'.$nh.'"'; } else { $small_url = false; } echo '
    '; if ($small_url) echo ''.escape($pic['filename']).''; else echo __("This picture is too big (%W x %H) to be displayed in this page.", 'REPLACE', array('%W' => $pic['width'], '%H' => $pic['height'])); echo '
    '.__('Download image at original size (%W x %H) - %SIZE KB', 'REPLACE', array('%W' => $pic['width'], '%H' => $pic['height'], '%SIZE' => round($pic['size'] / 1000))).'
    '; echo '
    '; if (!empty($pic['comment'])) { echo '
    '.__('Comment:').'
    '.$f->formatText($pic['comment']).'
    '; } if (!empty($pic['tags'])) { echo '
    '.__('Tags:').'
    '; foreach ($pic['tags'] as $tag_id=>$tag) echo ''.escape($tag).' '; echo '
    '; } $date = __('%A %d %B %Y at %H:%M'); $date = strtr($date, array( '%1' => escape(get_url('date', $pic['year'].'/'.zero_pad($pic['month']).'/'.zero_pad($pic['day']))), '%2' => escape(get_url('date', $pic['year'].'/'.zero_pad($pic['month']))), '%3' => escape(get_url('date', $pic['year'])), )); $date = __($date, 'TIME', $pic['time']); echo '
    '.__('Date:').'
    '.$date.'
    '; if (ALLOW_EMBED) { echo '
    '.__('Embed:').'
    '.__('Embed as image:').'
    '; } echo '
    '; if (!empty($pic['details'])) { $details = $f->formatDetails($pic['details']); echo '
    '; foreach ($details as $name=>$value) { echo '
    '.$name.'
    '.$value.'
    '; } echo '
    '; } list($prev, $next) = $f->getPrevAndNext($selected_dir, $selected_file); echo ' '; } elseif ($mode == 'slideshow' || $mode == 'embed') { require 'slideshow.php'; } else { $pics = $dirs = $update = $desc = false; $list = $f->getDirectory($selected_dir); echo '

    '.escape($title).'

    '; if ($list === false) echo '

    '.__('No picture found.').'

    '; else list($dirs, $pics, $update, $desc) = $list; if (!empty($update)) echo '

    '.__('Updating database, please wait, more pictures will appear in a while...').'

    '; if ($desc) { echo '
    '.$f->formatText($desc).'
    '; } if (!empty($dirs)) { echo '\n"; } if (!empty($pics)) { echo '\n"; } if (!empty($update)) { echo "\n" .''; } } if ($mode != 'embed' && $mode != 'slideshow') { if (file_exists(BASE_DIR . '/user_footer.php')) require_once BASE_DIR . '/user_footer.php'; else { echo ' '; } } if ((time() % 100 == 0) || isset($cleanUpdate)) { flush(); $f->cleanDB(); } ?>