[ PHPXref.com ] [ Generated: Sun Jul 20 17:05:41 2008 ] [ Coppermine 1.4.5 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> displayreport.php (source)

   1  <?php
   2  /*************************

   3    Coppermine Photo Gallery

   4    ************************

   5    Copyright (c) 2003-2006 Coppermine Dev Team

   6    v1.1 originally written by Gregory DEMAR

   7  

   8    This program is free software; you can redistribute it and/or modify

   9    it under the terms of the GNU General Public License as published by

  10    the Free Software Foundation; either version 2 of the License, or

  11    (at your option) any later version.

  12    ********************************************

  13    Coppermine version: 1.4.5

  14    $Source: /cvsroot/coppermine/stable/displayreport.php,v $

  15    $Revision: 1.5 $

  16    $Author: gaugau $

  17    $Date: 2006/03/02 08:17:40 $

  18  **********************************************/
  19  
  20  define('IN_COPPERMINE', true);
  21  define('DISPLAYREPORT_PHP', true);
  22  
  23  require ('include/init.inc.php');
  24  require ('include/smilies.inc.php');
  25  
  26  if (!GALLERY_ADMIN_MODE) {
  27      cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
  28  }
  29  
  30  if (!isset($_GET['data'])) cpg_die(CRITICAL_ERROR, $lang_errors['param_missing'], __FILE__, __LINE__);
  31  
  32  $data = array();
  33  $data = @unserialize(@base64_decode($_GET['data']));
  34  
  35  if (is_array($data)) {
  36  
  37  // Remove HTML tags as we can't trust what we receive

  38  //foreach($data as $key => $value) $data[$key] = strtr($value, $HTML_SUBST);

  39  // Load template parameters

  40      if ($data['t'] == 'comment') {
  41          $params = array('{LANG_DIR}' => $lang_text_dir,
  42              '{TITLE}' => sprintf($lang_report_php['report_subject'], $data['sn'], $data['t']),
  43              '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
  44              '{VIEW_REPORT_TGT}' => '',
  45              '{VIEW_REPORT_LNK}' => '',
  46              '{URL_PREFIX}' => '',
  47              '{SUBJECT}' => $data['su'],
  48              '{MESSAGE}' => nl2br(process_smilies($data['m'])),
  49              '{SENDER_EMAIL}' => $data['se'],
  50              '{SENDER_NAME}' => $data['sn'],
  51              '{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
  52              '{VIEW_MORE_LNK}' => $lang_report_php['view_more_pics'],
  53              '{REASON}' => $data['r'],
  54              '{COMMENT}' => $data['c'],
  55              '{COMMENT_ID}' => $data['cid'],
  56              '{VIEW_COMMENT_LNK}' => $lang_report_php['view_comment'],
  57              '{COMMENT_LNK}' => $lang_report_php['go_comment'],
  58              '{COMMENT_TGT}' => "{$CONFIG['ecards_more_pic_target']}displayimage.php?pos=-" . $data['pid'] . "#comment" . $data['cid'],
  59              '{PID}' => $data['pid'],
  60              );
  61          // Parse template if report is on a comment

  62          echo template_eval($template_report_comment, $params);
  63  
  64      } else {
  65              $params = array('{LANG_DIR}' => $lang_text_dir,
  66                  '{TITLE}' => sprintf($lang_report_php['report_subject'], $data['sn'], $data['t']),
  67                  '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
  68                  '{VIEW_REPORT_TGT}' => '',
  69                  '{VIEW_REPORT_LNK}' => '',
  70                  '{PIC_URL}' => $data['p'],
  71                  '{PIC_TGT}' => "{$CONFIG['ecards_more_pic_target']}displayimage.php?pos=-" . $data['pid'],
  72                  '{URL_PREFIX}' => '',
  73                  '{SUBJECT}' => $data['su'],
  74                  '{MESSAGE}' => nl2br(process_smilies($data['m'])),
  75                  '{SENDER_EMAIL}' => $data['se'],
  76                  '{SENDER_NAME}' => $data['sn'],
  77                  '{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
  78                  '{VIEW_MORE_LNK}' => $lang_report_php['view_more_pics'],
  79                  '{REASON}' => $data['r'],
  80                  '{PID}' => $data['pid'],
  81                  );
  82              // Parse template

  83              echo template_eval($template_report, $params);
  84      }
  85  } else {
  86          cpg_die(CRITICAL_ERROR, $lang_displayreport_php['invalid_data'], __FILE__, __LINE__);
  87  }
  88  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]