<link rel="stylesheet" href="<tpl> $site_url </tpl>/js/jquery/thickbox.css" type="text/css" media="screen" />
<script language="JavaScript" type="text/javascript" src="<tpl> $site_url </tpl>/js/jquery/thickbox.js"></script>
<form action="baseinfo.manage.php?action=save" method="post" enctype="multipart/form-data"  name="form_baseinfo" id="form_baseinfo">
<table border="0" cellpadding="0" cellspacing="0" class="from_table radio-1">
	<tr>
		<th><tpl> $langBIndexHtml </tpl>:</th>
		<td class="td rowform">
			<label><input type="radio" name="index_html" value="1" <tpl> if $baseinfo_websit_array.index_html eq '1' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmOpen </tpl>
			<label><input type="radio" name="index_html" value="0" <tpl> if $baseinfo_websit_array.index_html eq '0' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmClose </tpl>
		</td>
		<td class="vtop tips2"><tpl> $langBIndexHtmlRemark </tpl></td>
	</tr>
	<tr>
		<th><tpl> $langBChannelHtml </tpl>:</th>
		<td class="td rowform">
			<label><input type="radio" name="channel_html" value="1" <tpl> if $baseinfo_websit_array.channel_html eq '1' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmOpen </tpl>
			<label><input type="radio" name="channel_html" value="0" <tpl> if $baseinfo_websit_array.channel_html eq '0' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmClose </tpl>
		</td>
		<td class="vtop tips2"><tpl> $langBChannelHtmlRemark </tpl></td>
	</tr>
	<tr>
		<th><tpl> $langBProductHtml </tpl>:</th>
		<td class="td rowform">
			<label><input type="radio" name="product_html" value="1" <tpl> if $baseinfo_productinfo_array.ifhtml eq '1' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmOpen </tpl>
			<label><input type="radio" name="product_html" value="0" <tpl> if $baseinfo_productinfo_array.ifhtml eq '0' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmClose </tpl>
		</td>
		<td class="vtop tips2"><tpl> $langBProductHtmlRemark </tpl></td>
	</tr>
	<tr>
		<th><tpl> $langBTemplateSelect </tpl>:</th>
		<td class="td rowform">
			<select name="selTemplateName" id="selTemplateName">
				<tpl> if $templates_sign.orange neq '' </tpl><option value="orange"<tpl> if $baseinfo_websit_array.templatesname eq 'orange' </tpl> selected<tpl> /if </tpl> ><tpl> $langBTemplateSelectOrange </tpl></option><tpl> /if </tpl>
				<tpl> if $templates_sign.default neq '' </tpl><option value="default"<tpl> if $baseinfo_websit_array.templatesname eq 'default' </tpl> selected<tpl> /if </tpl> ><tpl> $langBTemplateSelectBlue </tpl></option><tpl> /if </tpl>
				<tpl> if $templates_sign.green neq '' </tpl><option value="green"<tpl> if $baseinfo_websit_array.templatesname eq 'green' </tpl> selected<tpl> /if </tpl> ><tpl> $langBTemplateSelectGreen </tpl></option><tpl> /if </tpl>
			</select>
		</td>
		<td class="vtop tips2"><tpl> $langBTemplateRemark </tpl><a href=http://www.shopnc.net/download/index.php#bbc target="_blank"><tpl> $langBTemplateRemarkOne </tpl></a></td>
	</tr>
	<tr>
		<th><tpl> $langBTemplateView </tpl>:</th>
		<td class="td rowform">
			<div id="templates_sample"><a href="<tpl> $template_dir </tpl>/<tpl> $baseinfo_websit_array.templatesname </tpl>/images/<tpl> $baseinfo_websit_array.templatesname </tpl>_b.gif" target="_blank"><img border='0' src='<tpl> $template_dir </tpl>/<tpl> $baseinfo_websit_array.templatesname </tpl>/images/<tpl> $baseinfo_websit_array.templatesname </tpl>.gif'></a></div>
		</td>
		<td class="vtop tips2"><div id="templates_sample_remark"><a href="<tpl> $template_dir </tpl>/<tpl> $baseinfo_websit_array.templatesname </tpl>/images/<tpl> $baseinfo_websit_array.templatesname </tpl>_b.gif" target="_blank"><tpl> $langBTemplateClickOut </tpl></a></div></td>
	</tr>
	<tr><td colspan="3" bgcolor="#FFFFFF"></td>
	</tr>
	<tr>
		<th>GZIP:</th>
		<td class="td rowform"><label><input type="radio" name="gzip" value="1" <tpl> if $baseinfo_websit_array.gzip eq 1 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBWmOpen </tpl>
			<label><input type="radio" name="gzip" value="0" <tpl> if $baseinfo_websit_array.gzip eq 0 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBWmClose </tpl></td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBAccessoriesSaveDir </tpl>:</th>
		<td class="td rowform"><input name="txtattachmentspath" type="text" id="txtattachmentspath" class="txtinput" value="<tpl> $baseinfo_file_array.attachmentspath </tpl>" /></td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBMaxUpdataSize </tpl>:</th>
		<td class="td rowform"><input name="txtmaxsize" type="text" id="txtmaxsize" class="txtinput" value="<tpl> $baseinfo_file_array.allowuploadmaxsize </tpl>"  /> KB </td>
		<td class="vtop tips2"><label style="display:none" for="txtmaxsize" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
		<th><tpl> $langBAllowUpdataImageReamName </tpl>:</th>
		<td class="td rowform"><input name="txtimagetype" type="text" id="txtimagetype" class="txtinput" value="<tpl> $baseinfo_file_array.allowuploadimagetype </tpl>"  /> </td>
		<td class="vtop tips2"><tpl> $langBManyReamNameCompart </tpl><label style="display:none" for="txtimagetype" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
		<th><tpl> $langBAllowUpdataAccessoriesReamName </tpl>:</th>
		<td class="td rowform"><input name="txtfiletype" type="text" id="txtfiletype" class="txtinput" value="<tpl> $baseinfo_file_array.allowuploadfiletype </tpl>"  /> </td>
		<td class="vtop tips2"><tpl> $langBManyReamNameCompart </tpl><label style="display:none" for="txtfiletype" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
		<th><tpl> $langBAccessoriesSaveType </tpl>:</th>
		<td class="td rowform"><label><input type="radio" name="rdosavetype" value="1" <tpl> if $baseinfo_file_array.uploadsavetype eq 1 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBFileTypeSave </tpl><br /><label><input type="radio" name="rdosavetype" value="2" <tpl> if $baseinfo_file_array.uploadsavetype eq 2 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBYearSave </tpl><br /><label><input type="radio" name="rdosavetype" value="3" <tpl> if $baseinfo_file_array.uploadsavetype eq 3 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBMonthSave </tpl><br /><label><input type="radio" name="rdosavetype" value="4" <tpl> if $baseinfo_file_array.uploadsavetype eq 4 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBDaySave </tpl></td>
		<td class="vtop tips2"></td>
	</tr>
	<tr><td colspan="3" bgcolor="#FFFFFF"></td>
	</tr>
	<tr>
		<th><tpl> $langBOutPutProduct </tpl>:</th>
		<td class="td rowform">
			<input type="checkbox" name="output_condition[shop]" id="output_condition_shop" <tpl> if $baseinfo_output_condition_array.shop neq '' </tpl>checked="checked"<tpl> /if </tpl> value="1" /><label for="output_condition_shop"><tpl> $langBOutPutProductHaveShop </tpl></label><br />
			<input type="checkbox" name="output_condition[certify]" id="output_condition_certify" <tpl> if $baseinfo_output_condition_array.certify neq '' </tpl>checked="checked"<tpl> /if </tpl> value="1" /><label for="output_condition_certify"><tpl> $langBOutPutProductHaveCertify </tpl></label><br />
			<input type="checkbox" name="output_condition[entity]" id="output_condition_entity" <tpl> if $baseinfo_output_condition_array.entity neq '' </tpl>checked="checked"<tpl> /if </tpl> value="1" /><label for="output_condition_entity"><tpl> $langBOutPutProductHaveEntity </tpl></label>
		</td>
		<td class="vtop tips2">
			<tpl> $langBOutPutProductRemark </tpl>
		</td>
	</tr>
	<tr>
		<th><tpl> $langBProductImageWidth </tpl>:</th>
		<td class="td rowform"><input name="txtresize_width" type="text" id="txtresize_width" class="txtinput" value="<tpl> $baseinfo_productinfo_array.imageresize_width </tpl>"  /> </td>
		<td class="vtop tips2"><label style="display:none" for="txtresize_width" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
		<th><tpl> $langBProductImageHeight </tpl>:</th>
		<td class="td rowform"><input name="txtresize_height" type="text" id="txtresize_height" class="txtinput" value="<tpl> $baseinfo_productinfo_array.imageresize_width </tpl>"  /> </td>
		<td class="vtop tips2"><label style="display:none" for="txtresize_height" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
		<th><tpl> $langBProductImageFashion </tpl>:</th>
		<td class="td rowform"><label><input type="radio" name="rdoifcut" value="0" <tpl> if $baseinfo_productinfo_array.imageresize_ifcut eq 0 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBProportionReduce </tpl><label><input type="radio" name="rdoifcut" value="1" <tpl> if $baseinfo_productinfo_array.imageresize_ifcut eq 1 </tpl> checked <tpl> /if </tpl> /></label><tpl> $langBWidthHeightSizeCut </tpl> </td>
		<td class="vtop tips2"></td>
	</tr>
	<tr><td colspan="3" bgcolor="#FFFFFF"></td>
	</tr>
	<tr>
		<th><tpl> $langBCookieActionBound </tpl>:</th>
		<td class="td rowform"><input name="txtdomain" type="text" id="txtdomain" class="txtinput" value="<tpl> $baseinfo_cookie_array.cookiedomain </tpl>"  /> </td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBCookieSaveAddress </tpl>:</th>
		<td class="td rowform"><input name="txtcookiepath" type="text" id="txtcookiepath" class="txtinput" value="<tpl> $baseinfo_cookie_array.cookiepath </tpl>"  /> </td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBCookieExpire </tpl>:</th>
		<td class="td rowform"><input name="txtcookieexpire" type="text" id="txtcookieexpire" class="txtinput" value="<tpl> $baseinfo_cookie_array.cookie_expire </tpl>"  /> </td>
		<td class="vtop tips2"><label style="display:none" for="txtresize_height" class="wrong" metaDone="true" generated="true"></label><tpl> $langBCookieExpireRemark </tpl></td>
	</tr>
	<tr><td colspan="3" bgcolor="#FFFFFF"></td>
	</tr>
	<tr>
		<th><tpl> $langBWmIfOpen </tpl>:</th>
		<td class="td rowform"><label><input type="radio" name="txtimage_sign" value="1" <tpl> if $baseinfo_gdimage_array.wm_image_sign eq '1' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmOpen </tpl><label><input type="radio" name="txtimage_sign" value="0" <tpl> if $baseinfo_gdimage_array.wm_image_sign eq '0' || $baseinfo_gdimage_array.wm_image_sign eq '' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmClose </tpl> </td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBWmImageName </tpl>:</th>
		<td class="td rowform"><tpl> if $baseinfo_gdimage_array.wm_image_name eq '' </tpl>
		<input type="file" name="txtimage_file" id="txtimage_file" />
		<tpl> else </tpl>
		<span id="span_wm_image"><input type="hidden" name="txtimage_name" id="txtimage_name" value="<tpl> $baseinfo_gdimage_array.wm_image_name </tpl>" />
		<img width="60px;" height="60px;" src="<tpl> $site_url </tpl>/<tpl> $baseinfo_gdimage_array.wm_image_name </tpl>" />
		<a href="javascript:;" onclick="ajax_del_pic('wm_image');"><tpl> $langBInfoDel </tpl></a>		</span>
		<tpl> /if </tpl></td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBWmImagePos </tpl>:</th>
		<td class="td rowform">
			<label><input type="radio" name="txtimage_pos" value="0" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '' || $baseinfo_gdimage_array.wm_image_pos eq '0' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosMiddle </tpl>
			<label><input type="radio" name="txtimage_pos" value="1" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '1' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosTopLeft </tpl>
			<label><input type="radio" name="txtimage_pos" value="2" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '2' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosTopRight </tpl>
			<br />
			<label><input type="radio" name="txtimage_pos" value="3" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '3' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosBottomRight </tpl>
			<label><input type="radio" name="txtimage_pos" value="4" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '4' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosBottomLeft </tpl>
			<label><input type="radio" name="txtimage_pos" value="5" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '5' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosBottomLeft </tpl>
			<br />
			<label><input type="radio" name="txtimage_pos" value="6" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '6' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosMiddleRight </tpl>
			<label><input type="radio" name="txtimage_pos" value="7" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '7' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosMiddleRight </tpl>
			<label><input type="radio" name="txtimage_pos" value="8" <tpl> if $baseinfo_gdimage_array.wm_image_pos eq '8' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmImagePosMiddleLeft </tpl> 
		</td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBWmImageTransition </tpl>:</th>
		<td class="td rowform"><input name="txtimage_transition" type="text" id="txtimage_transition" class="txtinput" value="<tpl> $baseinfo_gdimage_array.wm_image_transition </tpl>"  /> </td>
		<td class="vtop tips2"><tpl> $langBWmImageTransitionRemark </tpl><label style="display:none" for="txtimage_transition" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
		<th><tpl> $langBShopNeedAuditing </tpl>:</th>
		<td class="td rowform"><label><input type="radio" name="rdoifcheck" value="1" <tpl> if $baseinfo_shopinfo_array.ifcheck eq "1" </tpl> checked <tpl> /if </tpl> /></label><tpl> $langCYes </tpl><label><input type="radio" name="rdoifcheck" value="0" <tpl> if $baseinfo_shopinfo_array.ifcheck eq "0" </tpl> checked <tpl> /if </tpl> /></label><tpl> $langCNo </tpl> </td>
		<td class="vtop tips2"></td>
	</tr>
	<tr>
		<th><tpl> $langBDomainLock </tpl>:</th>
		<td class="td rowform">
		<label><input type="radio" name="ifsubdomain" id="ifsubdomain_1" value="1" <tpl> if $baseinfo_subdomain_array.ifsubdomain eq "1" </tpl> checked <tpl> /if </tpl> onclick="$('#tr_domainprefix').css('display','');$('#tr_domainroot').css('display','');" /></label><tpl> $langCYes </tpl>
		<label><input type="radio" name="ifsubdomain" id="ifsubdomain_0" value="0" <tpl> if $baseinfo_subdomain_array.ifsubdomain eq "0" </tpl> checked <tpl> /if </tpl> onclick="$('#tr_domainprefix').css('display','none');$('#tr_domainroot').css('display','none');" /></label><tpl> $langCNo </tpl> 
		</td>
		<td class="vtop tips2"></td>
	</tr>
	<tr id="tr_domainprefix" style="display:none">
		<th><tpl> $langBDomainName </tpl>:</th>
		<td class="td rowform"><input name="txt_domainprefix" type="text" id="txt_domainprefix" class="txtinput" value="<tpl> $baseinfo_subdomain_array.domainprefix </tpl>"  /> </td>
		<td class="vtop tips2"><label style="display:none" for="txt_domainprefix" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr id="tr_domainroot" style="display:none">
		<th><tpl> $langBDomainRoot </tpl>:</th>
		<td class="td rowform"><input name="txt_domainroot" type="text" id="txt_domainroot" class="txtinput" value="<tpl> $baseinfo_subdomain_array.domainroot </tpl>"  /> </td>
		<td class="vtop tips2"><label style="display:none" for="txt_domainroot" class="wrong" metaDone="true" generated="true"></label>
			<br /><tpl> $langBDomainRootRemark </tpl>
		</td>
	</tr>
	<tr><td colspan="3" bgcolor="#FFFFFF"></td>
	</tr>
	<tr>
		<th><tpl> $langBShopPayMode </tpl>:</th>
		<td class="td rowform">
			<label><input type="radio" name="shop_pay_mode" value="1" <tpl> if $baseinfo_paymode_array.shop_pay_mode eq '1' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmOpen </tpl>
			<label><input type="radio" name="shop_pay_mode" value="0" <tpl> if $baseinfo_paymode_array.shop_pay_mode eq '0' </tpl>checked="checked"<tpl> /if </tpl> /></label><tpl> $langBWmClose </tpl>
			
		</td>
		<td class="vtop tips2"></td>
	</tr>

