This commit is contained in:
2025-02-05 15:50:04 +05:30
parent 7f15dbfc08
commit 55448e34c6
38 changed files with 449 additions and 663 deletions

View File

@@ -1,39 +1,6 @@
<?php
if (isset($_POST['acceptCookies'])) {
setcookie("user_cookies", "accepted", time() + (86400 * 30), "/");
exit;
} elseif (isset($_POST['rejectCookies'])) {
setcookie("user_cookies", "rejected", time() + (86400 * 30), "/");
exit;
}
?>
<link rel="stylesheet" href="_cookies.css">
<link rel="stylesheet" href="assets/css/_cookies.css">
<div id="cookieBanner">
<p>By clicking "Accept All Cookies", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.</p>
<button class="cookie-settings">Cookies Settings</button>
<button class="reject" onclick="setCookieChoice('reject')">Reject All</button>
<button class="accept" onclick="setCookieChoice('accept')">Accept All Cookies</button>
<span class="close" onclick="hideBanner()">×</span>
<p>This website uses cookies to ensure you get the best experience on our website. <a href="/privacy-policy">Learn more</a>.</p>
<button class="accept" onclick="acceptCookies()">GOT IT!</button>
</div>
<script>
function setCookieChoice(choice) {
fetch("_cookies.php", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: choice === "accept" ? "acceptCookies=true" : "rejectCookies=true"
}).then(() => {
document.getElementById("cookieBanner").style.display = "none";
});
}
function hideBanner() {
document.getElementById("cookieBanner").style.display = "none";
}
window.onload = function() {
if (!document.cookie.includes("user_cookies")) {
document.getElementById("cookieBanner").style.display = "flex";
}
};
</script>
<script src="assets/js/_cookies.js"></script>

View File

