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

Note_Date->ViewValue ?>

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

Note_author->ViewValue ?>

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

Note->ViewValue ?>

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