Mr H
05-11-2003, 02:38 PM
I'm trying to make more email address spaces available so that when someone is referring friends they can add 5-10 friends instead of only being able to add 3. I tried just copying the friend 2 and friend 3 lines, and making them friend4 and friend5 but that did not work. Any ideas on how I can do this?
<?php
error_reporting(7);
require('./global.php');
if (!isset($action)) {
$action = 'compose';
} else {
$action = 'send';
}
// check to see if they're logged in
if ($bbuserinfo[userid]) {
if ($action == 'compose') {
//default email title
$defaulttitle = "Come check out the $bbtitle forums!";
//default email message
$defaultmessage = "Hey,\n\nI would like to introduce you to a great community that I enjoy and think you would enjoy too. It's a fun place with great members and a lot of activity. If you want to get rid of your boredom, or just need a place to hang out on the net, please come join me at the $bbtitle forums.\n\nTo check it out, click here (or copy and paste the url in your web browser): $bburl/index.php?s=&referrerid=$bbuserinfo[userid]\n\nThanks, and I hope to see you soon. :)\n\n-$bbuserinfo[username]";
// load up main referral page
eval("dooutput(\"".gettemplate('refer')."\");");
}
if ($action == 'send') {
// build mailing list
$to = $friend1;
if ($friend2 != "") {
$to .= ",".$friend2;
}
if ($friend3 != "") {
$to .= ",".$friend3;
}
// check that required fields are not blank
if ($friend1 == "" or $name == "" or $message == "") {
// if a field is blank, get error
eval("dooutput(\"".gettemplate('refer_error')."\");");
} else {
// if error free, then send mail
mail($to,$title,$message,"From: $bbuserinfo[email] ($name)");
// give thank you/sent message
eval("dooutput(\"".gettemplate('refer_sent')."\");");
}
}
} else {
// if guest/not logged in, show error
eval("dooutput(\"".gettemplate('refer_error')."\");");
}
?>
<?php
error_reporting(7);
require('./global.php');
if (!isset($action)) {
$action = 'compose';
} else {
$action = 'send';
}
// check to see if they're logged in
if ($bbuserinfo[userid]) {
if ($action == 'compose') {
//default email title
$defaulttitle = "Come check out the $bbtitle forums!";
//default email message
$defaultmessage = "Hey,\n\nI would like to introduce you to a great community that I enjoy and think you would enjoy too. It's a fun place with great members and a lot of activity. If you want to get rid of your boredom, or just need a place to hang out on the net, please come join me at the $bbtitle forums.\n\nTo check it out, click here (or copy and paste the url in your web browser): $bburl/index.php?s=&referrerid=$bbuserinfo[userid]\n\nThanks, and I hope to see you soon. :)\n\n-$bbuserinfo[username]";
// load up main referral page
eval("dooutput(\"".gettemplate('refer')."\");");
}
if ($action == 'send') {
// build mailing list
$to = $friend1;
if ($friend2 != "") {
$to .= ",".$friend2;
}
if ($friend3 != "") {
$to .= ",".$friend3;
}
// check that required fields are not blank
if ($friend1 == "" or $name == "" or $message == "") {
// if a field is blank, get error
eval("dooutput(\"".gettemplate('refer_error')."\");");
} else {
// if error free, then send mail
mail($to,$title,$message,"From: $bbuserinfo[email] ($name)");
// give thank you/sent message
eval("dooutput(\"".gettemplate('refer_sent')."\");");
}
}
} else {
// if guest/not logged in, show error
eval("dooutput(\"".gettemplate('refer_error')."\");");
}
?>