Last change
on this file since 16377 was
3609,
checked in by patdenice, 15 years ago
|
Convert all php and tpl files in Unix format for my plugins.
|
File size:
998 bytes
|
Rev | Line | |
---|
[3609] | 1 | <?php |
---|
| 2 | |
---|
| 3 | define('PHPWG_ROOT_PATH','../../'); |
---|
| 4 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); |
---|
| 5 | include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php'); |
---|
| 6 | |
---|
| 7 | check_status(ACCESS_GUEST); |
---|
| 8 | |
---|
| 9 | if (!isset($_GET['imgid']) or !is_numeric($_GET['imgid'])) |
---|
| 10 | { |
---|
| 11 | die; |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | $image_id = mysql_real_escape_string($_GET['imgid']); |
---|
| 15 | |
---|
| 16 | $query = ' |
---|
| 17 | SELECT * |
---|
| 18 | FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id=image_id |
---|
| 19 | WHERE id='.$image_id |
---|
| 20 | . get_sql_condition_FandF( |
---|
| 21 | array('forbidden_categories' => 'category_id'), |
---|
| 22 | " AND" |
---|
| 23 | ).' |
---|
| 24 | LIMIT 1'; |
---|
| 25 | |
---|
| 26 | $picture['current'] = mysql_fetch_assoc( pwg_query($query) ); |
---|
| 27 | |
---|
| 28 | if (empty($picture['current'])) |
---|
| 29 | { |
---|
| 30 | die; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | // PY Gvideo |
---|
| 34 | if (!empty($py_addext) and in_array(get_extension($picture['current']['path']), $py_addext)) |
---|
| 35 | { |
---|
| 36 | $extension = strtolower(get_extension($picture['current']['path'])); |
---|
| 37 | $picture['current']['path'] = get_element_url($picture['current']); |
---|
| 38 | include(GVIDEO_PATH.'gvideo.php'); |
---|
| 39 | echo $content; |
---|
| 40 | } |
---|
| 41 | |
---|
[3298] | 42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.