Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

serveur / conf.php @ 481b2efd

Historique | Voir | Annoter | Télécharger (2,08 ko)

1
<?php
2

    
3
/** **********************************************************************************
4
 *
5
 *  Projet ClicAlbum  - Licence: GNU/Affero GPL v3 ou +
6
 *
7
 *  (c) 2020 Éric Seigne <eric.seigne@cap-rel.fr>
8
 *
9
 *   This file is part of ClicAlbum.
10
 *
11
 *   ClicAlbum is free software: you can redistribute it and/or modify
12
 *   it under the terms of the GNU General Public License as published by
13
 *   the Free Software Foundation, either version 3 of the License, or
14
 *   (at your option) any later version.
15
 *
16
 *   ClicAlbum is distributed in the hope that it will be useful,
17
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 *   GNU General Public License for more details.
20
 *
21
 *   You should have received a copy of the GNU General Public License
22
 *   along with ClicAlbum. If not, see <https://www.gnu.org/licenses/>.
23
 *
24
 * ***********************************************************************************/
25

    
26
session_start();
27
require_once "tools.php";
28

    
29
include "Parsedown.php";
30

    
31
print html_head();
32

    
33
if ($_POST["op"] == "setOptions") {
34
    if ($_SESSION["currentAlbumAdmin"] == true) {
35
        $album = $_SESSION['currentAlbum'];
36
        $moderation    = $_POST['moderation'];
37
        $notification     = $_POST['notification'];
38
        $notificationTo = $_POST['notificationTo'];
39
        myDebug("on demande a modifier la config de l'album $album pour avoir $moderation et $notification -> $notificationTo");
40
        set_albumConf($album, $moderation, $notification, $notificationTo);
41
    }
42
} else if (($_SESSION["currentAlbum"] == $_GET['album']) && ($_SESSION["currentAlbumAdmin"] == true)) {
43
    myDebug("  On essaye d'accéder à l'album : " . $_SESSION['currentAlbum']);
44

    
45
    //On affiche le formulaire de configuration de l'album ...
46

    
47
    print album_options($_SESSION["currentAlbum"]);
48

    
49
    print html_tail();
50
} else {
51
    myDebug("On affiche le formulaire d'administration pour " . $_SESSION["currentAlbum"] . " | " . $_GET['album'] . " et " . $_SESSION["currentAlbumAdmin"]);
52
    echo display_adminForm();
53
    print html_tail();
54
}
Redmine Appliance - Powered by TurnKey Linux