mirror of
https://github.com/FxPouya/FxMathQuantWebApp.git
synced 2026-07-27 18:27:44 +00:00
461 lines
14 KiB
HTML
461 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Get Your Free 7-Day Trial - FxMathQuant</title>
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" type="image/png" href="assets/favicon.png">
|
|
|
|
<!-- Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 600px;
|
|
width: 100%;
|
|
}
|
|
|
|
.card {
|
|
background: white;
|
|
border-radius: 20px;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
overflow: hidden;
|
|
animation: slideUp 0.6s ease-out;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.header {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
padding: 40px 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 32px;
|
|
font-weight: 700;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.header p {
|
|
font-size: 16px;
|
|
opacity: 0.95;
|
|
}
|
|
|
|
.content {
|
|
padding: 40px 30px;
|
|
}
|
|
|
|
.form-section {
|
|
display: block;
|
|
}
|
|
|
|
.form-section.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.success-section {
|
|
display: none;
|
|
text-align: center;
|
|
}
|
|
|
|
.success-section.active {
|
|
display: block;
|
|
}
|
|
|
|
.success-icon {
|
|
font-size: 64px;
|
|
margin-bottom: 20px;
|
|
animation: bounce 0.6s ease-out;
|
|
}
|
|
|
|
@keyframes bounce {
|
|
|
|
0%,
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
50% {
|
|
transform: translateY(-20px);
|
|
}
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
font-weight: 600;
|
|
color: #2d3748;
|
|
margin-bottom: 8px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
input[type="email"] {
|
|
width: 100%;
|
|
padding: 14px 18px;
|
|
border: 2px solid #e2e8f0;
|
|
border-radius: 10px;
|
|
font-size: 16px;
|
|
transition: all 0.3s ease;
|
|
font-family: inherit;
|
|
}
|
|
|
|
input[type="email"]:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
padding: 16px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 10px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.btn:hover:not(:disabled) {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #48bb78;
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.btn-secondary:hover:not(:disabled) {
|
|
box-shadow: 0 10px 25px rgba(72, 187, 120, 0.4);
|
|
}
|
|
|
|
.license-box {
|
|
background: #f7fafc;
|
|
border: 2px dashed #cbd5e0;
|
|
border-radius: 10px;
|
|
padding: 20px;
|
|
margin: 25px 0;
|
|
position: relative;
|
|
}
|
|
|
|
.license-key {
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: #2d3748;
|
|
word-break: break-all;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.copy-btn {
|
|
background: #667eea;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.copy-btn:hover {
|
|
background: #5568d3;
|
|
}
|
|
|
|
.copy-btn.copied {
|
|
background: #48bb78;
|
|
}
|
|
|
|
.info-box {
|
|
background: #edf2f7;
|
|
border-left: 4px solid #667eea;
|
|
padding: 15px;
|
|
border-radius: 6px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.info-box p {
|
|
color: #4a5568;
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
margin: 5px 0;
|
|
}
|
|
|
|
.error-message {
|
|
background: #fed7d7;
|
|
border-left: 4px solid #f56565;
|
|
color: #742a2a;
|
|
padding: 15px;
|
|
border-radius: 6px;
|
|
margin-bottom: 20px;
|
|
display: none;
|
|
}
|
|
|
|
.error-message.active {
|
|
display: block;
|
|
}
|
|
|
|
.loading {
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 3px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 50%;
|
|
border-top-color: white;
|
|
animation: spin 0.8s linear infinite;
|
|
margin-right: 10px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
.footer {
|
|
text-align: center;
|
|
padding: 20px;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.footer a {
|
|
color: white;
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.header h1 {
|
|
font-size: 24px;
|
|
}
|
|
|
|
.content {
|
|
padding: 30px 20px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div class="card">
|
|
<div class="header">
|
|
<h1>🚀 Get Your Free 7-Day Trial</h1>
|
|
<p>Start using FxMathQuant Strategy Generator today</p>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<!-- Error Message -->
|
|
<div id="error-message" class="error-message"></div>
|
|
|
|
<!-- Registration Form -->
|
|
<div id="form-section" class="form-section">
|
|
<div class="form-group">
|
|
<label for="email">Email Address</label>
|
|
<input type="email" id="email" placeholder="your@email.com" required>
|
|
</div>
|
|
|
|
<div class="info-box">
|
|
<p><strong>✨ What you'll get:</strong></p>
|
|
<p>• Full access to AI-powered strategy generation</p>
|
|
<p>• Unlimited strategy exports (MQ4, MQ5, Pine Script)</p>
|
|
<p>• 7 days of unrestricted use</p>
|
|
<p>• No credit card required</p>
|
|
</div>
|
|
|
|
<button id="submit-btn" class="btn" onclick="registerTrial()">
|
|
Get Free Trial License
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Success Screen -->
|
|
<div id="success-section" class="success-section">
|
|
<div class="success-icon">🎉</div>
|
|
<h2 style="color: #2d3748; margin-bottom: 15px;">Trial License Activated!</h2>
|
|
<p style="color: #4a5568; margin-bottom: 25px;">Your 7-day trial has been successfully created.</p>
|
|
|
|
<div class="license-box">
|
|
<p style="font-size: 14px; color: #718096; margin-bottom: 10px;">Your License Key:</p>
|
|
<div class="license-key" id="license-key">Loading...</div>
|
|
<button class="copy-btn" id="copy-btn" onclick="copyLicense()">
|
|
📋 Copy License Key
|
|
</button>
|
|
</div>
|
|
|
|
<div class="info-box">
|
|
<p><strong>📅 Valid until:</strong> <span id="expiry-date">-</span></p>
|
|
<p><strong>📧 Email:</strong> <span id="user-email">-</span></p>
|
|
</div>
|
|
|
|
<button class="btn" onclick="window.location.href='https://web.fxmathquant.com/login.html'">
|
|
� Login to FxMathQuant Panel
|
|
</button>
|
|
|
|
<button class="btn btn-secondary" onclick="window.location.href='manual.html'">
|
|
📚 View User Manual
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>© 2025 FxMathQuant. All rights reserved. | <a href="manual.html">User Manual</a></p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// API Configuration - Auto-detect local vs production
|
|
const isLocal = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1';
|
|
const API_URL = isLocal
|
|
? 'http://localhost/FxMathQuant-Server/api/create.php' // Local testing
|
|
: 'https://fxmath.com/quantw/api/create.php'; // Production
|
|
|
|
console.log('Using API URL:', API_URL);
|
|
|
|
let currentLicenseKey = '';
|
|
|
|
async function registerTrial() {
|
|
const email = document.getElementById('email').value.trim();
|
|
const submitBtn = document.getElementById('submit-btn');
|
|
const errorMsg = document.getElementById('error-message');
|
|
|
|
// Hide error
|
|
errorMsg.classList.remove('active');
|
|
|
|
// Validate email
|
|
if (!email || !isValidEmail(email)) {
|
|
showError('Please enter a valid email address');
|
|
return;
|
|
}
|
|
|
|
// Disable button and show loading
|
|
submitBtn.disabled = true;
|
|
submitBtn.innerHTML = '<span class="loading"></span> Creating your trial license...';
|
|
|
|
try {
|
|
const response = await fetch(API_URL, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify({
|
|
is_trial: true,
|
|
email: email
|
|
})
|
|
});
|
|
|
|
const data = await response.json();
|
|
|
|
if (data.success) {
|
|
// Show success screen
|
|
showSuccess(data.license);
|
|
} else {
|
|
showError(data.message || 'Failed to create trial license. Please try again.');
|
|
submitBtn.disabled = false;
|
|
submitBtn.innerHTML = 'Get Free Trial License';
|
|
}
|
|
} catch (error) {
|
|
console.error('Error:', error);
|
|
showError('Network error. Please check your connection and try again.');
|
|
submitBtn.disabled = false;
|
|
submitBtn.innerHTML = 'Get Free Trial License';
|
|
}
|
|
}
|
|
|
|
function showSuccess(license) {
|
|
currentLicenseKey = license.key;
|
|
|
|
// Update success screen
|
|
document.getElementById('license-key').textContent = license.key;
|
|
document.getElementById('expiry-date').textContent = license.expiry_date;
|
|
document.getElementById('user-email').textContent = license.email;
|
|
|
|
// Hide form, show success
|
|
document.getElementById('form-section').classList.add('hidden');
|
|
document.getElementById('success-section').classList.add('active');
|
|
}
|
|
|
|
function showError(message) {
|
|
const errorMsg = document.getElementById('error-message');
|
|
errorMsg.textContent = message;
|
|
errorMsg.classList.add('active');
|
|
}
|
|
|
|
function copyLicense() {
|
|
const copyBtn = document.getElementById('copy-btn');
|
|
|
|
navigator.clipboard.writeText(currentLicenseKey).then(() => {
|
|
copyBtn.textContent = '✅ Copied!';
|
|
copyBtn.classList.add('copied');
|
|
|
|
setTimeout(() => {
|
|
copyBtn.textContent = '📋 Copy License Key';
|
|
copyBtn.classList.remove('copied');
|
|
}, 2000);
|
|
}).catch(err => {
|
|
console.error('Failed to copy:', err);
|
|
alert('Failed to copy. Please select and copy manually.');
|
|
});
|
|
}
|
|
|
|
function isValidEmail(email) {
|
|
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
return re.test(email);
|
|
}
|
|
|
|
// Allow Enter key to submit
|
|
document.getElementById('email').addEventListener('keypress', function (e) {
|
|
if (e.key === 'Enter') {
|
|
registerTrial();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |