Rev | Line | |
---|
[9201] | 1 | <?php |
---|
[10337] | 2 | load_plugin_lang('watermark'); |
---|
| 3 | |
---|
[9201] | 4 | switch ($PLUGIN_ACTION) { |
---|
[12819] | 5 | // Affichage simple de la configuration |
---|
| 6 | case 'read_config': |
---|
| 7 | $PAGE['content'] .= ' |
---|
| 8 | <table> |
---|
| 9 | <tr> |
---|
| 10 | <td>'.l10n('watermark.waterFILE').' :</td> |
---|
| 11 | <td>'.$plugin_config['waterFILE'].'</td> |
---|
| 12 | </tr> |
---|
| 13 | <tr> |
---|
| 14 | <td>'.l10n('watermark.waterALPHA').' :</td> |
---|
| 15 | <td>'.$plugin_config['waterALPHA'].' %</td> |
---|
| 16 | </tr> |
---|
| 17 | </table>'; |
---|
| 18 | break; |
---|
| 19 | |
---|
| 20 | // Actions avant enregistrement |
---|
| 21 | case 'save_config': |
---|
| 22 | if (!is_decimal($_POST['Plugins']['watermark']['waterALPHA'])) { |
---|
| 23 | $_POST['Plugins']['watermark']['waterALPHA'] = 80; |
---|
| 24 | $ERRORS['conf'][] = array(l10n('watermark.waterALPHA'), 'must_be_integer'); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | break; |
---|
| 28 | |
---|
| 29 | // Formulaire d'édition |
---|
| 30 | case 'edit_config': |
---|
| 31 | $PAGE['content'] .= ' |
---|
| 32 | <table> |
---|
| 33 | <tr> |
---|
| 34 | <td>'.l10n('watermark.waterFILE').' :</td> |
---|
| 35 | <td><input type="text" name="Plugins[watermark][waterFILE]" value="'.$plugin_config['waterFILE'].'" size="10"/></td> |
---|
| 36 | </tr> |
---|
| 37 | <tr> |
---|
| 38 | <td>'.l10n('watermark.waterALPHA').' :</td> |
---|
| 39 | <td><input type="text" name="Plugins[watermark][waterALPHA]" value="'.$plugin_config['waterALPHA'].'" size="3"/>%</td> |
---|
| 40 | </tr> |
---|
| 41 | </table>'; |
---|
| 42 | break; |
---|
[9201] | 43 | } |
---|
| 44 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.