source: extensions/skeleton/admin/photo.php @ 20855

Last change on this file since 20855 was 17899, checked in by mistic100, 12 years ago

first commit

File size: 1.4 KB
RevLine 
[17899]1<?php
2defined('SKELETON_PATH') or die('Hacking attempt!');
3
4// +-----------------------------------------------------------------------+
5// | Photo[Skeleton] tab                                                   |
6// +-----------------------------------------------------------------------+
7
8
9/* Basic checks */
10check_status(ACCESS_ADMINISTRATOR);
11
12check_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&amp;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
21include_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 = '
30SELECT *
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?>
Note: See TracBrowser for help on using the repository browser.