} else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	kecamatan_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("kecamatan_id", $data, $keylink);
     $row["kecamatan_id_value"] = $value;
     //	kode -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("kode", $data, $keylink);
     $row["kode_value"] = $value;
     //	nama -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("nama", $data, $keylink);
     $row["nama_value"] = $value;
     //	tmt - Short Date
     $viewContainer->recId = $recordsCounter;
function DisplayMasterTableInfo_GE_ESTADO_CIVIL($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "GE.ESTADO_CIVIL";
    $settings = new ProjectSettings($tName, PAGE_LIST);
    $cipherer = new RunnerCipherer($tName);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "GE.PERSONA_DISPONIBLE") {
        $keysAssoc["ESTADO_CIVIL_ID"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("ESTADO_CIVIL_ID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ESTADO_CIVIL_ID", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ESTADO_CIVIL_ID", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_ESTADO_CIVIL", "ESTADO_CIVIL_ID") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Search");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->WhereToSql(), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["ESTADO_CIVIL_ID"]));
    $xt->assign("ESTADO_CIVIL_ID_mastervalue", $viewControls->showDBValue("ESTADO_CIVIL_ID", $data, $keylink));
    $format = $settings->getViewFormat("ESTADO_CIVIL_ID");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("ESTADO_CIVIL_ID"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("ESTADO_CIVIL_ID_class", $class);
    // add class for field header as field value
    $xt->assign("NOMBRE_mastervalue", $viewControls->showDBValue("NOMBRE", $data, $keylink));
    $format = $settings->getViewFormat("NOMBRE");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("NOMBRE"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("NOMBRE_class", $class);
    // add class for field header as field value
    $xt->assign("FEC_CREACION_mastervalue", $viewControls->showDBValue("FEC_CREACION", $data, $keylink));
    $format = $settings->getViewFormat("FEC_CREACION");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("FEC_CREACION"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("FEC_CREACION_class", $class);
    // add class for field header as field value
    $xt->assign("USUARIO_CREACION_mastervalue", $viewControls->showDBValue("USUARIO_CREACION", $data, $keylink));
    $format = $settings->getViewFormat("USUARIO_CREACION");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("USUARIO_CREACION"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("USUARIO_CREACION_class", $class);
    // add class for field header as field value
    $xt->assign("FEC_ULTIMA_MOD_mastervalue", $viewControls->showDBValue("FEC_ULTIMA_MOD", $data, $keylink));
    $format = $settings->getViewFormat("FEC_ULTIMA_MOD");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("FEC_ULTIMA_MOD"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("FEC_ULTIMA_MOD_class", $class);
    // add class for field header as field value
    $xt->assign("USUARIO_ULTIMA_MOD_mastervalue", $viewControls->showDBValue("USUARIO_ULTIMA_MOD", $data, $keylink));
    $format = $settings->getViewFormat("USUARIO_ULTIMA_MOD");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("USUARIO_ULTIMA_MOD"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("USUARIO_ULTIMA_MOD_class", $class);
    // add class for field header as field value
    $layout = GetPageLayout("GE_ESTADO_CIVIL", 'masterlist');
    if ($layout) {
        $xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
    }
    $xt->displayPartial(GetTemplateName("GE_ESTADO_CIVIL", "masterlist"));
}
function DisplayMasterTableInfo_BranchMaster($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "BranchMaster";
    $xt->eventsObject = getEventObject($tName);
    $settings = new ProjectSettings($tName, PAGE_LIST);
    $cipherer = new RunnerCipherer($tName);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "Fact_SalesTransaction") {
        $keysAssoc["GroupID"] = $keys[1 - 1];
        $keysAssoc["CompanyID"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("GroupID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("GroupID", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("GroupID", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("BranchMaster", "GroupID") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("CompanyID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("CompanyID", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("CompanyID", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("BranchMaster", "CompanyID") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Search", $tName);
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->WhereToSql(), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $xt->assign("BranchCloudFolder_mastervalue", $viewControls->showDBValue("BranchCloudFolder", $data, $keylink));
    $format = $settings->getViewFormat("BranchCloudFolder");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("BranchCloudFolder"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("BranchCloudFolder_class", $class);
    // add class for field header as field value
    $xt->assign("BranchLastSyncDate_mastervalue", $viewControls->showDBValue("BranchLastSyncDate", $data, $keylink));
    $format = $settings->getViewFormat("BranchLastSyncDate");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("BranchLastSyncDate"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("BranchLastSyncDate_class", $class);
    // add class for field header as field value
    $xt->assign("l_mastervalue", $viewControls->showDBValue("l", $data, $keylink));
    $format = $settings->getViewFormat("l");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("l"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("l_class", $class);
    // add class for field header as field value
    $layout = GetPageLayout("BranchMaster", 'masterlist');
    if ($layout) {
        $xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
    }
    $xt->displayPartial(GetTemplateName("BranchMaster", "masterlist"));
}
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	spt_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("spt_id", $data, $keylink);
     $row["spt_id_value"] = $value;
     //	vol - Number
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("vol", $data, $keylink);
     $row["vol_value"] = $value;
     //	hda - Number
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("hda", $data, $keylink);
     $row["hda_value"] = $value;
     //	jumlah - Number
     $viewContainer->recId = $recordsCounter;
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	zona_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("zona_id", $data, $keylink);
     $row["zona_id_value"] = $value;
     //	manfaat_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("manfaat_id", $data, $keylink);
     $row["manfaat_id_value"] = $value;
     //	volume - Number
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("volume", $data, $keylink);
     $row["volume_value"] = $value;
     //	hda - Number
     $viewContainer->recId = $recordsCounter;
function DisplayMasterTableInfo_app_users($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "app.users";
    //$strSQL = "SELECT userid,   nama,   created,   disabled,   passwd,   id,   kd_kantor,   kd_kanwil,   kd_tp,   kd_kanwil_bank,   kd_kppbb_bank,   kd_bank_tunggal,   kd_bank_persepsi,   nip,   jabatan,   handphone,   create_uid,   update_uid,   updated,   last_login,   is_login,   is_logout,   last_ip  FROM app.users ";
    $cipherer = new RunnerCipherer($strTableName);
    $settings = new ProjectSettings($strTableName, PAGE_PRINT);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["app_users_masterprint"] = $layout;
    $showKeys = "";
    if ($detailtable == "app.user_groups") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        return;
    }
    $str = SecuritySQL("Export");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    //	$strSQL=AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = $cipherer->DecryptFetchedArray($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
    //	userid -
    $xt->assign("userid_mastervalue", $viewControls->showDBValue("userid", $data, $keylink));
    //	nama -
    $xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
    //	created - Short Date
    $xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
    //	disabled -
    $xt->assign("disabled_mastervalue", $viewControls->showDBValue("disabled", $data, $keylink));
    //	passwd -
    $xt->assign("passwd_mastervalue", $viewControls->showDBValue("passwd", $data, $keylink));
    //	id -
    $xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
    //	kd_kantor -
    $xt->assign("kd_kantor_mastervalue", $viewControls->showDBValue("kd_kantor", $data, $keylink));
    //	kd_kanwil -
    $xt->assign("kd_kanwil_mastervalue", $viewControls->showDBValue("kd_kanwil", $data, $keylink));
    //	kd_tp -
    $xt->assign("kd_tp_mastervalue", $viewControls->showDBValue("kd_tp", $data, $keylink));
    //	kd_kanwil_bank -
    $xt->assign("kd_kanwil_bank_mastervalue", $viewControls->showDBValue("kd_kanwil_bank", $data, $keylink));
    //	kd_kppbb_bank -
    $xt->assign("kd_kppbb_bank_mastervalue", $viewControls->showDBValue("kd_kppbb_bank", $data, $keylink));
    //	kd_bank_tunggal -
    $xt->assign("kd_bank_tunggal_mastervalue", $viewControls->showDBValue("kd_bank_tunggal", $data, $keylink));
    //	kd_bank_persepsi -
    $xt->assign("kd_bank_persepsi_mastervalue", $viewControls->showDBValue("kd_bank_persepsi", $data, $keylink));
    //	nip -
    $xt->assign("nip_mastervalue", $viewControls->showDBValue("nip", $data, $keylink));
    //	jabatan -
    $xt->assign("jabatan_mastervalue", $viewControls->showDBValue("jabatan", $data, $keylink));
    //	handphone -
    $xt->assign("handphone_mastervalue", $viewControls->showDBValue("handphone", $data, $keylink));
    //	create_uid -
    $xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
    //	update_uid -
    $xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
    //	updated - Short Date
    $xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
    //	last_login - Short Date
    $xt->assign("last_login_mastervalue", $viewControls->showDBValue("last_login", $data, $keylink));
    //	is_login -
    $xt->assign("is_login_mastervalue", $viewControls->showDBValue("is_login", $data, $keylink));
    //	is_logout -
    $xt->assign("is_logout_mastervalue", $viewControls->showDBValue("is_logout", $data, $keylink));
    //	last_ip -
    $xt->assign("last_ip_mastervalue", $viewControls->showDBValue("last_ip", $data, $keylink));
    $xt->display("app_users_masterprint.htm");
    $strTableName = $oldTableName;
}
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	pajak_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("pajak_id", $data, $keylink);
     $row["pajak_id_value"] = $value;
     //	tarif - Number
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("tarif", $data, $keylink);
     $row["tarif_value"] = $value;
     //	reklame - Number
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("reklame", $data, $keylink);
     $row["reklame_value"] = $value;
     //	minimal_omset - Number
     $viewContainer->recId = $recordsCounter;
function DisplayMasterTableInfo_pad_pad_customer($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $detailPageObj = $params["detailPageObj"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_customer";
    $settings = new ProjectSettings($strTableName, PAGE_LIST);
    $cipherer = new RunnerCipherer($strTableName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $mKeys = array();
    $showKeys = "";
    global $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_customer_masterlist"] = $layout;
    if ($detailtable == "pad.pad_spt") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_customer_usaha") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_customer_detail") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_terima") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        return;
    }
    $str = SecuritySQL("Search");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->WhereToSql(), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    //	$strSQL = AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = $cipherer->DecryptFetchedArray($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
    //	id -
    $value = "";
    $xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
    //	parent -
    $value = "";
    $xt->assign("parent_mastervalue", $viewControls->showDBValue("parent", $data, $keylink));
    //	npwpd -
    $value = "";
    $xt->assign("npwpd_mastervalue", $viewControls->showDBValue("npwpd", $data, $keylink));
    //	rp -
    $value = "";
    $xt->assign("rp_mastervalue", $viewControls->showDBValue("rp", $data, $keylink));
    //	pb -
    $value = "";
    $xt->assign("pb_mastervalue", $viewControls->showDBValue("pb", $data, $keylink));
    //	formno -
    $value = "";
    $xt->assign("formno_mastervalue", $viewControls->showDBValue("formno", $data, $keylink));
    //	reg_date - Short Date
    $value = "";
    $xt->assign("reg_date_mastervalue", $viewControls->showDBValue("reg_date", $data, $keylink));
    //	nama -
    $value = "";
    $xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
    //	kecamatan_id -
    $value = "";
    $xt->assign("kecamatan_id_mastervalue", $viewControls->showDBValue("kecamatan_id", $data, $keylink));
    //	kelurahan_id -
    $value = "";
    $xt->assign("kelurahan_id_mastervalue", $viewControls->showDBValue("kelurahan_id", $data, $keylink));
    //	kabupaten -
    $value = "";
    $xt->assign("kabupaten_mastervalue", $viewControls->showDBValue("kabupaten", $data, $keylink));
    //	alamat -
    $value = "";
    $xt->assign("alamat_mastervalue", $viewControls->showDBValue("alamat", $data, $keylink));
    //	kodepos -
    $value = "";
    $xt->assign("kodepos_mastervalue", $viewControls->showDBValue("kodepos", $data, $keylink));
    //	telphone -
    $value = "";
    $xt->assign("telphone_mastervalue", $viewControls->showDBValue("telphone", $data, $keylink));
    //	wpnama -
    $value = "";
    $xt->assign("wpnama_mastervalue", $viewControls->showDBValue("wpnama", $data, $keylink));
    //	wpalamat -
    $value = "";
    $xt->assign("wpalamat_mastervalue", $viewControls->showDBValue("wpalamat", $data, $keylink));
    //	wpkelurahan -
    $value = "";
    $xt->assign("wpkelurahan_mastervalue", $viewControls->showDBValue("wpkelurahan", $data, $keylink));
    //	wpkecamatan -
    $value = "";
    $xt->assign("wpkecamatan_mastervalue", $viewControls->showDBValue("wpkecamatan", $data, $keylink));
    //	wpkabupaten -
    $value = "";
    $xt->assign("wpkabupaten_mastervalue", $viewControls->showDBValue("wpkabupaten", $data, $keylink));
    //	wptelp -
    $value = "";
    $xt->assign("wptelp_mastervalue", $viewControls->showDBValue("wptelp", $data, $keylink));
    //	wpkodepos -
    $value = "";
    $xt->assign("wpkodepos_mastervalue", $viewControls->showDBValue("wpkodepos", $data, $keylink));
    //	pnama -
    $value = "";
    $xt->assign("pnama_mastervalue", $viewControls->showDBValue("pnama", $data, $keylink));
    //	palamat -
    $value = "";
    $xt->assign("palamat_mastervalue", $viewControls->showDBValue("palamat", $data, $keylink));
    //	pkelurahan -
    $value = "";
    $xt->assign("pkelurahan_mastervalue", $viewControls->showDBValue("pkelurahan", $data, $keylink));
    //	pkecamatan -
    $value = "";
    $xt->assign("pkecamatan_mastervalue", $viewControls->showDBValue("pkecamatan", $data, $keylink));
    //	pkabupaten -
    $value = "";
    $xt->assign("pkabupaten_mastervalue", $viewControls->showDBValue("pkabupaten", $data, $keylink));
    //	ptelp -
    $value = "";
    $xt->assign("ptelp_mastervalue", $viewControls->showDBValue("ptelp", $data, $keylink));
    //	pkodepos -
    $value = "";
    $xt->assign("pkodepos_mastervalue", $viewControls->showDBValue("pkodepos", $data, $keylink));
    //	ijin1 -
    $value = "";
    $xt->assign("ijin1_mastervalue", $viewControls->showDBValue("ijin1", $data, $keylink));
    //	ijin1no -
    $value = "";
    $xt->assign("ijin1no_mastervalue", $viewControls->showDBValue("ijin1no", $data, $keylink));
    //	ijin1tgl - Short Date
    $value = "";
    $xt->assign("ijin1tgl_mastervalue", $viewControls->showDBValue("ijin1tgl", $data, $keylink));
    //	ijin1tglakhir - Short Date
    $value = "";
    $xt->assign("ijin1tglakhir_mastervalue", $viewControls->showDBValue("ijin1tglakhir", $data, $keylink));
    //	ijin2 -
    $value = "";
    $xt->assign("ijin2_mastervalue", $viewControls->showDBValue("ijin2", $data, $keylink));
    //	ijin2no -
    $value = "";
    $xt->assign("ijin2no_mastervalue", $viewControls->showDBValue("ijin2no", $data, $keylink));
    //	ijin2tgl - Short Date
    $value = "";
    $xt->assign("ijin2tgl_mastervalue", $viewControls->showDBValue("ijin2tgl", $data, $keylink));
    //	ijin2tglakhir - Short Date
    $value = "";
    $xt->assign("ijin2tglakhir_mastervalue", $viewControls->showDBValue("ijin2tglakhir", $data, $keylink));
    //	ijin3 -
    $value = "";
    $xt->assign("ijin3_mastervalue", $viewControls->showDBValue("ijin3", $data, $keylink));
    //	ijin3no -
    $value = "";
    $xt->assign("ijin3no_mastervalue", $viewControls->showDBValue("ijin3no", $data, $keylink));
    //	ijin3tgl - Short Date
    $value = "";
    $xt->assign("ijin3tgl_mastervalue", $viewControls->showDBValue("ijin3tgl", $data, $keylink));
    //	ijin3tglakhir - Short Date
    $value = "";
    $xt->assign("ijin3tglakhir_mastervalue", $viewControls->showDBValue("ijin3tglakhir", $data, $keylink));
    //	ijin4 -
    $value = "";
    $xt->assign("ijin4_mastervalue", $viewControls->showDBValue("ijin4", $data, $keylink));
    //	ijin4no -
    $value = "";
    $xt->assign("ijin4no_mastervalue", $viewControls->showDBValue("ijin4no", $data, $keylink));
    //	ijin4tgl - Short Date
    $value = "";
    $xt->assign("ijin4tgl_mastervalue", $viewControls->showDBValue("ijin4tgl", $data, $keylink));
    //	ijin4tglakhir - Short Date
    $value = "";
    $xt->assign("ijin4tglakhir_mastervalue", $viewControls->showDBValue("ijin4tglakhir", $data, $keylink));
    //	kukuhno -
    $value = "";
    $xt->assign("kukuhno_mastervalue", $viewControls->showDBValue("kukuhno", $data, $keylink));
    //	kukuhnip -
    $value = "";
    $xt->assign("kukuhnip_mastervalue", $viewControls->showDBValue("kukuhnip", $data, $keylink));
    //	kukuhtgl - Short Date
    $value = "";
    $xt->assign("kukuhtgl_mastervalue", $viewControls->showDBValue("kukuhtgl", $data, $keylink));
    //	kukuh_jabat_id -
    $value = "";
    $xt->assign("kukuh_jabat_id_mastervalue", $viewControls->showDBValue("kukuh_jabat_id", $data, $keylink));
    //	kukuhprinted -
    $value = "";
    $xt->assign("kukuhprinted_mastervalue", $viewControls->showDBValue("kukuhprinted", $data, $keylink));
    //	enabled -
    $value = "";
    $xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
    //	create_uid -
    $value = "";
    $xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
    //	tmt - Short Date
    $value = "";
    $xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
    //	customer_status_id -
    $value = "";
    $xt->assign("customer_status_id_mastervalue", $viewControls->showDBValue("customer_status_id", $data, $keylink));
    //	kembalitgl - Short Date
    $value = "";
    $xt->assign("kembalitgl_mastervalue", $viewControls->showDBValue("kembalitgl", $data, $keylink));
    //	kembalioleh -
    $value = "";
    $xt->assign("kembalioleh_mastervalue", $viewControls->showDBValue("kembalioleh", $data, $keylink));
    //	kartuprinted -
    $value = "";
    $xt->assign("kartuprinted_mastervalue", $viewControls->showDBValue("kartuprinted", $data, $keylink));
    //	kembalinip -
    $value = "";
    $xt->assign("kembalinip_mastervalue", $viewControls->showDBValue("kembalinip", $data, $keylink));
    //	penerimanm -
    $value = "";
    $xt->assign("penerimanm_mastervalue", $viewControls->showDBValue("penerimanm", $data, $keylink));
    //	penerimaalamat -
    $value = "";
    $xt->assign("penerimaalamat_mastervalue", $viewControls->showDBValue("penerimaalamat", $data, $keylink));
    //	penerimatgl - Short Date
    $value = "";
    $xt->assign("penerimatgl_mastervalue", $viewControls->showDBValue("penerimatgl", $data, $keylink));
    //	catatnip -
    $value = "";
    $xt->assign("catatnip_mastervalue", $viewControls->showDBValue("catatnip", $data, $keylink));
    //	kirimtgl - Short Date
    $value = "";
    $xt->assign("kirimtgl_mastervalue", $viewControls->showDBValue("kirimtgl", $data, $keylink));
    //	batastgl - Short Date
    $value = "";
    $xt->assign("batastgl_mastervalue", $viewControls->showDBValue("batastgl", $data, $keylink));
    //	petugas_jabat_id -
    $value = "";
    $xt->assign("petugas_jabat_id_mastervalue", $viewControls->showDBValue("petugas_jabat_id", $data, $keylink));
    //	pencatat_jabat_id -
    $value = "";
    $xt->assign("pencatat_jabat_id_mastervalue", $viewControls->showDBValue("pencatat_jabat_id", $data, $keylink));
    //	created - Short Date
    $value = "";
    $xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
    //	updated - Short Date
    $value = "";
    $xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
    //	update_uid -
    $value = "";
    $xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
    //	npwpd_old -
    $value = "";
    $xt->assign("npwpd_old_mastervalue", $viewControls->showDBValue("npwpd_old", $data, $keylink));
    //	id_old -
    $value = "";
    $xt->assign("id_old_mastervalue", $viewControls->showDBValue("id_old", $data, $keylink));
    $viewControls->addControlsJSAndCSS();
    $detailPageObj->viewControlsMap['mViewControlsMap'] = $viewControls->viewControlsMap;
    $layout = GetPageLayout("pad_pad_customer", 'masterlist');
    if ($layout) {
        $xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
    }
    $xt->display("pad_pad_customer_masterlist.htm");
    $strTableName = $oldTableName;
}
Exemple #9
0
 function labelFormat($fieldName, $data)
 {
     $table = $this->sessionPrefix;
     if ($this->table_type == "db" && count($this->chrt_array['customLabels'])) {
         $fieldName = $this->chrt_array['customLabels'][$fieldName];
     }
     $strViewFormat = $this->pSet->getViewFormat($fieldName);
     $strEditFormat = $this->pSet->getEditFormat($fieldName);
     include_once getabspath('classes/controls/ViewControlsContainer.php');
     $viewControls = new ViewControlsContainer($this->pSet, PAGE_CHART);
     $value = html_special_decode($viewControls->showDBValue($fieldName, $data));
     if (strlen($value) > 50) {
         $value = substr($value, 0, 47) . "...";
     }
     return $this->chart_xmlencode($value);
 }
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	konterid -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("konterid", $data, $keylink);
     $row["konterid_value"] = $value;
     //	reg_date - Short Date
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("reg_date", $data, $keylink);
     $row["reg_date_value"] = $value;
     //	customer_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("customer_id", $data, $keylink);
     $row["customer_id_value"] = $value;
     //	usaha_id -
     $viewContainer->recId = $recordsCounter;
function DisplayMasterTableInfo_pad_pad_daftar_status($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_daftar_status";
    //$strSQL = "SELECT id,   kode,   uraian  FROM \"pad\".pad_daftar_status ";
    $cipherer = new RunnerCipherer($strTableName);
    $settings = new ProjectSettings($strTableName, PAGE_PRINT);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_daftar_status_masterprint"] = $layout;
    $showKeys = "";
    if ($detailtable == "pad.pad_daftar_hist") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        return;
    }
    $str = SecuritySQL("Export");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    //	$strSQL=AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = $cipherer->DecryptFetchedArray($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
    //	id -
    $xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
    //	kode -
    $xt->assign("kode_mastervalue", $viewControls->showDBValue("kode", $data, $keylink));
    //	uraian -
    $xt->assign("uraian_mastervalue", $viewControls->showDBValue("uraian", $data, $keylink));
    $xt->display("pad_pad_daftar_status_masterprint.htm");
    $strTableName = $oldTableName;
}
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	tahun -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("tahun", $data, $keylink);
     $row["tahun_value"] = $value;
     //	stpdno -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("stpdno", $data, $keylink);
     $row["stpdno_value"] = $value;
     //	stpdtgl - Short Date
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("stpdtgl", $data, $keylink);
     $row["stpdtgl_value"] = $value;
     //	spt_id -
     $viewContainer->recId = $recordsCounter;
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	daftar_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("daftar_id", $data, $keylink);
     $row["daftar_id_value"] = $value;
     //	status_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("status_id", $data, $keylink);
     $row["status_id_value"] = $value;
     //	create_date - Short Date
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("create_date", $data, $keylink);
     $row["create_date_value"] = $value;
     //	create_uid -
     $viewContainer->recId = $recordsCounter;
function DisplayMasterTableInfoForPrint_calendar_table($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "calendar_table";
    $xt->eventsObject = getEventObject($tName);
    $cipherer = new RunnerCipherer($tName);
    $settings = new ProjectSettings($tName, PAGE_PRINT);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "Fact_SalesTransaction") {
        $keysAssoc["dt"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("dt", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("dt", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("dt", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("calendar_table", "dt") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "Current Year Sales") {
        $keysAssoc["dt"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("dt", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("dt", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("dt", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("calendar_table", "dt") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Export", $tName);
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["dt"]));
    $xt->assign("dt_mastervalue", $viewControls->showDBValue("dt", $data, $keylink));
    $format = $settings->getViewFormat("dt");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("dt"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("dt_class", $class);
    // add class for field header as field value
    $xt->assign("y_mastervalue", $viewControls->showDBValue("y", $data, $keylink));
    $format = $settings->getViewFormat("y");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("y"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("y_class", $class);
    // add class for field header as field value
    $xt->assign("q_mastervalue", $viewControls->showDBValue("q", $data, $keylink));
    $format = $settings->getViewFormat("q");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("q"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("q_class", $class);
    // add class for field header as field value
    $xt->assign("m_mastervalue", $viewControls->showDBValue("m", $data, $keylink));
    $format = $settings->getViewFormat("m");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("m"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("m_class", $class);
    // add class for field header as field value
    $xt->assign("d_mastervalue", $viewControls->showDBValue("d", $data, $keylink));
    $format = $settings->getViewFormat("d");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("d"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("d_class", $class);
    // add class for field header as field value
    $xt->assign("dw_mastervalue", $viewControls->showDBValue("dw", $data, $keylink));
    $format = $settings->getViewFormat("dw");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("dw"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("dw_class", $class);
    // add class for field header as field value
    $xt->assign("monthName_mastervalue", $viewControls->showDBValue("monthName", $data, $keylink));
    $format = $settings->getViewFormat("monthName");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("monthName"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("monthName_class", $class);
    // add class for field header as field value
    $xt->assign("dayName_mastervalue", $viewControls->showDBValue("dayName", $data, $keylink));
    $format = $settings->getViewFormat("dayName");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("dayName"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("dayName_class", $class);
    // add class for field header as field value
    $xt->assign("w_mastervalue", $viewControls->showDBValue("w", $data, $keylink));
    $format = $settings->getViewFormat("w");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("w"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("w_class", $class);
    // add class for field header as field value
    $xt->assign("isWeekday_mastervalue", $viewControls->showDBValue("isWeekday", $data, $keylink));
    $format = $settings->getViewFormat("isWeekday");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("isWeekday"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("isWeekday_class", $class);
    // add class for field header as field value
    $xt->assign("isHoliday_mastervalue", $viewControls->showDBValue("isHoliday", $data, $keylink));
    $format = $settings->getViewFormat("isHoliday");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("isHoliday"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("isHoliday_class", $class);
    // add class for field header as field value
    $xt->assign("holidayDescr_mastervalue", $viewControls->showDBValue("holidayDescr", $data, $keylink));
    $format = $settings->getViewFormat("holidayDescr");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("holidayDescr"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("holidayDescr_class", $class);
    // add class for field header as field value
    $xt->assign("isPayday_mastervalue", $viewControls->showDBValue("isPayday", $data, $keylink));
    $format = $settings->getViewFormat("isPayday");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("isPayday"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("isPayday_class", $class);
    // add class for field header as field value
    $xt->assign("yearQuarterText_mastervalue", $viewControls->showDBValue("yearQuarterText", $data, $keylink));
    $format = $settings->getViewFormat("yearQuarterText");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("yearQuarterText"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("yearQuarterText_class", $class);
    // add class for field header as field value
    $xt->assign("yearMonthInt_mastervalue", $viewControls->showDBValue("yearMonthInt", $data, $keylink));
    $format = $settings->getViewFormat("yearMonthInt");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("yearMonthInt"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("yearMonthInt_class", $class);
    // add class for field header as field value
    $xt->assign("yearMonthText_mastervalue", $viewControls->showDBValue("yearMonthText", $data, $keylink));
    $format = $settings->getViewFormat("yearMonthText");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("yearMonthText"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("yearMonthText_class", $class);
    // add class for field header as field value
    $xt->assign("yearWeekInt_mastervalue", $viewControls->showDBValue("yearWeekInt", $data, $keylink));
    $format = $settings->getViewFormat("yearWeekInt");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("yearWeekInt"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("yearWeekInt_class", $class);
    // add class for field header as field value
    $xt->assign("yearWeekText_mastervalue", $viewControls->showDBValue("yearWeekText", $data, $keylink));
    $format = $settings->getViewFormat("yearWeekText");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("yearWeekText"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("yearWeekText_class", $class);
    // add class for field header as field value
    $xt->assign("monthWeekInt_mastervalue", $viewControls->showDBValue("monthWeekInt", $data, $keylink));
    $format = $settings->getViewFormat("monthWeekInt");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("monthWeekInt"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("monthWeekInt_class", $class);
    // add class for field header as field value
    $xt->assign("monthWeekText_mastervalue", $viewControls->showDBValue("monthWeekText", $data, $keylink));
    $format = $settings->getViewFormat("monthWeekText");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("monthWeekText"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("monthWeekText_class", $class);
    // add class for field header as field value
    $xt->assign("fiscalYear_mastervalue", $viewControls->showDBValue("fiscalYear", $data, $keylink));
    $format = $settings->getViewFormat("fiscalYear");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("fiscalYear"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("fiscalYear_class", $class);
    // add class for field header as field value
    $xt->assign("fiscalMonth_mastervalue", $viewControls->showDBValue("fiscalMonth", $data, $keylink));
    $format = $settings->getViewFormat("fiscalMonth");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("fiscalMonth"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("fiscalMonth_class", $class);
    // add class for field header as field value
    $xt->assign("fiscalQuarter_mastervalue", $viewControls->showDBValue("fiscalQuarter", $data, $keylink));
    $format = $settings->getViewFormat("fiscalQuarter");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("fiscalQuarter"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("fiscalQuarter_class", $class);
    // add class for field header as field value
    $xt->assign("fiscalYearMonthText_mastervalue", $viewControls->showDBValue("fiscalYearMonthText", $data, $keylink));
    $format = $settings->getViewFormat("fiscalYearMonthText");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("fiscalYearMonthText"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("fiscalYearMonthText_class", $class);
    // add class for field header as field value
    $layout = GetPageLayout("calendar_table", 'masterprint');
    if ($layout) {
        $xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
    }
    $xt->displayPartial(GetTemplateName("calendar_table", "masterprint"));
}
			    }
			    if (strlen(db_fld_value($data, fldname($fld)))) {
				$value = "<a href=\"" . GetTableLink($rpt_array['short_table_name'], "getfile") . "?filename=" . rawurlencode($filename) . "&field=" . runner_htmlspecialchars(rawurlencode(fldname($fld))) . $keylink . "\">";
				$value.=runner_htmlspecialchars($filename);
				$value.="</a>";
			    }
			}
		    } elseif (!is_wr_project()) {
			$value = WRProcessLargeText($viewControls->getControl(gfldname($fld), $fld['view_format'])->showDBValue($data, ""), fldname($fld), count($rowinfo), 100, $render_mode, $fld['label']);
		    } elseif (( $fld["edit_format"] == EDIT_FORMAT_LOOKUP_WIZARD || $fld["edit_format"] == EDIT_FORMAT_RADIO ) && ($fld['lookupobj_lookuptype'] == LT_LOOKUPTABLE || $fld['lookupobj_lookuptype'] == LT_QUERY)) {
			//delete tjhis after the tests on feature #6356
			//$value = DisplayLookupWizard(fldname($fld), $data[fldname($fld)], $data, $keylink, $render_mode, PAGE_REPORT);
			include_once getabspath('classes/controls/ViewLookupWizardField.php');
			if (!$viewControls->viewControls[fldname($fld)])
			    $viewControls->viewControls[fldname($fld)] = new ViewLookupWizardField(fldname($fld), $viewControls, null);
			$value = $viewControls->showDBValue($viewControls, $data, $keylink);
		    }
		    elseif ($fld["view_format"] != FORMAT_CUSTOM && $fld["view_format"] != FORMAT_FILE_IMAGE && $fld["view_format"] != FORMAT_FILE && $fld["view_format"] != FORMAT_HYPERLINK && $fld["view_format"] != FORMAT_EMAILHYPERLINK && $fld["view_format"] != FORMAT_CHECKBOX) {
			$value = WRProcessLargeText($viewControls->getControl(gfldname($fld), $fld['view_format'])->showDBValue($data, "")
				, fldname($fld)
				, count($rowinfo), $gSettings->getNumberOfChars(), $render_mode, $fld['label']);
		    } else {
			$value = $viewControls->getControl(fldname($fld), $fld['view_format'])->showDBValue($data, "");
		    }
		    if ($summary[0]["sds"]) {
			$row["1" . GoodFieldName(fldname($fld)) . "_value"] = $value;
			$arrFields["data"][0][fldname($fld)] = $value;
		    }
		    for ($i = 0; $i < count($rpt_array['group_fields']) - 1; $i++){
			$arr = $rpt_array['group_fields'][$i];
			if ($summary[0]["sds"] || ( $arr["name"] == fldname($fld) && $arr["int_type"] == 0 )) {
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	group_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("group_id", $data, $keylink);
     $row["group_id_value"] = $value;
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	module_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("module_id", $data, $keylink);
     $row["module_id_value"] = $value;
     //	reads -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("reads", $data, $keylink);
     $row["reads_value"] = $value;
     //	writes -
     $viewContainer->recId = $recordsCounter;
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 $viewContainer->isDetailsPreview = true;
 $b = true;
 $qResult = $pageObject->connection->query($strSQL);
 $data = $cipherer->DecryptFetchedArray($qResult->fetchAssoc());
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["Grp_id"]));
     $keylink .= "&key2=" . runner_htmlspecialchars(rawurlencode(@$data["StockCode"]));
     $keylink .= "&key3=" . runner_htmlspecialchars(rawurlencode(@$data["Coy_Id"]));
     //	Grp_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("Grp_id", $data, $keylink);
     $row["Grp_id_value"] = $value;
     $format = $pSet->getViewFormat("Grp_id");
     $class = "rnr-field-text";
     if ($format == FORMAT_FILE) {
         $class = ' rnr-field-file';
     }
     if ($format == FORMAT_AUDIO) {
         $class = ' rnr-field-audio';
     }
     if ($format == FORMAT_CHECKBOX) {
         $class = ' rnr-field-checkbox';
     }
     if ($format == FORMAT_NUMBER || IsNumberType($pSet->getFieldType("Grp_id"))) {
         $class = ' rnr-field-number';
     }
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	usaha_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("usaha_id", $data, $keylink);
     $row["usaha_id_value"] = $value;
     //	nourut -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("nourut", $data, $keylink);
     $row["nourut_value"] = $value;
     //	notes -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("notes", $data, $keylink);
     $row["notes_value"] = $value;
     //	tarif - Number
     $viewContainer->recId = $recordsCounter;
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	tahun -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("tahun", $data, $keylink);
     $row["tahun_value"] = $value;
     //	sptno -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("sptno", $data, $keylink);
     $row["sptno_value"] = $value;
     //	customer_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("customer_id", $data, $keylink);
     $row["customer_id_value"] = $value;
     //	customer_usaha_id -
     $viewContainer->recId = $recordsCounter;
    } else {
        $display_count = $rowcount;
    }
    $rowinfo = array();
    $data = $cipherer->DecryptFetchedArray($rs);
    require_once getabspath('classes/controls/ViewControlsContainer.php');
    $pSet = new ProjectSettings($strTableName, PAGE_LIST);
    $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
    while ($data && $recordsCounter < $display_count) {
        $recordsCounter++;
        $row = array();
        $keylink = "";
        $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
        //	id -
        $viewContainer->recId = $recordsCounter;
        $value = $viewContainer->showDBValue("id", $data, $keylink);
        $row["id_value"] = $value;
        //	user_id -
        $viewContainer->recId = $recordsCounter;
        $value = $viewContainer->showDBValue("user_id", $data, $keylink);
        $row["user_id_value"] = $value;
        //	group_id -
        $viewContainer->recId = $recordsCounter;
        $value = $viewContainer->showDBValue("group_id", $data, $keylink);
        $row["group_id_value"] = $value;
        $rowinfo[] = $row;
        $data = $cipherer->DecryptFetchedArray($rs);
    }
    $xt->assign_loopsection("details_row", $rowinfo);
}
$returnJSON = array("success" => true);
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	tahun -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("tahun", $data, $keylink);
     $row["tahun_value"] = $value;
     //	terimano -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("terimano", $data, $keylink);
     $row["terimano_value"] = $value;
     //	terimatgl - Short Date
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("terimatgl", $data, $keylink);
     $row["terimatgl_value"] = $value;
     //	jmlterima - Number
     $viewContainer->recId = $recordsCounter;
Exemple #22
0
function GetTotals($field, $value, $stype, $iNumberOfRows, $sFormat, $ptype)
{
    global $strTableName;
    $pSet = new ProjectSettings($strTableName, $ptype);
    $days = 0;
    if ($stype == "AVERAGE") {
        if ($iNumberOfRows) {
            if ($sFormat == FORMAT_TIME) {
                if ($value) {
                    $value = round($value / $iNumberOfRows, 0);
                    $s = $value % 60;
                    $value -= $s;
                    $value /= 60;
                    $m = $value % 60;
                    $value -= $m;
                    $value /= 60;
                    $h = $value % 24;
                    $value -= $h;
                    $value /= 24;
                    $d = $value;
                    $value = ($d != 0 ? $d . 'd ' : '') . mysprintf("%02d:%02d:%02d", array($h, $m, $s));
                }
            } else {
                $value = round($value / $iNumberOfRows, 2);
            }
        } else {
            return "";
        }
    }
    if ($stype == "TOTAL") {
        if ($sFormat == FORMAT_TIME) {
            if ($value) {
                $s = $value % 60;
                $value -= $s;
                $value /= 60;
                $m = $value % 60;
                $value -= $m;
                $value /= 60;
                $h = $value % 24;
                $value -= $h;
                $value /= 24;
                $d = $value;
                $value = ($d != 0 ? $d . 'd ' : '') . mysprintf("%02d:%02d:%02d", array($h, $m, $s));
            }
        }
    }
    $sValue = "";
    $data = array($field => $value);
    if ($sFormat == FORMAT_CURRENCY) {
        $sValue = str_format_currency($value);
    } else {
        if ($sFormat == FORMAT_PERCENT) {
            $sValue = str_format_number($value * 100) . "%";
        } else {
            if ($sFormat == FORMAT_NUMBER) {
                $sValue = str_format_number($value, $pSet->isDecimalDigits($field));
            } else {
                if ($sFormat == FORMAT_CUSTOM && $stype != "COUNT") {
                    include_once getabspath('classes/controls/ViewControlsContainer.php');
                    $viewControls = new ViewControlsContainer($pSet, $ptype);
                    $sValue = $viewControls->showDBValue($field, $data);
                } else {
                    $sValue = $value;
                }
            }
        }
    }
    if ($stype == "COUNT") {
        return $value;
    }
    if ($stype == "TOTAL") {
        return $sValue;
    }
    if ($stype == "AVERAGE") {
        return $sValue;
    }
    return "";
}
function DisplayMasterTableInfo_pad_pad_kelurahan($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $detailPageObj = $params["detailPageObj"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_kelurahan";
    $settings = new ProjectSettings($strTableName, PAGE_LIST);
    $cipherer = new RunnerCipherer($strTableName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $mKeys = array();
    $showKeys = "";
    global $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_kelurahan_masterlist"] = $layout;
    if ($detailtable == "pad.pad_customer_usaha") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_customer") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_daftar") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $where .= " and ";
        $showKeys .= " , ";
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[2 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[2 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        return;
    }
    $str = SecuritySQL("Search");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->WhereToSql(), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    //	$strSQL = AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = $cipherer->DecryptFetchedArray($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
    //	id -
    $value = "";
    $xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
    //	kecamatan_id -
    $value = "";
    $xt->assign("kecamatan_id_mastervalue", $viewControls->showDBValue("kecamatan_id", $data, $keylink));
    //	kode -
    $value = "";
    $xt->assign("kode_mastervalue", $viewControls->showDBValue("kode", $data, $keylink));
    //	nama -
    $value = "";
    $xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
    //	tmt - Short Date
    $value = "";
    $xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
    //	enabled -
    $value = "";
    $xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
    //	created - Short Date
    $value = "";
    $xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
    //	create_uid -
    $value = "";
    $xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
    //	updated - Short Date
    $value = "";
    $xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
    //	update_uid -
    $value = "";
    $xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
    $viewControls->addControlsJSAndCSS();
    $detailPageObj->viewControlsMap['mViewControlsMap'] = $viewControls->viewControlsMap;
    $layout = GetPageLayout("pad_pad_kelurahan", 'masterlist');
    if ($layout) {
        $xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
    }
    $xt->display("pad_pad_kelurahan_masterlist.htm");
    $strTableName = $oldTableName;
}
function DisplayMasterTableInfo_pad_pad_jenis_pajak($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_jenis_pajak";
    //$strSQL = "SELECT id,   usaha_id,   nama,   rekening_id,   rekening_kd_sub,   rekdenda_id,   masapajak,   jatuhtempo,   multiple,   jalan_kelas_id,   tmt,   enabled,   created,   create_uid,   updated,   update_uid  FROM \"pad\".pad_jenis_pajak ";
    $cipherer = new RunnerCipherer($strTableName);
    $settings = new ProjectSettings($strTableName, PAGE_PRINT);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_jenis_pajak_masterprint"] = $layout;
    $showKeys = "";
    if ($detailtable == "pad.pad_spt") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_tarif_pajak") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $where .= " and ";
        $showKeys .= " , ";
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[2 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[2 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_terima_line") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        return;
    }
    $str = SecuritySQL("Export");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    //	$strSQL=AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = $cipherer->DecryptFetchedArray($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
    //	id -
    $xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
    //	usaha_id -
    $xt->assign("usaha_id_mastervalue", $viewControls->showDBValue("usaha_id", $data, $keylink));
    //	nama -
    $xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
    //	rekening_id -
    $xt->assign("rekening_id_mastervalue", $viewControls->showDBValue("rekening_id", $data, $keylink));
    //	rekening_kd_sub -
    $xt->assign("rekening_kd_sub_mastervalue", $viewControls->showDBValue("rekening_kd_sub", $data, $keylink));
    //	rekdenda_id -
    $xt->assign("rekdenda_id_mastervalue", $viewControls->showDBValue("rekdenda_id", $data, $keylink));
    //	masapajak -
    $xt->assign("masapajak_mastervalue", $viewControls->showDBValue("masapajak", $data, $keylink));
    //	jatuhtempo -
    $xt->assign("jatuhtempo_mastervalue", $viewControls->showDBValue("jatuhtempo", $data, $keylink));
    //	multiple -
    $xt->assign("multiple_mastervalue", $viewControls->showDBValue("multiple", $data, $keylink));
    //	jalan_kelas_id -
    $xt->assign("jalan_kelas_id_mastervalue", $viewControls->showDBValue("jalan_kelas_id", $data, $keylink));
    //	tmt - Short Date
    $xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
    //	enabled -
    $xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
    //	created - Short Date
    $xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
    //	create_uid -
    $xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
    //	updated - Short Date
    $xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
    //	update_uid -
    $xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
    $xt->display("pad_pad_jenis_pajak_masterprint.htm");
    $strTableName = $oldTableName;
}
function DisplayMasterTableInfo_pad_pad_sspd($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_sspd";
    //$strSQL = "SELECT id,   tahun,   sspdno,   sspdtgl,   sspdjam,   invoice_id,   keterangan,   bulan_telat,   hitung_bunga,   denda,   bunga,   jml_bayar,   sisa,   jenis_bayar,   printed,   tp_id,   is_validated,   is_valid,   enabled,   created,   create_uid,   updated,   update_uid,   petugas_id,   pejabat_id  FROM \"pad\".pad_sspd ";
    $cipherer = new RunnerCipherer($strTableName);
    $settings = new ProjectSettings($strTableName, PAGE_PRINT);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_sspd_masterprint"] = $layout;
    $showKeys = "";
    if ($detailtable == "public.pad_payment") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        return;
    }
    $str = SecuritySQL("Export");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    //	$strSQL=AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = $cipherer->DecryptFetchedArray($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
    //	id -
    $xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
    //	tahun -
    $xt->assign("tahun_mastervalue", $viewControls->showDBValue("tahun", $data, $keylink));
    //	sspdno -
    $xt->assign("sspdno_mastervalue", $viewControls->showDBValue("sspdno", $data, $keylink));
    //	sspdtgl - Short Date
    $xt->assign("sspdtgl_mastervalue", $viewControls->showDBValue("sspdtgl", $data, $keylink));
    //	sspdjam - Time
    $xt->assign("sspdjam_mastervalue", $viewControls->showDBValue("sspdjam", $data, $keylink));
    //	invoice_id -
    $xt->assign("invoice_id_mastervalue", $viewControls->showDBValue("invoice_id", $data, $keylink));
    //	keterangan -
    $xt->assign("keterangan_mastervalue", $viewControls->showDBValue("keterangan", $data, $keylink));
    //	bulan_telat -
    $xt->assign("bulan_telat_mastervalue", $viewControls->showDBValue("bulan_telat", $data, $keylink));
    //	hitung_bunga -
    $xt->assign("hitung_bunga_mastervalue", $viewControls->showDBValue("hitung_bunga", $data, $keylink));
    //	denda - Number
    $xt->assign("denda_mastervalue", $viewControls->showDBValue("denda", $data, $keylink));
    //	bunga - Number
    $xt->assign("bunga_mastervalue", $viewControls->showDBValue("bunga", $data, $keylink));
    //	jml_bayar -
    $xt->assign("jml_bayar_mastervalue", $viewControls->showDBValue("jml_bayar", $data, $keylink));
    //	sisa - Number
    $xt->assign("sisa_mastervalue", $viewControls->showDBValue("sisa", $data, $keylink));
    //	jenis_bayar -
    $xt->assign("jenis_bayar_mastervalue", $viewControls->showDBValue("jenis_bayar", $data, $keylink));
    //	printed -
    $xt->assign("printed_mastervalue", $viewControls->showDBValue("printed", $data, $keylink));
    //	tp_id -
    $xt->assign("tp_id_mastervalue", $viewControls->showDBValue("tp_id", $data, $keylink));
    //	is_validated -
    $xt->assign("is_validated_mastervalue", $viewControls->showDBValue("is_validated", $data, $keylink));
    //	is_valid -
    $xt->assign("is_valid_mastervalue", $viewControls->showDBValue("is_valid", $data, $keylink));
    //	enabled -
    $xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
    //	created - Short Date
    $xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
    //	create_uid -
    $xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
    //	updated - Short Date
    $xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
    //	update_uid -
    $xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
    //	petugas_id -
    $xt->assign("petugas_id_mastervalue", $viewControls->showDBValue("petugas_id", $data, $keylink));
    //	pejabat_id -
    $xt->assign("pejabat_id_mastervalue", $viewControls->showDBValue("pejabat_id", $data, $keylink));
    $xt->display("pad_pad_sspd_masterprint.htm");
    $strTableName = $oldTableName;
}
 $rowinfo = array();
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 $viewContainer->isDetailsPreview = true;
 $b = true;
 $qResult = $pageObject->connection->query($strSQL);
 $data = $cipherer->DecryptFetchedArray($qResult->fetchAssoc());
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["Groupid"]));
     //	Groupid -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("Groupid", $data, $keylink);
     $row["Groupid_value"] = $value;
     $format = $pSet->getViewFormat("Groupid");
     $class = "rnr-field-text";
     if ($format == FORMAT_FILE) {
         $class = ' rnr-field-file';
     }
     if ($format == FORMAT_AUDIO) {
         $class = ' rnr-field-audio';
     }
     if ($format == FORMAT_CHECKBOX) {
         $class = ' rnr-field-checkbox';
     }
     if ($format == FORMAT_NUMBER || IsNumberType($pSet->getFieldType("Groupid"))) {
         $class = ' rnr-field-number';
     }
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	rekening_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("rekening_id", $data, $keylink);
     $row["rekening_id_value"] = $value;
     //	status_anggaran - Number
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("status_anggaran", $data, $keylink);
     $row["status_anggaran_value"] = $value;
     //	target - Number
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("target", $data, $keylink);
     $row["target_value"] = $value;
     //	bulan1 - Number
     $viewContainer->recId = $recordsCounter;
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	usaha_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("usaha_id", $data, $keylink);
     $row["usaha_id_value"] = $value;
     //	nama -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("nama", $data, $keylink);
     $row["nama_value"] = $value;
     //	rekening_id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("rekening_id", $data, $keylink);
     $row["rekening_id_value"] = $value;
     //	rekening_kd_sub -
     $viewContainer->recId = $recordsCounter;
 } else {
     $display_count = $rowcount;
 }
 $rowinfo = array();
 $data = $cipherer->DecryptFetchedArray($rs);
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
     //	id -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("id", $data, $keylink);
     $row["id_value"] = $value;
     //	parent -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("parent", $data, $keylink);
     $row["parent_value"] = $value;
     //	npwpd -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("npwpd", $data, $keylink);
     $row["npwpd_value"] = $value;
     //	rp -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("rp", $data, $keylink);
     $row["rp_value"] = $value;
     //	pb -
     $viewContainer->recId = $recordsCounter;
 $rowinfo = array();
 require_once getabspath('classes/controls/ViewControlsContainer.php');
 $pSet = new ProjectSettings($strTableName, PAGE_LIST);
 $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
 $viewContainer->isDetailsPreview = true;
 $b = true;
 $qResult = $pageObject->connection->query($strSQL);
 $data = $cipherer->DecryptFetchedArray($qResult->fetchAssoc());
 while ($data && $recordsCounter < $display_count) {
     $recordsCounter++;
     $row = array();
     $keylink = "";
     $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["ID"]));
     //	ID -
     $viewContainer->recId = $recordsCounter;
     $value = $viewContainer->showDBValue("ID", $data, $keylink);
     $row["ID_value"] = $value;
     $format = $pSet->getViewFormat("ID");
     $class = "rnr-field-text";
     if ($format == FORMAT_FILE) {
         $class = ' rnr-field-file';
     }
     if ($format == FORMAT_AUDIO) {
         $class = ' rnr-field-audio';
     }
     if ($format == FORMAT_CHECKBOX) {
         $class = ' rnr-field-checkbox';
     }
     if ($format == FORMAT_NUMBER || IsNumberType($pSet->getFieldType("ID"))) {
         $class = ' rnr-field-number';
     }