summaryrefslogtreecommitdiff
path: root/view/pageArticlesSimples.php
blob: d282964934195ce049de5ac7428f08ef9e45ffff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
// view/pageArticleSimple.php

// variable $css
ob_start();
if($page == 'menu')
{
?>
        <link rel="stylesheet" type="text/css" href="public/css/menu.css">
<?php
}
else
{
?>
        <link rel="stylesheet" type="text/css" href="public/css/pages_articles_simples.css">
<?php
}
?>
        <link rel="stylesheet" type="text/css" href="public/css/donnees_hors_editeur.css">
<?php
$css = ob_get_clean();

//variable $js
ob_start();
?>
        <script src="public/main.js"></script>
<?php
if(isset($_GET['action']) && $_GET['action'] == 'editor')
{

    // bibliothèques JS ckeditor
?>
        <script src="lib/ckeditor5/build/ckeditor.js"></script>
<?php
}
$js = ob_get_clean();


// message lecteur multimedia
if($page == 'archives')
{
    $explications = '<p style="padding: 3px 3px 0 3px; background-color: white;">
        <img style="float: right;" src="public/header_images/logo_real.png">
        Certains liens vidéos nécessitent le lecteur <a href="https://www.real.com" target="_blank" >Real Player</a> (windows, android et iOS) pour être lus.</p>
        <p>
        <img style="float: left;" src="public/header_images/logo_vlc.png">
        Vous pouvez aussi utiliser le<br/><a href="https://www.videolan.org/vlc/" target="_blank" >lecteur VLC.</a></p>';
    $headerImage = '<div class="photo" style="display: flex; height: fit-content;" >
        <div class="explications" >' . $explications . '</div>
        <div  id="photo_' . $page . '" ></div>
    </div>';
}
else
{
    $headerImage = '<div class="photo" id="photo_' . $page . '" ></div>';
}


// variable $header
ob_start();
echo "\n";
?>
            <header>
                
<?php
if($page == 'menu' && !empty($ArticlesContent))
{
?>
                <div class="sectionActu">
                    <div style="max-width: 20%;">
                        <img src="public/newspaper.png">
                    </div>
                    <div>
                        <?= $ArticlesContent ?>
                    </div>
                </div>
<?php
}
?>
                <div id="titre" >
                    <div class="police_titre" ><?= $headerPaintedTitle ?></div>
                </div>
<?php
if($page != 'menu')
{
    echo($headerImage);
}
?>
            </header>
 <?php
$header = ob_get_clean();


// variable $content
ob_start();
if($page == 'menu')
{
    echo($menu);
}
else
{
    echo($ArticlesContent);
}
$content = ob_get_clean();