Last change
on this file since 9201 was
9201,
checked in by mistic100, 13 years ago
|
[tools] PHP Optimisateur :
- Correction de bugs
- La plupart des types de fichiers sont supportés (testé avec jpg, png et gif)
- Réécriture de la gestion des plugins
- Nouvelle apparence
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php |
---|
2 | switch ($PLUGIN_ACTION) { |
---|
3 | // Affichage simple de la configuration |
---|
4 | case 'read_config': |
---|
5 | load_plugin_lang('watermark'); |
---|
6 | $PAGE_CONTENT[0] .= '<table> |
---|
7 | <tr> |
---|
8 | <td>'.l10n('watermark.waterFILE').' :</td> |
---|
9 | <td>'.$plugin_config['waterFILE'].'</td> |
---|
10 | </tr> |
---|
11 | <tr> |
---|
12 | <td>'.l10n('watermark.waterALPHA').' :</td> |
---|
13 | <td>'.$plugin_config['waterALPHA'].'%</td> |
---|
14 | </tr> |
---|
15 | </table>'; |
---|
16 | break; |
---|
17 | |
---|
18 | // Actions avant enregistrement |
---|
19 | case 'save_config': |
---|
20 | if (!is_decimal($_POST['Plugins']['watermark']['waterALPHA'])) { |
---|
21 | $_POST['Plugins']['watermark']['waterALPHA'] = 80; |
---|
22 | $Errors['ErrorConfig'] = 'notice'; |
---|
23 | } |
---|
24 | |
---|
25 | break; |
---|
26 | |
---|
27 | // Formulaire d'édition |
---|
28 | case 'edit_config': |
---|
29 | load_plugin_lang('watermark'); |
---|
30 | $PAGE_CONTENT[0] .= '<table> |
---|
31 | <tr> |
---|
32 | <td>'.l10n('watermark.waterFILE').' :</td> |
---|
33 | <td><input type="text" name="Plugins[watermark][waterFILE]" value="'.$plugin_config['waterFILE'].'" size="10"/></td> |
---|
34 | </tr> |
---|
35 | <tr> |
---|
36 | <td>'.l10n('watermark.waterALPHA').' :</td> |
---|
37 | <td><input type="text" name="Plugins[watermark][waterALPHA]" value="'.$plugin_config['waterALPHA'].'" size="3"/>%</td> |
---|
38 | </tr> |
---|
39 | </table>'; |
---|
40 | break; |
---|
41 | } |
---|
42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.