'direct', 'label' => l10n('Web Form'), ), array( 'code' => 'applications', 'label' => l10n('Applications'), ), ); if ($conf['enable_synchronization']) { array_push( $tabs, array( 'code' => 'ftp', 'label' => l10n('FTP + Synchronization'), ) ); } $tab_codes = array_map( create_function('$a', 'return $a["code"];'), $tabs ); if (isset($_GET['section']) and in_array($_GET['section'], $tab_codes)) { $page['tab'] = $_GET['section']; } else { $page['tab'] = $tabs[0]['code']; } $tabsheet = new tabsheet(); foreach ($tabs as $tab) { $tabsheet->add( $tab['code'], $tab['label'], PHOTOS_ADD_BASE_URL.'&section='.$tab['code'] ); } $tabsheet->select($page['tab']); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | template init | // +-----------------------------------------------------------------------+ $template->set_filenames( array( 'photos_add' => 'photos_add_'.$page['tab'].'.tpl' ) ); // +-----------------------------------------------------------------------+ // | Load the tab | // +-----------------------------------------------------------------------+ include(PHPWG_ROOT_PATH.'admin/photos_add_'.$page['tab'].'.php'); ?>