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

📄 messanger.php

📁 bmb的论坛
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
/* BMForum Plus! Bulletin Board Systems Version : Plus!  This is a freeware, but don't change the copyright information. A SourceForge Project - GNU Licence project. Web Site: http://www.bmforum.com Copyright (C) Bluview Technology*/
require("datafile/config.php");
require("getskin.php");
include("template.php");
include("header.php");
require("bmbcodes.php");
require("lang/$language/global.php");
require("lang/$language/usercp.php");
require("lang/$language/post.php");

$idm_unique=$id_unique;
navi_bar($tip[1],$gl[72]);

if(!file_exists("datafile/cache/themes/$styleidcode/usercp-$language-$openstylereplace.htm")){
	$noexists=1;
	newtemplate(0, "newtem/$temfilename/usercp.htm"); 
}else{
	newtemplate(0, "datafile/cache/themes/$styleidcode/usercp-$language-$openstylereplace.htm",1); 
}
if($cachedstyle==0) {
	$noexists=0;
	set_var($navbarshow,"",FALSE,"navbarshow");
	if($openstylereplace==1)  set_var(array("categorycolor"=>$categorycolor,"decorate1"=>$decorate1,"decorate2"=>$decorate2,"decorate3"=>$decorate3,"decorate4"=>$decorate4,"winimages"=>$winimages,"jiazhongcolor"=>$jiazhongcolor,"logofile"=>$logofile,"otherimages"=>$otherimages,"replyicon"=>$replyicon,"npollicon"=>$npollicon,"npost"=>$npost,"pollicon"=>$pollicon,"posticon"=>$posticon,"nonewpost"=>$nonewpost,"onlyread"=>$onlyread,"newpost"=>$newpost,"tablebg"=>$tablebg,"header_tile"=>$header_tile,"tile_back"=>$tile_back,"background_color"=>$background_color,"article_color2"=>$article_color2,"article_color1"=>$article_color1,"list_color2"=>$list_color2,"list_color1"=>$list_color1,"forumcolortwo"=>$forumcolortwo,"forumcolorone"=>$forumcolorone,"forumdescolor"=>$forumdescolor,"forumnamecolor"=>$forumnamecolor,"categoryfontcolor"=>$categoryfontcolor,"cautioncolor"=>$cautioncolor,"subcolor"=>$subcolor,"tablewidth"=>$tablewidth,"bordercolor"=>$bordercolor,"titlefontcolor"=>$titlefontcolor,"titlecolor"=>$titlecolor,"backgroundcolor"=>$backgroundcolor,));
}
if($noexists) {
	set_var($navbarshow,"",FALSE,"navbarshow");
	if($openstylereplace==1)  set_var(array("categorycolor"=>$categorycolor,"decorate1"=>$decorate1,"decorate2"=>$decorate2,"decorate3"=>$decorate3,"decorate4"=>$decorate4,"winimages"=>$winimages,"jiazhongcolor"=>$jiazhongcolor,"logofile"=>$logofile,"otherimages"=>$otherimages,"replyicon"=>$replyicon,"npollicon"=>$npollicon,"npost"=>$npost,"pollicon"=>$pollicon,"posticon"=>$posticon,"nonewpost"=>$nonewpost,"onlyread"=>$onlyread,"newpost"=>$newpost,"tablebg"=>$tablebg,"header_tile"=>$header_tile,"tile_back"=>$tile_back,"background_color"=>$background_color,"article_color2"=>$article_color2,"article_color1"=>$article_color1,"list_color2"=>$list_color2,"list_color1"=>$list_color1,"forumcolortwo"=>$forumcolortwo,"forumcolorone"=>$forumcolorone,"forumdescolor"=>$forumdescolor,"forumnamecolor"=>$forumnamecolor,"categoryfontcolor"=>$categoryfontcolor,"cautioncolor"=>$cautioncolor,"subcolor"=>$subcolor,"tablewidth"=>$tablewidth,"bordercolor"=>$bordercolor,"titlefontcolor"=>$titlefontcolor,"titlecolor"=>$titlecolor,"backgroundcolor"=>$backgroundcolor,));
	$wrtingcaches=nsubst();
	writetofile("datafile/cache/themes/$styleidcode/usercp-$language-$openstylereplace.htm",$wrtingcaches);
}
psubst(0);
if (!$login_status) {echo "<center>$gl[73]</center>"; echo "</table>";include("footer.php");exit;}
if (!$send_msg) { echo "<center>$gl[74]</center>"; echo "</table>";include("footer.php");exit;}
$user=$_SESSION['bmforumerboardid'];
$receivelist=@file($idm_unique."/".$o_username.".rec");
$count=@count($receivelist);
$usage=floor($count/$short_msg_max*100)."%";
if($usage=="0%") $categorycolor_pro=$forumcolorone;
	else $categorycolor_pro=$categorycolor;
