mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-27 10:48:04 -05:00
Tom git-svn-id: svn+ssh://jekkos@svn.code.sf.net/p/opensourcepos/code/@24 c3eb156b-1dc0-44e1-88ae-e38439141b53
46 lines
1.4 KiB
PHP
46 lines
1.4 KiB
PHP
<?php
|
|
require_once ("secure_area.php");
|
|
class Config extends Secure_area
|
|
{
|
|
function __construct()
|
|
{
|
|
parent::__construct('config');
|
|
}
|
|
|
|
function index()
|
|
{
|
|
$this->load->view("config");
|
|
}
|
|
|
|
function save()
|
|
{
|
|
$batch_save_data=array(
|
|
'company'=>$this->input->post('company'),
|
|
'address'=>$this->input->post('address'),
|
|
'phone'=>$this->input->post('phone'),
|
|
'email'=>$this->input->post('email'),
|
|
'fax'=>$this->input->post('fax'),
|
|
'website'=>$this->input->post('website'),
|
|
'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'),
|
|
'default_tax_1_name'=>$this->input->post('default_tax_1_name'),
|
|
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
|
|
'default_tax_2_name'=>$this->input->post('default_tax_2_name'),
|
|
'currency_symbol'=>$this->input->post('currency_symbol'),
|
|
'return_policy'=>$this->input->post('return_policy'),
|
|
'language'=>$this->input->post('language'),
|
|
'timezone'=>$this->input->post('timezone'),
|
|
'print_after_sale'=>$this->input->post('print_after_sale')
|
|
);
|
|
|
|
if($_SERVER['HTTP_HOST'] !='ospos.pappastech.com' && $this->Appconfig->batch_save($batch_save_data))
|
|
{
|
|
echo json_encode(array('success'=>true,'message'=>$this->lang->line('config_saved_successfully')));
|
|
}
|
|
else
|
|
{
|
|
echo json_encode(array('success'=>false,'message'=>$this->lang->line('config_saved_unsuccessfully')));
|
|
|
|
}
|
|
}
|
|
}
|
|
?>
|