3 require_once 'Pman.php';
5 class Pman_Core_DatabaseColumns extends Pman {
10 parent::getAuth(); // load company!
11 $au = $this->getAuthUser();
14 $this->jerr("Not authenticated", array('authFailure' => true));
16 if (!$au->pid() ) { // not set up yet..
17 $this->jerr("Not authenticated", array('authFailure' => true));
21 $this->authUser = $au;
25 function get($table) {
26 $d = DB_DAtaObject::Factory($table);
28 //echo '<PRE>';print_r($re);
31 foreach($re['join_names'] as $c=>$f) {
36 foreach($re['cols'] as $c=>$f) {
45 require_once 'Pman/Core/SimpleExcel.php';
46 $x = new Pman_Core_SimpleExcel(
47 array($bt,$et, $ut), array(
49 'vtop' => array('vAlign' => 'top'),
50 'vcenter' => array('vAlign' => 'vcenter'),
52 'percent' => array('vAlign' => 'vcenter', 'numFormat' => '0%'),
53 'money' => array('vAlign' => 'vcenter', 'numFormat' => '$#,###'),
54 'date' => array('vAlign' => 'vcenter', 'numFormat' => 'd/M/Y'),
58 'workbook' => 'Business',
59 'cols' => explode('|', 'keyIdentity_taxId|description|type|countryIso3|countryRegion|addr1|addr2|addr3|city|zip')
62 'workbook' => 'Employment',
63 'cols' => explode('|', 'emailAddress|identity_taxId')
66 'workbook' => 'Users',
67 'cols' => explode('|', 'generateLogin|firstName|middleName|lastName|emailAddress|locale|countryIso3|countryRegion|addr1|addr2|addr3|city|zip|userStatus')
72 $x->send('test_'. date('d_M_Y').'.xls');