Sindbad~EG File Manager

Current Path : /home/beeson/public_html/WebMathXpert/
Upload File :
Current File : //home/beeson/public_html/WebMathXpert/testAdjustParameter.php

<?php
header('Content-Type: text/html; charset=UTF-8');
// Set HTTP header to prevent caching
header("Cache-Control: no-cache, must-revalidate");

// Start or resume the session
session_start();
$sessionId = session_id();  // guaranteed not to contain a pipe character
ini_set('display_errors', 1);
error_reporting(E_ALL);

// Configure server settings based on the environment
if ($_SERVER['SERVER_NAME'] == 'localhost') {
    $serverAddress = 'localhost';  
    $username = $password = null;
} else {
    $serverAddress = 'mathxpert.org'; 
    $username = 'beeson'; 
    $password = 'Turing2024';
}

$serverPort = 12349; // Adjust the server port. Ending in 9 for the Engine; in 7 for Polygon
$timeout = 3600; // Connection timeout in seconds. If the server does not respond by then, close the socket.

// Redirect to HTTPS if not already secure
if (!(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
    $redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: ' . $redirect);
    exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=0">
    <title>MathXpert Grapher</title>
	 <style>
		.popup-container {
			position: absolute;
			background-color: lightblue !important;
			border: 1px solid black;
			padding: 10px;
			box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
			z-index: 5000; /* Ensure it appears above other elements */
			display: flex;
			flex-direction: column;
			align-items: center; /*  align labels and sliders */
			width: 180px; /* Set a fixed width to prevent resizing and flicker */ 
			pointer-events: all !important; /* Make sure the popup can capture events */
		}

		.popup-container label {
			margin-bottom: 5px;
			text-align:left;
			width: 100%;
			display: block;  
			background-color: lightblue;
		}

		.popup-container input[type="range"] {
			width: 100%;
			margin-bottom: 10px;
		}

		.popup-container button {
			display: block;
			margin: 0 auto; 
			background-color:lightyellow;
		}
	  </style>
    <script src="AdjustParameter.js"></script>


</head>
<body>
	 <div id='container' > </div>
    <script>
	 // Global array of parameters already defined in AdjustParameter.js
	parameters = [
	     { name: 'a', value: 2.0, increment: 0.1, index: 1 },
	     { name: 'b', value: 3.0, increment: 0.05, index: 0 },
	     // Add more parameter objects as needed
	 ];
	
	 container = document.getElementById('container');
        document.addEventListener('DOMContentLoaded', function() {
            adjustParameter(100, 100, 0, container);
        });
    </script>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists