<?php
$baseUrl = Yii::app()->getBaseUrl(false);
Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar');
?>
<!DOCTYPE html>
<html lang="<?php echo Yii::app()->language; ?>">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <meta http-equiv="Content-Security-Policy" content="object-src 'none';">
    <meta http-equiv="Content-Security-Policy" content="form-action 'self';">
    <meta http-equiv="Content-Security-Policy" content="base-uri 'self';">
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' *.youtube.com; font-src 'self'; img-src 'self' albaraka.com.sy *.albaraka.com.sy *.youtube.com *.openlayers.org  openlayers.org *.openstreetmap.org *.flexsolutions.biz;; media-src 'self' albaraka.com.sy *.albaraka.com.sy *.youtube.com *.openlayers.org  openlayers.org *.openstreetmap.org *.flexsolutions.biz;; style-src 'unsafe-inline' 'self' albaraka.com.sy *.albaraka.com.sy *.youtube.com *.openlayers.org  openlayers.org *.openstreetmap.org *.flexsolutions.biz; script-src 'unsafe-inline' 'self' albaraka.com.sy *.albaraka.com.sy *.youtube.com *.openlayers.org  openlayers.org *.openstreetmap.org *.flexsolutions.biz;">
    
    <meta name="Referrer-Policy" value="same-origin" />
    <meta name="referrer" content="same-origin">
    <title>
        <?php echo CHtml::encode($this->pageTitle); ?>
    </title>
    <meta property="og:locale" content="ar">
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1">

    <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
    <?php $this->renderSEO(); ?>
    <link rel="apple-touch-icon" sizes="57x57" href="<?php echo $baseUrl; ?>/images/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="<?php echo $baseUrl; ?>/images/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="<?php echo $baseUrl; ?>/images/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="<?php echo $baseUrl; ?>/images/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="<?php echo $baseUrl; ?>/images/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="<?php echo $baseUrl; ?>/images/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="<?php echo $baseUrl; ?>/images/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="<?php echo $baseUrl; ?>/images/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="<?php echo $baseUrl; ?>/images/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192" href="<?php echo $baseUrl; ?>/images/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="<?php echo $baseUrl; ?>/images/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="<?php echo $baseUrl; ?>/images/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="<?php echo $baseUrl; ?>/images/favicon-16x16.png">
    <!-- <link rel="manifest" href="/manifest.json"> -->
    <link rel="icon" href="<?php echo Yii::app()->request->baseUrl; ?>/images/favicon.png" type="image/gif">
    <link rel="stylesheet" href="<?php echo $baseUrl; ?>/css/reset.css" />
    <!-- blueprint CSS framework -->
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap.min.css">
    <?php if (Yii::app()->language == 'ar') { ?>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap-rtl.css">
    <?php } ?>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery-ui.structure.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery-ui.theme.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/animate.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/owl.carousel.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/owl.theme.default.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery-simple-mobilemenu.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/perfect-scrollbar.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/new-styles.css">
    <?php if (Yii::app()->language == 'ar') { ?>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/mainar.css">
    <?php } ?>

    <!--[if lt IE 9]>
<script src="<?php echo $baseUrl; ?>/js/html5shiv.js"></script>
<![endif]-->
</head>

<!-- ************************************************************* -->
<?php
$bodyClasses = "page-" . str_replace('/', '-', $this->route);
if ($this->route === 'page/view' && ($slug = Yii::app()->request->getQuery('slug', false))) {
    $bodyClasses .= " page-view-{$slug}";
}
?>

<body id="body" class="container-fluied <?php echo $bodyClasses; ?>">
    <div class="container-fluied" id="page">
        <div id="header" class="<?= Yii::app()->controller->id == 'site' && Yii::app()->controller->action->id == 'index' ? 'transparent-header' : 'white-header' ?>">
            <!-- Start Of Menus-->
            <?php $this->renderPartial('/layouts/main_menu'); ?>
            <?php $this->renderPartial('/layouts/social_tool'); ?>
            <?php $this->renderPartial('/layouts/mobile_menu'); ?>
        </div>
        <div id="content" class="<?= Yii::app()->controller->id != 'site' || (Yii::app()->controller->id == 'site' && Yii::app()->controller->action->id != 'index') ? 'padding-from-top' : '' ?>">
            <div id="flashes" class="row">
                <?php if (count(Yii::app()->user->getFlashes(false))) : ?>
                    <div class="flashes-container col-xs-12 clear clearfix">
                        <?php
                        foreach (Yii::app()->user->getFlashes() as $key => $message) {
                            echo '<div class="alert ' . $key . '">' . $message . "</div>\n";
                        }
                        ?>
                    </div>
                <?php endif; ?>
            </div>
            <?php echo $content; ?>
        </div>
    </div>
    <!-- footer -->
    <?php $this->renderPartial('/layouts/footer'); ?>
    <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-ui.min.js"></script>
    <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/perfect-scrollbar.min.js"></script>
    <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-simple-mobilemenu.min.js"></script>
    <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/script-main.js"></script>
    <!-- ************************************************************* -->
</body>

</html>