#!/usr/bin/php4 -qC | // +--------------------------------------------------------------------+ // // $Id$ // // Configuración local: putenv('LC_ALL=es_AR'); setlocale(LC_ALL, 'es_AR'); set_time_limit(0); umask(0007); //Debug: ini_set('display_errors', true); ini_set('html_errors', false); error_reporting(E_ALL); // Creates album object. require_once 'Hook/Album.php'; $album =& new Hook_Album(); // Opens stdin. $in = fopen('php://stdin', 'r'); // Gets the name. echo 'Enter the album name for the menu: '; $name = chop(fgets($in, 4096)); // Writes the name. require_once 'Hook/Menu.php'; Hook_Menu::setName($name); // Gets the description. echo "Enter the album description ('.' in single line to finish):\n"; $desc = ''; while (($buff = chop(fgets($in, 4096))) !== '.') { $desc .= "$buff\n"; } $desc = chop($desc); // Writes the description. $album->setDescription($desc); //Closes stdin. fclose($in); // Creates a symlink to the parent's index.php. symlink('../index.php', 'index.php'); symlink('../photo.php', 'photo.php'); // Creates the thumbnails. echo "Generating thumbnails, this could take a while, please wait...\n"; $album->createThumbs(); echo "Done!\n" // $Id$ ?>