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

📄 function.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
字号:
<?
function view_user() {
global $member,$tab_top,$tab_bottom,$userpath,$thisprog,$backgroundcolor,$bordercolor,$tablewidth,$titlecolor,$subcolor;
  echo "<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 bgcolor=$titlecolor> 
    <td class=title bgcolor=$titlecolor colspan=8>查看用户资料</td>
   </tr>";
  if (empty($member) || $member=="." || $member==".." || !file_exists("$userpath/$member.php")) {
    print ("<tr bgcolor=$backgroundcolor><td colspan=8 align=center><b>非法的用户名</b><br><br><a href=lxmanager.php>返回管理</a></td></tr></table> </td> </tr></table>");
  require("footer.php");echo"$footertp";
  exit; }
  list($fb,$name,$userpwd,$usericon,$useremail,$usericq,$regdate,$sign,$homepage,$area,$introduction,$honor,$last_post,$postamount,$eamil,$pe,$rvrc,$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money,$lasttitle,$lastaddr,$group,$yanzheng,$null4,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)
    = explode("|",readfromfile("$userpath/$member.php"));
    $regdate=getfulldate($regdate);
    $lastvisit=getfulldate($nowtime);
    $rvrc=floor($rvrc/10);
	if($sex==1) $gender="帅哥";
	elseif($sex==2) $gender="美女";
	else $gender="未知";
        print <<<EOT
    <tr bgcolor=$backgroundcolor>
    <td colspan=2 align=center><font face=verdana><b>"$member"</b> 的详细资料   [ <a href="$thisprog?action=edit&member=$member">编辑</a> ] | [ <a href="$thisprog?action=kill&member=$member">删除</a> ]</font></td></tr>
    <tr bgcolor=$backgroundcolor>
    <td  width=30%><b>注册时间:</b></td>
    <td>$regdate</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td width=30%><b>最后登陆时间:</b></td>
    <td>$lastvisit</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>用户密码:</b></td>
    <td>(已加密)</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>电子信箱:</b></td>
    <td>$useremail</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>QQ号码:</b></td>
    <td>$usericq</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>用户头衔:</b></td>
    <td>$honor</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>用户性别:</b></td>
    <td>$gender</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>用户生日:</b></td>
    <td>$born</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>用户门派:</b></td>
    <td>$group</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>用户推荐人:</b></td>
    <td>$tuijianren</td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>发表总数:</b></td>
    <td>$postamount 篇<br><br></td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>威望值(就是班竹评的分,发1贴自动升1点):</b></td>
    <td>$rvrc 点<br><br></td></tr>
    <tr bgcolor=$backgroundcolor>
    <td><b>金钱(流星):</b></td>
    <td>$money 点<br><br></td></tr>
    <tr bgcolor=$backgroundcolor>
    <td colspan=8 align=center>
    <a href="javascript:history.go(-1)">返回前页</a>
    </td></tr>
  </table>
 </td>
 </tr>
</table>
EOT;
require("footer.php");echo"$footertp";
exit();
}
function viewall_user() { 
global $tab_top,$tab_bottom,$thisprog,$backgroundcolor,$bordercolor,$tablewidth,$titlecolor,$subcolor;
echo "
<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 bgcolor=$titlecolor> 
    <td class=title bgcolor=$titlecolor colspan=8>查看全部用户</td>
   </tr>
";
if (!file_exists("bbsdata/userlist.php")) { echo "
   <tr bgcolor=$backgroundcolor> 
    <td><br><b>用户库没找到!</b><br><br><a href=smanager.php>返回执行其他动作</a><br><br></td>
   </tr>
   <tr align=left bgcolor=$subcolor> 
    <td>&nbsp;</td>
   </tr>
  </table>
 </td>
 </tr>
";exit;} 
  $userlist=explode("\n", readfromfile("bbsdata/userlist.php"));
  $count_all=count($userlist)-1; 
echo "
   <tr bgcolor=$backgroundcolor> 
    <td colspan=8 align=center><b>一共 $count_all 个用户 </b>
<br><tr bgcolor=$backgroundcolor><td>用户名</td><td>发贴数</td><td>注册时间</td><td>最后登陆</td></tr>";

for($i=0;$i<$count_all;$i++) {
if (i%2==0) echo "<tr bgcolor=$backgroundcolor>";
global $userpath;
  if(file_exists("$userpath/$userlist[$i].php")) {
  $user_info=explode("|",readfromfile("$userpath/$userlist[$i].php"));
  $regdate=getfulldate($user_info[6]);
  $lastdate=getfulldate($user_info[18]);
  $postamount=$user_info[13];
  
echo "<td >"."<a href=$thisprog?action=edit&member=$userlist[$i]>
<font color=green>".$userlist[$i]."</font></a></td><td>".$postamount."</td><td>".$regdate."</td><td>".$lastdate."</td>"; 
} 
}
echo "<br></td>
   </tr>
<tr align=left bgcolor=$backgroundcolor> 
    <td colspan=8 align=center><a href=smanager.php>返回管理</a></td>
   </tr>
  </table>
 </td>
 </tr>";
 require("footer.php");echo"$footertp";
 exit();
} 
function update_list() {
global $upcount,$uplist,$thisprog,$tab_top,$tab_bottom,$userpath,$backgroundcolor,$bordercolor,$tablewidth,$titlecolor,$subcolor;
  $dh=opendir("$userpath/");
  while ($userfile=readdir($dh)) {
    if (($userfile!=".") && ($userfile!="..") && !strpos($userfile,".snd") && !strpos($userfile,".rec")) {
		$userfilename=explode(".",$userfile);
        $user_array[]=$userfilename[0];
    }
  }
  closedir($dh);
  //reset($user_array);
  $count=count($user_array);

  if (!empty($upcount)) {
    $olddata=readfromfile("bbsdata/newuser.php");
    if (empty($olddata)) $olddata=" |0|0";
    list($newuser,$oldcount,$postamount)=explode("|",$olddata);
    $newdata="$newuser|$count|$postamount";
    writetofile("bbsdata/newuser.php",$newdata);
  print ("<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 bgcolor=$titlecolor> 
    <td class=title bgcolor=$titlecolor colspan=8>计算用户总数</td>
   </tr>
     <tr bgcolor=$backgroundcolor> 
    <td align=center>
    当前共有 $count 个注册用户,数据已经更新!
<br><br><a href=lxmanager.php>返回管理</a></td>
   </tr>
  </table>
 </td>
 </tr>
</table>");
  }
  if (!empty($uplist)) {
    writetofile("bbsdata/userlist.php",implode("\n",$user_array)."\n");
  print ("
<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 bgcolor=$titlecolor> 
    <td class=title bgcolor=$titlecolor>更新用户列表</td>
   </tr>
   <tr bgcolor=$backgroundcolor> 
    <td align=center>
  用户列表已经更新!<br><br><a href=lxmanager.php>返回管理</a></td>
   </tr>
  </table>
 </td>
 </tr>
</table>
");
  }
require("footer.php");echo"$footertp";
exit();
}
function chx_getdarkcolor($img,$clr){
$rgb=imagecolorsforindex($img,$clr);
return array($rgb["red"]/2,$rgb["green"]/2,$rgb["blue"]/2);
}
function chx_getexy($a,$b,$d){
$d=deg2rad($d);
return array(round($a*Cos($d)),round($b*Sin($d)));
}
function chx_arc($img,$ox,$oy,$a,$b,$sd,$ed,$clr){
$n=ceil(($ed-$sd)/ANGLE_STEP);
$d=$sd;
list($x0,$y0)=chx_getexy($a,$b,$d);
for($i=0;$i<$n;$i++){
$d=($d+ANGLE_STEP)>$ed?$ed:($d+ANGLE_STEP);
list($x,$y)=chx_getexy($a,$b,$d);
imageline($img,$x0+$ox,$y0+$oy,$x+$ox,$y+$oy,$clr);
$x0=$x;
$y0=$y;
}
}
function chx_sector($img,$ox,$oy,$a,$b,$sd,$ed,$clr){
$n=ceil(($ed-$sd)/ANGLE_STEP);
$d=$sd;
list($x0,$y0)=chx_getexy($a,$b,$d);
imageline($img,$x0+$ox,$y0+$oy,$ox,$oy,$clr);
for($i=0;$i<$n;$i++){
$d=($d+ANGLE_STEP)>$ed?$ed:($d+ANGLE_STEP);
list($x,$y)=chx_getexy($a,$b,$d);
imageline($img,$x0+$ox,$y0+$oy,$x+$ox,$y+$oy,$clr);
$x0=$x;
$y0=$y;
}
imageline($img,$x0+$ox,$y0+$oy,$ox,$oy,$clr);
list($x,$y)=chx_getexy($a/2,$b/2,($d+$sd)/2);
imagefill($img,$x+$ox,$y+$oy,$clr);
}
function chx_sector3d($img,$ox,$oy,$a,$b,$v,$sd,$ed,$clr){
chx_sector($img,$ox,$oy,$a,$b,$sd,$ed,$clr);
if($sd<180){
list($R,$G,$B)=chx_getdarkcolor($img,$clr);
$clr=imagecolorallocate($img,$R,$G,$B);
if($ed>180) $ed=180;
list($sx,$sy)=chx_getexy($a,$b,$sd);
$sx+=$ox;
$sy+=$oy;
list($ex,$ey)=chx_getexy($a,$b,$ed);
$ex+=$ox;
$ey+=$oy;
imageline($img,$sx,$sy,$sx,$sy+$v,$clr);
imageline($img,$ex,$ey,$ex,$ey+$v,$clr);
chx_arc($img,$ox,$oy+$v,$a,$b,$sd,$ed,$clr);
list($sx,$sy)=chx_getexy($a,$b,($sd+$ed)/2);
$sy+=$oy+$v/2;
$sx+=$ox;
imagefill($img,$sx,$sy,$clr);
}
}
function chx_getindexcolor($img,$clr){
$R=($clr>>16) & 0xff;
$G=($clr>>8)& 0xff;
$B=($clr) & 0xff;
return imagecolorallocate($img,$R,$G,$B);
}

⌨️ 快捷键说明

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