source: extensions/skeleton/trunk/admin/photo.php @ 30210

Last change on this file since 30210 was 28650, checked in by mistic100, 10 years ago

update for 2.7

File size: 1.5 KB
RevLine 
[17899]1<?php
2defined('SKELETON_PATH') or die('Hacking attempt!');
3
4// +-----------------------------------------------------------------------+
5// | Photo[Skeleton] tab                                                   |
6// +-----------------------------------------------------------------------+
7
[21659]8$page['active_menu'] = get_active_menu('photo'); // force oppening "Photos" menu block
[17899]9
10/* Basic checks */
11check_status(ACCESS_ADMINISTRATOR);
12
13check_input_parameter('image_id', $_GET, false, PATTERN_ID);
14
15$admin_photo_base_url = get_root_url().'admin.php?page=photo-'.$_GET['image_id'];
16$self_url = SKELETON_ADMIN.'-photo&amp;image_id='.$_GET['image_id'];
17
18
19/* Tabs */
20// when adding a tab to an existing tabsheet you MUST reproduce the core tabsheet code
21// this way it will not break compatibility with other plugins and with core functions
22include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
23$tabsheet = new tabsheet();
24$tabsheet->set_id('photo'); // <= don't forget tabsheet id
25$tabsheet->select('skeleton');
26$tabsheet->assign();
27
28
29/* Initialisation */
30$query = '
31SELECT *
32  FROM '.IMAGES_TABLE.'
33  WHERE id = '.$_GET['image_id'].'
34;';
35$picture = pwg_db_fetch_assoc(pwg_query($query));
36
[28650]37
[17899]38# DO SOME STUFF HERE... or not !
39
40
41/* Template */
42$template->assign(array(
43  'F_ACTION' => $self_url,
44  'skeleton' => $conf['skeleton'],
45  'TITLE' => render_element_name($picture),
46  'TN_SRC' => DerivativeImage::thumb_url($picture),
47));
48
49$template->set_filename('skeleton_content', realpath(SKELETON_PATH . 'admin/template/photo.tpl'));
Note: See TracBrowser for help on using the repository browser.