Changeset 17945 for extensions/ContactForm/include/contact_form.inc.php
- Timestamp:
- Sep 16, 2012, 5:20:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/include/contact_form.inc.php
r17483 r17945 15 15 { 16 16 $contact = array( 17 'author' => trim($_POST['author']), 18 'email' => trim($_POST['email']), 19 'subject' => trim($_POST['subject']), 20 'content' => $_POST['content'], 17 'author' => trim($_POST['author']), 18 'email' => trim($_POST['email']), 19 'group' => @$_POST['group'], 20 'subject' => trim($_POST['subject']), 21 'content' => $_POST['content'], 21 22 ); 22 23 … … 47 48 'author' => $user['username'], 48 49 'email' => $user['email'], 50 'group' => null, 49 51 'subject' => l10n($conf['ContactForm']['cf_default_subject']), 50 52 'content' => null, … … 67 69 } 68 70 71 $query = ' 72 SELECT DISTINCT group_name 73 FROM '. CONTACT_FORM_TABLE .' 74 ORDER BY group_name 75 ;'; 76 $result = pwg_query($query); 77 78 $groups = array(); 79 while ($data = pwg_db_fetch_assoc($result)) 80 { 81 $groups[ $data['group_name'] ] = !empty($data['group_name']) ? l10n($data['group_name']) : l10n('Default'); 82 } 83 84 if (count($groups) > 1) 85 { 86 $template->assign('GROUPS', $groups); 87 } 88 69 89 $template->assign(array( 70 90 'contact' => $contact, … … 77 97 )); 78 98 79 $template->set_filename('index', dirname(__FILE__).'/../template/contact_form.tpl');99 $template->set_filename('index', realpath(CONTACT_FORM_PATH . 'template/contact_form.tpl')); 80 100 81 101 ?>
Note: See TracChangeset
for help on using the changeset viewer.