Page_Init(); // Page main $tofferers_grid->Page_Main(); // Global Page Rendering event (in userfn*.php) Page_Rendering(); // Page Rendering event $tofferers_grid->Page_Render(); ?> Export == "") { ?> CurrentAction == "gridadd") { if ($tofferers->CurrentMode == "copy") { $bSelectLimit = $tofferers_grid->UseSelectLimit; if ($bSelectLimit) { $tofferers_grid->TotalRecs = $tofferers->SelectRecordCount(); $tofferers_grid->Recordset = $tofferers_grid->LoadRecordset($tofferers_grid->StartRec-1, $tofferers_grid->DisplayRecs); } else { if ($tofferers_grid->Recordset = $tofferers_grid->LoadRecordset()) $tofferers_grid->TotalRecs = $tofferers_grid->Recordset->RecordCount(); } $tofferers_grid->StartRec = 1; $tofferers_grid->DisplayRecs = $tofferers_grid->TotalRecs; } else { $tofferers->CurrentFilter = "0=1"; $tofferers_grid->StartRec = 1; $tofferers_grid->DisplayRecs = $tofferers->GridAddRowCount; } $tofferers_grid->TotalRecs = $tofferers_grid->DisplayRecs; $tofferers_grid->StopRec = $tofferers_grid->DisplayRecs; } else { $bSelectLimit = $tofferers_grid->UseSelectLimit; if ($bSelectLimit) { if ($tofferers_grid->TotalRecs <= 0) $tofferers_grid->TotalRecs = $tofferers->SelectRecordCount(); } else { if (!$tofferers_grid->Recordset && ($tofferers_grid->Recordset = $tofferers_grid->LoadRecordset())) $tofferers_grid->TotalRecs = $tofferers_grid->Recordset->RecordCount(); } $tofferers_grid->StartRec = 1; $tofferers_grid->DisplayRecs = $tofferers_grid->TotalRecs; // Display all records if ($bSelectLimit) $tofferers_grid->Recordset = $tofferers_grid->LoadRecordset($tofferers_grid->StartRec-1, $tofferers_grid->DisplayRecs); // Set no record found message if ($tofferers->CurrentAction == "" && $tofferers_grid->TotalRecs == 0) { if (!$Security->CanList()) $tofferers_grid->setWarningMessage(ew_DeniedMsg()); if ($tofferers_grid->SearchWhere == "0=101") $tofferers_grid->setWarningMessage($Language->Phrase("EnterSearchCriteria")); else $tofferers_grid->setWarningMessage($Language->Phrase("NoRecord")); } } $tofferers_grid->RenderOtherOptions(); ?> ShowPageHeader(); ?> ShowMessage(); ?> TotalRecs > 0 || $tofferers->CurrentAction <> "") { ?>
ShowOtherOptions) { ?>
OtherOptions as &$option) $option->Render("body"); ?>
ewGridMiddlePanel"> TableCustomInnerHtml ?> RowType = EW_ROWTYPE_HEADER; // Render list options $tofferers_grid->RenderListOptions(); // Render list options (header, left) $tofferers_grid->ListOptions->Render("header", "left"); ?> Name->Visible) { // Name ?> SortUrl($tofferers->Name) == "") { ?> Surname->Visible) { // Surname ?> SortUrl($tofferers->Surname) == "") { ?> Institution_Type->Visible) { // Institution_Type ?> SortUrl($tofferers->Institution_Type) == "") { ?> Institution_Name->Visible) { // Institution_Name ?> SortUrl($tofferers->Institution_Name) == "") { ?> Address->Visible) { // Address ?> SortUrl($tofferers->Address) == "") { ?> Phone->Visible) { // Phone ?> SortUrl($tofferers->Phone) == "") { ?> Phone_Mobile->Visible) { // Phone_Mobile ?> SortUrl($tofferers->Phone_Mobile) == "") { ?> Town->Visible) { // Town ?> SortUrl($tofferers->Town) == "") { ?> ListOptions->Render("header", "right"); ?> StartRec = 1; $tofferers_grid->StopRec = $tofferers_grid->TotalRecs; // Show all records // Restore number of post back records if ($objForm) { $objForm->Index = -1; if ($objForm->HasValue($tofferers_grid->FormKeyCountName) && ($tofferers->CurrentAction == "gridadd" || $tofferers->CurrentAction == "gridedit" || $tofferers->CurrentAction == "F")) { $tofferers_grid->KeyCount = $objForm->GetValue($tofferers_grid->FormKeyCountName); $tofferers_grid->StopRec = $tofferers_grid->StartRec + $tofferers_grid->KeyCount - 1; } } $tofferers_grid->RecCnt = $tofferers_grid->StartRec - 1; if ($tofferers_grid->Recordset && !$tofferers_grid->Recordset->EOF) { $tofferers_grid->Recordset->MoveFirst(); $bSelectLimit = $tofferers_grid->UseSelectLimit; if (!$bSelectLimit && $tofferers_grid->StartRec > 1) $tofferers_grid->Recordset->Move($tofferers_grid->StartRec - 1); } elseif (!$tofferers->AllowAddDeleteRow && $tofferers_grid->StopRec == 0) { $tofferers_grid->StopRec = $tofferers->GridAddRowCount; } // Initialize aggregate $tofferers->RowType = EW_ROWTYPE_AGGREGATEINIT; $tofferers->ResetAttrs(); $tofferers_grid->RenderRow(); if ($tofferers->CurrentAction == "gridadd") $tofferers_grid->RowIndex = 0; if ($tofferers->CurrentAction == "gridedit") $tofferers_grid->RowIndex = 0; while ($tofferers_grid->RecCnt < $tofferers_grid->StopRec) { $tofferers_grid->RecCnt++; if (intval($tofferers_grid->RecCnt) >= intval($tofferers_grid->StartRec)) { $tofferers_grid->RowCnt++; if ($tofferers->CurrentAction == "gridadd" || $tofferers->CurrentAction == "gridedit" || $tofferers->CurrentAction == "F") { $tofferers_grid->RowIndex++; $objForm->Index = $tofferers_grid->RowIndex; if ($objForm->HasValue($tofferers_grid->FormActionName)) $tofferers_grid->RowAction = strval($objForm->GetValue($tofferers_grid->FormActionName)); elseif ($tofferers->CurrentAction == "gridadd") $tofferers_grid->RowAction = "insert"; else $tofferers_grid->RowAction = ""; } // Set up key count $tofferers_grid->KeyCount = $tofferers_grid->RowIndex; // Init row class and style $tofferers->ResetAttrs(); $tofferers->CssClass = ""; if ($tofferers->CurrentAction == "gridadd") { if ($tofferers->CurrentMode == "copy") { $tofferers_grid->LoadRowValues($tofferers_grid->Recordset); // Load row values $tofferers_grid->SetRecordKey($tofferers_grid->RowOldKey, $tofferers_grid->Recordset); // Set old record key } else { $tofferers_grid->LoadDefaultValues(); // Load default values $tofferers_grid->RowOldKey = ""; // Clear old key value } } else { $tofferers_grid->LoadRowValues($tofferers_grid->Recordset); // Load row values } $tofferers->RowType = EW_ROWTYPE_VIEW; // Render view if ($tofferers->CurrentAction == "gridadd") // Grid add $tofferers->RowType = EW_ROWTYPE_ADD; // Render add if ($tofferers->CurrentAction == "gridadd" && $tofferers->EventCancelled && !$objForm->HasValue("k_blankrow")) // Insert failed $tofferers_grid->RestoreCurrentRowFormValues($tofferers_grid->RowIndex); // Restore form values if ($tofferers->CurrentAction == "gridedit") { // Grid edit if ($tofferers->EventCancelled) { $tofferers_grid->RestoreCurrentRowFormValues($tofferers_grid->RowIndex); // Restore form values } if ($tofferers_grid->RowAction == "insert") $tofferers->RowType = EW_ROWTYPE_ADD; // Render add else $tofferers->RowType = EW_ROWTYPE_EDIT; // Render edit } if ($tofferers->CurrentAction == "gridedit" && ($tofferers->RowType == EW_ROWTYPE_EDIT || $tofferers->RowType == EW_ROWTYPE_ADD) && $tofferers->EventCancelled) // Update failed $tofferers_grid->RestoreCurrentRowFormValues($tofferers_grid->RowIndex); // Restore form values if ($tofferers->RowType == EW_ROWTYPE_EDIT) // Edit row $tofferers_grid->EditRowCnt++; if ($tofferers->CurrentAction == "F") // Confirm row $tofferers_grid->RestoreCurrentRowFormValues($tofferers_grid->RowIndex); // Restore form values // Set up row id / data-rowindex $tofferers->RowAttrs = array_merge($tofferers->RowAttrs, array('data-rowindex'=>$tofferers_grid->RowCnt, 'id'=>'r' . $tofferers_grid->RowCnt . '_tofferers', 'data-rowtype'=>$tofferers->RowType)); // Render row $tofferers_grid->RenderRow(); // Render list options $tofferers_grid->RenderListOptions(); // Skip delete row / empty row for confirm page if ($tofferers_grid->RowAction <> "delete" && $tofferers_grid->RowAction <> "insertdelete" && !($tofferers_grid->RowAction == "insert" && $tofferers->CurrentAction == "F" && $tofferers_grid->EmptyRow())) { ?> RowAttributes() ?>> ListOptions->Render("body", "left", $tofferers_grid->RowCnt); ?> Name->Visible) { // Name ?> RowType == EW_ROWTYPE_ADD) { // Add record ?> RowType == EW_ROWTYPE_EDIT || $tofferers->CurrentMode == "edit") { ?> Surname->Visible) { // Surname ?> Institution_Type->Visible) { // Institution_Type ?> Institution_Name->Visible) { // Institution_Name ?> Address->Visible) { // Address ?> Phone->Visible) { // Phone ?> Phone_Mobile->Visible) { // Phone_Mobile ?> Town->Visible) { // Town ?> ListOptions->Render("body", "right", $tofferers_grid->RowCnt); ?> RowType == EW_ROWTYPE_ADD || $tofferers->RowType == EW_ROWTYPE_EDIT) { ?> CurrentAction <> "gridadd" || $tofferers->CurrentMode == "copy") if (!$tofferers_grid->Recordset->EOF) $tofferers_grid->Recordset->MoveNext(); } ?> CurrentMode == "add" || $tofferers->CurrentMode == "copy" || $tofferers->CurrentMode == "edit") { $tofferers_grid->RowIndex = '$rowindex$'; $tofferers_grid->LoadDefaultValues(); // Set row properties $tofferers->ResetAttrs(); $tofferers->RowAttrs = array_merge($tofferers->RowAttrs, array('data-rowindex'=>$tofferers_grid->RowIndex, 'id'=>'r0_tofferers', 'data-rowtype'=>EW_ROWTYPE_ADD)); ew_AppendClass($tofferers->RowAttrs["class"], "ewTemplate"); $tofferers->RowType = EW_ROWTYPE_ADD; // Render row $tofferers_grid->RenderRow(); // Render list options $tofferers_grid->RenderListOptions(); $tofferers_grid->StartRowCnt = 0; ?> RowAttributes() ?>> ListOptions->Render("body", "left", $tofferers_grid->RowIndex); ?> Name->Visible) { // Name ?> Surname->Visible) { // Surname ?> Institution_Type->Visible) { // Institution_Type ?> Institution_Name->Visible) { // Institution_Name ?> Address->Visible) { // Address ?> Phone->Visible) { // Phone ?> Phone_Mobile->Visible) { // Phone_Mobile ?> Town->Visible) { // Town ?> ListOptions->Render("body", "right", $tofferers_grid->RowCnt); ?>
Name->FldCaption() ?>
Name->FldCaption() ?>Name->getSort() == "ASC") { ?>Name->getSort() == "DESC") { ?>
Surname->FldCaption() ?>
Surname->FldCaption() ?>Surname->getSort() == "ASC") { ?>Surname->getSort() == "DESC") { ?>
Institution_Type->FldCaption() ?>
Institution_Type->FldCaption() ?>Institution_Type->getSort() == "ASC") { ?>Institution_Type->getSort() == "DESC") { ?>
Institution_Name->FldCaption() ?>
Institution_Name->FldCaption() ?>Institution_Name->getSort() == "ASC") { ?>Institution_Name->getSort() == "DESC") { ?>
Address->FldCaption() ?>
Address->FldCaption() ?>Address->getSort() == "ASC") { ?>Address->getSort() == "DESC") { ?>
Phone->FldCaption() ?>
Phone->FldCaption() ?>Phone->getSort() == "ASC") { ?>Phone->getSort() == "DESC") { ?>
Phone_Mobile->FldCaption() ?>
Phone_Mobile->FldCaption() ?>Phone_Mobile->getSort() == "ASC") { ?>Phone_Mobile->getSort() == "DESC") { ?>
Town->FldCaption() ?>
Town->FldCaption() ?>Town->getSort() == "ASC") { ?>Town->getSort() == "DESC") { ?>
Name->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> Name->EditAttributes() ?>> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> Name->EditAttributes() ?>> RowType == EW_ROWTYPE_VIEW) { // View record ?> Name->ViewAttributes() ?>> Name->ListViewValue() ?> CurrentAction <> "F") { ?> RowCnt ?>"> Surname->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> Surname->EditAttributes() ?>> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> Surname->EditAttributes() ?>> RowType == EW_ROWTYPE_VIEW) { // View record ?> Surname->ViewAttributes() ?>> Surname->ListViewValue() ?> CurrentAction <> "F") { ?> Institution_Type->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> RowType == EW_ROWTYPE_VIEW) { // View record ?> Institution_Type->ViewAttributes() ?>> Institution_Type->ListViewValue() ?> CurrentAction <> "F") { ?> Institution_Name->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> Institution_Name->EditAttributes() ?>> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> Institution_Name->EditAttributes() ?>> RowType == EW_ROWTYPE_VIEW) { // View record ?> Institution_Name->ViewAttributes() ?>> Institution_Name->ListViewValue() ?> CurrentAction <> "F") { ?> Address->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> Address->EditAttributes() ?>> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> Address->EditAttributes() ?>> RowType == EW_ROWTYPE_VIEW) { // View record ?> Address->ViewAttributes() ?>> Address->ListViewValue() ?> CurrentAction <> "F") { ?> Phone->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> Phone->EditAttributes() ?>> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> Phone->EditAttributes() ?>> RowType == EW_ROWTYPE_VIEW) { // View record ?> Phone->ViewAttributes() ?>> Phone->ListViewValue() ?> CurrentAction <> "F") { ?> Phone_Mobile->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> Phone_Mobile->EditAttributes() ?>> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> Phone_Mobile->EditAttributes() ?>> RowType == EW_ROWTYPE_VIEW) { // View record ?> Phone_Mobile->ViewAttributes() ?>> Phone_Mobile->ListViewValue() ?> CurrentAction <> "F") { ?> Town->CellAttributes() ?>> RowType == EW_ROWTYPE_ADD) { // Add record ?> Town->EditAttributes() ?>> RowType == EW_ROWTYPE_EDIT) { // Edit record ?> Town->EditAttributes() ?>> RowType == EW_ROWTYPE_VIEW) { // View record ?> Town->ViewAttributes() ?>> Town->ListViewValue() ?> CurrentAction <> "F") { ?>
CurrentAction <> "F") { ?> Name->EditAttributes() ?>> Name->ViewAttributes() ?>>

Name->ViewValue ?>

CurrentAction <> "F") { ?> Surname->EditAttributes() ?>> Surname->ViewAttributes() ?>>

Surname->ViewValue ?>

CurrentAction <> "F") { ?> Institution_Type->ViewAttributes() ?>>

Institution_Type->ViewValue ?>

CurrentAction <> "F") { ?> Institution_Name->EditAttributes() ?>> Institution_Name->ViewAttributes() ?>>

Institution_Name->ViewValue ?>

CurrentAction <> "F") { ?> Address->EditAttributes() ?>> Address->ViewAttributes() ?>>

Address->ViewValue ?>

CurrentAction <> "F") { ?> Phone->EditAttributes() ?>> Phone->ViewAttributes() ?>>

Phone->ViewValue ?>

CurrentAction <> "F") { ?> Phone_Mobile->EditAttributes() ?>> Phone_Mobile->ViewAttributes() ?>>

Phone_Mobile->ViewValue ?>

CurrentAction <> "F") { ?> Town->EditAttributes() ?>> Town->ViewAttributes() ?>>

Town->ViewValue ?>

CurrentMode == "add" || $tofferers->CurrentMode == "copy") { ?> MultiSelectKey ?> CurrentMode == "edit") { ?> MultiSelectKey ?> CurrentMode == "") { ?>
Recordset) $tofferers_grid->Recordset->Close(); ?> ShowOtherOptions) { ?>
TotalRecs == 0 && $tofferers->CurrentAction == "") { // Show other options ?>
OtherOptions as &$option) { $option->ButtonClass = ""; $option->Render("body", ""); } ?>
Export == "") { ?> ShowPageFooter(); if (EW_DEBUG_ENABLED) echo ew_DebugMsg(); ?> Page_Terminate(); ?>