Hi allemaal
Ik heb een pagina (link onderaan) die niet meer doet wat het wel deed een poosje geleden.
Het is een sendmail script die foto's uit een 4images gallery naar een ingevoerd e-mail
adres moet sturen, en na het versturen moet er een pop-up komen met de tekst zoals die
op regel 65... Helaas werkt deze pop-up niet meer.
Het script werkt verder wel, de foto wordt verzonden.
Heeft iemand enig idee waar dit aan kan liggen ?
mijn dank is groot !!
Regel 65: $returntext = "Hey ! Your requested picture was just mailed to you, check your e-mail promptly !";
link naar site: *snip*
Ik heb een pagina (link onderaan) die niet meer doet wat het wel deed een poosje geleden.
Het is een sendmail script die foto's uit een 4images gallery naar een ingevoerd e-mail
adres moet sturen, en na het versturen moet er een pop-up komen met de tekst zoals die
op regel 65... Helaas werkt deze pop-up niet meer.
Het script werkt verder wel, de foto wordt verzonden.
Heeft iemand enig idee waar dit aan kan liggen ?
mijn dank is groot !!
Regel 65: $returntext = "Hey ! Your requested picture was just mailed to you, check your e-mail promptly !";
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
| $main_template = 'sendemail'; define('GET_CACHES', 1); define('ROOT_PATH', './'); include_once(ROOT_PATH.'global.php'); require(ROOT_PATH.'includes/sessions.php'); $user_access = get_permission(); include_once(ROOT_PATH.'includes/page_header.php'); $returntext = ""; if (!empty($_POST["txtname"])) { include_once("../class/class.phpmailer.php"); $returntext = ""; //select the image data $sql = "SELECT i.image_id, i.image_name, i.cat_id, i.image_media_file, c.cat_name FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c) WHERE i.image_id = $image_id AND c.cat_id = i.cat_id"; $image = $site_db->query_firstrow($sql); if ($image['image_id']) { //check if the user already pass the 3 images $sql = "SELECT COUNT(*) AS c FROM 4images_sendemail WHERE email = '".$_POST["txtemail"]."' AND catid = ".$image['cat_id']; $useremail = $site_db->query_firstrow($sql); //$useremail = 1; if ($useremail['c'] < 6) //if ($useremail < 6) { $path = "/home/partypix/public_html/photos/data/media/".$image['cat_id']."/digicel/".$image['image_media_file']; if (file_exists($path)) { $mail = new PHPMailer(); $mail->From = "yourpic@partypixsuriname.com"; $mail->FromName = "partypix Suriname"; $mail->Mailer = "smtp"; $mail->IsHTML(true); // HTML body $myFile = "partypixsuriname.html"; $fh = fopen($myFile, 'r'); $body = fread($fh, filesize($myFile)); fclose($fh); $imgpath = "http://www.partypixsuriname.com/photos"; $body = str_replace("[path]", $imgpath, $body); $body = str_replace("[name]", $_POST["txtname"], $body); $body = str_replace("[pic]", $image['image_name'], $body); $body = str_replace("[cat]", $image['cat_name'], $body); //echo $body; $mail->Subject = "Your picture from Partypix"; $mail->Body = $body; $mail->AddAddress($_POST["txtemail"], $_POST["txtname"]); $mail->AddAttachment($path, "YourPicture.jpg", "base64", "application/image"); if(!$mail->Send()) $returntext = "There has been a mail error while sending to " . $_POST["txtname"]; else { $returntext = "Hey ! Your requested picture was just mailed to you, check your e-mail promptly !"; //update download counter $sql = "UPDATE ".IMAGES_TABLE." SET image_downloads=image_downloads+1 WHERE image_id=".$image['image_id']; //echo $sql,"<br />"; $site_db->query($sql); //keep the download history $sql = "INSERT INTO 4images_sendemail (imageid, catid, name, email, phone, provider, date) VALUES (".$image['image_id'].", ".$image['cat_id'].", '".$_POST["txtname"]."', '".$_POST["txtemail"]."', '".$_POST["txtphone"]."', '".$_POST["provider"]."', NOW())"; //echo $sql,"<br />"; $site_db->query($sql); } // Clear all addresses and attachments for next loop $mail->ClearAddresses(); $mail->ClearAttachments(); } else $returntext = "Sorry, Image not found"; }else $returntext = "Sorry, you already have 3 pictures sent from this category."; } else $returntext = "Sorry, No Image record anymore"; } |
link naar site: *snip*
[ Voor 0% gewijzigd door Creepy op 28-07-2009 10:27 ]