<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{-:@EDIT-}{-:$_AI['am_name']-} - {-:$_SITE['name']-}</title>
<meta name="keywords" content="{-:$_SITE['keywords']-}" />
<meta name="description" content="{-:$_SITE['description']-}" />
{-import: file="c,m" type="css" baseurl="(__THEME__)/home/css/" basepath="(THEME_PATH)/home/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>
{-include:header-}
<div class="m w_960">
	<div class="w_240 f_l">
{-include:nav_sidebar-}
	</div><!--/.w_240-->
	<div class="w_10 h_10 o_h f_l">&nbsp;</div>
	<div class="w_710 f_l">
		<dl class="atab_1 adiv">
			<dt><strong class="on">{-:@EDIT-}{-:$_AI['am_name']-}</strong></dt>
			<dd class="p_20">
				<form id="formEdit" action="" method="post" enctype="multipart/form-data"><table class="formTable">
					<tr>
						<td class="inputTitle">{-:@TITLE-}</td>
						<td class="inputTitle">{-:@COST_POINTS-}</td>
					</tr>
					<tr>
						<td class="inputArea">
							<input class="required i" type="text" value="{-:$_AI['a_title']-}" name="a_title" maxlength="255" size="50"><span class="fc_r">*</span>
						</td>
						<td class="inputArea">
							<input class="required i" type="text" value="{-:$_AI['a_cost_points']-}" name="a_cost_points" maxlength="8" size="4"> {-:@POINTS-}
						</td>
					</tr>
					<tr>
						<td class="inputTitle">{-:@CHANNEL-}</td>
						<td></td>
					</tr>
					<tr>
						<td colspan="2" class="inputArea">
							<select name="archive_channel_id">
								{-:$_ACLStr-}
							</select>
						</td>
						</td>
					</tr>
					<tr>
						<td class="inputTitle">{-:@THUMB-}</td>
						<td class=""></td>
					</tr>
					<tr>
						<td colspan="2" class="inputArea">
							<input id="a_thumb_uploader" class="i" type="file" value="" name="a_thumb_uploader" maxlength="255" size="30" />
						{-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>
					<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>
					<tr>
						<td colspan="2" class="inputArea">
							<label>{-:@SOURCE-} <input id="a_a_source" class="i" type="text" value="{-:$_AI['a_a_source']-}" name="a_a_source" maxlength="96" size="20"></label>
							<label>{-:@AUTHOR-} <input id="a_a_author" class="i" type="text" value="{-:$_AI['a_a_author']-}" name="a_a_author" maxlength="96" size="20"></label>
						</td>
					</tr>
					{-:$_FI-}
					{-if:$_G['interaction']['captcha']-}
					<tr>
						<td class="inputTitle">{-:@CAPTCHA-}</td>
						<td></td>
					</tr>
					<tr>
						<td colspan="2" class="inputArea">
						<label>
							<input type="text" name="vcode" autocomplete="off" value="" class="required i v_code_input" size="5" maxlength="5" />
							<img src="{-url:home@common/captcha_img?name=vcode-}" onclick="this.src += '&' + Math.random();" style="cursor:pointer;" />
							<span class="fc_gry">{-:@CAPTCHA_TIP-}</span>
						</label>
						</td>
					</tr>{-:/if-}
					<tr>
						<td colspan="2" class="operation">
						<label>
							<input name="timeKey" type="hidden" value="{-php:echo time();-}" />
							<input name="archive_id" type="hidden" value="{-:$_AI['archive_id']-}" />
							<span class="btn_b submit" to="#formEdit" action="{-url:home@member/edit_archive_do-}">{-:@SUBMIT-}</span>
							<input class="btn_l" type="reset" value="{-:@RESET-}" />
						</label>
						</td>
					</tr>
				</table></form>
			</dd>
		</dl>
	</div><!--/.w_710-->
	<div class="c"></div>
</div>
{-include:footer-}
<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:home@upload/upload_file?type_set=image&upload_type={$_AI['am_alias']}&thumb=yes-}';
			}
			else
			{
				uploader = '{-url:home@upload/upload_file?type_set=image&upload_type={$_AI['am_alias']}&watermark=yes-}';
			}
		}
		else if('all' == typeset){
			fileTypeDesc = '{-:@FILE-}';
			fileTypeExts = '{-:$_FS['all']-}';
			uploader = '{-url:home@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 = {
		toolbar : 'uwa_simple'
	};
	$('.editor').ckeditor(editor_option);
	var editor_paging_option = {
		toolbar : 'uwa_simple',
		extraPlugins : 'uwapaging'
	};
	$('.editor_paging').ckeditor(editor_paging_option);
});

document.write('<script type="text/javascript" src="{-url:home@common/get_member_info-}&refresh='+Math.random()+'.js"></sc'+'ript>');
document.write('<script type="text/javascript" src="{-url:home@common/task?task={$TASK}-}&refresh='+Math.random()+'.js"></sc'+'ript>');
</script>
{-import:file="c,m" type="js" baseurl="(__THEME__)/home/js/" basepath="(THEME_PATH)/home/js/"-}
{-:$_SITE['stat_code']-}
</body>
</html>
