⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mailing.php

📁 php写的论坛,代码精简到极点 请相看说明文件。是从英文翻译过来的:)
💻 PHP
字号:
<?
//////////////////////////////////ready
include "connect.php";
include "lib.php";
include "header.inc";

//////////////////////////////////When send to everybody, check
if($to=="everyone"){
chk_level(1,0,"login.php?go=root.php");
$mail_title="<font color=#008CD6 size=4><b>&nbsp;首页>发送列表</b></font>";
}

//////////////////////////////////When send to one person...
else{
$main_title="<font color=#008CD6 size=4><b>&nbsp;发送邮件</b></font>";
}

//////////////////////////////////To take out member information
$admin=member_info($HTTP_COOKIE_VARS[$member_cookie]);
if(!$admin){$admin[mail]=$HTTP_COOKIE_VARS[$mail_cookie];}

//////////////////////////////////default form establishment
if(!$to){$to="everyone";$readonly="readonly";}
?>
<script language=javascript>
function chk(){
if(!mail.from.value){alert('<?=$error?>请指定发信人');mail.from.focus();return false;}
if(!mail.to.value){alert('<?=$error?>请指定收信人');mail.to.focus();return false;}
if(!mail.title.value){alert('<?=$error?>请输入邮件标题');mail.title.focus();return false;}
if(!mail.memo.value){alert('<?=$error?>请输入邮件内容');mail.memo.focus();return false;}
if(!confirm('<?=$message?>现在是否发送??')){return false;}
}
</script>

<link rel=StyleSheet HREF=style.css type=text/css title=style>
<table width=100% height=100%>
<tr><td height=5></td></tr>
<tr><td valign=top>

<table align=center width=95% cellpadding=2 cellspacing=0 border=0 bgcolor=#F1F9FD>
<tr><td colspan=2 bgcolor=white><img src=image/logo.gif><br><br></td></tr>
<tr><td colspan=2 bgcolor=white>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td><?=$main_title?></td>
<td align=right><?=$help?></td>
</tr></table>
</td></tr>

<tr><td colspan=2 height=3 bgcolor=#2CBBFF></td></tr>
<tr><td colspan=2 bgcolor=#F1F9FD>

<table width=100% cellpadding=2 cellspacing=2>
<form method=post action=mailing_ing.php onsubmit="return chk()" name=mail>
<tr>
<td bgcolor=#C9F0FF width=1% nowrap>&nbsp;发信人&nbsp;</td>
<td width=99%>&nbsp;<input type=text name=from class=input size=25 value='<?=$admin[mail]?>'> 
<input type=radio name=html value=htmlbr id=htmlbr checked> <label for=htmlbr>HTML+BR</label> 
<input type=radio name=html value=html id=html> <label for=html>HTML</label></td>
</tr>

<?
if($to=="everyone"){echo"
<tr>
<td bgcolor=#C9F0FF width=1% nowrap>&nbsp;收信人&nbsp;</td>
<td width=99%>&nbsp;<input type=text name=to class=input size=9 value='$to' $readonly> 
<select name=level>
<option value=''>所有等级</option>";
for($i=9;$i>=1;$i--){echo"<option value='$i'>等级 $i</option>\n";}
echo"</select> 
<input type=radio name=html value=text id=text> <label for=text>TEXT</label></td>
</tr>
";}

else{echo"
<tr>
<td bgcolor=#C9F0FF width=1% nowrap>&nbsp;收信人&nbsp;</td>
<td width=99%>&nbsp;<input type=text name=to class=input size=25 value='$to' $readonly> 
<input type=radio name=html value=text id=text> <label for=text>正文</label></td>
</tr>
";}
?>

<tr>
<td bgcolor=#C9F0FF width=1% nowrap>&nbsp;标  题&nbsp;</td>
<td width=99%>&nbsp;<input type=text name=title class=input size=50></td>
</tr>
<tr>
<td bgcolor=#C9F0FF width=1% nowrap>&nbsp;内  容&nbsp;</td>
<td width=99%>&nbsp;<textarea name=memo class=input style="overflow:auto;word-break:break-all" cols=50 rows=7></textarea></td>
</tr>
<tr>
<td width=1% nowrap></td>
<td width=99%>&nbsp;<input type=submit value=发送 class=button> <input type=reset value=重写 class=button></td>
</tr>
</form>
</table>

</td></tr>
<tr><td colspan=2 height=3 bgcolor=#2CBBFF></td></tr>
<tr><td bgcolor=white><a href=# onclick=window.close()>Close</a></td><td bgcolor=white><?=$copyright?></td></tr>
</table>
</td></tr></table>
<?mysql_close($connect);?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -