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

Last change on this file since 24182 was 24182, checked in by mistic100, 11 years ago

remove php end tags, remove at symbol in template, add example of class handlers, remove useless files

File size: 1.5 KB
Line 
1<?php
2defined('SKELETON_PATH') or die('Hacking attempt!');
3
4// +-----------------------------------------------------------------------+
5// | Photo[Skeleton] tab                                                   |
6// +-----------------------------------------------------------------------+
7
8$page['active_menu'] = get_active_menu('photo'); // force oppening "Photos" menu block
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
37# DO SOME STUFF HERE... or not !
38
39
40/* Template */
41$template->assign(array(
42  'F_ACTION' => $self_url,
43  'skeleton' => $conf['skeleton'],
44  'TITLE' => render_element_name($picture),
45  'TN_SRC' => DerivativeImage::thumb_url($picture),
46));
47
48$template->set_filename('skeleton_content', realpath(SKELETON_PATH . 'admin/template/photo.tpl'));
Note: See TracBrowser for help on using the repository browser.