34 lines
827 B
PHP
34 lines
827 B
PHP
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||
|
|
||
|
/**
|
||
|
* This class provides account management
|
||
|
*
|
||
|
* @package OSB
|
||
|
* @category Controllers
|
||
|
* @author Deon George
|
||
|
* @copyright (c) 2009-2013 Open Source Billing
|
||
|
* @license http://dev.osbill.net/license.html
|
||
|
*/
|
||
|
class Controller_Account extends Controller_TemplateDefault {
|
||
|
public function action_group() {
|
||
|
$output = '';
|
||
|
|
||
|
$cg = $this->ao->group->find_all();
|
||
|
|
||
|
foreach ($cg as $go) {
|
||
|
$output .= sprintf('Group %s: %s<br/>',$go->id,$go->display('name'));
|
||
|
|
||
|
foreach ($go->list_childgrps(TRUE) as $cgo)
|
||
|
$output .= sprintf('- %s: %s (%s)<br/>',$cgo->id,$cgo->display('name'),$cgo->parent_id);
|
||
|
|
||
|
$output .= sprintf('END Group %s<br/><br/>',$go->id);
|
||
|
}
|
||
|
|
||
|
Block::add(array(
|
||
|
'title'=>'Group Structure',
|
||
|
'body'=>$output,
|
||
|
));
|
||
|
}
|
||
|
}
|
||
|
?>
|