* alle gemeinsamen Funktionen in includes/galleryfunctions.php zusammengeführt (fixes #21) * AJAX-Requests werden in ajaxrequest.php behandelt und liefern zusätzlich zum Titel auch die URLs des Vorschau- und des Vollbildes (fixes #22), die übergebenen Request-Parameter werden syntaktisch geprüft (fixes #23) * Die Vorschau- und Thumbnail-Bilder werden in der Funktion getScaledImage() in includes/galleryfunctions.php generiert und im Filesystem abgelegt (fixes #10) * Bildbeschreibungen sind jetzt in einem .ini-Format in bilder/example/galleryinfo.ini in der Sektion "images" definiert (addresses #20) * Rendern der Menüpunkte in index.php und includes/galleryfunctions.php vorbereitet (addresses #16) * Die AJAX-Aufrufe und Pfadberechnungen in scripts/ourhandlers.js wurden korrigiert und an die neue AJAX-Handler-URL angepasst (addresses #22, fixes #19) * Beispielbilder in Unterverzeichnis ''bilder/example'' verschoben und die Möglichkeit vorgesehen in ''bilder/galleryinfo.ini'' eine Standardgallerie anzugeben (fixes #24, addresses #20, #16)
		
			
				
	
	
		
			43 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Diese Datei behandelt AJAX-Requests.
 | |
|  *
 | |
|  * Copyright (c) 2007, 2008 Jan Dittberner <jan@dittberner.info>
 | |
|  * Jan Dittberner IT-Consulting & -Solutions,
 | |
|  * Cottbuser Str. 1, D-01129 Dresden
 | |
|  *
 | |
|  * This file is part of the ScrollingJQueryGallery component of the
 | |
|  * gnuviech-server.de Websitetools
 | |
|  *
 | |
|  * ScrollingJQueryGallery is free software: you can redistribute it
 | |
|  * and/or modify it under the terms of the GNU General Public License as
 | |
|  * published by the Free Software Foundation, either version 3 of the
 | |
|  * License, or (at your option) any later version.
 | |
|  *
 | |
|  * ScrollingJQueryGallery is distributed in the hope that it will be
 | |
|  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 | |
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | |
|  * General Public License for more details.
 | |
|  *
 | |
|  * You should have received a copy of the GNU General Public License
 | |
|  * along with ScrollingJQueryGallery.  If not, see
 | |
|  * <http://www.gnu.org/licenses/>.
 | |
|  *
 | |
|  * Version: $Id$
 | |
|  */
 | |
| include("includes/galleryfunctions.php");
 | |
| 
 | |
| if (isset($_GET["imagename"]) && isset($_GET["galleryname"]) &&
 | |
|     preg_match('/^[\w\d _-]+\.jp(e|)g$/', $_GET["imagename"]) &&
 | |
|     preg_match(GALLERY_RE, $_GET["galleryname"])) {
 | |
|   header("Content-Type: text/plain; charset=UTF-8");
 | |
|   if ($imageInfo = getImgInfo($_GET["galleryname"], $_GET["imagename"])) {
 | |
|     print json_encode($imageInfo);
 | |
|   } else {
 | |
|     header("HTTP/1.0 404 Not Found");
 | |
|     header("Status: 404 Not Found");
 | |
|   }
 | |
| } else {
 | |
|   header("HTTP/1.0 400 Bad Request");
 | |
|   header("Status: 400 Bad Request");
 | |
| }
 |