source: extensions/Piwecard/admin/params.php @ 8812

Last change on this file since 8812 was 8812, checked in by tiico, 13 years ago

Add fck editor integration for admin page (thanks to Pat)

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $template, $page;
5 
6$me = get_plugin_data($plugin_id);
7
8
9if (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
18       
19        $me->my_config['subject_link'] = htmlspecialchars($_POST['ecard_subject_link']);
20        $me->my_config['message_link'] = htmlspecialchars($_POST['ecard_message_link']);
21        $me->my_config['message_HTML'] = stripslashes($_POST['ecard_message_html']);
22        $me->save_config();
23        array_push($page['infos'], l10n('ecard_admin_saveOK'));
24       
25}
26
27$template->append('ECARD_ACTIV',array('ID' => 0,'NAME' => l10n('ecard_nolimit'),'SELECTED' => ($me->my_config['activ'] == 0 ? 'selected' : '')));
28
29for($jj=5; $jj < 30; $jj+=5)
30{
31        $template->append('ECARD_ACTIV',array('ID' => $jj,'NAME' => $jj.' '.l10n('ecard_days'),'SELECTED' => ($me->my_config['activ'] == $jj ? 'selected' : '')));
32}
33
34for($jj=1; $jj < 20; $jj++)
35        $template->append('ECARD_NB_PAGE',array('ID' => $jj,'NAME' => $jj,'SELECTED' => ($me->my_config['nb_ecard_page'] == $jj ? 'selected' : '')));
36
37
38$template->assign('ECARD_SENDCOPY', $me->my_config['send_copy'] ? 'checked="checked"' : '');
39$template->assign('ECARD_MODIFEXPMAIL', $me->my_config['expmail_change'] ? 'checked="checked"' : '');
40$template->assign('ECARD_SENDHTML', $me->my_config['send_HTML'] ? 'checked="checked"' : '');
41$template->assign('ECARD_SHOWINFOS', $me->my_config['ecard_showinfos'] ? 'checked="checked"' : '');
42
43$template->assign('ECARD_SUBJECT_LINK', htmlspecialchars_decode($me->my_config['subject_link']));
44$template->assign('ECARD_MESSAGE_LINK', htmlspecialchars_decode($me->my_config['message_link']));
45$template->assign('ECARD_MESSAGE_HTML', htmlspecialchars_decode($me->my_config['message_HTML']));
46       
47// Use FCK Editor
48if (function_exists('set_fckeditor_instance'))
49{
50  set_fckeditor_instance('ecard_message_html', 'Full', '99%', '250px');
51}
52
53   
54$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/params.tpl');
55$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
56
57               
58
59
60?>
Note: See TracBrowser for help on using the repository browser.