TRUE, 'index'=>TRUE, 'list'=>TRUE, ); /** * Export plugins must define an export action. */ public function action_export() { $this->auto_render = FALSE; if (empty($_POST['export_module_id']) OR ! ($emo = ORM::factory('Export_Module',$_POST['export_module_id'])) OR ! $emo->loaded()) HTTP::redirect(URL::link('reseller','export/index')); $emo->export->plugin($emo)->export($this->response); } /** * Select our primary export target */ public function action_index() { $output = ''; $output .= Form::open(URL::link('reseller','export/list')); $output .= Form::select('eid',ORM::factory('Export')->list_select()); $output .= Form::button('submit','Submit',array('class'=>'btn btn-primary')); $output .= Form::hidden('days',$this->request->param('id')); $output .= Form::close(); Block::factory() ->title('Select Export Target') ->title_icon('icon-share') ->body($output); } /** * This is the main call to export, providing a list of items to export and * setting up the page to call the export plugin when submitted. */ public function action_list() { if (empty($_POST['eid'])) HTTP::redirect(URL::link('reseller','export/index')); $eo = ORM::factory('Export',$_POST['eid']); if (! $eo->loaded()) HTTP::redirect(URL::link('reseller','export/index')); $c = 0; $output = '