<?php
header("Expires: 0");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

require_once 'ResourcesHolder/core/CoreSystem.php';
require_once 'ResourcesHolder/core/DAL/DAL.php';

$DAL = new DAL('constant.php');
$index = new CoreSystem();

if ($index->checkState() AND $DAL->Select("SELECT * FROM `app_notification` WHERE `ID`='" . @$_REQUEST['key'] . "'")) { ?>
    <!DOCTYPE html>
    <html>
    <!--<IfModule mod_headers.c>
        Header set Cache-Control "no-cache, no-store, must-revalidate"
        Header set Pragma "no-cache"
        Header set Expires 0
    </IfModule>-->
    <head>
        <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
        <meta http-equiv="Pragma" content="no-cache"/>
        <meta http-equiv="Expires" content="0"/>
        <?php
        $index->publicLoadPlugin(
            array('meta 1', 'meta 2', 'meta 3')
        );
        ?>
        <title><?php echo $index->Title(); ?></title>
        <?php
        $index->publicLoadPlugin(
            array(
                'Google Fonts Roboto',
                'Google Fonts Material',
                'fav 1',
                'Bootstrap Core Css',
                'Waves Effect Css',
                'Animation Css',
                'font awesome',
                'Custom Css',
                'Farsi Font',
                'AdminBSB Themes',
                'Jquery Core Js',
//                'Main Script',
                'Sweet Alert Css',
                'Select Plugin Css',
                'Bootstrap Tags Input Plugin Css',
                'TimePicker Css',
                'JQuery DataTable Css',
                'Jquery Spinner Plugin Css',
                'Multi Select Css',
                'JQuery Nestable Css',
                'Light Gallery Plugin Css',
                'Bootstrap Toggle Css',
//                'Security'
            )
        );
        ?>
    </head>
    <body class="theme-red">


    <div class="reset-this">
        <div class="four-zero-four">
            <div class="four-zero-four-container">
                <?php
                $data = $DAL->Select("SELECT `nContent` FROM `app_notification` WHERE `ID`='" . @$_REQUEST['key'] . "'");
                $data = $data[0];
                echo $data['nContent']; ?>
            </div>
        </div>
    </div>
    <?php
    $index->publicLoadPlugin(
        array(
            'Jquery CountTo Plugin Js',
            'Bootstrap Core Js ',
            'Select Plugin Js ',
            'Slimscroll Plugin Js ',
            'Waves Effect Plugin Js ',
            'Custom Js admin',
            'Demo Js',
            'Second Script',
            'Jquery Touch Events',
            'tooltips popovers',
            'Bootstrap Notify Plugin Js',
            'Jquery Validation Plugin Css',
            'JQuery Steps Plugin Js',
            'Copy Clip Bord',//for test
            'Sweet Alert Plugin Js',
            'Input Mask Plugin Js',
            'Select Plugin Js',
            'Bootstrap Tags Input Plugin Js',
            'Google Api Kay',
            'TimePicker Js',
            'Jquery DataTable Plugin Js',
            'Jquery Spinner Plugin Js',
            'Multi Select Js',
            'JQuery Nestable Js',
            'Light Gallery Plugin Js',
            'Bootstrap Toggle Js',
            'jQuery qr js',
            'TinyMC js',
        )
    );
    ?>
    </body>
    </html>
<?php } else { ?>

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html>
    <head>
        <title>500 Internal Server Error</title>
    </head>
    <body>
    <h1>Internal Server Error</h1>
    <p>The server encountered an internal error or
        misconfiguration and was unable to complete
        your request.</p>
    <p>Please contact the server administrator at
        webmaster@android.kashancard.digihelp.net to inform them of the time this error occurred,
        and the actions you performed just before this error.</p>
    <p>More information about this error may be available
        in the server error log.</p>
    <p>Additionally, a 500 Internal Server Error
        error was encountered while trying to use an ErrorDocument to handle the request.</p>
    </body>
    </html>
<?php } ?>
