source: extensions/SmartAlbums/include/count_images.php @ 14820

Last change on this file since 14820 was 11334, checked in by mistic100, 13 years ago

private items are not displayed in SmartAlbums (according to user permissions)

File size: 737 bytes
RevLine 
[10871]1<?php
[10980]2/**
3 * Count images for AJAX info
4 */
5
[10871]6define('PHPWG_ROOT_PATH','./../../../');
7define('IN_ADMIN', true);
8include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
[10980]9include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
[10871]10include_once(SMART_PATH.'include/functions.inc.php');
11
[11290]12if (isset($_POST['filters']))
[10871]13{
[11290]14  $filters = array();
[11334]15  $page['errors'] = array();
[11290]16  $limit_is_set = false;
[11334]17 
[11290]18  foreach ($_POST['filters'] as $filter)
[10871]19  {
[11290]20    if (($filter = smart_check_filter($filter)) != false)
21    {
22      array_push($filters, $filter);
23    }
[10871]24  }
[11290]25
26  $associated_images = smart_get_pictures($_POST['cat_id'], $filters);
[10871]27}
[11290]28else
29{
30  $associated_images = array();
31}
[10871]32
[10980]33echo l10n_dec('%d photo', '%d photos', count($associated_images));
34
[10871]35?>
Note: See TracBrowser for help on using the repository browser.