<!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>{-:@ADVANCED-}</strong></dt>
	<dd>
		<div class="tabCntnt">
			<table class="formTable">
				<tr>
					<td class="inputTitle">{-:@TITLE-}</td>
					<td class=""></td>
				</tr>
				<tr>
					<td colspan="2" class="inputArea">
						<input class="required i" type="text" value="{-:$_AI['a_title']-}" name="a_title" maxlength="255" size="50"><span class="fc_r">*</span>
						<label>{-:@SHORT_TITLE-}: <input class="i" type="text" value="{-:$_AI['a_short_title']-}" name="a_short_title" maxlength="30" size="20"></label>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@CHANNEL-}</td>
					<td class="inputTitle">{-:@FLAG-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						<select name="archive_channel_id">
							{-:$_ACLStr-}
						</select>
					</td>
					<td class="inputArea">
						{-foreach:$_AFL,$af-}<label><input type="checkbox" value="{-:$af['af_alias']-}" name="af_alias[]" {-if:
		in_array($af['af_alias'], $_AI['af_alias'])-} checked="checked"{-:/if-}> {-:$af['af_name']-}</label>{-:/foreach-}
						<label>{-:@RANK-}: <input class="i" type="text" value="{-:$_AI['a_rank']-}" name="a_rank" maxlength="6" size="6"></label>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@THUMB-}</td>
					<td class=""></td>
				</tr>
				<tr>
					<td colspan="2" class="inputArea">
						<input id="a_thumb" class="i" type="text" value="{-:$_AI['a_thumb']-}" name="a_thumb" maxlength="255" size="50">
						<input id="a_thumb_uploader" to="#a_thumb" preview="#a_thumb_preview" btntext="{-:@UPLOAD-}" typeset='image' thumb='yes' class="uploader" type="file"  />
					{-if:!empty($_AI['a_thumb'])-}
						<img id="a_thumb_preview" src="{-:$_AI['a_thumb']-}" />
					{-else:-}
						<img id="a_thumb_preview" src="{-:*APP_ROOT-}/u/site/no_thumb.png" />
					{-:/if-}
					</td>
				</tr>
				{-:$_FI-}
			</table>
		</div>
		<div class="tabCntnt">
			<table class="formTable">
				<tr>
					<td class="inputTitle">{-:@MEMBER-}{-:@ID-}</td>
					<td class="inputTitle">{-:@USERNAME-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						{-:$_AI['member_id']-}
					</td>
					<td class="inputArea">
						{-:$_AI['m_username']-}
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@STATUS-}</td>
					<td class="inputTitle">{-:@REVIEW-}{-:@SWITCH-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						<label><input type="radio" value="0" name="a_status"{-if:0 == $_AI['a_status']-} checked="checked"{-:/if-}> {-:@NOT_PASSED-}</label>
						<label><input type="radio" value="1" name="a_status"{-if:1 == $_AI['a_status']-} checked="checked"{-:/if-}> {-:@PASSED-}</label>
						<label><input type="radio" value="2" name="a_status"{-if:2 == $_AI['a_status']-} checked="checked"{-:/if-}> {-:@REFUNDED-}</label>
						<label><input type="checkbox" name="send_notify" checked="checked" value="y"> {-:@SEND_NOTIFY-}</label>
					</td>
					<td class="inputArea">
						<label><input type="radio" value="0" name="a_review_switch"{-if:0 == $_AI['a_review_switch']-}" checked="checked"{-:/if-}> {-:@OFF-}</label>
						<label><input type="radio" value="1" name="a_review_switch"{-if:1 == $_AI['a_review_switch']-}" checked="checked"{-:/if-}> {-:@ON-}</label>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@COST_POINTS-}</td>
					<td class="inputTitle">{-:@COUNT-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						<input class="required i" type="text" value="{-:$_AI['a_cost_points']-}" name="a_cost_points" maxlength="10" size="6">{-:@POINTS-}
					</td>
					<td class="inputArea">
						<label>{-:@VIEW-}: <input class="required i" type="text" value="{-:$_AI['a_view_count']-}" name="a_view_count" maxlength="20" size="10"></label>
						<label>{-:@REVIEW-}: <input class="required i" type="text" value="{-:$_AI['a_review_count']-}" name="a_review_count" maxlength="20" size="10"></label>
						<label>{-:@SUPPORT-}: <input class="required i" type="text" value="{-:$_AI['a_support_count']-}" name="a_support_count" maxlength="20" size="10"></label>
						<label>{-:@OPPOSE-}: <input class="required i" type="text" value="{-:$_AI['a_oppose_count']-}" name="a_oppose_count" maxlength="20" size="10"></label>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">HTML{-:@SWITCH-}</td>
					<td class="inputTitle">{-:@EDIT_TIME-}</td>
				</tr>
				<tr>
					<td class="inputArea">
						<label><input type="radio" value="0" name="a_is_html"{-if:0 == $_AI['a_is_html']-}" checked="checked"{-:/if-}> {-:@NOT_HTML-}</label>
						<label><input type="radio" value="1" name="a_is_html"{-if:1 == $_AI['a_is_html']-}" checked="checked"{-:/if-}> {-:@IS_HTML-}</label>
					</td>
					<td class="inputArea">
						<input class="i" type="text" value="{-php:echo date('Y-m-d H:i:s', time());-}" id="a_edit_time" name="a_edit_time" maxlength="255" size="30">
						<script type="text/javascript">
							Calendar.setup({
								inputField : 'a_edit_time',
								trigger : 'a_edit_time',
								onSelect : function() {this.hide()},
								weekNumbers : true,
								showTime : 24,
								dateFormat : '%Y-%m-%d %H:%M:%S'
							});
						</script>
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@TEMPLATE-}</td>
					<td class=""></td>
				</tr>
				<tr>
					<td class="inputArea">
						<input class="i" type="text" value="{-:$_AI['a_tpl']-}" name="a_tpl" maxlength="255" size="50">
					</td>
					<td class="inputTip">
						{-:@A_TPL_TIP-}
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@A_HTML_PATH-}</td>
					<td></td>
				</tr>
				<tr>
					<td class="inputArea">
						<label><input type="radio" value="0" name="a_html_path"{-if:0 == $_AI['a_html_path']-}" checked="checked"{-:/if-}> {-:@EXTEND_CHANNEL_SETTING-}</label>
						<label><input type="radio" value="1" name="a_html_path"{-if:1 == $_AI['a_html_path']-}" checked="checked"{-:/if-}> {-:@CUSTOM-}</label>
					</td>
					<td class="inputTip">
						<span class="fc_r">*</span> {-:@A_HTML_PATH_TIP-}
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@A_HTML_NAMING-}</td>
					<td class=""></td>
				</tr>
				<tr>
					<td class="inputArea">
						<input class="i" type="text" value="{-:$_AI['a_html_naming']-}" name="a_html_naming" maxlength="255" size="50">
					</td>
					<td class="inputTip">
						{-:@A_HTML_NAMING_TIP-}
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@KEYWORDS-}</td>
					<td class=""></td>
				</tr>
				<tr>
					<td class="inputArea">
						<input class="i" type="text" value="{-:$_AI['a_keywords']-}" name="a_keywords" maxlength="255" size="50">
					</td>
					<td class="inputTip">
						{-:@A_KEYWORDS_TIP-}
					</td>
				</tr>
				<tr>
					<td class="inputTitle">{-:@DESCRIPTION-}</td>
					<td class=""></td>
				</tr>
				<tr>
					<td class="inputArea">
						<textarea class="i" name="a_description" style="width:360px;height:60px;">{-:$_AI['a_description']-}</textarea>
					</td>
					<td class="inputTip">
						{-:@A_DESCRIPTION_TIP-}
					</td>
				</tr>
			</table>
		</div>
	</dd>
