Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?php
2
/*************************
3
  Coppermine Photo Gallery
4
  ************************
5
  Copyright (c) 2003-2005 Coppermine Dev Team
6
  v1.1 originaly 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.3.3
14
  $Source: /cvsroot/coppermine/stable/displayecard.php,v $
15
  $Revision: 1.6 $
16
  $Author: gaugau $
17
  $Date: 2005/04/19 03:17:10 $
18
**********************************************/
19
 
20
define('IN_COPPERMINE', true);
21
define('DISPLAYECARD_PHP', true);
22
 
23
require('include/init.inc.php');
24
require('include/smilies.inc.php');
25
 
26
if (!isset($HTTP_GET_VARS['data'])) cpg_die(CRITICAL_ERROR, $lang_errors['param_missing'], __FILE__, __LINE__);
27
 
28
$data = array();
29
$data = @unserialize(@base64_decode($HTTP_GET_VARS['data']));
30
 
31
if (!is_array($data)) {
32
    cpg_die(CRITICAL_ERROR, 'Sorry but e-card data have been corrupted by your mail client', __FILE__, __LINE__);
33
}
34
// Remove HTML tags as we can't trust what we receive
35
foreach($data as $key => $value) $data[$key] = strtr($value, $HTML_SUBST);
36
// Load template parameters
37
$params = array('{LANG_DIR}' => $lang_text_dir,
38
    '{TITLE}' => sprintf($lang_ecard_php['ecard_title'], $data['sn']),
39
    '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
40
    '{VIEW_ECARD_TGT}' => '',
41
    '{VIEW_ECARD_LNK}' => '',
42
    '{PIC_URL}' => $data['p'],
43
    '{URL_PREFIX}' => '',
44
    '{GREETINGS}' => $data['g'],
45
    '{MESSAGE}' => nl2br(process_smilies($data['m'])),
46
    '{SENDER_EMAIL}' => $data['se'],
47
    '{SENDER_NAME}' => $data['sn'],
48
    '{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
49
    '{VIEW_MORE_LNK}' => $lang_ecard_php['view_more_pics'],
50
    );
51
// Parse template
52
echo template_eval($template_ecard, $params);
53
ob_end_flush();
54
 
55
?>