Spaces:
Running
Running
Update login.html
Browse files- login.html +257 -182
login.html
CHANGED
|
@@ -342,197 +342,272 @@
|
|
| 342 |
</div>
|
| 343 |
|
| 344 |
<script>
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
enableButtons();
|
| 359 |
-
}
|
| 360 |
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
|
| 368 |
-
|
| 369 |
-
const element = document.getElementById(elementId);
|
| 370 |
-
element.textContent = message;
|
| 371 |
-
element.className = `message ${isError ? 'error' : 'success'} show`;
|
| 372 |
-
}
|
| 373 |
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
const button = form.querySelector('button[type="submit"]');
|
| 377 |
-
const spinner = button.querySelector('.loading-spinner');
|
| 378 |
-
|
| 379 |
-
button.disabled = isLoading;
|
| 380 |
-
spinner.style.display = isLoading ? 'block' : 'none';
|
| 381 |
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 386 |
|
| 387 |
-
|
| 388 |
-
document.querySelectorAll('button').forEach(button => {
|
| 389 |
-
button.disabled = false;
|
| 390 |
-
});
|
| 391 |
-
document.querySelectorAll('.loading-spinner').forEach(spinner => {
|
| 392 |
-
spinner.style.display = 'none';
|
| 393 |
-
});
|
| 394 |
-
}
|
| 395 |
|
| 396 |
-
|
| 397 |
-
|
|
|
|
| 398 |
|
| 399 |
-
|
| 400 |
-
const password = document.getElementById('loginPassword').value;
|
| 401 |
-
|
| 402 |
-
if (!email || !password) {
|
| 403 |
-
showMessage('loginMessage', 'الرجاء إدخال جميع البيانات المطلوبة', true);
|
| 404 |
-
return false;
|
| 405 |
-
}
|
| 406 |
-
|
| 407 |
-
if (!isValidEmail(email)) {
|
| 408 |
-
showMessage('loginMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
|
| 409 |
-
return false;
|
| 410 |
-
}
|
| 411 |
-
try {
|
| 412 |
-
toggleLoadingState('loginForm', true);
|
| 413 |
-
showMessage('loginMessage', 'جاري تسجيل الدخول...', false);
|
| 414 |
-
|
| 415 |
-
const response = await fetch(`${API_URL}/login`, {
|
| 416 |
-
method: 'POST',
|
| 417 |
-
headers: {
|
| 418 |
-
'Content-Type': 'application/json',
|
| 419 |
-
'Accept': 'application/json'
|
| 420 |
-
},
|
| 421 |
-
body: JSON.stringify({ email, password })
|
| 422 |
-
});
|
| 423 |
-
|
| 424 |
-
const data = await response.json();
|
| 425 |
-
|
| 426 |
-
if (response.ok) {
|
| 427 |
-
// تخزين token في localStorage
|
| 428 |
-
localStorage.setItem('userToken', data.token);
|
| 429 |
-
localStorage.setItem('userData', JSON.stringify(data.user));
|
| 430 |
-
|
| 431 |
-
showMessage('loginMessage', 'تم تسجيل الدخول بنجاح! جاري التحويل...', false);
|
| 432 |
-
|
| 433 |
-
// التوجيه إلى لوحة التحكم بعد ثانية
|
| 434 |
-
setTimeout(() => {
|
| 435 |
-
window.location.href = '/dashboard';
|
| 436 |
-
}, 1000);
|
| 437 |
-
} else {
|
| 438 |
-
throw new Error(data.message || 'فشل تسجيل الدخول');
|
| 439 |
-
}
|
| 440 |
-
} catch (error) {
|
| 441 |
-
showMessage('loginMessage', error.message || 'حدث خطأ أثناء تسجيل الدخول. الرجاء المحاولة مرة أخرى', true);
|
| 442 |
-
} finally {
|
| 443 |
-
toggleLoadingState('loginForm', false);
|
| 444 |
-
}
|
| 445 |
-
|
| 446 |
-
return false;
|
| 447 |
-
}
|
| 448 |
-
|
| 449 |
-
async function handleRegister(event) {
|
| 450 |
-
event.preventDefault();
|
| 451 |
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
toggleForm();
|
| 507 |
-
document.getElementById('loginEmail').value = email;
|
| 508 |
-
}, 2000);
|
| 509 |
-
} else {
|
| 510 |
-
throw new Error(data.message || 'فشل إنشاء الحساب');
|
| 511 |
-
}
|
| 512 |
-
} catch (error) {
|
| 513 |
-
showMessage('registerMessage', error.message || 'حدث خطأ أثناء إنشاء الحساب. الرجاء المحاولة مرة أخرى', true);
|
| 514 |
-
} finally {
|
| 515 |
-
toggleLoadingState('registerForm', false);
|
| 516 |
-
}
|
| 517 |
-
|
| 518 |
-
return false;
|
| 519 |
-
}
|
| 520 |
-
|
| 521 |
-
function isValidEmail(email) {
|
| 522 |
-
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
| 523 |
-
}
|
| 524 |
-
|
| 525 |
-
// معالجة الأخطاء العامة
|
| 526 |
-
window.onerror = function(msg, url, lineNo, columnNo, error) {
|
| 527 |
-
console.error('Error: ' + msg + '\nURL: ' + url + '\nLine: ' + lineNo + '\nColumn: ' + columnNo + '\nError object: ' + JSON.stringify(error));
|
| 528 |
-
return false;
|
| 529 |
-
};
|
| 530 |
-
|
| 531 |
-
// معالجة أخطاء الشبكة
|
| 532 |
-
window.addEventListener('offline', function(e) {
|
| 533 |
-
showMessage('loginMessage', 'لا يوجد اتصال بالإنترنت', true);
|
| 534 |
-
showMessage('registerMessage', 'لا يوجد اتصال بالإنترنت', true);
|
| 535 |
-
});
|
| 536 |
</script>
|
| 537 |
</body>
|
| 538 |
</html>
|
|
|
|
| 342 |
</div>
|
| 343 |
|
| 344 |
<script>
|
| 345 |
+
// الثوابت والتكوينات
|
| 346 |
+
const API_URL = 'https://j8fp9mu44k547j-7777.proxy.runpod.net/proxy/6500/api';
|
| 347 |
+
const VALIDATION_RULES = {
|
| 348 |
+
officeName: {
|
| 349 |
+
minLength: 3,
|
| 350 |
+
maxLength: 100
|
| 351 |
+
},
|
| 352 |
+
password: {
|
| 353 |
+
minLength: 8,
|
| 354 |
+
maxLength: 50
|
| 355 |
+
},
|
| 356 |
+
phone: {
|
| 357 |
+
pattern: /^(\+201|01)[0-2|5][0-9]{8}$/,
|
| 358 |
+
message: 'الرجاء إدخال رقم هاتف مصري صحيح'
|
| 359 |
+
},
|
| 360 |
+
email: {
|
| 361 |
+
pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
| 362 |
+
message: 'الرجاء إدخال بريد إلكتروني صحيح'
|
| 363 |
+
}
|
| 364 |
+
};
|
| 365 |
+
|
| 366 |
+
// وظائف المساعدة
|
| 367 |
+
function validateInput(value, rules) {
|
| 368 |
+
if (!value || typeof value !== 'string') {
|
| 369 |
+
return 'هذا الحقل مطلوب';
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
value = value.trim();
|
| 373 |
+
|
| 374 |
+
if (rules.minLength && value.length < rules.minLength) {
|
| 375 |
+
return `يجب أن يكون الحقل ${rules.minLength} أحرف على الأقل`;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
if (rules.maxLength && value.length > rules.maxLength) {
|
| 379 |
+
return `يجب أن لا يتجاوز الحقل ${rules.maxLength} حرف`;
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
if (rules.pattern && !rules.pattern.test(value)) {
|
| 383 |
+
return rules.message;
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
return null;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
function formatPhoneNumber(phone) {
|
| 390 |
+
// تنسيق رقم الهاتف بشكل موحد
|
| 391 |
+
phone = phone.trim().replace(/\s+/g, '');
|
| 392 |
+
if (phone.startsWith('01')) {
|
| 393 |
+
return phone;
|
| 394 |
+
}
|
| 395 |
+
if (phone.startsWith('+201')) {
|
| 396 |
+
return '0' + phone.slice(3);
|
| 397 |
+
}
|
| 398 |
+
return phone;
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
function showMessage(elementId, message, isError = false) {
|
| 402 |
+
const element = document.getElementById(elementId);
|
| 403 |
+
if (!element) return;
|
| 404 |
+
|
| 405 |
+
element.textContent = message;
|
| 406 |
+
element.className = `message ${isError ? 'error' : 'success'} ${message ? 'show' : ''}`;
|
| 407 |
+
}
|
| 408 |
|
| 409 |
+
function toggleLoadingState(formId, isLoading) {
|
| 410 |
+
const form = document.getElementById(formId);
|
| 411 |
+
if (!form) return;
|
|
|
|
|
|
|
| 412 |
|
| 413 |
+
const button = form.querySelector('button[type="submit"]');
|
| 414 |
+
const spinner = button?.querySelector('.loading-spinner');
|
| 415 |
+
const inputs = form.querySelectorAll('input, select');
|
| 416 |
+
|
| 417 |
+
if (button) button.disabled = isLoading;
|
| 418 |
+
if (spinner) spinner.style.display = isLoading ? 'block' : 'none';
|
| 419 |
+
inputs.forEach(input => input.disabled = isLoading);
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
// التحقق من صحة نموذج التسجيل
|
| 423 |
+
function validateRegistrationForm(formData) {
|
| 424 |
+
const errors = [];
|
| 425 |
+
|
| 426 |
+
// التحقق من اسم المكتب
|
| 427 |
+
const officeNameError = validateInput(formData.officeName, VALIDATION_RULES.officeName);
|
| 428 |
+
if (officeNameError) errors.push(officeNameError);
|
| 429 |
+
|
| 430 |
+
// التحقق من الدور
|
| 431 |
+
if (!formData.userRole) {
|
| 432 |
+
errors.push('الرجاء اختيار صفة المسجل');
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
// التحقق من رقم الهاتف
|
| 436 |
+
const phoneError = validateInput(formData.phone, VALIDATION_RULES.phone);
|
| 437 |
+
if (phoneError) errors.push(phoneError);
|
| 438 |
+
|
| 439 |
+
// التحقق من البريد الإلكتروني
|
| 440 |
+
const emailError = validateInput(formData.email, VALIDATION_RULES.email);
|
| 441 |
+
if (emailError) errors.push(emailError);
|
| 442 |
+
|
| 443 |
+
// التحقق من كلمة المرور
|
| 444 |
+
const passwordError = validateInput(formData.password, VALIDATION_RULES.password);
|
| 445 |
+
if (passwordError) errors.push(passwordError);
|
| 446 |
+
|
| 447 |
+
return errors.length ? errors.join('\n') : null;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
// معالجة التسجيل
|
| 451 |
+
async function handleRegister(event) {
|
| 452 |
+
event.preventDefault();
|
| 453 |
+
|
| 454 |
+
// جمع البيانات من النموذج
|
| 455 |
+
const formData = {
|
| 456 |
+
officeName: document.getElementById('officeName').value,
|
| 457 |
+
userRole: document.getElementById('userRole').value,
|
| 458 |
+
phone: document.getElementById('phone').value,
|
| 459 |
+
email: document.getElementById('registerEmail').value,
|
| 460 |
+
password: document.getElementById('registerPassword').value
|
| 461 |
+
};
|
| 462 |
+
|
| 463 |
+
// التحقق من صحة البيانات
|
| 464 |
+
const validationError = validateRegistrationForm(formData);
|
| 465 |
+
if (validationError) {
|
| 466 |
+
showMessage('registerMessage', validationError, true);
|
| 467 |
+
return false;
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
try {
|
| 471 |
+
toggleLoadingState('registerForm', true);
|
| 472 |
+
showMessage('registerMessage', 'جاري إنشاء الحساب...', false);
|
| 473 |
+
|
| 474 |
+
const response = await fetch(`${API_URL}/register`, {
|
| 475 |
+
method: 'POST',
|
| 476 |
+
headers: {
|
| 477 |
+
'Content-Type': 'application/json',
|
| 478 |
+
'Accept': 'application/json'
|
| 479 |
+
},
|
| 480 |
+
body: JSON.stringify({
|
| 481 |
+
officeName: formData.officeName.trim(),
|
| 482 |
+
userRole: formData.userRole,
|
| 483 |
+
phone: formatPhoneNumber(formData.phone),
|
| 484 |
+
email: formData.email.toLowerCase().trim(),
|
| 485 |
+
password: formData.password
|
| 486 |
+
})
|
| 487 |
+
});
|
| 488 |
|
| 489 |
+
const data = await response.json();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 490 |
|
| 491 |
+
if (response.ok) {
|
| 492 |
+
showMessage('registerMessage', 'تم إنشاء الحساب بنجاح! يمكنك الآن تسجيل الدخول', false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 493 |
|
| 494 |
+
// التحويل إلى صفحة تسجيل الدخول
|
| 495 |
+
setTimeout(() => {
|
| 496 |
+
toggleForm();
|
| 497 |
+
document.getElementById('loginEmail').value = formData.email;
|
| 498 |
+
}, 2000);
|
| 499 |
+
} else {
|
| 500 |
+
// معالجة أخطاء محددة من الخادم
|
| 501 |
+
const errorMessage = data.message || 'فشل إنشاء الحساب. الرجاء المحاولة مرة أخرى';
|
| 502 |
+
throw new Error(errorMessage);
|
| 503 |
+
}
|
| 504 |
+
} catch (error) {
|
| 505 |
+
showMessage('registerMessage', error.message, true);
|
| 506 |
+
console.error('Registration error:', error);
|
| 507 |
+
} finally {
|
| 508 |
+
toggleLoadingState('registerForm', false);
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
return false;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
// معالجة تسجيل الدخول
|
| 515 |
+
async function handleLogin(event) {
|
| 516 |
+
event.preventDefault();
|
| 517 |
+
|
| 518 |
+
const email = document.getElementById('loginEmail').value;
|
| 519 |
+
const password = document.getElementById('loginPassword').value;
|
| 520 |
+
|
| 521 |
+
// التحقق الأساسي من البيانات
|
| 522 |
+
if (!email || !password) {
|
| 523 |
+
showMessage('loginMessage', 'الرجاء إدخال جميع البيانات المطلوبة', true);
|
| 524 |
+
return false;
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
const emailError = validateInput(email, VALIDATION_RULES.email);
|
| 528 |
+
if (emailError) {
|
| 529 |
+
showMessage('loginMessage', emailError, true);
|
| 530 |
+
return false;
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
try {
|
| 534 |
+
toggleLoadingState('loginForm', true);
|
| 535 |
+
showMessage('loginMessage', 'جاري تسجيل الدخول...', false);
|
| 536 |
+
|
| 537 |
+
const response = await fetch(`${API_URL}/login`, {
|
| 538 |
+
method: 'POST',
|
| 539 |
+
headers: {
|
| 540 |
+
'Content-Type': 'application/json',
|
| 541 |
+
'Accept': 'application/json'
|
| 542 |
+
},
|
| 543 |
+
body: JSON.stringify({
|
| 544 |
+
email: email.toLowerCase().trim(),
|
| 545 |
+
password
|
| 546 |
+
})
|
| 547 |
+
});
|
| 548 |
|
| 549 |
+
const data = await response.json();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 550 |
|
| 551 |
+
if (response.ok) {
|
| 552 |
+
localStorage.setItem('userToken', data.token);
|
| 553 |
+
localStorage.setItem('userData', JSON.stringify(data.user));
|
| 554 |
|
| 555 |
+
showMessage('loginMessage', 'تم تسجيل الدخول بنجاح! جاري التحويل...', false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 556 |
|
| 557 |
+
setTimeout(() => {
|
| 558 |
+
window.location.href = '/dashboard';
|
| 559 |
+
}, 1000);
|
| 560 |
+
} else {
|
| 561 |
+
throw new Error(data.message || 'فشل تسجيل الدخول');
|
| 562 |
+
}
|
| 563 |
+
} catch (error) {
|
| 564 |
+
showMessage('loginMessage', error.message, true);
|
| 565 |
+
console.error('Login error:', error);
|
| 566 |
+
} finally {
|
| 567 |
+
toggleLoadingState('loginForm', false);
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
return false;
|
| 571 |
+
}
|
| 572 |
+
|
| 573 |
+
// إضافة مستمعي الأحداث
|
| 574 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 575 |
+
// التحقق من وجود token
|
| 576 |
+
const token = localStorage.getItem('userToken');
|
| 577 |
+
if (token) {
|
| 578 |
+
window.location.href = '/dashboard';
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
// إضافة مستمعي النماذج
|
| 582 |
+
const loginForm = document.getElementById('loginForm');
|
| 583 |
+
const registerForm = document.getElementById('registerForm');
|
| 584 |
+
|
| 585 |
+
if (loginForm) loginForm.addEventListener('submit', handleLogin);
|
| 586 |
+
if (registerForm) registerForm.addEventListener('submit', handleRegister);
|
| 587 |
+
});
|
| 588 |
+
|
| 589 |
+
// معالجة الأخطاء العامة
|
| 590 |
+
window.onerror = function(msg, url, lineNo, columnNo, error) {
|
| 591 |
+
console.error('Error:', {
|
| 592 |
+
message: msg,
|
| 593 |
+
url: url,
|
| 594 |
+
line: lineNo,
|
| 595 |
+
column: columnNo,
|
| 596 |
+
error: error
|
| 597 |
+
});
|
| 598 |
+
return false;
|
| 599 |
+
};
|
| 600 |
+
|
| 601 |
+
// معالجة حالة الاتصال بالإنترنت
|
| 602 |
+
window.addEventListener('offline', function() {
|
| 603 |
+
showMessage('loginMessage', 'لا يوجد اتصال بالإنترنت', true);
|
| 604 |
+
showMessage('registerMessage', 'لا يوجد اتصال بالإنترنت', true);
|
| 605 |
+
});
|
| 606 |
+
|
| 607 |
+
window.addEventListener('online', function() {
|
| 608 |
+
showMessage('loginMessage', '');
|
| 609 |
+
showMessage('registerMessage', '');
|
| 610 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 611 |
</script>
|
| 612 |
</body>
|
| 613 |
</html>
|