?? index.php
字號:
<?php
if ( !empty($_REQUEST['title']) and !empty($_REQUEST['body']) ) {
//$filepath = "E:/myjob/mail/";
$filepath = "/home/vhosts/oa_html/mail/";
$file_name = $_FILES['filename']['name'];
$filepath = $filepath.$file_name;
copy($_FILES['filename']['tmp_name'],$filepath);
mt_srand((double)microtime()*1000000);
$shpid = uniqid(mt_rand());
@rename("$filepath","$shpid");
$garray = file($shpid);
$cog=count($garray);
for($i=0;$i<$cog;$i++){
$larray = explode(" ",$garray[$i]);
$address=$larray[0];
mail($address,$title,$body);
}
@unlink($shpid);
echo "<html><head><title>郵件發送中</title></head><body bgcolor=#000000><center><a href=index.php><font color=#ffffff>發送成功!</font></index></center></body></html>";
} else {
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/a1.css" rel="stylesheet" type="text/css">
<title>Linux郵件群發系統</title>
<style type="text/css">
<!--
.style1 {
font-size: 24px;
font-weight: bold;
color: #333333;
}
.style2 {font-size: 12px; font-weight: bold; color: #333333; }
-->
</style>
</head>
<body leftmargin="0" topmargin="0"> <br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="687" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="712" height="32"><span class="style1">Linux郵件群發系統</span></td>
</tr>
<tr>
<td bgcolor="#3093E4" height="1"></td>
</tr>
</table>
<br><form action=index.php method=post enctype="multipart/form-data">
<table width="703" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="716" height="211"><table width="692" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#8BB3D6">
<tr>
<td width="125" height="27" bgcolor="#FFFFFF"> 郵件地址:</td>
<td width="564" colspan="3" align="left" bgcolor="#FFFFFF"><input type=file size=50 name=filename></td>
</tr>
<tr>
<td width="125" height="31" bgcolor="#FFFFFF"> 主 題:</td>
<td colspan="3" align="left" bgcolor="#FFFFFF"><input type=text name=title size=60></td>
</tr>
<tr>
<td height="48" bgcolor="#FFFFFF"> 內 容:</td>
<td colspan="3" align="left" bgcolor="#FFFFFF"><textarea cols="70" rows="15" name="body"></textarea></td>
</tr>
</table><table>
<tr>
<td width="691" height="29" colspan="4" align="center" bgcolor="#FFFFFF">
<input type=submit class="rightbottom" value=開始群發郵件></td>
</tr>
</table><br><br><br>
<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#3093E4" height="1"></td>
</tr>
<tr>
<td width="598" height="32"><div align="center"><span class="style2">上海明宏生物工程有限公司 版權所有 </span></div></td>
</tr>
</table>
</td>
</tr>
</table></form></td>
</tr>
</table>
</body>
</html>
<?php
}
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -