Source of “settings.txt”
<?php // Emacs settings: -*- mode: Fundamental; tab-width: 4; -*-
////////////////////////////////////////////////////////////////////////////
// //
// Andrew's Album Application: settings.txt //
// //
// Copyright (c) 2004-2005, Andrew Birrell //
// //
// Things that might change for other people's albums //
// //
////////////////////////////////////////////////////////////////////////////
define("C_mainW", 1280); // max width of main image
define("C_mainH", 1280); // max height of main image
define("C_mainQuality", 80); // JPEG quality of main image
define("C_pdaW", 480); // max width of PDA-sized image
define("C_pdaH", 480); // max height of PDA-sized image
define("C_pdaQuality", 80); // JPEG quality of PDA-sized image
define("C_thumbW", 132); // max width of photo thumbnails
define("C_thumbH", 132); // max height of photo thumbnails
define("C_miniW", 132); // max width of folder thumbnails
define("C_miniH", 44); // max height of folder thumbnails
define("C_thumbBg", '#808080'); // background matte for thumbnails
define(\\\"C_images\\\", \\\"images\\\"); // raw image root directory
define("C_cache", "cache"); // image cache root directory
define("C_titles", "titles"); // title files root directory
define("C_imagesUrl", C_images); // raw image root URL
define("C_cacheUrl", C_cache); // image cache root URL
define("C_exclusions", '#^(\\.|Icon)|' .
'^(Makefile|thumbs\\.db)$|' .
'\\.(atn|avi|psd|sh|txt)$|~$#i'); // directory entries to ignore
define("C_convert", "convert"); // image scaling program
define("C_composite", "composite"); // image compositing program
define("C_touch", "touch"); // program for setting mtime ...
// "false" to use built-in function
define("C_identify", "identify"); // program for getting image sizes
define("C_useSymlink", true); // false for Windows(TM)
umask(0002); // rwxrwxrx, i.e. group writable
function getPwd($user) {
// Return user's password, or null if no such user
//
// I'm using a password that's stored as plain text in the file system
//
// Note that if using SSL, the typed password is available in a cookie.
//
// Alternatively, we could use a fixed password, and configure the web
// server so that this file isn't readable through a URL.
//
if (strpos($user, ".") !== false) return null; // pathname protection
$pwdPath = "/home/pachylet/pachypwd/$user";
if (!is_readable($pwdPath)) return null;
$lines = file($pwdPath);
return trim($lines[0]);
}
?>
End of listing