source: branches/branch-1_7/picture.php @ 2326

Last change on this file since 2326 was 2326, checked in by rvelices, 16 years ago

just some optimizations (especially for large dbs)

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