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

📄 ua.php

📁 bmb的论坛
💻 PHP
字号:
<?
/* 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");
require("bmbcodes.php");
include("datafile/usertitle.php");
include("template.php");
require("lang/$language/usercp.php");
if (!$openupusericon) {
	include("header.php");
	navi_bar($tip[1],$info[6]);
	msg_box($programname,$info[10]);
	include("footer.php");
	exit;
}

if (file_exists("datafile/admin.php")) {
	$adminlist=file("datafile/admin.php");
	$count=count($adminlist);
	for ($i=0; $i<$count; $i++) {
		$detail=explode("|", trim($adminlist[$i]));
		$forum_admin[]=$detail[1];
	}
}
$add_title=$show_form_lng[116];
if (empty($job)) { $job="modify"; }
if ($job=="delete") {
	include("header.php");
	navi_bar($tip[1],$info[6]);
	if ($login_status==0) {
		msg_box($programname,$error[1]);
		include("footer.php");
		exit;
	}
	list($name,$pwd,$icon,$email,$oicq,$regdate,$sign,$page,$area,$comment,$honor,$lastpost,$postamount,$pe,$receive,$bym,$passask,$passanswer,$usertype,$money,$born,$group,$sex,$national,$lastlogin,$tlastvisit,$deltopic,$delreply,$uploadfiletoday,$lastupload,$foreuser,$hisipa,$hisipb,$hisipc)=get_user_info($username);
	$todelportait=explode('%',$icon);
	$icon="no_portait.gif%%%";
	$newline=array($name,$pwd,$icon,$email,$oicq,$regdate,$sign,$page,$area,$comment,$honor,$lastpost,$postamount,$pe,$receive,$bym,$passask,$passanswer,$usertype,$money,$born,$group,$sex,$national,$lastlogin,$tlastvisit,$deltopic,$delreply,$uploadfiletoday,$lastupload,$foreuser,$hisipa,$hisipb,$hisipc);
	writetofile("$id_unique/$fileusername",implode("|",$newline));
	msg_box($programname,$ua[0]);
	include("footer.php");
	exit;
}
if ($job=="modify") {
	include("header.php");
	navi_bar($tip[1],$info[6]);
	if ($login_status==0) {
		msg_box($programname,$error[1]);
		include("footer.php");
		exit;
	}
	getUserInfo();
	if ($postamount<$max_avatars_upload_post) {
		msg_box($programname,$ua[1]);
		include("footer.php");
		exit;
	}
	if (empty($step)) {
		show_form();
		include("footer.php");
		exit;
	} elseif($step==2) {
//-----------check---------
		$check=1;
		list($name,$pwd,$icon,$email,$oicq,$regdate,$sign,$page,$area,$comment,$honor,$lastpost,$postamount,$pe,$receive,$bym,$passask,$passanswer,$usertype,$money,$born,$group,$sex,$national,$lastlogin,$tlastvisit,$deltopic,$delreply,$uploadfiletoday,$lastupload,$foreuser,$hisipa,$hisipb,$hisipc)=get_user_info($username);
		$FILE_URL=$_FILES['attachment']['tmp_name'];
		$FILE_NAME = $_FILES['attachment']['name'];
		$FILE_SIZE = $_FILES['attachment']['size'];
		$FILE_TYPE = $_FILES['attachment']['type'];
		$todelico=$icon;
		if ($openupusericon &&  $FILE_NAME != "none" ) { $upload=1; 
		}else{ 
		$upload=0; 
		$check=0; 
		$reason=$ua[2];
		}
		if ($upload) {
		//-----User has uploaded some file-----
			if ($FILE_SIZE>$max_avatars_upload_size) {
			  $check=0; $reason=$ua[3];
			}else{
			  $available_ext = explode(' ',$upload_avatars_type_available);
			  $extcount=count($available_ext); $is_ext_allowed=0;
			  for ($i=0; $i<$extcount; $i++) {
				$currentext=$available_ext[$i];
				if (eregi("\.\\$currentext$",$FILE_NAME)) {
			  	  $is_ext_allowed=1; break;
			  	}
			  }
			  if (!$is_ext_allowed) {$check=0; $reason=$ua[4];}
			  
			}
		}

		if ($upload && $check) {
			$upload_tmpurl="tmp/".$timestamp.$currentext;
			move_uploaded_file($FILE_URL,$upload_tmpurl); 
			$size=getimagesize($upload_tmpurl);
			if ($size[0]>$maxwidth || $size[1]>$maxheight) {
				$check=0; $reason=$ua[5];
			}else{
				$upload_aname="usravatars/".$timestamp.".$currentext";
				copy($upload_tmpurl, $upload_aname);
			}
			$todelportait=explode('%',$todelico);
		}
		
		if ($check==0) {
			msg_box($programname,"<br>$gl[15], $reason<br><ul><li><a href=\"javascript:history.back(1)\"></a></li></ul>");
		}else {
			$icon="%$upload_aname%$size[0]%$size[1]";
			$newline=array($name,$pwd,$icon,$email,$oicq,$regdate,$sign,$page,$area,$comment,$honor,$lastpost,$postamount,$pe,$receive,$bym,$passask,$passanswer,$usertype,$money,$born,$group,$sex,$national,$lastlogin,$tlastvisit,$deltopic,$delreply,$uploadfiletoday,$lastupload,$foreuser,$hisipa,$hisipb,$hisipc);
			writetofile("$id_unique/$fileusername",implode("|",$newline));
			msg_box($programname,$step2_suc[0]);
		}
		include("footer.php");
		exit;
	}
}

//------------------------------------------------------------------------------------------
//+--------------------show the form to modify own information-----------------
function show_form() {
global $username,$template,$iblock,$styleidcode,$block,$language,$icount,$temfilename,$openstylereplace,$navbarshow,$use_honor,$max_avatars_upload_size,$bordercolor,$subcolor,$admin_name,$titlecolor,$tablewidth,$sign_use_bmfcode,$bmfcode_sign,$article_color1,$list_color1,$list_color2,$article_color2,$show_form_lng,$ua,$gl,$po,$use_own_portait,$header_tile,$tile_back,$upload_avatars_type_available,$icon_upload_size,$openupusericon,$upload_type_icon,$bbs_title,$otherimages,$maxheight,$maxwidth,$opencutusericon;
	list($name,$pwd,$usericon,$email,$oicq,$regdate,$sign,$homepage,$area,$comment,$honor,$lastpost,$postamount,$pe,$none,$bym,$passask,$passanswer,$usertype,$money,$born,$group,$sex,$national)=get_user_info($username);
	$usericon=explode('%',$usericon);
	if($header_tile) $hbackground="background='$header_tile'"; 
	global $categorycolor,$cachedstyle,$decorate1,$decorate2,$decorate3,$decorate4,$winimages,$jiazhongcolor,$logofile,$otherimages,$replyicon,$npollicon,$npost,$pollicon,$posticon,$nonewpost,$onlyread,$newpost,$tablebg,$header_tile,$tile_back,$background_color,$article_color2,$article_color1,$list_color2,$list_color1,$forumcolortwo,$forumcolorone,$forumdescolor,$forumnamecolor,$categoryfontcolor,$cautioncolor,$subcolor,$tablewidth,$bordercolor,$titlefontcolor,$titlecolor,$backgroundcolor;
	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);

print <<<EOT

<br>
<table width="98%" border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
  <form action=ua.php method=post enctype="multipart/form-data"  name="creator">
  <tr>
    <td>
<table width=100% border=0 cellpadding=3 cellspacing=1>
  <tr bgcolor='$titlecolor' background='$tile_back' > 
    <td bgcolor='$titlecolor' background='$tile_back' colspan=2 class=title>$show_form_lng[116]</td>
  </tr>
  <tr bgcolor=$article_color1> 
    <td align=center colspan=2><b>$ua[7] </b> </td>
  </tr>
EOT;

	$available_ext = explode(' ',$upload_avatars_type_available);
	$extcount=count($available_ext);
	$showtype="<select><option>$ua[8]</option><option>---------</option>";
	for ($i=0; $i<$extcount; $i++) {
	$showtype.="<option>$available_ext[$i]</option>";
	}
	$showtype.="</select>";
print <<<EOT
<tr align=left bgcolor=$article_color1>
<td align=left valign=middle>&nbsp;<b>$show_form_lng[105]</b><br>$ua[9]<br>$ua[10]</td>
<td align=left valign=middle><font face="verdana,arial">
	<input size="33" style="background-color:#FEFEFF; border: 1 double #B4B4B4"  type="file" name="attachment">
	$showtype</font>
<br>* - $ua[11]</a><br>
EOT;

	echo '</td>
    </tr>';
print <<<EOT

<tr bgcolor=$subcolor> 
<td colspan=2 bgcolor=$titlecolor align="center"  background='$tile_back' class=title>
<input type="button" value="$show_form_lng[147]" onClick="location.href='index.php'" >
<input onClick="javascript:history.back(1)" type="button" value="$show_form_lng[148]" >
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<input type=submit value="$show_form_lng[149]" >
<input type=hidden value="2" name="step">
<input type=hidden value="$usericon[0]" name="oldusericon">
<input type=reset value="$show_form_lng[150]"  name="reset">
</td></tr>
</table>
</td>
</tr>
</form>
	
</table>
EOT;
}

⌨️ 快捷键说明

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