source:
extensions/SmartAlbums/include/count_images.php
@
14820
Last change on this file since 14820 was 11334, checked in by , 13 years ago | |
---|---|
File size: 737 bytes |
Rev | Line | |
---|---|---|
[10871] | 1 | <?php |
[10980] | 2 | /** |
3 | * Count images for AJAX info | |
4 | */ | |
5 | ||
[10871] | 6 | define('PHPWG_ROOT_PATH','./../../../'); |
7 | define('IN_ADMIN', true); | |
8 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); | |
[10980] | 9 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
[10871] | 10 | include_once(SMART_PATH.'include/functions.inc.php'); |
11 | ||
[11290] | 12 | if (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] | 28 | else |
29 | { | |
30 | $associated_images = array(); | |
31 | } | |
[10871] | 32 | |
[10980] | 33 | echo l10n_dec('%d photo', '%d photos', count($associated_images)); |
34 | ||
[10871] | 35 | ?> |
Note: See TracBrowser
for help on using the repository browser.