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

📄 announcement.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
字号:
<?php
$broadmoney=10;
require("userdata/style.php");
require("global.php");
require("ofstarcode.php");
include("bbsdata/level.php");
get_forum_info();
if ($job=="view"){
	$add_title=" &gt; $forum_name &gt; 发布论坛信息";
	require("header.php");echo"$headertp";
	$des="查看论坛信息";
	headguide($des,"查看论坛信息","");
?>
	<table cellpadding=0 cellspacing=0 border=0 width="<?=$tablewidth?>" bgcolor=<?=$bordercolor?> align=center>	
<td bgcolor=<?=$titlecolor?> valign=middle align=left height=30 colspan=3 background=images/<?=$style_path?>/title_back.gif>查看论坛信息
   </td></tr><tr>
<td bgcolor=<?=$list_color2?> width=20%>
<?
if ($id<>""){
	$xzbfile="./userdata/anc";
	$xzb_arr=explode("|",readfromfile($xzbfile."/".$id));
	list($print_info,$bar)=view_user_info($xzb_arr[2]);
	$icon=mt_rand(0,19).".gif";
	$titleline="<tr><td valign=top align=left width=32><img height=20 src='images/emotion/$icon' width=20 align=left border=0></td><td style='LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word'><font color=#555555>$title</font></td><td width=16></td></tr>";
	$contentline="<tr><td colspan=3>".convert($xzb_arr[4],$ftbcode_post);
$contentline.= "<br><br><SPAN style='FILTER: Shadow(color=#d9d9d9,direction=125); WIDTH: 100%; HEIGHT: 23px'><font color=crimson>".$postbinfo."</font></span><br>"; 
	$contentline.="</td></tr>";
	$bgcolor=$article_color2;
	showarticle($print_info,$bar);
}else{
	echo "没找到啊。输入错误啦!";
}
?>	</td>
</tr>
	<td bgcolor=<?=$titlecolor?> valign=middle align=left colspan=3>
   </td></tr>
</table>
<?
require("footer.php");echo"$footertp";
exit;
}
$add_title=" &gt; $forum_name &gt; 发布论坛信息";
require("header.php");echo"$headertp";
$des="发布论坛信息";
headguide($des,"发布论坛信息","");

