Test Failed
Push — master ( e3c39f...fe570d )
by Mihail
07:20
created

Apps/View/Install/default/_layouts/default.php (1 issue)

Labels
Severity
1
<?php
2
3
/** @var Ffcms\Templex\Template\Template $this */
4
5
?>
6
<!DOCTYPE html>
7
<html lang="en">
8
<head>
9
    <title><?= $title ?? 'no title'; ?></title>
10
    <meta charset="utf-8">
11
    <meta name="robots" content="noindex">
12
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
13
    <link rel="shortcut icon" href="<?= \App::$Alias->currentViewUrl ?>/assets/img/favicon.ico" type="image/x-icon">
14
    <link rel="icon" href="<?= \App::$Alias->currentViewUrl ?>/assets/img/favicon.ico" type="image/x-icon">
15
    <link rel="stylesheet" href="<?= \App::$Alias->scriptUrl ?>/vendor/twbs/bootstrap/dist/css/bootstrap.min.css" />
16
    <link rel="stylesheet" href="<?= \App::$Alias->scriptUrl ?>/vendor/components/font-awesome/css/font-awesome.min.css" />
17
    <link rel="stylesheet" href="<?= \App::$Alias->currentViewUrl ?>/assets/css/style.css" />
18
    <?php if (\App::$Properties->get('multiLanguage') && count(\App::$Properties->get('languages')) > 1): ?>
0 ignored issues
show
It seems like App::Properties->get('languages') can also be of type false; however, parameter $var of count() does only seem to accept Countable|array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

18
    <?php if (\App::$Properties->get('multiLanguage') && count(/** @scrutinizer ignore-type */ \App::$Properties->get('languages')) > 1): ?>
Loading history...
19
        <link rel="stylesheet" href="<?= \App::$Alias->scriptUrl ?>/vendor/phpffcms/language-flags/flags.css" />
20
    <?php endif; ?>
21
22
    <?= $this->section('css') ?>
23
    <!-- jquery usage after-load logic -->
24
    <script>(function(w,d,u){w.readyQ=[];w.bindReadyQ=[];function p(x,y){if(x=="ready"){w.bindReadyQ.push(y);}else{w.readyQ.push(x);}};var a={ready:p,bind:p};w.$=w.jQuery=function(f){if(f===d||f===u){return a}else{p(f)}}})(window,document)</script>
25
    <script>
26
        var script_url = '<?= \App::$Alias->scriptUrl ?>';
27
        var script_lang = '<?= \App::$Request->getLanguage() ?>';
28
        var site_url = '<?= \App::$Alias->baseUrl ?>';
29
    </script>
30
    <?php if (!isset($fullgrid)){ $fullgrid = false; } ?>
31
</head>
32
33
<body>
34
35
<header class="container">
36
    <div class="row">
37
        <div class="col-md-2">
38
            <img src="<?= \App::$Alias->currentViewUrl ?>/assets/img/logo.png" alt="logo" class="img-responsive" />
39
        </div>
40
        <div class="col-md-10">
41
            <h1>FFCMS 3</h1>
42
            <small><?= __('Fast, flexibility content management system with MVC framework inside!') ?></small>
43
            <?php if (\App::$Properties->get('multiLanguage') && count(\App::$Properties->get('languages')) > 1) {
44
                $list = $this->listing('ul', ['class' => 'list-inline']);
45
                foreach (\App::$Properties->get('languages') as $lang) {
46
                    $list->li([
47
                        'text' => '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="flag flag-' . $lang . '" alt="' . $lang . '">',
48
                        'link' => App::$Alias->baseUrlNoLang . '/' . $lang . App::$Request->getPathInfo(),
49
                        'html' => true
50
                    ], ['class' => 'list-inline-item']);
51
                }
52
                echo $list->display();
53
            } ?>
54
        </div>
55
    </div>
56
</header>
57
58
<main role="main" class="container body-container">
59
    <div class="row">
60
        <div class="col-12">
61
            <?php
62
            if ($this->section('body')) {
63
                // display notifications if exist
64
                $notifyMessages = \App::$Session->getFlashBag()->all();
65
                if (\Ffcms\Core\Helper\Type\Any::isArray($notifyMessages) && count($notifyMessages) > 0) {
66
                    foreach ($notifyMessages as $mType => $mArray) {
67
                        if ($mType === 'error') {
68
                            $mType = 'danger';
69
                        }
70
                        foreach ($mArray as $mText) {
71
                            echo $this->bootstrap()->alert($mType, $mText);
72
                        }
73
                    }
74
                }
75
                echo $this->section('body');
76
            } else {
77
                echo '<p>Page not found!</p>';
78
            }
79
            ?>
80
        </div>
81
    </div>
82
</main>
83
84
<footer class="container mt-md-3">
85
    <div class="row">
86
        <div class="col-md-12">
87
            <p>&copy; <?= date('Y') ?> website. Powered on <a href="https://ffcms.org">ffcms.org</a>.</p>
88
        </div>
89
    </div>
90
</footer>
91
92
<?= $this->section('javascript') ?>
93
94
<script src="<?= \App::$Alias->scriptUrl ?>/vendor/components/jquery/jquery.min.js"></script>
95
<script src="<?= \App::$Alias->scriptUrl ?>/vendor/phpffcms/ffcms-assets/node_modules/popper.js/dist/umd/popper.min.js"></script>
96
<script src="<?= \App::$Alias->scriptUrl ?>/vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script>
97
98
<!-- jQuery code interprier after library loaded -->
99
<script>(function($,d){$.each(readyQ,function(i,f){$(f)});$.each(bindReadyQ,function(i,f){$(d).bind("ready",f)})})(jQuery,document)</script>
100
</body>
101
</html>