source: extensions/ContactForm/admin/config.php @ 24347

Revision 24347, 1.5 KB checked in by mistic100, 6 years ago (diff)

force footer contact link when the form is public

Line 
1<?php
2if (!defined('CONTACT_FORM_PATH')) die('Hacking attempt!');
3
4// save config
5if (isset($_POST['save_config']))
6{
7  $conf['ContactForm'] = array(
8    'cf_ready' =>             $conf['ContactForm']['cf_ready'],
9    'cf_must_initialize' =>   false,
10    'cf_menu_link' =>         isset($_POST['cf_menu_link']),
11    'cf_subject_prefix' =>    trim($_POST['cf_subject_prefix']),
12    'cf_default_subject' =>   trim($_POST['cf_default_subject']),
13    'cf_allow_guest' =>       isset($_POST['cf_allow_guest']),
14    'cf_mandatory_mail' =>    isset($_POST['cf_mandatory_mail']),
15    'cf_mandatory_name' =>    isset($_POST['cf_mandatory_name']),
16    'cf_mail_type' =>         $_POST['cf_mail_type'],
17    'cf_redirect_url' =>      ($_POST['cf_redirect_url']!='http://') ? $_POST['cf_redirect_url'] : null,
18    'cf_theme' =>             $_POST['cf_theme'],
19    );
20  $conf['ContactForm_before'] = $_POST['cf_before'];
21  $conf['ContactForm_after'] = $_POST['cf_after'];
22 
23  conf_update_param('ContactForm', serialize($conf['ContactForm']));
24  conf_update_param('ContactForm_before', $conf['ContactForm_before']);
25  conf_update_param('ContactForm_after', $conf['ContactForm_after']);
26 
27  array_push($page['infos'], l10n('Information data registered in database'));
28}
29
30
31// display config
32$template->assign($conf['ContactForm']);
33$template->assign(array(
34  'cf_before' => stripslashes($conf['ContactForm_before']),
35  'cf_after' => stripslashes($conf['ContactForm_after']),
36  ));
37
38$template->set_filename('contact_form', realpath(CONTACT_FORM_PATH . 'admin/template/config.tpl'));
39
40?>
Note: See TracBrowser for help on using the repository browser.