source: extensions/pdf2tab/admin/admin_config.php @ 19811

Last change on this file since 19811 was 19811, checked in by julien1311, 11 years ago

add an admin page to choose the extension to handle

  • Property svn:eol-style set to LF
File size: 914 bytes
Line 
1<?php
2//Initialization
3$conf_pdf2tab = unserialize($conf['pdf2tab']);
4
5load_language('plugin.lang', PDF2TAB_PATH);
6
7//Save config
8if (isset($_POST['submit'])) { 
9        $conf_pdf2tab['extensions'] = $_POST['pdf2tab_extensions'];
10        $conf_pdf2tab['extensions'] = explode(',', $conf_pdf2tab['extensions']);
11       
12        //Save
13        conf_update_param('pdf2tab', serialize($conf_pdf2tab));
14        array_push($page['infos'], l10n('Information data registered in database'));
15}
16
17//Parameters of the template
18if ($conf_pdf2tab['extensions'][0]=='')
19                $conf_pdf2tab['extensions'] = null;
20$template->assign('pdf2tab_extensions',$conf_pdf2tab['extensions']);
21
22//Add our template to the global template
23$template->set_filenames(
24        array(
25                'plugin_admin_content_general' => dirname(__FILE__).'/admin_config.tpl'
26        )
27);
28 
29//Assign the template contents to ADMIN_CONTENT
30$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content_general');
31?>
Note: See TracBrowser for help on using the repository browser.