<!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 content="zh-cn" http-equiv="Content-Language" />
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
		<meta name="renderer" content="webkit"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,  user-scalable=no"/>
		<link href="{%$rootdir%}espcms_includes/favicon.ico" rel="shortcut icon" type="image/x-icon" media="screen" />
		<title>{%pack:setup_pack-espcms_setup_sitename%}</title>
		<meta name="keywords" content="{%pack:setup_pack-espcms_setup_sitename%}" />
		<meta name="description" content="{%pack:setup_pack-espcms_setup_sitename%}" />
		<link href="{%$rootpath%}css/ecisp_font.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/ecisp_public.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/ecisp_all.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/ecisp_style.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcms_select.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/jquery.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/jquery-ui.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/jquery.cookie.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/bootstrap.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_checkbox.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_sticky.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_tool.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_form.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_formvalidation.js"></script>
		<script>/*@cc_on document.write('\x3Cscript id="_iealwn_js" src="https://www.earclink.com/ieupdate/browser.js">\x3C/script>'); @*/</script>
	</head>

	<body class="espcms_setup_window_body">
		<div class="login_bg">
			<div class="espcms_setup_center kill_copy">
				{%link file="head.html"%}
				<div class="espcms_setup_left">
					<ul class="list-group">
						<li class="list-group-item{%if $path=='index'%} list-group-item-info{%/if%}"><i class="espcms_icon_fa espcms_icon_fa-file-text-o"></i>{%pack:setup_pack-espcms_lable_setup_view_license%}</li>
						<li class="list-group-item{%if $path=='runtime'%} list-group-item-info{%/if%}"><i class="espcms_icon_fa espcms_icon_fa-list-alt"></i>{%pack:setup_pack-espcms_lable_setup_view_runtime%}</li>
						<li class="list-group-item{%if $path=='reg'%} list-group-item-info{%/if%}"><i class="espcms_icon_fa espcms_icon_fa-cloud"></i>{%pack:setup_pack-espcms_lable_setup_view_reg%}</li>
						<li class="list-group-item{%if $path=='setting'%} list-group-item-info{%/if%}"><i class="espcms_icon_fa espcms_icon_fa-cog"></i>{%pack:setup_pack-espcms_lable_setup_view_setting%}</li>
						<li class="list-group-item{%if $path=='download'%} list-group-item-info{%/if%}"><i class="espcms_icon_fa espcms_icon_fa-cloud-download"></i>{%pack:setup_pack-espcms_lable_setup_view_download%}</li>
						<li class="list-group-item{%if $path=='installdb'%} list-group-item-info{%/if%}"><i class="espcms_icon_fa espcms_icon_fa-database"></i>{%pack:setup_pack-espcms_lable_setup_view_installdb%}</li>
						<li class="list-group-item{%if $path=='setupok'%} list-group-item-info{%/if%}"><i class="espcms_icon_fa espcms_icon_fa-check-circle-o"></i>{%pack:setup_pack-espcms_lable_setup_view_setupok%}</li>
					</ul>
				</div>
				{%if $path=='index'%}
				<div class="espcms_setup_right">
					<div class="panel panel-info">
						<div class="panel-heading setup_title">{%pack:setup_pack-espcms_lable_setup_view_license%}</div>
						<div class="panel-body setup_content">
							<div class="espcms_license scro_div">{%$espcms_license%}</div>
						</div>
						<ul class="list-group">
							<li class="list-group-item text-center">
								<a class="btn btn-green" href="{%$link.runtime%}">{%pack:setup_pack-espcms_setup_button_license_ok%}</a>
							</li>
						</ul>
					</div>
				</div>
				{%/if%}
				{%if $path=='runtime'%}
				<div class="espcms_setup_right">
					<div class="panel panel-info">
						<div class="panel-heading setup_title">{%pack:setup_pack-espcms_lable_setup_view_runtime%}</div>
						<div class="panel-body">
							<div class="section-divider mb40"><span>{%pack:setup_pack-espcms_lable_setup_runtime_sysinc%}</span></div>
							<table class="table table-bordered">
								<thead>
									<tr class="active">
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t1%}</th>
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t2%}</th>
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t3%}</th>
									</tr>
								</thead>
								<tbody>
									{%forlist from=$ser_inc key=i%}
									<tr>
										<th class="text-center f12">{%$ser_inc[i].title%}</th>
										<td class="text-left f12">{%$ser_inc[i].key%}</td>
										<td class="text-center f12">{%$ser_inc[i].sug%}</td>
									</tr>
									{%/forlist%}
								</tbody>
							</table>

							<div class="section-divider mb40"><span>{%pack:setup_pack-espcms_lable_setup_runtime_phptitle%}</span></div>
							<div class="alert alert-warning" role="alert">{%pack:setup_pack-espcms_lable_setup_runtime_php_message%}</div>
							<table class="table table-bordered">
								<thead>
									<tr class="active">
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t4%}</th>
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t5%}</th>
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t6%}</th>
									</tr>
								</thead>
								<tbody>
									{%forlist from=$php_inc key=i%}
									<tr>
										<th class="text-center f12">{%$php_inc[i].title%}</th>
										<td class="text-center f12">{%if $php_inc[i].key==1%}<span class="text-green">{%pack:setup_pack-espcms_lable_setup_runtime_inc_ok%}</span>{%else%}<span class="text-red b">{%pack:setup_pack-espcms_lable_setup_runtime_inc_no%}</span>{%/if%}</td>
										<td class="text-center f12">{%if $php_inc[i].sug==1%}<span class="text-green">{%pack:setup_pack-espcms_lable_setup_runtime_inc_ok%}</span>{%else%}<span class="text-red b">{%pack:setup_pack-espcms_lable_setup_runtime_inc_no%}</span>{%/if%}</td>
									</tr>
									{%/forlist%}
								</tbody>
							</table>
							<div class="section-divider mb40"><span>{%pack:setup_pack-espcms_lable_setup_runtime_filewrite%}</span></div>
							<div class="alert alert-warning" role="alert">{%pack:setup_pack-espcms_lable_setup_runtime_filewrite_message%}</div>
							<table class="table table-bordered">
								<thead>
									<tr class="active">
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t7%}</th>
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t5%}</th>
										<th class="text-center">{%pack:setup_pack-espcms_lable_setup_runtime_t6%}</th>
									</tr>
								</thead>
								<tbody>
									{%forlist from=$dir_inc key=i%}
									<tr>
										<th class="text-left f12">{%$dir_inc[i].title%}</th>
										<td class="text-center f12">{%if $dir_inc[i].key==1%}<span class="text-green">{%pack:setup_pack-espcms_lable_setup_runtime_filewrite_ok_2%}</span>{%else%}<span class="text-red b">{%pack:setup_pack-espcms_lable_setup_runtime_filewrite_no%}</span>{%/if%}</td>
										<td class="text-center f12">{%if $dir_inc[i].sug==1%}<span class="text-green">{%pack:setup_pack-espcms_lable_setup_runtime_filewrite_ok%}</span>{%else%}<span class="text-red b">{%pack:setup_pack-espcms_lable_setup_runtime_inc_no%}</span>{%/if%}</td>
									</tr>
									{%/forlist%}
								</tbody>
							</table>
						</div>
						<ul class="list-group">
							<li class="list-group-item setup_botton">
								<div class="setup_b_l"><a class="btn btn-babyblue" href="{%$setup_url%}">{%pack:setup_pack-espcms_setup_button_goback%}</a></div>
								<div class="setup_b_r">
									{%if $is_setup%}
									<a class="btn btn-green" href="{%$link.reg%}" >{%pack:setup_pack-espcms_setup_button_next%}</a>
									{%else%}
									<button class="btn btn-green" disabled="disabled">{%pack:setup_pack-espcms_setup_button_next_no%}</button >
									{%/if%}
								</div>
							</li>
						</ul>
					</div>
				</div>
				{%/if%}
				{%if $path=='reg'%}
				<div class="espcms_setup_right">
					<form class="form-horizontal admin-form" id="espcms_saveInfo" action="{%$link.regdb%}">
						<div class="panel panel-info">
							<div class="panel-heading setup_title">{%pack:setup_pack-espcms_lable_setup_view_reg%}</div>
							<div class="panel-body">
								<div class="section-divider mb40 mt40"><span>{%pack:setup_pack-espcms_lable_setup_login_title%}</span></div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_login_user%}</label>
									<div class="col-sm-8">
										<input type="text" class="form-control" name="login_user" id="login_user" value="{%$userinfo.username%}" maxlength="50" data-validation="^[\u4e00-\u9fa5\w\@\.]{2,50}$" placeholder="{%pack:setup_pack-espcms_lable_setup_login_usertitle%}" title="{%pack:setup_pack-espcms_lable_setup_login_usertitle%}" data-validation-msg="{%pack:setup_pack-espcms_lable_setup_login_user_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setting_pack-espcms_admin_member_password%}</label>
									<div class="col-sm-8">
										<input type="password" name="password" class="form-control" id="password" maxlength="30" placeholder="{%pack:setting_pack-espcms_admin_member_password_title%}" title="{%pack:setting_pack-espcms_admin_member_password_title%}" password-rank="2" password-rank-msg="{%pack:setting_pack-espcms_admin_member_password_rank_msg%}" data-validation-minlength="6" data-validation-maxlength="30" data-validation-msg="{%pack:setting_pack-espcms_admin_member_password_validation_msg%}" />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label"></label>
									<div class="col-sm-8">
										<button type="submit" class="btn btn-green" id="login_submit" formmethod="POST">{%pack:setup_pack-espcms_lable_setup_login_button%}</button>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label"></label>
									<div class="col-sm-8">{%pack:setup_pack-espcms_lable_setup_login_validation_msg%}</div>
								</div>

							</div>
							<ul class="list-group">
								<li class="list-group-item setup_botton">
									<div class="setup_b_l"><a class="btn btn-babyblue" href="{%$link.runtime%}">{%pack:setup_pack-espcms_setup_button_goback%}</a></div>
									<div class="setup_b_r">
										<a class="btn btn-orange" href="{%$link.setting%}">{%pack:setup_pack-espcms_setup_button_member_no%}</a>
									</div>
								</li>
							</ul>
						</div>
					</form>
				</div>
				<script type="text/javascript">
					$(document).ready(function () {
						$("[placeholder]").tooltip();

						$("#espcms_saveInfo").espcms_formvalidation({focusName: "#db_name", display_icon_err: false});
						$('#espcms_saveInfo').ajaxForm({
							type: 'POST',
							url: '{%$link.regdb%}',
							dataType: 'json',
							beforeSubmit: function () {
								$("#login_submit").attr('disabled', 'disabled');
							},
							success: function (data) {
								if (data.code == 'true') {
									$.espcms_sticky('{%pack:setup_pack-espcms_lable_setup_login_ok%}', {'autoclose': 1500});
									window.setInterval(redirection, 1600);
								} else {
									$.espcms_sticky('{%pack:setup_pack-espcms_lable_setup_login_err%}', {'autoclose': 2000});
									$('#login_user').focus();
									$("#login_submit").removeAttr('disabled');
								}
							}
						});
					});
					function redirection() {
						location.href = "{%$link.setting%}";
					}
				</script>
				{%/if%}
				{%if $path=='setting'%}
				<div class="espcms_setup_right">
					<form class="form-horizontal admin-form" id="espcms_saveInfo" action="{%$link.settingdb%}">
						<div class="panel panel-info">
							<div class="panel-heading setup_title">{%pack:setup_pack-espcms_lable_setup_view_setting%}</div>
							<div class="panel-body">
								<div class="section-divider mb40 mt40"><span>{%pack:setup_pack-espcms_lable_setup_setting_db%}</span></div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_db_host%}</label>
									<div class="col-sm-8">
										<input type="text" name="db_host" class="form-control" id="db_host" value="127.0.0.1" placeholder="{%pack:setup_pack-espcms_lable_setup_setting_db_host_title%}" title="{%pack:setup_pack-espcms_lable_setup_setting_db_host_title%}" data-validation="^[\w\.\-\/\:]+$" data-validation-msg="{%pack:setup_pack-espcms_lable_setup_setting_db_host_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_db_name%}</label>
									<div class="col-sm-8">
										<input type="text" name="db_name" class="form-control" id="db_name" value="espcms_p8_demo" placeholder="{%pack:setup_pack-espcms_lable_setup_setting_db_name_title%}" title="{%pack:setup_pack-espcms_lable_setup_setting_db_name_title%}" data-validation="^[a-zA-Z]{1}[\w\-]*$" data-validation-msg="{%pack:setup_pack-espcms_lable_setup_setting_db_name_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_db_user%}</label>
									<div class="col-sm-8">
										<input type="text" name="db_user" class="form-control" id="db_user" value="root" placeholder="{%pack:setup_pack-espcms_lable_setup_setting_db_user_title%}" title="{%pack:setup_pack-espcms_lable_setup_setting_db_user_title%}" data-validation="^[\w]+$" data-validation-msg="{%pack:setup_pack-espcms_lable_setup_setting_db_user_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_db_password%}</label>
									<div class="col-sm-8">
										<input type="password" name="db_password" class="form-control" id="db_password" placeholder="{%pack:setup_pack-espcms_lable_setup_setting_db_password_title%}" title="{%pack:setup_pack-espcms_lable_setup_setting_db_password_title%}" data-validation-minlength="2" data-validation-maxlength="50" data-validation-msg="{%pack:setup_pack-espcms_lable_setup_setting_db_password_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_db_prefix%}</label>
									<div class="col-sm-8">
										<input type="text" name="db_prefix" class="form-control" id="db_prefix" value="espcms_" data-validation="^[\w]+_$" placeholder="{%pack:setup_pack-espcms_lable_setup_setting_db_prefix_title%}" title="{%pack:setup_pack-espcms_lable_setup_setting_db_prefix_title%}" data-validation-msg="{%pack:setup_pack-espcms_lable_setup_setting_db_prefix_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_db_setuptype%}</label>
									<div class="col-sm-8 pt5">
										<input type="radio" name="db_setuptype" value="0" checked/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_db_setuptype_0%}</span>
										<input type="radio" name="db_setuptype" value="1"/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_db_setuptype_1%}</span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_db_linktype%}</label>
									<div class="col-sm-8 pt5">
										<input type="radio" name="db_linktype" value="0" checked/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_db_linktype_0%}</span>
										<input type="radio" name="db_linktype" value="1"/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_db_linktype_1%}</span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label"></label>
									<div class="col-sm-8">
										<button type="button" class="btn btn-orange" id="sqllink">{%pack:setup_pack-espcms_lable_setup_setting_db_button_link%}</button >
									</div>
								</div>
								<div class="section-divider mb40 mt40"><span>{%pack:setup_pack-espcms_lable_setup_setting_module%}</span></div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_module_dbdemo%}</label>
									<div class="col-sm-8 pt5">
										<input type="radio" name="module_dbdemo" value="0"/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_module_dbdemo_0%}</span>
										<input type="radio" name="module_dbdemo" value="1" checked/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_module_dbdemo_1%}</span>
									</div>
								</div>
								{%if $userinfo.uid%}
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_module_app%}</label>
									<div class="col-sm-8 pt5">
										<input type="radio" name="module_app" value="0" checked/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_module_app_0%}</span>
										<input type="radio" name="module_app" value="1"/><span class="pr10">{%pack:setup_pack-espcms_lable_setup_setting_module_app_1%}</span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label"></label>
									<div class="col-sm-8">
										<span class="input_exp"> <span class="exp_icon espcms_icon_fa espcms_icon_fa-exclamation-circle" aria-hidden="true"></span>{%pack:setup_pack-espcms_lable_setup_setting_module_app_message%}</span>
									</div>
								</div>
								{%else%}
								<input type="hidden" name="module_app" value="0"/>
								{%/if%}
								<div class="section-divider mb40 mt40"><span>{%pack:setup_pack-espcms_lable_setup_setting_admin%}</span></div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setting_pack-espcms_admin_member_username%}</label>
									<div class="col-sm-8">
										<input type="text" name="admin_username" class="form-control" id="admin_username" value="admin" maxlength="50" placeholder="{%pack:setting_pack-espcms_admin_member_username_title%}" title="{%pack:setting_pack-espcms_admin_member_username_title%}" data-validation="^[\w]{2,50}$" data-validation-msg="{%pack:setting_pack-espcms_admin_member_username_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setting_pack-espcms_admin_member_email%}</label>
									<div class="col-sm-8">
										<input type="text" name="admin_email" class="form-control" id="admin_email" value="{%$userinfo.email%}" placeholder="{%pack:setting_pack-espcms_admin_member_email_title%}" title="{%pack:setting_pack-espcms_admin_member_email_title%}" data-validation="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$" data-validation-msg="{%pack:setting_pack-espcms_admin_member_email_validation_msg%}"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setting_pack-espcms_admin_member_password%}</label>
									<div class="col-sm-8">
										<input type="password" name="admin_password" class="form-control" id="admin_password" maxlength="30" placeholder="{%pack:setting_pack-espcms_admin_member_password_title%}" title="{%pack:setting_pack-espcms_admin_member_password_title%}" password-rank="2" password-rank-msg="{%pack:setting_pack-espcms_admin_member_password_rank_msg%}" data-validation-minlength="6" data-validation-maxlength="30" data-validation-msg="{%pack:setting_pack-espcms_admin_member_password_validation_msg%}" />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setting_pack-espcms_admin_member_validation_password%}</label>
									<div class="col-sm-8">
										<input type="password" name="validation_password" class="form-control" id="validation_password" maxlength="30" placeholder="{%pack:setting_pack-espcms_admin_member_validation_password_title%}" title="{%pack:setting_pack-espcms_admin_member_validation_password_title%}" password-validation-field="admin_password" data-password-validation-msg="{%pack:setting_pack-espcms_admin_member_validation_password_validation_msg%}" data-validation-minlength="6" data-validation-maxlength="30" data-validation-msg="{%pack:setting_pack-espcms_admin_member_validation_password_msg%}" />
									</div>
								</div>
								<div class="section-divider mb40 mt40"><span>{%pack:setup_pack-espcms_lable_setup_setting_web%}</span></div>

								<div class="form-group">
									<label class="col-sm-3 control-label">{%pack:setup_pack-espcms_lable_setup_setting_web_webname%}</label>
									<div class="col-sm-8">
										<input type="text" name="webname" class="form-control" id="webname" placeholder="{%pack:setup_pack-espcms_lable_setup_setting_web_webname_title%}" title="{%pack:setup_pack-espcms_lable_setup_setting_web_webname_title%}" data-validation-minlength="2" data-validation-maxlength="200" data-validation-msg="{%pack:setup_pack-espcms_lable_setup_setting_web_webname_validation_msg%}"/>
									</div>
								</div>
							</div>
							<ul class="list-group">
								<li class="list-group-item setup_botton">
									<div class="setup_b_l"><a class="btn btn-babyblue" id="goback_button" href="{%$link.reg%}">{%pack:setup_pack-espcms_setup_button_goback%}</a></div>
									<div class="setup_b_r">
										<button type="submit" class="btn btn-green" id="setting_submit" formmethod="POST">{%pack:setup_pack-espcms_setup_button_next%}</button >
									</div>
								</li>
							</ul>
						</div>
					</form>
				</div>
				<script type="text/javascript">
					$(document).ready(function () {
						$('input[type=checkbox],input[type=radio]').espcms_checkbox();
						$("[placeholder]").tooltip();
						$("#espcms_saveInfo").espcms_formvalidation({focusName: "#db_name", display_icon_err: false});
						$('#espcms_saveInfo').ajaxForm({
							type: 'POST',
							url: '{%$link.settingdb%}',
							dataType: 'json',
							beforeSubmit: function () {
								$("#setting_submit").attr('disabled', 'disabled');
							},
							success: function (data) {
								if (data.code == 'true') {
									$.espcms_sticky(data.message, {'autoclose': 1500});
									window.setInterval(redirection, 1600);
								} else {
									$.espcms_sticky(data.message, {'autoclose': 4000});
									$('#db_host').focus();
									$("#setting_submit").removeAttr('disabled');
								}
							}
						});

						$('#sqllink').click(function () {
							var data = {};
							var form_class = $('#espcms_saveInfo').serializeArray();
							$.each(form_class, function () {
								if (this.value) {
									data[this.name] = this.value;
								}
							});
							if (!data['db_host'] || !data['db_name'] || !data['db_user'] || !data['db_password'] || !data['db_prefix']) {
								$.espcms_sticky('{%pack:setup_pack-espcms_lable_setup_setting_db_link_demo_err%}', {'autoclose': 2500});
								$('#db_host').focus();
								return false;
							}
							$.ajax({
								type: "post", url: "{%$link.linkdemo%}",
								dataType: 'json',
								data: data, global: false,
								success: function (data) {
									if (data.code == 'true') {
										$.espcms_sticky('{%pack:setup_pack-espcms_lable_setup_setting_db_link_ok%}', {'autoclose': 2500});
									} else {
										$.espcms_sticky('{%pack:setup_pack-espcms_lable_setup_setting_db_link_no%}', {'autoclose': 2500});
										$('#db_host').focus();
									}
									return false;
								}
							});
						});
					});
					function redirection() {
						location.href = "{%$link.download%}";
					}
				</script>
				{%/if%}

				{%if $path=='download'%}
				<div class="espcms_setup_right">
					<form class="form-horizontal admin-form" id="espcms_saveInfo" action="{%$link.settingdb%}">
						<div class="panel panel-info">
							<div class="panel-heading setup_title">{%pack:setup_pack-espcms_lable_setup_view_download%}</div>
							<div class="panel-body">
								<div class="panel-body text-center mb10 mt15 f24" id="load_message">{%pack:setup_pack-espcms_lable_setup_download_title%}</div>
								<div class="col-md-12" id="load_div">
									<div class="progress" id="progress">
										<div class="progress-bar progress-bar-danger" id="progress_bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
									</div>
								</div>
							</div>
							<ul class="list-group">
								<li class="list-group-item setup_botton">
									<div class="setup_b_l"><a class="btn btn-babyblue" id="goback_button" href="{%$link.setting%}">{%pack:setup_pack-espcms_setup_button_goback%}</a></div>
									<div class="setup_b_r">
										<button type="submit" class="btn btn-green" id="download_submit" formmethod="POST">{%pack:setup_pack-espcms_setup_button_next%}</button >
									</div>
								</li>
							</ul>
						</div>
					</form>
				</div>
				<script type="text/javascript">
					$(document).ready(function () {
						$("#download_submit").attr('disabled', 'disabled');
						$("#goback_button").attr('disabled', 'disabled');
						var href = $("#goback_button").attr('href');
						$("#goback_button").removeAttr('href');
						$("#goback_button").attr('data-href', href);
						$.ajax({
							type: "get", url: "{%$link.download_filelist%}",
							dataType: 'json',
							global: false,
							success: function (data) {
								if (data.length > 0) {
									var valuemin = 100 / data.length;
									valuemin = valuemin.toFixed(2);
									update_execute(data, 0, data.length, valuemin);
									$('#submit_div').hide();
									$('#load_div').show();
								} else {
									$('#load_message').empty().append('{%pack:setup_pack-espcms_lable_setup_download_err2%}');
								}
							}
						});
					});

					function update_execute(softdata, limit_num, pack_num, valuemin) {
						if (limit_num >= pack_num) {
							$('#load_message').empty().append('{%pack:setup_pack-espcms_lable_setup_download_ok%}');
							window.setInterval(redirection, 1600);
							return false;
						}
						$.ajax({
							type: "post", url: "{%$link.download_zip%}",
							dataType: 'json',
							data: {uid: softdata[limit_num]['uid']}, global: false,
							success: function (data) {
								if (data.code == 'true') {
									limit_num = limit_num + 1;
									var valuenow = Math.round(valuemin * limit_num);
									$('#progress_bar').attr('aria-valuenow', valuenow);
									$('#progress_bar').css('width', valuenow + '%');
									$('#progress_bar').empty().append(valuenow + '%');
									update_execute(softdata, limit_num, pack_num, valuemin);
								} else {
									$('#load_message').empty().append(data.message);
								}

							}
						});
					}
					function redirection() {
						location.href = "{%$link.installdb%}";
					}
				</script>
				{%/if%}
				{%if $path=='installdb'%}
				<div class="espcms_setup_right">
					<form class="form-horizontal admin-form" id="espcms_saveInfo" action="{%$link.setupok%}">
						<div class="panel panel-info">
							<div class="panel-heading setup_title">{%pack:setup_pack-espcms_lable_setup_view_installdb%}</div>
							<div class="panel-body">
								<div class="panel-body text-center mb10 mt15 f24" id="load_message">{%pack:setup_pack-espcms_lable_install_db1%}</div>
								<div class="col-md-12" id="load_div">
									<div class="progress" id="progress">
										<div class="progress-bar progress-bar-danger" id="progress_bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
									</div>
								</div>
							</div>
							<ul class="list-group">
								<li class="list-group-item setup_botton">
									<div class="setup_b_l"><a class="btn btn-babyblue" id="goback_button" href="{%$link.download%}">{%pack:setup_pack-espcms_setup_button_goback%}</a></div>
								</li>
							</ul>
						</div>
					</form>
				</div>
				<script type="text/javascript">
					$(document).ready(function () {
						$("#goback_button").attr('disabled', 'disabled');
						var href = $("#goback_button").attr('href');
						$("#goback_button").removeAttr('href');
						$("#goback_button").attr('data-href', href);

						var setup_db_file = {%$setup_db_file%};

						var valuemin = 100 / setup_db_file.length;
						valuemin = valuemin.toFixed(2);

						update_execute(setup_db_file, 0, setup_db_file.length, valuemin);
						return false;
					});

					function update_execute(softdata, limit_num, pack_num, valuemin) {
						if (limit_num >= pack_num) {
							$('#load_message').empty().append('{%pack:setup_pack-espcms_lable_install_ok%}');
							window.setInterval(redirection, 1600);
							return false;
						}
						softdata[limit_num]['limit_num'] = limit_num + 1;
						softdata[limit_num]['pack_num'] = pack_num;
						$.ajax({
							type: "post", url: "{%$link.setupdb%}",
							dataType: 'json',
							data: softdata[limit_num], global: false,
							success: function (data) {
								$('#load_message').empty().append(softdata[limit_num]['db_name']);
								if (data.code == 'true') {
									limit_num = limit_num + 1;
									var valuenow = Math.round(valuemin * limit_num);
									$('#progress_bar').attr('aria-valuenow', valuenow);
									$('#progress_bar').css('width', valuenow + '%');
									$('#progress_bar').empty().append(valuenow + '%');
									update_execute(softdata, limit_num, pack_num, valuemin);
								} else {
									$('#load_message').empty().append(data.message);
								}
							}
						});
					}

					function redirection() {
						location.href = "{%$link.setup_ok%}";
					}
				</script>
				{%/if%}
				{%if $path=='setupok'%}
				<div class="espcms_setup_right">
					<div class="panel panel-info">
						<div class="panel-heading setup_title">{%pack:setup_pack-espcms_lable_setup_view_setupok%}</div>
						<div class="panel-body">
							<div class="panel-body text-center mb10 mt15 f24" id="load_message">{%pack:setup_pack-espcms_lable_setup_ok%}</div>
							<div class="col-md-12 text-center pt20 pb40" id="load_div">
								<a class="btn btn-lg btn-babyblue" href="{%$rootdir%}">{%pack:setup_pack-espcms_lable_setup_button_home%}</a>
								<a class="btn btn-lg btn-orange ml10" href="{%$rootdir%}espcms_admin/">{%pack:setup_pack-espcms_lable_setup_button_admin%}</a>
							</div>
						</div>
					</div>
				</div>
				{%/if%}
			</div>
			<div class="espcms_setup_footer kill_copy">
				{%pack:setup_pack-espcms_lable_setup_footer%}
			</div>
		</div>
	</body>
</html>