This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/application/classes/Controller/Affiliate/Account.php
2012-12-21 13:01:12 +11:00

44 lines
1.2 KiB
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides Affiliate Account functions
*
* @package OSB
* @subpackage Account
* @category Controllers/Affiliate
* @author Deon George
* @copyright (c) 2010 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Affiliate_Account extends Controller_TemplateDefault_Affiliate {
protected $secure_actions = array(
'list'=>TRUE,
);
/**
* Show a list of accounts
*/
public function action_list() {
Block::add(array(
'title'=>_('Customer List'),
'body'=>Table::display(
$this->filter(ORM::factory('Account')->list_active(),$this->ao->affiliate->id,'sortkey(TRUE)'),
25,
array(
'id'=>array('label'=>'ID','url'=>'user/account/view/'),
'accnum()'=>array('label'=>'Num'),
'name(TRUE)'=>array('label'=>'Account'),
'email'=>array('label'=>'Email'),
'invoices_due_total(NULL,TRUE)'=>array('label'=>'Invoices','class'=>'right'),
'count_services(TRUE,'.$this->ao->affiliate->id.')'=>array('label'=>'Services','class'=>'right'),
),
array(
'page'=>TRUE,
'type'=>'select',
'form'=>'user/account/view',
)),
));
}
}
?>