Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwsswl
OneManager-php
提交
dd54c94d
O
OneManager-php
项目概览
lwsswl
/
OneManager-php
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OneManager-php
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
dd54c94d
编写于
3月 22, 2020
作者:
Q
qkqpttgf
提交者:
GitHub
3月 22, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change install in vps
上级
1c786429
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
49 addition
and
14 deletion
+49
-14
function/normal.php
function/normal.php
+49
-14
未找到文件。
function/normal.php
浏览文件 @
dd54c94d
...
...
@@ -115,7 +115,7 @@ function setConfig($arr, $disktag = '')
function
install
()
{
global
$constStr
;
if
(
$_GET
[
'install
1
'
])
{
if
(
$_GET
[
'install
2
'
])
{
if
(
$_POST
[
'admin'
]
!=
''
)
{
$tmp
[
'admin'
]
=
$_POST
[
'admin'
];
$tmp
[
'language'
]
=
$_POST
[
'language'
];
...
...
@@ -129,27 +129,70 @@ function install()
}
}
}
if
(
$_GET
[
'install
0
'
])
{
if
(
$_GET
[
'install
1
'
])
{
if
(
!
ConfigWriteable
())
{
$html
.
=
getconstStr
(
'MakesuerWriteable'
);
$title
=
'Error'
;
return
message
(
$html
,
$title
,
201
);
}
if
(
!
RewriteEngineOn
())
{
/*
if (!RewriteEngineOn()) {
$html .= getconstStr('MakesuerRewriteOn');
$title = 'Error';
return message($html, $title, 201);
}*/
$html
.
=
'<button id="checkrewritebtn" onclick="checkrewrite();">'
.
getconstStr
(
'MakesuerRewriteOn'
)
.
'</button>
<div id="formdiv" style="display: none">
<form action="?install2" method="post" onsubmit="return notnull(this);">
<input name="admin" type="password" placeholder="'
.
getconstStr
(
'EnvironmentsDescription'
)[
'admin'
]
.
'" size="'
.
strlen
(
getconstStr
(
'EnvironmentsDescription'
)[
'admin'
])
.
'"><br>
<input id="submitbtn" type="submit" value="'
.
getconstStr
(
'Submit'
)
.
'" disabled>
</form>
</div>
<script>
function notnull(t)
{
if (t.admin.value==\'\') {
alert(\''
.
getconstStr
(
'SetAdminPassword'
)
.
'\');
return false;
}
return true;
}
function checkrewrite()
{
url=location.protocol + "//" + location.host;
if (location.port!="") url += ":" + location.port;
url += location.pathname;
if (url.substr(-1)!="/") url += "/";
url += "config.php";
//alert(url);
var xhr4 = new XMLHttpRequest();
xhr4.open("GET", url);
xhr4.setRequestHeader("x-requested-with","XMLHttpRequest");
xhr4.send(null);
xhr4.onload = function(e){
console.log(xhr4.responseText+","+xhr4.status);
//filename = JSON.parse(xhr4.responseText);
if (xhr4.status==201) {
document.getElementById("checkrewritebtn").style.display = "none";
document.getElementById("submitbtn").disabled = false;
document.getElementById("formdiv").style.display = "";
} else {
alert(xhr4.status);
}
}
}
</script>'
;
$title
=
getconstStr
(
'SetAdminPassword'
);
return
message
(
$html
,
$title
,
201
);
}
if
(
$_GET
[
'install0'
])
{
$html
.
=
'
<form action="?install1" method="post"
onsubmit="return notnull(this);"
>
<form action="?install1" method="post">
language:<br>'
;
foreach
(
$constStr
[
'languages'
]
as
$key1
=>
$value1
)
{
$html
.
=
'
<label><input type="radio" name="language" value="'
.
$key1
.
'" '
.
(
$key1
==
$constStr
[
'language'
]
?
'checked'
:
''
)
.
' onclick="changelanguage(\''
.
$key1
.
'\')">'
.
$value1
.
'</label><br>'
;
}
$html
.
=
'
<label>Set admin password:<input name="admin" type="password" placeholder="'
.
getconstStr
(
'EnvironmentsDescription'
)[
'admin'
]
.
'" size="'
.
strlen
(
getconstStr
(
'EnvironmentsDescription'
)[
'admin'
])
.
'"></label><br>'
;
$html
.
=
'
<input type="submit" value="'
.
getconstStr
(
'Submit'
)
.
'">
</form>
<script>
...
...
@@ -158,14 +201,6 @@ language:<br>';
document.cookie=\'language=\'+str+\'; path=/\';
location.href = location.href;
}
function notnull(t)
{
if (t.admin.value==\'\') {
alert(\'input admin\');
return false;
}
return true;
}
</script>'
;
$title
=
getconstStr
(
'SelectLanguage'
);
return
message
(
$html
,
$title
,
201
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录