";
}
foreach ($arrTd as $k => $v) {
if ($v === 'Field') {
echo "
MetaColumns($v2[0]);
$starObj->name = '*';
$metaStar = array('star' => $starObj);
$issetTable[$v2[0]] = array_merge($metaStar, $metaColumns);
}
$metaColumns = $issetTable[$v2[0]];
foreach ($metaColumns as $k3 => $v3) {
$optionVal = $v2[0].".".$v3->name;
$optionText = $v3->name;
$selected = '';
if ($v2[1] === $v3->name) {
$selected = 'selected';
echo " value='".$optionVal."'>".$optionText;
}
}
echo "
| ";
} else if ($v === 'Table') {
echo "";
} else if ($v === 'Group') {
#if (!isset($_SESSION['selectedColumn'][$k2]['group'])) {
# $_SESSION['selectedColumn'][$k2]['group'] = '0';
#}
$checked = '';
if ($_SESSION['selectedColumn'][$k2]['group']) $checked = 'checked';
echo "
| ";
} else if ($v === 'Show') {
if (!isset($_SESSION['selectedColumn'][$k2]['show'])) {
$_SESSION['selectedColumn'][$k2]['show'] = '1';
}
$checked = '';
if ($_SESSION['selectedColumn'][$k2]['show']) $checked = 'checked';
echo "
| ";
} else if ($v === 'Hidden') {
if (!isset($_SESSION['selectedColumn'][$k2]['hidden'])) {
$_SESSION['selectedColumn'][$k2]['hidden'] = '0';
}
$checked = '';
if ($_SESSION['selectedColumn'][$k2]['hidden']) $checked = 'checked';
if (! $_SESSION['selectedColumn'][$k2]['show']
&& is_array($metaPK) && is_int(array_search($k2, $metaPK))) {
$checked = 'checked';
}
echo "
| ";
} else if ($v === '') {
#$buttonStyle = "style='background-color:#E64C20;color:white'";
#$buttonJs = "onClick='deletecolumn(\"".$k2."\")'";
#echo "
#
# | ";
} else if ($v === 'Sort') {
/*
if (!isset($_SESSION['selectedColumn'][$k2]['sort'])) {
$_SESSION['selectedColumn'][$k2]['sort'] = '';
}
#$selectStyle = "style='width:100%'";
echo "
| ";
*/
} else if ($v === 'Total') {
if (!isset($_SESSION['selectedColumn'][$k2]['total'])) {
$_SESSION['selectedColumn'][$k2]['total'] = '';
}
#$selectStyle = "style='width:100%'";
echo "
| ";
} else if ($v === 'Filter-Name') {
$textValue = "value='".$_SESSION['selectedColumn'][$k2]['filterName']."'";
$textStyle = "style='width:100%'";
echo "
| ";
} else if ($v === 'Filter-Type') {
if (!isset($_SESSION['selectedColumn'][$k2]['filterType'])) {
$_SESSION['selectedColumn'][$k2]['filterType'] = '';
}
#$selectStyle = "style='width:100%'";
echo "
| ";
} else if ($v === 'Filter-Operation') {
if (!isset($_SESSION['selectedColumn'][$k2]['filterOp'])) {
$_SESSION['selectedColumn'][$k2]['filterOp'] = '';
}
#$selectStyle = "style='width:100%'";
echo "
| ";
} else if ($v === 'Criteria') {
$textValue = "value='".$_SESSION['selectedColumn'][$k2]['criteria']."'";
$textStyle = "style='width:100%'";
echo "
| ";
} else if ($v === 'or') {
$textValue = "value=\"".htmlspecialchars($v2['or'])."\"";
$textStyle = "style='width:99%'";
echo "
| ";
}
}
if ($v === 'Table' || $v === '') {
} else {
echo "
";
}
$i++;
}
$record = array();
$record['serialize'] = serialize(array(
'selectedTable' => $_SESSION['selectedTable'],
'selectedColumn' => $_SESSION['selectedColumn'],
'selectedRelation' => $_SESSION['selectedRelation']
));
$rs = $adodb->Execute("SELECT * FROM qb_report ".
" WHERE id = ? ", array($_SESSION['selectedReport']));
$updateSQL = $adodb->GetUpdateSQL($rs, $record);
if ($updateSQL) $adodb->Execute($updateSQL);
$record['serialize'] = str_replace("\n", "\\n", $record['serialize']);
echo "";
?>