?>
<script language="JavaScript">
function clearpm(){
if(confirm("<?=$smlng[42]?>", "<?=$smlng[42]?>")){
window.location.href="messanger.php?job=clear";
}
}
function CheckAll(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
e.checked = true;
}}
function FanAll(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.checked == true){ e.checked = false; }
else { e.checked = true;}
}}
</script>
	<TABLE width=<?=$tablewidth?> align=center>
<TR>
	<TD width=220 valign=top>
	<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=<?=$bordercolor?>><TR><TD>
	<TABLE width=100% cellspacing=1 cellpadding=4>
	<TR>
		<TD  bgcolor=<?=$tile_back?> background="<?=$tile_back?>" height=20><font color=<?=$categoryfontcolor?>><b><?=$mmssms[0]?></b></font></TD>
	</TR>
	<TR>
		<TD bgcolor=<?=$forumcolorone?> height=10><a href=messanger.php?job=receivebox><?=$mmssms[1]?></a></TD>
	</TR>
	<TR>
		<TD bgcolor=<?=$forumcolorone?> height=10><a href=messanger.php?job=sendbox><?=$mmssms[2]?></a></TD>
	</TR>
	<TR>
		<TD bgcolor=<?=$forumcolorone?> height=10><a href=messanger.php?job=write><?=$mmssms[3]?></a></TD>
	</TR>
	<TR>
		<TD bgcolor=<?=$forumcolorone?> height=10><a href=# onclick="javascript:clearpm();"><?=$mmssms[4]?></a></TD>
	</TR>
	</TABLE>	
	</td></TR></TABLE>	<BR>
	<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=<?=$bordercolor?>><TR><TD>
	<TABLE width=100% cellspacing=1  cellpadding=4>
	<TR>
		<TD  bgcolor=<?=$tile_back?> background="<?=$tile_back?>" height=20><font color=<?=$categoryfontcolor?>><b><?=$mmssms[5]?></b></font></TD>
	</TR>
	<TR>
		<TD bgcolor=<?=$forumcolorone?> height=40><?=$mmssms[6]?> <?=$usage?><br>
		<TABLE cellpadding=0 cellspacing=0 style="border: 1px solid <?=$forumcolorone?>" width=95%>
		<TR>
			<TD bgcolor=<?=$categorycolor_pro?> width=<?=$usage?>>&nbsp;</TD>
			<TD bgcolor=<?=$forumcolorone?>>&nbsp;</TD>
		</TR>
		</TABLE>
	</td></TR></TABLE>	
	</TR>
	</TABLE>
	</TD>
			
	<TD valign=top>


<?

