source:
extensions/lightbox/get_content.php
@
29271
Last change on this file since 29271 was 21240, checked in by , 12 years ago | |
---|---|
File size: 874 bytes |
Rev | Line | |
---|---|---|
[3609] | 1 | <?php |
[17487] | 2 | // Embedded Videos |
[3609] | 3 | |
4 | define('PHPWG_ROOT_PATH','../../'); | |
5 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); | |
6 | include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php'); | |
7 | ||
8 | check_status(ACCESS_GUEST); | |
9 | ||
10 | if (!isset($_GET['imgid']) or !is_numeric($_GET['imgid'])) | |
11 | { | |
[17487] | 12 | exit; |
[3609] | 13 | } |
14 | ||
[17487] | 15 | if (empty($pwg_loaded_plugins['gvideo']) or !function_exists('gvideo_element_content')) |
16 | { | |
17 | exit; | |
18 | } | |
19 | ||
[20207] | 20 | $image_id = pwg_db_real_escape_string($_GET['imgid']); |
[3609] | 21 | |
22 | $query = ' | |
23 | SELECT * | |
[17487] | 24 | FROM '.IMAGES_TABLE.' |
25 | INNER JOIN '.IMAGE_CATEGORY_TABLE.' | |
26 | ON id=image_id | |
[3609] | 27 | WHERE id='.$image_id |
28 | . get_sql_condition_FandF( | |
29 | array('forbidden_categories' => 'category_id'), | |
30 | " AND" | |
31 | ).' | |
32 | LIMIT 1'; | |
33 | ||
[21240] | 34 | $picture = pwg_db_fetch_assoc( pwg_query($query) ); |
[3609] | 35 | |
[17487] | 36 | if (empty($picture) or !$picture['is_gvideo']) |
[3609] | 37 | { |
[17487] | 38 | exit; |
[3609] | 39 | } |
40 | ||
[17487] | 41 | echo gvideo_element_content(null, $picture); |
[3609] | 42 | |
[3298] | 43 | ?> |
Note: See TracBrowser
for help on using the repository browser.