} if (isset($_SESSION[$strTableName . "_masterkey" . $i])) { unset($_SESSION[$strTableName . "_masterkey" . $i]); } } else { $mastertable = $_SESSION[$strTableName . "_mastertable"]; } $params = array(); $params['id'] = 1; $params['xt'] =& $xt; $params['tName'] = $strTableName; $params['pageType'] = "detailspreview"; $pageObject = new RunnerPage($params); if ($mastertable == "CompanyMaster") { $where = ""; $where .= $pageObject->getFieldSQLDecrypt("GroupID") . "=" . make_db_value("GroupID", $_SESSION[$strTableName . "_masterkey1"]); $where .= " and "; $where .= $pageObject->getFieldSQLDecrypt("CompanyID") . "=" . make_db_value("CompanyID", $_SESSION[$strTableName . "_masterkey2"]); } if ($mastertable == "BranchMaster") { $where = ""; $where .= $pageObject->getFieldSQLDecrypt("GroupID") . "=" . make_db_value("GroupID", $_SESSION[$strTableName . "_masterkey1"]); $where .= " and "; $where .= $pageObject->getFieldSQLDecrypt("CompanyID") . "=" . make_db_value("CompanyID", $_SESSION[$strTableName . "_masterkey2"]); } if ($mastertable == "calendar_table") { $where = ""; $where .= $pageObject->getFieldSQLDecrypt("TranDate") . "=" . make_db_value("TranDate", $_SESSION[$strTableName . "_masterkey1"]); } if ($mastertable == "DimDept") { $where = "";
} if (isset($_SESSION[$strTableName . "_masterkey" . $i])) { unset($_SESSION[$strTableName . "_masterkey" . $i]); } } else { $mastertable = $_SESSION[$strTableName . "_mastertable"]; } $params = array(); $params['id'] = 1; $params['xt'] =& $xt; $params['tName'] = $strTableName; $params['pageType'] = "detailspreview"; $pageObject = new RunnerPage($params); if ($mastertable == "company") { $where = ""; $where .= $pageObject->getFieldSQLDecrypt("Coy_Id") . "=" . make_db_value("Coy_Id", $_SESSION[$strTableName . "_masterkey1"]); $where .= " and "; $where .= $pageObject->getFieldSQLDecrypt("Grp_id") . "=" . make_db_value("Grp_id", $_SESSION[$strTableName . "_masterkey2"]); } $str = SecuritySQL("Search", $strTableName); if (strlen($str)) { $where .= " and " . $str; } $strSQL = $gQuery->gSQLWhere($where); $strSQL .= " " . $gstrOrderBy; $rowcount = $gQuery->gSQLRowCount($where, $pageObject->connection); $xt->assign("row_count", $rowcount); if ($rowcount) { $xt->assign("details_data", true); $display_count = 10; if ($mode == "inline") {
} if (isset($_SESSION[$strTableName . "_masterkey" . $i])) { unset($_SESSION[$strTableName . "_masterkey" . $i]); } } else { $mastertable = $_SESSION[$strTableName . "_mastertable"]; } $params = array(); $params['id'] = 1; $params['xt'] =& $xt; $params['tName'] = $strTableName; $params['pageType'] = "detailspreview"; $pageObject = new RunnerPage($params); if ($mastertable == "GroupMaster") { $where = ""; $where .= $pageObject->getFieldSQLDecrypt("GroupID") . "=" . make_db_value("GroupID", $_SESSION[$strTableName . "_masterkey1"]); } $str = SecuritySQL("Search", $strTableName); if (strlen($str)) { $where .= " and " . $str; } $strSQL = $gQuery->gSQLWhere($where); $strSQL .= " " . $gstrOrderBy; $rowcount = $gQuery->gSQLRowCount($where, $pageObject->connection); $xt->assign("row_count", $rowcount); if ($rowcount) { $xt->assign("details_data", true); $display_count = 10; if ($mode == "inline") { $display_count *= 2; }