if ($job=="read") {
	if (file_exists($idm_unique."/".$o_username.".rec")) {
		$receivelist=file($idm_unique."/".$o_username.".rec");
		list($author,$title,$time,$content,$isread,$uploadfile)=explode("|",$receivelist[$msg]);
		$uploadfile=str_replace("\n","",$uploadfile);
		$ctime=getfulldate($time);
		$contentzhuanfa="$gl[75]-".$author.":".$content;

		$userinfoget=get_user_info($author);
		$usertype=$userinfoget[18];
		list(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,$bcode_post['pic'],$bcode_post['reply'],$bcode_post['jifen'],$bcode_post['sell'],$bcode_post['flash'],$bcode_post['mpeg'],$bcode_post['iframe'],$bcode_post['fontsize'],$bcode_post['hpost'],$bcode_post['hmoney'])=explode("|",$usergroupdata[$usertype]);
		$x_content=bmbconvert($content,$bmfcode_post);
		if(!empty($uploadfile)){
			$attaches= "<br><a href='upload/$uploadfile'>$gl[441]$uploadfile</a>";
		}
	echo "
<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=$bordercolor><TR><TD>
<TABLE width=100% cellspacing=1 cellpadding=4>
<TR>
	<TD colspan=2  bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$title</b></font></TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>$gl[76]</TD>
	<TD valign=top><a href='messanger.php?job=write&target=".urlencode($author)."'>$author</a></TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>$gl[454]</TD>
	<TD valign=top>$ctime</TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>$mmssms[7]</TD>
	<TD valign=top>$x_content $attaches</TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>$gl[83]</TD>
	<TD valign=top><script language=\"JavaScript\">
function ctlent(eventobject){
if(event.ctrlKey && window.event.keyCode==13){this.document.FORM.submit();}
}
</script><form name='FORM' action=messanger.php method=POST><input type=hidden name=job value=write><input type=hidden name=pruser value=$author><input type=hidden name=title value=Re:$title><input type=hidden name=step value=2><textarea onkeydown=ctlent() name=content cols=66 rows=7></textarea><Br><input type=submit value='$gl[85]'> <input type=checkbox name=ssnd value=1>$gl[84]</TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>{$gl[78]}</TD>
	<TD valign=top>[<a href='messanger.php?job=write&target=".urlencode($author)."&timu=RE:".urlencode($title)."'>$gl[79]</a>]  [<a href='messanger.php?job=write&neirong=".urlencode($contentzhuanfa)."&timu=Fw:".urlencode($title)."'>$gl[80]</a>]  [<a href='messanger.php?job=delone&msg=$msg'>$gl[81]</a>] [<a href='messanger.php?job=receivebox'>$gl[82]</a>]</TD></form>
</TR>
</TABLE></TD>
</TR>
</TABLE>
";

		$count=count($receivelist);
		$fp=fopen($idm_unique."/".$o_username.".rec","w");
		for ($i=0; $i<$count; $i++) {
			if ($i!=$msg) fputs($fp,$receivelist[$i]);
			else fputs($fp,"$author|$title|$time|$content|1|$uploadfile|\n");
		}
		fclose($fp);
	}
}

