Last change
on this file since 19185 was
17821,
checked in by mistic100, 12 years ago
|
Warning undefined function get_tag_ids() on quick count button
|
File size:
896 bytes
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Count images for AJAX info |
---|
4 | */ |
---|
5 | |
---|
6 | define('PHPWG_ROOT_PATH','./../../../'); |
---|
7 | define('IN_ADMIN', true); |
---|
8 | |
---|
9 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); |
---|
10 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
11 | |
---|
12 | if (!is_admin()) die('Hacking attempt!'); |
---|
13 | |
---|
14 | |
---|
15 | if (isset($_POST['filters'])) |
---|
16 | { |
---|
17 | $filters = array(); |
---|
18 | $page['errors'] = array(); |
---|
19 | $limit_is_set = false; |
---|
20 | |
---|
21 | foreach ($_POST['filters'] as $filter) |
---|
22 | { |
---|
23 | if (($filter = smart_check_filter($filter)) != false) |
---|
24 | { |
---|
25 | array_push($filters, $filter); |
---|
26 | } |
---|
27 | else |
---|
28 | { |
---|
29 | echo '<span class="filter_error">'.$page['errors'][ count($page['errors'])-1 ].'</span>'; |
---|
30 | exit; |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | $associated_images = smart_get_pictures($_POST['cat_id'], $filters); |
---|
35 | } |
---|
36 | else |
---|
37 | { |
---|
38 | $associated_images = array(); |
---|
39 | } |
---|
40 | |
---|
41 | echo '<span class="count_image">'.l10n_dec('%d photo', '%d photos', count($associated_images)).'</span>'; |
---|
42 | |
---|
43 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.