3 /* *************************************************************************
5 * Copyright (c) by Andreas Unterkircher, unki@netshadow.at
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * *************************************************************************/
24 require_once "phpfspot.class.php";
28 public function __construct()
34 function process_ajax_request()
36 require_once 'HTML/AJAX/Server.php';
38 $server = new HTML_AJAX_Server();
39 $server->handleRequest();
41 $fspot = new PHPFSPOT();
43 switch($_GET['action']) {
46 $fspot->showPhoto($_GET['id']);
49 case 'show_available_tags':
51 $fspot->getAvailableTags();
54 case 'show_selected_tags':
56 $fspot->getSelectedTags();
61 $fspot->addTag($_GET['id']);
66 $fspot->delTag($_GET['id']);
71 $fspot->resetTagSearch();
73 $fspot->resetPhotoView();
78 $fspot->setTagCondition($_GET['mode']);
81 case 'show_photo_index':
83 $_SESSION['begin_with'] = $_GET['begin_with'];
84 $fspot->showPhotoIndex();
89 $fspot->showCredits();
94 $fspot->startTagSearch($_GET['for']);
99 $fspot->getExport($_GET['mode']);
102 case 'get_photo_to_show':
103 $fspot->getCurrentPhoto();
108 } // process_ajax_request();
112 $rpc = new PHPFSPOT_RPC();
113 $rpc->process_ajax_request();