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

📄 profile.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
📖 第 1 页 / 共 3 页
字号:
<? 
require("userdata/style.php");
require("global.php");
require("ofstarcode.php");
include("bbsdata/level.php");
if ($login_status !=1) {
require("header.php");echo"$headertp";
headguide("你正处在论坛的PROFILE程式中","会员信息资料");
msg_box('对不起!!','<center>你还没有登陆或注册,暂时不能查看会员资料!!<br><ul><li><a href="register.php">现在注册</a></li><br><li><a href="login.php">现在登录</li></ul></center>');
require("footer.php");echo"$footertp";
        exit;}
if (file_exists("bbsdata/admin.php")) {
	$adminlist=file("bbsdata/admin.php");
	$count=count($adminlist);
	for ($i=0; $i<$count; $i++) {
		$detail=explode("|", trim($adminlist[$i]));
		$admin_list[]=$detail[1];}
}
if (empty($job)) { $job="modify"; }

if ($job=="show") {
	require("header.php");echo"$headertp";
	headguide("你正处在论坛的PROFILE程式中","信息资料");
	if (!$target || strrpos($target,'/')!==false || $target=="." || ereg("\.\.",$target) || !file_exists("$userpath/$target.php")) {
		msg_box('PROFILE程式','<br>状态:发生错误,您所指定的用户不存在<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li></ul>');
	}
	else show_member();
	require("footer.php");echo"$footertp";
	exit;
}
if ($step==2 && !checkpass($username,$oldpassword)) {
require("header.php");echo"$headertp";
	headguide("你正处在论坛的PROFILE程式中","信息资料");
	msg_box('PROFILE程式','<br>状态:发生错误,密码验证失败<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li>');
	require("footer.php");echo"$footertp";
	exit;
}


