Ignore:
Timestamp:
May 5, 2020, 1:29:47 PM (4 years ago)
Author:
ddtddt
Message:

[PersoFooter]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PersoFooter/admin.php

    r31458 r32179  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Perso Footer plugin for piwigo                                        |
     3// | Perso Footer plugin for Piwigo by TEMMII                              |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011 - 2016 ddtddt             http://temmii.com/piwigo/ |
     5// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    3333//-------------------------------------------------------- sections definitions
    3434
    35           if (!is_webmaster())
    36   {
    37     array_push($page['errors'], l10n('This section is reserved for the webmaster'));
    38   }
    39   else
    40   {
     35if (!is_webmaster()){
     36  $_SESSION['page_errors'] = array(l10n('This section is reserved for the webmaster'));
     37}else{
    4138
    42 // Gestion des onglets
     39 // Tab manage
    4340if (!isset($_GET['tab']))
    4441    $page['tab'] = 'gest';
     
    5249$tabsheet->assign();
    5350
    54 // Onglet gest
     51// tab gest
    5552switch ($page['tab']){
    5653  case 'gest':
     54 
     55  global $pwg_loaded_plugins;
    5756   
    5857  $template->assign('gestA',array('PFTBASE' => $conf['persoFooter'],));
    59     $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
    60         if($PAED['state'] == 'active'){
    61           $template->assign('useED',1);
    62     }else{
    63       $template->assign('useED',0);
    64     }
     58  if (isset($pwg_loaded_plugins['ExtendedDescription'])){
     59        $template->assign('useED',1);
     60  }else{
     61    $template->assign('useED',0);
     62  }
    6563
    66 if (isset($_POST['submitpft']))
    67         {
    68 conf_update_param('persoFooter', $_POST['perso_footer']);
    69 $template->assign(
    70     'gestA',
    71     array('PFTBASE' => stripslashes($_POST['perso_footer']),));
    72         array_push($page['infos'], l10n('Configuration update'));
    73         }
     64  if (isset($_POST['submitpft'])){
     65    conf_update_param('persoFooter', $_POST['perso_footer']);
     66    $template->assign(
     67      'gestA',
     68        array('PFTBASE' => stripslashes($_POST['perso_footer']),));
     69                $_SESSION['page_infos'] = array(l10n('Configuration update'));
     70  }
    7471  break;
     72 
    7573  case 'help':
    76 $template->assign(
     74  $template->assign(
    7775    'gestB',
    78         array('meta'=>l10n('nul'),));
     76          array('meta'=>l10n('nul'),));
    7977       
    8078  break;
Note: See TracChangeset for help on using the changeset viewer.