<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<script language="javascript">
//单选表单选取 Obj 表单名，VAL所选的值
function chkradio(Obj,Val)
{
	if (Obj)
	{
	for (i=0;i<Obj.length;i++){
		if (Obj[i].value==Val){
		Obj[i].checked=true;
		break;
		}
	}
	}
}	

	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
	//extra height in px to add to iframe in FireFox 1.0+ browsers
	var FFextraHeight=getFFVersion>=0.1? 16 : 0 

	function dyniframesize(iframename) {
	   var pTar = null;
	   if (parent.document.getElementById){
		 pTar = parent.document.getElementById(iframename);
	   }
	   else{
		 eval('pTar = ' + iframename + ';');
	   }
	   if (pTar && !window.opera){
		 //begin resizing iframe
		 pTar.style.display="block"
		
		 if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){
		   //ns6 syntax
		   pTar.height = pTar.contentDocument.body.offsetHeight+FFextraHeight; 
		 }
		 else if (pTar.Document && pTar.Document.body.scrollHeight){
		   //ie5+ syntax
		   pTar.height = pTar.Document.body.scrollHeight;
		 }
	   }

	}
function getTotalHeight(o){
	return getObj(o).offsetTop
}
function showsuperset(obj)
{
	if(obj.checked){
		document.getElementById('superset').style.display= '';
		dyniframesize('userIfr');
	}else{
		document.getElementById('superset').style.display= 'none';
		dyniframesize('userIfr');
	}
}
</script>
<script language="JavaScript" src="templates/lang/<?=$GLOBALS['fsetting']['lang']?>/js/mymodify.js"></script>
<div id="nav_top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr width="100%">
<td id="user_right_td">
<!---##########################右边样式部分##########################--->
<form action="mymodify.php?action=update_userinfo&username={$user_Id}" method=POST name="theForm">
	<div  id="tabtitle">
		<div id="topicbodyuser">
		<span>
			<div class="user_nav_topic">
				<table width="96%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="5" class="title"> -=> <?=$lang['HeaderTitle2']?></td>
				</tr>
				  <tr id="user_nav">
					<td class="tdcolor"><?=$lang['template.strings33']?></td>
					<td><?=$lang['template.strings34']?></td>
				  </tr>
				  <tr>
					<td class="tdcolor"><?=$lang['tpl.mymo.str2']?></td>
					<td><input type="text" name="title" id="title" value="<?=$user_Title?>" size=15 maxlength=13></td>
				  </tr>
				  <tr>
					<td class="tdcolor"><?=$lang['tpl.mymo.str3']?></td>
					<td>
						<input type="radio" name="sex" class="radio" value="1"><?=$lang['tpl.mymo.str4']?>
						<input type="radio" name="sex" class="radio" value="0"><?=$lang['tpl.mymo.str5']?>
					</td>
				  </tr>
				  <tr>
					<td class="tdcolor"><?=$lang['tpl.mymo.str7']?></td>
					<td>
						<select name=face style="font-family:arial" size=1 onChange="document.images['face'].src=options[selectedIndex].value; document.theForm.myface.value=options[selectedIndex].value">
					<?php
						for( $i=1; $i<count($_DCACHE['userface'])-2; $i++ ){
							$faceUrl = trim($_DCACHE['userface'][0].$_DCACHE['userface'][$i]);
							$faceSelected = ( strtolower($faceUrl) == strtolower($face) ? ' selected ' : '' );
							echo $Face_select;
							echo '<option value="'.$faceUrl.'" '.$faceSelected.'>'.$_DCACHE['userface'][$i].'</option>';
						}
					?>
						</select>
						<img id=face style="float:right;" src="<?=$user_Face?>" width="<?=$user_FaceWidth?>" height="<?=$user_FaceHeight?>">
						<a href="#" onclick="openScript('smiley.php?t=1',650,400)" title="<?=$lang['tpl.mymo.str54']?>">[<font color=<?=$color?>><?=$lang['tpl.mymo.str8']?></font>]</a><br>
						<?php
							if($upface_disable){
								if( $uploadSetting0 != 0 ){
									echo '<iframe name="ad" frameborder=0 width=260 height=22 scrolling=no src="reg_upload.php"></iframe>';
									echo '<input type="hidden" name="tmp_uploadface" value="" />';
								}
							}	$lang['tpl.mymo.str10']=str_replace(array('{$mypostnum}','{$facepostnum}'),array($mypostnum,$facepostnum),$lang['tpl.mymo.str10']);
						?>
						<br><?=$lang['tpl.mymo.str9']?><input type="TEXT" name="myface" size=30 maxlength=100 value="<?=$user_Face?>"> 
						<br><font color=red><?=$lang['tpl.mymo.str10']?></font><input type="hidden" name="mypostnum" value="<?=$mypostnum?>">
						<?=$lang['tpl.mymo.str11']?><input type="TEXT" name="width" size=3 maxlength=3 value="<?=$user_FaceWidth?>">0---<?=$forum_Mwidth?><?=$lang['tpl.mymo.str12']?>
						<?=$lang['tpl.mymo.str13']?><input type="TEXT" name="height" size=3 maxlength=3 value="<?=$user_FaceHeight?>">0---<?=$forum_Mheight?><?=$lang['tpl.mymo.str12']?><br>
						<?=$lang['tpl.mymo.str6']?>
					</td>
				  </tr>
				  <tr>
					<td class="tdcolor"><?=$lang['tpl.mymo.str15']?></td>
					<td>

