Cpg1.4.2 > Cpg142 / Displayreport.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Cpg1.4.2

Download:
cpg1.4.2.zip

Category:
Image Galleries

Archive Content:

Cpg142

Cpg142 > Albums > Edit

Cpg142 > Albums

Cpg142 > Albums > Userpics

Cpg142

Cpg142 > Bridge

Cpg142

Cpg142 > Docs

Cpg142 > Docs > Pics

Cpg142 > Docs

Cpg142 > Docs > Theme

Cpg142 > Docs

Cpg142

Cpg142 > Images

Cpg142 > Images > Flags

Cpg142 > Images

Cpg142 > Images > Smiles

Cpg142 > Images

Cpg142

Cpg142 > Include

Cpg142 > Include > Makers

Cpg142 > Include

Cpg142

Cpg142 > Lang

Cpg142

Cpg142 > Logs

Cpg142

Cpg142 > Plugins > Sample

Cpg142 > Plugins > Sef Urls

Cpg142

Cpg142 > Sql

Cpg142

Cpg142 > Themes > Classic > Images

Cpg142 > Themes > Classic

Cpg142 > Themes > Eyeball > Images

Cpg142 > Themes > Eyeball

Cpg142 > Themes > Fruity > Images

Cpg142 > Themes > Fruity

Cpg142 > Themes > Hardwired > Images

Cpg142 > Themes > Hardwired

Cpg142 > Themes > Igames > Images

Cpg142 > Themes > Igames

Cpg142 > Themes > Mac Ox X > Images

Cpg142 > Themes > Mac Ox X

Cpg142 > Themes > Project Vii > Images

Cpg142 > Themes > Project Vii

Cpg142 > Themes > Rainy Day > Images

Cpg142 > Themes > Rainy Day

Cpg142 > Themes > Sample > Images

Cpg142 > Themes > Sample

Cpg142 > Themes > Water Drop > Images

Cpg142 > Themes > Water Drop

Cpg142

Displayreport.php:


<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  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; either version 2 of the License,  or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.2
  $Source: /cvsroot/coppermine/devel/displayreport.php, v $
  $Revision: 1.7 $
  $Author: gaugau $
  $Date: 2005/10/25 01:15:42 $
**********************************************/

define('IN_COPPERMINE',  true);
define('DISPLAYREPORT_PHP',  true);

require(
'include/init.inc.php');
require(
'include/smilies.inc.php');

if (!
GALLERY_ADMIN_MODE) {
    
cpg_die(ERROR,  $lang_errors['access_denied'],  __FILE__,  __LINE__);
}

if (!isset(
$_GET['data'])) cpg_die(CRITICAL_ERROR,  $lang_errors['param_missing'],  __FILE__,  __LINE__);

$data = array();
$data = @unserialize(@base64_decode($_GET['data']));

if (
is_array($data)) {

// Remove HTML tags as we can't trust what we receive
//foreach($data as $key => $value) $data[$key] = strtr($value,  $HTML_SUBST);
// Load template parameters
    
if ($data['t'] == 'comment') {
        
$params = array('{LANG_DIR}' => $lang_text_dir,
            
'{TITLE}' => sprintf($lang_report_php['report_subject'],  $data['sn'],  $data['t']),
            
'{CHARSET}' => $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'],
            
'{VIEW_REPORT_TGT}' => '',
            
'{VIEW_REPORT_LNK}' => '',
            
'{URL_PREFIX}' => '',
            
'{SUBJECT}' => $data['su'],
            
'{MESSAGE}' => nl2br(process_smilies($data['m'])),
            
'{SENDER_EMAIL}' => $data['se'],
            
'{SENDER_NAME}' => $data['sn'],
            
'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
            
'{VIEW_MORE_LNK}' => $lang_report_php['view_more_pics'],
            
'{REASON}' => $data['r'],
            
'{COMMENT}' => $data['c'],
            
'{COMMENT_ID}' => $data['cid'],
            
'{VIEW_COMMENT_LNK}' => $lang_report_php['view_comment'],
            
'{COMMENT_LNK}' => $lang_report_php['go_comment'],
            
'{COMMENT_TGT}' => "{$CONFIG['ecards_more_pic_target']}displayimage.php?pos=-" $data['pid'] . "#comment" $data['cid'],
            
'{PID}' => $data['pid'],
            );
        
// Parse template if report is on a comment
        
echo template_eval($template_report_comment,  $params);

    } else {
            
$params = array('{LANG_DIR}' => $lang_text_dir,
                
'{TITLE}' => sprintf($lang_report_php['report_subject'],  $data['sn'],  $data['t']),
                
'{CHARSET}' => $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'],
                
'{VIEW_REPORT_TGT}' => '',
                
'{VIEW_REPORT_LNK}' => '',
                
'{PIC_URL}' => $data['p'],
                
'{PIC_TGT}' => "{$CONFIG['ecards_more_pic_target']}displayimage.php?pos=-" $data['pid'],
                
'{URL_PREFIX}' => '',
                
'{SUBJECT}' => $data['su'],
                
'{MESSAGE}' => nl2br(process_smilies($data['m'])),
                
'{SENDER_EMAIL}' => $data['se'],
                
'{SENDER_NAME}' => $data['sn'],
                
'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
                
'{VIEW_MORE_LNK}' => $lang_report_php['view_more_pics'],
                
'{REASON}' => $data['r'],
                
'{PID}' => $data['pid'],
                );
            
// Parse template
            
echo template_eval($template_report,  $params);
    }
} else {
        
cpg_die(CRITICAL_ERROR,  $lang_displayreport_php['invalid_data'],  __FILE__,  __LINE__);
}
?>



Other Image Galleries Scripts:

WebMaster Resources Home

©RingsWorld.com