[8771] | 1 | <?php |
---|
| 2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | global $template, $page; |
---|
| 5 | |
---|
| 6 | $me = get_plugin_data($plugin_id); |
---|
| 7 | |
---|
[8812] | 8 | |
---|
[8771] | 9 | if (isset($_POST['submit'])) { |
---|
| 10 | |
---|
| 11 | $me->my_config['activ'] = $_POST['ecard_activ']; |
---|
| 12 | $me->my_config['send_copy'] = isset($_POST['ecard_sendcopy']); |
---|
| 13 | $me->my_config['expmail_change'] = isset($_POST['ecard_modifexpmail']); |
---|
| 14 | $me->my_config['send_HTML'] = isset($_POST['ecard_sendhtml']); |
---|
| 15 | $me->my_config['ecard_showinfos'] = isset($_POST['ecard_showinfos']); |
---|
| 16 | $me->my_config['nb_ecard_page'] = $_POST['ecard_nb_page']; |
---|
| 17 | |
---|
[9342] | 18 | $me->my_config['defaultmail'] = $_POST['defaultmail']; |
---|
| 19 | |
---|
[8771] | 20 | |
---|
| 21 | $me->my_config['subject_link'] = htmlspecialchars($_POST['ecard_subject_link']); |
---|
| 22 | $me->my_config['message_link'] = htmlspecialchars($_POST['ecard_message_link']); |
---|
| 23 | $me->my_config['message_HTML'] = stripslashes($_POST['ecard_message_html']); |
---|
| 24 | $me->save_config(); |
---|
| 25 | array_push($page['infos'], l10n('ecard_admin_saveOK')); |
---|
| 26 | |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | $template->append('ECARD_ACTIV',array('ID' => 0,'NAME' => l10n('ecard_nolimit'),'SELECTED' => ($me->my_config['activ'] == 0 ? 'selected' : ''))); |
---|
| 30 | |
---|
| 31 | for($jj=5; $jj < 30; $jj+=5) |
---|
| 32 | { |
---|
| 33 | $template->append('ECARD_ACTIV',array('ID' => $jj,'NAME' => $jj.' '.l10n('ecard_days'),'SELECTED' => ($me->my_config['activ'] == $jj ? 'selected' : ''))); |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | for($jj=1; $jj < 20; $jj++) |
---|
| 37 | $template->append('ECARD_NB_PAGE',array('ID' => $jj,'NAME' => $jj,'SELECTED' => ($me->my_config['nb_ecard_page'] == $jj ? 'selected' : ''))); |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | $template->assign('ECARD_SENDCOPY', $me->my_config['send_copy'] ? 'checked="checked"' : ''); |
---|
| 41 | $template->assign('ECARD_MODIFEXPMAIL', $me->my_config['expmail_change'] ? 'checked="checked"' : ''); |
---|
| 42 | $template->assign('ECARD_SENDHTML', $me->my_config['send_HTML'] ? 'checked="checked"' : ''); |
---|
| 43 | $template->assign('ECARD_SHOWINFOS', $me->my_config['ecard_showinfos'] ? 'checked="checked"' : ''); |
---|
| 44 | |
---|
[9342] | 45 | $template->assign('ECARD_DEFAULT_MAIL', $me->my_config['defaultmail']); |
---|
| 46 | |
---|
[8771] | 47 | $template->assign('ECARD_SUBJECT_LINK', htmlspecialchars_decode($me->my_config['subject_link'])); |
---|
| 48 | $template->assign('ECARD_MESSAGE_LINK', htmlspecialchars_decode($me->my_config['message_link'])); |
---|
| 49 | $template->assign('ECARD_MESSAGE_HTML', htmlspecialchars_decode($me->my_config['message_HTML'])); |
---|
| 50 | |
---|
[8812] | 51 | // Use FCK Editor |
---|
| 52 | if (function_exists('set_fckeditor_instance')) |
---|
| 53 | { |
---|
| 54 | set_fckeditor_instance('ecard_message_html', 'Full', '99%', '250px'); |
---|
| 55 | } |
---|
[8771] | 56 | |
---|
[8812] | 57 | |
---|
[8771] | 58 | $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/params.tpl'); |
---|
| 59 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | ?> |
---|