Geen plaatje te zien na ontvangst in ecard systeem
Ik heb een ecard systeem op onze website gezet, bij de geadresseerde komt de ecard mooi aan maar...... de meegestuurde foto ( groot formaat ) laat hij niet zien?
http://www.scoutsdonk.be/phpECards/index.php?id=CRD05111918425
Weet iemand hoe dit komt ?
Dank u
misschien dit script erbij zetten,
functions.php
Code (php)
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
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
<?php
/***************************************************************************
* functions.php script-name: phpECard *
* --------------------------------------------------------------------- *
* version : 2.1.4 *
* script suport page : http://quick-xs.net/phpecard *
* author email : [email protected] *
* *
***************************************************************************
* *
* The complete functionality of the script is defined in this file. *
* ANYTHING YOU EDIT HERE CAN STOP THE SCRIPT FROM WORKING CORRECT! *
* *
***************************************************************************/
// First lets perform some required actions:
// Include configuration file (phpECard/config.php)
include($_GET['include_path'].'config.php');
// Include default language file
include($_GET['include_path'].'lang_'.$default_language.'.php');
global $lang;
// Function to make links in gallery
function makelink($image_name) {
return $_SERVER['PHP_SELF'].'?'.$_GET['preset_vars'].'card='.$image_name;
}
// Make sure that $action always is "compose" if not "send"
if ($_POST['action'] != 'send')
{
$action = 'compose';
}
// function to test email-syntax, used later on
function IsEmail($mail)
{
return ereg("[A-Za-z0-9_-]+([\.]{1}[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+([\.]{1}[A-Za-z0-9-]+)+", $mail);
}
$_GET['index_url'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$preset_vars;
$_GET['preview_link'] = $_SERVER['PHP_SELF'].'?'.$preset_vars.'id=preview_'.$default_language;
$_GET['include_path'] = $include_path;
$_GET['preset_vars'] = $preset_vars;
// check to see weither an id is defined
if ((IsSet($_GET['id'])) && ($_GET['id'] != ''))
{
// Check to see if id-datafile is present
if(file_exists($_GET['include_path'].'userdata/'.$_GET['id'].'.php'))
{
// Include the datafile and send confirmation back to sender if wanted
include($_GET['include_path'].'userdata/'.$_GET['id'].'.php'); global $id_info;
if ($id_info['notify'] == 'on')
{
$notify_mail_sender = $lang['dear'].' '.$id_info['s_name'].','."\n\n".$id_info['r_name'].' ('.$id_info['r_mail'].')'.$lang['recipient_has_seen']."\n\n".$lang['please_come_back']."\n".$_GET['index_url']."\n\n".$lang['regards']."\n\n".$service_name.' ('.$admin_email.')'.$add;
mail($id_info['s_mail'],$id_info['r_name'].$lang['notify_sender_subject'],$notify_mail_sender, "From: ".$service_name."<".$admin_email.">");
$CRD_info = '<?php $id_info = array(\'notify\' => \'off\',\'sub\' => \''.$id_info['sub'].'\',\'s_name\' => \''.$id_info['s_name'].'\',\'s_mail\' => \''.$id_info['s_mail'].'\',\'r_name\' => \''.$id_info['r_name'].'\',\'r_mail\' => \''.$id_info['r_mail'].'\',\'date\' => \''.$id_info['date'].'\',\'time\' => \''.$id_info['time'].'\',\'card\' => \''.$id_info['card'].'\',\'msg\' => \''.$id_info['msg'].'\', ); ?>';
fwrite(fopen($_GET['include_path'].'userdata/'.$_GET['id'].'.php',"w"),$CRD_info);
}
$card_info = $lang['card_to'].' <u>'.$id_info['r_name'].'</u> - '.$lang['sent_at'].' '.$id_info['date'].', '.$lang['at'].' '.$id_info['time'].$lang['hour'];
$template = 'view';
include($_GET['include_path'].'template.php');
}
// else id is not present
else
{
$template = 'id_error';
include($_GET['include_path'].'template.php');
}
}
// So if no id is defined... lets see weither to send or to compose?
else
{
if ($_POST['action'] == 'send')
{
// Check the variables for IsSet & syntaxis:
if ($_POST['subject'] == '')
{
$error1 = $lang['enter_subject'].'<br><br>';
}
if (($_POST['msg'] == '') or ($_POST['msg'] == $lang['type_msg']))
{
$error2 = $lang['enter_msg'].'<br><br>';
}
if (($_POST['sender_name'] == '') or ($_POST['sender_name'] == $lang['name_here']))
{
$error3 = $lang['enter_sender_name'].'<br><br>';
}
if ((!IsEmail($_POST['sender_email'])) or ($_POST['sender_email'] == ''))
{
$error4 = $lang['enter_sender_email'].'<br><br>';
}
if ($_POST['recipient_name'] == '')
{
$error5 = $lang['enter_recipient_name'].'<br><br>';
}
if ((!IsEmail($_POST['recipient_email'])) or ($_POST['recipient_email'] == ''))
{
$error6 = $lang['enter_recipient_email'].'<br><br>';
}
$error = $error1.$error2.$error3.$error4.$error5.$error6;
if ($error == '')
{
// So the form is submitted and there are no errors
// ... now we can save the data and email the recipient
$count = fread(fopen($_GET['include_path'].'userdata/count.txt',"r"),4096) + 1;
fwrite(fopen($_GET['include_path'].'userdata/count.txt',"w+"),$count);
$id = 'CRD'.date("ymdHi").$count;
$view_card_url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_GET['preset_vars'].'id='.$id;
$CRD_info = '<?php $id_info = array(\'notify\' => \''.$_POST['notify_sender'].'\',\'sub\' => \''.htmlspecialchars($_POST['subject']).'\',\'s_name\' => \''.htmlspecialchars($_POST['sender_name']).'\',\'s_mail\' => \''.$_POST['sender_email'].'\',\'r_name\' => \''.htmlspecialchars($_POST['recipient_name']).'\',\'r_mail\' => \''.$_POST['recipient_email'].'\',\'date\' => \''.date("d-m-Y").'\',\'time\' => \''.date("H:i").'\',\'card\' => \''.$_POST['card'].'\',\'msg\' => \''.htmlspecialchars(stripslashes($_POST['msg'])).'\', ); ?>';
fwrite(fopen($_GET['include_path'].'userdata/'.$id.'.php',"w+"),$CRD_info);
$notify_mail_recipient = $lang['dear_recipient']."\n\n".$lang['sender_has_sent']."\n\n". $lang['get_card_here'] ."\n".$view_card_url."\n\n". $lang['time_limit']."\n\n". $lang['regards'] ."\n\n".$service_name.' ('.$admin_email.')'.$add;
mail($_POST['recipient_email'],$lang['notify_recipient_subject'],$notify_mail_recipient, "From: ".$service_name."<".$admin_email.">");
if ($_POST['notify_sender'] != 'on')
{
$lang['card_viewed_confirm'] = '';
}
$template = 'sent';
include($_GET['include_path'].'template.php');
}
// Else if no sending is wanted or if there are errors ...
elseif ($error != '')
{
$action = 'compose';
}
}
if ($action == 'compose')
{
if (((!IsSet($_GET['card'])) or ($_GET['card'] == '')) and ((!IsSet($_POST['card'])) or ($_POST['card'] == '')))
{
// Show gallery
include($_GET['include_path'].'_gallery.php');
}
else
{
// Check input fields for IsSet, if not assign defaults
if ((!IsSet($_POST['msg'])) or ($_POST['msg'] == ''))
{
$msg_echo = $lang['type_msg'];
}
else
{
$msg_echo = $_POST['msg'];
}
if ((!IsSet($_POST['sender_email'])) or ($_POST['sender_email'] == ''))
{
$sender_email_echo = $lang['email_here'];
}
else
{
$sender_email_echo = $_POST['sender_email'];
}
if ((!IsSet($_POST['sender_name'])) or ($_POST['sender_name'] == ''))
{
$sender_name_echo = $lang['name_here'];
}
else
{
$sender_name_echo = $_POST['sender_name'];
}
// Include compose-template
$template = 'compose';
include($_GET['include_path'].'template.php');
}
}
}
// Next line is a footer message to promote this script, please leave intact!
echo('<center><font style="color:#000000; font: 12px Arial;"><i>Powered by: <a href="http://www.quick-xs.net/phpecard" target="_blank">phpECard</a></i></font></center>');
?>
/***************************************************************************
* functions.php script-name: phpECard *
* --------------------------------------------------------------------- *
* version : 2.1.4 *
* script suport page : http://quick-xs.net/phpecard *
* author email : [email protected] *
* *
***************************************************************************
* *
* The complete functionality of the script is defined in this file. *
* ANYTHING YOU EDIT HERE CAN STOP THE SCRIPT FROM WORKING CORRECT! *
* *
***************************************************************************/
// First lets perform some required actions:
// Include configuration file (phpECard/config.php)
include($_GET['include_path'].'config.php');
// Include default language file
include($_GET['include_path'].'lang_'.$default_language.'.php');
global $lang;
// Function to make links in gallery
function makelink($image_name) {
return $_SERVER['PHP_SELF'].'?'.$_GET['preset_vars'].'card='.$image_name;
}
// Make sure that $action always is "compose" if not "send"
if ($_POST['action'] != 'send')
{
$action = 'compose';
}
// function to test email-syntax, used later on
function IsEmail($mail)
{
return ereg("[A-Za-z0-9_-]+([\.]{1}[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+([\.]{1}[A-Za-z0-9-]+)+", $mail);
}
$_GET['index_url'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$preset_vars;
$_GET['preview_link'] = $_SERVER['PHP_SELF'].'?'.$preset_vars.'id=preview_'.$default_language;
$_GET['include_path'] = $include_path;
$_GET['preset_vars'] = $preset_vars;
// check to see weither an id is defined
if ((IsSet($_GET['id'])) && ($_GET['id'] != ''))
{
// Check to see if id-datafile is present
if(file_exists($_GET['include_path'].'userdata/'.$_GET['id'].'.php'))
{
// Include the datafile and send confirmation back to sender if wanted
include($_GET['include_path'].'userdata/'.$_GET['id'].'.php'); global $id_info;
if ($id_info['notify'] == 'on')
{
$notify_mail_sender = $lang['dear'].' '.$id_info['s_name'].','."\n\n".$id_info['r_name'].' ('.$id_info['r_mail'].')'.$lang['recipient_has_seen']."\n\n".$lang['please_come_back']."\n".$_GET['index_url']."\n\n".$lang['regards']."\n\n".$service_name.' ('.$admin_email.')'.$add;
mail($id_info['s_mail'],$id_info['r_name'].$lang['notify_sender_subject'],$notify_mail_sender, "From: ".$service_name."<".$admin_email.">");
$CRD_info = '<?php $id_info = array(\'notify\' => \'off\',\'sub\' => \''.$id_info['sub'].'\',\'s_name\' => \''.$id_info['s_name'].'\',\'s_mail\' => \''.$id_info['s_mail'].'\',\'r_name\' => \''.$id_info['r_name'].'\',\'r_mail\' => \''.$id_info['r_mail'].'\',\'date\' => \''.$id_info['date'].'\',\'time\' => \''.$id_info['time'].'\',\'card\' => \''.$id_info['card'].'\',\'msg\' => \''.$id_info['msg'].'\', ); ?>';
fwrite(fopen($_GET['include_path'].'userdata/'.$_GET['id'].'.php',"w"),$CRD_info);
}
$card_info = $lang['card_to'].' <u>'.$id_info['r_name'].'</u> - '.$lang['sent_at'].' '.$id_info['date'].', '.$lang['at'].' '.$id_info['time'].$lang['hour'];
$template = 'view';
include($_GET['include_path'].'template.php');
}
// else id is not present
else
{
$template = 'id_error';
include($_GET['include_path'].'template.php');
}
}
// So if no id is defined... lets see weither to send or to compose?
else
{
if ($_POST['action'] == 'send')
{
// Check the variables for IsSet & syntaxis:
if ($_POST['subject'] == '')
{
$error1 = $lang['enter_subject'].'<br><br>';
}
if (($_POST['msg'] == '') or ($_POST['msg'] == $lang['type_msg']))
{
$error2 = $lang['enter_msg'].'<br><br>';
}
if (($_POST['sender_name'] == '') or ($_POST['sender_name'] == $lang['name_here']))
{
$error3 = $lang['enter_sender_name'].'<br><br>';
}
if ((!IsEmail($_POST['sender_email'])) or ($_POST['sender_email'] == ''))
{
$error4 = $lang['enter_sender_email'].'<br><br>';
}
if ($_POST['recipient_name'] == '')
{
$error5 = $lang['enter_recipient_name'].'<br><br>';
}
if ((!IsEmail($_POST['recipient_email'])) or ($_POST['recipient_email'] == ''))
{
$error6 = $lang['enter_recipient_email'].'<br><br>';
}
$error = $error1.$error2.$error3.$error4.$error5.$error6;
if ($error == '')
{
// So the form is submitted and there are no errors
// ... now we can save the data and email the recipient
$count = fread(fopen($_GET['include_path'].'userdata/count.txt',"r"),4096) + 1;
fwrite(fopen($_GET['include_path'].'userdata/count.txt',"w+"),$count);
$id = 'CRD'.date("ymdHi").$count;
$view_card_url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_GET['preset_vars'].'id='.$id;
$CRD_info = '<?php $id_info = array(\'notify\' => \''.$_POST['notify_sender'].'\',\'sub\' => \''.htmlspecialchars($_POST['subject']).'\',\'s_name\' => \''.htmlspecialchars($_POST['sender_name']).'\',\'s_mail\' => \''.$_POST['sender_email'].'\',\'r_name\' => \''.htmlspecialchars($_POST['recipient_name']).'\',\'r_mail\' => \''.$_POST['recipient_email'].'\',\'date\' => \''.date("d-m-Y").'\',\'time\' => \''.date("H:i").'\',\'card\' => \''.$_POST['card'].'\',\'msg\' => \''.htmlspecialchars(stripslashes($_POST['msg'])).'\', ); ?>';
fwrite(fopen($_GET['include_path'].'userdata/'.$id.'.php',"w+"),$CRD_info);
$notify_mail_recipient = $lang['dear_recipient']."\n\n".$lang['sender_has_sent']."\n\n". $lang['get_card_here'] ."\n".$view_card_url."\n\n". $lang['time_limit']."\n\n". $lang['regards'] ."\n\n".$service_name.' ('.$admin_email.')'.$add;
mail($_POST['recipient_email'],$lang['notify_recipient_subject'],$notify_mail_recipient, "From: ".$service_name."<".$admin_email.">");
if ($_POST['notify_sender'] != 'on')
{
$lang['card_viewed_confirm'] = '';
}
$template = 'sent';
include($_GET['include_path'].'template.php');
}
// Else if no sending is wanted or if there are errors ...
elseif ($error != '')
{
$action = 'compose';
}
}
if ($action == 'compose')
{
if (((!IsSet($_GET['card'])) or ($_GET['card'] == '')) and ((!IsSet($_POST['card'])) or ($_POST['card'] == '')))
{
// Show gallery
include($_GET['include_path'].'_gallery.php');
}
else
{
// Check input fields for IsSet, if not assign defaults
if ((!IsSet($_POST['msg'])) or ($_POST['msg'] == ''))
{
$msg_echo = $lang['type_msg'];
}
else
{
$msg_echo = $_POST['msg'];
}
if ((!IsSet($_POST['sender_email'])) or ($_POST['sender_email'] == ''))
{
$sender_email_echo = $lang['email_here'];
}
else
{
$sender_email_echo = $_POST['sender_email'];
}
if ((!IsSet($_POST['sender_name'])) or ($_POST['sender_name'] == ''))
{
$sender_name_echo = $lang['name_here'];
}
else
{
$sender_name_echo = $_POST['sender_name'];
}
// Include compose-template
$template = 'compose';
include($_GET['include_path'].'template.php');
}
}
}
// Next line is a footer message to promote this script, please leave intact!
echo('<center><font style="color:#000000; font: 12px Arial;"><i>Powered by: <a href="http://www.quick-xs.net/phpecard" target="_blank">phpECard</a></i></font></center>');
?>
fwrite(fopen($_GET['include_path'].'userdata/'.$id.'.php',"w+"),$CRD_info);
Dat kan je gewoon niet doen. Superonveilig.
Er staat: images/.jpg
Dus in die richting moet je zoeken...
Waar haalt hij de variabele $image_name vandaan?