<div style="float:left;">
<input name="tmagicface" value="1" type="checkbox" class="chkbox" <?=$isselect?>><?=$lang['tpl.mymo.str15']?>
<input name="imagicface" value="{$firstmagicface}" type="hidden" id="smagicface">
<br>
<?=$lang['tpl.mymo.str16']?><font id=magicmoney color=red><?=$magicmoney?></font>
<br>
<?=$lang['tpl.mymo.str17']?><font id=magicticket color=red><?=$magicticket?></font>
</div>
<Div id="MagicFaced" Style="POSITION:absolute;Z-INDEX: 99;display:none;float:left;"></Div>
<div id=lookmagicthis style="float:left;">&nbsp;
<img src="dv_plus/tools/magicface/gif/<?=$firstmagicface?>.gif" border=0 ID="magicfacepic" onclick="lookmagic()" alt="<?=$lang['tpl.mymo.str18']?>"><a href="javascript:lookmagic()" style="TEXT-DECORATION: none" title="<?=$lang['tpl.mymo.str18']?>"><font style="font-family: Webdings;">6</font></a>&nbsp;</div>
<?=$lang['tpl.mymo.str14']?>
<SCRIPT LANGUAGE="JavaScript">
<!--
function lookmagic()
{
	var obj=document.getElementById("magicframe");
	var buttonElement = document.getElementById("magicfacepic");
	if (obj.style.visibility=="hidden")
	{
		obj.style.top = (getOffsetTop(buttonElement) + buttonElement.offsetHeight)+"px";
		obj.style.left = (getOffsetLeft(buttonElement))+"px";
		obj.style.visibility="visible";
		obj.style.display= '';
	}else {
		obj.style.visibility="hidden";
		obj.style.display= 'none';
	}
}
function closemagic()
{
	var cm=document.getElementById("magicframe");
	if (cm.style.visibility=="visible")
	{
		cm.style.visibility = "hidden";
	}
}
//Colour pallete top offset
function getOffsetTop(elm) {
	var mOffsetTop = elm.offsetTop;
	var mOffsetParent = elm.offsetParent;
	while(mOffsetParent){
		mOffsetTop += mOffsetParent.offsetTop;
		mOffsetParent = mOffsetParent.offsetParent;
	}
	return mOffsetTop;
}