if ($action=="savepaper"){
	if (!file_exists("$userpath/$username.php")){
		echo "没登陆?或者没注册?";
		require("footer.php");echo"$footertp";
		exit;
	}
	$xzbfile="userdata/anc";
	if (!file_exists($xzbfile)) {
		$mk=mkdir($xzbfile,0777);//---如果不能写入,把777改为0777
		chmod($xzbfile,0777);
		if (!$mk) {
			echo "由于某些原因,不能写入,请把这个报告给管理员<br>";
			echo "<br>系统已经发送消息给管理员了。请等待!或者:";
			echo "请转告管理员".$forum_name."不能发论坛信息!";//---如果程序不能建立目录,请自建		
			if (file_exists("userdata/$msgpath/{$manager}1.php")){
				$msg=file("userdata/$msgpath/{$manager}1.php");
			}else{$msg[0]="";}
				$old=implode("",$msg);
				$shijian=$timestamp;
				$content="{$forum_name}不能发论坛信息,并把属性设置为777。 Send by liuxing MSG";
				$new="<?die;?>|ofstar MSG|{$forum_name}不能发论坛信息|{$shijian}|$content|0|\n";
				writetofile("userdata/$msgpath/{$manager}1.php",$new.$old);
		}
		require("footer.php");echo"$footertp";
		exit;
	}
	if (strlen($title)<2){
		echo "标题太短了,请写一个中文字以上!请返回修改!";
		require("footer.php");echo"$footertp";
		exit;
	}

	if (strlen($title)>160){
		echo "标题太长了,请限制80字内!请返回修改!";
		require("footer.php");echo"$footertp";
		exit;
	}
	if (strlen($content)<4){
		echo "内容太少了吧?,请多写点!!请返回修改!";
		require("footer.php");echo"$footertp";
		exit;
	}

	if (strlen($content)>1000){
		echo "内容太多了,请限制在500字内!请返回修改!";
		require("footer.php");echo"$footertp";
		exit;
	}
	$useri=get_user_info($username);
	if ($useri[24]<$broadmoney) {
		echo "<br><br><br>你的金钱不足!不能发表论坛信息!<br><br><br>";
		require("footer.php");echo"$footertp";
		exit;
	}
	$title=safe_convert($title); 
	$content=safe_convert($content);
	$idd=0;
	while(file_exists($xzbfile."/".$idd)) $idd++;
	if ($idd==30){
		echo "对不起!论坛信息太多!请过一些时间 再来!";
		require("footer.php");echo"$footertp";
		exit;
	}
	$useri[24]=$useri[24]-$broadmoney;
	$uu=implode('|',$useri);
	writetofile("$userpath/$username.php",$uu);

	$newxzb=$idd."|".$timestamp."|".$username."|".$title."|".$content;
	writetofile($xzbfile."/".$idd,$newxzb);

	$lifetime=120*60*60;
	for ($i=0;$i<30;$i++){
		if (file_exists($xzbfile."/".$i)){
			$delfile=file("$xzbfile/$i");
			list($id,$wtime,$name,$title,$content)=explode("|",trim($delfile[0])); 
			if ($timestamp-$wtime>=$lifetime) {
				unlink("$xzbfile/$i");
			}
		}
	}

?>
<table cellpadding=0 cellspacing=0 border=0 width="<?=$tablewidth?>" bgcolor=<?=$bordercolor?> align=center>
<td bgcolor=<?=$titlecolor?> valign=middle colspan=2 align=left height=25 class=title>发布论坛信息
   </td></tr>
<td bgcolor=<?=$list_color2?> valign=middle colspan=2 align=center height=30>
	<br><br><br>
论坛信息发布成功!<a href="index.php">返回主页</a><br><br>
   </td></tr>
	<td bgcolor=<?=$titlecolor?> valign=middle colspan=2 align=left>
   </td></tr>
</table>

<?php
	require("footer.php");echo"$footertp";
	exit;
}
?>
<form action="announcement.php?action=savepaper&mode=<?=$mode?>" method="post"> 
<table cellpadding=0 cellspacing=0 border=0 width="<?=$tablewidth?>" bgcolor=<?=$list_color2?> align=center>
    <tr>    
        <td>
<?
if ($username==""){
	echo "<br><br><center>请先<a href=login.php>登陆</a></center><br><br>";
}else{
?>
   <table cellpadding=6 cellspacing=1 border=0 width=100%>
    <tr>
    <td bgcolor=<?=$titlecolor?> valign=middle colspan=2 align=center class=title>
    <b>请详细填写以下信息</b>(本版面只允许会员发布论坛信息)</td></tr>
    <tr>
    <td bgcolor=<?=$list_color2?> valign=middle><font color="#000000"><b>标 题</b>(最多80字)</font></td>
    <td bgcolor=<?=$list_color2?> valign=middle><INPUT name="title" type=text size=60></td></tr>
    <tr>
    <td bgcolor=<?=$list_color2?> valign=top width=30%>
<font color="#000000"><b>内 容</b><BR>
在本版发布论坛信息将您将付<font color="#ff0000"><b>10</b></font><?=$money_title?>费用<br>
<font color="#ff0000"><b>5</b></font>天内发表的论坛信息将随机抽取<font color="#ff0000"><b>5</b></font>条滚动显示于论坛上<br>
<li>HTML标签: 不可用
<li>UBB 标签: 允许
<li>内容不得超过500字
</font></td>
<td bgcolor=<?=$list_color2?> valign=middle>
<textarea class="smallarea" cols="60" name="content" rows="8" wrap="VIRTUAL"></textarea>
</td></tr>
    <tr>
    <td bgcolor=<?=$titlecolor?> valign=middle colspan=2 align=center><input type=submit name="submit" value="发 布"></td></tr>
	</table>
<?php
}
?>
	</td></tr></table>
</form>
<?php
require("footer.php");echo"$footertp";

⌨️ 快捷键说明

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