forked from Piwigo/ContactForm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
30 lines (23 loc) · 850 Bytes
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
if (!defined('CONTACT_FORM_PATH')) die('Hacking attempt!');
global $template, $page;
$page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : 'config';
// tabsheet
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
$tabsheet = new tabsheet();
$tabsheet->add('config', l10n('Configuration'), CONTACT_FORM_ADMIN . '-config');
$tabsheet->add('emails', l10n('E-mails'), CONTACT_FORM_ADMIN . '-emails');
$tabsheet->select($page['tab']);
$tabsheet->assign();
// include page
include(CONTACT_FORM_PATH . 'admin/' . $page['tab'] . '.php');
if (!$conf['ContactForm_ready'])
{
$page['errors'][] = l10n('No active email address');
}
// template
$template->assign(array(
'CONTACT_FORM_PATH' => CONTACT_FORM_PATH,
'CONTACT_FORM_ADMIN' => CONTACT_FORM_ADMIN,
));
$template->assign_var_from_handle('ADMIN_CONTENT', 'contact_form');