//Colour pallete left offset
function getOffsetLeft(elm) {
	var mOffsetLeft = elm.offsetLeft;
	var mOffsetParent = elm.offsetParent;
	while(mOffsetParent) {
		mOffsetLeft += mOffsetParent.offsetLeft;
		mOffsetParent = mOffsetParent.offsetParent;
	}
	return mOffsetLeft;
}
-->
</SCRIPT>
					</td>
				  </tr>
				  <tr>
					<td class="tdcolor"><?=$lang['tpl.mymo.str21']?></td>
					<td>
						<select size=1 name=GroupName>
						<option value="{$lang['tpl.mymo.str22']}"><?=$lang['tpl.mymo.str22']?></option>
						<?php
							if( !empty($_MenpaiList) && is_array($_MenpaiList) ){
								foreach( $_MenpaiList as $val ){
									$menpaiSelected = ( $val['groupname'] == $_UserInfo['usergroup'] ? ' selected ' : '' );
									echo '<option value="'.$val['groupname'].'" '.$menpaiSelected.'>'.$val['groupname'].'</option>';
								}
							}
							$lang['tpl.mymo.str23_desc']=str_replace('{$signlength}',$signlength,$lang['tpl.mymo.str23_desc']);
						?>
						</select>
						<?=$lang['tpl.mymo.str21_desc']?>
					</td>
				  </tr>
				  <?php is_numeric($user_Birthday) AND ($user_Birthday = gmdate('Y-m-d', $user_Birthday + getUserTimeZoneOffset()));?>
				  <tr>
					<td class="tdcolor"><?=$lang['tpl.mymo.str19']?>：</td>
					<td>
						<input type=text name="birthday" value="<?=$user_Birthday?>"  onclick = "setday(birthday)" >
						&nbsp;&nbsp;<span id="birthday_info"><?=$lang['tpl.mymo.str19_desc']?></span>
					</td>
				  </tr>

				  <tr>
					<td class="tdcolor"><?=$lang['tpl.mymo.str23']?></td>
					<td>
						<div style="float:left"><textarea name="Signature" rows=5 cols=60 wrap=PHYSICAL><?=$user_Signature?></textarea>&nbsp;&nbsp;</div>
						<div style="float:left;"><span id="Signature_info"><?=$lang['tpl.mymo.str23_desc']?></span></div>
					</td>
				  </tr>
				</table><br />

				<table width="96%" border="0" cellspacing="0" cellpadding="0">
				  <tr id="user_nav">
					<td colspan='2'><input onclick="showsuperset(this)" type="checkbox" name="checkbox" class="checkbox" value="checkbox" /> <?=$lang['template.strings35']?></td>
				  </tr>
				</table>
				<div id="superset" name="superset" style="display:none;">
				<table width="96%" border="0" cellspacing="0" cellpadding="0">
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str25']?></td>   
					<td>
						<input type="radio" class="radio" name="showRe" value="1" <?if($showRe==1) echo "checked"?>><?=$lang['tpl.mymo.str55']?>
						<input type="radio" class="radio" name="showRe" value="0" <?if($showRe==0) echo "checked"?>><?=$lang['tpl.mymo.str56']?>
						<?=$lang['tpl.mymo.str25_desc']?>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str26']?></td>   
					<td>
					<input type="radio" class="radio" name="usercookies" value="1" <?if($user_Cookies==1) echo "checked"?>><?=$lang['tpl.mymo.str27']?>
					<input type="radio" class="radio" name="usercookies" value="2" <?if($user_Cookies==2) echo "checked"?>><?=$lang['tpl.mymo.str28']?>
					<input type="radio" class="radio" name="usercookies" value="3" <?if($user_Cookies==3) echo "checked"?>><?=$lang['tpl.mymo.str29']?>
					<input type="radio" class="radio" name="usercookies" value="0" <?if($user_Cookies==0) echo "checked"?>><?=$lang['tpl.mymo.str30']?>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str31']?></td>   
					<td>
						<input type="radio" class="radio" name="setuserinfo" value="1" <?if($user_Setuserinfo==1) echo "checked"?>><?=$lang['tpl.mymo.str32']?>
						<input type="radio" class="radio" name="setuserinfo" value="0" <?if($user_Setuserinfo==0) echo "checked"?>><?=$lang['tpl.mymo.str33']?>
						<?=$lang['tpl.mymo.str31_desc']?>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str34']?></td>   
					<td>
						<input type="radio" class="radio" name="setusertrue" value="1" <?if($user_Setusertrue==1) echo "checked"?>><?=$lang['tpl.mymo.str32']?>
						<input type="radio" class="radio" name="setusertrue" value="0" <?if($user_Setusertrue==0) echo "checked"?>><?=$lang['tpl.mymo.str33']?>
						<?=$lang['tpl.mymo.str34_desc']?>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str36']?></td>   
					<td>
						<input type=text name=realname size=18 value="<?=$user_Realname?>">
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str39']?></td>   
					<td>
						<input type=text name=country size=18 value="<?=$user_Country?>">
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str40']?></td>   
					<td>
						<input type=text name=userphone size=18 value="<?=$user_Phone?>">
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str41']?></td>   
					<td>
						<input type=text name=address size=18 value="<?=$user_Address?>">
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str42']?></td>   
					<td>
						<input type=text name=province size=18 value="<?=$user_Province?>">
						<select name="selectp" onChange="selectcityarea('selectp','selectc','theForm');theForm.province.value=this.value;">
						<option value="0" selected><?=$lang['tpl.mymo.str43']?></option>');
						</select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str44']?></td>   
					<td>
						<input type=text name="city" size=18 value="<?=$user_City?>">
						<select name="selectc" onChange="theForm.city.value=this.value;">
						<option value="0" selected><?=$lang['tpl.mymo.str43']?></option>
						</select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str45']?></td>   
					<td>
						<select size=1 name=shengxiao><?=$user_shengxiao?></select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str46']?></td>   
					<td>
						<select size=1 name=blood><?=$user_blood?></select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str47']?></td>   
					<td>
						<select size=1 name=belief><?=$user_belief?></select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str48']?></td>   
					<td>
						<select name=occupation><?=$user_occupation?></select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str49']?></td>   
					<td>
						<select size=1 name=marital><?=$user_marital?></select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str50']?></td>   
					<td>
						<select size=1 name=education><?=$user_education?></select>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str51']?></td>   
					<td>
						<input type=text name=college size=18 value="<?=$user_College?>">
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str37']?></td>   
					<td>
						<?=$user_character?>
					</td>
				  </tr>
				  <tr align="left">
					<td class=tdcolor><?=$lang['tpl.mymo.str38']?></td>   
					<td>
						<textarea name=personal rows=6 cols=90% ><?=$user_Personal?></textarea>
					</td>
				  </tr>
				</table><br />
				</div>
				<table width="96%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td align="center" colspan='2'>
						<button type="Submit" name="Submit" onMousemove="button_move(this)" onMouseout="button_out(this)"><?=$lang['tpl.mymo.str52']?></button> &nbsp; 
						<button type="reset" name="Submit2" onMousemove="button_move(this)" onMouseout="button_out(this)"><?=$lang['tpl.mymo.str53']?></button>
					</td>
				  </tr>
				</table><br />
			</div>
		</span>
		</div>
	</div>