@@ -10,10 +10,9 @@ if (session_status() === PHP_SESSION_NONE) {
<div class="logo">
<img src="assets/images/url.png" alt="Xeorl Logo" class="logo-img">
<span>Xeorl</span>
<span class="version-number">4.1.4</span>
<span class="version-number">4.2.3</span>
</div>
<!-- Burger Menu -->
<label class="burger">
<input type="checkbox" id="burger-toggle">
<span></span>
@@ -21,23 +20,21 @@ if (session_status() === PHP_SESSION_NONE) {
<span></span>
</label>
<!-- Sidebar -->
<div class="sidebar">
<nav>
<ul>
<li><a href="home.php" class="<?php echo in_array(basename($_SERVER['PHP_SELF']), ['index.php', 'home.php']) ? 'active disabled' : ''; ?>">Home</a></li>
<li><a href="monetization.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'monetization.php' ? 'active disabled' : ''; ?>">Monetization</a></li>
<?php if (isset($_SESSION['user_id'])): ?>
<li><a href="account.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'account.php' ? 'active disabled' : ''; ?>">Account</a></li>
<?php else: ?>
<li><a href="login.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'login.php' ? 'active disabled' : ''; ?>">Get-Started</a></li>
<?php endif; ?>
<li><a href="contact.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'contact.php' ? 'active disabled' : ''; ?>">Contact</a></li>
</ul>
</nav>
<nav>
<ul>
<li><a href="home.php" class="<?php echo in_array(basename($_SERVER['PHP_SELF']), ['index.php', 'home.php']) ? 'active disabled' : ''; ?>">Home</a></li>
<li><a href="monetization.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'monetization.php' ? 'active disabled' : ''; ?>">Monetization</a></li>
<?php if (isset($_SESSION['user_id'])): ?>
<li><a href="account.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'account.php' ? 'active disabled' : ''; ?>">Account</a></li>
<?php else: ?>
<li><a href="login.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'login.php' ? 'active disabled' : ''; ?>">Get-Started</a></li>
<?php endif; ?>
<li><a href="contact.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'contact.php' ? 'active disabled' : ''; ?>">Contact</a></li>
</ul>
</nav>
</div>
<!-- Regular Navigation (Hidden on Mobile) -->
<nav>
<ul>
<li><a href="home.php" class="<?php echo in_array(basename($_SERVER['PHP_SELF']), ['index.php', 'home.php']) ? 'active disabled' : ''; ?>">Home</a></li>
@@ -47,9 +44,9 @@ if (session_status() === PHP_SESSION_NONE) {
<?php else: ?>
<li><a href="login.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'login.php' ? 'active disabled' : ''; ?>">Get-Started</a></li>
<?php endif; ?>
<li><a href="contact.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'contact.php' ? 'active disabled' : ''; ?>">Contact</a></li>
<li><a href="home.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'contact.php' ? 'active disabled' : ''; ?>">Contact</a></li>
</ul>
</nav>
</div>
</header>
<script src="assets/js/_header.js"> </script>
<script src="assets/js/_header.js"></script>

View File

@@ -3,45 +3,104 @@
bottom: 0;
left: 0;
width: 100%;
background: white;
background: #ffffff;
box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
padding: 15px;
padding: 10px;
display: flex;
align-items: center;
justify-content: space-between;
font-family: Arial, sans-serif;
z-index: 10;
color: #333;
border-top: 1px solid #ddd;
font-size: 14px;
flex-wrap: wrap;
}
#cookieBanner p {
font-size: 14px;
color: #333;
font-size: 16px;
margin: 0;
flex: 1;
margin-left: 1.5em;
max-width: 70%;
line-height: 1.5;
}
button {
padding: 10px 15px;
border: 1px solid #002147;
cursor: pointer;
font-size: 14px;
border-radius: 4px;
margin: 0 5px;
}
.cookie-settings {
background: white;
color: #002147;
}
.reject, .accept {
background: #002147;
color: white;
}
.close {
font-size: 18px;
#cookieBanner a {
color: #677583;
font-weight: bold;
cursor: pointer;
margin-left: 10px;
text-decoration: none;
}
.accept {
font-family: "Montserrat", sans-serif;
padding: 10px 20px;
background-color: #4d555cec;
margin-right: 3em;
color: #ffffff;
border: none;
border-radius: 20px;
cursor: pointer;
font-weight: 600;
font-size: 14px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.082);
outline: none;
box-sizing: border-box;
transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.accept:hover {
background-color: #171C24;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.250);
}
/* Mobile and Tablet Responsive Styles */
@media (max-width: 720px) {
#cookieBanner p {
font-size: 16px;
margin: 0;
flex: 1;
margin-left: 1.5em;
max-width: 70%;
line-height: 1.5;
}
#cookieBanner a {
color: #677583;
font-weight: bold;
text-decoration: none;
}
.accept {
background-color:#171C24 ;
}
}
@media (max-width: 509px) {
#cookieBanner p {
font-size: 14px;
margin: 0;
flex: 1;
margin-left: 1.5em;
max-width: 70%;
line-height: 1.5;
}
#cookieBanner a {
text-decoration: none;
}
.accept {
font-size: 12px;
background-color:#171C24 ;
padding: 9px 18px;
}
}
@media (max-width: 409px){
.accept {
font-size: 12px;
background-color:#171C24 ;
padding: 8px 16px;
}
}

View File

