Location: PHPKode > scripts > TeamMailer > teammailer/index.php
<? 
// Team Mailer was written by Dominic Zschokke, ©2004 artisfaction.com Ltd, Switzerland.
// This script is licensed under the GPL, see the license that comes with this script.
// Using this script for spamming purposes is STRICTLY FORBIDDEN! This is our addition to the GPL.
// Violation of this additional condition or even the intention of violating it,
// cancels your right to use, modify or distribute this script.
// Enjoy this script and please let me know how happy you are with it: hide@address.com

include "config.php";

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Team Mailer v.1.0 : <? echo"$team_name";  ?></title>
<style type="text/css">
	a:link {font-weight:bold; font-size:12px;color:#A5115A;}
	a:visited {font-weight:bold; font-size:12px;color:#A5115A;}
	a:hover {  text-decoration: none; color:#A5115A;}
	body,td{font-family:verdana,arial;font-size:13px;}
	h1{font-family:verdana,arial;font-size:24px;color:white;font-weight:bold;}
	li{font-size:11px;padding-bottom:5px;padding-top:5px;border-bottom:1px dashed #FFFFFF;}
	small{font-size:10px;}
   </style>
</head>
<body bgcolor="#3A7BCF">
<form action="teammailer.php" method="POST"><table cellpadding="4" cellspacing="0" border="0" bgcolor="#AFCDF3"><tbody><tr><td valign="top"><h1>Team Mailer</h1>
The subject, your name and the message can't be empty! The greeting message is personalised by the system.
<table cellpadding="4" cellspacing="0" border="0"><tbody>
<tr><td align=right><b>Subject:</b></td><td><input type="text" name="subj" size="30"></td></tr><tr>
<td align="right"><b>Your name:</b></td><td>
<?
$lines = array();
if(file_exists($list)){
	$fp = fopen("$list","r");
	
	while(!feof($fp)){
		$line = fgets($fp,4096);
		array_push($lines,$line);
	}
	fclose($fp);
	
	$selectfield = "<select name=\"mali\"><option value=\"\">You are?</option>";
	
	foreach($lines as $data){
		if($data != "" && $data != "\n"){
			$elem = explode(";",$data);
			$name = $elem[1];
			$email = $elem[2];
			$email = str_replace("\n","",$email);
			$email = str_replace("\r\n","",$email);	
			$selectfield.="<option value=\"$email\">$name</option>";
		}
	}
	$selectfield.="</select>";
	echo"$selectfield";
}
else{
	echo"file $list could not be found";
}
?>
&nbsp; Always select YOUR name!</td></tr>
<tr><td align=right>Greeting:</td><td>
<select name="hoi">
<option value="Hello">Hello</option>
<option value="Hi">Hi</option>
<option value="Dear">Dear</option>
<option value="Hey">Hey</option>
<option value="Hola">Hola</option>
<option value="Ciao">Ciao</option>
<option value="Salut">Salut</option>
</select>
</td></tr></tbody></table>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr><td><b>Message:</b><br><textarea name="ta" cols="80" rows="20" style="width:100%"></textarea></td></tr>
<tr><td align="right">Only push <u>once</u> and wait! <input type="submit" value="Send!"></td></tr>
</tbody>
</table>
</td>
<td valign="top" bgcolor="#84b5f2"><h1>Mailing List</h1>List was last updated:<br>
<?
$filename = "$list";
if (file_exists($filename)) {
	echo date ("F d Y H:i:s.", filemtime($filename));
}
?>
<br>Report Email changes to:<br> <a href="mailto:<? echo"$admin_email";  ?>"><? echo"$admin_email";  ?></a><br>Only the checked team members will receive your email!
<ul>
<?
$lines = array();
if(file_exists($list)){
	$fp = fopen("$list","r");
	
	while(!feof($fp)){
		$line = fgets($fp,4096);
		array_push($lines,$line);
	}
	fclose($fp);
	
	foreach($lines as $data){
		if($data != "" && $data != "\n"){
			$elem = explode(";",$data);
			$uid = $elem[0];
			$uid_name = "uid_"."$uid";
			$name = $elem[1];
			$email = $elem[2];	
			echo"<li><b><input type=\"checkbox\" name=\"$uid_name\" value=\"$uid\" checked>$name</b><br>$email</li>";
		}
	}
}
else{
	echo"file could not be found";
}
?>

</ul>
</td></tr>
<tr><td colspan="2" align="right" bgcolor="#FFFFFF"><small>Team Mailer v.1.0, @ 2004 artisfaction Ltd., programming by D. Zschokke. This script is licensed under the GPL.</small></td></tr>
</tbody></table></form>
</body>
</html>
Return current item: TeamMailer