source: extensions/Fotorama/admin.php @ 31844

Last change on this file since 31844 was 30368, checked in by JanisV, 9 years ago

Fixed missed values in config

File size: 2.5 KB
Line 
1<?php
2
3defined('FOTORAMA_PATH') or die('Hacking attempt!');
4
5global $conf, $template, $page;
6load_language('plugin.lang', FOTORAMA_PATH);
7
8if (isset($_POST['submit']))
9{
10  $old_conf = $conf;
11
12  $conf['Fotorama'] = array(
13    'shadows' => isset($_POST['shadows']),
14    'only_fullscreen' => isset($_POST['only_fullscreen']),
15    'autoplay' => isset($_POST['autoplay']),
16    'stopautoplayontouch' => isset($_POST['stopautoplayontouch']),
17    'loop' => isset($_POST['loop']),
18    'enable_caption' => isset($_POST['enable_caption']),
19    'replace_picture' => isset($_POST['replace_picture']),
20    'replace_picture_only_users' => isset($_POST['replace_picture_only_users']),
21    'clicktransition_crossfade' => isset($_POST['clicktransition_crossfade']),
22    'close_button' => isset($_POST['close_button']),
23    'resize' => isset($_POST['resize']),
24    'info_button' => isset($_POST['info_button']),
25    'square_thumb' => isset($_POST['square_thumb']),
26    );
27  if (isset($_POST['allowfullscreen']))
28    $conf['Fotorama']['allowfullscreen'] = $_POST['allowfullscreen'];
29  else
30    $conf['Fotorama']['allowfullscreen'] = $old_conf['Fotorama']['allowfullscreen'];
31  if (isset($_POST['fit']))
32    $conf['Fotorama']['fit'] = $_POST['fit'];
33  else
34    $conf['Fotorama']['fit'] = $old_conf['Fotorama']['fit'];
35  if (isset($_POST['transition']))
36    $conf['Fotorama']['transition'] = $_POST['transition'];
37  else
38    $conf['Fotorama']['transition'] = $old_conf['Fotorama']['transition'];
39  if (isset($_POST['nav']))
40    $conf['Fotorama']['nav'] = $_POST['nav'];
41  else
42    $conf['Fotorama']['nav'] = $old_conf['Fotorama']['nav'];
43  if (isset($_POST['fullscreen_nav']))
44    $conf['Fotorama']['fullscreen_nav'] = $_POST['fullscreen_nav'];
45  else
46    $conf['Fotorama']['fullscreen_nav'] = $old_conf['Fotorama']['fullscreen_nav'];
47  if (isset($_POST['thumbheight']))
48    $conf['Fotorama']['thumbheight'] = $_POST['thumbheight'];
49  else
50    $conf['Fotorama']['thumbheight'] = $old_conf['Fotorama']['thumbheight'];
51  if (isset($_POST['period']))
52    $conf['Fotorama']['period'] = $_POST['period'];
53  else
54    $conf['Fotorama']['period'] = $old_conf['Fotorama']['period'];
55
56  conf_update_param('Fotorama', serialize($conf['Fotorama']));
57  $page['infos'][] = l10n('Information data registered in database');
58}
59
60$template->assign(array(
61  'Fotorama' => $conf['Fotorama'],
62  ));
63
64$template->set_filename('plugin_admin_content', realpath(FOTORAMA_PATH . 'template/admin.tpl'));
65$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
66
67?>
Note: See TracBrowser for help on using the repository browser.