• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP ewrpt_InitArray函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ewrpt_InitArray函数的典型用法代码示例。如果您正苦于以下问题:PHP ewrpt_InitArray函数的具体用法?PHP ewrpt_InitArray怎么用?PHP ewrpt_InitArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ewrpt_InitArray函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: Page_Main

 function Page_Main()
 {
     global $CustomView2;
     global $rs;
     global $rsgrp;
     global $gsFormError;
     // Aggregate variables
     // 1st dimension = no of groups (level 0 used for grand total)
     // 2nd dimension = no of fields
     $nDtls = 2;
     $nGrps = 1;
     $this->Val = ewrpt_InitArray($nDtls, 0);
     $this->Cnt = ewrpt_Init2DArray($nGrps, $nDtls, 0);
     $this->Smry = ewrpt_Init2DArray($nGrps, $nDtls, 0);
     $this->Mn = ewrpt_Init2DArray($nGrps, $nDtls, NULL);
     $this->Mx = ewrpt_Init2DArray($nGrps, $nDtls, NULL);
     $this->GrandSmry = ewrpt_InitArray($nDtls, 0);
     $this->GrandMn = ewrpt_InitArray($nDtls, NULL);
     $this->GrandMx = ewrpt_InitArray($nDtls, NULL);
     // Set up if accumulation required
     $this->Col = array(FALSE, FALSE);
     // Set up groups per page dynamically
     $this->SetUpDisplayGrps();
     // Set up popup filter
     $this->SetupPopup();
     // Extended filter
     $sExtendedFilter = "";
     // Build popup filter
     $sPopupFilter = $this->GetPopupFilter();
     //ewrpt_SetDebugMsg("popup filter: " . $sPopupFilter);
     if ($sPopupFilter != "") {
         if ($this->Filter != "") {
             $this->Filter = "({$this->Filter}) AND ({$sPopupFilter})";
         } else {
             $this->Filter = $sPopupFilter;
         }
     }
     // No filter
     $this->FilterApplied = FALSE;
     // Get sort
     $this->Sort = $this->GetSort();
     // Get total count
     $sSql = ewrpt_BuildReportSql($CustomView2->SqlSelect(), $CustomView2->SqlWhere(), $CustomView2->SqlGroupBy(), $CustomView2->SqlHaving(), $CustomView2->SqlOrderBy(), $this->Filter, $this->Sort);
     $this->TotalGrps = $this->GetCnt($sSql);
     if ($this->DisplayGrps <= 0) {
         // Display all groups
         $this->DisplayGrps = $this->TotalGrps;
     }
     $this->StartGrp = 1;
     // Show header
     $this->ShowFirstHeader = $this->TotalGrps > 0;
     //$this->ShowFirstHeader = TRUE; // Uncomment to always show header
     // Set up start position if not export all
     if ($CustomView2->ExportAll && $CustomView2->Export != "") {
         $this->DisplayGrps = $this->TotalGrps;
     } else {
         $this->SetUpStartGroup();
     }
     // Get current page records
     $rs = $this->GetRs($sSql, $this->StartGrp, $this->DisplayGrps);
 }
开发者ID:asmirasurianie,项目名称:xaminer-v10,代码行数:61,代码来源:CustomView2rpt.php


