0 ) { $ERROR = "".__('An internal error occurred').""; } else { $_SESSION['user'] = $_POST['user']; header("Location: /"); exit; } } else { $ERROR = "".__('Invalid username or code').""; } } else { $ERROR = "".__('Invalid username or code').""; } } else { $ERROR = "".__('Passwords not match').""; } } // Set system language exec (VESTA_CMD . "v-list-sys-config json", $output, $return_var); $data = json_decode(implode('', $output), true); if (!empty( $data['config']['LANGUAGE'])) { $_SESSION['language'] = $data['config']['LANGUAGE']; } else { $_SESSION['language'] = 'en'; } if (empty($_GET['action'])) { require_once '../templates/header.html'; require_once '../templates/reset_1.html'; } else { require_once '../templates/header.html'; if ($_GET['action'] == 'code' ) { require_once '../templates/reset_2.html'; } if (($_GET['action'] == 'confirm' ) && (!empty($_GET['code']))) { require_once '../templates/reset_3.html'; } } ?>