source: extensions/UserCollections/toggle_image.php @ 17335

Last change on this file since 17335 was 16608, checked in by mistic100, 12 years ago

-add complete breadcrumb
-AJAX for add/remove photos (more faster)

File size: 527 bytes
Line 
1<?php
2define('PHPWG_ROOT_PATH', '../../');
3include(PHPWG_ROOT_PATH.'include/common.inc.php');
4
5check_status(ACCESS_CLASSIC);
6
7if (isset($_POST['toggle_id']))
8{
9  try
10  {
11    $col_id = !empty($_POST['col_id']) ? $_POST['col_id'] : get_current_collection_id(true);
12    $UserCollection = new UserCollection($col_id);
13    $UserCollection->toggleImage($_POST['toggle_id']);
14    echo boolean_to_string($UserCollection->isInSet($_POST['toggle_id']));
15  }
16  catch (Exception $e)
17  {
18    echo 'error';
19  }
20}
21else
22{
23  echo 'error';
24}
25
26?>
Note: See TracBrowser for help on using the repository browser.