source: extensions/lightbox/get_content.php @ 19600

Last change on this file since 19600 was 17487, checked in by mistic100, 12 years ago

compatibility with Embedded Videos

File size: 872 bytes
RevLine 
[3609]1<?php
[17487]2// Embedded Videos
[3609]3
4define('PHPWG_ROOT_PATH','../../');
5include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
6include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
7
8check_status(ACCESS_GUEST);
9
10if (!isset($_GET['imgid']) or !is_numeric($_GET['imgid']))
11{
[17487]12  exit;
[3609]13}
14
[17487]15if (empty($pwg_loaded_plugins['gvideo']) or !function_exists('gvideo_element_content'))
16{
17  exit;
18}
19
[3609]20$image_id = mysql_real_escape_string($_GET['imgid']);
21
22$query = '
23SELECT *
[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
[17487]34$picture = mysql_fetch_assoc( pwg_query($query) );
[3609]35
[17487]36if (empty($picture) or !$picture['is_gvideo'])
[3609]37{
[17487]38  exit;
[3609]39}
40
[17487]41echo gvideo_element_content(null, $picture);
[3609]42
[3298]43?>
Note: See TracBrowser for help on using the repository browser.