1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
|
<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
// +-----------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation |
// | |
// | This program is distributed in the hope that it will be useful, but |
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
define('PHPWG_ROOT_PATH','./');
include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
include(PHPWG_ROOT_PATH.'include/section_init.inc.php');
include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
// Check Access and exit when user status is not ok
check_status(ACCESS_GUEST);
// access authorization check
if (isset($page['category']))
{
check_restrictions($page['category']['id']);
}
// if this image_id doesn't correspond to this category, an error message is
// displayed, and execution is stopped
if (!in_array($page['image_id'], $page['items']))
{
page_not_found(
'The requested image does not belong to this image set',
duplicate_index_url()
);
}
// add default event handler for rendering element content
add_event_handler(
'render_element_content',
'default_picture_content',
EVENT_HANDLER_PRIORITY_NEUTRAL,
2
);
// add default event handler for rendering element description
add_event_handler('render_element_description', 'nl2br');
trigger_action('loc_begin_picture');
// this is the default handler that generates the display for the element
function default_picture_content($content, $element_info)
{
if ( !empty($content) )
{// someone hooked us - so we skip;
return $content;
}
if (!isset($element_info['image_url']))
{ // nothing to do
return $content;
}
global $user, $page, $template;
$template->set_filenames(
array('default_content'=>'picture_content.tpl')
);
if ( !isset($page['slideshow']) and isset($element_info['high_url']) )
{
$uuid = uniqid(rand());
$template->assign_block_vars(
'high',
array(
'U_HIGH' => $element_info['high_url'],
'UUID' => $uuid,
)
);
}
$template->assign_vars( array(
'SRC_IMG' => $element_info['image_url'],
'ALT_IMG' => $element_info['file'],
'WIDTH_IMG' => @$element_info['scaled_width'],
'HEIGHT_IMG' => @$element_info['scaled_height'],
)
);
return $template->parse( 'default_content', true);
}
// +-----------------------------------------------------------------------+
// | initialization |
// +-----------------------------------------------------------------------+
$page['rank_of'] = array_flip($page['items']);
// caching first_rank, last_rank, current_rank in the displayed
// section. This should also help in readability.
$page['first_rank'] = 0;
$page['last_rank'] = count($page['items']) - 1;
$page['current_rank'] = $page['rank_of'][ $page['image_id'] ];
// caching current item : readability purpose
$page['current_item'] = $page['image_id'];
if ($page['current_rank'] != $page['first_rank'])
{
// caching first & previous item : readability purpose
$page['previous_item'] = $page['items'][ $page['current_rank'] - 1 ];
$page['first_item'] = $page['items'][ $page['first_rank'] ];
}
if ($page['current_rank'] != $page['last_rank'])
{
// caching next & last item : readability purpose
$page['next_item'] = $page['items'][ $page['current_rank'] + 1 ];
$page['last_item'] = $page['items'][ $page['last_rank'] ];
}
$url_up = duplicate_index_url(
array(
'start' =>
floor($page['current_rank'] / $user['nb_image_page'])
* $user['nb_image_page']
),
array(
'start',
)
);
$url_self = duplicate_picture_url();
// +-----------------------------------------------------------------------+
// | actions |
// +-----------------------------------------------------------------------+
/**
* Actions are favorite adding, user comment deletion, setting the picture
* as representative of the current category...
*
* Actions finish by a redirection
*/
if (isset($_GET['action']))
{
switch ($_GET['action'])
{
case 'add_to_favorites' :
{
$query = '
INSERT INTO '.FAVORITES_TABLE.'
(image_id,user_id)
VALUES
('.$page['image_id'].','.$user['id'].')
;';
pwg_query($query);
redirect($url_self);
break;
}
case 'remove_from_favorites' :
{
$query = '
DELETE FROM '.FAVORITES_TABLE.'
WHERE user_id = '.$user['id'].'
AND image_id = '.$page['image_id'].'
;';
pwg_query($query);
if ('favorites' == $page['section'])
{
redirect($url_up);
}
else
{
redirect($url_self);
}
break;
}
case 'set_as_representative' :
{
if (is_admin() and !is_adviser() and isset($page['category']))
{
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET representative_picture_id = '.$page['image_id'].'
WHERE id = '.$page['category']['id'].'
;';
pwg_query($query);
}
redirect($url_self);
break;
}
case 'toggle_metadata' :
{
break;
}
case 'add_to_caddie' :
{
fill_caddie(array($page['image_id']));
redirect($url_self);
break;
}
case 'rate' :
{
include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php');
rate_picture(
$page['image_id'],
isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate']
);
redirect($url_self);
}
case 'delete_comment' :
{
if (isset($_GET['comment_to_delete'])
and is_numeric($_GET['comment_to_delete'])
and is_admin() and !is_adviser() )
{
$query = '
DELETE FROM '.COMMENTS_TABLE.'
WHERE id = '.$_GET['comment_to_delete'].'
;';
pwg_query( $query );
}
redirect($url_self);
}
}
}
// incrementation of the number of hits, we do this only if no action
if (trigger_event('allow_increment_element_hit_count', !isset($_POST['content']) ) )
{
$query = '
UPDATE
'.IMAGES_TABLE.'
SET hit = hit+1
WHERE id = '.$page['image_id'].'
;';
pwg_query($query);
}
//---------------------------------------------------------- related categories
$query = '
SELECT category_id,uppercats,commentable,global_rank
FROM '.IMAGE_CATEGORY_TABLE.'
INNER JOIN '.CATEGORIES_TABLE.' ON category_id = id
WHERE image_id = '.$page['image_id'].'
'.get_sql_condition_FandF
(
array
(
'forbidden_categories' => 'category_id',
'visible_categories' => 'category_id'
),
'AND'
).'
;';
$result = pwg_query($query);
$related_categories = array();
while ($row = mysql_fetch_array($result))
{
array_push($related_categories, $row);
}
usort($related_categories, 'global_rank_compare');
//-------------------------first, prev, current, next & last picture management
$picture = array();
$ids = array($page['image_id']);
if (isset($page['previous_item']))
{
array_push($ids, $page['previous_item']);
array_push($ids, $page['first_item']);
}
if (isset($page['next_item']))
{
array_push($ids, $page['next_item']);
array_push($ids, $page['last_item']);
}
$query = '
SELECT *
FROM '.IMAGES_TABLE.'
WHERE id IN ('.implode(',', $ids).')
;';
$result = pwg_query($query);
while ($row = mysql_fetch_assoc($result))
{
if (isset($page['previous_item']) and $row['id'] == $page['previous_item'])
{
$i = 'previous';
}
else if (isset($page['next_item']) and $row['id'] == $page['next_item'])
{
$i = 'next';
}
else if (isset($page['first_item']) and $row['id'] == $page['first_item'])
{
$i = 'first';
}
else if (isset($page['last_item']) and $row['id'] == $page['last_item'])
{
$i = 'last';
}
else
{
$i = 'current';
}
$picture[$i] = $row;
$picture[$i]['is_picture'] = false;
if (in_array(get_extension($row['file']), $conf['picture_ext']))
{
$picture[$i]['is_picture'] = true;
}
// ------ build element_path and element_url
$picture[$i]['element_path'] = get_element_path($picture[$i]);
$picture[$i]['element_url'] = get_element_url($picture[$i]);
// ------ build image_path and image_url
if ($i=='current' or $i=='next')
{
$picture[$i]['image_path'] = get_image_path( $picture[$i] );
$picture[$i]['image_url'] = get_image_url( $picture[$i] );
}
if ($i=='current')
{
if ( $picture[$i]['is_picture'] )
{
if ( $user['enabled_high']=='true' )
{
$hi_url=get_high_url($picture[$i]);
if ( !empty($hi_url) )
{
$picture[$i]['high_url'] = $hi_url;
$picture[$i]['download_url'] = get_download_url('h',$picture[$i]);
}
}
}
else
{ // not a pic - need download link
$picture[$i]['download_url'] = get_download_url('e',$picture[$i]);
}
}
$picture[$i]['thumbnail'] = get_thumbnail_url($row);
if ( !empty( $row['name'] ) )
{
$picture[$i]['name'] = $row['name'];
}
else
{
$file_wo_ext = get_filename_wo_extension($row['file']);
$picture[$i]['name'] = str_replace('_', ' ', $file_wo_ext);
}
$picture[$i]['url'] = duplicate_picture_url(
array(
'image_id' => $row['id'],
'image_file' => $row['file'],
),
array(
'start',
)
);
if ('previous'==$i and $page['previous_item']==$page['first_item'])
{
$picture['first'] = $picture[$i];
}
if ('next'==$i and $page['next_item']==$page['last_item'])
{
$picture['last'] = $picture[$i];
}
}
// calculation of width and height for the current picture
if (empty($picture['current']['width']))
{
$taille_image = @getimagesize($picture['current']['image_path']);
if ($taille_image!==false)
{
$picture['current']['width'] = $taille_image[0];
$picture['current']['height']= $taille_image[1];
}
}
if (!empty($picture['current']['width']))
{
list(
$picture['current']['scaled_width'],
$picture['current']['scaled_height']
) = get_picture_size(
$picture['current']['width'],
$picture['current']['height'],
@$user['maxwidth'],
@$user['maxheight']
);
}
$url_admin =
get_root_url().'admin.php?page=picture_modify'
.'&cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
.'&image_id='.$page['image_id']
;
$url_slide = add_url_params(
$picture['current']['url'],
array( 'slideshow'=>$conf['slideshow_period'] )
);
$template->set_filename('picture', 'picture.tpl');
if ( isset( $_GET['slideshow'] ) )
{
$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
$page['slideshow'] = true;
if ( $conf['light_slideshow'] )
{
$template->set_filename('picture', 'slideshow.tpl');
}
if ( isset($page['next_item']) )
{
// $redirect_msg, $refresh, $url_link and $title are required for creating
// an automated refresh page in header.tpl
$refresh= $_GET['slideshow'];
$url_link = add_url_params(
$picture['next']['url'],
array('slideshow'=>$refresh)
);
$redirect_msg = nl2br(l10n('redirect_msg'));
}
}
$title = $picture['current']['name'];
$title_nb = ($page['current_rank'] + 1).'/'.count($page['items']);
// metadata
$url_metadata = duplicate_picture_url();
// do we have a plugin that can show metadata for something else than images?
$metadata_showable = trigger_event(
'get_element_metadata_available',
(
($conf['show_exif'] or $conf['show_iptc'])
and isset($picture['current']['image_path'])
),
$picture['current']['path']
);
if ($metadata_showable)
{
if ( !isset($_GET['metadata']) )
{
$url_metadata = add_url_params( $url_metadata, array('metadata'=>null) );
}
else
{
$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
}
}
$page['body_id'] = 'thePicturePage';
// allow plugins to change what we computed before passing data to template
$picture = trigger_event('picture_pictures_data', $picture);
if (isset($picture['next']['image_url'])
and $picture['next']['is_picture'] )
{
$template->assign_block_vars(
'prefetch',
array (
'URL' => $picture['next']['image_url']
)
);
}
//------------------------------------------------------- navigation management
foreach (array('first','previous','next','last') as $which_image)
{
if (isset($picture[$which_image]))
{
$template->assign_block_vars(
$which_image,
array(
'TITLE_IMG' => $picture[$which_image]['name'],
'IMG' => $picture[$which_image]['thumbnail'],
'U_IMG' => $picture[$which_image]['url'],
)
);
}
else
{
$template->assign_block_vars(
$which_image.'_unactive',
array()
);
}
}
$template->assign_vars(
array(
'SECTION_TITLE' => $page['title'],
'PICTURE_TITLE' => $picture['current']['name'],
'PHOTO' => $title_nb,
'TITLE' => $picture['current']['name'],
'LEVEL_SEPARATOR' => $conf['level_separator'],
'U_HOME' => make_index_url(),
'U_UP' => $url_up,
'U_METADATA' => $url_metadata,
'U_ADMIN' => $url_admin,
'U_SLIDESHOW'=> $url_slide,
'U_ADD_COMMENT' => $url_self,
)
);
if ($conf['show_picture_name_on_title'])
{
$template->assign_block_vars('title', array());
}
//------------------------------------------------------- upper menu management
// download link
if ( isset($picture['current']['download_url']) )
{
$template->assign_block_vars(
'download',
array(
'U_DOWNLOAD' => $picture['current']['download_url']
)
);
}
// button to set the current picture as representative
if (is_admin() and isset($page['category']))
{
$template->assign_block_vars(
'representative',
array(
'URL' => add_url_params($url_self,
array('action'=>'set_as_representative')
)
)
);
}
// caddie button
if (is_admin())
{
$template->assign_block_vars(
'caddie',
array(
'URL' => add_url_params($url_self,
array('action'=>'add_to_caddie')
)
)
);
}
// favorite manipulation
if (!$user['is_the_guest'])
{
// verify if the picture is already in the favorite of the user
$query = '
SELECT COUNT(*) AS nb_fav
FROM '.FAVORITES_TABLE.'
WHERE image_id = '.$page['image_id'].'
AND user_id = '.$user['id'].'
;';
$result = pwg_query($query);
$row = mysql_fetch_array($result);
if ($row['nb_fav'] == 0)
{
$template->assign_block_vars(
'favorite',
array(
'FAVORITE_IMG' =>
get_root_url().get_themeconf('icon_dir').'/favorite.png',
'FAVORITE_HINT' => l10n('add_favorites_hint'),
'FAVORITE_ALT' => l10n('add_favorites_alt'),
'U_FAVORITE' => add_url_params(
$url_self,
array('action'=>'add_to_favorites')
),
)
);
}
else
{
$template->assign_block_vars(
'favorite',
array(
'FAVORITE_IMG' =>
get_root_url().get_themeconf('icon_dir').'/del_favorite.png',
'FAVORITE_HINT' => l10n('del_favorites_hint'),
'FAVORITE_ALT' => l10n('del_favorites_alt'),
'U_FAVORITE' => add_url_params(
$url_self,
array('action'=>'remove_from_favorites')
),
)
);
}
}
//------------------------------------ admin link for information modifications
if ( is_admin() )
{
$template->assign_block_vars('admin', array());
}
//--------------------------------------------------------- picture information
$header_infos = array(); //for html header use
// legend
if (isset($picture['current']['comment'])
and !empty($picture['current']['comment']))
{
$template->assign_block_vars(
'legend',
array(
'COMMENT_IMG' =>
trigger_event('render_element_description',
$picture['current']['comment'])
));
$header_infos['COMMENT'] = strip_tags($picture['current']['comment']);
}
$infos = array();
// author
if (!empty($picture['current']['author']))
{
$infos['INFO_AUTHOR'] =
// FIXME because of search engine partial rewrite, giving the author
// name threw GET is not supported anymore. This feature should come
// back later, with a better design
// '<a href="'.
// PHPWG_ROOT_PATH.'category.php?cat=search'.
// '&search=author:'.$picture['current']['author']
// .'">'.$picture['current']['author'].'</a>';
$picture['current']['author'];
$header_infos['INFO_AUTHOR'] = $picture['current']['author'];
}
else
{
$infos['INFO_AUTHOR'] = l10n('N/A');
}
// creation date
if (!empty($picture['current']['date_creation']))
{
$val = format_date($picture['current']['date_creation']);
$url = make_index_url(
array(
'chronology_field'=>'created',
'chronology_style'=>'monthly',
'chronology_view'=>'list',
'chronology_date' => explode('-', $picture['current']['date_creation'])
)
);
$infos['INFO_CREATION_DATE'] =
'<a href="'.$url.'" rel="nofollow">'.$val.'</a>';
}
else
{
$infos['INFO_CREATION_DATE'] = l10n('N/A');
}
// date of availability
$val = format_date($picture['current']['date_available'], 'mysql_datetime');
$url = make_index_url(
array(
'chronology_field'=>'posted',
'chronology_style'=>'monthly',
'chronology_view'=>'list',
'chronology_date' => explode(
'-',
substr($picture['current']['date_available'], 0, 10)
)
)
);
$infos['INFO_POSTED_DATE'] = '<a href="'.$url.'" rel="nofollow">'.$val.'</a>';
// size in pixels
if ($picture['current']['is_picture'] and isset($picture['current']['width']) )
{
if ($picture['current']['scaled_width'] !== $picture['current']['width'] )
{
$infos['INFO_DIMENSIONS'] =
'<a href="'.$picture['current']['image_url'].'" title="'.
l10n('Original dimensions').'">'.
$picture['current']['width'].'*'.$picture['current']['height'].'</a>';
}
else
{
$infos['INFO_DIMENSIONS'] =
$picture['current']['width'].'*'.$picture['current']['height'];
}
}
else
{
$infos['INFO_DIMENSIONS'] = l10n('N/A');
}
// filesize
if (!empty($picture['current']['filesize']))
{
$infos['INFO_FILESIZE'] =
sprintf(l10n('%d Kb'), $picture['current']['filesize']);
}
else
{
$infos['INFO_FILESIZE'] = l10n('N/A');
}
// number of visits
$infos['INFO_VISITS'] = $picture['current']['hit'];
// file
$infos['INFO_FILE'] = $picture['current']['file'];
// tags
$tags = get_common_tags( array($page['image_id']), -1);
if ( count($tags) )
{
$infos['INFO_TAGS'] = '';
foreach ($tags as $num => $tag)
{
$infos['INFO_TAGS'] .= $num ? ', ' : '';
$infos['INFO_TAGS'] .= '<a href="'
.make_index_url(
array(
'tags' => array($tag)
)
)
.'">'.$tag['name'].'</a>';
}
$header_infos['INFO_TAGS'] = strip_tags($infos['INFO_TAGS']);
}
else
{
$infos['INFO_TAGS'] = l10n('N/A');
}
$template->assign_vars($infos);
// related categories
if ( count($related_categories)==1 and
isset($page['category']) and
$related_categories[0]['category_id']==$page['category']['id'] )
{ // no need to go to db, we have all the info
$template->assign_block_vars(
'category',
array('LINE'=>get_cat_display_name( $page['category']['upper_names'] ))
);
}
else
{ // use only 1 sql query to get names for all related categories
$ids = array();
foreach ($related_categories as $category)
{// add all uppercats to $ids
$ids = array_merge($ids, explode(',', $category['uppercats']) );
}
$ids = array_unique($ids);
$query = '
SELECT id, name, permalink
FROM '.CATEGORIES_TABLE.'
WHERE id IN ('.implode(',',$ids).')';
$cat_map = hash_from_query($query, 'id');
foreach ($related_categories as $category)
{
$cats = array();
foreach ( explode(',', $category['uppercats']) as $id )
{
$cats[] = $cat_map[$id];
}
$template->assign_block_vars('category', array('LINE'=>get_cat_display_name($cats) ) );
}
}
//slideshow end
if (isset($_GET['slideshow']))
{
if (!is_numeric($_GET['slideshow']))
{
$_GET['slideshow'] = $conf['slideshow_period'];
}
$template->assign_block_vars(
'stop_slideshow',
array(
'U_SLIDESHOW' => $picture['current']['url'],
)
);
}
// maybe someone wants a special display (call it before page_header so that
// they can add stylesheets)
$element_content = trigger_event(
'render_element_content',
'',
$picture['current']
);
$template->assign_var( 'ELEMENT_CONTENT', $element_content );
// +-----------------------------------------------------------------------+
// | sub pages |
// +-----------------------------------------------------------------------+
include(PHPWG_ROOT_PATH.'include/picture_rate.inc.php');
include(PHPWG_ROOT_PATH.'include/picture_comment.inc.php');
if ($metadata_showable and isset($_GET['metadata']))
{
include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php');
}
//------------------------------------------------------------ log informations
pwg_log($picture['current']['id'], 'picture');
include(PHPWG_ROOT_PATH.'include/page_header.php');
trigger_action('loc_end_picture');
$template->parse('picture');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
|