\n";
for ($i=0; $i < $ncols; $i++) {
if ($i===0) $v=($numoffset) ? $rs->fields[0] : reset($rs->fields);
else $v = ($numoffset) ? $rs->fields[$i] : next($rs->fields);
$type = $typearr[$i];
switch($type) {
case 'D':
if (strpos($v,':') !== false);
else {
if (empty($v)) {
$s .= " | \n";
} else {
$s .= " ".$rs->UserDate($v,"D d, M Y") ." | \n";
}
break;
}
case 'T':
if (empty($v)) $s .= " | \n";
else $s .= " ".$rs->UserTimeStamp($v,"D d, M Y, H:i:s") ." | \n";
break;
case 'N':
if (abs(abs($v) - round($v,0)) < 0.00000001)
$v = round($v);
else
$v = round($v,$ADODB_ROUND);
case 'I':
$vv = stripslashes((trim($v)));
if (strlen($vv) == 0) $vv .= ' ';
$s .= " ".$vv ." | \n";
break;
/*
case 'B':
if (substr($v,8,2)=="BM" ) $v = substr($v,8);
$mtime = substr(str_replace(' ','_',microtime()),2);
$tmpname = "tmp/".uniqid($mtime).getmypid();
$fd = @fopen($tmpname,'a');
@ftruncate($fd,0);
@fwrite($fd,$v);
@fclose($fd);
if (!function_exists ("mime_content_type")) {
function mime_content_type ($file) {
return exec("file -bi ".escapeshellarg($file));
}
}
$t = mime_content_type($tmpname);
$s .= (substr($t,0,5)=="image") ? " | \\n" : " $t | \\n";
break;
*/
default:
if ($htmlspecialchars) $v = htmlspecialchars(trim($v));
$v = trim($v);
if (strlen($v) == 0) $v = ' ';
$s .= " ". str_replace("\n",' ',stripslashes($v)) ." | \n";
}
} // for
$s .= "
\n\n";
$rows += 1;
if ($rows >= $gSQLMaxRows) {
$rows = "