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

📄 group.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
字号:
<? 
$forumid=128;
require("userdata/style.php");
require("global.php");
require("header.php");echo"$headertp";
if($action=="list") headguide('你现在正在<br>'.$bbs_title,'<a href=group.php>各堂列表</a> >> 各堂成员列表','','no');
else headguide('你现在正在<br>'.$bbs_title.'<br>各堂列表','各堂列表(红色表示你所在分堂)','','no');

function showgroupmember($id) {
global $userpath,$action,$tablewidth,$titlecolor,$bordercolor,$style_path;

$groupfile ="bbsdata/group.php";
$groups=explode("\n",readfromfile($groupfile));
$gcount=count($groups);
for($i=0;$i<$gcount;$i++){
$detail=explode("|",$groups[$i]);
$isgroup=0;
if($id==$detail[2]||$id==$detail[0]) {
	$gdate=date("Y-m-d",$detail[2]);
	$member=explode(",",$detail[10]);
	$isgroup=1;
	break;
	}
}
if(!$isgroup) {msg_box('改堂不存在或已经改名','该用户的分堂不存在或者已经此堂主改名!');exit;}
echo"
<table cellspacing=1 cellpadding=0 width=$tablewidth border=0 align=center bgcolor=$titlecolor>
  <tr align=center height=24 bgcolor=$titlecolor> 
    <td bgcolor=$titlecolor width=20% class=title>头像</td>
    <td bgcolor=$titlecolor class=title>ID</td>
    <td bgcolor=$titlecolor class=title>成员</td>
    <td bgcolor=$titlecolor class=title>发贴</td>
    <td bgcolor=$titlecolor class=title>威望</td>
    <td bgcolor=$titlecolor class=title>金钱</td>
    <td bgcolor=$titlecolor class=title>管理</td>
  </tr>
  <tr align=center height=24 bgcolor=$titlecolor>
    <td colspan=10>
     各门派:$detail[0] 掌门人:$detail[3] 弟子:$detail[4] 口号:$detail[8] <a href=group.php?action=add&id=$detail[0]>加入我们</a>
    </td>
  </tr>
";

$count=count($member);
$count=min($detail[4],$count);
for($i=0;$i<$count;$i++){
$ii=$i+1;
$useri=get_user_info($member[$i]);
$usericon=get_user_portait($useri[3]);
echo '<tr height=24 bgcolor=ffffff>';
echo "<td align=center bgcolor=ffffff><a href=profile.php?job=show&target=$useri[1]>$usericon</a> $useri[30] $useri[31]</td>"; 
echo "<td align=center bgcolor=ffffff>$ii</td>";
echo "<td align=center bgcolor=ffffff><a href=profile.php?job=show&target=$useri[1]>$useri[1]</a></td>";
echo "<td align=center bgcolor=ffffff>$useri[13]</td>";
echo "<td align=center bgcolor=ffffff>$useri[16]</td>";
echo "<td align=center bgcolor=ffffff>$useri[24]</td>";
echo "<td align=center bgcolor=ffffff><a href=group.php?action=modify&member=$useri[1]&id=$id>奖惩</a>/<a href=group.php?action=del&member=$useri[1]&id=$id>开除</a></td>";
echo '</tr>'; 
}
}

function showgroup()
{//1
global $userpath,$action,$tablewidth,$bordercolor,$titlecolor,$style_path,$username;
$user_list_file='bbsdata/userlist.php';
$userlist=trim(readfromfile($user_list_file));
$userlist=explode("\n",$userlist);
$count=count($userlist);
if (file_exists('bbsdata/group.php')) 
{//2
$groupfile ="bbsdata/group.php";
$groups=explode("\n",readfromfile($groupfile));
$gcount=count($groups);
echo"
<table cellspacing=1 cellpadding=0 width=$tablewidth border=0 align=center bgcolor=$bordercolor>
  <tr align=center height=22 bgcolor=$titlecolor> 
    <td bgcolor=$titlecolor width=100 class=title>各门派</td>
    <td bgcolor=$titlecolor width=80 class=title>掌门人</td>
    <td bgcolor=$titlecolor width=80 class=title>口号</td>
    <td bgcolor=$titlecolor width=30 class=title>人数</td>
    <td bgcolor=$titlecolor width=50 class=title>成员列表</td>
    <td bgcolor=$titlecolor width=40 class=title>威望</td>
    <td bgcolor=$titlecolor width=40 class=title>金钱</td>
    <td bgcolor=$titlecolor width=80 class=title>创始人</td>
    <td bgcolor=$titlecolor width=80 class=title>创建时间</td>
    <td bgcolor=$titlecolor width=50 class=title>加入我们</td>
  </tr>
";
for($i=0;$i<$gcount;$i++){//3
$detail=explode("|",$groups[$i]);
$gdate=date("Y-m-d",$detail[2]);
if($action=="tongji"){
$detail[4]=0;
$detail[10]="";
for($j=0;$j<$count;$j++){//4
	if(file_exists("$userpath/$userlist[$j].php")) {//5
		$useri=get_user_info($userlist[$j]);
		if($useri[27]==$detail[0]) {
			$detail[4]++;
			$detail[10]=$userlist[$j].",".$detail[10];
			}
		}//5
	}//4
}
if($detail[0]!="") {
$grouprvrc=$detail[4]*$detail[6];
$groupofstar=$detail[4]*$detail[7];

$useri=get_user_info($username);
if($useri[27]==$detail[0]) $groupname="<font color=red>$detail[0]</font>";
else $groupname="<font color=green>$detail[0]</font>";

echo '<tr height=22 bgcolor=ffffff>';
echo "<td bgcolor=ffffff align=center><a href=setgroup.php?id=$detail[2]>$groupname</a></td>"; 
echo "<td bgcolor=ffffff align=center><a href=profile.php?job=show&target=$detail[3]>$detail[3]</a></td>";
echo "<td bgcolor=ffffff>$detail[8]</td>";
echo "<td bgcolor=ffffff align=center>$detail[4]</td>";
echo "<td bgcolor=ffffff align=center><a href=group.php?action=list&id=$detail[2]>查看</a></td>";
echo "<td bgcolor=ffffff align=center>$grouprvrc</td>";
echo "<td bgcolor=ffffff align=center>$groupofstar</td>";
echo "<td bgcolor=ffffff align=center><a href=profile.php?job=show&target=$detail[1]>$detail[1]</a></td>";
echo "<td bgcolor=ffffff align=center>$gdate</td>";
echo "<td bgcolor=ffffff align=center><a href=group.php?action=add&id=$detail[0]>加入</a></td>";
echo '</tr>'; 
}
if($action=="tongji"){
$groups[$i]=$detail[0]."|".$detail[1]."|".$detail[2]."|".$detail[3]."|".$detail[4]."|".$detail[5]."|".$detail[6]."|".$detail[7]."|".$detail[8]."|".$detail[9]."|".$detail[10];
if($i==$gcount-1) $grouplist.=$groups[$i];else $grouplist.=$groups[$i]."\n";
}
}//3
if($action=="tongji") writetofile($groupfile,$grouplist);
}//2
}//1

