source: extensions/MenuRandomPhoto/admin.php @ 31844

Last change on this file since 31844 was 31780, checked in by romanf, 7 years ago

Fixes and UI change to show delay in s instead of ms

  • Property svn:executable set to *
File size: 967 bytes
Line 
1<?php
2
3defined('MRP_PATH') or die('Hacking attempt!');
4
5global $conf, $template, $page;
6
7if (isset($_POST['submit']))
8{
9  $conf['MRP'] = array(
10    'randompicture_preload' => $conf['MRP']['randompicture_preload'],
11    'square' => isset($_POST['square']),
12    );
13  if (isset($_POST['height']))
14    $conf['MRP']['height'] = $_POST['height'];
15  else
16    $conf['MRP']['height'] = 0;
17  if (isset($_POST['title']))
18    $conf['MRP']['title'] = $_POST['title'];
19  else
20    $conf['MRP']['title'] = '';
21  if (isset($_POST['delay']))
22    $conf['MRP']['delay'] = $_POST['delay']*1000;
23  else
24    $conf['MRP']['delay'] = 0;
25
26  conf_update_param('MRP', serialize($conf['MRP']));
27  $page['infos'][] = l10n('Information data registered in database');
28}
29
30$template->assign(array(
31  'MRP' => $conf['MRP'],
32  ));
33
34$template->set_filename('plugin_admin_content', realpath(MRP_PATH . 'template/admin.tpl'));
35$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
36
37?>
Note: See TracBrowser for help on using the repository browser.