<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<tpl> include file ='../head.config.html' </tpl>
<link href="<tpl> $template_dir </tpl>/home/css/<tpl> $space_array.templates </tpl>_style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="<tpl> $Site_Url </tpl>/js/jquery/jquery.blockUI.js"></script>
<script language="javascript">
$(function () {
	$("#templates_img").attr( "src", "<tpl> $template_dir </tpl>/images/<tpl> $space_array.templates </tpl>.gif" );
});
function changeTemplates ( img ) {
	$("#templates_img").attr( "src", "<tpl> $template_dir </tpl>/images/"+img+".gif" );
}
</script>
</head><body>
<!--公共部分-->
<tpl> include file ='../top.html' </tpl>
<tpl> include file="../public.html" </tpl>
<div class="block style4">
	<table width="100%" cellpadding="3" cellspacing="3">
		<form name='templet_form' id="templet_form" action="member.php?action=templet_save" method="POST">
		<input type="hidden" name="uid" value="<tpl> $space_array.uid </tpl>" />
		<tr>
			<td colspan="3" style="border-bottom: 1px solid #ebe6c9"><strong><tpl> $langSpaceTempletManage </tpl></strong></td>
		</tr>
		<tr>
			<td  width="70" height="40" align="right" valign="bottom" nowrap><tpl> $langSpaceTempletStyle </tpl></td>
			<td height="40" valign="bottom">
				<select name="templates" id="templates" onchange="changeTemplates ( this.value )">
					<option value="default" selected><tpl> $langSpaceTempletDefault </tpl></option>
					<option value="blue" <tpl> if $space_array.templates eq 'blue' </tpl> selected <tpl> /if </tpl> ><tpl> $langSpaceTempletBlue </tpl></option>
				</select>
			</td>
			<td width="100%"></td>
		</tr>
		<tr>
			<td align="right" valign="top"><tpl> $langSpacePhoto </tpl></td>
			<td colspan="2"><img id="templates_img" src="<tpl> $template_dir </tpl>/images/default.gif" style="border:1px solid #ccc;"/></td>
		</tr>
		<tr>
		<td></td>
			<td colspan="2">
				<div class="rbs1"><input type="submit" value="<tpl> $langSpaceSubmit </tpl>" class="rb1-12"/></div>			
				<div class="rbs1"><input type="button" value="<tpl> $langSpaceTempletPreview </tpl>" class="rb1-12" onclick="preview(document.getElementById('templates').value)"/></div>
			</td>
		</tr>		
		</form>		
 	 </table>
</div>

</div>
</div>
</div><tpl> include file ='../../../../html/footer.html' </tpl>
<div id="preview" style="display:none;">
	<table width="100%">
		<tr>
			<td><img id="preview_img" src="<tpl> $template_dir </tpl>/images/default_preview.jpg"></td>
		</tr>
		<tr>
			<td><input type="button" value="<tpl> $langSpaceCancel </tpl>" class="rb1-12" onclick="closeDialog()"/></td>
		</tr>
	</table>
</div>
<script>
var show = $('#preview');
function preview(img) {
	$.blockUI(show, { width: '605px', height: '563px',margin:'-50px 0 0 -125px', top:'10%', left:'40%',background:'#FFF',border:'1px solid #FFF'}); 	
	$("#preview_img").attr( "src", "<tpl> $template_dir </tpl>/images/"+img+"_preview.jpg" );
}
function closeDialog() {
	$.unblockUI();
}
</script>
</body>
</html>