function add($id){
global $username,$login_status,$userpath;
if($login_status==1){
	$useri=get_user_info($username);
	$useri[27]=$id;
	$uu=implode("|",$useri);
	writetofile("$userpath/$username.php",$uu);
	msg_box("加入御灵帮","加入御灵帮[$id]成功<ul>
<li><a href=group.php?action=tongji>门派首页</a></li>
</ul>");
}else {
jump_page("group.php","对不起!","<br><br>不好意思,你没有登陆,请稍候……<br>页面跳转后,请先登陆!<br><br>");
}
}
function modify($member,$id){
global $username,$login_status,$userpath;

if($login_status==1){
	$useri=get_user_info($member);
	$uu=implode("|",$useri);
//	writetofile("$userpath/$username.php",$uu);
	jump_page("group.php?action=tongji","程式尚未完成","<br><br>程式尚未完成,请稍候……<br>页面跳转后,你所加入的分堂将显示为红色!<br><br>");
}else {
jump_page("group.php","对不起!","<br><br>不好意思,你没有登陆,请稍候……<br>页面跳转后,请先登陆!<br><br>");
}
}/*function del($member,$id){
global $username,$login_status,$userpath;
$groupfile ="bbsdata/group.php";
$groups=explode("\n",readfromfile($groupfile));
$gcount=count($groups);
for($n=0;$n<$gcount;$n++){
$detail_r=explode("|",$groups[$n]);
if($detail_r[2]=$id)
	$detail=explode("|",$groups[$n]);
break;
}
$user_info=get_user_info($username);
if($login_status==1 && $user_info[27]==$detail[0]  && $username==$detail[3]){
	$useri=get_user_info($member);
	$useri[27]="";
	$uu=implode("|",$useri);
	writetofile("$userpath/$member.php",$uu);
for($n=0;$n<$gcount;$n++){
$detail=explode("|",$groups[$n]);
if ($detail[2]==$id) 
$detail_m=explode(",",$detail[10]);
$mcount=count($detail_m);
for($i=0;$i<$mcount;$i++){
	if($detail_m[$i]==$member)
		$detail_m[$i]="";
	break;
}
$detail[10]=implode(",",$detail_m);
$groups[$n]=implode("|",$detail);
break;}
$ww=implode("\n",$groups);
writetofile("$groupfile",$ww);
jump_page("group.php?action=list&id=$detail[2]","已经删除","<br><br>已经删除,请稍候……<br>页面跳转后,你所加入的分堂将显示为红色!<br><br>");
}else 
jump_page("group.php","对不起!","<br><br>您不是掌门!请稍候……<br>页面跳转后,请先登陆!<br><br>");
}*/
function del($member,$id){
global $username,$login_status,$userpath;
if($login_status==1){
	$useri=get_user_info($member);
	$uu=implode("|",$useri);
//	writetofile("$userpath/$username.php",$uu);
	jump_page("group.php?action=tongji","程式尚未完成","<br><br>程式尚未完成,请稍候……<br>页面跳转后,你所加入的分堂将显示为红色!<br><br>");
}else {
jump_page("group.php","对不起!","<br><br>不好意思,你没有登陆,请稍候……<br>页面跳转后,请先登陆!<br><br>");
}
}
if($action=="list") showgroupmember($id);
elseif($action=="add") add($id);
elseif($action=="del") del($member,$id);
elseif($action=="modify") modify($member,$id);
else showgroup();
?> 
 <tr> 
    <td colspan=10 bgcolor=<?=$categorycolor?> height=24> 
      <div align="center">
        <input type="button" value="论坛首页" 
onClick="location.href='index.php'" 
style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFFFFF'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" name="button">
        <input type="button" value="返回前页" 
onClick="location.href='javascript:history.back(1)';" 
style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFFFFF'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" name="button2">
        <input type="button" value="创建分堂" 
onClick="location.href='setgroup.php';" style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver="this.style.backgroundColor='#FFFFFF'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" name="button3">
      </div>
    </td>
  </tr>
</table>
<br>
<?
require("footer.php");echo"$footertp";
?>
</body> 
</html> 

⌨️ 快捷键说明

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