<!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>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" type="text/css" href="{{kg['tpl_url']}}style/app_update.css" charset="utf-8">
<script src="{{kg['tpl_url']}}script/jquery.min.js" type="text/javascript"></script>
<script src="{{kg['tpl_url']}}script/cropper.min.js" type="text/javascript"></script>
<script src="{{kg['tpl_url']}}script/amazeui.datetimepicker.min.js" type="text/javascript"></script>
<script src="{{kg['server']['HTTP_HOST']}}/tools/amazeui/js/amazeui.min.js" type="text/javascript"></script>
<script src="{{kg['tpl_url']}}script/common.js" type="text/javascript"></script>
<script src="{{kg['tpl_url']}}script/app_update.js" type="text/javascript"></script>
</head>
<body data-type="generalComponents" style="overflow: hidden;">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				{{kg['lang'][action][0]}}
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li><a href="./app_manage">应用信息管理</a></li>
				<li class="am-active">{{kg['lang'][action][1]}}</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;{{kg['lang'][action][2]}}
					</div>
				</div>
				<div class="tpl-block">
					<div class="am-g">
						<div class="tpl-form-body tpl-form-line">
							<form class="am-form tpl-form-line-form" method="post" action="">
								<div class="am-form-group am-form-icon am-form-feedback" id="cutover">
									<label for="use_name" class="am-u-sm-3 am-form-label">应用名称&nbsp;/&nbsp;<span class="tpl-form-line-small-title">ApplyName</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input am-reg-input ngco_Ojs_bitian" id="name" name="name" value="{{data['name']}}">
										<i class=""></i>
									</div>
								</div>
								<div class="am-form-group">
									<label class="am-u-sm-3 am-form-label">是否为默认站点&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Default</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="tpl-switch">
											{% if data['default']==1 %}
											<input type="checkbox" name="default" class="ios-switch bigswitch tpl-switch-btn" checked="">
											{% else %}
											<input type="checkbox" name="default" class="ios-switch bigswitch tpl-switch-btn">
											{% endif %}
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
								</div>
								<div class="am-form-group">
									<label class="am-u-sm-3 am-form-label">是否启用&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Enable</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="tpl-switch">
											{% if data['enable']==1 %}
											<input type="checkbox" name="enable" class="ios-switch bigswitch tpl-switch-btn" checked="">
											{% else %}
											<input type="checkbox" name="enable" class="ios-switch bigswitch tpl-switch-btn">
											{% endif %}
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
								</div>
								<div class="am-form-group">
									<label class="am-u-sm-3 am-form-label">语言包目录名&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Directory</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3 posi_box2">
										<select name="language" data-am-selected="{btnSize: 'sm'}" style="display: none;" id="language">
											<option value="请选择语言包">请选择语言包</option>
											{% for row in language %}
											{% if data['language']==row %}
											<option selected="selected" value="{{row}}">{{row}}</option>
											{% else %}
											<option value="{{row}}">{{row}}</option>
											{% endif %}
											{% endfor %}
										</select>
									</div>
								</div>
								<div class="am-form-group am-form-icon am-form-feedback">
									<label for="domain" class="am-u-sm-3 am-form-label">域名&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Domain</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="am-plus-box">
											<input type="text" class="tpl-form-input ngco_Ojs_bitian3" id="domain" value="{{data['domain'][0]}}" name="domain" placeholder="">
											<i class=""></i>
											<span class="am-icon-plus-circle"></span>
										</div>
										{% set domain = data['domain']|length %}
										{% if domain > 1 %}
										{% for i in range(1,domain) %}
										<div class="am-plus-box">
											<input type="text" class="tpl-form-input" id="domain" name="domain" value="{{data['domain'][i]}}">
											<i class=""></i>
											<span class="am-icon-minus-circle"></span>
										</div>
										{% endfor %}
										{% endif %}
									</div>
									
								</div>
								<div class="am-form-group">
									<label class="am-u-sm-3 am-form-label">自动切换模板&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Template</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="tpl-switch">
											{% if data['template_auto'] %}
											<input type="checkbox" name="template_auto" class="ios-switch bigswitch tpl-switch-btn" checked="checked" id="auto">
											{% else %}
											<input type="checkbox" name="template_auto" class="ios-switch bigswitch tpl-switch-btn" id="auto">
											{% endif %}
											<div class="tpl-switch-btn-view" id="auto-btn">
												<div></div>
											</div>
										</div>
									</div>
								</div>
								<div class="am-form-group auto-tpl">
									<label for="user-phone" class="am-u-sm-3 am-form-label">PC网站&nbsp;/&nbsp;<span class="tpl-form-line-small-title">PC</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3 posi_box3">
										<select name="pc" data-am-selected="{btnSize: 'sm'}" style="display: none;">
											<option value="请选择PC网站模板">请选择PC网站模板</option>
											{% for row in temp_auto[0] %}
											{% if data['template_auto']['pc'] == row['dir'] %}
											<option selected="selected" value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% else %}
											<option value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% endif %}
											{% endfor %}
										</select>
									</div>
								</div>
								<div class="am-form-group auto-tpl">
									<label for="user-phone" class="am-u-sm-3 am-form-label">移动网站&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Mobile</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3 posi_box4">
										<select name="m" data-am-selected="{btnSize: 'sm'}" style="display: none;">
											<option value="请选择移动网站模板">请选择移动网站模板</option>
											{% for row in temp_auto[2] %}
											{% if data['template_auto']['m'] == row['dir'] %}
											<option selected="selected" value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% else %}
											<option value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% endif %}
											{% endfor %}
										</select>
									</div>
								</div>
								<div class="am-form-group auto-tpl">
									<label for="user-phone" class="am-u-sm-3 am-form-label">微信&nbsp;/&nbsp;<span class="tpl-form-line-small-title">WeChat</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3 posi_box5">
										<select name="wx" data-am-selected="{btnSize: 'sm'}" style="display: none;">
											<option value="请选择微信系统模板">请选择微信系统模板</option>
											{% for row in temp_auto[1] %}
											{% if data['template_auto']['wx'] == row['dir'] %}
											<option selected="selected" value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% else %}
											<option value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% endif %}
											{% endfor %}
										</select>
									</div>
								</div>
								<div class="am-form-group" id="default-tpl">
									<label for="user-phone" class="am-u-sm-3 am-form-label">模板文件&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Template</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<select name="template" data-am-selected="{btnSize: 'sm'}" style="display: none;">
											{% for row in template %}
											{% if data['template'] == row['dir'] %}
											<option selected="selected" value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% else %}
											<option value="{{row['dir']}}">{{row['dir']}}/{{row['name']}}</option>
											{% endif %}
											{% endfor %}
										</select>
									</div>
								</div>
								<div class="am-form-group am-form-icon am-form-feedback">
									<label for="title" class="am-u-sm-3 am-form-label">网站标题&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Title</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input am-reg-input ngco_Ojs_bitian2" id="title" value="{{data['title']}}" name="title">
										<i class=""></i>
									</div>
								</div>
								<!-- 上传图片区域 -->
								<div class="am-form-group ngco-No-marginB">
									<label class="am-u-sm-3 am-form-label" id="lab">网站Logo&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Logo</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<!-- 图片区域 -->
										<div class="am-form-group am-form-file">
											<div class="tpl-form-file-img ngco-none-display2" id="ngac_Nfu_box">
												<img src="{{data['logo']}}" id="finalImg">
											</div>
											<button title="未选择任何图片" type="button" class="am-btn am-btn-danger am-btn-sm title2div" id="originalImg">
												<i class="am-icon-cloud-upload"></i>&nbsp;原始上传
											</button>
											<input type="file" id="originalChoose" class="ngco-No-widht" />
											<input type="hidden" name="image" id="originalUpdate" value='' />
											<button title="未选择任何图片" type="button" class="am-btn am-btn-danger am-btn-sm title2div" id="replaceImg">
												<i class="am-icon-cloud-upload"></i>&nbsp;裁切上传
											</button>
											<!--图片裁剪框 start-->
											<div style="display: none" class="tailoring-container">
												<div class="black-cloth ngad-Jsj-click"></div>
												<div class="tailoring-content">
													<div class="tailoring-content-one">
														<label title="上传图片" for="chooseImg" class="l-btn choose-btn">
															<input type="file" name="filename" accept="image/*" id="chooseImg" class="hidden ngad-Ksj-change">
															选择图片
															<input type="hidden" name="image" id="imgUpdate" value='' />
														</label>
														<div class="close-tailoring ngad-Usj-click">×</div>
													</div>
													<div class="tailoring-content-two">
														<div class="tailoring-box-parcel">
															<img id="tailoringImg">
														</div>
														<div class="preview-box-parcel">
															<p>图片预览：</p>
															<div class="square previewImg"></div>
															<div class="circular previewImg"></div>
														</div>
													</div>
													<div class="tailoring-content-three">
														<button class="l-btn cropper-reset-btn" type="button">复位</button>
														<button class="l-btn cropper-rotate-btn" type="button">旋转</button>
														<button class="l-btn cropper-scaleX-btn" type="button">换向</button>
														<button class="l-btn sureCut" id="sureCut" type="button">确定</button>
													</div>
												</div>
											</div>
											<!--图片裁剪框 end-->
											<input id="doc-form-file" type="file" multiple="" class="ngco-No-widht">
										</div>
										<!-- 图片区域结束 -->
									</div>
								</div>
								<!-- 上传图片区域结束 -->
								<div class="am-form-group">
									<label for="keyword" class="am-u-sm-3 am-form-label">SEO关键字&nbsp;/&nbsp;<span class="tpl-form-line-small-title">SEOKeywords</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input" id="keyword" value="{{data['keyword']}}" name="keyword">
									</div>
								</div>
								<div class="am-form-group">
									<label for="description" class="am-u-sm-3 am-form-label">SEO描述&nbsp;/&nbsp;<span class="tpl-form-line-small-title">SEODescription</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input" id="description" value="{{data['description']}}" name="description">
									</div>
								</div>
								<div class="am-form-group">
									<label for="copyright" class="am-u-sm-3 am-form-label">版权信息&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Copyright</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<textarea rows="3" cols="" name="copyright" id="copyright">{{data['copyright']}}</textarea>
									</div>
								</div>
								<div class="am-form-group  am-form-icon am-form-feedback">
									<label for="email" class="am-u-sm-3 am-form-label">企业邮箱&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Email</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="am-plus-box" style="margin-bottom: 0;">
											<input type="text" class="tpl-form-input ngco_Ojs_email" id="email" value="{{data['email'][0]}}" name="email">
											<i class=""></i>
											<span class="am-icon-plus-circle"></span>
										</div>
										{% set email = data['email']|length %}
										{% if email > 1 %}
										{% for i in range(1,email) %}
										<div class="am-plus-box">
											<input type="text" class="tpl-form-input ngco_Ojs_email" id="email" name="email" value="{{data['email'][i]}}">
											<i class=""></i>
											<span class="am-icon-minus-circle"></span>
										</div>
										{% endfor %}
										{% endif %}
									</div>
								</div>
								<div class="am-form-group">
									<label for="qq" class="am-u-sm-3 am-form-label">客服QQ&nbsp;/&nbsp;<span class="tpl-form-line-small-title">QQ </span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="am-plus-box">
											<input type="text" class="tpl-form-input" id="qq" value="{{data['qq'][0]}}" name="qq">
											<span class="am-icon-plus-circle"></span>
										</div>
										{% set qq = data['qq']|length %}
										{% if qq > 1 %}
										{% for i in range(1,qq) %}
										<div class="am-plus-box">
											<input type="text" class="tpl-form-input" id="qq" name="qq" value="{{data['qq'][i]}}">
											<span class="am-icon-minus-circle"></span>
										</div>
										{% endfor %}
										{% endif %}
									</div>
								</div>
								<div class="am-form-group am-form-icon am-form-feedback">
									<label for="phone" class="am-u-sm-3 am-form-label">电话&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Phone</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="am-plus-box">
											<input type="text" class="tpl-form-input ngco_Ojsbi_phone" id="phone" value="{{data['phone'][0]}}" name="phone">
											<i class=""></i>
											<span class="am-icon-plus-circle"></span>
										</div>
										{% set phone = data['phone']|length %}
										{% if phone > 1 %}
										{% for i in range(1,phone) %}
										<div class="am-plus-box">
											<input type="text" class="tpl-form-input ngco_Ojsbi_phone" id="phone" name="phone" value="{{data['phone'][i]}}">
											<span class="am-icon-minus-circle"></span>
										</div>
										{% endfor %}
										{% endif %}
										<div>
										</div>
									</div>
								</div>
								<!-- 二维码 -->
								<div class="am-form-group">
									<label class="am-u-sm-3 am-form-label">二维码&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Qrcode</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<div class="am-form-group am-form-file">
											<div class="tpl-form-file-img ewm-img-box" data-am-widget="gallery" data-am-gallery="{ pureview: true }">
												{% set qrcode = data['qrcode']|length %}
												{% if qrcode >0 %}
												{% for i in data['qrcode'] %}
												<div class="ewm-box">
													<img src="data:{{i['MIME']}};base64,{{i['data']}}" class="" />
													<ul class="list-unstyled btn-box-group">
														<li>
															<button type="button" class="am-btn am-btn-success" data-btn="update"><i class="am-icon-pencil-square-o"></i>&nbsp;修改</button>
														</li>
														<li>
															<button type="button" class="am-btn am-btn-danger" data-btn="remove"><i class="am-icon-remove ngsty-rem"></i>&nbsp;删除</button>
														</li>
														<li>
															<button type="button" class="am-btn am-btn-secondary" data-btn="search"><span class="search1"><i class="am-icon-search ngsty-rem"></i>&nbsp;查看</span></button>
														</li>
													</ul>
												</div>
												{% endfor %}
												{% endif %}
												<div class="ewm-upload" id="qrcodeUpload">
													<!-- <input type="file" class="input-file" id="qrcodeInput"/> -->
													<!-- <input type="file" class="input-file" id="qrcodeInput-update" /> -->
													<div id="input_add"></div>
													<div class="shuline"></div>
													<div class="hengline"></div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- 二维码结束 -->
								<div class="am-form-group">
									<label for="address" class="am-u-sm-3 am-form-label">公司地址&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Address</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input" id="address" value="{{data['address']}}" name="address">
									</div>
								</div>
								<div class="am-form-group">
									<label for="address" class="am-u-sm-3 am-form-label">排序&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Sort</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input" id="sort" value="{{data['sort']}}" name="sort">
									</div>
								</div>
								<input type="hidden" name="action" value='submit' />
								<div class="am-form-group">
									<div class="am-u-sm-9 am-u-sm-push-3">
										<button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success">{{kg['lang'][action][3]}}</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
	<script type="text/javascript">
	kg.title2div('title2div'); //调用此方法， 把该元素的title属性替换成div
	</script>
</body>
</html>