2 /***********************************************************************/
4 /***********************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /***********************************************************************/
14 $_user_location = 'public';
16 define('AT_INCLUDE_PATH', '../../../include/');
17 require (AT_INCLUDE_PATH.'vitals.inc.php');
18 include (AT_PA_INCLUDE.'classes/PhotoAlbum.class.php');
20 //check what comment this is for. Album or Photo.
21 $pid = intval($_POST['pid']);
22 $aid = intval($_POST['aid']);
24 $comment = $_POST['comment'];
26 if (isset($_POST['pid']) && $pid>0){
31 $cid = intval(str_replace('cid_', '', $cid));
33 $pa = new PhotoAlbum($aid);
35 if ($pa->checkAlbumPriv($_SESSION['member_id']) || $pa->checkCommentPriv($cid, $_SESSION['member_id'], $isPhoto)){
36 $result = $pa->editComment($cid, $comment, $isPhoto);
41 header('HTTP/1.0 200 OK');
43 header('HTTP/1.0 404 Not Found');