@@ -52,7 +52,6 @@ h2 {
.countdown {
font-size: 16px;
font-weight: 400;
margin-top: -px;
color: rgb(70, 41, 204);
text-align: center;
}
@@ -83,17 +82,19 @@ button:active {
box-shadow: rgba(68, 68, 68, 0.572) 3px 2px 10px 0px;
cursor: pointer;
}
@media (max-width: 1170px){
.container{
@media (max-width: 1170px) {
.container {
width: 650px;
}
}
@media (max-width: 1024px){
.container{
@media (max-width: 1024px) {
.container {
width: 500px;
}
}
@media (max-width: 768px) {
.container {
padding: 40px 20px;
@@ -129,7 +130,6 @@ button:active {
font-size: 22px;
}
.countdown span {
font-size: 18px;
}

View File

@@ -0,0 +1,12 @@
function acceptCookies() {
document.cookie = "user_cookies=accepted; path=/; max-age=" + 60*60*24*30;
document.getElementById("cookieBanner").style.display = "none";
}
window.onload = function() {
if (document.cookie.indexOf("user_cookies") === -1) {
document.getElementById("cookieBanner").style.display = "flex";
} else {
document.getElementById("cookieBanner").style.display = "none";
}
};

View File

@@ -0,0 +1,23 @@
(function() {
function checkDevTools() {
console.clear();
console.log('%cSTOP!', 'color: red; font-size: 50px; font-weight: bold;');
console.log('%cThis is a browser feature intended for developers.', 'color: white; background: red; font-size: 16px; padding: 5px;');
console.log('%cIf someone told you to copy-paste something here to enable a premium feature or "hack" someone\'s account, it is a scam and will give them access to your Xeorl account.', 'color: white; background: black; font-size: 14px; padding: 5px;');
}
function detectDevTools() {
const threshold = 160;
const widthThreshold = 400;
if (
window.outerHeight - window.innerHeight > threshold ||
window.outerWidth - window.innerWidth > widthThreshold
) {
checkDevTools();
}
}
window.addEventListener('resize', detectDevTools);
setInterval(detectDevTools, 1000);
})();

View File

@@ -1,13 +1,7 @@
function storeEmailAndContinue() {
// Get the email entered by the user
var email = document.getElementById('email').value;
// Store the email in sessionStorage
sessionStorage.setItem('userEmail', email);
// Redirect to the next step
location.href = 'forgot_pass_step_two.php';
}
// Retrieve the email from sessionStorage and display it
document.getElementById('userEmail').textContent = sessionStorage.getItem('userEmail') || 'hygeonhealth@example.com';
document.getElementById('userEmail').textContent = sessionStorage.getItem('userEmail') || 'supportxeorl@example.com';

View File

@@ -1,66 +1,33 @@
// // Array of background image sources
// const images = ['assets/images/dna.jpg', 'assets/images/dna2.jpg', 'assets/images/dna3.jpg', 'assets/images/dna4.jpg'];
// let currentIndex = 0;
// function changeBackgroundImage() {
// const imgElement = document.getElementById('background-image');
// // Fade out
// imgElement.style.opacity = 0;
// setTimeout(() => {
// // Change image source
// currentIndex = (currentIndex + 1) % images.length;
// imgElement.src = images[currentIndex];
// // Fade in
// imgElement.style.opacity = 1;
// }, 800); // Match this timeout with the CSS transition duration
// }
// // Change image every 5 seconds
// setInterval(changeBackgroundImage, 5000);
// Password visibility toggle logic
const passwordField = document.getElementById('password-field');
const togglePassword = document.getElementById('toggle-password');
togglePassword.addEventListener('click', function () {
// Toggle between 'password' and 'text'
const type = passwordField.getAttribute('type') === 'password' ? 'text' : 'password';
passwordField.setAttribute('type', type);
// Optionally toggle the eye icon image (if different images are needed)
this.src = type === 'password' ? 'assets/images/eye.svg' : 'assets/images/eye-off.svg';
});
// Password Reset Function
function togglePasswordVisibility() {
const confirmPasswordInput = document.getElementById('confirmPassword');
if (confirmPasswordInput.type === 'password') {
confirmPasswordInput.type = 'text'; // Show password
} else {
confirmPasswordInput.type = 'password'; // Hide password
}
confirmPasswordInput.type = confirmPasswordInput.type === 'password' ? 'text' : 'password';
}
// Conform Password Seen Function
function resetPassword() {
const newPassword = document.getElementById('newPassword').value;
const confirmPassword = document.getElementById('confirmPassword').value;
const validationMessage = document.getElementById('validation-message');
if (newPassword.length < 8) {
showMessage('Password must be at least 8 characters long.', '#FF0000'); // Red color for error
showMessage('Password must be at least 8 characters long.', '#FF0000');
return;
}
if (newPassword !== confirmPassword) {
showMessage('Passwords do not match. Please try again.', '#FF0000'); // Red color for error
showMessage('Passwords do not match. Please try again.', '#FF0000');
return;
}
// Redirect or submit form after validation
location.href = 'password_reset_success.php'; // Change this to your success page
location.href = 'password_reset_success.php';
}
function showMessage(message, color) {
@@ -69,8 +36,7 @@ function showMessage(message, color) {
validationMessage.style.color = color;
validationMessage.style.display = 'block';
// Hide the message after 5 seconds (5000ms)
setTimeout(function() {
validationMessage.style.display = 'none';
}, 5000);
}
}

View File

@@ -2,7 +2,6 @@ document.addEventListener("DOMContentLoaded", function () {
const burgerToggle = document.getElementById("burger-toggle");
const sidebar = document.querySelector(".sidebar");
// Ensure sidebar is hidden initially
sidebar.style.display = "none";
burgerToggle.addEventListener("click", function () {
@@ -17,12 +16,11 @@ document.addEventListener("DOMContentLoaded", function () {
});
window.addEventListener('scroll', function () {
const header = document.querySelector('.header'); // Get the header element
const header = document.querySelector('.header');
// Check if the page has been scrolled
if (window.scrollY > 0) {
header.classList.add('scrolled'); // Add the "scrolled" class
header.classList.add('scrolled');
} else {
header.classList.remove('scrolled'); // Remove the "scrolled" class
header.classList.remove('scrolled');
}
});

View File

@@ -3,7 +3,6 @@ const form = document.querySelector(".shorten-form"),
shortenBtn = document.querySelector("#shorten-btn"),
linksList = document.querySelector("#links-list");
// Clear the list and show the "You don't have any shortened links" message
function resetLinksList() {
linksList.innerHTML = `
<li id="default-message">
@@ -18,7 +17,6 @@ function resetLinksList() {
`;
}
// Check session storage for existing links on page load
document.addEventListener("DOMContentLoaded", () => {
const savedLinks = sessionStorage.getItem("shortenedLinks");
if (savedLinks) {
@@ -35,17 +33,15 @@ shortenBtn.onclick = () => {
if (xhr.readyState == 4 && xhr.status == 200) {
let data = xhr.response;
if (data.length <= 5) {
//This is your domain name
const domain = "xeorl.buzz/";
// This is your shoeten domain name
const domain = "http://localhost/Php-Projects/xeorl/htdocs//";
let shortenURL = domain + data;
// Remove the default message if it exists
const defaultMessage = document.getElementById("default-message");
if (defaultMessage) {
defaultMessage.remove();
}
// Add the new link to the list
let newRow = `
<li>
<div class="link-icon"><img src="assets/images/url.png" class="logo-img"></div>
@@ -58,12 +54,9 @@ shortenBtn.onclick = () => {
</li>
`;
// Append the new link to the list and update session storage
linksList.insertAdjacentHTML('afterbegin', newRow);
sessionStorage.setItem("shortenedLinks", linksList.innerHTML);
// Clear the input field
urlInput.value = "";
urlInput.value = "";
} else {
alert(data);
}
@@ -74,7 +67,6 @@ shortenBtn.onclick = () => {
xhr.send(formData);
};
// Handle copy button clicks
document.addEventListener('click', function(e) {
if (e.target.closest('.copy-btn')) {
const linkInfo = e.target.closest('li').querySelector('.short-link').textContent;
@@ -84,13 +76,13 @@ document.addEventListener('click', function(e) {
}
});
// Handle members only delete button clicks!!
document.addEventListener('click', function(e) {
if (e.target.closest('.delete-btn')) {
alert("This feature is available for members only.");
}
});
// Handle delete button clicks
/*
document.addEventListener('click', function(e) {
@@ -118,5 +110,3 @@ document.addEventListener('click', function(e) {
}
});*/

View File

@@ -1,6 +1,3 @@
// script.js
// Add any form validation or interactivity here, like checking if the fields are filled
document.querySelector("form").addEventListener("submit", function(event) {
const inputs = document.querySelectorAll(".input-field");
let valid = true;
@@ -15,40 +12,14 @@ document.querySelector("form").addEventListener("submit", function(event) {
});
if (!valid) {
event.preventDefault(); // Prevent form submission if validation fails
event.preventDefault();
alert("Please fill all the fields.");
}
});
document.getElementById('toggle-password').addEventListener('click', function () {
const passwordField = document.getElementById('password-field');
const passwordType = passwordField.getAttribute('type') === 'password' ? 'text' : 'password';
passwordField.setAttribute('type', passwordType);
// Optionally, you can change the eye icon to an "eye-off" icon when the password is visible
this.src = passwordType === 'password' ? 'assets/images/eye.svg' : 'assets/images/eye-off.svg';
});
// // Array of background image sources
// const images = ['assets/images/wire.jpg', 'assets/images/internet.jpg','assets/images/redworld.jpg','assets/images/travel.jpg'];
// let currentIndex = 0;
// function changeBackgroundImage() {
// const imgElement = document.getElementById('background-image');
// // Fade out
// imgElement.style.opacity = 0;
// setTimeout(() => {
// // Change image source
// currentIndex = (currentIndex + 1) % images.length;
// imgElement.src = images[currentIndex];
// // Fade in
// imgElement.style.opacity = 1;
// }, 800); // Match this timeout with the CSS transition duration
// }
// // Change image every 5 seconds
// setInterval(changeBackgroundImage, 5000);

View File

@@ -1,10 +1,7 @@
// script.js
// Add any form validation or interactivity here, like checking if the fields are filled
document.querySelector("form").addEventListener("submit", function(event) {
const inputs = document.querySelectorAll(".input-field");
let valid = true;
inputs.forEach(input => {
if (input.value === "") {
valid = false;
@@ -15,39 +12,29 @@ document.querySelector("form").addEventListener("submit", function(event) {
});
if (!valid) {
event.preventDefault(); // Prevent form submission if validation fails
event.preventDefault();
alert("Please fill all the fields.");
}
});
document.getElementById('toggle-password').addEventListener('click', function () {
document.getElementById('toggle-password').addEventListener('click', function() {
const passwordField = document.getElementById('password-field');
const passwordType = passwordField.getAttribute('type') === 'password' ? 'text' : 'password';
passwordField.setAttribute('type', passwordType);
// Optionally, you can change the eye icon to an "eye-off" icon when the password is visible
this.src = passwordType === 'password' ? 'assets/images/eye.svg' : 'assets/images/eye-off.svg';
});
// // Array of background image sources
// const images = ['assets/images/dna.jpg', 'assets/images/dna2.jpg','assets/images/dna3.jpg','assets/images/dna4.jpg'];
// let currentIndex = 0;
function toggleSubmitButton() {
const checkbox = document.getElementById("agree");
const submitBtn = document.getElementById("submit-btn");
const errorMessage = document.getElementById("error-message");
// function changeBackgroundImage() {
// const imgElement = document.getElementById('background-image');
// // Fade out
// imgElement.style.opacity = 0;
if (checkbox.checked) {
submitBtn.disabled = false;
errorMessage.style.display = "none";
} else {
submitBtn.disabled = true;
}
}
// setTimeout(() => {
// // Change image source
// currentIndex = (currentIndex + 1) % images.length;
// imgElement.src = images[currentIndex];
// // Fade in
// imgElement.style.opacity = 1;
// }, 800); // Match this timeout with the CSS transition duration
// }
// // Change image every 5 seconds
// setInterval(changeBackgroundImage, 5000);
document.addEventListener("DOMContentLoaded", toggleSubmitButton);

View File

@@ -1,4 +1,3 @@
// Countdown logic
let countdown = 10;
let countdownInterval;
const timerElement = document.getElementById("timer");
@@ -10,15 +9,15 @@ function updateCountdown() {
timerElement.textContent = countdown;
}
if (countdown <= 0) {
button.disabled = false; // Enable the button when countdown ends
button.classList.add("active"); // Optional, if you use active class for style
button.style.cursor = "pointer"; // Enable cursor
setTimeout(function () {
button.textContent = "Getting links..."; // Change text before enabling
}, 300); // 0.3 seconds delay
setTimeout(function () {
button.textContent = "Get link"; // Final button text
}, 600); // After another 0.3 seconds
button.disabled = false;
button.classList.add("active");
button.style.cursor = "pointer";
setTimeout(() => {
button.textContent = "Getting links...";
}, 300);
setTimeout(() => {
button.textContent = "Get link";
}, 600);
clearInterval(countdownInterval);
}
}
@@ -32,14 +31,12 @@ function stopCountdown() {
}
function init() {
// Initialize countdown value and button state
countdown = 10;
timerElement.textContent = countdown;
button.disabled = true;
button.classList.remove("active");
button.style.cursor = "not-allowed";
button.textContent = "PLEASE WAIT...";
startCountdown();
}
@@ -52,11 +49,11 @@ document.addEventListener("visibilitychange", () => {
});
window.addEventListener("beforeunload", () => {
init(); // Reset state when the page is about to be unloaded
init();
});
init(); // Call init to initialize the countdown when the page loads
init();
function redirect() {
window.location.href = redirectUrl; // Redirect to the full URL
window.location.href = redirectUrl;
}

View File

@@ -1,23 +0,0 @@
//Right-click disable
document.addEventListener('contextmenu', event => event.preventDefault());
// Disable common keyboard shortcuts for developer tools
document.addEventListener('keydown', function(event) {
if (event.ctrlKey && (event.key === 'I' || event.key === 'i' || event.key === 'J' || event.key === 'j' || event.key === 'U' || event.key === 'u')) {
event.preventDefault();
}
if (event.key === 'F12') {
event.preventDefault();
}
});
// Detect developer tools opening
(function() {
const element = new Image();
Object.defineProperty(element, 'id', {
get: function() {
alert('Developer tools opened!');
}
});
console.log(element);
})();