Name | E-mail | Website | Country | Fave"; } ?> Add'; ?> Edit | Delete |
-$name $email | $url | $country | ";
if (isset($favefield) && $favefield == "yes") echo "" . str_replace('|', ',', $fave) . " | ";
-
- if (isset($_GET['s']) && $_GET['s'] == "newbies")
- echo ' | ';
-
+
+ if (isset($_GET['s']) && $_GET['s'] == "newbies")
+ echo ' | ';
+
echo ' | ';
echo ' | ';
echo "\r\n";
@@ -87,7 +103,7 @@ if (isset($_COOKIE['bellabuffs'])) {
if (isset($_POST['appr']) && is_array($_POST['appr'])) {
$newbies = file(NEWBIES);
$approved = array();
-
+
foreach ($_POST['appr'] as $member => $value) {
if (is_numeric($member) && array_key_exists($member, $newbies)) {
$approved[] = $newbies[$member];
@@ -106,19 +122,21 @@ if (isset($_COOKIE['bellabuffs'])) {
while ($i < $apprAmount) {
list($name,$email,$dispemail,$url,$country,$fave) = preg_split("/,(?! )/",$approved[$i]);
- $subject = "You have been approved at $title";
+ // Recipients
+ $mail->setFrom($admin_email, $title);
+ $mail->addAddress(fixEmail($email), $name);
+ $mail->addReplyTo($admin_email);
- $message = $approvalMsg;
- $message .= "Name: {$name} \r\n";
- $message .= "Email: " . fixEmail($email) . " \r\n";
- $message .= "URL: {$url} \r\n";
- $message .= "Country: {$country} \r\n";
- if (isset($favefield) && $favefield == "yes") $message .= strip_tags($favetext) . ": {$fave} \r\n";
+ $mail->Subject = "You have been approved at $title";
- if (strstr($_SERVER['SERVER_SOFTWARE'], "Win")) $headers = "From: $admin_email \n";
- else $headers = "From: $title <$admin_email> \n";
+ $mail->Body = $approvalMsg;
+ $mail->Body .= "Name: {$name} \r\n";
+ $mail->Body .= "Email: " . fixEmail($email) . " \r\n";
+ $mail->Body .= "URL: {$url} \r\n";
+ $mail->Body .= "Country: {$country} \r\n";
+ if (isset($favefield) && $favefield == "yes") $mail->Body .= strip_tags($favetext) . ": {$fave} \r\n";
- mail(fixEmail($email),$subject,$message,$headers);
+ $mail->send();
$i++;
}
@@ -128,17 +146,17 @@ if (isset($_COOKIE['bellabuffs'])) {
if ($defaultSort == "newest") {
$newmembers = implode("", $approved) . "\r\n";
$olddata = file_get_contents(MEMBERS);
-
+
$fp = fopen(MEMBERS, "w");
fwrite($fp, $newmembers);
fclose($fp);
-
+
$fp = fopen(MEMBERS, "a") or die ("Couldn't open members.txt");
fwrite($fp, $olddata);
fclose($fp);
} elseif ($defaultSort == "oldest") {
$newmembers = "\r\n" . implode("", $approved);
-
+
$fp = fopen(MEMBERS, "a") or die ("Couldn't open members.txt");
fwrite($fp, $newmembers);
fclose($fp);
@@ -156,7 +174,7 @@ if (isset($_COOKIE['bellabuffs'])) {
fwrite($fp, $update);
fclose($fp);
}
-
+
blanklinefix(NEWBIES);
blanklinefix(MEMBERS);
@@ -164,12 +182,12 @@ if (isset($_COOKIE['bellabuffs'])) {
}
if (isset($_POST['del']) && is_array($_POST['del'])) {
if (isset($_POST['fileloc']))
- $fileloc = basename($_POST['fileloc']);
+ $fileloc = basename($_POST['fileloc']);
else exit;
-
+
$members = file(MEMBERS);
$newbies = file(NEWBIES);
-
+
foreach ($_POST['del'] as $member => $file) {
if (is_numeric($member)) {
if ($fileloc == "newbies.txt" && array_key_exists($member, $newbies)) unset($newbies[$member]);
@@ -177,18 +195,18 @@ if (isset($_COOKIE['bellabuffs'])) {
}
}
if ($fileloc == "newbies.txt") $backlink = 'Delete other pending members?'; else $backlink = 'Delete other approved members?';
-
+
$members = implode("", $members);
$newbies = implode("", $newbies);
$fh = fopen(MEMBERS, "w");
fwrite($fh, $members);
fclose($fh);
-
+
$fb = fopen(NEWBIES, "w");
fwrite($fb, $newbies);
fclose($fb);
-
+
echo 'Member(s) deleted.
';
}
echo 'Jump to: members / pending members
';
@@ -204,11 +222,11 @@ if (isset($_COOKIE['bellabuffs'])) {
} elseif (!isset($_GET['file']) || $_GET['file'] == "" || !file_exists($_GET['file'])) {
echo "You didn't select a valid file.
";
include('footer.php');
- exit;
+ exit;
} else {
if (is_numeric($_GET['mem'])) $mem = $_GET['mem']; else exit("Oops, not a valid member number.");
if (file_exists($_GET['file'])) $file = $_GET['file']; else exit("Oops, the important .txt files don't exist!");
-
+
$fh = fopen($file, "r");
while(!feof($fh)) {
$content[] = fgets($fh, 4096);
@@ -244,7 +262,7 @@ if (isset($_COOKIE['bellabuffs'])) {
-
+
The following word is now blacklisted:\n\n{$_POST['spamword']}
\n\n";
@@ -439,7 +457,7 @@ if (isset($_COOKIE['bellabuffs'])) {