</table>
<div class="table-5-bottom">
<div class="btn_marginleft">
		<input type="hidden" name="genre" value="system" />
		<span class="btn_left">
		<input type="submit" name="Submit" value="<tpl> $langBSubmit </tpl>" class="btn_submit"/>
		</span>
		</div>
		</div>
</form>
<script language="javascript" type="text/javascript">
$(document).ready(function() {

	var msg = "<tpl> $langBInfoSaveOk </tpl>";
	var options_system = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(){
			hideLoading();
			showMessage(msg,1);
		},

		type:      'post',
		dataType:  'json'
	};
	
	//对表单做的验证定义
	$("#form_baseinfo").validate({
		errorClass: "wrong",
		rules: {
			txtmaxsize: {required:true,number:true,min:1},
			txtimagetype: {required:true},
			txtfiletype: {required:true},
			txtresize_width: {required:true,number:true,min:1},
			txtresize_height: {required:true,number:true,min:1},
			txtimage_transition: {required:true,number:true,min:0,max:100},
			txt_domainprefix: {required:function(){if($('#ifsubdomain_1').attr('checked')==true){return true;}else{return false;}}},
			txt_domainroot: {required:function(){if($('#ifsubdomain_1').attr('checked')==true){return true;}else{return false;}}},
			txtcookieexpire:{required:true,number:true,min:1}
		},
		messages: {
			txtmaxsize: {required:"<tpl> $langBMaxUpdataSizeIsEmpty </tpl>",number:"<tpl> $langBMaxUpdataSizeIsNotNumber </tpl>",min:"<tpl> $langBMaxUpdataSizeAboveOne </tpl>"},
			txtimagetype: {required:"<tpl> $langBAllowUpdataImageReamNameIsEmpty </tpl>"},
			txtfiletype: {required:"<tpl> $langBAllowUpdataAccessoriesReamNameIsEmpty </tpl>"},
			txtresize_width: {required:"<tpl> $langBProductImageWidthIsEmpty </tpl>",number:"<tpl> $langBProductImageWidthIsNotNumber </tpl>",min:"<tpl> $langBProductImageWidthAboveOne </tpl>"},
			txtresize_height: {required:"<tpl> $langBProductImageHeightIsEmpty </tpl>",number:"<tpl> $langBProductImageHeightIsNotNumber </tpl>",min:"<tpl> $langBProductImageHeightAboveOne </tpl>"},
			txtimage_transition: {required:"<tpl> $errBWmImageTransitionIsEmpty </tpl>",number:"<tpl> $errBWmImageTransitionIsNotNumber </tpl>",min:"<tpl> $errBWmImageTransitionAboveZero </tpl>",max:"<tpl> $errBWmImageTransitionOut100 </tpl>"},
			txt_domainprefix: {required:"<tpl> $errBDomainNameIsEmpty </tpl>"},
			txt_domainroot: {required:"<tpl> $errBDomainRootIsEmpty </tpl>"},
			txtcookieexpire:{required:"<tpl> $errBCookieExpireIsEmpty </tpl>",number:"<tpl> $errBCookieExpireIsEmpty </tpl>",min:"<tpl> $errBCookieExpireIsEmpty </tpl>"}
		},
		submitHandler: function() {
			$('#form_baseinfo').ajaxSubmit(options_system);
		}
	});
	$("#selTemplateName").change(function() { 
		var sampleimg = $("#selTemplateName").val();
		$("#templates_sample").html("<a href='<tpl> $template_dir </tpl>/"+sampleimg+"/images/"+sampleimg+"_b.gif' target='_blank'><img border='0' src=<tpl> $template_dir </tpl>/"+sampleimg+"/images/"+sampleimg+".gif></a>");
		$("#templates_sample_remark").html("<a href='<tpl> $template_dir </tpl>/"+sampleimg+"/images/"+sampleimg+"_b.gif' target='_blank'><tpl> $langBTemplateClickOut </tpl></a>");
		tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
		imgLoader = new Image();// preload image
		imgLoader.src = tb_pathToImage;
	});
	
	//2级域名显示判断
	<tpl> if $baseinfo_subdomain_array.ifsubdomain eq "1" </tpl>
		$('#tr_domainprefix').css('display','');
		$('#tr_domainroot').css('display','');
	<tpl> /if </tpl>
	
});

//删除水印图片
function ajax_del_pic(type){
	$.ajax({
		url: "baseinfo.manage.php",
		data: 'action=del_pic&type='+type,
		type:'post',
		dataType:"json",
		beforeSubmit:  showLoading(showText),
		success: function(msg){
			hideLoading();
			$('#span_wm_image').html("<input type='file' name='txtimage_file' id='txtimage_file' />");
		}
	});
	return false;
}
</script>
</html>