示例2: Page_Main

 function Page_Main()
 {
     global $Report13;
     global $rs;
     global $rsgrp;
     global $gsFormError;
     // Aggregate variables
     // 1st dimension = no of groups (level 0 used for grand total)
     // 2nd dimension = no of fields
     $nDtls = 1;
     $nGrps = 6;
     $this->Val = ewrpt_InitArray($nDtls, 0);
     $this->Cnt = ewrpt_Init2DArray($nGrps, $nDtls, 0);
     $this->Smry = ewrpt_Init2DArray($nGrps, $nDtls, 0);
     $this->Mn = ewrpt_Init2DArray($nGrps, $nDtls, NULL);
     $this->Mx = ewrpt_Init2DArray($nGrps, $nDtls, NULL);
     $this->GrandSmry = ewrpt_InitArray($nDtls, 0);
     $this->GrandMn = ewrpt_InitArray($nDtls, NULL);
     $this->GrandMx = ewrpt_InitArray($nDtls, NULL);
     // Set up if accumulation required
     $this->Col = array(FALSE);
     // Set up groups per page dynamically
     $this->SetUpDisplayGrps();
     $Report13->First_Name->SelectionList = "";
     $Report13->First_Name->DefaultSelectionList = "";
     $Report13->First_Name->ValueList = "";
     $Report13->Paper_Name->SelectionList = "";
     $Report13->Paper_Name->DefaultSelectionList = "";
     $Report13->Paper_Name->ValueList = "";
     // Load default filter values
     $this->LoadDefaultFilters();
     // Set up popup filter
     $this->SetupPopup();
     // Extended filter
     $sExtendedFilter = "";
     // Build popup filter
     $sPopupFilter = $this->GetPopupFilter();
     //ewrpt_SetDebugMsg("popup filter: " . $sPopupFilter);
     if ($sPopupFilter != "") {
         if ($this->Filter != "") {
             $this->Filter = "({$this->Filter}) AND ({$sPopupFilter})";
         } else {
             $this->Filter = $sPopupFilter;
         }
     }
     // Check if filter applied
     $this->FilterApplied = $this->CheckFilter();
     // Get sort
     $this->Sort = $this->GetSort();
     // Get total group count
     $sGrpSort = ewrpt_UpdateSortFields($Report13->SqlOrderByGroup(), $this->Sort, 2);
     // Get grouping field only
     $sSql = ewrpt_BuildReportSql($Report13->SqlSelectGroup(), $Report13->SqlWhere(), $Report13->SqlGroupBy(), $Report13->SqlHaving(), $Report13->SqlOrderByGroup(), $this->Filter, $sGrpSort);
     $this->TotalGrps = $this->GetGrpCnt($sSql);
     if ($this->DisplayGrps <= 0) {
         // Display all groups
         $this->DisplayGrps = $this->TotalGrps;
     }
     $this->StartGrp = 1;
     // Show header
     $this->ShowFirstHeader = $this->TotalGrps > 0;
     //$this->ShowFirstHeader = TRUE; // Uncomment to always show header
     // Set up start position if not export all
     if ($Report13->ExportAll && $Report13->Export != "") {
         $this->DisplayGrps = $this->TotalGrps;
     } else {
         $this->SetUpStartGroup();
     }
     // Get current page groups
     $rsgrp = $this->GetGrpRs($sSql, $this->StartGrp, $this->DisplayGrps);
     // Init detail recordset
     $rs = NULL;
 }
开发者ID:asmirasurianie,项目名称:xaminer-v10,代码行数:73,代码来源:Report13smry.php


示例3: ewrpt_InitArray

function &ewrpt_Init2DArray($len1, $len2, $value)
{
    return ewrpt_InitArray($len1, ewrpt_InitArray($len2, $value));
}
开发者ID:asmirasurianie,项目名称:xaminer-v10,代码行数:4,代码来源:ewrfn4.php


