<?php 
session_start();	
include("app/models/connect.php");

if( $_SESSION['id_user'] != "" && $_SESSION['profile_full'] == true ){ 
}
else{
    echo '
        <script>
            window.location = "https://acrossco2020.com/";
        </script>
    '; 
}

$query = mysqli_query($connect,"SELECT * FROM Asistentes WHERE id = '".$_SESSION['id_user']."' ");
$data = mysqli_fetch_array($query);

?>


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Certificado de Asistencia Across 2020 - <?php echo $data["nombre"]." ".$data["apellidos"]; ?></title>
    <link rel="icon" href="<?php echo $url; ?>/icon_fora.ico">
    <style>
    
    body{
        margin: 0;
        padding: 0;
        background-color: #ffffff;
        font-family: sans-serif;
        color:#000000;
    }

    .bt_print{
        position: fixed;
        right: 15px;
        top: 15px;
        background-color: #e35b32;
        padding: 5px;
        padding-left: 10px;
        padding-right: 10px;
        color: #fff;
        border: 0;
        border-radius: 15px;
    }
    </style>
</head>

<body>
    <div align="center" style="width: 100%">
        <button onclick="window.print()" class="bt_print" style="background-color: #c12846">Imprimir / Descargar</button>
        <div clas="contenido">
            <img src="img/base_certificado_across.jpg" style="width: 900px">
            <div style="margin-top: -460px; position: relative;z-index: 1; color: #487fb7;font-size: 30px;"><?php echo $data["nombre"]." ".$data["apellidos"]; ?></div>
        </div>
    </div>
    
    
    <style media="print">
        body{
            margin: 0;
            padding: 0;
            background-color: #0a3043;
            font-family: sans-serif;
            color:#ffffff;
        }
        
        
         .bt_print {
            display:none;
         }  
        
        @page { 
            size: landscape;
            margin: 0; 
            color: #ffffff;
        }
    body { 
        
    }
    </style> 
    
</body>
</html>