Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwsswl
OneManager-php
提交
bdfee2c8
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 搜索 >>
提交
bdfee2c8
编写于
8月 26, 2021
作者:
R
root
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix error in wait function
上级
b6860e37
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
30 addition
and
20 deletion
+30
-20
common.php
common.php
+4
-5
disk/Aliyundrive.php
disk/Aliyundrive.php
+3
-3
disk/Onedrive.php
disk/Onedrive.php
+3
-3
platform/Heroku.php
platform/Heroku.php
+3
-2
platform/Vercel.php
platform/Vercel.php
+9
-4
platform/Vercel_env.php
platform/Vercel_env.php
+8
-3
未找到文件。
common.php
浏览文件 @
bdfee2c8
...
...
@@ -837,7 +837,7 @@ function message($message, $title = 'Message', $statusCode = 200, $wainstat = 0)
x += ".";
min++;
var xhr = new XMLHttpRequest();
var url = "?WaitFunction
" + (status!=""?"=" + status:"
");
var url = "?WaitFunction
=" + (status!=""?status:"1
");
xhr.open("GET", url);
//xhr.setRequestHeader("Authorization", "Bearer ");
xhr.onload = function(e) {
...
...
@@ -862,7 +862,6 @@ function message($message, $title = 'Message', $statusCode = 200, $wainstat = 0)
xhr.send(null);
}
getStatus();
//setTimeout(function() { getStatus() }, 3000);
</script>'
;
}
else
{
$html
.
=
'
...
...
@@ -1167,7 +1166,7 @@ function EnvOpt($needUpdate = 0)
return
message
(
$html
,
$title
,
400
);
}
else
{
//WaitSCFStat();
$html
.
=
getconstStr
(
'UpdateSuccess'
)
.
'<br><a href="">'
.
getconstStr
(
'Back'
)
.
'</a><script>var status = "'
.
$response
[
'
s
tatus'
]
.
'";</script>'
;
$html
.
=
getconstStr
(
'UpdateSuccess'
)
.
'<br><a href="">'
.
getconstStr
(
'Back'
)
.
'</a><script>var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";</script>'
;
$title
=
getconstStr
(
'Setup'
);
return
message
(
$html
,
$title
,
202
,
1
);
}
...
...
@@ -1217,7 +1216,7 @@ function EnvOpt($needUpdate = 0)
$html
.
=
getconstStr
(
'Success'
)
.
'!<br>
<a href="">'
.
getconstStr
(
'Back'
)
.
'</a>
<script>
var status = "'
.
$response
[
'
s
tatus'
]
.
'";
var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";
</script>'
;
$title
=
getconstStr
(
'Setup'
);
return
message
(
$html
,
$title
,
200
,
1
);
...
...
@@ -1293,7 +1292,7 @@ function EnvOpt($needUpdate = 0)
if
(
api_error
(
$response
))
{
return
message
(
api_error_msg
(
$response
)
.
"<a href=
\"\"
>"
.
getconstStr
(
'Back'
)
.
"</a>"
,
"Error"
,
403
);
}
else
{
return
message
(
"Success<a href=
\"\"
>"
.
getconstStr
(
'Back'
)
.
"</a><script>var status =
\"
"
.
$response
[
'
s
tatus'
]
.
"
\"
;</script>"
,
"Success"
,
200
,
1
);
return
message
(
"Success<a href=
\"\"
>"
.
getconstStr
(
'Back'
)
.
"</a><script>var status =
\"
"
.
$response
[
'
DplS
tatus'
]
.
"
\"
;</script>"
,
"Success"
,
200
,
1
);
}
}
else
{
return
message
(
"Old pass error<a href=
\"\"
>"
.
getconstStr
(
'Back'
)
.
"</a>"
,
"Error"
,
403
);
...
...
disk/Aliyundrive.php
浏览文件 @
bdfee2c8
...
...
@@ -631,7 +631,7 @@ class Aliyundrive {
}
else
{
$str
.
=
'
<script>
var status = "'
.
$response
[
'
s
tatus'
]
.
'";
var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";
var uploadList = setInterval(function(){
if (document.getElementById("dis").style.display=="none") {
console.log(min++);
...
...
@@ -702,7 +702,7 @@ class Aliyundrive {
</form>
</div>
<script>
var status = "'
.
$response
[
'
s
tatus'
]
.
'";
var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";
function notnull(t)
{
if (t.driveId.value==\'\') {
...
...
@@ -768,7 +768,7 @@ class Aliyundrive {
}
return true;
}
var status = "'
.
$response
[
'
s
tatus'
]
.
'";
var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";
</script>
'
;
return
message
(
$html
,
$title
,
201
,
1
);
...
...
disk/Onedrive.php
浏览文件 @
bdfee2c8
...
...
@@ -510,7 +510,7 @@ class Onedrive {
var expires = "expires="+expd.toGMTString();
document.cookie=\'disktag=; path=/; \'+expires;
var i = 0;
var status = "'
.
$response
[
'
s
tatus'
]
.
'";
var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";
var uploadList = setInterval(function(){
if (document.getElementById("dis").style.display=="none") {
console.log(i++);
...
...
@@ -618,7 +618,7 @@ class Onedrive {
savecache
(
'access_token'
,
$ret
[
'access_token'
],
$this
->
disktag
,
$ret
[
'expires_in'
]
-
60
);
$html
.
=
'<script>
var i = 0;
var status = "'
.
$response
[
'
s
tatus'
]
.
'";
var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";
var uploadList = setInterval(function(){
if (document.getElementById("dis").style.display=="none") {
console.log(i++);
...
...
@@ -699,7 +699,7 @@ class Onedrive {
if
(
$_POST
[
'Drive_ver'
]
!=
'Sharelink'
)
$url
.
=
'?install1&disktag='
.
$_GET
[
'disktag'
]
.
'&AddDisk='
.
$_POST
[
'Drive_ver'
];
$html
.
=
'<script>
var i = 0;
var status = "'
.
$response
[
'
s
tatus'
]
.
'";
var status = "'
.
$response
[
'
DplS
tatus'
]
.
'";
var uploadList = setInterval(function(){
if (document.getElementById("dis").style.display=="none") {
console.log(i++);
...
...
platform/Heroku.php
浏览文件 @
bdfee2c8
...
...
@@ -315,7 +315,7 @@ function updateHerokuapp($HerokuappId, $apikey, $source)
$data
=
json_encode
(
$tmp
);
$response
=
HerokuAPI
(
'POST'
,
'https://api.heroku.com/apps/'
.
$HerokuappId
.
'/builds'
,
$data
,
$apikey
);
$result
=
json_decode
(
$response
[
'body'
],
true
);
$result
[
'
s
tatus'
]
=
$result
[
'id'
];
$result
[
'
DplS
tatus'
]
=
$result
[
'id'
];
$response
[
'body'
]
=
json_encode
(
$result
);
return
$response
;
}
...
...
@@ -345,8 +345,9 @@ function setConfigResponse($response)
return
json_decode
(
$response
[
'body'
],
true
);
}
function
WaitFunction
(
$buildId
)
{
function
WaitFunction
(
$buildId
=
''
)
{
// GET /apps/{app_id_or_name}/builds/{build_id}
if
(
$buildId
==
'1'
)
return
true
;
$response
=
HerokuAPI
(
'GET'
,
'https://api.heroku.com/apps/'
.
getConfig
(
'HerokuappId'
)
.
'/builds/'
.
$buildId
,
''
,
getConfig
(
'APIKey'
));
if
(
$response
[
'stat'
]
==
200
)
{
$result
=
json_decode
(
$response
[
'body'
],
true
);
...
...
platform/Vercel.php
浏览文件 @
bdfee2c8
...
...
@@ -187,14 +187,14 @@ function install()
return
message
(
$html
,
$title
,
400
);
}
else
{
/*$html = '<script>
var status = "' . $response['
s
tatus'] . '";
var status = "' . $response['
DplS
tatus'] . '";
var expd = new Date();
expd.setTime(expd.getTime()+1000);
var expires = "expires="+expd.toGMTString();
document.cookie=\'language=; path=/; \'+expires;
</script>';
return message($html, $title, 201, 1);*/
$data
[
"dplId"
]
=
$response
[
'
s
tatus'
];
$data
[
"dplId"
]
=
$response
[
'
DplS
tatus'
];
return
output
(
json_encode
(
$data
),
201
);
}
}
...
...
@@ -362,7 +362,7 @@ function VercelUpdate($appId, $token, $sourcePath = "")
$response
=
curl
(
"POST"
,
$url
,
json_encode
(
$data
),
$header
);
//echo json_encode($response, JSON_PRETTY_PRINT) . " ,res<br>";
$result
=
json_decode
(
$response
[
"body"
],
true
);
$result
[
'
s
tatus'
]
=
$result
[
'id'
];
$result
[
'
DplS
tatus'
]
=
$result
[
'id'
];
return
json_encode
(
$result
);
}
...
...
@@ -444,7 +444,12 @@ function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch =
return
VercelUpdate
(
getConfig
(
'HerokuappId'
),
getConfig
(
'APIKey'
),
$outPath
);
}
function
WaitFunction
(
$deployid
)
{
function
WaitFunction
(
$deployid
=
''
)
{
if
(
$buildId
==
'1'
)
{
$tmp
[
'stat'
]
=
400
;
$tmp
[
'body'
]
=
'id must provided.'
;
return
$tmp
;
}
$header
[
"Authorization"
]
=
"Bearer "
.
getConfig
(
'APIKey'
);
$header
[
"Content-Type"
]
=
"application/json"
;
$url
=
"https://api.vercel.com/v11/now/deployments/"
.
$deployid
;
...
...
platform/Vercel_env.php
浏览文件 @
bdfee2c8
...
...
@@ -185,14 +185,14 @@ function install()
return
message
(
$html
,
$title
,
400
);
}
else
{
/*$html = '<script>
var status = "' . $response['
s
tatus'] . '";
var status = "' . $response['
DplS
tatus'] . '";
var expd = new Date();
expd.setTime(expd.getTime()+1000);
var expires = "expires="+expd.toGMTString();
document.cookie=\'language=; path=/; \'+expires;
</script>';
return message($html, $title, 201, 1);*/
$data
[
"dplId"
]
=
$response
[
'
s
tatus'
];
$data
[
"dplId"
]
=
$response
[
'
DplS
tatus'
];
return
output
(
json_encode
(
$data
),
201
);
}
}
...
...
@@ -353,7 +353,7 @@ function VercelUpdate($appId, $token, $sourcePath = "")
$response
=
curl
(
"POST"
,
$url
,
json_encode
(
$data
),
$header
);
//echo json_encode($response, JSON_PRETTY_PRINT) . " ,res<br>";
$result
=
json_decode
(
$response
[
"body"
],
true
);
$result
[
'
s
tatus'
]
=
$result
[
'id'
];
$result
[
'
DplS
tatus'
]
=
$result
[
'id'
];
return
json_encode
(
$result
);
}
...
...
@@ -431,6 +431,11 @@ function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch =
}
function
WaitFunction
(
$deployid
)
{
if
(
$buildId
==
'1'
)
{
$tmp
[
'stat'
]
=
400
;
$tmp
[
'body'
]
=
'id must provided.'
;
return
$tmp
;
}
$header
[
"Authorization"
]
=
"Bearer "
.
getConfig
(
'APIKey'
);
$header
[
"Content-Type"
]
=
"application/json"
;
$url
=
"https://api.vercel.com/v11/now/deployments/"
.
$deployid
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录