Update functions.php

pull/13/head
qkqpttgf 2020-01-03 16:08:13 +08:00 committed by GitHub
parent 7a31a51561
commit d4d9408a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -305,7 +305,7 @@ Can not write config to file.<br>
} }
} }
$html .= ' $html .= '
<form action="?install0" method="post"> <form action="?install0" method="post" onsubmit="return adminnotnull(this);">
<label>admin:<input name="admin" type="password" placeholder="' . $constStr['EnvironmentsDescription']['admin'][$constStr['language']] . '" size="' . strlen($constStr['EnvironmentsDescription']['admin'][$constStr['language']]) . '"></label><br> <label>admin:<input name="admin" type="password" placeholder="' . $constStr['EnvironmentsDescription']['admin'][$constStr['language']] . '" size="' . strlen($constStr['EnvironmentsDescription']['admin'][$constStr['language']]) . '"></label><br>
language:<br>'; language:<br>';
foreach ($constStr['languages'] as $key1 => $value1) { foreach ($constStr['languages'] as $key1 => $value1) {
@ -321,6 +321,14 @@ Can not write config to file.<br>
document.cookie=\'language=\'+str+\'; path=/\'; document.cookie=\'language=\'+str+\'; path=/\';
location.href = location.href; location.href = location.href;
} }
function adminnotnull(t)
{
if (t.admin.value==\'\') {
alert(\'input admin\');
return false;
}
return true;
}
</script>'; </script>';
$title = $constStr['SelectLanguage'][$constStr['language']]; $title = $constStr['SelectLanguage'][$constStr['language']];
return message($html, $title, 201); return message($html, $title, 201);