<?php

     $page = $n_jin->db->get("pages", "homepage='1'");
     if($page!="nodata"){
         $njin["data"]["page_name"] = $njin["data"]["app_name"]." - Homepage";
         $n_jin->view('head', $njin["data"]);
         $t = $page[0]['tipe'];
         $page_id = $page[0]['id'];
         
         echo "<link rel='stylesheet' href='assets/tema/$t/parts.css' page_id='$page_id'><link rel='stylesheet' href='assets/css/n-view.css'>";
         echo base64_decode($page[0]['content']);
     }else echo "
     <style>
     body{
        background: #ccc;
        text-align: center;
        margin-top: 100px;
        font-size: 30px;
        color: #545353;
        text-transform: capitalize;
        font-family: sans-serif;
     }
     img{width:150px}
     a{
        background: #333;
        color: #fff;
        text-decoration: none;
        padding: 15px 30px;
        font-size: 20px;
        border-radius: 20px;
     }
     a:hover{
        opacity:.7;
     }
     </style>
     <img src='assets/images/logo.png'/>
     <p>Please add page first !!</p>
     <br/>
     <a href='edit'>Add page now</a>
     ";
?>

