48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
/**
|
|
* This class provides Siet Configuration Setup
|
|
*
|
|
* @package OSB
|
|
* @category Controllers/Admin
|
|
* @author Deon George
|
|
* @copyright (c) 2009-2013 Open Source Billing
|
|
* @license http://dev.osbill.net/license.html
|
|
*/
|
|
class Controller_Admin_Setup extends Controller_TemplateDefault {
|
|
protected $secure_actions = array(
|
|
'edit'=>TRUE,
|
|
);
|
|
|
|
/**
|
|
* View/Update the site configuration
|
|
*/
|
|
public function action_edit() {
|
|
$o = Company::instance()->so();
|
|
|
|
// Store our new values
|
|
$o->values($_POST);
|
|
|
|
// Run validation and save
|
|
if ($o->changed())
|
|
if ($o->check() AND $o->save())
|
|
SystemMessage::factory()
|
|
->title('Record updated')
|
|
->type('success')
|
|
->body(_('Your setup record has been updated.'));
|
|
|
|
Block::factory()
|
|
->title('Update Site Configuration')
|
|
->title_icon('icon-wrench')
|
|
->type('form-horizontal')
|
|
->body(View::factory('setup/admin/edit')->set('o',$o));
|
|
|
|
Block::factory()
|
|
->title('Update Module Configuration')
|
|
->title_icon('icon-wrench')
|
|
->type('form-horizontal')
|
|
->body(View::factory('setup/admin/module')->set('o',$o)->set('mid',NULL));
|
|
}
|
|
}
|
|
?>
|