Ignore:
Timestamp:
Jun 16, 2011, 12:54:59 PM (13 years ago)
Author:
mistic100
Message:

add a list of all SmartAlbums

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/admin.php

    r11381 r11392  
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    33
    4 global $conf, $template;
     4global $conf, $template, $page;
     5
    56load_language('plugin.lang', SMART_PATH);
    67if (!is_array($conf['SmartAlbums'])) $conf['SmartAlbums'] = unserialize($conf['SmartAlbums']);
    78
    8 
    9 // Enregistrement de la configuration
    10 if (isset($_POST['submit']))
    11 {
    12         $conf['SmartAlbums'] = array(
    13     'update_on_upload' => isset($_POST['update_on_upload']),
    14     );   
    15        
    16   conf_update_param('SmartAlbums', serialize($conf['SmartAlbums']));
    17         array_push($page['infos'], l10n('Information data registered in database'));
    18 }
     9include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
     10$page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'albums';
     11 
     12$tabsheet = new tabsheet();
     13$tabsheet->add('albums', l10n('All SmartAlbums'), SMART_ADMIN.'-albums');
     14$tabsheet->add('config', l10n('Configuration'),   SMART_ADMIN.'-config');
     15$tabsheet->select($page['tab']);
     16$tabsheet->assign();
    1917
    2018$template->assign(array(
    2119  'SMART_PATH' => SMART_PATH,
    22         'update_on_upload' => $conf['SmartAlbums']['update_on_upload'],
    2320));
    24        
    25 $template->set_filename('SmartAlbums_conf', dirname(__FILE__).'/template/admin.tpl');
    26 $template->assign_var_from_handle('ADMIN_CONTENT', 'SmartAlbums_conf');
     21
     22include(SMART_PATH.'admin/'.$page['tab'].'.inc.php');
     23$template->set_filename('SmartAlbums_content', dirname(__FILE__).'/admin/template/'.$page['tab'].'.tpl');
     24$template->assign_var_from_handle('ADMIN_CONTENT', 'SmartAlbums_content');
    2725
    2826?>
Note: See TracChangeset for help on using the changeset viewer.