if ($job=="readsnd") {
	if (file_exists($idm_unique."/".$o_username.".snd")) {
		$sendlist=file($idm_unique."/".$o_username.".snd");
		list($ruser,$title,$time,$content,$uploadfile)=explode("|",$sendlist[$msg]);
		$uploadfile=str_replace("\n","",$uploadfile);
		$ctime=getfulldate($time);
		$bcode_post=$bmfcode_post;
		$x_content=bmbconvert($content,$bmfcode_post);
		if(!empty($uploadfile)){
			$attaches= "<br><a href='upload/$uploadfile'>$gl[441]$uploadfile</a>";
		}
	echo "
<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=$bordercolor><TR><TD>
<TABLE width=100% cellspacing=1 cellpadding=4>
<TR>
	<TD colspan=2 bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$title</b></font></TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>$gl[86]</TD>
	<TD valign=top><a href=\"messanger.php?job=write&target=".urlencode($ruser)."\">$ruser</a></TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>$gl[454]</TD>
	<TD valign=top>$ctime</TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>$mmssms[7]</TD>
	<TD valign=top>$x_content $attaches</TD>
</TR>
<TR bgcolor=$forumcolorone>
	<TD width=60 valign=top>{$gl[78]}</TD>
	<TD valign=top>[<a href=\"messanger.php?job=write&target=".urlencode($ruser)."&neirong=".urlencode($content)."&timu=".urlencode($title)."\">$gl[88]</a>]  [<a href='messanger.php?job=delsnd&msg=".urlencode($msg)."'>$gl[81]</a>] [<a href='messanger.php?job=sendbox'>$gl[82]</a>]</TD></form>
</TR>
</TABLE></TD>
</TR>
</TABLE>
";

		$count=count($sendlist);
	}
}
if ($job=="receivebox") {
	if (file_exists($idm_unique."/".$o_username.".rec")) {
		$receivelist=file($idm_unique."/".$o_username.".rec");
		$count=count($receivelist);
		if ($count<=1 && empty($receivelist[0])) {
	echo "<form action='messanger.php' method=POST >
		<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=$bordercolor><TR><TD>
	<TABLE width=100% cellspacing=1 cellpadding=4>
	<TR align=center bgcolor=$tile_back background=\"$tile_back\">
		<TD colspan=4 bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$gl[89]</b></font></TD>
	</TR></table></table></table>";
	include("footer.php");exit;}
	echo "<form action='messanger.php' method=POST >
	
	<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=$bordercolor><TR><TD>
	<TABLE width=100% cellspacing=1 cellpadding=4>
	<TR align=center bgcolor=$tile_back background=\"$tile_back\">
		<TD width=5% bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$gl[91]</b></font></TD>
		<TD width=10% bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$gl[92]</b></font></TD>
		<TD width=* bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$gl[93]</b></font></TD>
		<TD width=5% bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$gl[94]</b></font></TD>
	</TR>";
?>
	<input type=hidden value=delone name=job>
	<input type=hidden value=more name=n>

	<?
		$counts=0;
		for ($i=0; $i<$count; $i++) {
			$counts++;
			list($author,$title,$time,$content,$isread,$uploadfile)=explode("|",$receivelist[$i]);
			if ($isread) $isread="$gl[96]"; else $isread="$gl[95]";
			if (empty($title)) $title="($gl[97])";
			if(floor($counts/2)==$counts/2) $bgcolors=$forumcolorone;
				else $bgcolors=$forumcolortwo;
			echo "<tr align=center bgcolor=$bgcolors><td width=5%><input type='checkbox' name='delmore[$i]' value='checked'></td><td width=10%><acronym title='$gl[98]'><a href='messanger.php?job=write&target=".urlencode($author)."'>$author</a></acronym></td><td width=*><a href='messanger.php?job=read&msg=$i'>$title</a></td><td width=5%>$isread</td></tr>";
		}
		echo "<tr bgcolor=$forumcolorone align=left><td colspan=4 width=100%><input type='button' name=chkall value=$gl[99] onclick='CheckAll(this.form)'><input type='button' name=clear2 value=$gl[100] onclick='FanAll(this.form)'><input type='reset' value='$gl[101]'><input type='submit' value='$gl[102]'></tr></form>";

	}else{
	echo "<form action='messanger.php' method=POST >
		<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=$bordercolor><TR><TD>
	<TABLE width=100% cellspacing=1 cellpadding=4>
	<TR align=center bgcolor=$tile_back background=\"$tile_back\">
		<TD colspan=4 bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$gl[89]</b></font></TD>
	</TR></table></table></table>";
	include("footer.php");exit;
	}
}
if ($job=="write") {
	if (empty($step)) print_form();
	elseif($step==2) {
		$prruser=explode(";",$pruser);
		$ccount=count($prruser);
		for ($i=0; $i<$ccount; $i++) {
		$ruser=$prruser[$i];
		if (empty($_POST['content']) || empty($_POST['pruser']) || $ccount>$send_msg_max || !file_exists("$id_unique/".urlencode($ruser).".php")) {
	echo "<form action='messanger.php' method=POST >
		<TABLE width=100% cellspacing=0 cellpadding=0 bgcolor=$bordercolor><TR><TD>
	<TABLE width=100% cellspacing=1 cellpadding=4>
	<TR align=center bgcolor=$tile_back background=\"$tile_back\">
		<TD colspan=4 bgcolor=$tile_back background=\"$tile_back\"><font color=$categoryfontcolor><b>$gl[104]</b></font></TD>
	</TR></table></table></table>";
			include("footer.php");
			exit;
		}
		$FILE_URL=$_FILES['attachment']['tmp_name'];
		$FILE_NAME=$_FILES['attachment']['name'];
		$FILE_SIZE=$_FILES['attachment']['size'];
		$FILE_TYPE=$_FILES['attachment']['type'];
		$check=1;
		if ($allow_upload && $FILE_NAME && $FILE_NAME != "none" ){
			$upload=1;
		if($login_status!=2 && $login_status!=0){
		$leftuploadnum=$max_daily_upload_size-$uploadfiletoday;
		}
		if($leftuploadnum==0) {$upload=0;$check=0;}
			if ($postamount<$max_upload_post && $usertype[22]!="1") {
			  $upload=0;$check=0; }
					  $available_ext = explode(' ',$upload_type_available);
			  $extcount=count($available_ext); $is_ext_allowed=0;

⌨️ 快捷键说明

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