示例4: RenderRow

 function RenderRow()
 {
     global $conn, $Security;
     global $Crosstab1;
     // Set up summary values
     $colcnt = $this->ColCount;
     $Crosstab1->SummaryCellAttrs = ewrpt_InitArray($colcnt, NULL);
     $Crosstab1->SummaryViewAttrs = ewrpt_InitArray($colcnt, NULL);
     $Crosstab1->SummaryCurrentValue = ewrpt_InitArray($colcnt, NULL);
     $Crosstab1->SummaryViewValue = ewrpt_InitArray($colcnt, NULL);
     if ($Crosstab1->RowTotalType == EWRPT_ROWTOTAL_GRAND) {
         // Grand total
         // aggregate sql
         $sSql = ewrpt_BuildReportSql($this->SqlSelectAggWork, $Crosstab1->SqlWhere(), $Crosstab1->SqlGroupByAgg(), "", "", $this->Filter, "");
         $rsagg = $conn->Execute($sSql);
         if ($rsagg && !$rsagg->EOF) {
             $rsagg->MoveFirst();
         }
     }
     for ($i = 1; $i <= $this->ColCount; $i++) {
         if ($this->Col[$i]->Visible) {
             if ($Crosstab1->RowType == EWRPT_ROWTYPE_DETAIL) {
                 // Detail row
                 $thisval = $this->Val[$i];
             } elseif ($Crosstab1->RowTotalType == EWRPT_ROWTOTAL_GROUP) {
                 // Group total
                 $thisval = $this->Smry[$i][$Crosstab1->RowGroupLevel];
             } elseif ($Crosstab1->RowTotalType == EWRPT_ROWTOTAL_PAGE) {
                 // Page total
                 $thisval = $this->Smry[$i][0];
             } elseif ($Crosstab1->RowTotalType == EWRPT_ROWTOTAL_GRAND) {
                 // Grand total
                 $thisval = $rsagg && !$rsagg->EOF ? $rsagg->fields[$i + 0 - 1] : 0;
             }
             $Crosstab1->SummaryCurrentValue[$i - 1] = $thisval;
         }
     }
     if ($Crosstab1->RowTotalType == EWRPT_ROWTOTAL_GRAND) {
         // Grand total
         if ($rsagg) {
             $rsagg->Close();
         }
     }
     // Call Row_Rendering event
     $Crosstab1->Row_Rendering();
     /* --------------------
     		'  Render view codes
     		' --------------------- */
     if ($Crosstab1->RowType == EWRPT_ROWTYPE_TOTAL) {
         // Summary row
         // First Name
         $Crosstab1->First_Name->GroupViewValue = $Crosstab1->First_Name->GroupOldValue();
         $Crosstab1->First_Name->CellAttrs["class"] = $Crosstab1->RowGroupLevel == 1 ? "ewRptGrpSummary1" : "ewRptGrpField1";
         // Last Name
         $Crosstab1->Last_Name->GroupViewValue = $Crosstab1->Last_Name->GroupOldValue();
         $Crosstab1->Last_Name->CellAttrs["class"] = $Crosstab1->RowGroupLevel == 2 ? "ewRptGrpSummary2" : "ewRptGrpField2";
         // Set up summary values
         $scvcnt = count($Crosstab1->SummaryCurrentValue);
         for ($i = 0; $i < $scvcnt; $i++) {
             $Crosstab1->SummaryViewValue[$i] = $Crosstab1->SummaryCurrentValue[$i];
             $Crosstab1->SummaryViewAttrs[$i]["style"] = "";
             $Crosstab1->SummaryCellAttrs[$i]["style"] = "";
             $Crosstab1->SummaryCellAttrs[$i]["class"] = $Crosstab1->RowTotalType == EWRPT_ROWTOTAL_GROUP ? "ewRptGrpSummary" . $Crosstab1->RowGroupLevel : "";
         }
     } else {
         // First Name
         $Crosstab1->First_Name->GroupViewValue = $Crosstab1->First_Name->GroupValue();
         $Crosstab1->First_Name->CellAttrs["class"] = "ewRptGrpField1";
         if ($Crosstab1->First_Name->GroupValue() == $Crosstab1->First_Name->GroupOldValue() && !$this->ChkLvlBreak(1)) {
             $Crosstab1->First_Name->GroupViewValue = "&nbsp;";
         }
         // Last Name
         $Crosstab1->Last_Name->GroupViewValue = $Crosstab1->Last_Name->GroupValue();
         $Crosstab1->Last_Name->CellAttrs["class"] = "ewRptGrpField2";
         if ($Crosstab1->Last_Name->GroupValue() == $Crosstab1->Last_Name->GroupOldValue() && !$this->ChkLvlBreak(2)) {
             $Crosstab1->Last_Name->GroupViewValue = "&nbsp;";
         }
         // Set up summary values
         $scvcnt = count($Crosstab1->SummaryCurrentValue);
         for ($i = 0; $i < $scvcnt; $i++) {
             $Crosstab1->SummaryViewValue[$i] = $Crosstab1->SummaryCurrentValue[$i];
             $Crosstab1->SummaryViewAttrs[$i]["style"] = "";
             $Crosstab1->SummaryCellAttrs[$i]["style"] = "";
             $Crosstab1->SummaryCellAttrs[$i]["class"] = $this->RecCount % 2 != 1 ? "ewTableAltRow" : "ewTableRow";
         }
     }
     // First Name
     $Crosstab1->First_Name->HrefValue = "";
     // Last Name
     $Crosstab1->Last_Name->HrefValue = "";
     // Call Row_Rendered event
     $Crosstab1->Row_Rendered();
 }
开发者ID:asmirasurianie,项目名称:xaminer-v10,代码行数:93,代码来源:Crosstab1ctb.php



注:本文中的ewrpt_InitArray函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ewrpt_StripSlashes函数代码示例发布时间:2022-05-15
下一篇:
PHP ewrpt_CurrentPage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap