hpdl
|
1856
|
1
|
<?php
|
|
2
|
/*
|
|
3
|
$Id: save.php 1863 2009-03-06 23:53:49Z hpdl $
|
|
4
|
|
|
5
|
osCommerce, Open Source E-Commerce Solutions
|
|
6
|
http://www.oscommerce.com
|
|
7
|
|
|
8
|
Copyright (c) 2009 osCommerce
|
|
9
|
|
|
10
|
This program is free software; you can redistribute it and/or modify
|
|
11
|
it under the terms of the GNU General Public License v2 (1991)
|
|
12
|
as published by the Free Software Foundation.
|
|
13
|
*/
|
|
14
|
|
|
15
|
class osC_Application_Languages_Actions_save extends osC_Application_Languages {
|
|
16
|
public function __construct() {
|
|
17
|
global $osC_Language, $osC_MessageStack;
|
|
18
|
|
|
19
|
parent::__construct();
|
|
20
|
|
|
21
|
$this->_page_contents = 'edit.php';
|
|
22
|
|
|
23
|
if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
|
|
24
|
$data = array('name' => $_POST['name'],
|
|
25
|
'code' => $_POST['code'],
|
|
26
|
'locale' => $_POST['locale'],
|
|
27
|
'charset' => $_POST['charset'],
|
|
28
|
'date_format_short' => $_POST['date_format_short'],
|
|
29
|
'date_format_long' => $_POST['date_format_long'],
|
|
30
|
'time_format' => $_POST['time_format'],
|
|
31
|
'text_direction' => $_POST['text_direction'],
|
|
32
|
'currencies_id' => $_POST['currencies_id'],
|
|
33
|
'numeric_separator_decimal' => $_POST['numeric_separator_decimal'],
|
|
34
|
'numeric_separator_thousands' => $_POST['numeric_separator_thousands'],
|
|
35
|
'parent_id' => $_POST['parent_id'],
|
|
36
|
'sort_order' => $_POST['sort_order']);
|
|
37
|
|
|
38
|
if ( osC_Languages_Admin::update($_GET['lID'], $data, (isset($_POST['default']) && ($_POST['default'] == 'on'))) ) {
|
|
39
|
$osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
|
|
40
|
} else {
|
|
41
|
$osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
|
|
42
|
}
|
|
43
|
|
|
44
|
osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module));
|
|
45
|
}
|
|
46
|
}
|
|
47
|
}
|
|
48
|
?>
|