|
@@ -5,9 +5,13 @@ $ip = getIp();
|
|
|
$act = $_GET['act'] ?? '';
|
|
|
|
|
|
if ($act == "logout") {
|
|
|
+ // Check if the session variable exists before using it
|
|
|
+ $employeeName = $_SESSION['employee_name'] ?? 'Unknown User';
|
|
|
+ $currentTime = date('Y-m-d H:i:s');
|
|
|
+ $loginAct = $employeeName . " " . $currentTime . "从" . $ip . "退出系统";
|
|
|
+
|
|
|
$stmt = $conn->prepare("INSERT INTO logrecord (loginName, loginTime, loginAct) VALUES (?, ?, ?)");
|
|
|
- $loginAct = $_SESSION['employee_name'] . " " . date('Y-m-d H:i:s') . "从" . $ip . "退出系统";
|
|
|
- $stmt->bind_param("sss", $_SESSION['employee_name'], date('Y-m-d H:i:s'), $loginAct);
|
|
|
+ $stmt->bind_param("sss", $employeeName, $currentTime, $loginAct);
|
|
|
$stmt->execute();
|
|
|
|
|
|
// 清除所有session变量
|
|
@@ -174,7 +178,7 @@ if ($act == "login") {
|
|
|
<div class='icon'>
|
|
|
<img alt="" src='images/lock_icon_copy.png'>
|
|
|
</div>
|
|
|
- <input name="loginpwd" id="loginpwd" placeholder='密码' maxlength="16" type='password' a>
|
|
|
+ <input name="loginpwd" id="loginpwd" placeholder='密码' maxlength="16" type='password' a>
|
|
|
<div class='validation'>
|
|
|
<img alt="" src='images/tick.png'>
|
|
|
</div>
|
|
@@ -183,7 +187,7 @@ if ($act == "login") {
|
|
|
<div class='icon'>
|
|
|
<img alt="" src='images/key.png'>
|
|
|
</div>
|
|
|
- <input name="logincode" id="logincode" placeholder='验证码' maxlength="5" type='text' >
|
|
|
+ <input name="logincode" id="logincode" placeholder='验证码' maxlength="5" type='text' inputmode="none" >
|
|
|
|
|
|
</div>
|
|
|
<div class='login_fields__code'>
|