Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwsswl
OneManager-php
提交
9cc257f7
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 搜索 >>
未验证
提交
9cc257f7
编写于
2月 02, 2020
作者:
Q
qkqpttgf
提交者:
GitHub
2月 02, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refresh token expires in 90 day
上级
db569853
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
41 addition
and
44 deletion
+41
-44
function/common.php
function/common.php
+17
-16
function/heroku.php
function/heroku.php
+1
-1
function/normal.php
function/normal.php
+1
-1
function/scf.php
function/scf.php
+2
-1
theme/classic.php
theme/classic.php
+20
-25
未找到文件。
function/common.php
浏览文件 @
9cc257f7
...
@@ -17,9 +17,6 @@ function savecache($key, $value, $exp = 3300)
...
@@ -17,9 +17,6 @@ function savecache($key, $value, $exp = 3300)
function
getconstStr
(
$str
)
function
getconstStr
(
$str
)
{
{
global
$constStr
;
global
$constStr
;
$constStr
[
'language'
]
=
$_COOKIE
[
'language'
];
if
(
$constStr
[
'language'
]
==
''
)
$constStr
[
'language'
]
=
getConfig
(
'language'
);
if
(
$constStr
[
'language'
]
==
''
)
$constStr
[
'language'
]
=
'en-us'
;
if
(
$constStr
[
$str
][
$constStr
[
'language'
]]
!=
''
)
return
$constStr
[
$str
][
$constStr
[
'language'
]];
if
(
$constStr
[
$str
][
$constStr
[
'language'
]]
!=
''
)
return
$constStr
[
$str
][
$constStr
[
'language'
]];
return
$constStr
[
$str
][
'en-us'
];
return
$constStr
[
$str
][
'en-us'
];
}
}
...
@@ -353,7 +350,11 @@ function bigfileupload($path)
...
@@ -353,7 +350,11 @@ function bigfileupload($path)
function
main
(
$path
)
function
main
(
$path
)
{
{
global
$exts
;
global
$exts
;
global
$constStr
;
config_oauth
();
config_oauth
();
$constStr
[
'language'
]
=
$_COOKIE
[
'language'
];
if
(
$constStr
[
'language'
]
==
''
)
$constStr
[
'language'
]
=
getConfig
(
'language'
);
if
(
$constStr
[
'language'
]
==
''
)
$constStr
[
'language'
]
=
'en-us'
;
$_SERVER
[
'list_path'
]
=
getListpath
(
$_SERVER
[
'HTTP_HOST'
]);
$_SERVER
[
'list_path'
]
=
getListpath
(
$_SERVER
[
'HTTP_HOST'
]);
if
(
$_SERVER
[
'list_path'
]
==
''
)
$_SERVER
[
'list_path'
]
=
'/'
;
if
(
$_SERVER
[
'list_path'
]
==
''
)
$_SERVER
[
'list_path'
]
=
'/'
;
$_SERVER
[
'is_guestup_path'
]
=
is_guestup_path
(
$path
);
$_SERVER
[
'is_guestup_path'
]
=
is_guestup_path
(
$path
);
...
@@ -364,6 +365,19 @@ function main($path)
...
@@ -364,6 +365,19 @@ function main($path)
$refresh_token
=
getConfig
(
'refresh_token'
);
$refresh_token
=
getConfig
(
'refresh_token'
);
if
(
!
$refresh_token
)
return
get_refresh_token
();
if
(
!
$refresh_token
)
return
get_refresh_token
();
if
(
!
(
$_SERVER
[
'access_token'
]
=
getcache
(
'access_token'
)))
{
$response
=
curl_request
(
$_SERVER
[
'oauth_url'
]
.
'token'
,
'client_id='
.
$_SERVER
[
'client_id'
]
.
'&client_secret='
.
$_SERVER
[
'client_secret'
]
.
'&grant_type=refresh_token&requested_token_use=on_behalf_of&refresh_token='
.
$refresh_token
);
if
(
$response
[
'stat'
]
==
200
)
$ret
=
json_decode
(
$response
[
'body'
],
true
);
if
(
!
isset
(
$ret
[
'access_token'
]))
{
error_log
(
'failed to get access_token. response'
.
json_encode
(
$ret
));
throw
new
Exception
(
$response
[
'stat'
]
.
'failed to get access_token.'
.
$response
[
'body'
]);
}
error_log
(
'Get access token:'
.
json_encode
(
$ret
,
JSON_PRETTY_PRINT
));
$_SERVER
[
'access_token'
]
=
$ret
[
'access_token'
];
savecache
(
'access_token'
,
$_SERVER
[
'access_token'
]);
if
(
time
()
>
getConfig
(
'token_expires'
))
setConfig
([
'refresh_token'
=>
$ret
[
'refresh_token'
],
'token_expires'
=>
time
()
+
30
*
24
*
60
*
60
]);
}
if
(
getConfig
(
'adminloginpage'
)
==
''
)
{
if
(
getConfig
(
'adminloginpage'
)
==
''
)
{
$adminloginpage
=
'admin'
;
$adminloginpage
=
'admin'
;
}
else
{
}
else
{
...
@@ -400,19 +414,6 @@ function main($path)
...
@@ -400,19 +414,6 @@ function main($path)
}
}
$_SERVER
[
'retry'
]
=
0
;
$_SERVER
[
'retry'
]
=
0
;
if
(
!
(
$_SERVER
[
'access_token'
]
=
getcache
(
'access_token'
)))
{
$ret
=
json_decode
(
curl_request
(
$_SERVER
[
'oauth_url'
]
.
'token'
,
'client_id='
.
$_SERVER
[
'client_id'
]
.
'&client_secret='
.
$_SERVER
[
'client_secret'
]
.
'&grant_type=refresh_token&requested_token_use=on_behalf_of&refresh_token='
.
$refresh_token
)[
'body'
],
true
);
if
(
!
isset
(
$ret
[
'access_token'
]))
{
error_log
(
'failed to get access_token. response'
.
json_encode
(
$ret
));
throw
new
Exception
(
'failed to get access_token.'
);
}
$_SERVER
[
'access_token'
]
=
$ret
[
'access_token'
];
savecache
(
'access_token'
,
$_SERVER
[
'access_token'
]);
}
if
(
$_SERVER
[
'ajax'
])
{
if
(
$_SERVER
[
'ajax'
])
{
if
(
$_GET
[
'action'
]
==
'del_upload_cache'
&&
substr
(
$_GET
[
'filename'
],
-
4
)
==
'.tmp'
)
{
if
(
$_GET
[
'action'
]
==
'del_upload_cache'
&&
substr
(
$_GET
[
'filename'
],
-
4
)
==
'.tmp'
)
{
// del '.tmp' without login. 无需登录即可删除.tmp后缀文件
// del '.tmp' without login. 无需登录即可删除.tmp后缀文件
...
...
function/heroku.php
浏览文件 @
9cc257f7
...
@@ -66,7 +66,7 @@ function get_refresh_token()
...
@@ -66,7 +66,7 @@ function get_refresh_token()
}
}
document.cookie=\'language=; path=/\';
document.cookie=\'language=; path=/\';
</script>'
;
</script>'
;
setConfig
([
'refresh_token'
=>
$tmptoken
]);
setConfig
([
'refresh_token'
=>
$tmptoken
,
'token_expires'
=>
time
()
+
30
*
24
*
60
*
60
]);
savecache
(
'access_token'
,
$ret
[
'access_token'
],
$ret
[
'expires_in'
]
-
60
);
savecache
(
'access_token'
,
$ret
[
'access_token'
],
$ret
[
'expires_in'
]
-
60
);
$str
.
=
'
$str
.
=
'
<meta http-equiv="refresh" content="5;URL='
.
$url
.
'">'
;
<meta http-equiv="refresh" content="5;URL='
.
$url
.
'">'
;
...
...
function/normal.php
浏览文件 @
9cc257f7
...
@@ -65,7 +65,7 @@ function get_refresh_token()
...
@@ -65,7 +65,7 @@ function get_refresh_token()
}
}
document.cookie=\'language=; path=/\';
document.cookie=\'language=; path=/\';
</script>'
;
</script>'
;
setConfig
([
'refresh_token'
=>
$tmptoken
]);
setConfig
([
'refresh_token'
=>
$tmptoken
,
'token_expires'
=>
time
()
+
30
*
24
*
60
*
60
]);
savecache
(
'access_token'
,
$ret
[
'access_token'
],
$ret
[
'expires_in'
]
-
60
);
savecache
(
'access_token'
,
$ret
[
'access_token'
],
$ret
[
'expires_in'
]
-
60
);
$str
.
=
'
$str
.
=
'
<meta http-equiv="refresh" content="5;URL='
.
$url
.
'">'
;
<meta http-equiv="refresh" content="5;URL='
.
$url
.
'">'
;
...
...
function/scf.php
浏览文件 @
9cc257f7
...
@@ -23,6 +23,7 @@ function GetGlobalVariable($event)
...
@@ -23,6 +23,7 @@ function GetGlobalVariable($event)
$pos
=
strpos
(
$cookievalues
,
"="
);
$pos
=
strpos
(
$cookievalues
,
"="
);
$_COOKIE
[
urldecode
(
substr
(
$cookievalues
,
0
,
$pos
))]
=
urldecode
(
substr
(
$cookievalues
,
$pos
+
1
));
$_COOKIE
[
urldecode
(
substr
(
$cookievalues
,
0
,
$pos
))]
=
urldecode
(
substr
(
$cookievalues
,
$pos
+
1
));
}
}
$_SERVER
[
'USER'
]
=
'qcloud'
;
}
}
function
GetPathSetting
(
$event
,
$context
)
function
GetPathSetting
(
$event
,
$context
)
...
@@ -100,7 +101,7 @@ function get_refresh_token()
...
@@ -100,7 +101,7 @@ function get_refresh_token()
}
}
document.cookie=\'language=; path=/\';
document.cookie=\'language=; path=/\';
</script>'
;
</script>'
;
setConfig
([
'refresh_token'
=>
$tmptoken
]);
setConfig
([
'refresh_token'
=>
$tmptoken
,
'token_expires'
=>
time
()
+
30
*
24
*
60
*
60
]);
savecache
(
'access_token'
,
$ret
[
'access_token'
],
$ret
[
'expires_in'
]
-
60
);
savecache
(
'access_token'
,
$ret
[
'access_token'
],
$ret
[
'expires_in'
]
-
60
);
$trynum
=
0
;
$trynum
=
0
;
while
(
json_decode
(
getfunctioninfo
(
$_SERVER
[
'function_name'
],
$_SERVER
[
'Region'
],
$_SERVER
[
'namespace'
],
getConfig
(
'SecretId'
),
getConfig
(
'SecretKey'
)),
true
)[
'Response'
][
'Status'
]
!=
'Active'
)
echo
'
while
(
json_decode
(
getfunctioninfo
(
$_SERVER
[
'function_name'
],
$_SERVER
[
'Region'
],
$_SERVER
[
'namespace'
],
getConfig
(
'SecretId'
),
getConfig
(
'SecretKey'
)),
true
)[
'Response'
][
'Status'
]
!=
'Active'
)
echo
'
...
...
theme/classic.php
浏览文件 @
9cc257f7
...
@@ -55,17 +55,17 @@
...
@@ -55,17 +55,17 @@
<?php
<?php
if
(
getConfig
(
'admin'
)
!=
''
)
if
(
!
$_SERVER
[
'admin'
])
{
if
(
getConfig
(
'admin'
)
!=
''
)
if
(
!
$_SERVER
[
'admin'
])
{
if
(
getConfig
(
'adminloginpage'
)
==
''
)
{
?>
if
(
getConfig
(
'adminloginpage'
)
==
''
)
{
?>
<a
onclick=
"login();"
>
<?php
echo
getconstStr
(
'Login'
);
?>
</a>
<a
onclick=
"login();"
><
ion-icon
name=
"log-in"
></ion-icon>
<
?php
echo
getconstStr
(
'Login'
);
?>
</a>
<?php
}
<?php
}
}
else
{
?>
}
else
{
?>
<li
class=
"operate"
>
<?php
echo
getconstStr
(
'Operate'
);
?>
<ul>
<li
class=
"operate"
><
ion-icon
name=
"construct"
></ion-icon>
<
?php
echo
getconstStr
(
'Operate'
);
?>
<ul>
<?php
if
(
isset
(
$files
[
'folder'
]))
{
?>
<?php
if
(
isset
(
$files
[
'folder'
]))
{
?>
<li><a
onclick=
"showdiv(event,'create','');"
>
<?php
echo
getconstStr
(
'Create'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event,'create','');"
><
ion-icon
name=
"add-circle"
></ion-icon>
<
?php
echo
getconstStr
(
'Create'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event,'encrypt','');"
>
<?php
echo
getconstStr
(
'encrypt'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event,'encrypt','');"
><
ion-icon
name=
"lock"
></ion-icon>
<
?php
echo
getconstStr
(
'encrypt'
);
?>
</a></li>
<li><a
href=
"?RefreshCache"
>
<?php
echo
getconstStr
(
'RefreshCache'
);
?>
</a></li>
<li><a
href=
"?RefreshCache"
><
ion-icon
name=
"refresh"
></ion-icon>
<
?php
echo
getconstStr
(
'RefreshCache'
);
?>
</a></li>
<?php
}
?>
<?php
}
?>
<li><a
href=
"
<?php
echo
$_GET
[
'preview'
]
?
'?preview&'
:
'?'
;
?>
setup"
>
<?php
echo
getconstStr
(
'Setup'
);
?>
</a></li>
<li><a
href=
"
<?php
echo
$_GET
[
'preview'
]
?
'?preview&'
:
'?'
;
?>
setup"
><
ion-icon
name=
"settings"
></ion-icon>
<
?php
echo
getconstStr
(
'Setup'
);
?>
</a></li>
<li><a
onclick=
"logout()"
>
<?php
echo
getconstStr
(
'Logout'
);
?>
</a></li>
<li><a
onclick=
"logout()"
><
ion-icon
name=
"log-out"
></ion-icon>
<
?php
echo
getconstStr
(
'Logout'
);
?>
</a></li>
</ul></li>
</ul></li>
<?php
<?php
}
?>
}
?>
...
@@ -158,8 +158,9 @@
...
@@ -158,8 +158,9 @@
<div id="
txt
"
>
<div id="
txt
"
>
<?php
if
(
$_SERVER
[
'admin'
])
{
?>
<?php
if
(
$_SERVER
[
'admin'
])
{
?>
<form
id=
"txt-form"
action=
""
method=
"POST"
>
<form
id=
"txt-form"
action=
""
method=
"POST"
>
<a
onclick=
"enableedit(this);"
id=
"txt-editbutton"
>
<?php
echo
getconstStr
(
'ClicktoEdit'
);
?>
</a>
<a
onclick=
"document.getElementById('txt-a').readOnly='';document.getElementById('txt-save').style.display='';document.getElementById('txt-editbutton').style.display='none';document.getElementById('txt-cancelbutton').style.display='';"
id=
"txt-editbutton"
><ion-icon
name=
"create"
></ion-icon>
<?php
echo
getconstStr
(
'ClicktoEdit'
);
?>
</a>
<a
id=
"txt-save"
style=
"display:none"
>
<?php
echo
getconstStr
(
'Save'
);
?>
</a>
<a
onclick=
"document.getElementById('txt-a').readOnly='readonly';document.getElementById('txt-save').style.display='none';document.getElementById('txt-editbutton').style.display='';document.getElementById('txt-cancelbutton').style.display='none';"
id=
"txt-cancelbutton"
style=
"display:none"
><ion-icon
name=
"close"
></ion-icon>
<?php
echo
getconstStr
(
'CancelEdit'
);
?>
</a>
<a
id=
"txt-save"
style=
"display:none"
><ion-icon
name=
"save"
></ion-icon>
<?php
echo
getconstStr
(
'Save'
);
?>
</a>
<?php
}
?>
<?php
}
?>
<textarea
id=
"txt-a"
name=
"editfile"
readonly
style=
"width: 100%; margin-top: 2px;"
<?php
if
(
$_SERVER
[
'admin'
])
echo
'onchange="document.getElementById(\'txt-save\').onclick=function(){document.getElementById(\'txt-form\').submit();}"'
;
?>
>
<?php
echo
$txtstr
;
?>
</textarea>
<textarea
id=
"txt-a"
name=
"editfile"
readonly
style=
"width: 100%; margin-top: 2px;"
<?php
if
(
$_SERVER
[
'admin'
])
echo
'onchange="document.getElementById(\'txt-save\').onclick=function(){document.getElementById(\'txt-form\').submit();}"'
;
?>
>
<?php
echo
$txtstr
;
?>
</textarea>
<?php
if
(
$_SERVER
[
'admin'
])
echo
'</form>'
;
?>
<?php
if
(
$_SERVER
[
'admin'
])
echo
'</form>'
;
?>
...
@@ -180,7 +181,7 @@
...
@@ -180,7 +181,7 @@
$readme
=
false
;
?>
$readme
=
false
;
?>
<table
class=
"list-table"
id=
"list-table"
>
<table
class=
"list-table"
id=
"list-table"
>
<tr
id=
"tr0"
>
<tr
id=
"tr0"
>
<th
class=
"file"
onclick=
"sortby('a');"
>
<?php
echo
getconstStr
(
'File'
);
?>
<button
onclick=
"showthumbnails(this);"
>
<?php
echo
getconstStr
(
'ShowThumbnails'
);
?>
</button
></th>
<th
class=
"file"
onclick=
"sortby('a');"
>
<?php
echo
getconstStr
(
'File'
);
if
(
$_SERVER
[
'USER'
]
!=
'qcloud'
)
{
?>
<button
onclick=
"showthumbnails(this);"
>
<?php
echo
getconstStr
(
'ShowThumbnails'
);
?>
</button>
<?php
}
?
>
</th>
<th
class=
"updated_at"
width=
"25%"
onclick=
"sortby('time');"
>
<?php
echo
getconstStr
(
'EditTime'
);
?>
</th>
<th
class=
"updated_at"
width=
"25%"
onclick=
"sortby('time');"
>
<?php
echo
getconstStr
(
'EditTime'
);
?>
</th>
<th
class=
"size"
width=
"15%"
onclick=
"sortby('size');"
>
<?php
echo
getconstStr
(
'Size'
);
?>
</th>
<th
class=
"size"
width=
"15%"
onclick=
"sortby('size');"
>
<?php
echo
getconstStr
(
'Size'
);
?>
</th>
</tr>
</tr>
...
@@ -193,12 +194,12 @@
...
@@ -193,12 +194,12 @@
<tr
data-to
id=
"tr
<?php
echo
$filenum
;
?>
"
>
<tr
data-to
id=
"tr
<?php
echo
$filenum
;
?>
"
>
<td
class=
"file"
>
<td
class=
"file"
>
<?php
if
(
$_SERVER
[
'admin'
])
{
?>
<?php
if
(
$_SERVER
[
'admin'
])
{
?>
<li
class=
"operate"
>
<?php
echo
getconstStr
(
'Operate'
);
?>
<li
class=
"operate"
><
ion-icon
name=
"construct"
></ion-icon>
<
?php
echo
getconstStr
(
'Operate'
);
?>
<ul>
<ul>
<li><a
onclick=
"showdiv(event,'encrypt',
<?php
echo
$filenum
;
?>
);"
>
<?php
echo
getconstStr
(
'encrypt'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event,'encrypt',
<?php
echo
$filenum
;
?>
);"
><
ion-icon
name=
"lock"
></ion-icon>
<
?php
echo
getconstStr
(
'encrypt'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'rename',
<?php
echo
$filenum
;
?>
);"
>
<?php
echo
getconstStr
(
'Rename'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'rename',
<?php
echo
$filenum
;
?>
);"
><
ion-icon
name=
"create"
></ion-icon>
<
?php
echo
getconstStr
(
'Rename'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'move',
<?php
echo
$filenum
;
?>
);"
>
<?php
echo
getconstStr
(
'Move'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'move',
<?php
echo
$filenum
;
?>
);"
><
ion-icon
name=
"move"
></ion-icon>
<
?php
echo
getconstStr
(
'Move'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'delete',
<?php
echo
$filenum
;
?>
);"
>
<?php
echo
getconstStr
(
'Delete'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'delete',
<?php
echo
$filenum
;
?>
);"
><
ion-icon
name=
"trash"
></ion-icon>
<
?php
echo
getconstStr
(
'Delete'
);
?>
</a></li>
</ul>
</ul>
</li>
</li>
<?php
}
?>
<?php
}
?>
...
@@ -224,11 +225,11 @@
...
@@ -224,11 +225,11 @@
<tr
data-to
id=
"tr
<?php
echo
$filenum
;
?>
"
>
<tr
data-to
id=
"tr
<?php
echo
$filenum
;
?>
"
>
<td
class=
"file"
>
<td
class=
"file"
>
<?php
if
(
$_SERVER
[
'admin'
])
{
?>
<?php
if
(
$_SERVER
[
'admin'
])
{
?>
<li
class=
"operate"
>
<?php
echo
getconstStr
(
'Operate'
);
?>
<li
class=
"operate"
><
ion-icon
name=
"construct"
></ion-icon>
<
?php
echo
getconstStr
(
'Operate'
);
?>
<ul>
<ul>
<li><a
onclick=
"showdiv(event, 'rename',
<?php
echo
$filenum
;
?>
);"
>
<?php
echo
getconstStr
(
'Rename'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'rename',
<?php
echo
$filenum
;
?>
);"
><
ion-icon
name=
"create"
></ion-icon>
<
?php
echo
getconstStr
(
'Rename'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'move',
<?php
echo
$filenum
;
?>
);"
>
<?php
echo
getconstStr
(
'Move'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'move',
<?php
echo
$filenum
;
?>
);"
><
ion-icon
name=
"move"
></ion-icon>
<
?php
echo
getconstStr
(
'Move'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'delete',
<?php
echo
$filenum
;
?>
);"
>
<?php
echo
getconstStr
(
'Delete'
);
?>
</a></li>
<li><a
onclick=
"showdiv(event, 'delete',
<?php
echo
$filenum
;
?>
);"
><
ion-icon
name=
"trash"
></ion-icon>
<
?php
echo
getconstStr
(
'Delete'
);
?>
</a></li>
</ul>
</ul>
</li>
</li>
<?php
}
<?php
}
...
@@ -980,12 +981,6 @@
...
@@ -980,12 +981,6 @@
document
.
cookie
=
"admin=; path=/"
;
document
.
cookie
=
"admin=; path=/"
;
location
.
href
=
location
.
href
;
location
.
href
=
location
.
href
;
}
}
function
enableedit
(
obj
)
{
document
.
getElementById
(
'txt-a'
)
.
readOnly
=!
document
.
getElementById
(
'txt-a'
)
.
readOnly
;
//document.getElementById('txt-editbutton').innerHTML=(document.getElementById('txt-editbutton').innerHTML=='取消编辑')?'点击后编辑':'取消编辑';
obj
.
innerHTML
=
(
obj
.
innerHTML
==
'<?php echo getconstStr('
CancelEdit
'); ?>'
)
?
'<?php echo getconstStr('
ClicktoEdit
'); ?>'
:
'<?php echo getconstStr('
CancelEdit
'); ?>'
;
document
.
getElementById
(
'txt-save'
)
.
style
.
display
=
document
.
getElementById
(
'txt-save'
)
.
style
.
display
==
''
?
'none'
:
''
;
}
<?
php
if
(
!
$_GET
[
'preview'
])
{
?>
<?
php
if
(
!
$_GET
[
'preview'
])
{
?>
function
showdiv
(
event
,
action
,
num
)
{
function
showdiv
(
event
,
action
,
num
)
{
var
$operatediv
=
document
.
getElementsByName
(
'
operatediv
'
);
var
$operatediv
=
document
.
getElementsByName
(
'
operatediv
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录