source: extensions/Fotorama/admin.php @ 31696

Last change on this file since 31696 was 30368, checked in by JanisV, 10 years ago

Fixed missed values in config

File size: 2.5 KB
RevLine 
[27148]1<?php
2
3defined('FOTORAMA_PATH') or die('Hacking attempt!');
4
5global $conf, $template, $page;
[30052]6load_language('plugin.lang', FOTORAMA_PATH);
[27148]7
8if (isset($_POST['submit']))
9{
[30368]10  $old_conf = $conf;
11
[27148]12  $conf['Fotorama'] = array(
13    'shadows' => isset($_POST['shadows']),
[27343]14    'only_fullscreen' => isset($_POST['only_fullscreen']),
[27148]15    'autoplay' => isset($_POST['autoplay']),
16    'stopautoplayontouch' => isset($_POST['stopautoplayontouch']),
17    'loop' => isset($_POST['loop']),
[29384]18    'enable_caption' => isset($_POST['enable_caption']),
[29615]19    'replace_picture' => isset($_POST['replace_picture']),
20    'replace_picture_only_users' => isset($_POST['replace_picture_only_users']),
[29622]21    'clicktransition_crossfade' => isset($_POST['clicktransition_crossfade']),
[29730]22    'close_button' => isset($_POST['close_button']),
[29732]23    'resize' => isset($_POST['resize']),
[29918]24    'info_button' => isset($_POST['info_button']),
[29928]25    'square_thumb' => isset($_POST['square_thumb']),
[27148]26    );
27  if (isset($_POST['allowfullscreen']))
28    $conf['Fotorama']['allowfullscreen'] = $_POST['allowfullscreen'];
[30368]29  else
30    $conf['Fotorama']['allowfullscreen'] = $old_conf['Fotorama']['allowfullscreen'];
[27148]31  if (isset($_POST['fit']))
32    $conf['Fotorama']['fit'] = $_POST['fit'];
[30368]33  else
34    $conf['Fotorama']['fit'] = $old_conf['Fotorama']['fit'];
[27148]35  if (isset($_POST['transition']))
36    $conf['Fotorama']['transition'] = $_POST['transition'];
[30368]37  else
38    $conf['Fotorama']['transition'] = $old_conf['Fotorama']['transition'];
[27155]39  if (isset($_POST['nav']))
40    $conf['Fotorama']['nav'] = $_POST['nav'];
[30368]41  else
42    $conf['Fotorama']['nav'] = $old_conf['Fotorama']['nav'];
[27342]43  if (isset($_POST['fullscreen_nav']))
44    $conf['Fotorama']['fullscreen_nav'] = $_POST['fullscreen_nav'];
[30368]45  else
46    $conf['Fotorama']['fullscreen_nav'] = $old_conf['Fotorama']['fullscreen_nav'];
[29593]47  if (isset($_POST['thumbheight']))
48    $conf['Fotorama']['thumbheight'] = $_POST['thumbheight'];
[30368]49  else
50    $conf['Fotorama']['thumbheight'] = $old_conf['Fotorama']['thumbheight'];
[29915]51  if (isset($_POST['period']))
52    $conf['Fotorama']['period'] = $_POST['period'];
[30368]53  else
54    $conf['Fotorama']['period'] = $old_conf['Fotorama']['period'];
[27148]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
[30048]64$template->set_filename('plugin_admin_content', realpath(FOTORAMA_PATH . 'template/admin.tpl'));
65$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
[27148]66
[30052]67?>
Note: See TracBrowser for help on using the repository browser.