source: extensions/Back2Front/admin.php @ 10852

Last change on this file since 10852 was 10852, checked in by mistic100, 13 years ago

improve process, add options for link effect

File size: 867 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $conf, $template;
5load_language('plugin.lang', B2F_PATH);
6$conf['back2front'] = explode(',', $conf['back2front']);
7
8// Enregistrement de la configuration
9if (isset($_POST['submit']))
10{
11        $conf['back2front'] = array($conf['back2front'][0], $_POST['switch_mode'], $_POST['transition']);
12                       
13    $query = 'UPDATE ' . CONFIG_TABLE . '
14                SET value="' . implode (',', $conf['back2front']) . '"
15                WHERE param="back2front"';
16    pwg_query($query);
17       
18        array_push($page['infos'], l10n('Information data registered in database'));
19}
20
21$template->assign(array(
22        'SWITCH_MODE' => $conf['back2front'][1],
23        'TRANSITION' => $conf['back2front'][2],
24));
25       
26$template->set_filename('back2front_conf', dirname(__FILE__).'/template/admin.tpl');
27$template->assign_var_from_handle('ADMIN_CONTENT', 'back2front_conf');
28
29?>
Note: See TracBrowser for help on using the repository browser.