1 | <?php |
---|
2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
3 | include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
4 | |
---|
5 | $template->set_filename('plugin_admin_content', dirname(__FILE__).'/admin.tpl'); |
---|
6 | |
---|
7 | if (!isset($_GET['tab'])) |
---|
8 | $page['tab'] = 'config'; |
---|
9 | else |
---|
10 | $page['tab'] = $_GET['tab']; |
---|
11 | |
---|
12 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
13 | |
---|
14 | $tabsheet = new tabsheet(); |
---|
15 | $tabsheet->add( 'config', 'Configuration', add_url_params( $my_base_url, array('tab'=>'config') ) ); |
---|
16 | $tabsheet->add( 'edit', 'Edit', add_url_params( $my_base_url, array('tab'=>'edit') ) ); |
---|
17 | $tabsheet->add( 'sync', 'Synchronize', add_url_params( $my_base_url, array('tab'=>'sync') ) ); |
---|
18 | $tabsheet->select($page['tab']); |
---|
19 | |
---|
20 | $tabsheet->assign(); |
---|
21 | |
---|
22 | $my_base_url = $tabsheet->sheets[ $page['tab'] ]['url']; |
---|
23 | $template->set_filename( 'tab_data', dirname(__FILE__).'/admin_'.$page['tab'].'.tpl' ); |
---|
24 | include_once( dirname(__FILE__).'/admin_'.$page['tab'].'.php'); |
---|
25 | $template->assign_var_from_handle( 'TAB_DATA', 'tab_data'); |
---|
26 | $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); |
---|
27 | |
---|
28 | if ( empty($conf['gmaps_api_key']) ) |
---|
29 | $page['infos'][] = 'Please define the Google maps api key'; |
---|
30 | |
---|
31 | ?> |
---|