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