		<div class="userMain">
			<div class="uMain_title"><span class="iconProfile">个人设置</span></div>
			<div class="uMain_content">
				<div class="stageBox">
					<div class="stageBoxTop"><span></span></div>
					<div class="stageBoxCenter">
						<div class="stageBoxCenterContent">
							<div class="main_nav">
								<ul>
									<li class="navb_4 <?php if($op=="zl") echo 'nava_4'?>"><a href="?ac=edit&op=zl">基本资料</a></li>
									<li class="navb_4 <?php if($op=="logo") echo 'nava_4'?>"><a href="?ac=edit&op=logo">修改头像</a></li>
									<li class="navb_4 <?php if($op=="pwd") echo 'nava_4'?>"><a href="?ac=edit&op=pwd">修改密码</a></li>
								</ul>
															</div>
							<div class="minHeight500">
<?php
if($op=="zl"){
?>
								<div class="profile">
									<div class="title">
										<div class="name">修改基本资料</div>
									</div>
									<ul><form  name="form1" action="do.php?ac=zl" method="post">
										<li>
											<div class="name">用户名：</div>
											<div class="input"><span class="nickname"><?php echo $chsh_username?></span></div>
										</li>
										<li>
											<div class="name">呢称：</div>
											<div class="input"><input type="text" style="width:190px;" class="input_normal" name="nicheng" id="nicheng" value="<?php echo $chsh_nicheng?>" /></div>
										</li>
										<li>
											<div class="name">性别：</div>
											<div class="input">
												<select style="width:70px;" class="select_normal" name="sex" id="sex">
												<option value="1" <?php if($chsh_sex==1) echo 'selected="selected"'?>>帅 哥</option>
												<option value="2" <?php if($chsh_sex==2) echo 'selected="selected"'?>>美 女</option>
												</select>
											</div>
										</li>
										<li>
											<div class="name"><span>*</span>密保问题：</div>
											<div class="input"><input type="text" style="width:190px;" class="input_normal" name="question" id="question" value="<?php echo $chsh_question?>" /></div>
											<div class="input_msg" id="maddress">请输入您的密保问题。</div>
										</li>
										<li>
											<div class="name"><span>*</span>密保答案：</div>
											<div class="input"><input type="text" style="width:190px;" class="input_normal" name="answer" id="answer" value="<?php echo $chsh_answer?>" /></div>
											<div class="input_msg" id="maddress">请输入您的密保答案。</div>
										</li>
										<li>
											<div class="name"><span>*</span>城市：</div>
											<div class="input"><input type="text" style="width:190px;" class="input_normal" name="city" id="city" value="<?php echo $chsh_city?>" /></div>
											<div class="input_msg" id="maddress">请输入您的所在城市。</div>
										</li>
										<li>
											<div class="name"><span>*</span>ＱＱ：</div>
											<div class="input"><input type="text" style="width:190px;" class="input_normal" name="qq" id="qq" maxlength="12" value="<?php echo $chsh_qq?>" /></div>
											<div class="input_msg" id="mqq">输入您的QQ号，只供站务人员联系使用，不会公开。</div>
										</li>
										<li>
											<div class="name"><span>*</span>邮箱：</div>
											<div class="input"><input type="text" style="width:190px;" class="input_normal" name="email" id="email" value="<?php echo $chsh_email?>" /></div>
											<div class="input_msg" id="memail">安全邮箱能够帮您取回您忘记的密码。</div>
										</li>
										<li>
											<div class="name"><span>*</span>签名：</div>
											<div class="input"><textarea name="s_qianm" id="s_qianm" style="width:300px;height:70px"><?php echo $chsh_qm?></textarea></div>
											<div class="input_msg" id="qianming">您的个性签名。</div>
										</li><li></li>
										<li>
											<div class="name"></div>
											<div class="input"><span class="button-main"><span><button type="submit" id="submit" >保存修改</button></span></span></div>
										</li></form>
									</ul>
								</div>
<?php
}elseif($op=="logo"){
?>
								<div class="profile">
									<div class="title">
										<div class="name">修改头像</div>
									</div>
									<div class="avatar">
										<div class="avatarTitle">当前头像<span>设置头像</span></div>
										<div class="myAvatar"><img src="<?php echo piclink("logo",$chsh_logo,"big")?>" width="160" height="160" id="my-avatar" onerror="this.onerror=null;this.src='<?php echo S_SiteDomain?>/user/images/avatar/noface_small.gif'"/></div>
										<div class="myAvatarUpload">
		<div style="padding:10px 0;color:#666;">
		还没有合适的照片？<a style="color:#cc3300;" href="javascript:void(0);" onclick="useCamera()">请使用摄像头拍摄头像！</a>
		</div>
<div <?php if((!$userlogin==true)){echo 'style="display:none;"';}?> class="input"><form enctype="multipart/form-data" method="post" name="upform" target="upload_target" action="flash/upload.php">
		<input type="file" name="Filedata" id="Filedata"/><span class="button-main"><span><button type="submit" onclick="return checkFile();" />上传形象照</button></span></span><span style="visibility:hidden;" id="loading_gif"><img src="flash/loading.gif" align="absmiddle" />上传中，请稍侯......</span>
		</form>
		<iframe src="about:blank" name="upload_target" style="display:none;"></iframe>
        </div>
		<div id="avatar_editor"></div>
		<script type="text/javascript">
		var extensions = 'jpg,jpeg,gif,png';
		var saveUrl = 'flash/save_avatar.php';
		var cameraPostUrl = 'flash/camera.php';
		var editorFlaPath = 'flash/AvatarEditor.swf';
		function useCamera()
		{
			var content = '<embed height="464" width="514" ';
			content +='flashvars="type=camera';
			content +='&postUrl='+cameraPostUrl+'?&radom=1';
			content += '&saveUrl='+saveUrl+'?radom=1" ';
			content +='pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ';
			content +='allowscriptaccess="always" quality="high" ';
			content +='src="'+editorFlaPath+'"/>';
			document.getElementById('avatar_editor').innerHTML = content;
		}
		function buildAvatarEditor(pic_id,pic_path,post_type)
		{
			var content = '<embed height="464" width="514"'; 
			content+='flashvars="type='+post_type;
			content+='&photoUrl='+pic_path;
			content+='&photoId='+pic_id;
			content+='&postUrl='+cameraPostUrl+'?&radom=1';
			content+='&saveUrl='+saveUrl+'?radom=1"';
			content+=' pluginspage="http://www.macromedia.com/go/getflashplayer"';
			content+=' type="application/x-shockwave-flash"';
			content+=' allowscriptaccess="always" quality="high" src="'+editorFlaPath+'"/>';
			document.getElementById('avatar_editor').innerHTML = content;
		}
			/**
			  * 提供给FLASH的接口 ： 没有摄像头时的回调方法
			  */
			 function noCamera(){
				 alert("对不起，您还没有安装摄像头！ ：）");
			 }
					
			/**
			 * 提供给FLASH的接口：编辑头像保存成功后的回调方法
			 */
			function avatarSaved(){
				alert('保存成功，缓存刷新后显示新头像！');
				//window.location.href = '/profile.do';
			}
			
			 /**
			  * 提供给FLASH的接口：编辑头像保存失败的回调方法, msg 是失败信息，可以不返回给用户, 仅作调试使用.
			  */
			 function avatarError(msg){
				 alert("上传失败，请重新上传编辑！");
			 }

			 function checkFile()
			 {
				 var path = document.getElementById('Filedata').value;
				 var ext = getExt(path);
				 var re = new RegExp("(^|\\s|,)" + ext + "($|\\s|,)", "ig");
				  if(extensions != '' && (re.exec(extensions) == null || ext == '')) {
				 alert('对不起，只能上传jpg, gif, png类型的图片');
				 return false;
				 }
				 showLoading();
				 return true;
			 }

			 function getExt(path) {
				return path.lastIndexOf('.') == -1 ? '' : path.substr(path.lastIndexOf('.') + 1, path.length).toLowerCase();
			}
              function	showLoading()
			  {
				  document.getElementById('loading_gif').style.visibility = 'visible';
			  }
			  function hideLoading()
			  {
				document.getElementById('loading_gif').style.visibility = 'hidden';
			  }
		</script>

										</div>
									</div>
								</div>
<?php
}elseif($op=="pwd"){
?>
								<div class="profile">
									<div class="title">
										<div class="name">修改密码</div>
									</div>
									<ul><form  name="form3" action="do.php?ac=passxg" method="post"> 
										<li>
											<div class="name">当前密码：</div>
											<div class="input"><input type="password" style="width:190px;" class="input_normal" name="password" id="password" maxlength="20"/></div>
											<div class="input_msg" id="moldpassword">请输入您当前使用的密码。</div>
										</li>
										<li>
											<div class="name">设置新密码：</div>
											<div class="input"><input type="password" style="width:190px;" class="input_normal" name="new_pwd" id="new_pwd" maxlength="20"/></div>
											<div class="input_msg" id="mpassword">6到20个字符，请使用英文字母（区分大小写）、符号或数字。</div>
										</li>
										<li>
											<div class="name">确认新密码：</div>
											<div class="input"><input type="password" style="width:190px;" class="input_normal" name="new_pwd1" id="new_pwd1" maxlength="20"/></div>
											<div class="input_msg" id="mpassword2">再次输入您所设置的密码，以确认密码无误。</div>
										</li>
										<li>
											<div class="name"></div>
											<div class="input"><span class="button-main"><span><button type="submit" id="submit" >保存修改</button></span></span></div>
										</li></form>
									</ul>
								</div>
<?php
}
?>
							</div>
						</div>
					</div>
					<div class="stageBoxBottom"><span></span></div>
				</div>
			</div>