</dl><!--/.atab-->
<div id="operation">
	<input type="hidden" value="{-:$_AI['archive_id']-}" name="archive_id">
	<input type="hidden" value="{-:$_AI['am_alias']-}" name="am_alias">
	<span class="btn_b submit" action="{-url:archive/edit_archive_do-}" to="#formEdit">{-:@SUBMIT-}</span>
	<label><input type="checkbox" name="update_now" value="1" checked="checked" /> {-:@UPDATE_NOW-}</label>
</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={$_AI['am_alias']}&thumb=yes-}';
			}
			else
			{
				uploader = '{-url:upload/upload_file?type_set=image&upload_type={$_AI['am_alias']}&watermark=yes-}';
			}
		}
		else if('all' == typeset){
			fileTypeDesc = '{-:@FILE-}';
			fileTypeExts = '{-:$_FS['all']-}';
			uploader = '{-url:upload/upload_file?type_set=all&upload_type={$_AI['am_alias']}&watermark=yes-}';
		}
		$(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={$_AI['am_alias']}&watermark=yes&return_type=editor-}',
		filebrowserUploadUrl : '{-url:upload/upload_file?type_set=all&upload_type={$_AI['am_alias']}&watermark=yes&return_type=editor-}'
	};
	$('.editor').ckeditor(editor_option);
	var editor_paging_option = {
		filebrowserImageUploadUrl : '{-url:upload/upload_file?type_set=image&upload_type={$_AI['am_alias']}&watermark=yes&return_type=editor-}',
		filebrowserUploadUrl : '{-url:upload/upload_file?type_set=all&upload_type={$_AI['am_alias']}&watermark=yes&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>