Last change
on this file since 23539 was
21240,
checked in by plg, 12 years ago
|
compatibility with Piwigo 2.5: replace functions mysql_* with pwg_db_* equivalent
bug fixed with option to link photo title on HD
|
File size:
874 bytes
|
Line | |
---|
1 | <?php |
---|
2 | // Embedded Videos |
---|
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 | { |
---|
12 | exit; |
---|
13 | } |
---|
14 | |
---|
15 | if (empty($pwg_loaded_plugins['gvideo']) or !function_exists('gvideo_element_content')) |
---|
16 | { |
---|
17 | exit; |
---|
18 | } |
---|
19 | |
---|
20 | $image_id = pwg_db_real_escape_string($_GET['imgid']); |
---|
21 | |
---|
22 | $query = ' |
---|
23 | SELECT * |
---|
24 | FROM '.IMAGES_TABLE.' |
---|
25 | INNER JOIN '.IMAGE_CATEGORY_TABLE.' |
---|
26 | ON id=image_id |
---|
27 | WHERE id='.$image_id |
---|
28 | . get_sql_condition_FandF( |
---|
29 | array('forbidden_categories' => 'category_id'), |
---|
30 | " AND" |
---|
31 | ).' |
---|
32 | LIMIT 1'; |
---|
33 | |
---|
34 | $picture = pwg_db_fetch_assoc( pwg_query($query) ); |
---|
35 | |
---|
36 | if (empty($picture) or !$picture['is_gvideo']) |
---|
37 | { |
---|
38 | exit; |
---|
39 | } |
---|
40 | |
---|
41 | echo gvideo_element_content(null, $picture); |
---|
42 | |
---|
43 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.