Forex Pro
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
body {
min-height: 100vh;
background: #0b1220;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.container {
width: 100%;
max-width: 430px;
background: #111a2e;
border: 1px solid #263451;
border-radius: 18px;
padding: 30px;
box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.logo {
text-align: center;
margin-bottom: 25px;
}
.logo h1 {
font-size: 30px;
color: #3b82f6;
}
.course {
text-align: center;
margin-bottom: 25px;
}
.course h2 {
font-size: 21px;
line-height: 1.4;
margin-bottom: 10px;
}
.course p {
color: #9ca3af;
font-size: 14px;
line-height: 1.6;
}
input {
width: 100%;
padding: 14px;
margin-top: 12px;
border-radius: 10px;
border: 1px solid #34425f;
background: #0b1220;
color: white;
font-size: 16px;
outline: none;
}
input:focus {
border-color: #3b82f6;
}
button {
width: 100%;
padding: 14px;
margin-top: 14px;
border: none;
border-radius: 10px;
background: #2563eb;
color: white;
font-size: 16px;
font-weight: bold;
cursor: pointer;
}
button:hover {
background: #1d4ed8;
}
button:disabled {
opacity: .6;
cursor: not-allowed;
}
.payment-btn {
background: #16a34a;
}
.payment-btn:hover {
background: #15803d;
}
.logout-btn {
background: #374151;
}
.logout-btn:hover {
background: #4b5563;
}
#otpSection,
#loggedInSection {
display: none;
}
#recaptcha-container {
margin-top: 15px;
display: flex;
justify-content: center;
}
.message {
margin-top: 15px;
text-align: center;
font-size: 14px;
color: #9ca3af;
line-height: 1.5;
}
.success {
color: #22c55e;
}
.error {
color: #ef4444;
}
.user-number {
text-align: center;
color: #22c55e;
margin-top: 10px;
}
.divider {
height: 1px;
background: #263451;
margin: 25px 0;
}
.notice {
margin-top: 20px;
padding: 12px;
border-radius: 10px;
background: #0b1220;
border: 1px solid #263451;
color: #9ca3af;
font-size: 12px;
line-height: 1.6;
text-align: center;
}
.support {
margin-top: 18px;
text-align: center;
color: #9ca3af;
font-size: 13px;
line-height: 1.7;
}
.support a {
color: #60a5fa;
text-decoration: none;
}
.hidden {
display: none !important;
}
FOREX PRO
Master Liquidity Concept with Reversal King
Login with your mobile number to continue to course purchase.
Login successful
Educational purpose only.
This course does not provide financial or investment advice.
Trading involves risk. Please make your own decisions.
No Refund Policy:
Course purchase once completed is non-refundable.
import { initializeApp }
from “
https://www.gstatic.com/firebasejs/12.7.1/firebase-app.js”;
import {
getAuth,
RecaptchaVerifier,
signInWithPhoneNumber,
onAuthStateChanged,
signOut
}
from “
https://www.gstatic.com/firebasejs/12.7.1/firebase-auth.js”;
// =====================================
// FIREBASE CONFIG
// =====================================
const firebaseConfig = {
apiKey:
“AIzaSyCtCGY7tMQdbYGBkusnal3S7DN3nn-867A”,
authDomain:
“forex-pro-64405.firebaseapp.com”,
projectId:
“forex-pro-64405”,
storageBucket:
“forex-pro-64405.firebasestorage.app”,
messagingSenderId:
“90005485057”,
appId:
“1:90005485057:web:5c077eec5ee245f1573200”,
measurementId:
“G-S21VKS7M0M”
};
// =====================================
// INITIALIZE FIREBASE
// =====================================
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
// =====================================
// ELEMENTS
// =====================================
const phoneNumber =
document.getElementById(“phoneNumber”);
const otpCode =
document.getElementById(“otpCode”);
const sendOtpBtn =
document.getElementById(“sendOtpBtn”);
const verifyOtpBtn =
document.getElementById(“verifyOtpBtn”);
const otpSection =
document.getElementById(“otpSection”);
const loginSection =
document.getElementById(“loginSection”);
const loggedInSection =
document.getElementById(“loggedInSection”);
const message =
document.getElementById(“message”);
const buyCourseBtn =
document.getElementById(“buyCourseBtn”);
const logoutBtn =
document.getElementById(“logoutBtn”);
// =====================================
// MESSAGE FUNCTION
// =====================================
function showMessage(text, type = “”) {
message.textContent = text;
message.className =
“message ” + type;
}
// =====================================
// RECAPTCHA
// =====================================
let recaptchaVerifier;
function setupRecaptcha() {
if (recaptchaVerifier) {
return;
}
recaptchaVerifier =
new RecaptchaVerifier(
auth,
“recaptcha-container”,
{
size: “normal”
}
);
}
setupRecaptcha();
// =====================================
// SEND OTP
// =====================================
sendOtpBtn.addEventListener(
“click”,
async () => {
const phone =
phoneNumber.value.trim();
if (!phone) {
showMessage(
“Mobile number enter karo.”,
“error”
);
return;
}
if (!/^\+\d{10,15}$/.test(phone)) {
showMessage(
“Number country code ke saath enter karo. Example: +919328099162”,
“error”
);
return;
}
sendOtpBtn.disabled = true;
showMessage(
“OTP bheja ja raha hai…”
);
try {
setupRecaptcha();
const confirmationResult =
await signInWithPhoneNumber(
auth,
phone,
recaptchaVerifier
);
window.confirmationResult =
confirmationResult;
otpSection.style.display =
“block”;
showMessage(
“OTP tumhare mobile par bhej diya gaya hai.”,
“success”
);
sendOtpBtn.textContent =
“OTP Sent”;
}
catch (error) {
console.error(error);
showMessage(
“OTP send nahi hua: ” +
error.message,
“error”
);
sendOtpBtn.disabled =
false;
// reCAPTCHA reset
try {
if (recaptchaVerifier) {
recaptchaVerifier.clear();
}
recaptchaVerifier = null;
setupRecaptcha();
} catch (e) {
console.error(e);
}
}
}
);
// =====================================
// VERIFY OTP
// =====================================
verifyOtpBtn.addEventListener(
“click”,
async () => {
const otp =
otpCode.value.trim();
if (!window.confirmationResult) {
showMessage(
“Pehle Send OTP par click karo.”,
“error”
);
return;
}
if (!/^\d{6}$/.test(otp)) {
showMessage(
“6 digit OTP enter karo.”,
“error”
);
return;
}
verifyOtpBtn.disabled =
true;
showMessage(
“OTP verify ho raha hai…”
);
try {
await window.confirmationResult
.confirm(otp);
showMessage(
“Login successful.”,
“success”
);
}
catch (error) {
console.error(error);
showMessage(
“OTP galat hai ya expire ho gaya.”,
“error”
);
verifyOtpBtn.disabled =
false;
}
}
);
// =====================================
// AUTH STATE
// =====================================
onAuthStateChanged(
auth,
(user) => {
if (user) {
loginSection.style.display =
“none”;
loggedInSection.style.display =
“block”;
}
else {
loginSection.style.display =
“block”;
loggedInSection.style.display =
“none”;
}
}
);
// =====================================
// RAZORPAY PAYMENT LINK
// =====================================
buyCourseBtn.addEventListener(
“click”,
() => {
window.location.href =
“
https://rzp.io/rzp/8Y8wXwo”;
}
);
// =====================================
// LOGOUT
// =====================================
logoutBtn.addEventListener(
“click”,
async () => {
try {
await signOut(auth);
location.reload();
}
catch (error) {
console.error(error);
showMessage(
“Logout failed.”,
“error”
);
}
}
);
Leave a comment