fetch_assoc()):
$outputLinesArray[$rowCounter] = "";
for ($i = 0; $i < $fieldLength; $i++) :
$tmpVarName = $fieldArray[$i];
// Check if parameter is a combined value like "stat.business_volume"
// then split for suffix and get only "business_volume"
$tmpVarNameSuffix = $tmpVarName;
if (!(strpos($tmpVarName, ".") === FALSE)) :
$tmpVarNameSuffix = substr($tmpVarName, strrpos($tmpVarName,".") + 1);
endif;
${$tmpVarName} = $row[$tmpVarName];
// Optional summation of one or more fields
/*
if ($summationField != "" && ($tmpVarName == $summationField) && is_numeric(${$tmpVarName})) :
$sumOfSummationField += ${$tmpVarName};
endif;
if ($summationField2 != "" && ($tmpVarName == $summationField2) && is_numeric(${$tmpVarName})) :
$sumOfSummationField2 += ${$tmpVarName};
endif;
for ($k = 0; $k < $summationFieldArrayLen; $k++) :
if ($summationFieldArray[$k] != "" && ($tmpVarName == $summationFieldArray[$k]) && is_numeric(${$tmpVarName})) :
$sumOfSummationFieldArray[$k] += ${$tmpVarName};
endif;
endfor;
for ($k = 0; $k < $summationFieldArray2Len; $k++) :
if ($summationFieldArray2[$k] != "" && ($tmpVarName == $summationFieldArray2[$k]) && is_numeric(${$tmpVarName})) :
$sumOfSummationFieldArray2[$k] += ${$tmpVarName};
endif;
endfor;
*/
// Set prefix if requested
if ($fieldsToSetPrefixLen > 0) :
for ($k = 0; $k < $fieldsToSetPrefixLen; $k += 2) :
if ($fieldsToSetPrefix[$k] == $tmpVarName) :
// ATTENTION: Only if the content begins with a number !!!
if (is_numeric(substr(${$tmpVarName},0,1))) :
${$tmpVarName} = $fieldsToSetPrefix[$i + 1] . ${$tmpVarName};
endif;
endif;
endfor;
endif;
$out = formatOutput(${$tmpVarName},$outputFormatField[$tmpVarName]);
$out = str_replace(" ", "", $out);
if ($tmpVarName == $postParserField) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField2) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField3) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField4) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField5) : $outputLinesArray[$rowCounter] .= ""; endif;
$outputLinesArray[$rowCounter] .= $out;
if ($tmpVarName == $postParserField) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField2) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField3) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField4) : $outputLinesArray[$rowCounter] .= ""; endif;
if ($tmpVarName == $postParserField5) : $outputLinesArray[$rowCounter] .= ""; endif;
$outputLinesArray[$rowCounter] .= $delimiter;
endfor;
$rowCounter++;
endwhile;
endif;
// Entries of the list from MATRIX
if ($mode == "2") :
$rowArrayLen = count($rowArray);
$rowCounter = $rowArrayLen;
for ($j = 0; $j < $rowArrayLen; $j++) :
$outputLinesArray[$j] = "";
for ($i = 0; $i < $fieldLength; $i++) :
$tmpVarName = $fieldArray[$i];
// Check if parameter is a combined value like "stat.business_volume"
// then split for suffix and get only "business_volume"
$tmpVarNameSuffix = $tmpVarName;
if (!(strpos($tmpVarName, ".") === FALSE)) :
$tmpVarNameSuffix = substr($tmpVarName, strrpos($tmpVarName,".") + 1);
endif;
$outputType = $outputFormatField[$tmpVarNameSuffix];
// Special treatment:
if ($tmpVarName == "stat.jb_finishtime") : $outputType = "varchar"; endif;
// ${$tmpVarName} = $rowArray[$j][$tmpVarName];
${$tmpVarName} = $rowArray[$j][$tmpVarNameSuffix]; // current content of the field
// Optional summation of one or more fields
/*
if ($summationField != "" && ($tmpVarName == $summationField) && is_numeric(${$tmpVarName})) :
$sumOfSummationField += ${$tmpVarName};
endif;
if ($summationField2 != "" && ($tmpVarName == $summationField2) && is_numeric(${$tmpVarName})) :
$sumOfSummationField2 += ${$tmpVarName};
endif;
for ($k = 0; $k < $summationFieldArrayLen; $k++) :
if ($summationFieldArray[$k] != "" && ($tmpVarName == $summationFieldArray[$k]) && is_numeric(${$tmpVarName})) :
$sumOfSummationFieldArray[$k] += ${$tmpVarName};
endif;
endfor;
for ($k = 0; $k < $summationFieldArray2Len; $k++) :
if ($summationFieldArray2[$k] != "" && ($tmpVarName == $summationFieldArray2[$k]) && is_numeric(${$tmpVarName})) :
$sumOfSummationFieldArray2[$k] += ${$tmpVarName};
endif;
endfor;
*/
// Set prefix if requested
if ($fieldsToSetPrefixLen > 0) :
for ($k = 0; $k < $fieldsToSetPrefixLen; $k += 2) :
if ($fieldsToSetPrefix[$k] == $tmpVarName) :
// ATTENTION: Only if the content begins with a number !!!
if (is_numeric(substr(${$tmpVarName},0,1))) :
${$tmpVarName} = $fieldsToSetPrefix[$i + 1] . ${$tmpVarName};
endif;
endif;
endfor;
endif;
$out = formatOutput(${$tmpVarName},$outputType);
$out = str_replace(" ", "", $out);
if ($tmpVarName == $postParserField) : $outputLinesArray[$j] .= ""; endif;
$outputLinesArray[$j] .= $out;
if ($tmpVarName == $postParserField) : $outputLinesArray[$j] .= ""; endif;
$outputLinesArray[$j] .= $delimiter;
endfor;
endfor;
endif;
?>