expire cookie in install

pull/93/head
qkqpttgf 2020-07-13 17:41:48 +08:00 committed by GitHub
parent 8f4c5d2d30
commit d4d4c4e739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 3 deletions

View File

@ -135,9 +135,23 @@ function install()
setConfig($tmp); setConfig($tmp);
if (needUpdate()) { if (needUpdate()) {
OnekeyUpate(); OnekeyUpate();
return message('update to github version, reinstall.<script>document.cookie=\'language=; path=/\';</script><meta http-equiv="refresh" content="3;URL=' . $url . '">', 'Program updating', 201); return message('update to github version, reinstall.
<script>
var expd = new Date();
expd.setTime(expd.getTime()+(2*60*60*1000));
var expires = "expires="+expd.toGMTString();
document.cookie=\'language=; path=/; \'+expires;
</script>
<meta http-equiv="refresh" content="3;URL=' . $url . '">', 'Program updating', 201);
} }
return output('Jump<script>document.cookie=\'language=; path=/\';</script><meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302); return output('Jump
<script>
var expd = new Date();
expd.setTime(expd.getTime()+(2*60*60*1000));
var expires = "expires="+expd.toGMTString();
document.cookie=\'language=; path=/; \'+expires;
</script>
<meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
} }
if ($_GET['install1']) { if ($_GET['install1']) {
//if ($_POST['admin']!='') { //if ($_POST['admin']!='') {
@ -219,7 +233,10 @@ language:<br>';
document.cookie="timezone="+timezone+"; path=/; "+expires; document.cookie="timezone="+timezone+"; path=/; "+expires;
function changelanguage(str) function changelanguage(str)
{ {
document.cookie=\'language=\'+str+\'; path=/\'; var expd = new Date();
expd.setTime(expd.getTime()+(2*60*60*1000));
var expires = "expires="+expd.toGMTString();
document.cookie=\'language=\'+str+\'; path=/; \'+expires;
location.href = location.href; location.href = location.href;
} }
function notnull(t) function notnull(t)