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

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