source: extensions/ContactForm/admin.php @ 23884

Last change on this file since 23884 was 23207, checked in by mistic100, 11 years ago

fix loop redirect when no email configured

File size: 872 bytes
Line 
1<?php
2if (!defined('CONTACT_FORM_PATH')) die('Hacking attempt!');
3
4global $template, $page;
5
6$page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : 'config';
7
8// tabsheet
9include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');   
10$tabsheet = new tabsheet();
11$tabsheet->add('config', l10n('Configuration'), CONTACT_FORM_ADMIN . '-config');
12$tabsheet->add('emails', l10n('E-mails'), CONTACT_FORM_ADMIN . '-emails');
13$tabsheet->select($page['tab']);
14$tabsheet->assign();
15
16// include page
17include(CONTACT_FORM_PATH . 'admin/' . $page['tab'] . '.php');
18
19if (!$conf['ContactForm']['cf_ready'])
20{
21  array_push($page['errors'], l10n('No active email address'));
22}
23
24// template
25$template->assign(array(
26  'CONTACT_FORM_PATH' => CONTACT_FORM_PATH,
27  'CONTACT_FORM_ADMIN' => CONTACT_FORM_ADMIN,
28  ));
29
30$template->assign_var_from_handle('ADMIN_CONTENT', 'contact_form');
31
32?>
Note: See TracBrowser for help on using the repository browser.