if ($job=="modify") {
	require("header.php");echo"$headertp";
	headguide("你正处在论坛的PROFILE程式中","信息资料");
	if ($login_status==0) {
		msg_box('PROFILE程式','<br>状态:发生错误,您还没有登录<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul>');
		require("footer.php");echo"$footertp";
		exit;
	}
	if (empty($step)) {
		show_form();
		require("footer.php");echo"$footertp";
		exit;
	} elseif($step==2) {

//-----------check---------
$check=1;
list($fb,$name,$pwd,$icon,$email,$oicq,$regdate,$sign,$page,$area,$comment,$honor,$lastpost,$postamount,$pe,$receive,$rvrc,$time1,$time2,$icq,$gender,$birth,$flag,$tuijian,$money,$null,$null2,$group,$null3,$null4,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)=get_user_info($username);
if (!empty($addpassword)) $pwd=stripslashes($addpassword); 
if (!empty($addemail)) $email=$addemail;
if (!empty($oicqnumber)) $oicq=$oicqnumber;
if (!empty($icqnumber)) $icq=$icqnumber;
if (!empty($usersx)) $sx=$usersx;
if (!empty($userstar)) $star=$userstar;
if (!empty($signature)) $sign=stripslashes($signature);
if (!empty($usericon)) $icon=$usericon;
if (!empty($homepage)) $page=$homepage;
if (!empty($addgender)) $gender=$addgender;
if (!empty($fromwhere)) $area=stripslashes($fromwhere);
if (!empty($addgroup)) $group=stripslashes($addgroup);
if (!empty($addcomment)) $comment=stripslashes($addcomment);
if (!empty($newhonor) || $postamount>=$use_honor) $honor=stripslashes($newhonor);
$birth=$adduseryear."/".$addusermonth."/".$adduserday;
                if($birth=str_replace("/","/",$birth));
                   {
                   list($biryear,$birmon,$birday)=split('\/',$birth);
				 if ($biryear-1900 < 0) {$sx = "";}	
		
    	else {
    		$sx = "sx".(($biryear-1900) % 12 + 1);
    	}
		
                   $birday=($birday*10)/10;
                   if($birday<10){
                   $startmp=$birmon."0".$birday;
                   }
                   else{
                   $startmp=$birmon.$birday;
                   }
                   if (($startmp>=120)&&($startmp<=218))$star="z11";
                    if (($startmp>=219)&&($startmp<=320))$star="z12";
                    if (($startmp>=321)&&($startmp<=419))$star="z1";
                    if (($startmp>=420)&&($startmp<=520))$star="z2";
                    if (($startmp>=521)&&($startmp<=621))$star="z3";
                    if (($startmp>=622)&&($startmp<=722))$star="z4";
                    if (($startmp>=723)&&($startmp<=822))$star="z5";
                    if (($startmp>=823)&&($startmp<=922))$star="z6";
                    if (($startmp>=923)&&($startmp<=1022))$star="z7";
                    if (($startmp>=1023)&&($startmp<=1121))$star="z8";
                    if (($startmp>=1122)&&($startmp<=1221))$star="z9";
                    if (($startmp>=1222)||($startmp<=119))$star="z10";
                   }
if ($sx==""){ $sx=$usersx; }
if ($biryear=="") $birth="";
if (!$flag) $flag="China";
$pwd=str_replace("\t","",$pwd); $pwd=str_replace("\r","",$pwd); $pwd=str_replace("\n","",$pwd);
if (strlen($pwd)<6) {$reason="密码太少不安全,请用六位或是六位以上"; $check=0;}
if (strrpos($pwd,"|")!==false || strrpos($pwd,"<")!==false || strrpos($pwd,">")!==false) {$reason="密码包含不可接受字符,请使用英文和数字"; $check=0;}
if (!ereg("^[-a-zA-Z0-9_\.]+\@([0-9A-Za-z][0-9A-Za-z-]+\.)+[A-Za-z]{2,3}$",$email)) {$reason="信箱不符合检查标准,请确认没有错误(拜托,假的也要像一点)"; $check=0;}
if (!empty($publicmail) && $publicmail=="yes") $publicmail=1; else $publicmail=0;
if (!ereg("^[0-9]{0,}$",$oicq)) {$reason="QQ号码不正确"; $check=0;}
if (!ereg("^[0-9]{0,18}$",$icq)) {$reason="icq号码不正确"; $check=0;}//-修改这里-ICQ
if (strlen($comment)>200) {$reason="自我介绍太长,请删掉一些,控制在100个字以内"; $check=0;}
if (strlen($sign)>$max_sign_length) {$reason="签名档太长,请删掉一些,控制在100个字以内"; $check=0;}
if ($use_own_portait){
	if ($own_portait[0]) {
	  $own_portait[0]=safe_convert($own_portait[0]);
	  if (strrpos($own_portait[0],'%')!==false) {$reason="自定义头像包含不可接受字符,请使用正常URL"; $check=0;}
	  if (!ereg("^[0-9]{2,3}$",$own_portait[1]) || !ereg("^[0-9]{2,3}$",$own_portait[2]) || $own_portait[1]>120 || $own_portait[1]<70 || $own_portait[2]>120 ||$own_portait[1]<70) {$reason="你自定义的图片必须在(70-120)*(70-120)的大小范围里"; $check=0;}
	}
}
$page	=	safe_convert($page);
$comment=	safe_convert($comment);
$sign	=	safe_convert($sign);
$area	=	safe_convert($area);

if (empty($receivemail)) $receivemail="text";
elseif ($receivemail=="html") $receivemail="html";
elseif ($receivemail=="none") $receivemail="none";
else $receivemail="text";
$receive=$receivemail;
if (!empty($publicemail)) $pe=1;
else $pe=0;
		if ($check==0) {
			msg_box('PROFILE程式',"<br>状态:发生错误,$reason<br><ul><li><a href=\"javascript:history.back(1)\">返回前页</a></li></ul>");
		}
		else {
if($group!=$modgroup){
$groupfile ="bbsdata/group.php";
$groups=explode("\n",readfromfile($groupfile));
$gcount=count($groups);
for($i=0;$i<$gcount;$i++){
$detail=explode("|",$groups[$i]);
if ($modgroup==$detail[0]) {
$detail[4]++;
$dd=explode(",",$detail[10]);
if(!in_array($name,$dd)) $detail[10]=$name.",".$detail[10];
$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 ($group==$detail[0] && $modgroup!=$detail[0]) {
$detail[4]--;
$dd=explode(",",$detail[10]);
for($k=0;$k<count($dd);$k++){
if($dd[$k]==$name) unset($dd[$k]);
break;
}
$detail[10]=implode(",",$dd);
$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";
writetofile($groupfile,$grouplist);
}
}
			if ($own_portait) $icon.="%$own_portait[0]%$own_portait[1]%$own_portait[2]";
		$newline=array($fb,$name,$pwd,$icon,$email,$oicq,$regdate,$sign,$page,$area,$comment,$honor,$lastpost,$postamount,$pe,$receive,$rvrc,$time1,$time2,$icq,$gender,$birth,$flag,$tuijian,$money,$null,$null2,$modgroup,$null3,$null4,$sx,$star,$setface,$bei2,$bei3,$bei4,$bei5,$bei6);
			writetofile("$userpath/$username.php",implode("|",$newline));

			msg_box('PROFILE程式',"<br>状态:操作成功,您已经成功修改了您的信息<br><ul><li><a href=\"index.php\">返回论坛</a></li><br><li><a href=\"profile.php?job=testsign\">测试签名</a></li></ul>");
		}
		require("footer.php");echo"$footertp";
		exit;
	}
}
if ($job=="testsign") {
	require("header.php");echo"$headertp";
	headguide("你正处在论坛的PROFILE程式中","信息资料");
	if ($login_status==0) {
		msg_box('PROFILE程式','<br>状态:发生错误,您还没有登录<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul>');
	}
	else {
		$temp=get_user_info($username);
		$sign=$temp[7];
		msg_box('PROFILE程式',"<br>状态:查看签名,下面是您的签名<br><hr width=340 size=1><table width=340 align=center><tr><td>".convert($sign)."</td></tr></table><br><hr width=340 size=1><ul><li><a href='javascript:history.back(1)'>返回前页</a></li></ul>");
	}
	require("footer.php");echo"$footertp";
	exit;
}
function show_form() {
global $username,$profile_cp,$use_honor,$bordercolor,$subcolor,$manager,$titlecolor,$tablewidth,$sign_use_ftbcode,$ftbcode_sign,$article_color1,$article_color2,$group_rvrc,$group_rvrc1,$group_ofstar,
$use_own_portait;
list($fb,$name,$pwd,$usericon,$email,$oicq,$regdate,$sign,$homepage,$area,$comment,$honor,$lastpost,$postamount,$pe,$receive,$rvrc,$time1,$time2,$icq,$gender,$birth,$flag,$tuijian,$money,$null,$null2,$group,$null3,$null4,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)=get_user_info($username);
if($bei1=="1")$checked1=checked; else $checked2=checked;
$usericon=explode('%',$usericon);
$sign=str_replace("<br>","\r\n",$sign);
if ($pe) $pe="checked";
$style="style=\"background-color:#FEFEFF; color:#5A6633; border: 1 double #B4B4B4\"";
$style2="style=\"background-color:#FEFEFF; color:#666666; border: 1 double #B4B4B4\"";
$showgroup="<select name=modgroup><OPTION value=\"\">无门无派</OPTION>";
if (file_exists('bbsdata/group.php')) 
{$group_array=explode("\n",readfromfile('bbsdata/group.php'));
for ($i=0;$i<count($group_array);$i++)
{
$detail=explode("|",$group_array[$i]);
$ifselected="";
if($group==$detail[0]) $ifselected="selected";
if($detail[0]!="") $showgroup.="<OPTION value={$detail[0]} {$ifselected}>{$detail[0]}</OPTION>";
}
}
$showgroup.="</select>[创建门派所需条件:威望>".$group_rvrc.";金钱>".$group_ofstar."]";
print <<<EOT
<script language=JavaScript1.2>
function validate(theform) {
	if (theform.oldpassword.value=="") {
		alert("请输入旧密码验证");
		return false; }
	 else { return true; }}
</script>
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
<tr><td><table cellspacing=1 cellpadding=4 border=0 width=100%><tr align=center>
<td bgcolor='$article_color2' width=25%>控制面板首页</td>
<td bgcolor='$article_color2' width=25%><a href=profile.php>编辑个人资料</a></td>
<td bgcolor='$article_color2' width=25%><a href=profile.php?job=show&target=$username>查看个人资料</a></td>
<td bgcolor='$article_color2' width=25%><a href=viewfav.php.php>收藏夹</a></td>
</tr></table></td></tr></table><br>
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
  <form action=profile.php method=post onSubmit="return validate(this)" name="creator">
 <tr>
    <td>
<table width=100% border=0 cellpadding=3 cellspacing=1>
  <tr> 
    <td bgcolor=$titlecolor class=title>信息管理程式</td>
	<td bgcolor=$titlecolor class=title><b>查看/修改个人信息(为了安全考虑在修改以后,请大家填上旧的密码) </b> </td>
  </tr>
  <tr bgcolor=$article_color2> 
    <td width=30% valign=middle>&nbsp;旧的密码:<br>
      &nbsp;(验证旧密码) </td>
    <td width=70%> 
      <input type=password size=20 maxlength=75 name="oldpassword" value="" style="background-color:#ffffff; color:#0000ff; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
     (修改以下任一项,都需密码认证)</td>
  </tr>
  <tr bgcolor=$article_color2> 
    <td width=30% valign=middle>&nbsp;新的密码:<br>

⌨️ 快捷键说明

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