Пример #1
0
$recordid = "";
if (isset($_REQUEST["record"]) && $_REQUEST['record'] != '') {
    $recordid = vtlib_purify($_REQUEST["record"]);
}
$oReport = new ITS4YouReports();
$R_Objects = array();
if (isset($_REQUEST["selectedColumnsStr"])) {
    $R_Objects = explode("<_@!@_>", $_REQUEST["selectedColumnsStr"]);
    $r_p_module = vtlib_getModuleNameById(vtlib_purify($_REQUEST["primarymodule"]));
    $quick_columns_arraySelected = array();
    $qf_to_go = explode('$_@_$', vtlib_purify($_REQUEST["qf_to_go"]));
    foreach ($qf_to_go as $key => $qf_to_go_str) {
        $quick_columns_arraySelected[] = trim($qf_to_go_str, "qf:");
    }
} else {
    $sarray = $oReport->getSelectedColumnListArray($recordid);
    foreach ($sarray as $key => $scarray) {
        $R_Objects[] = $scarray["fieldcolname"];
    }
    $r_p_module = $oReport->primarymodule;
}
foreach ($R_Objects as $column_str) {
    $column_arr = explode(":", $column_str);
    $last_key = count($column_arr) - 1;
    $column_array_lk = $column_arr[$last_key];
    if (strtolower($column_array_lk) != "mif") {
        if (is_numeric($column_array_lk) || in_array($column_array_lk, array("MIF", "INV"))) {
            $tablename = trim($column_arr[0], $column_array_lk);
        } else {
            $tablename = $column_arr[0];
        }