<?php


if (isset($_GET['id'])) {
    $id = $_GET['id'];

    $conn = get_instance()->db->conn_id;
    $sql = "SELECT * FROM page WHERE id='$id'";
    $result = $conn->query($sql);
    $row = $result->fetch_assoc();
    ?>
    <!doctype html>
    <html lang="en">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <head>
            <meta charset="utf-8">
            <title>View Page Demo</title>
            <!--<link href="<?php echo editor() ?>css/theme.css" rel="stylesheet"
                  type="text/css" />-->
            <!--<link rel="stylesheet" href="<?php echo editor() ?>css/bootnavbar.css">-->
            <style>
               <?php
                $fff =  html_entity_decode($row['style']);
                echo  str_replace('&#039;', '"', $fff);
                ?>
            </style>
        </head>
        <body>

            <?php
             $data = htmlspecialchars_decode($row['content']);
             $string = str_replace('&#039;', '"', $data);
             echo str_replace('\n', ' ', $string);
            ?>
            <script src="<?php echo editor() ?>js/jquery.min.js"
            type="text/javascript"></script>
            <script src="<?php echo editor() ?>js/popper.min.js"
            type="text/javascript"></script>

      
        </body>
    </html>
    <style type="text/css">
        #in0cq9-trigger
        {
            display: none;
        }
        div.modal[data-type="grapesjs-modal"].fade .modal-dialog
        {
            transform :none!important;
        }
        @media (min-width: 992px)
        {
            div.modal[data-type="grapesjs-modal"] .modal-lg {
            width: 400px;
            }

        }
        @media (max-width: 760px)
        {
            #i3zky span
            {
                font-size: 30px!important;
            }

        }
        
        #i5x94v button {
                background: rgb(0, 195, 77);
                animation: 2s cubic-bezier(0, 0, 0.58, 1) 0s infinite normal none running rocking;
                transition: all 0.2s ease 0s;
                margin-right: auto;
                margin-left: auto;
                color: rgb(255, 255, 255);
                font-weight: bold;
                display: inline-block;
                font-size: 22px;
                text-shadow: rgb(0 0 0 / 20%) 1px 1px 0px;
                border-width: 1px 1px 3px;
                border-style: solid;
                border-color: rgba(0, 0, 0, 0.2);
                border-image: initial;
                box-shadow: rgb(255 255 255 / 20%) 0px 0px 0px 2px inset;
                border-radius: 3px;
                text-decoration-line: none !important;
                padding: 10px 25px!important;
                font-family: Roboto, Helvetica, sans-serif;
                text-align: center;
                
            }
            .elButtonSub {
    display: block;
    opacity: 0.7;
    font-weight: normal;
}
iframe 
        {
            border-color: #000!important;
        }

    </style>
    <script type="text/javascript">
        $("#i5x94v button").html('<span class="elButtonMain"><i class="fa fa_prepended fa-angle-double-right"></i> RESERVE MY SPOT NOW </span><span class="elButtonSub mfs_13" style="font-size: 14px;">( For Less Than 0ne Pizza Only Rs 99)</span>');   
  
    </script>
    <?php
}else{
    header('Location: list.php');
}
?>