</form>
</td><tr>
</table>
<script language="JavaScript">chkradio(document.theForm.sex,'<?=$checked_sex?>');</script>
<!---########################## end 右边样式部分##########################--->
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
first("selectp","selectc","theForm",0,0);
var obj = document.getElementById("user_right_td");
var o=obj.document.getElementsByTagName("input");
var oo=obj.document.getElementsByTagName("textarea");
for (i=0;i<o.length;i++){
	if (o[i].type=="text") { 
	o[i].onfocus=function(){FocusShowInfo(this.name)}
	o[i].onblur=function(){BlurShowInfo(this.name)}
	}
}
for (i=0;i<oo.length;i++){
	oo[i].onfocus=function(){FocusShowInfo(this.name)}
	oo[i].onblur=function(){BlurShowInfo(this.name)}
}
function FocusShowInfo(o){
	getObj(o).className = "modifyOver";
	if (getObj(o+"_info"))
	getObj(o+"_info").className = "modifytext";
}
function BlurShowInfo(o){
	getObj(o).className = "";
	if (getObj(o+"_info"))
	getObj(o+"_info").className = "";
}
//-->
</SCRIPT>
<div id="magicframe" style="visibility:hidden; display:; position: absolute;">
<iframe class=magicframe src="plus_tools_magiclist.php?s=1" width="440" height="303" frameborder="0" scrolling="no"></iframe>
</div>