<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="{-:*__THEME__-}/admin/css/c.css" />
<link rel="stylesheet" type="text/css" href="{-:*__THEME__-}/admin/css/mf.css" />
<link rel="stylesheet" type="text/css" href="{-:*__PUBLIC__-}/js/calendar/calendar.css" />
<script type="text/javascript" src="{-:*__PUBLIC__-}/js/calendar/calendar.js"></script>
<script type="text/javascript" src="{-:*__PUBLIC__-}/js/calendar/lang/{-:+lang-}.js"></script>
</head>

<body>
<form id="formEdit" action="" method="post">
<dl class="atab">
	<dt><strong>{-:@GENERAL-}</strong><strong>{-:@CREDIT-}</strong></dt>
	<dd>
		<div class="tabCntnt">
			<table class="formTable">
				<tr>
					<td class="inputTitle">{-:@MODEL-}</td>
					<td class="inputTitle">{-:@LEVEL-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						{-:$_MI['mm_name']-}
						<span class="fc_gry">{-:@MEMBER_MODEL_TIP-}</span>
					</td>
					<td class="inputArea">
						<select name="member_level_id">
						{-foreach:$_MLL,$l-}
							<option value="{-:$l['member_level_id']-}"{-if:$l['member_level_id'] == $_MI['member_level_id']-} selected="selected"{-:/if-}>{-:$l['ml_name']-}</option>
						{-:/foreach-}
						</select>
						<span class="fc_gry">{-:@MEMBER_LEVEL_TIP-}</span>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@USERID-}</td>
					<td class="inputTitle">{-:@PASSWORD-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						{-:$_MI['m_userid']-}
						<span class="fc_r">*</span> <span class="fc_gry">{-:@M_USERID_TIP-}</span>
					</td>
					<td class="inputArea">
						<input class="i" type="password" value="" name="m_password" maxlength="96" size="30">
						<span class="fc_gry">{-:@M_PASSWORD_TIP-}</span>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@USERNAME-}</td>
					<td class="inputTitle">{-:@EMAIL-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						<input class="required i" type="text" value="{-:$_MI['m_username']-}" name="m_username" maxlength="96" size="30">
						<span class="fc_r">*</span> <span class="fc_gry">{-:@M_USENAME_TIP-}</span>
					</td>
					<td class="inputArea">
						<input class="required i" type="text" value="{-:$_MI['m_email']-}" name="m_email" maxlength="96" size="30">
						<span class="fc_r">*</span> <span class="fc_gry">{-:@M_EMAIL_TIP-}</span>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@STATUS-}</td>
					<td class="inputTitle">{-:@EXPERIENCE-}/{-:@POINTS-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						<label><input type="radio" value="0" name="m_status"{-if:0 == $_MI['m_status']-} checked="checked"{-:/if-}> {-:@NOT_PASSED-}</label>
						<label><input type="radio" value="1" name="m_status"{-if:1 == $_MI['m_status']-} checked="checked"{-:/if-}> {-:@PASSED-}</label>
						<label><input type="radio" value="2" name="m_status"{-if:2 == $_MI['m_status']-} checked="checked"{-:/if-}> {-:@FORBIDDEN-}</label>
						<span class="fc_gry">{-:@M_STATUS_TIP-}</span>
					</td>
					<td class="inputArea">
						<input class="required i" type="text" value="{-:$_MI['m_experience']-}" name="m_experience" maxlength="20" size="10">
						<span class="fc_r">*</span> <span class="fc_gry">{-:@M_EXPERIENCE_TIP-}</span>
						<input class="required i" type="text" value="{-:$_MI['m_points']-}" name="m_points" maxlength="20" size="10">
						<span class="fc_r">*</span> <span class="fc_gry">{-:@M_POINTS_TIP-}</span>
					</td>
				</tr>
				{-:$_FI-}
				<tr>
					<td colspan="2" class="inputArea">
						<strong>{-:@REG_TIME-}</strong> {-:$_MI['m_reg_time']|date~'Y-m-d H:i:s',@me-}
						<strong>{-:@REG_IP-}</strong> {-:$_MI['m_reg_ip']-}
					</td>
				</tr>
				<tr>
					<td colspan="2" class="inputArea">
						<strong>{-:@LOGIN_TIME-}</strong> {-:$_MI['m_login_time']|date~'Y-m-d H:i:s',@me-}
						<strong>{-:@LOGIN_IP-}</strong> {-:$_MI['m_login_ip']-}
					</td>
				</tr>
			</table>
		</div>
		<div class="tabCntnt">
			<table class="formTable">
			{-foreach:$_MCTL,$ct-}
				<tr>
					<td class="inputTitle">{-:$ct['mct_name']-}</td>
					<td></td>
				</tr>
				<tr>
					<td colspan="2" class="inputArea">
						<input class="required i" type="text" value="{-:$_MI[$ct['mct_alias']]-}" name="{-:$ct['mct_alias']-}" maxlength="20" size="10">
						{-:$ct['mct_unit']-}
					</td>
				</tr>
			{-:/foreach-}
			</table>
		</div>
	</dd>
</dl><!--/.atab-->
<div id="operation">
	<input type="hidden" value="{-:$_MI['member_id']-}" name="member_id">
	<input type="hidden" value="{-:$_MI['m_userid']-}" name="m_userid">
	<input type="hidden" value="{-:$_MI['member_model_id']-}" name="member_model_id">
	<span class="btn_b submit" action="{-url:member/edit_member_do-}" to="#formEdit">{-:@SUBMIT-}</span>
</div>
</form>
<script type="text/javascript" src="{-:*__PUBLIC__-}/js/jquery.js"></script>
<script type="text/javascript" src="{-:*__PUBLIC__-}/js/uploadify/uploadify.js"></script>
<script type="text/javascript">
{-php:
	$o_upload = M('Option')->get_option('upload');
	$_FS['img'] = '*.'.implode(';*.', explode(',', $o_upload['imgtype']));
	$_FS['file'] = '*.'.implode(';*.', explode(',', $o_upload['filetype']));
	$_FS['all'] = $_FS['img'].';'.$_FS['file'];
-}
$(document).ready(function(){
	$('.uploader').each(function(){
		var btntext = $(this).attr('btntext'),
			to_id = $(this).attr('to'),
			typeset = $(this).attr('typeset'),
			thumb = $(this).attr('thumb'),
			preview_id = $(this).attr('preview'),
			fileTypeDesc, fileTypeExts, uploader;
		if('image' == typeset){
			fileTypeDesc = '{-:@IMAGE-}';
			fileTypeExts = '{-:$_FS['img']-}';
			if('yes' == thumb)
			{
				uploader = '{-url:upload/upload_file?type_set=image&upload_type=member&thumb=yes-}';
			}
			else
			{
				uploader = '{-url:upload/upload_file?type_set=image&upload_type=member-}';
			}
		}
		else if('all' == typeset){
			fileTypeDesc = '{-:@FILE-}';
			fileTypeExts = '{-:$_FS['all']-}';
			uploader = '{-url:upload/upload_file?type_set=all&upload_type=member-}';
		}
		$(this).uploadify({
			'buttonClass' : 'btn_upload',
			'buttonImage' : '',
			'buttonText' : btntext,
			'fileObjName' : 'upload',
			'fileTypeDesc' : fileTypeDesc,
			'fileTypeExts' : fileTypeExts,
			'formData' : {
				'{-php:echo session_name();-}' : '{-php:echo session_id();-}'
			},
			'swf' : '{-:*__PUBLIC__-}/js/uploadify/uploadify.swf',
			'uploader' : uploader,
			'height' : 27,
			'width' : 80,
			'multi' : false,
			'queueID' : 'uwa_id',
			'onInit': function(){
				$("#uwa_id").hide();
			},
			'onUploadSuccess' : function(file, data, response){
				$(to_id).val(data);
				if(preview_id)
				{
					$(preview_id).attr('src', data);
				}
			},
			'onUploadError' : function(file, errorCode, errorMsg, errorString){
				alert(errorString);
			}
		});
	});
});
</script>
<script type="text/javascript" src="{-:*__PUBLIC__-}/js/editor/ckeditor.js"></script>
<script type="text/javascript" src="{-:*__PUBLIC__-}/js/editor/adapters/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var editor_option = {
		filebrowserImageUploadUrl : '{-url:upload/upload_file?type_set=image&upload_type=member&return_type=editor-}',
		filebrowserUploadUrl : '{-url:upload/upload_file?type_set=all&upload_type=member&return_type=editor-}'
	};
	$('.editor').ckeditor(editor_option);
	var editor_paging_option = {
		filebrowserImageUploadUrl : '{-url:upload/upload_file?type_set=image&upload_type=member&return_type=editor-}',
		filebrowserUploadUrl : '{-url:upload/upload_file?type_set=all&upload_type=member&return_type=editor-}',
		extraPlugins : 'uwapaging'
	};
	$('.editor_paging').ckeditor(editor_paging_option);
});
</script>
<script type="text/javascript" src="{-:*__THEME__-}/admin/js/c.js"></script>
</body>
</html>