";
}
+ $this->plainHeader[]= "";
}
}
}
@@ -294,7 +322,7 @@ class listing {
// Fill with contents, sort as configured
foreach ($this->entries as $row => $entry) {
- $trow ="
\n";
+ $trow= "";
// Render multi select if needed
if ($this->multiSelect) {
@@ -307,23 +335,24 @@ class listing {
// Save rendered column
$sort= preg_replace('/.*>([^<]+)<.*$/', '$1', $renderedCell);
+ $sort= preg_replace('/ /', '', $sort);
if (preg_match('/', $sort)){
$sort= "";
}
$this->entries[$row]["_sort$index"]= $sort;
}
- $trow.="
\n";
// Save rendered entry
$this->entries[$row]['_rendered']= $trow;
-
- $alt++;
}
// Complete list by sorting entries for _sort$index and appending them to the output
$entryIterator= new listingSortIterator($this->entries, $this->sortDirection[$this->sortColumn], "_sort".$this->sortColumn, $this->sortType);
foreach ($entryIterator as $row => $entry){
+ $alt++;
+ $result.="
\n";
$result.= $entry['_rendered'];
+ $result.="
\n";
}
// Need to fill the list if it's not full (nobody knows why this is 22 ;-))
@@ -401,7 +430,7 @@ class listing {
}
// Save base
- if (isset($_POST['BASE']) && $this->baseMode == true) {
+ if (isset($_POST['BASE']) && $this->baseMode) {
$base= validate($_POST['BASE']);
if (isset($this->bases[$base])) {
$this->base= $base;
@@ -417,6 +446,18 @@ class listing {
}
}
+ // Filter POST with "act" attributes -> posted from action menu
+ if (isset($_POST['exec_act']) && $_POST['act'] != '') {
+ if (preg_match('/^export.*$/', $_POST['act']) && isset($this->exporter[$_POST['act']])) {
+ $exporter= $this->exporter[$_POST['act']];
+ $userinfo= ", "._("created by")." ".$ui->cn." - ".strftime('%A, %d. %B %Y, %H:%M:%S');
+ $instance= new $exporter['class']($this->headline.$userinfo, $this->plainHeader, $this->entries, $this->exportColumns);
+ $type= call_user_func(array($exporter['class'], "getInfo"));
+ $type= $type[$_POST['act']];
+ send_binary_content($instance->query(), $type['filename'], $type= $type['mime']);
+ }
+ }
+
// Filter GET with "act" attributes
if (isset($_GET['act'])) {
$key= validate($_GET['act']);
@@ -471,7 +512,7 @@ class listing {
}
- function getBase($base)
+ function setBase($base)
{
$this->base= $base;
}
@@ -552,6 +593,10 @@ class listing {
function renderBase()
{
+ if (!$this->baseMode) {
+ return;
+ }
+
$result= "