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

📄 sendfriend.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
字号:
<?
require("global.php");
require("userdata/style.php");
require("ofstarcode.php");
include("bbsdata/level.php");
if (empty($username) || $login_status==0) {
         require("header.php");echo"$headertp";
		 $headguide_l2="发送邮件给朋友";
         headguide($headguide_des,$headguide_l2,"发生错误");
	 $status="您尚未登陆或注册";
         print_err();
         require("footer.php");echo"$footertp";
         exit;
     } 
$add_title=" &gt; 发送邮件给朋友";
$bbs_path=$idpath;
if (!$forumid || !file_exists("{$bbs_path}forum$forumid")) exit;
if (!$filename || !file_exists("{$bbs_path}forum$forumid/$filename") || !ereg("^f_[0-9]+$",$filename) || !file_exists("{$bbs_path}forum$forumid/list.php")) exit;
$articlelist=file("{$bbs_path}forum$forumid/$filename");
list($yoptitle,$yopauthor,$yopcontent,$yoptime,$aaa,$icon,$usesign,$rvrc,$rvrcuser,$jmmj)=explode("|",$articlelist[0]);
get_forum_info();
if ($step != 2) {

	require("header.php");echo"$headertp";
	print_bar();
	print_form();
	require("footer.php");echo"$footertp";
	exit;
}
elseif($step==2){
$check=1;
if (!ereg("^[-a-zA-Z0-9_\.]+\@([0-9A-Za-z][0-9A-Za-z-]+\.)+[A-Za-z]{2,4}$",$fmail)) {$reason="信箱不符合检查标准,请确认没有错误"; $check=0;}
if(empty($postname) || empty($incept) || empty($fmail) || empty($fcontent)){$reason="请填写完整"; $check=0;}
if ($check==0) {
         require("header.php");echo"$headertp";
		 $headguide_l2="发送邮件给朋友";
         headguide($headguide_des,$headguide_l2,"发生错误");
	     $status=$reason;
         print_err();
         require("footer.php");echo"$footertp";
         exit;
     }
$textmessage="Hi, $incept ,\n    $fcontent \n\n";
$textmessage.="这个帖子的作者是:\n";
$textmessage.=" $yopauthor \n\n";
$textmessage.="这个帖子的主题是:\n";
$textmessage.="$yoptitle \n\n";
$textmessage.="这个帖子的地址是:\n";
$textmessage.="$script_pos/read.php?forumid=$forumid&filename=$filename \n\n\n";
if($method=='all'){
$textmessage.="以下是内容:\n";
$ftbcode_post[ftbcodes]=1;
$ftbcode_post[pic]=0;
$count1=count($articlelist);
for ($i=0; $i<$count1; $i++) {
	list($title,$author,$content,$time,$aaa,$icon,$usesign,$rvrc,$rvrcuser,$jmmj)=explode("|",$articlelist[$i]);	
	$contentline=convert($content,$ftbcode_post);
  $contentline = str_replace("&lt;","<",$contentline);
  $contentline = str_replace("&gt;",">",$contentline);
  $contentline = str_replace("<br>","\n",$contentline);
  $contentline = str_replace("│","|",$contentline);
  $contentline = str_replace(" &nbsp;","  ",$contentline);
	$contentline = strip_tags($contentline);
	$time=getfulldate($time);
	$textmessage.="-------------------------------\n";
$textmessage.="$author 发的 $title $time \n";
$textmessage.=" $contentline \n\n";
}
}
$t=time();
$t=getfulldate($t);
$textmessage.="=================================\n             $postname ( $username )\n            $t \n";
$textmessage.="\n-------B-i-n-y-u-m---E-m-a-i-l-------------\n";
$temp = get_user_info($username);
$send_address= $temp[4];
require("header.php");echo"$headertp";
	print_bar();
?>
	<table width=<?=$tablewidth?> border=0 cellspacing=0 cellpadding=0 align=center bgcolor=<?=$bordercolor?>>
    <tr>
        <td>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td bgcolor=<?=$titlecolor?>><font color=<?=$titlefontcolor?>>
发送中</font>
</td></tr>
<tr bgcolor=<?=$article_color2?>>
<td>
<br>
正在连接........<br>
<?
if (mail("$fmail", "你朋友 $postname 的推荐", "$textmessage","From: $send_address\nReply-To: $send_address\nX-Mailer: 流星の邮件")) echo "发送给 $incept $fmail 成功";
else echo "发送 $incept $fmail 失败";
?><br></td>
</tr>
<tr>
<td  bgcolor=<?=$titlecolor?>> 
<div align="center">
<input type="button" onclick="javascript:history.go(-1);" value="返 回" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" name="button2">
</div>
</td>
</tr>
</table></td>
</tr>
</table>
<?
	require("footer.php");echo"$footertp";
         exit;
}
function print_form() {
global $subcolor,$bbs_title,$bordercolor,$titlecolor,$tablewidth,$backgroundcolor,$titlefontcolor,$username,$filename,$forumid,$yoptitle,$yopauthor,$article_color1,$article_color2;
?>


<table width=<?=$tablewidth?> border=0 cellspacing=0 cellpadding=0 align=center bgcolor=<?=$bordercolor?>>
    <tr>
        <td>
        <table cellpadding=6 cellspacing=1 border=0 width=100%>
        
    <form action="sendfriend.php?step=2&forumid=<?=$forumid?>&filename=<?=$filename?>" method=post>
    <tr bgcolor=<?=$titlecolor?> >
    <td <?=$titlecolor?> valign=middle colspan=2 align=center><font color="#000000">
    <b>发送邮件给朋友</b></font></td></tr>
    <tr>
    <td bgcolor=<?=$article_color2?> ><font color="#000000">
    <b>通过邮件发送本帖子给您的朋友。</b></td>
	 <td bgcolor=<?=$article_color2?>>	
	本程序将把<?=$yopauthor?>的 <a href=read.php?forumid=<?=$forumid?>&filename=<?=$filename?>><?=$yoptitle?></a> 推荐给你的朋友 <br>(下列所有项必填,并请输入正确的邮件地址!你可以添加一些自己的信息在下面的内容框内。<br>至于这个帖子的主题和 URL 你可以不必写,因为本程序会在发送的 Email 中自动添加的!)</font>
        </td></tr>
    <tr>
    <td bgcolor=<?=$article_color1?>><font color="#000000"><b>您的姓名:</b></font></td>
    <td bgcolor=<?=$article_color1?>><input type=text size=40 name="postname" value=<?=$username?>></td>
    </tr><tr>
    <td bgcolor=<?=$article_color2?>><font color="#000000"><b>您朋友的名字:</b></font></td>
    <td bgcolor=<?=$article_color2?>><input type=text size=40 name="incept"></td>
    </tr><tr>
    <td bgcolor=<?=$article_color1?>><font color="#000000"><b>您朋友的 Email:</b></font></td>
    <td bgcolor=<?=$article_color1?>><input type=text size=40 name="fmail"></td>
    </tr><tr>
    <td bgcolor=<?=$article_color2?>><font color="#000000"><b>消息内容:</b></font></td>
    <td bgcolor=<?=$article_color2?>><textarea name="fcontent" cols="55" rows="6">我想你对 [<?=$bbs_title?>] 的这个帖子内容会感兴趣的!请去看看!</textarea></td>
		<tr>
    <td bgcolor=<?=$article_color1?>><font color="#000000"><b>选择发送方式::</b></font></td>
    <td bgcolor=<?=$article_color1?>><input type=radio name="method" value="only" checked>
只发送本贴的URL<input type=radio name="method" value="all">直接发送内容及URL</td>
    </tr>
    </tr><tr align="center" bgcolor="<?=$subcolor?>"  >
<td <?=$titlecolor?> colspan=2 align=center>
<input type="submit" value="送出资料" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
&nbsp;
<input type="reset" value="清除重写" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
</td>
</tr></table></td></form></tr></table>
<?
}
function print_err() {
global $status;
msg_box("发生错误","程式发生了错误,情况:<br><br>$status<br><ul><li><a href='javascript:history.back(1)'>返回前一页</a></li></ul>");
}
function print_bar() {
global $forum_name,$forumid,$yoptitle,$bbs_title,$filename;
headguide("你现在正在<br>$bbs_title<br>的推荐程式中","<a href='thread.php?forumid=$forumid'>$forum_name</a>","<a href='read.php?forumid=$forumid&filename=$filename'>$yoptitle</a>",'推荐程式','no');
}

⌨️ 快捷键说明

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