// confirmation sent
if (isset($cfg['returnto_conf']) && $cfg['returnto_conf'] != '') { header('Location: '.$cfg['returnto_conf']); }
else {
printf($cfg['template'], 'KLIKNIJ ABY ZATWIERDZIC', 'http://www.club-acme.pl/txtlist/?type=confirm&email='.$addr.' '); }
}
else {
Chciałbym zrobić z tego link (http://www... )
caly plik index.php
<?
require('config.inc.php');
require('functions.inc.php');
// Max execution time of script. This does not include sleep time, so only restricts time
// allowed for mailing.
$type = $_GET['type'];
if ($type == 'sub') {
// subscribe address. Actually, all it does is send the confirmation email
if (!preg_match('#^([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+[^\".,?! ])$#i', $addr)) { $err = 'Your email address appears to be invalid.';
}
$f = openfile($cfg['listfile']);
$exists = false;
while ($item = readitem($f)) {
if ($item['addr'] == $addr) {$exists = true;break;}
}
if ($exists) {
$err = 'That address is already subscribed to the list.';
}
}
// send confirmation email
$headers = 'From: '.$cfg['from'];
if ($cfg['headers']) {
foreach ($cfg['headers'] as $val) $headers .= "\n".$val;
}
$headers .= "\n".$cfg['header_plain'];
if (!@mail($addr, $cfg['subj_conf'], sprintf($cfg['msg_conf'], '?type=confirm&email='.urlencode($addr)), $headers)) { $err = 'There was an error sending the confirmation email. Please try again later.';
}
}
// confirmation sent
if (isset($cfg['returnto_conf']) && $cfg['returnto_conf'] != '') { header('Location: '.$cfg['returnto_conf']); }
else {
printf($cfg['template'], 'KLIKNIJ ABY ZATWIERDZIC', 'http://www.club-acme.pl/txtlist/?type=confirm&email='.$addr.' '); }
}
else {
// problem with subscription
echoerr($err);
}
}
elseif ($type == 'unsub') {
// unsubscribe address
$f = openfile($cfg['listfile']);
$exists = false;
while ($item = readitem($f)) {
if ($item['addr'] == $addr) {$exists = true;break;}
}
if ($exists) {
delitem($f, $item['id']);
}
else {
$err = 'That address was not found.';
}
// unsubscribe successful
if (isset($cfg['returnto_unsub']) && $cfg['returnto_unsub'] != '') { header('Location: '.$cfg['returnto_unsub']); }
else {
printf($cfg['template'], 'Unsubscribed', 'Your address, '.$addr.' has successfully been unsubscribed from our mailing list.'); }
}
else {
// problem with unsubscription
echoerr($err);
}
}
elseif ($type == 'confirm') {
// subscribe a confirmed address
if (!preg_match('#^([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+[^\".,?! ])$#i', $addr)) { $err = 'Your email address appears to be invalid. If you are pasting the URL from your confirmation email, make sure the URL wasn\'t split into two lines.';
}
$f = openfile($cfg['listfile']);
$exists = false;
while ($item = readitem($f)) {
if ($item['addr'] == $addr) {$exists = true;break;}
}
if ($exists) {
$err = 'That address is already subscribed to the list.';
}
}
// subscribe successful
writeitem($f, $addr);
if (isset($cfg['returnto_sub']) && $cfg['returnto_sub'] != '') { header('Location: '.$cfg['returnto_sub']); }
else {
printf($cfg['template'], 'Subscribed', 'Your address, '.$addr.', is now subscribed to our mailing list!'); }
}
else {
// problem with subscription
echoerr($err);
}
}
function echoerr($err) {
printf($GLOBALS['cfg']['template'], 'Error', '<font color="red">Error: '.$err.'</font>'); }
?>
<?
// Change these login details first!
$cfg['uname'] = 'deejey90';
$cfg['pword'] = 'dawidek321';
// The default FROM address, and the address subscription confirmation emails will come from.
$cfg['from'] = 'deejey90@gmail.com';
// The address to which CC'd emails and test emails will be sent.
$cfg['ccaddress'] = 'deejey90@gmail.com';
// When sending, txtList will pause every pauseinterval'th email, for pausetime seconds.
$cfg['pauseinterval'] = 100;
// Number of seconds to pause at each pauseinterval.
$cfg['pausetime'] = 3;
// The file storing the list of email addresses. Move it for security.
$cfg['listfile'] = 'mailing.txt';
// The subject of the confirmation email
$cfg['subj_conf'] = 'Dodawanie e-mailu do newslettera ACME MUSIC CLUB';
// The body of the confirmation email. Note the confirmation URL: it must point to the same place
// the subscribe / unsubscribe form does, and the %s characters must appear at the end.
$cfg['msg_conf'] = "Czesc,
Aby dodac swoj adres do newslettera strony www.club-acme.pl, wystarczy kliknac w link.
link: <a href="http://www.club-acme.pl/txtlist/%s";" target="_blank">http://www.club-acme.pl/txtlist/%s";</a>
// These three values are optional URLs to which to redirect, instead of displaying the default
// success messages. Currently, error messages are always displayed in the standard
// template. Note: URLs must be absolute, e.g. <a href="http://mysite.com/subscribe.html" target="_blank">http://mysite.com/subscribe.html</a>, not subscribe.html
// Page to redirect to after confirmation email is sent.
$cfg['returnto_conf'] = '';
// Page to redirect to after successful subscription.
$cfg['returnto_sub'] = '';
// Page to redirect to after unsubscription.
$cfg['returnto_unsub'] = '';
// This is the default template for success and error pages. The two '%s' identifiers are replaced
// by the title and body of the page, in that order. Use %% to represent literal %.
$cfg['template'] = '
<html><head><title>Newsletter: %s</title>
<style type="text/css">
body {font-family: Arial; font-size: 10pt;}
.smalltxt A {font-size: 8pt; color: #cdcdcd;position:absolute;top:85%%;left:65%%}
</style></head><body>
<div align="center">
%s
<br><br><br><br><a href="java script:window.close()">Close</a></div><br><div align="right" class="smalltxt"><a href="http://www.club-acme.pl" target="_new"> deejey90</a></div></body></html>';
// Additional headers to apply to outgoing emails.
$cfg['headers'][] = 'Mime-Version: 1.0';
$cfg['headers'][] = 'Content-Transfer-Encoding: 8bit';
// The HTML and plaintext headers are applied depending on the mail type. You may need to change
// the charset attribute if you use a different character set.
$cfg['header_html'] = 'Content-type: text/html; charset="iso-8859-1"';
$cfg['header_plain'] = 'Content-type: text/plain; charset="iso-8859-1"';
// Specifies whether to archive emails sent to the list. This must be on for send resuming to be an
// option. true = on, false = off.
$cfg['savemail'] = true;
// Specifies the directory to which to save archived emails. Do not include a trailing slash!
// If you want to indicate the current directory, use '.'
$cfg['savemailto'] = 'archive';
// Specifies whether to save resume data as emails are sent. If disabled, you cannot
// resume a failed send. This option has no effect unless savemail is on. true = on, false = off.
$cfg['enableresume'] = true;
?>
okienko ktore wyskakuje po wpisaniu adresu email
body {font-family: Arial; font-size: 10pt;}
.smalltxt A {font-size: 8pt; color: #cdcdcd;position:absolute;top:85%;left:65%}
<a href="http://www.club-acme.pl/txtlist/?type=conf...=deejeyff@o2.pl" target="_blank">http://www.club-acme.pl/txtlist/?type=conf...=deejeyff@o2.pl
</a> <br><br><br><br><a href="java script:window.close()">Close
</a></div><br><div align="right" class="smalltxt"><a href="http://www.club-acme.pl" target="_new"> deejey90
</a></div></body></html>
Podpowie mi ktoś jak to zmienic? Dopiero się ucze , a nawet w necie nie ma nic na ten temat.... Wszedzie piszą że trzeba użyć <a href="link" target="_new">tekst</a> i itp a mi wtedy wyskakuje ze jest blad w 44 linijce...