X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman%2FRoo.php;fp=Pman%2FRoo.php;h=78c897f668f144d7f853c2262e2fef99a0809666;hb=6011e266592a47f4099d963d34ecba4c4ee38f73;hp=362dfb78a90a295a2ccbf623490a259e3e1d7b4a;hpb=a9c16597a7f5a636e742b68a53d28de5ecdcc011;p=Pman.Base diff --git a/Pman/Roo.php b/Pman/Roo.php index 362dfb7..78c897f 100644 --- a/Pman/Roo.php +++ b/Pman/Roo.php @@ -502,7 +502,23 @@ class Pman_Roo extends Pman //echo "
"; print_r(array($_REQUEST['csvCols'], $x->toArray())); exit; $line = array(); + if ($cols== '*') { + $cols= array_keys($x); + } + + if(!is_array($cols)) { + $cols = explode(',', $cols); + } + if ($titles !== false) { + if ($titles== '*') { + $titles= array_keys($x); + } + + if(!is_array($titles)) { + $titles = explode(',', $titles); + } + foreach($cols as $i=>$col) { $se_config['cols'][] = array( 'header'=> isset($titles[$i]) ? $titles[$i] : $col, @@ -522,17 +538,15 @@ class Pman_Roo extends Pman $titles = false; } - - $se->addLine($se_config['workbook'], $x); } + if(!$se){ $this->jerr('no data found'); } + $se->send($fn .'.xls'); exit; - - }