Ignore:
Timestamp:
07/22/09 00:34:42 (11 years ago)
Author:
tiico
Message:

Some corrections
Add EN translation (only for the core, not for modules)
Add comment options (%ID)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Flash_Gallery/admin/admin.php

    r3531 r3663  
    5151} 
    5252 
     53//cyclage sur le parametre on_home 
     54if (isset($_GET['id']) and isset($_GET['home']) and !is_adviser()) 
     55{ 
     56    $home = $_GET['home']; 
     57    $global = isset($_GET['global']) ? $_GET['global'] : 'selective'; 
     58    // ordre : homeOFF -> HomeON -> HomeONGlobal 
     59    if ($home == 'true' and $global == 'selective') 
     60        $global = 'global'; 
     61    elseif ($home == 'true' and $global == 'global') 
     62        $home = 'false'; 
     63    else 
     64    { 
     65        $home = 'true'; 
     66        $global = 'selective'; 
     67    } 
     68 
     69        pwg_query( 'UPDATE ' . FLASHGAL_TABLE . ' 
     70                SET on_home="' . $home. '", on_home_global="' . $global . '"    
     71                WHERE id=' . $_GET['id'] . ' LIMIT 1'); 
     72 
     73  redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 
     74} 
     75//cyclage sur le parametre on_cats 
     76if (isset($_GET['id']) and isset($_GET['cats']) and !is_adviser()) 
     77{ 
     78    // ordre : catsOFF -> catsON  
     79        pwg_query( 'UPDATE ' . FLASHGAL_TABLE . ' 
     80                SET on_cats="' . ($_GET['cats'] == 'true' ? 'false' : 'true'). '"  
     81                WHERE id=' . $_GET['id'] . ' LIMIT 1'); 
     82 
     83  redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 
     84} 
     85 
     86if (isset($_GET['id']) and isset($_GET['recurs']) and !is_adviser()) 
     87{ 
     88    // ordre : recursOFF -> recursON  
     89        pwg_query( 'UPDATE ' . FLASHGAL_TABLE . ' 
     90                SET recurs_cats="' . ($_GET['recurs'] == 'true' ? 'false' : 'true'). '"  
     91                WHERE id=' . $_GET['id'] . ' LIMIT 1'); 
     92 
     93  redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 
     94} 
     95 
    5396//Récupération des modules disponibles 
    5497$modules = get_flashgal_modules(); 
Note: See TracChangeset for help on using the changeset viewer.