初始上传
This commit is contained in:
75
app/install/view/index/step-1.html
Executable file
75
app/install/view/index/step-1.html
Executable file
@@ -0,0 +1,75 @@
|
||||
{extend name="base"/}
|
||||
{block name="main"}
|
||||
<div class="pright layui-form">
|
||||
<h3 class="pr-title">阅读许可协议</h3>
|
||||
<div class="pr-agreement">
|
||||
|
||||
<strong>版权所有 (c)2016,Niushop开源商城团队保留所有权利。</strong>
|
||||
<p>
|
||||
感谢您选择Niushop开源商城(以下简称NiuShop)NiuShop基于 PHP + MySQL的技术开发,全部源码开放。 <br/>
|
||||
为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:
|
||||
</p>
|
||||
<p>
|
||||
<strong>一、本授权协议适用且仅适用于Niushop开源商城系统(以下简称Niushop)任何版本,Niushop开源商城官方对本授权协议的最终解释权。</strong>
|
||||
</p>
|
||||
<p>
|
||||
<strong>二、协议许可的权利 </strong>
|
||||
<ol>
|
||||
<li>非授权用户允许商用,严禁去除Niushop相关的版权信息。</li>
|
||||
<li>请尊重Niushop开发人员劳动成果,严禁使用本系统转卖、销售或二次开发后转卖、销售等商业行为。</li>
|
||||
<li>任何企业和个人不允许对程序代码以任何形式任何目的再发布。</li>
|
||||
<li>您可以在协议规定的约束和限制范围内修改Niushop开源商城源代码或界面风格以适应您的网站要求。</li>
|
||||
<li>您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。</li>
|
||||
<li>
|
||||
获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。
|
||||
</li>
|
||||
</ol>
|
||||
</p>
|
||||
<p>
|
||||
<strong>三、协议规定的约束和限制 </strong>
|
||||
<ol>
|
||||
<li>未获商业授权之前,允许您对Niushop应用于商业用途,但严禁去除Niushop任何相关的版权信息。</li>
|
||||
<li>未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。</li>
|
||||
<li>未经官方许可,禁止在Niushop开源商城的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。</li>
|
||||
<li>如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。</li>
|
||||
</ol>
|
||||
</p>
|
||||
<p>
|
||||
<strong>四、有限担保和免责声明 </strong>
|
||||
<ol>
|
||||
<li>本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。</li>
|
||||
<li>用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。</li>
|
||||
<li>电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装
|
||||
Niushop,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。
|
||||
</li>
|
||||
<li>如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</li>
|
||||
</ol>
|
||||
</p>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<div class="btn-box-text">
|
||||
<div class="layui-form-item">
|
||||
<input type="checkbox" name="readpact" id="readpact" title="我已经阅读并同意此协议" value="1" lay-skin="primary">
|
||||
</div>
|
||||
</div>
|
||||
<button class="layui-btn" lay-submit lay-filter="go">继续</button>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
layui.use('form', function () {
|
||||
var form = layui.form;
|
||||
|
||||
form.on('submit(go)', function (data) {
|
||||
var readpact = data.field.readpact;
|
||||
if (readpact == 1) {
|
||||
window.location.href = '{$root_url}/install.php/index/index?step=2';
|
||||
} else {
|
||||
error('您必须同意软件许可协议才能安装!');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
89
app/install/view/index/step-2.html
Executable file
89
app/install/view/index/step-2.html
Executable file
@@ -0,0 +1,89 @@
|
||||
{extend name="base"/}
|
||||
{block name="main"}
|
||||
<div class="testing">
|
||||
<div class="testing-item">
|
||||
<h3>服务器信息</h3>
|
||||
<table border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
|
||||
<tr>
|
||||
<th width="30%" align="center"><strong>参数</strong></th>
|
||||
<th width="70%"><strong>值</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>服务器域名</strong></td>
|
||||
<td>{$name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>服务器操作系统</strong></td>
|
||||
<td>{$os}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>服务器解译引擎</strong></td>
|
||||
<td>{$server}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>PHP版本</strong></td>
|
||||
<td>{$phpv}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>系统安装目录</strong></td>
|
||||
<td>{$root_path}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="testing-item">
|
||||
<h3>系统环境检测<span class="desc">系统环境要求必须满足下列所有条件,否则系统或系统部份功能将无法使用。</span></h3>
|
||||
<table border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
|
||||
<tr>
|
||||
<th width="30%" align="center"><strong>需开启的变量或函数</strong></th>
|
||||
<th width="35%"><strong>要求</strong></th>
|
||||
<th width="35%"><strong>实际状态及建议</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>php版本</td>
|
||||
<td style="color:#ff8143;">php7.4.0及以上 </td>
|
||||
<td><font color={if $verison}#ff8143{else/}red{/if}>{$phpv}</font> </td>
|
||||
</tr>
|
||||
{foreach $system_variables as $variables_key => $variables_item}
|
||||
<tr>
|
||||
<td>{$variables_item.name}</td>
|
||||
<td>{$variables_item.need}</td>
|
||||
<td><img clsss="check-icon" src="{if $variables_item.status}INSTALL_IMG/success.png{else/}INSTALL_IMG/error.png{/if}"/></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="testing-item">
|
||||
<h3>目录权限检测<span class="desc">系统要求必须满足下列所有的目录权限全部可读写的需求才能使用,其它应用目录可安装后在管理后台检测。</span></h3>
|
||||
<table border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
|
||||
<tr>
|
||||
<th width="30%" align="center"><strong>目录名</strong></th>
|
||||
<th width="35%"><strong>读取权限</strong></th>
|
||||
<th width="35%"><strong>写入权限</strong></th>
|
||||
</tr>
|
||||
{foreach $dirs_list as $dirs_key => $dirs_item}
|
||||
<tr>
|
||||
<td>{$dirs_item.path_name}</td>
|
||||
<td>
|
||||
<img clsss="check-icon" src="{if $dirs_item.is_readable}INSTALL_IMG/success.png{else/}INSTALL_IMG/error.png{/if}"/>
|
||||
</td>
|
||||
<td>
|
||||
<img clsss="check-icon" src="{if $dirs_item.is_write}INSTALL_IMG/success.png{else/}INSTALL_IMG/error.png{/if}"/>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn-box">
|
||||
<input type="button" class="btn-back" value="后退" onclick="window.location.href = '{$root_url}/install.php/index/index?step=1';" />
|
||||
<input type="button" class="btn-next" value="继续" {if !$continue} style="background-color:#777;color:#FFF;" disabled="disabled"{/if} onclick="window.location.href = '{$root_url}/install.php/index/index?step=3';" />
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
ControlContent(1);
|
||||
</script>
|
||||
{/block}
|
||||
244
app/install/view/index/step-3.html
Executable file
244
app/install/view/index/step-3.html
Executable file
@@ -0,0 +1,244 @@
|
||||
{extend name="base"/}
|
||||
{block name="resources"}
|
||||
<style>
|
||||
.install-content-procedure .content-procedure-item:first-of-type{
|
||||
background: url("INSTALL_IMG/complete_two.png") no-repeat center / contain;
|
||||
color: #fff;
|
||||
}
|
||||
.install-content-procedure .content-procedure-item:nth-child(2){
|
||||
background: url("INSTALL_IMG/complete_four.png") no-repeat center / contain;
|
||||
color: #fff;
|
||||
}
|
||||
.install-content-procedure .content-procedure-item:nth-child(3){
|
||||
background: url("INSTALL_IMG/conduct.png") no-repeat center / contain;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div id='postloader' class='waitpage'></div>
|
||||
<form class="layui-form" >
|
||||
<div class="testing parameter">
|
||||
<div class="testing-item">
|
||||
<h3>数据库设定</h3>
|
||||
<table border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span>数据库主机:</td>
|
||||
<td>
|
||||
<input name="dbhost" id="dbhost" type="text" lay-verify="empty" placeholder="请输入数据库主机" value="" class="input-txt" onChange="testDb()" />
|
||||
<small>一般为localhost</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span>Mysql端口:</td>
|
||||
<td>
|
||||
<input name="dbport" id="dbport" type="text" value="3306" class="input-txt" lay-verify="empty" placeholder="请输入Mysql端口"/>
|
||||
<small>一般为3306</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span>数据库用户:</td>
|
||||
<td>
|
||||
<input name="dbuser" id="dbuser" type="text" value="" class="input-txt" onChange="testDb()" lay-verify="empty" placeholder="请输入数据库用户"/>
|
||||
<small>默认root</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span>数据库密码:</td>
|
||||
<td>
|
||||
<div style='float:left;margin-right:3px;'>
|
||||
<input name="dbpwd" id="dbpwd" type="text" class="input-txt" onChange="testDb()" lay-verify="empty" placeholder="请输入数据库密码" />
|
||||
</div>
|
||||
<div style='float:left' class="mysql-message" id='dbpwdsta'></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span>数据库名称:</td>
|
||||
<td>
|
||||
<div style='float:left;margin-right:3px;'><input name="dbname" id="dbname" type="text" value="" class="input-txt" onChange="haveDB()" lay-verify="empty" placeholder="请输入数据库名称" /></div>
|
||||
<div style='float:left' class="mysql-message" id='havedbsta'></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd">数据表前缀:</td>
|
||||
<td>
|
||||
<div style='float:left;margin-right:3px;'><input name="dbprefix" id="dbprefix" type="text" value="" class="input-txt" placeholder="请输入数据表前缀"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="onetd">数据库编码:</td>
|
||||
<td>
|
||||
<label class="install-code">UTF8</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="testing-item">
|
||||
<h3>网站设定</h3>
|
||||
<table border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span><strong>网站标题:</strong></td>
|
||||
<td><input name="site_name" id="site_name" type="text" value="" class="input-txt" lay-verify="empty" placeholder="请输入网站标题"/>
|
||||
<small id="mess_site_name">网站标题 必填</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span><strong>管理员用户名:</strong></td>
|
||||
<td><input name="username" id="username" type="text" value="" class="input-txt" lay-verify="empty" placeholder="请输入平台用户名"/>
|
||||
<small id="mess_username">管理员用户名 必填</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span><strong>管理员密码:</strong></td>
|
||||
<td><input name="password" id="password" type="password" value="" class="input-txt" lay-verify="empty" placeholder="请输入平台密码"/>
|
||||
<small id="mess_password">密码 必填</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><span class="required">*</span><strong>确认密码:</strong></td>
|
||||
<td><input name="password2" id="password2" type="password" value="" class="input-txt" lay-verify="empty" placeholder="请输入平台确认密码"/>
|
||||
<small id="mess_password2">确认密码 必填</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="onetd"><strong>演示数据:</strong></td>
|
||||
<td><input type="checkbox" name="yanshi" id="yanshi" title="" value="1" lay-skin="primary">
|
||||
<small id="mess_yanshi" style="margin-left: 0;">勾选后将添加演示数据</small></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn-box"></div>
|
||||
|
||||
<div class="btn-box">
|
||||
<input type="button" class="btn-back" value="后退" onclick="window.location.href='{$root_url}/install.php/index/index?step=2'" />
|
||||
<input type="button" class="btn-next" lay-submit lay-filter="install" value="开始安装" id="form_submit">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name='script'}
|
||||
<script language="javascript" type="text/javascript">
|
||||
ControlContent(2);
|
||||
var is_existdb = 1;//数据库是否存在
|
||||
var message = '数据库账号或密码不能为空';
|
||||
var is_install = false;
|
||||
function inputBoxPointer(id){
|
||||
return document.getElementById(id);
|
||||
}
|
||||
layui.use('form', function(){
|
||||
var form = layui.form;
|
||||
form.verify({
|
||||
empty: function(value, item){
|
||||
if(value == ''){
|
||||
var msg = $(item).attr("placeholder");
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
form.on('submit(install)', function(data){
|
||||
if(is_existdb == 2){
|
||||
layer.confirm('数据库存在,系统将覆盖数据库!', {
|
||||
btn: ['继续','取消'] //按钮
|
||||
}, function(){
|
||||
layer.closeAll(); //疯狂模式,关闭所有层
|
||||
install(data.field);
|
||||
|
||||
}, function(){
|
||||
layer.closeAll(); //疯狂模式,关闭所有层
|
||||
return false;
|
||||
});
|
||||
}else{
|
||||
install(data.field);
|
||||
}
|
||||
|
||||
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
||||
});
|
||||
|
||||
function install(data){
|
||||
|
||||
if(is_install){
|
||||
return false;
|
||||
}
|
||||
document.getElementById('form_submit').disabled= true;
|
||||
$("#form_submit").val("正在安装...");
|
||||
$("#form_submit").addClass("installimg-btn");
|
||||
var index = layer.load(2);
|
||||
is_install = true;
|
||||
|
||||
$.ajax({
|
||||
url: "{$root_url}/install.php/index/index?step=4",
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
type: 'post',
|
||||
success : function(data) {
|
||||
layer.close(index);
|
||||
if(data.code < 0){
|
||||
error(data.message);
|
||||
is_install = false;
|
||||
document.getElementById('form_submit').disabled= false;
|
||||
$("#form_submit").val("开始安装");
|
||||
$("#form_submit").removeClass("installimg-btn");
|
||||
}else{
|
||||
window.location.href = '{$root_url}/install.php/index/installSuccess';
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
//数据库连接测试
|
||||
function testDb()
|
||||
{
|
||||
var dbhost = inputBoxPointer('dbhost').value;
|
||||
var dbuser = inputBoxPointer('dbuser').value;
|
||||
var dbpwd = inputBoxPointer('dbpwd').value;
|
||||
var dbport = inputBoxPointer('dbport').value;
|
||||
inputBoxPointer('dbpwdsta').innerHTML='<img src="INSTALL_IMG/ajax-loader.gif">';
|
||||
|
||||
$.ajax({ //post也可
|
||||
url: '{$root_url}/install.php/index/testdb',
|
||||
data: { dbhost: dbhost, dbport : dbport, dbuser:dbuser, dbpwd:dbpwd},
|
||||
type: "post",
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code >= 0){
|
||||
inputBoxPointer('dbpwdsta').innerHTML = data.data.message;
|
||||
is_existdb = data.data.status;
|
||||
message = data.data.message;
|
||||
}else{
|
||||
is_existdb = -1;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*验证数据库是否存在
|
||||
*/
|
||||
function haveDB()
|
||||
{
|
||||
var dbhost = inputBoxPointer('dbhost').value;
|
||||
var dbname = inputBoxPointer('dbname').value;
|
||||
var dbuser = inputBoxPointer('dbuser').value;
|
||||
var dbpwd = inputBoxPointer('dbpwd').value;
|
||||
var dbport = inputBoxPointer('dbport').value;
|
||||
inputBoxPointer('havedbsta').innerHTML='<img src="INSTALL_IMG/ajax-loader.gif">';
|
||||
|
||||
$.ajax({ //post也可
|
||||
url: '{$root_url}/install.php/index/testdb',
|
||||
data: { dbhost: dbhost, dbport : dbport, dbuser:dbuser, dbpwd:dbpwd,dbname:dbname},
|
||||
type: "post",
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code >= 0){
|
||||
inputBoxPointer('havedbsta').innerHTML = data.data.message;
|
||||
is_existdb = data.data.status;
|
||||
message = data.data.message;
|
||||
}else{
|
||||
is_existdb = -1;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
57
app/install/view/index/step-4.html
Executable file
57
app/install/view/index/step-4.html
Executable file
@@ -0,0 +1,57 @@
|
||||
{extend name="base"/}
|
||||
{block name="resources"}
|
||||
<style>
|
||||
.install-content-procedure .content-procedure-item:first-of-type{
|
||||
background: url("INSTALL_IMG/complete_two.png") no-repeat center / contain;
|
||||
color: #fff;
|
||||
}
|
||||
.install-content-procedure .content-procedure-item:nth-child(2), .install-content-procedure .content-procedure-item:nth-child(3){
|
||||
background: url("INSTALL_IMG/complete_four.png") no-repeat center / contain;
|
||||
color: #fff;
|
||||
}
|
||||
.install-content-procedure .content-procedure-item:nth-child(4){
|
||||
background: url("INSTALL_IMG/complete_three.png") no-repeat center / contain;
|
||||
color: #fff;
|
||||
}
|
||||
.install-content-procedure{border: none;}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div class="install-success">
|
||||
<div class="install-success-box">
|
||||
<img class="install-success-pic" src="INSTALL_IMG/install_complete.png" alt="">
|
||||
<div class="install-success-text">
|
||||
<p class="install-success-title">恭喜您!已成功安装单商户V5版系统。</p>
|
||||
<p class="install-success-desc">建议删除安装目录install后使用</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="other-links">
|
||||
<p class="other-links-title">您现在可以访问:</p>
|
||||
<ul class="other-links-list">
|
||||
<li class="other-links-item">
|
||||
<div class="other-links-pic">
|
||||
<img src="INSTALL_IMG/site_index.png" alt="">
|
||||
</div>
|
||||
<a href="{$root_url}/shop" class="other-links-text" target="_blank">网站后台</a>
|
||||
</li>
|
||||
<li class="other-links-item">
|
||||
<div class="other-links-pic">
|
||||
<img src="INSTALL_IMG/official_website.png" alt="">
|
||||
</div>
|
||||
<a href="http://www.niushop.com" class="other-links-text" target="_blank">NIUSHOP官方网站</a>
|
||||
</li>
|
||||
<li class="other-links-item">
|
||||
<div class="other-links-pic">
|
||||
<img src="INSTALL_IMG/forum.png" alt="">
|
||||
</div>
|
||||
<a href="http://bbs.niushop.com" class="other-links-text" target="_blank">NIUSHOP官方论坛</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
ControlContent(3);
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user